diff --git a/go.mod b/go.mod index c6a43f8f0eb..99bf9862915 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.25.5 require ( github.com/Masterminds/squirrel v1.5.4 github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b - github.com/alicebob/miniredis/v2 v2.35.0 + github.com/alicebob/miniredis/v2 v2.36.1 github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf github.com/cortexproject/promqlsmith v0.0.0-20250407233056-90db95b1a4e4 github.com/dustin/go-humanize v1.0.1 @@ -13,25 +13,25 @@ require ( github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb github.com/felixge/fgprof v0.9.5 github.com/go-kit/log v0.2.1 - github.com/go-openapi/strfmt v0.24.0 - github.com/go-openapi/swag v0.25.1 // indirect + github.com/go-openapi/strfmt v0.25.0 + github.com/go-openapi/swag v0.25.4 // indirect github.com/go-redis/redis/v8 v8.11.5 github.com/gogo/protobuf v1.3.2 github.com/gogo/status v1.1.1 - github.com/golang-migrate/migrate/v4 v4.18.1 + github.com/golang-migrate/migrate/v4 v4.19.1 github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v1.0.0 github.com/gorilla/mux v1.8.1 github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 - github.com/hashicorp/consul/api v1.32.0 + github.com/hashicorp/consul/api v1.33.2 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-metrics v0.5.4 github.com/hashicorp/go-sockaddr v1.0.7 - github.com/hashicorp/memberlist v0.5.3 + github.com/hashicorp/memberlist v0.5.4 github.com/json-iterator/go v1.1.12 - github.com/klauspost/compress v1.18.2 - github.com/lib/pq v1.10.9 + github.com/klauspost/compress v1.18.3 + github.com/lib/pq v1.11.1 github.com/minio/minio-go/v7 v7.0.98 github.com/mitchellh/go-wordwrap v1.0.1 github.com/oklog/ulid v1.3.1 @@ -39,108 +39,108 @@ require ( github.com/opentracing-contrib/go-stdlib v1.1.1 github.com/opentracing/opentracing-go v1.2.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/alertmanager v0.29.0 + github.com/prometheus/alertmanager v0.31.0 github.com/prometheus/client_golang v1.23.2 github.com/prometheus/client_model v0.6.2 - github.com/prometheus/common v0.67.1 + github.com/prometheus/common v0.67.5 // Prometheus maps version 3.x.y to tags v0.30x.y. github.com/prometheus/prometheus v0.306.0 github.com/segmentio/fasthash v1.0.3 github.com/sony/gobreaker v1.0.0 - github.com/spf13/afero v1.11.0 + github.com/spf13/afero v1.15.0 github.com/stretchr/testify v1.11.1 github.com/thanos-io/objstore v0.0.0-20250804093838-71d60dfee488 github.com/thanos-io/promql-engine v0.0.0-20251224085502-3988aa4704b5 github.com/thanos-io/thanos v0.40.1-0.20260112164636-49dde505913b github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5 - go.etcd.io/etcd/api/v3 v3.5.17 - go.etcd.io/etcd/client/pkg/v3 v3.5.17 - go.etcd.io/etcd/client/v3 v3.5.17 - go.opentelemetry.io/contrib/propagators/aws v1.36.0 - go.opentelemetry.io/otel v1.38.0 - go.opentelemetry.io/otel/bridge/opentracing v1.36.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 - go.opentelemetry.io/otel/sdk v1.38.0 - go.opentelemetry.io/otel/trace v1.38.0 + go.etcd.io/etcd/api/v3 v3.6.7 + go.etcd.io/etcd/client/pkg/v3 v3.6.7 + go.etcd.io/etcd/client/v3 v3.6.7 + go.opentelemetry.io/contrib/propagators/aws v1.40.0 + go.opentelemetry.io/otel v1.40.0 + go.opentelemetry.io/otel/bridge/opentracing v1.40.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 + go.opentelemetry.io/otel/sdk v1.40.0 + go.opentelemetry.io/otel/trace v1.40.0 go.uber.org/atomic v1.11.0 - golang.org/x/net v0.48.0 + golang.org/x/net v0.49.0 golang.org/x/sync v0.19.0 - golang.org/x/time v0.12.0 - google.golang.org/grpc v1.76.0 + golang.org/x/time v0.14.0 + google.golang.org/grpc v1.78.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/VictoriaMetrics/fastcache v1.12.2 - github.com/aws/aws-sdk-go-v2 v1.39.2 - github.com/aws/aws-sdk-go-v2/config v1.31.12 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.1 + github.com/VictoriaMetrics/fastcache v1.13.2 + github.com/aws/aws-sdk-go-v2 v1.41.1 + github.com/aws/aws-sdk-go-v2/config v1.32.7 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.54.0 github.com/axiomhq/hyperloglog v0.2.6 github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 github.com/cespare/xxhash/v2 v2.3.0 - github.com/go-openapi/swag/jsonutils v0.25.1 + github.com/go-openapi/swag/jsonutils v0.25.4 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/oklog/ulid/v2 v2.1.1 - github.com/parquet-go/parquet-go v0.26.4 + github.com/parquet-go/parquet-go v0.27.0 github.com/prometheus-community/parquet-common v0.0.0-20251211092633-65ebeae24e94 github.com/prometheus/client_golang/exp v0.0.0-20250914183048-a974e0d45e0a - github.com/prometheus/procfs v0.16.1 + github.com/prometheus/procfs v0.19.2 github.com/sercand/kuberesolver/v5 v5.1.1 - github.com/tjhop/slog-gokit v0.1.4 - go.opentelemetry.io/collector/pdata v1.35.0 + github.com/tjhop/slog-gokit v0.1.5 + go.opentelemetry.io/collector/pdata v1.51.0 go.uber.org/automaxprocs v1.6.0 - google.golang.org/protobuf v1.36.10 + google.golang.org/protobuf v1.36.11 ) require ( cel.dev/expr v0.24.0 // indirect - cloud.google.com/go v0.120.0 // indirect - cloud.google.com/go/auth v0.16.2 // indirect + cloud.google.com/go v0.121.6 // indirect + cloud.google.com/go/auth v0.16.4 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect cloud.google.com/go/compute/metadata v0.9.0 // indirect cloud.google.com/go/iam v1.5.2 // indirect cloud.google.com/go/monitoring v1.24.2 // indirect - cloud.google.com/go/storage v1.50.0 // indirect + cloud.google.com/go/storage v1.56.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.52.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect github.com/VictoriaMetrics/easyproto v0.1.4 // indirect github.com/alecthomas/kingpin/v2 v2.4.0 // indirect github.com/andybalholm/brotli v1.1.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.18.16 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.6 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect - github.com/aws/aws-sdk-go-v2/service/sns v1.38.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect - github.com/aws/smithy-go v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.19.7 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.17 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sns v1.39.11 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect + github.com/aws/smithy-go v1.24.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/caio/go-tdigest v3.1.0+incompatible // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cenkalti/backoff/v5 v5.0.2 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect - github.com/coder/quartz v0.2.1 // indirect - github.com/coreos/go-semver v0.3.0 // indirect + github.com/coder/quartz v0.3.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.6.0 // indirect github.com/cristalhq/hedgedhttp v0.9.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -157,47 +157,46 @@ require ( github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/go-chi/chi/v5 v5.2.2 // indirect github.com/go-ini/ini v1.67.0 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logfmt/logfmt v0.6.1 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.24.0 // indirect - github.com/go-openapi/errors v0.22.3 // indirect - github.com/go-openapi/jsonpointer v0.22.1 // indirect - github.com/go-openapi/jsonreference v0.21.2 // indirect - github.com/go-openapi/loads v0.23.1 // indirect - github.com/go-openapi/runtime v0.29.0 // indirect - github.com/go-openapi/spec v0.22.0 // indirect - github.com/go-openapi/swag/cmdutils v0.25.1 // indirect - github.com/go-openapi/swag/conv v0.25.1 // indirect - github.com/go-openapi/swag/fileutils v0.25.1 // indirect - github.com/go-openapi/swag/jsonname v0.25.1 // indirect - github.com/go-openapi/swag/loading v0.25.1 // indirect - github.com/go-openapi/swag/mangling v0.25.1 // indirect - github.com/go-openapi/swag/netutils v0.25.1 // indirect - github.com/go-openapi/swag/stringutils v0.25.1 // indirect - github.com/go-openapi/swag/typeutils v0.25.1 // indirect - github.com/go-openapi/swag/yamlutils v0.25.1 // indirect - github.com/go-openapi/validate v0.25.0 // indirect + github.com/go-openapi/analysis v0.24.2 // indirect + github.com/go-openapi/errors v0.22.6 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/loads v0.23.2 // indirect + github.com/go-openapi/runtime v0.29.2 // indirect + github.com/go-openapi/spec v0.22.3 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-openapi/validate v0.25.1 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang-jwt/jwt/v5 v5.2.2 // indirect + github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/googleapis/gax-go/v2 v2.14.2 // indirect + github.com/googleapis/gax-go/v2 v2.15.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-version v1.7.0 // indirect + github.com/hashicorp/go-version v1.8.0 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/jessevdk/go-flags v1.6.1 // indirect @@ -218,16 +217,15 @@ require ( github.com/mdlayher/socket v0.5.1 // indirect github.com/mdlayher/vsock v1.2.1 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect - github.com/miekg/dns v1.1.66 // indirect + github.com/miekg/dns v1.1.68 // indirect github.com/minio/crc64nvme v1.1.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/ncw/swift v1.0.53 // indirect github.com/oklog/run v1.2.0 // indirect @@ -242,9 +240,9 @@ require ( github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.11.1 // indirect - github.com/prometheus/exporter-toolkit v0.14.1 // indirect + github.com/prometheus/exporter-toolkit v0.15.1 // indirect github.com/prometheus/otlptranslator v0.0.2 // indirect - github.com/prometheus/sigv4 v0.2.1 // indirect + github.com/prometheus/sigv4 v0.4.0 // indirect github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect github.com/rantav/go-grpc-channelz v0.0.4 // indirect github.com/redis/rueidis v1.0.61 // indirect @@ -258,20 +256,20 @@ require ( github.com/soheilhy/cmux v0.1.5 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/tinylib/msgp v1.6.1 // indirect - github.com/trivago/tgo v1.0.7 // indirect + github.com/twpayne/go-geom v1.6.1 // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/vimeo/galaxycache v1.3.1 // indirect github.com/weaveworks/promrus v1.2.0 // indirect github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/yuin/gopher-lua v1.1.1 // indirect - go.mongodb.org/mongo-driver v1.17.4 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/collector/component v1.35.0 // indirect go.opentelemetry.io/collector/confmap v1.35.0 // indirect go.opentelemetry.io/collector/confmap/xconfmap v0.129.0 // indirect go.opentelemetry.io/collector/consumer v1.35.0 // indirect - go.opentelemetry.io/collector/featuregate v1.35.0 // indirect + go.opentelemetry.io/collector/featuregate v1.51.0 // indirect go.opentelemetry.io/collector/internal/telemetry v0.129.0 // indirect go.opentelemetry.io/collector/pipeline v0.129.0 // indirect go.opentelemetry.io/collector/processor v1.35.0 // indirect @@ -279,16 +277,17 @@ require ( go.opentelemetry.io/contrib/bridges/otelzap v0.11.0 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.38.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.64.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect go.opentelemetry.io/contrib/propagators/autoprop v0.61.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.36.0 // indirect go.opentelemetry.io/contrib/propagators/jaeger v1.36.0 // indirect go.opentelemetry.io/contrib/propagators/ot v1.36.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 // indirect go.opentelemetry.io/otel/log v0.12.2 // indirect - go.opentelemetry.io/otel/metric v1.38.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect - go.opentelemetry.io/proto/otlp v1.7.0 // indirect + go.opentelemetry.io/otel/metric v1.40.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect @@ -296,18 +295,18 @@ require ( go.yaml.in/yaml/v3 v3.0.4 // indirect go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 // indirect - golang.org/x/crypto v0.46.0 // indirect - golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 // indirect - golang.org/x/mod v0.30.0 // indirect - golang.org/x/oauth2 v0.32.0 // indirect - golang.org/x/sys v0.39.0 // indirect - golang.org/x/text v0.32.0 // indirect - golang.org/x/tools v0.39.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect + golang.org/x/mod v0.32.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/tools v0.41.0 // indirect gonum.org/v1/gonum v0.16.0 // indirect - google.golang.org/api v0.239.0 // indirect - google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect + google.golang.org/api v0.247.0 // indirect + google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect gopkg.in/telebot.v3 v3.3.8 // indirect k8s.io/apimachinery v0.33.1 // indirect k8s.io/client-go v0.33.1 // indirect diff --git a/go.sum b/go.sum index acf2ffb76d4..36a61576627 100644 --- a/go.sum +++ b/go.sum @@ -44,8 +44,8 @@ cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMz cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.120.0 h1:wc6bgG9DHyKqF5/vQvX1CiZrtHnxJjBlKUyF9nP6meA= -cloud.google.com/go v0.120.0/go.mod h1:/beW32s8/pGRuj4IILWQNd4uuebeT4dkOhKmkfit64Q= +cloud.google.com/go v0.121.6 h1:waZiuajrI28iAf40cWgycWNgaXPO06dupuS+sgibK6c= +cloud.google.com/go v0.121.6/go.mod h1:coChdst4Ea5vUpiALcYKXEpR1S9ZgXbhEzzMcMR66vI= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -122,8 +122,8 @@ cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEar cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= -cloud.google.com/go/auth v0.16.2 h1:QvBAGFPLrDeoiNjyfVunhQ10HKNYuOwZ5noee0M5df4= -cloud.google.com/go/auth v0.16.2/go.mod h1:sRBas2Y1fB1vZTdurouM0AzuYQBMZinrUYL8EufhtEA= +cloud.google.com/go/auth v0.16.4 h1:fXOAIQmkApVvcIn7Pc2+5J8QTMVbUGLscnSVNl11su8= +cloud.google.com/go/auth v0.16.4/go.mod h1:j10ncYwjX/g3cdX7GpEzsdM+d+ZNsXAbb6qXA7p1Y5M= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= @@ -690,8 +690,8 @@ cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= -cloud.google.com/go/storage v1.50.0 h1:3TbVkzTooBvnZsk7WaAQfOsNrdoM8QHusXA1cpk6QJs= -cloud.google.com/go/storage v1.50.0/go.mod h1:l7XeiD//vx5lfqE3RavfmU9yvk5Pp0Zhcv482poyafY= +cloud.google.com/go/storage v1.56.0 h1:iixmq2Fse2tqxMbWhLWC9HfBj1qdxqAmiK8/eqtsLxI= +cloud.google.com/go/storage v1.56.0/go.mod h1:Tpuj6t4NweCLzlNbw9Z9iwxEkrSem20AetIeH/shgVU= cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= @@ -807,16 +807,18 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 h1:5IT7xOdq17MtcdtL/vtl6mGfzhaq4m4vpollPRmlsBQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0/go.mod h1:ZV4VOm0/eHR06JLrXWe09068dHpr3TRpY9Uo7T+anuA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.50.0 h1:nNMpRpnkWDAaqcpxMJvxa/Ud98gjbYwayJY4/9bdjiU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.50.0/go.mod h1:SZiPHWGOOk3bl8tkevxkoiwPgsIl6CwrWcbwjfHZpdM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.52.0 h1:wbMd4eG/fOhsCa6+IP8uEDvWF5vl7rNoUWmP5f72Tbs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.52.0/go.mod h1:gdIm9TxRk5soClCwuB0FtdXsbqtw0aqPwBEurK9tPkw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 h1:owcC2UnmsZycprQ5RfRgjydWhuoxg71LUfyiQdijZuM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0 h1:4LP6hvB4I5ouTbGgWtixJhgED6xdf67twf9PoY96Tbg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0/go.mod h1:jUZ5LYlw40WMd07qxcQJD5M40aUxrfwqQX1g7zxYnrQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 h1:Ron4zCA/yk6U7WOBXhTJcDpsUBG9npumK6xw2auFltQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0/go.mod h1:cSgYe11MCNYunTnRXrKiR/tHc0eoKjICUuWpNZoVCOo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= @@ -826,15 +828,19 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/VictoriaMetrics/easyproto v0.1.4 h1:r8cNvo8o6sR4QShBXQd1bKw/VVLSQma/V2KhTBPf+Sc= github.com/VictoriaMetrics/easyproto v0.1.4/go.mod h1:QlGlzaJnDfFd8Lk6Ci/fuLxfTo3/GThPs2KH23mv710= -github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= -github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +github.com/VictoriaMetrics/fastcache v1.13.2 h1:2XTB49aLSuCex7e9P5rqrfQcMkzGjh5Vq3GMFa8YpCA= +github.com/VictoriaMetrics/fastcache v1.13.2/go.mod h1:hHXhl4DA2fTL2HTZDJFXWgW0LNjo6B+4aj2Wmng3TjU= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= +github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY= +github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/kingpin v1.3.8-0.20210301060133-17f40c25f497/go.mod h1:b6br6/pDFSfMkBgC96TbpOji05q5pa+v5rIlS0Y6XtI= github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -842,8 +848,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= -github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= -github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM= +github.com/alicebob/miniredis/v2 v2.36.1 h1:Dvc5oAnNOr7BIfPn7tF269U8DvRW1dBG2D5n0WrfYMI= +github.com/alicebob/miniredis/v2 v2.36.1/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible h1:8psS8a+wKfiLt1iVDX79F7Y6wUM49Lcha2FMXt4UM8g= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= @@ -863,42 +869,42 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.55.7 h1:UJrkFq7es5CShfBwlWAC8DA077vp8PyVbQd3lqLiztE= github.com/aws/aws-sdk-go v1.55.7/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= -github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I= -github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= -github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8= -github.com/aws/aws-sdk-go-v2/config v1.31.12/go.mod h1:/MM0dyD7KSDPR+39p9ZNVKaHDLb9qnfDurvVS2KAhN8= -github.com/aws/aws-sdk-go-v2/credentials v1.18.16 h1:4JHirI4zp958zC026Sm+V4pSDwW4pwLefKrc0bF2lwI= -github.com/aws/aws-sdk-go-v2/credentials v1.18.16/go.mod h1:qQMtGx9OSw7ty1yLclzLxXCRbrkjWAM7JnObZjmCB7I= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 h1:Mv4Bc0mWmv6oDuSWTKnk+wgeqPL5DRFu5bQL9BGPQ8Y= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9/go.mod h1:IKlKfRppK2a1y0gy1yH6zD+yX5uplJ6UuPlgd48dJiQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 h1:se2vOWGD3dWQUtfn4wEjRQJb1HK1XsNIt825gskZ970= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9/go.mod h1:hijCGH2VfbZQxqCDN7bwz/4dzxV+hkyhjawAtdPWKZA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 h1:6RBnKZLkJM4hQ+kN6E7yWFveOTg8NLPHAkqrs4ZPlTU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9/go.mod h1:V9rQKRmK7AWuEsOMnHzKj8WyrIir1yUJbZxDuZLFvXI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.1 h1:MXUnj1TKjwQvotPPHFMfynlUljcpl5UccMrkiauKdWI= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.1/go.mod h1:fe3UQAYwylCQRlGnihsqU/tTQkrc2nrW/IhWYwlW9vg= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.6 h1:34ojKW9OV123FZ6Q8Nua3Uwy6yVTcshZ+gLE4gpMDEs= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.6/go.mod h1:sXXWh1G9LKKkNbuR0f0ZPd/IvDXlMGiag40opt4XEgY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD4WZudeEKZ9/iKpiT6cM1JyEROpXjOcdWv8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I= -github.com/aws/aws-sdk-go-v2/service/sns v1.38.5 h1:c0hINjMfDQvQLJJxfNNcIaLYVLC7E0W2zOQOVVKLnnU= -github.com/aws/aws-sdk-go-v2/service/sns v1.38.5/go.mod h1:E427ZzdOMWh/4KtD48AGfbWLX14iyw9URVOdIwtv80o= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.6/go.mod h1:5PfYspyCU5Vw1wNPsxi15LZovOnULudOQuVxphSflQA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7UT9RpFH3hR6HWL6bIgVY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1/go.mod h1:xBEjWD13h+6nq+z4AkqSfSvqRKFgDIQeaMguAJndOWo= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47hZb5HUQ0tn6Q9kA= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.6/go.mod h1:WtKK+ppze5yKPkZ0XwqIVWD4beCwv056ZbPQNoeHqM8= -github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= -github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/aws-sdk-go-v2 v1.41.1 h1:ABlyEARCDLN034NhxlRUSZr4l71mh+T5KAeGh6cerhU= +github.com/aws/aws-sdk-go-v2 v1.41.1/go.mod h1:MayyLB8y+buD9hZqkCW3kX1AKq07Y5pXxtgB+rRFhz0= +github.com/aws/aws-sdk-go-v2/config v1.32.7 h1:vxUyWGUwmkQ2g19n7JY/9YL8MfAIl7bTesIUykECXmY= +github.com/aws/aws-sdk-go-v2/config v1.32.7/go.mod h1:2/Qm5vKUU/r7Y+zUk/Ptt2MDAEKAfUtKc1+3U1Mo3oY= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7 h1:tHK47VqqtJxOymRrNtUXN5SP/zUTvZKeLx4tH6PGQc8= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7/go.mod h1:qOZk8sPDrxhf+4Wf4oT2urYJrYt3RejHSzgAquYeppw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 h1:I0GyV8wiYrP8XpA70g1HBcQO1JlQxCMTW9npl5UbDHY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17/go.mod h1:tyw7BOl5bBe/oqvoIeECFJjMdzXoa/dfVz3QQ5lgHGA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 h1:xOLELNKGp2vsiteLsvLPwxC+mYmO6OZ8PYgiuPJzF8U= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17/go.mod h1:5M5CI3D12dNOtH3/mk6minaRwI2/37ifCURZISxA/IQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 h1:WWLqlh79iO48yLkj1v3ISRNiv+3KdQoZ6JWyfcsyQik= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17/go.mod h1:EhG22vHRrvF8oXSTYStZhJc1aUgKtnJe+aOiFEV90cM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.54.0 h1:SW3MUVGaqOv/h4spv3IubyGz9CpvE0gHWEJsZQNPFMs= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.54.0/go.mod h1:ctEsEHY2vFQc6i4KU07q4n68v7BAmTbujv2Y+z8+hQY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 h1:0ryTNEdJbzUCEWkVXEXoqlXV72J5keC1GvILMOuD00E= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4/go.mod h1:HQ4qwNZh32C3CBeO6iJLQlgtMzqeG17ziAA/3KDJFow= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.17 h1:Nhx/OYX+ukejm9t/MkWI8sucnsiroNYNGb5ddI9ungQ= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.17/go.mod h1:AjmK8JWnlAevq1b1NBtv5oQVG4iqnYXUufdgol+q9wg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 h1:RuNSMoozM8oXlgLG/n6WLaFGoea7/CddrCfIiSA+xdY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17/go.mod h1:F2xxQ9TZz5gDWsclCtPQscGpP0VUOc8RqgFM3vDENmU= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 h1:VrhDvQib/i0lxvr3zqlUwLwJP4fpmpyD9wYG1vfSu+Y= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5/go.mod h1:k029+U8SY30/3/ras4G/Fnv/b88N4mAfliNn08Dem4M= +github.com/aws/aws-sdk-go-v2/service/sns v1.39.11 h1:Ke7RS0NuP9Xwk31prXYcFGA1Qfn8QmNWcxyjKPcXZdc= +github.com/aws/aws-sdk-go-v2/service/sns v1.39.11/go.mod h1:hdZDKzao0PBfJJygT7T92x2uVcWc/htqlhrjFIjnHDM= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 h1:v6EiMvhEYBoHABfbGB4alOYmCIrcgyPPiBE1wZAEbqk= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9/go.mod h1:yifAsgBxgJWn3ggx70A3urX2AN49Y5sJTD1UQFlfqBw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 h1:gd84Omyu9JLriJVCbGApcLzVR3XtmC4ZDPcAI6Ftvds= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13/go.mod h1:sTGThjphYE4Ohw8vJiRStAcu3rbjtXRsdNB0TvZ5wwo= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 h1:5fFjR/ToSOzB2OQ/XqWpZBmNvmP/pJ1jOWYlFDJTjRQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6/go.mod h1:qgFDZQSD/Kys7nJnVqYlWKnh0SSdMjAi0uSwON4wgYQ= +github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk= +github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/axiomhq/hyperloglog v0.2.6 h1:sRhvvF3RIXWQgAXaTphLp4yJiX4S0IN3MWTaAgZoRJw= github.com/axiomhq/hyperloglog v0.2.6/go.mod h1:YjX/dQqCR/7QYX0g8mu8UZAjpIenz1FKM71UEsjFoTo= github.com/baidubce/bce-sdk-go v0.9.230 h1:HzELBKiD7QAgYqZ1qHZexoI2A3Lo/6zYGQFvcUbS5cA= @@ -923,8 +929,8 @@ github.com/caio/go-tdigest v3.1.0+incompatible h1:uoVMJ3Q5lXmVLCCqaMGHLBWnbGoN6L github.com/caio/go-tdigest v3.1.0+incompatible/go.mod h1:sHQM/ubZStBUmF1WbB8FAm8q9GjDajLC5T7ydxE3JHI= 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/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8= -github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= @@ -958,14 +964,15 @@ github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1Ig github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= -github.com/coder/quartz v0.2.1 h1:QgQ2Vc1+mvzewg2uD/nj8MJ9p9gE+QhGJm+Z+NGnrSE= -github.com/coder/quartz v0.2.1/go.mod h1:vsiCc+AHViMKH2CQpGIpFgdHIEQsxwm8yCscqKmzbRA= +github.com/coder/quartz v0.3.0 h1:bUoSEJ77NBfKtUqv6CPSC0AS8dsjqAqqAv7bN02m1mg= +github.com/coder/quartz v0.3.0/go.mod h1:BgE7DOj/8NfvRgvKw0jPLDQH/2Lya2kxcTaNJ8X0rZk= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= @@ -987,14 +994,14 @@ github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33 h1:ucRHb6/lvW/+mT github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dhui/dktest v0.4.3 h1:wquqUxAFdcUgabAVLvSCOKOlag5cIZuaOjYIBOWdsR0= -github.com/dhui/dktest v0.4.3/go.mod h1:zNK8IwktWzQRm6I/l2Wjp7MakiyaFWv4G1hjmodmMTs= +github.com/dhui/dktest v0.4.6 h1:+DPKyScKSEp3VLtbMDHcUq6V5Lm5zfZZVb0Sk7Ahom4= +github.com/dhui/dktest v0.4.6/go.mod h1:JHTSYDtKkvFNFHJKqCzVzqXecyv+tKt8EzceOmQOgbU= github.com/digitalocean/godo v1.157.0 h1:ReELaS6FxXNf8gryUiVH0wmyUmZN8/NCmBX4gXd3F0o= github.com/digitalocean/godo v1.157.0/go.mod h1:tYeiWY5ZXVpU48YaFv0M5irUFHXGorZpDNm7zzdWMzM= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v28.3.0+incompatible h1:ffS62aKWupCWdvcee7nBU9fhnmknOqDPaJAMtfK0ImQ= -github.com/docker/docker v28.3.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI= +github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -1081,63 +1088,67 @@ github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpx github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.1 h1:4hvbpePJKnIzH1B+8OR/JPbTx37NktoI9LE2QZBBkvE= +github.com/go-logfmt/logfmt v0.6.1/go.mod h1:EV2pOAQoZaT1ZXZbqDl5hrymndi4SY9ED9/z6CO0XAk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.24.0 h1:vE/VFFkICKyYuTWYnplQ+aVr45vlG6NcZKC7BdIXhsA= -github.com/go-openapi/analysis v0.24.0/go.mod h1:GLyoJA+bvmGGaHgpfeDh8ldpGo69fAJg7eeMDMRCIrw= -github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= -github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= +github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= +github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= +github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo= +github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= -github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= -github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= -github.com/go-openapi/loads v0.23.1 h1:H8A0dX2KDHxDzc797h0+uiCZ5kwE2+VojaQVaTlXvS0= -github.com/go-openapi/loads v0.23.1/go.mod h1:hZSXkyACCWzWPQqizAv/Ye0yhi2zzHwMmoXQ6YQml44= -github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= -github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= +github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= +github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= +github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= +github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= +github.com/go-openapi/runtime v0.29.2 h1:UmwSGWNmWQqKm1c2MGgXVpC2FTGwPDQeUsBMufc5Yj0= +github.com/go-openapi/runtime v0.29.2/go.mod h1:biq5kJXRJKBJxTDJXAa00DOTa/anflQPhT0/wmjuy+0= github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.24.0 h1:dDsopqbI3wrrlIzeXRbqMihRNnjzGC+ez4NQaAAJLuc= -github.com/go-openapi/strfmt v0.24.0/go.mod h1:Lnn1Bk9rZjXxU9VMADbEEOo7D7CDyKGLsSKekhFr7s4= +github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= +github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.25.1 h1:6uwVsx+/OuvFVPqfQmOOPsqTcm5/GkBhNwLqIR916n8= -github.com/go-openapi/swag v0.25.1/go.mod h1:bzONdGlT0fkStgGPd3bhZf1MnuPkf2YAys6h+jZipOo= -github.com/go-openapi/swag/cmdutils v0.25.1 h1:nDke3nAFDArAa631aitksFGj2omusks88GF1VwdYqPY= -github.com/go-openapi/swag/cmdutils v0.25.1/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= -github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= -github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= -github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= -github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= -github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= -github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= -github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= -github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= -github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= -github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= -github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= -github.com/go-openapi/swag/netutils v0.25.1 h1:2wFLYahe40tDUHfKT1GRC4rfa5T1B4GWZ+msEFA4Fl4= -github.com/go-openapi/swag/netutils v0.25.1/go.mod h1:CAkkvqnUJX8NV96tNhEQvKz8SQo2KF0f7LleiJwIeRE= -github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= -github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= -github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= -github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= -github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= -github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= -github.com/go-openapi/validate v0.25.0 h1:JD9eGX81hDTjoY3WOzh6WqxVBVl7xjsLnvDo1GL5WPU= -github.com/go-openapi/validate v0.25.0/go.mod h1:SUY7vKrN5FiwK6LyvSwKjDfLNirSfWwHNgxd2l29Mmw= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= +github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -1163,8 +1174,6 @@ github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3K github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= @@ -1173,10 +1182,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang-migrate/migrate/v4 v4.18.1 h1:JML/k+t4tpHCpQTCAD62Nu43NUFzHY4CV3uAuvHGC+Y= -github.com/golang-migrate/migrate/v4 v4.18.1/go.mod h1:HAX6m3sQgcdO81tdjn5exv20+3Kb13cmGli1hrD6hks= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/golang-migrate/migrate/v4 v4.19.1 h1:OCyb44lFuQfYXYLx1SCxPZQGU7mcaZ7gH9yH4jSFbBA= +github.com/golang-migrate/migrate/v4 v4.19.1/go.mod h1:CTcgfjxhaUtsLipnLoQRWCrjYXycRz/g5+RWDuYgPrE= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -1305,8 +1314,8 @@ github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38 github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0= -github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w= +github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo= +github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud/v2 v2.7.0 h1:o0m4kgVcPgHlcXiWAjoVxGd8QCmvM5VU+YM71pFbn0E= @@ -1330,14 +1339,14 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/api v1.32.0 h1:5wp5u780Gri7c4OedGEPzmlUEzi0g2KyiPphSr6zjVg= -github.com/hashicorp/consul/api v1.32.0/go.mod h1:Z8YgY0eVPukT/17ejW+l+C7zJmKwgPHtjU1q16v/Y40= +github.com/hashicorp/consul/api v1.33.2 h1:Q6mE0WZsUTJerlnl9TuXzqrtZ0cKdOCsxcZhj5mKbMs= +github.com/hashicorp/consul/api v1.33.2/go.mod h1:K3yoL/vnIBcQV/25NeMZVokRvPPERiqp2Udtr4xAfhs= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= -github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= +github.com/hashicorp/consul/sdk v0.17.1 h1:LumAh8larSXmXw2wvw/lK5ZALkJ2wK8VRwWMLVV5M5c= +github.com/hashicorp/consul/sdk v0.17.1/go.mod h1:EngiixMhmw9T7wApycq6rDRFXXVUwjjf7HuLiGMH/Sw= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1376,8 +1385,8 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= -github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= +github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -1436,8 +1445,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= -github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw= +github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.11 h1:0OwqZRYI2rFrjS4kvkDnqJkKHdHaRnCm68/DY4OxRzU= @@ -1478,8 +1487,8 @@ github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1 github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353 h1:X/79QL0b4YJVO5+OsPH9rF2u428CIrGL/jLmPsoOQQ4= github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353/go.mod h1:N0SVk0uhy+E1PZ3C9ctsPRlvOPAFPkCNlcPBDkt0N3U= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= -github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.11.1 h1:wuChtj2hfsGmmx3nf1m7xC2XpK6OtelS2shMY+bGMtI= +github.com/lib/pq v1.11.1/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA= github.com/linode/linodego v1.52.2 h1:N9ozU27To1LMSrDd8WvJZ5STSz1eGYdyLnxhAR/dIZg= github.com/linode/linodego v1.52.2/go.mod h1:bI949fZaVchjWyKIA08hNyvAcV6BAS+PM2op3p7PAWA= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= @@ -1523,8 +1532,8 @@ github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQo github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE= -github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE= +github.com/miekg/dns v1.1.68 h1:jsSRkNozw7G/mnmXULynzMNIsgY2dHC8LO6U6Ij2JEA= +github.com/miekg/dns v1.1.68/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI= @@ -1559,8 +1568,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozillazg/go-httpheader v0.4.0 h1:aBn6aRXtFzyDLZ4VIRLsZbbJloagQfMnCiYgOq6hK4w= @@ -1599,6 +1609,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opentracing-contrib/go-grpc v0.1.2 h1:MP16Ozc59kqqwn1v18aQxpeGZhsBanJ2iurZYaQSZ+g= github.com/opentracing-contrib/go-grpc v0.1.2/go.mod h1:glU6rl1Fhfp9aXUHkE36K2mR4ht8vih0ekOVlWKEUHM= +github.com/opentracing-contrib/go-grpc/test v0.0.0-20260120234656-e5a2b314e893 h1:j1ZnHIxqHS+GAolWrZRLokXC4liHzsMe/A5qK/117GM= +github.com/opentracing-contrib/go-grpc/test v0.0.0-20260120234656-e5a2b314e893/go.mod h1:FUk1M8xHkaej8rH9B2CV9f96Efxlbn3w7OHGVRA/V+o= github.com/opentracing-contrib/go-stdlib v1.1.1 h1:nl22krMt3PpAWPCKpDjFiAH4Qdr2855F5wOkQ52C0+w= github.com/opentracing-contrib/go-stdlib v1.1.1/go.mod h1:S0p+X9p6dcBkoMTL+Qq2VOvxKs9ys5PpYWXWqlCS0bQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1613,8 +1625,8 @@ github.com/parquet-go/bitpack v1.0.0 h1:AUqzlKzPPXf2bCdjfj4sTeacrUwsT7NlcYDMUQxP github.com/parquet-go/bitpack v1.0.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs= github.com/parquet-go/jsonlite v1.0.0 h1:87QNdi56wOfsE5bdgas0vRzHPxfJgzrXGml1zZdd7VU= github.com/parquet-go/jsonlite v1.0.0/go.mod h1:nDjpkpL4EOtqs6NQugUsi0Rleq9sW/OtC1NnZEnxzF0= -github.com/parquet-go/parquet-go v0.26.4 h1:zJ3l8ef5WJZE2m63pKwyEJ2BhyDlgS0PfOEhuCQQU2A= -github.com/parquet-go/parquet-go v0.26.4/go.mod h1:h9GcSt41Knf5qXI1tp1TfR8bDBUtvdUMzSKe26aZcHk= +github.com/parquet-go/parquet-go v0.27.0 h1:vHWK2xaHbj+v1DYps03yDRpEsdtOeKbhiXUaixoPb3g= +github.com/parquet-go/parquet-go v0.27.0/go.mod h1:navtkAYr2LGoJVp141oXPlO/sxLvaOe3la2JEoD8+rg= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -1651,8 +1663,8 @@ github.com/prometheus-community/parquet-common v0.0.0-20251211092633-65ebeae24e9 github.com/prometheus-community/parquet-common v0.0.0-20251211092633-65ebeae24e94/go.mod h1:gewN7ZuOXJh0X2I57iGHyDLbLvL891P2Ynko2QM5axY= github.com/prometheus-community/prom-label-proxy v0.11.1 h1:jX+m+BQCNM0z3/P6V6jVxbiDKgugvk91SaICD6bVhT4= github.com/prometheus-community/prom-label-proxy v0.11.1/go.mod h1:uTeQW+wZ/VPV1LL3IPfvUE++wR2nPLex+Y4RE38Cpis= -github.com/prometheus/alertmanager v0.29.0 h1:/ET4NmAGx2Dv9kStrXIBqBgHyiSgIk4OetY+hoZRfgc= -github.com/prometheus/alertmanager v0.29.0/go.mod h1:SjI2vhrfdWg10UaRUxTz27rgdJVG3HXrhI5WFjCdBgs= +github.com/prometheus/alertmanager v0.31.0 h1:DQW02uIUNNiAa9AD9VA5xaFw5D+xrV+bocJc4gN9bEU= +github.com/prometheus/alertmanager v0.31.0/go.mod h1:zWPQwhbLt2ybee8rL921UONeQ59Oncash+m/hGP17tU= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -1676,10 +1688,10 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= -github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= -github.com/prometheus/exporter-toolkit v0.14.1 h1:uKPE4ewweVRWFainwvAcHs3uw15pjw2dk3I7b+aNo9o= -github.com/prometheus/exporter-toolkit v0.14.1/go.mod h1:di7yaAJiaMkcjcz48f/u4yRPwtyuxTU5Jr4EnM2mhtQ= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/exporter-toolkit v0.15.1 h1:XrGGr/qWl8Gd+pqJqTkNLww9eG8vR/CoRk0FubOKfLE= +github.com/prometheus/exporter-toolkit v0.15.1/go.mod h1:P/NR9qFRGbCFgpklyhix9F6v6fFr/VQB/CVsrMDGKo4= github.com/prometheus/otlptranslator v0.0.0-20250620074007-94f535e0c588 h1:QlySqDdSESgWDePeAYskbbcKKdowI26m9aU9zloHyYE= github.com/prometheus/otlptranslator v0.0.0-20250620074007-94f535e0c588/go.mod h1:P8AwMgdD7XEr6QRUJ2QWLpiAZTgTE2UYgjlu3svompI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1687,12 +1699,12 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/prometheus/prometheus v0.306.0 h1:Q0Pvz/ZKS6vVWCa1VSgNyNJlEe8hxdRlKklFg7SRhNw= github.com/prometheus/prometheus v0.306.0/go.mod h1:7hMSGyZHt0dcmZ5r4kFPJ/vxPQU99N5/BGwSPDxeZrQ= -github.com/prometheus/sigv4 v0.2.1 h1:hl8D3+QEzU9rRmbKIRwMKRwaFGyLkbPdH5ZerglRHY0= -github.com/prometheus/sigv4 v0.2.1/go.mod h1:ySk6TahIlsR2sxADuHy4IBFhwEjRGGsfbbLGhFYFj6Q= +github.com/prometheus/sigv4 v0.4.0 h1:s8oiq+S4ORkpjftnBvzObLrz5Hw49YwEhumNGBdfg4M= +github.com/prometheus/sigv4 v0.4.0/go.mod h1:D6dQeKEsDyUWzoNGjby5HgXshiOAbsz7vuApHTCmOxA= github.com/puzpuzpuz/xsync/v3 v3.5.1 h1:GJYJZwO6IdxN/IKbneznS6yPkVC+c3zyY/j19c++5Fg= github.com/puzpuzpuz/xsync/v3 v3.5.1/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= github.com/rantav/go-grpc-channelz v0.0.4 h1:8GvqhA6siQVBsZYzal3yHhyJ9YiHEJx7RtSH2Jvm9Co= @@ -1748,8 +1760,8 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -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.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -1793,11 +1805,11 @@ github.com/thanos-io/thanos v0.40.1-0.20260112164636-49dde505913b h1:KIQzAcxtdxi github.com/thanos-io/thanos v0.40.1-0.20260112164636-49dde505913b/go.mod h1:B9TgiYdhZdVxB1jXi4hRV+XDhiMmhHFykb8cxsZyWG8= github.com/tinylib/msgp v1.6.1 h1:ESRv8eL3u+DNHUoSAAQRE50Hm162zqAnBoGv9PzScPY= github.com/tinylib/msgp v1.6.1/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA= -github.com/tjhop/slog-gokit v0.1.4 h1:uj/vbDt3HaF0Py8bHPV4ti/s0utnO0miRbO277FLBKM= -github.com/tjhop/slog-gokit v0.1.4/go.mod h1:Bbu5v2748qpAWH7k6gse/kw3076IJf6owJmh7yArmJs= -github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM= -github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc= +github.com/tjhop/slog-gokit v0.1.5 h1:ayloIUi5EK2QYB8eY4DOPO95/mRtMW42lUkp3quJohc= +github.com/tjhop/slog-gokit v0.1.5/go.mod h1:yA48zAHvV+Sg4z4VRyeFyFUNNXd3JY5Zg84u3USICq0= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twpayne/go-geom v1.6.1 h1:iLE+Opv0Ihm/ABIcvQFGIiFBXd76oBIar9drAwHFhR4= +github.com/twpayne/go-geom v1.6.1/go.mod h1:Kr+Nly6BswFsKM5sd31YaoWS5PeDDH2NftJTK7Gd028= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= @@ -1826,17 +1838,17 @@ github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7 github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/api/v3 v3.5.17 h1:cQB8eb8bxwuxOilBpMJAEo8fAONyrdXTHUNcMd8yT1w= -go.etcd.io/etcd/api/v3 v3.5.17/go.mod h1:d1hvkRuXkts6PmaYk2Vrgqbv7H4ADfAKhyJqHNLJCB4= +go.etcd.io/etcd/api/v3 v3.6.7 h1:7BNJ2gQmc3DNM+9cRkv7KkGQDayElg8x3X+tFDYS+E0= +go.etcd.io/etcd/api/v3 v3.6.7/go.mod h1:xJ81TLj9hxrYYEDmXTeKURMeY3qEDN24hqe+q7KhbnI= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.17 h1:XxnDXAWq2pnxqx76ljWwiQ9jylbpC4rvkAeRVOUKKVw= -go.etcd.io/etcd/client/pkg/v3 v3.5.17/go.mod h1:4DqK1TKacp/86nJk4FLQqo6Mn2vvQFBmruW3pP14H/w= +go.etcd.io/etcd/client/pkg/v3 v3.6.7 h1:vvzgyozz46q+TyeGBuFzVuI53/yd133CHceNb/AhBVs= +go.etcd.io/etcd/client/pkg/v3 v3.6.7/go.mod h1:2IVulJ3FZ/czIGl9T4lMF1uxzrhRahLqe+hSgy+Kh7Q= go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.etcd.io/etcd/client/v3 v3.5.17 h1:o48sINNeWz5+pjy/Z0+HKpj/xSnBkuVhVvXkjEXbqZY= -go.etcd.io/etcd/client/v3 v3.5.17/go.mod h1:j2d4eXTHWkT2ClBgnnEPm/Wuu7jsqku41v9DZ3OtjQo= -go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= -go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.etcd.io/etcd/client/v3 v3.6.7 h1:9WqA5RpIBtdMxAy1ukXLAdtg2pAxNqW5NUoO2wQrE6U= +go.etcd.io/etcd/client/v3 v3.6.7/go.mod h1:2XfROY56AXnUqGsvl+6k29wrwsSbEh1lAouQB1vHpeE= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1865,12 +1877,14 @@ go.opentelemetry.io/collector/consumer/consumertest v0.129.0 h1:kRmrAgVvPxH5c/rT go.opentelemetry.io/collector/consumer/consumertest v0.129.0/go.mod h1:JgJKms1+v/CuAjkPH+ceTnKeDgUUGTQV4snGu5wTEHY= go.opentelemetry.io/collector/consumer/xconsumer v0.129.0 h1:bRyJ9TGWwnrUnB5oQGTjPhxpVRbkIVeugmvks22bJ4A= go.opentelemetry.io/collector/consumer/xconsumer v0.129.0/go.mod h1:pbe5ZyPJrtzdt/RRI0LqfT1GVBiJLbtkDKx3SBRTiTY= -go.opentelemetry.io/collector/featuregate v1.35.0 h1:c/XRtA35odgxVc4VgOF/PTIk7ajw1wYdQ6QI562gzd4= -go.opentelemetry.io/collector/featuregate v1.35.0/go.mod h1:Y/KsHbvREENKvvN9RlpiWk/IGBK+CATBYzIIpU7nccc= +go.opentelemetry.io/collector/featuregate v1.51.0 h1:dxJuv/3T84dhNKp7fz5+8srHz1dhquGzDpLW4OZTFBw= +go.opentelemetry.io/collector/featuregate v1.51.0/go.mod h1:/1bclXgP91pISaEeNulRxzzmzMTm4I5Xih2SnI4HRSo= go.opentelemetry.io/collector/internal/telemetry v0.129.0 h1:jkzRpIyMxMGdAzVOcBe8aRNrbP7eUrMq6cxEHe0sbzA= go.opentelemetry.io/collector/internal/telemetry v0.129.0/go.mod h1:riAPlR2LZBV7VEx4LicOKebg3N1Ja3izzkv5fl1Lhiw= -go.opentelemetry.io/collector/pdata v1.35.0 h1:ck6WO6hCNjepADY/p9sT9/rLECTLO5ukYTumKzsqB/E= -go.opentelemetry.io/collector/pdata v1.35.0/go.mod h1:pttpb089864qG1k0DMeXLgwwTFLk+o3fAW9I6MF9tzw= +go.opentelemetry.io/collector/internal/testutil v0.145.0 h1:H/KL0GH3kGqSMKxZvnQ0B0CulfO9xdTg4DZf28uV7fY= +go.opentelemetry.io/collector/internal/testutil v0.145.0/go.mod h1:YAD9EAkwh/l5asZNbEBEUCqEjoL1OKMjAMoPjPqH76c= +go.opentelemetry.io/collector/pdata v1.51.0 h1:DnDhSEuDXNdzGRB7f6oOfXpbDApwBX3tY+3K69oUrDA= +go.opentelemetry.io/collector/pdata v1.51.0/go.mod h1:GoX1bjKDR++mgFKdT7Hynv9+mdgQ1DDXbjs7/Ww209Q= go.opentelemetry.io/collector/pdata/pprofile v0.129.0 h1:DgZTvjOGmyZRx7Or80hz8XbEaGwHPkIh2SX1A5eXttQ= go.opentelemetry.io/collector/pdata/pprofile v0.129.0/go.mod h1:uUBZxqJNOk6QIMvbx30qom//uD4hXJ1K/l3qysijMLE= go.opentelemetry.io/collector/pdata/testdata v0.129.0 h1:n1QLnLOtrcAR57oMSVzmtPsQEpCc/nE5Avk1xfuAkjY= @@ -1892,14 +1906,14 @@ go.opentelemetry.io/contrib/detectors/gcp v1.38.0 h1:ZoYbqX7OaA/TAikspPl3ozPI6iY go.opentelemetry.io/contrib/detectors/gcp v1.38.0/go.mod h1:SU+iU7nu5ud4oCb3LQOhIZ3nRLj6FNVrKgtflbaf2ts= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 h1:lREC4C0ilyP4WibDhQ7Gg2ygAQFP8oR07Fst/5cafwI= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0/go.mod h1:HfvuU0kW9HewH14VCOLImqKvUgONodURG7Alj/IrnGI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.64.0 h1:OXSUzgmIFkcC4An+mv+lqqZSndTffXpjAyoR+1f8k/A= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.64.0/go.mod h1:1A4GVLFIm54HFqVdOpWmukap7rgb0frrE3zWXohLPdM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= go.opentelemetry.io/contrib/propagators/autoprop v0.61.0 h1:cxOVDJ30qfzV27G5p9WMtJUB/3cXC0iL+u9EV1fSOws= go.opentelemetry.io/contrib/propagators/autoprop v0.61.0/go.mod h1:Y+xiUbWetg65vAroDZcIzJ5wyPNWRH32EoIV9rIaa0g= -go.opentelemetry.io/contrib/propagators/aws v1.36.0 h1:Txhy/1LZIbbnutftc5pdU8Y9vOQuAkuIOFXuLsdDejs= -go.opentelemetry.io/contrib/propagators/aws v1.36.0/go.mod h1:M3A0491jGFPNHU8b3zEW7r/gtsMpGOsFUO3WL+SZ1xw= +go.opentelemetry.io/contrib/propagators/aws v1.40.0 h1:4VIrh75jW4RTimUNx1DSk+6H9/nDr1FvmKoOVDh3K04= +go.opentelemetry.io/contrib/propagators/aws v1.40.0/go.mod h1:B0dCov9KNQGlut3T8wZZjDnLXEXdBroM7bFsHh/gRos= go.opentelemetry.io/contrib/propagators/b3 v1.36.0 h1:xrAb/G80z/l5JL6XlmUMSD1i6W8vXkWrLfmkD3w/zZo= go.opentelemetry.io/contrib/propagators/b3 v1.36.0/go.mod h1:UREJtqioFu5awNaCR8aEx7MfJROFlAWb6lPaJFbHaG0= go.opentelemetry.io/contrib/propagators/jaeger v1.36.0 h1:SoCgXYF4ISDtNyfLUzsGDaaudZVTx2yJhOyBO0+/GYk= @@ -1908,40 +1922,48 @@ go.opentelemetry.io/contrib/propagators/ot v1.36.0 h1:UBoZjbx483GslNKYK2YpfvePTJ go.opentelemetry.io/contrib/propagators/ot v1.36.0/go.mod h1:adDDRry19/n9WoA7mSCMjoVJcmzK/bZYzX9SR+g2+W4= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= -go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= -go.opentelemetry.io/otel/bridge/opentracing v1.36.0 h1:GWGmcYhMCu6+K/Yz5KWSETU/esd/mkVGx+77uKtLjpk= -go.opentelemetry.io/otel/bridge/opentracing v1.36.0/go.mod h1:bW7xTHgtWSNqY8QjhqXzloXBkw3iQIa8uBqCF/0EUbc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 h1:dNzwXjZKpMpE2JhmO+9HsPl42NIXFIFSUSSs0fiqra0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0/go.mod h1:90PoxvaEB5n6AOdZvi+yWJQoE95U8Dhhw2bSyRqnTD0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 h1:JgtbA0xkWHnTmYk7YusopJFX6uleBmAuZ8n05NEh8nQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0/go.mod h1:179AK5aar5R3eS9FucPy6rggvU0g52cvKId8pv4+v0c= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= +go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= +go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= +go.opentelemetry.io/otel/bridge/opentracing v1.40.0 h1:uZ0Z1DS6uWmK9cJ1qlqLwalpEC7BWSpZ9bTKU45eNeM= +go.opentelemetry.io/otel/bridge/opentracing v1.40.0/go.mod h1:rgNsEfn8G8kKywgCgRhDJQIfhim6SEBI/raOLuP6o7w= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 h1:f0cb2XPmrqn4XMy9PNliTgRKJgS5WcL/u0/WRYGz4t0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0/go.mod h1:vnakAaFckOMiMtOIhFI2MNH4FYrZzXCYxmb1LlhoGz8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 h1:in9O8ESIOlwJAEGTkkf34DesGRAc/Pn8qJ7k3r/42LM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0/go.mod h1:Rp0EXBm5tfnv0WL+ARyO/PHBEaEAT8UUHQ6AGJcSq6c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 h1:Ckwye2FpXkYgiHX7fyVrN1uA/UYd9ounqqTuSNAv0k4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0/go.mod h1:teIFJh5pW2y+AN7riv6IBPX2DuesS3HgP39mwOspKwU= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0 h1:rixTyDGXFxRy1xzhKrotaHy3/KXdPhlWARrCgK+eqUY= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0/go.mod h1:dowW6UsM9MKbJq5JTz2AMVp3/5iW5I/TStsk8S+CfHw= go.opentelemetry.io/otel/log v0.12.2 h1:yob9JVHn2ZY24byZeaXpTVoPS6l+UrrxmxmPKohXTwc= go.opentelemetry.io/otel/log v0.12.2/go.mod h1:ShIItIxSYxufUMt+1H5a2wbckGli3/iCfuEbVZi/98E= go.opentelemetry.io/otel/log/logtest v0.0.0-20250526142609-aa5bd0e64989 h1:4JF7oY9CcHrPGfBLijDcXZyCzGckVEyOjuat5ktmQRg= go.opentelemetry.io/otel/log/logtest v0.0.0-20250526142609-aa5bd0e64989/go.mod h1:NToOxLDCS1tXDSB2dIj44H9xGPOpKr0csIN+gnuihv4= go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= -go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= +go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= -go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= +go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= -go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= -go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= -go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= +go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= -go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.opentelemetry.io/proto/slim/otlp v1.9.0 h1:fPVMv8tP3TrsqlkH1HWYUpbCY9cAIemx184VGkS6vlE= +go.opentelemetry.io/proto/slim/otlp v1.9.0/go.mod h1:xXdeJJ90Gqyll+orzUkY4bOd2HECo5JofeoLpymVqdI= +go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.2.0 h1:o13nadWDNkH/quoDomDUClnQBpdQQ2Qqv0lQBjIXjE8= +go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.2.0/go.mod h1:Gyb6Xe7FTi/6xBHwMmngGoHqL0w29Y4eW8TGFzpefGA= +go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.2.0 h1:EiUYvtwu6PMrMHVjcPfnsG3v+ajPkbUeH+IL93+QYyk= +go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.2.0/go.mod h1:mUUHKFiN2SST3AhJ8XhJxEoeVW12oqfXog0Bo8W3Ec4= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -1992,8 +2014,8 @@ golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5D golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= -golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2009,8 +2031,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 h1:bsqhLWFR6G6xiQcb+JoGqdKdRU6WzPWmK8E0jxTjzo4= -golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= +golang.org/x/exp v0.0.0-20250808145144-a408d31f581a h1:Y+7uR/b1Mw2iSXZ3G//1haIiSElDQZ8KWh0h+sZPG90= +golang.org/x/exp v0.0.0-20250808145144-a408d31f581a/go.mod h1:rT6SFzZ7oxADUDx58pcaKFTcZ+inxAa9fTrYx/uVYwg= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2057,8 +2079,8 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= -golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2132,8 +2154,8 @@ golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= -golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2165,8 +2187,8 @@ golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= -golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2291,7 +2313,6 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -2301,8 +2322,8 @@ golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= -golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2323,8 +2344,8 @@ golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= -golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2347,16 +2368,16 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= -golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= -golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2425,8 +2446,8 @@ golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= -golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= -golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk= golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2511,8 +2532,8 @@ google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZ google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.239.0 h1:2hZKUnFZEy81eugPs4e2XzIJ5SOwQg0G82bpXD65Puo= -google.golang.org/api v0.239.0/go.mod h1:cOVEm2TpdAGHL2z+UwyS+kmlGr3bVWQQ6sYEqkKje50= +google.golang.org/api v0.247.0 h1:tSd/e0QrUlLsrwMKmkbQhYVa109qIintOls2Wh6bngc= +google.golang.org/api v0.247.0/go.mod h1:r1qZOPmxXffXg6xS5uhx16Fa/UFY8QU/K4bfKrnvovM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -2663,8 +2684,8 @@ google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mR google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78= -google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk= +google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= +google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= @@ -2676,8 +2697,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go. google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a/go.mod h1:jehYqy3+AhJU9ve55aNOaSml7wUXjF9x6z2LcCfpAhY= google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= -google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda h1:+2XxjfsAu6vqFxwGBRcHiMaDCuZiqXGDUDVWVtrFAnE= -google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -2696,8 +2717,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/genproto/googleapis/rpc v0.0.0-20250102185135-69823020774d/go.mod h1:3ENsm/5D1mzDyhpzeRi1NR784I0BcofWBoSc5QqqMK4= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda h1:i/Q+bfisr7gq6feoJnS/DlpdwEL4ihp41fvRiM3Ork0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= google.golang.org/grpc v1.71.2 h1:KnzCueW4s+8ojAPZ+NnyZAELjsIMJGteKjKejieEC7M= google.golang.org/grpc v1.71.2/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -2726,8 +2747,8 @@ google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojt google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= 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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/cloud.google.com/go/auth/CHANGES.md b/vendor/cloud.google.com/go/auth/CHANGES.md index 66131916eb7..d2354a8beed 100644 --- a/vendor/cloud.google.com/go/auth/CHANGES.md +++ b/vendor/cloud.google.com/go/auth/CHANGES.md @@ -1,5 +1,19 @@ # Changelog +## [0.16.4](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.3...auth/v0.16.4) (2025-08-06) + + +### Bug Fixes + +* **auth:** Add UseDefaultClient: true to metadata.Options ([#12666](https://github.com/googleapis/google-cloud-go/issues/12666)) ([1482191](https://github.com/googleapis/google-cloud-go/commit/1482191e88236693efef68769752638281566766)), refs [#11078](https://github.com/googleapis/google-cloud-go/issues/11078) [#12657](https://github.com/googleapis/google-cloud-go/issues/12657) + +## [0.16.3](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.2...auth/v0.16.3) (2025-07-17) + + +### Bug Fixes + +* **auth:** Fix race condition in cachedTokenProvider.tokenAsync ([#12586](https://github.com/googleapis/google-cloud-go/issues/12586)) ([73867cc](https://github.com/googleapis/google-cloud-go/commit/73867ccc1e9808d65361bcfc0776bd95fe34dbb3)) + ## [0.16.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.1...auth/v0.16.2) (2025-06-04) diff --git a/vendor/cloud.google.com/go/auth/auth.go b/vendor/cloud.google.com/go/auth/auth.go index cd5e9886848..fb24c43eb57 100644 --- a/vendor/cloud.google.com/go/auth/auth.go +++ b/vendor/cloud.google.com/go/auth/auth.go @@ -362,9 +362,6 @@ func (c *cachedTokenProvider) tokenState() tokenState { // blocking call to Token should likely return the same error on the main goroutine. func (c *cachedTokenProvider) tokenAsync(ctx context.Context) { fn := func() { - c.mu.Lock() - c.isRefreshRunning = true - c.mu.Unlock() t, err := c.tp.Token(ctx) c.mu.Lock() defer c.mu.Unlock() @@ -380,6 +377,7 @@ func (c *cachedTokenProvider) tokenAsync(ctx context.Context) { c.mu.Lock() defer c.mu.Unlock() if !c.isRefreshRunning && !c.isRefreshErr { + c.isRefreshRunning = true go fn() } } diff --git a/vendor/cloud.google.com/go/auth/credentials/detect.go b/vendor/cloud.google.com/go/auth/credentials/detect.go index d8f7d961466..ad3267eb285 100644 --- a/vendor/cloud.google.com/go/auth/credentials/detect.go +++ b/vendor/cloud.google.com/go/auth/credentials/detect.go @@ -116,7 +116,8 @@ func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) { if OnGCE() { metadataClient := metadata.NewWithOptions(&metadata.Options{ - Logger: opts.logger(), + Logger: opts.logger(), + UseDefaultClient: true, }) return auth.NewCredentials(&auth.CredentialsOptions{ TokenProvider: computeTokenProvider(opts, metadataClient), diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json index d72e823299d..eaa1dab0939 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -239,6 +239,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/apps/events/subscriptions/apiv1beta": { + "api_shortname": "workspaceevents", + "distribution_name": "cloud.google.com/go/apps/events/subscriptions/apiv1beta", + "description": "Google Workspace Events API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apps/latest/events/subscriptions/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/apps/meet/apiv2": { "api_shortname": "meet", "distribution_name": "cloud.google.com/go/apps/meet/apiv2", @@ -529,6 +539,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/bigquery/datapolicies/apiv2beta1": { + "api_shortname": "bigquerydatapolicy", + "distribution_name": "cloud.google.com/go/bigquery/datapolicies/apiv2beta1", + "description": "BigQuery Data Policy API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/datapolicies/apiv2beta1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/bigquery/datatransfer/apiv1": { "api_shortname": "bigquerydatatransfer", "distribution_name": "cloud.google.com/go/bigquery/datatransfer/apiv1", @@ -589,6 +609,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/bigquery/storage/apiv1beta": { + "api_shortname": "bigquerystorage", + "distribution_name": "cloud.google.com/go/bigquery/storage/apiv1beta", + "description": "BigQuery Storage API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/storage/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/bigquery/storage/apiv1beta1": { "api_shortname": "bigquerystorage", "distribution_name": "cloud.google.com/go/bigquery/storage/apiv1beta1", @@ -609,6 +639,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/bigquery/v2/apiv2": { + "api_shortname": "bigquery", + "distribution_name": "cloud.google.com/go/bigquery/v2/apiv2", + "description": "BigQuery API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/v2/latest/apiv2", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/bigtable": { "api_shortname": "bigtable", "distribution_name": "cloud.google.com/go/bigtable", @@ -719,6 +759,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/chronicle/apiv1": { + "api_shortname": "chronicle", + "distribution_name": "cloud.google.com/go/chronicle/apiv1", + "description": "Chronicle API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/chronicle/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/cloudbuild/apiv1/v2": { "api_shortname": "cloudbuild", "distribution_name": "cloud.google.com/go/cloudbuild/apiv1/v2", @@ -849,6 +899,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/compute/apiv1beta": { + "api_shortname": "compute", + "distribution_name": "cloud.google.com/go/compute/apiv1beta", + "description": "Google Compute Engine API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/compute/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/compute/metadata": { "api_shortname": "compute-metadata", "distribution_name": "cloud.google.com/go/compute/metadata", @@ -889,6 +949,26 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/configdelivery/apiv1": { + "api_shortname": "configdelivery", + "distribution_name": "cloud.google.com/go/configdelivery/apiv1", + "description": "Config Delivery API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/configdelivery/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/configdelivery/apiv1beta": { + "api_shortname": "configdelivery", + "distribution_name": "cloud.google.com/go/configdelivery/apiv1beta", + "description": "Config Delivery API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/configdelivery/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/contactcenterinsights/apiv1": { "api_shortname": "contactcenterinsights", "distribution_name": "cloud.google.com/go/contactcenterinsights/apiv1", @@ -959,6 +1039,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/dataform/apiv1": { + "api_shortname": "dataform", + "distribution_name": "cloud.google.com/go/dataform/apiv1", + "description": "Dataform API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/dataform/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/dataform/apiv1beta1": { "api_shortname": "dataform", "distribution_name": "cloud.google.com/go/dataform/apiv1beta1", @@ -1069,16 +1159,6 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, - "cloud.google.com/go/debugger/apiv2": { - "api_shortname": "clouddebugger", - "distribution_name": "cloud.google.com/go/debugger/apiv2", - "description": "Stackdriver Debugger API", - "language": "go", - "client_library_type": "generated", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/debugger/apiv2", - "release_level": "preview", - "library_type": "GAPIC_AUTO" - }, "cloud.google.com/go/deploy/apiv1": { "api_shortname": "clouddeploy", "distribution_name": "cloud.google.com/go/deploy/apiv1", @@ -1099,6 +1179,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/devicestreaming/apiv1": { + "api_shortname": "devicestreaming", + "distribution_name": "cloud.google.com/go/devicestreaming/apiv1", + "description": "Device Streaming API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/devicestreaming/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/dialogflow/apiv2": { "api_shortname": "dialogflow", "distribution_name": "cloud.google.com/go/dialogflow/apiv2", @@ -1459,6 +1549,26 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/iam/apiv3": { + "api_shortname": "iam", + "distribution_name": "cloud.google.com/go/iam/apiv3", + "description": "Identity and Access Management (IAM) API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/iam/apiv3beta": { + "api_shortname": "iam", + "distribution_name": "cloud.google.com/go/iam/apiv3beta", + "description": "Identity and Access Management (IAM) API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest/apiv3beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/iam/credentials/apiv1": { "api_shortname": "iamcredentials", "distribution_name": "cloud.google.com/go/iam/credentials/apiv1", @@ -1559,6 +1669,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/licensemanager/apiv1": { + "api_shortname": "licensemanager", + "distribution_name": "cloud.google.com/go/licensemanager/apiv1", + "description": "License Manager API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/licensemanager/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/lifesciences/apiv2beta": { "api_shortname": "lifesciences", "distribution_name": "cloud.google.com/go/lifesciences/apiv2beta", @@ -1599,6 +1719,26 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/lustre/apiv1": { + "api_shortname": "lustre", + "distribution_name": "cloud.google.com/go/lustre/apiv1", + "description": "Google Cloud Managed Lustre API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/lustre/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/maintenance/api/apiv1beta": { + "api_shortname": "maintenance", + "distribution_name": "cloud.google.com/go/maintenance/api/apiv1beta", + "description": "Maintenance API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maintenance/latest/api/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/managedidentities/apiv1": { "api_shortname": "managedidentities", "distribution_name": "cloud.google.com/go/managedidentities/apiv1", @@ -1619,6 +1759,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/managedkafka/schemaregistry/apiv1": { + "api_shortname": "managedkafka", + "distribution_name": "cloud.google.com/go/managedkafka/schemaregistry/apiv1", + "description": "Managed Service for Apache Kafka API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/managedkafka/latest/schemaregistry/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/maps/addressvalidation/apiv1": { "api_shortname": "addressvalidation", "distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1", @@ -1632,7 +1782,7 @@ "cloud.google.com/go/maps/areainsights/apiv1": { "api_shortname": "areainsights", "distribution_name": "cloud.google.com/go/maps/areainsights/apiv1", - "description": "Places Insights API", + "description": "Places Aggregate API", "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/areainsights/apiv1", @@ -1799,6 +1949,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/modelarmor/apiv1beta": { + "api_shortname": "modelarmor", + "distribution_name": "cloud.google.com/go/modelarmor/apiv1beta", + "description": "Model Armor API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/modelarmor/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/monitoring/apiv3/v2": { "api_shortname": "monitoring", "distribution_name": "cloud.google.com/go/monitoring/apiv3/v2", @@ -2139,13 +2299,13 @@ "release_level": "stable", "library_type": "GAPIC_MANUAL" }, - "cloud.google.com/go/pubsub/apiv1": { + "cloud.google.com/go/pubsub/v2/apiv1": { "api_shortname": "pubsub", - "distribution_name": "cloud.google.com/go/pubsub/apiv1", + "distribution_name": "cloud.google.com/go/pubsub/v2/apiv1", "description": "Cloud Pub/Sub API", "language": "go", "client_library_type": "generated", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/latest/apiv1", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/v2/latest/apiv1", "release_level": "stable", "library_type": "GAPIC_AUTO" }, @@ -2282,7 +2442,7 @@ "cloud.google.com/go/retail/apiv2": { "api_shortname": "retail", "distribution_name": "cloud.google.com/go/retail/apiv2", - "description": "Vertex AI Search for Retail API", + "description": "Vertex AI Search for commerce API", "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2", @@ -2292,7 +2452,7 @@ "cloud.google.com/go/retail/apiv2alpha": { "api_shortname": "retail", "distribution_name": "cloud.google.com/go/retail/apiv2alpha", - "description": "Vertex AI Search for Retail API", + "description": "Vertex AI Search for commerce API", "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2alpha", @@ -2302,7 +2462,7 @@ "cloud.google.com/go/retail/apiv2beta": { "api_shortname": "retail", "distribution_name": "cloud.google.com/go/retail/apiv2beta", - "description": "Vertex AI Search for Retail API", + "description": "Vertex AI Search for commerce API", "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/retail/latest/apiv2beta", @@ -2559,6 +2719,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/accounts/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/accounts/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/accounts/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/accounts/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/accounts/apiv1beta", @@ -2569,6 +2739,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/conversions/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/conversions/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/conversions/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/conversions/apiv1beta", @@ -2579,6 +2759,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/datasources/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/datasources/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/datasources/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/datasources/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/datasources/apiv1beta", @@ -2589,6 +2779,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/inventories/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/inventories/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/inventories/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta", @@ -2599,6 +2799,36 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/issueresolution/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/issueresolution/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/issueresolution/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/issueresolution/apiv1beta", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/issueresolution/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/shopping/merchant/lfp/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/lfp/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/lfp/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/lfp/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/lfp/apiv1beta", @@ -2609,6 +2839,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/notifications/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/notifications/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/notifications/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/notifications/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/notifications/apiv1beta", @@ -2619,6 +2859,36 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/ordertracking/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/ordertracking/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/ordertracking/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/ordertracking/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/shopping/merchant/products/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/products/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/products/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/products/apiv1beta", @@ -2629,6 +2899,26 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/productstudio/apiv1alpha": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/productstudio/apiv1alpha", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/productstudio/apiv1alpha", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/shopping/merchant/promotions/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/promotions/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/promotions/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/promotions/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/promotions/apiv1beta", @@ -2639,6 +2929,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/quota/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/quota/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/quota/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/quota/apiv1beta", @@ -2649,6 +2949,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/reports/apiv1": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/reports/apiv1", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/reports/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/shopping/merchant/reports/apiv1beta": { "api_shortname": "merchantapi", "distribution_name": "cloud.google.com/go/shopping/merchant/reports/apiv1beta", @@ -2679,6 +2989,16 @@ "release_level": "stable", "library_type": "GAPIC_MANUAL" }, + "cloud.google.com/go/spanner/adapter/apiv1": { + "api_shortname": "spanner", + "distribution_name": "cloud.google.com/go/spanner/adapter/apiv1", + "description": "Cloud Spanner API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest/adapter/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/spanner/admin/database/apiv1": { "api_shortname": "spanner", "distribution_name": "cloud.google.com/go/spanner/admin/database/apiv1", @@ -2692,7 +3012,7 @@ "cloud.google.com/go/spanner/admin/instance/apiv1": { "api_shortname": "spanner", "distribution_name": "cloud.google.com/go/spanner/admin/instance/apiv1", - "description": "Cloud Spanner Instance Admin API", + "description": "Cloud Spanner API", "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest/admin/instance/apiv1", @@ -2779,6 +3099,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/storagebatchoperations/apiv1": { + "api_shortname": "storagebatchoperations", + "distribution_name": "cloud.google.com/go/storagebatchoperations/apiv1", + "description": "Storage Batch Operations API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storagebatchoperations/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/storageinsights/apiv1": { "api_shortname": "storageinsights", "distribution_name": "cloud.google.com/go/storageinsights/apiv1", @@ -2819,6 +3149,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/support/apiv2beta": { + "api_shortname": "cloudsupport", + "distribution_name": "cloud.google.com/go/support/apiv2beta", + "description": "Google Cloud Support API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/support/latest/apiv2beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/talent/apiv4": { "api_shortname": "jobs", "distribution_name": "cloud.google.com/go/talent/apiv4", diff --git a/vendor/cloud.google.com/go/storage/CHANGES.md b/vendor/cloud.google.com/go/storage/CHANGES.md index e90454d01ad..cbe212871ff 100644 --- a/vendor/cloud.google.com/go/storage/CHANGES.md +++ b/vendor/cloud.google.com/go/storage/CHANGES.md @@ -1,6 +1,140 @@ # Changes +## [1.56.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.55.0...storage/v1.56.0) (2025-07-24) + + +### Features + +* **storage/control:** Update BUILD configs to support rest transportation for all client ([116a33a](https://github.com/googleapis/google-cloud-go/commit/116a33ab13c9fac6f6830dded55c24d38504707b)) + + +### Bug Fixes + +* **storage:** Avoid integration test segfaults. ([#12419](https://github.com/googleapis/google-cloud-go/issues/12419)) ([a9dec07](https://github.com/googleapis/google-cloud-go/commit/a9dec0763f85f083cc1da451249caae7ad97d904)) +* **storage:** Current object generation takeover. ([#12383](https://github.com/googleapis/google-cloud-go/issues/12383)) ([9ca8e01](https://github.com/googleapis/google-cloud-go/commit/9ca8e015405a523bbe68cbff2defbdff3dac0a61)) +* **storage:** Fix MultiRangeDownloader deadlock ([#12548](https://github.com/googleapis/google-cloud-go/issues/12548)) ([2eb23bb](https://github.com/googleapis/google-cloud-go/commit/2eb23bb01ffe92c967e772ef66c846357fbf5419)) +* **storage:** Remove object length limit for unfinalized reads ([#12489](https://github.com/googleapis/google-cloud-go/issues/12489)) ([5566d7d](https://github.com/googleapis/google-cloud-go/commit/5566d7dd5cc83afce38821961c447f5945e48456)) + + +### Performance Improvements + +* **storage:** Zero copy for MultiRangeDownloader ([#12542](https://github.com/googleapis/google-cloud-go/issues/12542)) ([a5e6a68](https://github.com/googleapis/google-cloud-go/commit/a5e6a681164d5be62270cde16891685a9f03bb12)) + + +### Documentation + +* **storage/internal:** Fix broken link for message `CustomPlacementConfig` ([9614487](https://github.com/googleapis/google-cloud-go/commit/96144875e01bfc8a59c2671c6eae87233710cef7)) +* **storage:** Fix typo in storage/doc.go ([#12391](https://github.com/googleapis/google-cloud-go/issues/12391)) ([bf74408](https://github.com/googleapis/google-cloud-go/commit/bf744088f0ed23ea510b914c994e1754ca1fc7c4)) +* **storage:** Improve error inspection documentation ([#12301](https://github.com/googleapis/google-cloud-go/issues/12301)) ([420da1a](https://github.com/googleapis/google-cloud-go/commit/420da1a64ac4040c8b2e6d6f0d66e7633426ac25)) + +## [1.55.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.54.0...storage/v1.55.0) (2025-05-29) + + +### Features + +* **storage/control:** Add Client Libraries Storage IntelligenceConfig ([2aaada3](https://github.com/googleapis/google-cloud-go/commit/2aaada3fb7a9d3eaacec3351019e225c4038646b)) +* **storage/internal:** Add IpFilter to Bucket ([#12309](https://github.com/googleapis/google-cloud-go/issues/12309)) ([d8ae687](https://github.com/googleapis/google-cloud-go/commit/d8ae6874a54b48fce49968664f14db63c055c6e2)) +* **storage/internal:** Add Object.Retention message ([d8ae687](https://github.com/googleapis/google-cloud-go/commit/d8ae6874a54b48fce49968664f14db63c055c6e2)) + + +### Bug Fixes + +* **storage:** Add EnableNewAuthLibrary internalOption to HTTP newClient ([#12320](https://github.com/googleapis/google-cloud-go/issues/12320)) ([0036073](https://github.com/googleapis/google-cloud-go/commit/0036073affee5451894654a983fba6b2638433cb)) +* **storage:** Migrate oauth2/google usages to cloud.google.com/go/auth ([#11191](https://github.com/googleapis/google-cloud-go/issues/11191)) ([3a22349](https://github.com/googleapis/google-cloud-go/commit/3a22349c1ba6a192d70269f77e5804a9957aa572)) +* **storage:** Omit check on MultiRangeDownloader ([#12342](https://github.com/googleapis/google-cloud-go/issues/12342)) ([774621c](https://github.com/googleapis/google-cloud-go/commit/774621c5baa5110f57fe79d817143416bd671d1e)) +* **storage:** Retry url.Error and net.OpErrors when they wrap an io.EOF ([#12289](https://github.com/googleapis/google-cloud-go/issues/12289)) ([080f6b0](https://github.com/googleapis/google-cloud-go/commit/080f6b05c5e8bd5baaef71ed47f8d54c695f63d3)) + + +### Documentation + +* **storage/internal:** Add explicit Optional annotations to fields that have always been treated as optional ([d8ae687](https://github.com/googleapis/google-cloud-go/commit/d8ae6874a54b48fce49968664f14db63c055c6e2)) +* **storage/internal:** Add note that Bucket.project output format is always project number format ([d8ae687](https://github.com/googleapis/google-cloud-go/commit/d8ae6874a54b48fce49968664f14db63c055c6e2)) +* **storage/internal:** Add note that managedFolders are supported for GetIamPolicy and SetIamPolicy ([d8ae687](https://github.com/googleapis/google-cloud-go/commit/d8ae6874a54b48fce49968664f14db63c055c6e2)) + +## [1.54.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.53.0...storage/v1.54.0) (2025-05-12) + + +### Features + +* **storage:** Add experimental ZB API option ([#12214](https://github.com/googleapis/google-cloud-go/issues/12214)) ([f669982](https://github.com/googleapis/google-cloud-go/commit/f669982de2abf64759eccf5c38bd669488b9cf6a)) + + +### Bug Fixes + +* **storage:** Fix append writer hang ([#12201](https://github.com/googleapis/google-cloud-go/issues/12201)) ([7ce2a2a](https://github.com/googleapis/google-cloud-go/commit/7ce2a2ad3ae9deff28c73c1bcc2e7001770464eb)) +* **storage:** Retry unwrapped EOFs ([#12202](https://github.com/googleapis/google-cloud-go/issues/12202)) ([b2d42bd](https://github.com/googleapis/google-cloud-go/commit/b2d42bda6a398f3aa00030b6e99bbcb40f132ff7)) + +## [1.53.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.52.0...storage/v1.53.0) (2025-05-02) + + +### Features + +* **storage/control:** Add Anywhere cache control APIs ([83ae06c](https://github.com/googleapis/google-cloud-go/commit/83ae06c3ec7d190e38856ba4cfd8a13f08356b4d)) + + +### Bug Fixes + +* **storage:** Fix append edge cases ([#12074](https://github.com/googleapis/google-cloud-go/issues/12074)) ([0eee1f9](https://github.com/googleapis/google-cloud-go/commit/0eee1f99a7dc0d1bfc36fa43d78933cae47962ee)) +* **storage:** Fix retries for redirection errors. ([#12093](https://github.com/googleapis/google-cloud-go/issues/12093)) ([3e177e7](https://github.com/googleapis/google-cloud-go/commit/3e177e755f5bf6aa96e8712cc4adcba7eb6f04f6)) +* **storage:** Handle gRPC deadlines in tests. ([#12092](https://github.com/googleapis/google-cloud-go/issues/12092)) ([30b7cd2](https://github.com/googleapis/google-cloud-go/commit/30b7cd27771ccbd49b70ee106da36362ba8f1e87)) +* **storage:** Update offset on resumable upload retry ([#12086](https://github.com/googleapis/google-cloud-go/issues/12086)) ([6ce8fe5](https://github.com/googleapis/google-cloud-go/commit/6ce8fe5aec0ec7916eda4d1405cab5f5f65a5de8)) +* **storage:** Validate Bidi option for MRD ([#12033](https://github.com/googleapis/google-cloud-go/issues/12033)) ([d9018cf](https://github.com/googleapis/google-cloud-go/commit/d9018cf640a9ac25e2b23b75b3bcfa734379ab09)) + + +### Documentation + +* **storage/control:** Added comments for Anywhere cache messages ([83ae06c](https://github.com/googleapis/google-cloud-go/commit/83ae06c3ec7d190e38856ba4cfd8a13f08356b4d)) + +## [1.52.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.51.0...storage/v1.52.0) (2025-04-22) + + +### Features + +* **storage/control:** Add Anywhere cache control APIs ([#11807](https://github.com/googleapis/google-cloud-go/issues/11807)) ([12bfa98](https://github.com/googleapis/google-cloud-go/commit/12bfa984f87099dbfbd5abf3436e440e62b04bad)) +* **storage:** Add CurrentState function to determine state of stream in MRD ([#11688](https://github.com/googleapis/google-cloud-go/issues/11688)) ([14e8e13](https://github.com/googleapis/google-cloud-go/commit/14e8e132d9d5808d1ca789792e7e39f0857991da)) +* **storage:** Add OwnerEntity to bucketAttrs ([#11857](https://github.com/googleapis/google-cloud-go/issues/11857)) ([4cd4a0c](https://github.com/googleapis/google-cloud-go/commit/4cd4a0ca1f6132ea6ed9df7b27310a3238a9c3fd)) +* **storage:** Takeover appendable object ([#11977](https://github.com/googleapis/google-cloud-go/issues/11977)) ([513b937](https://github.com/googleapis/google-cloud-go/commit/513b937420b945c4a76e20711f305c6ad8a77812)) +* **storage:** Unfinalized appendable objects. ([#11647](https://github.com/googleapis/google-cloud-go/issues/11647)) ([52c0218](https://github.com/googleapis/google-cloud-go/commit/52c02183fabf43fcba3893f493140ac28a7836d1)) + + +### Bug Fixes + +* **storage:** Fix Attrs for append takeover ([#11989](https://github.com/googleapis/google-cloud-go/issues/11989)) ([6db35b1](https://github.com/googleapis/google-cloud-go/commit/6db35b10567b7f1463bfef722b0fd72257190ee7)) +* **storage:** Fix panic when Flush called early ([#11934](https://github.com/googleapis/google-cloud-go/issues/11934)) ([7d0b8a7](https://github.com/googleapis/google-cloud-go/commit/7d0b8a75ae55731ae765c01f24920f9f11038f44)) +* **storage:** Fix unfinalized write size ([#12016](https://github.com/googleapis/google-cloud-go/issues/12016)) ([6217f8f](https://github.com/googleapis/google-cloud-go/commit/6217f8fd3cd8680a7e6b7b46fc9b7bda6ee6292e)) +* **storage:** Force first message on next sendBuffer when nothing sent on current ([#11871](https://github.com/googleapis/google-cloud-go/issues/11871)) ([a1a2292](https://github.com/googleapis/google-cloud-go/commit/a1a22927d6a4399e7392787bccb9707bc9e8f149)) +* **storage:** Populate Writer.Attrs after Flush() ([#12021](https://github.com/googleapis/google-cloud-go/issues/12021)) ([8e56f74](https://github.com/googleapis/google-cloud-go/commit/8e56f745e7f2175660838f96c1a12a46841cac40)) +* **storage:** Remove check for FinalizeOnClose ([#11992](https://github.com/googleapis/google-cloud-go/issues/11992)) ([2664b8c](https://github.com/googleapis/google-cloud-go/commit/2664b8cec00a606001184cb17c074fd0e79e66b8)) +* **storage:** Wrap read response parsing errors ([#11951](https://github.com/googleapis/google-cloud-go/issues/11951)) ([d2e6583](https://github.com/googleapis/google-cloud-go/commit/d2e658387b80ec8a3e41e048a9d520b8dd13dd00)) + + +## [1.51.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.50.0...storage/v1.51.0) (2025-03-07) + + +### Features + +* **storage/append:** Support appends in w1r3. ([#11483](https://github.com/googleapis/google-cloud-go/issues/11483)) ([48bb391](https://github.com/googleapis/google-cloud-go/commit/48bb39154479a2cf2d379316e0915f39d7b7a518)) +* **storage:** Benchmark with experimental MRD. ([#11501](https://github.com/googleapis/google-cloud-go/issues/11501)) ([7b49152](https://github.com/googleapis/google-cloud-go/commit/7b491520a693d258d3370a19c43c9dff6c8558c7)) +* **storage:** Implement RetryChunkDeadline for grpc writes ([#11476](https://github.com/googleapis/google-cloud-go/issues/11476)) ([03575d7](https://github.com/googleapis/google-cloud-go/commit/03575d74f5241cc714e4d3ac63635569a34f5633)) +* **storage:** Specify benchmark integrity check. ([#11465](https://github.com/googleapis/google-cloud-go/issues/11465)) ([da18845](https://github.com/googleapis/google-cloud-go/commit/da188453e0254c49a01d28788d0849a2d0e98e0c)) +* **storage:** Use ReadHandle for faster re-connect ([#11510](https://github.com/googleapis/google-cloud-go/issues/11510)) ([cac52f7](https://github.com/googleapis/google-cloud-go/commit/cac52f79a73d46774d33d76e3075c0a5b3e0b9f3)) +* **storage:** Wrap NotFound errors for buckets and objects ([#11519](https://github.com/googleapis/google-cloud-go/issues/11519)) ([0dd7d3d](https://github.com/googleapis/google-cloud-go/commit/0dd7d3d62e54c6c3bca395fcca8450ad3347a5a0)) + + +### Bug Fixes + +* **storage/append:** Report progress for appends. ([#11503](https://github.com/googleapis/google-cloud-go/issues/11503)) ([96dbb6c](https://github.com/googleapis/google-cloud-go/commit/96dbb6c12398fb3cbffab2bf61836bef2f704f66)) +* **storage:** Add a safety check for readhandle ([#11549](https://github.com/googleapis/google-cloud-go/issues/11549)) ([c9edb37](https://github.com/googleapis/google-cloud-go/commit/c9edb379ece70f065650702c9240ee540ca2f610)) +* **storage:** Add universe domain to defaultSignBytesFunc ([#11521](https://github.com/googleapis/google-cloud-go/issues/11521)) ([511608b](https://github.com/googleapis/google-cloud-go/commit/511608b8e8554aa06f9fe2e2e4f51ead0f484031)) +* **storage:** Clone the defaultRetry to avoid modifying it directly ([#11533](https://github.com/googleapis/google-cloud-go/issues/11533)) ([7f8d69d](https://github.com/googleapis/google-cloud-go/commit/7f8d69dcd6a7b1ad6c1df8d9fe8dfb5fe0947479)) +* **storage:** Fix adding multiple range on stream with same read id ([#11584](https://github.com/googleapis/google-cloud-go/issues/11584)) ([0bb3434](https://github.com/googleapis/google-cloud-go/commit/0bb3434e0e12563ff21ef72ad2e52ad7eb61d66e)) +* **storage:** Modify the callback of mrd to return length of data read instead of limit. ([#11687](https://github.com/googleapis/google-cloud-go/issues/11687)) ([9e359f0](https://github.com/googleapis/google-cloud-go/commit/9e359f0089f744c32d12bf77889d69a4db155357)) +* **storage:** Propagate ctx from invoke to grpc upload reqs ([#11475](https://github.com/googleapis/google-cloud-go/issues/11475)) ([9ad9d76](https://github.com/googleapis/google-cloud-go/commit/9ad9d7665ca2f4cfdcee75f5e683084ac49536a6)) +* **storage:** Remove duplicate routing header ([#11534](https://github.com/googleapis/google-cloud-go/issues/11534)) ([8eeb59c](https://github.com/googleapis/google-cloud-go/commit/8eeb59cbfb16d8f379f7aa4c6f11e53cebbd38a6)) +* **storage:** Return sentinel ErrObjectNotExist for copy and compose ([#11369](https://github.com/googleapis/google-cloud-go/issues/11369)) ([74d0c10](https://github.com/googleapis/google-cloud-go/commit/74d0c1096f897ca3c15646f3049ea540bed0a6a0)), refs [#10760](https://github.com/googleapis/google-cloud-go/issues/10760) +* **storage:** Wait for XML read req to finish to avoid data races ([#11527](https://github.com/googleapis/google-cloud-go/issues/11527)) ([782e12a](https://github.com/googleapis/google-cloud-go/commit/782e12a11c1dfe6d831f5d0b9b5f4409993e4d9e)) + ## [1.50.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.49.0...storage/v1.50.0) (2025-01-09) diff --git a/vendor/cloud.google.com/go/storage/TESTING.md b/vendor/cloud.google.com/go/storage/TESTING.md new file mode 100644 index 00000000000..65871ab58ef --- /dev/null +++ b/vendor/cloud.google.com/go/storage/TESTING.md @@ -0,0 +1,53 @@ +# Testing + +Package storage has unit, emulated integration tests, and integration tests +against the real GCS service. + +## Setup + +Assume that you're running from a directory which contains the `google-cloud-go` +git repository. + +```bash +git clone https://github.com/googleapis/google-cloud-go +git clone https://github.com/googleapis/storage-testbench # emulator +``` + +## Running unit tests + +```bash +go test ./google-cloud-go/storage -short +``` + +## Running emulated integration tests + +See +https://github.com/googleapis/storage-testbench?tab=readme-ov-file#how-to-use-this-testbench +for testbench setup instructions. After following those instructions, you should +have an emulator running an HTTP server on port 9000 and a gRPC server on port +8888. + +```bash +STORAGE_EMULATOR_HOST_GRPC="localhost:8888" STORAGE_EMULATOR_HOST="http://localhost:9000" go test ./google-cloud-go/storage -short -run="^Test(RetryConformance|.*Emulated)" +``` + +If you don't specify the `-run` filter, this will also run unit tests. + +## Running live service integration tests + +See the [general setup instructions](../CONTRIBUTING.md#local-setup) for more +details. The GCS integration tests require: + +- A project configured such that all bucket types can be created (e.g. with and + without UBLA, with and without HNS). A dedicated project which only stores + test data is recommended. +- A JSON key file for a service account with most GCS privileges in that + project. +- A VM in that project. + +Run with: + +```bash +GCLOUD_TESTS_GOLANG_PROJECT_ID="${PROJECT_ID?}" GCLOUD_TESTS_GOLANG_KEY="${KEYFILE?}" \ + go test ./google-cloud-go/storage -run="^Test.*Integration" +``` diff --git a/vendor/cloud.google.com/go/storage/acl.go b/vendor/cloud.google.com/go/storage/acl.go index 560a5605d0b..a894db605a9 100644 --- a/vendor/cloud.google.com/go/storage/acl.go +++ b/vendor/cloud.google.com/go/storage/acl.go @@ -17,7 +17,6 @@ package storage import ( "context" - "cloud.google.com/go/internal/trace" "cloud.google.com/go/storage/internal/apiv2/storagepb" raw "google.golang.org/api/storage/v1" ) @@ -77,8 +76,8 @@ type ACLHandle struct { // Delete permanently deletes the ACL entry for the given entity. func (a *ACLHandle) Delete(ctx context.Context, entity ACLEntity) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.ACL.Delete") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "ACL.Delete") + defer func() { endSpan(ctx, err) }() if a.object != "" { return a.objectDelete(ctx, entity) @@ -91,8 +90,8 @@ func (a *ACLHandle) Delete(ctx context.Context, entity ACLEntity) (err error) { // Set sets the role for the given entity. func (a *ACLHandle) Set(ctx context.Context, entity ACLEntity, role ACLRole) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.ACL.Set") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "ACL.Set") + defer func() { endSpan(ctx, err) }() if a.object != "" { return a.objectSet(ctx, entity, role, false) @@ -105,8 +104,8 @@ func (a *ACLHandle) Set(ctx context.Context, entity ACLEntity, role ACLRole) (er // List retrieves ACL entries. func (a *ACLHandle) List(ctx context.Context) (rules []ACLRule, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.ACL.List") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "ACL.List") + defer func() { endSpan(ctx, err) }() if a.object != "" { return a.objectList(ctx) diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go index 43161f78382..60a5ffb5b31 100644 --- a/vendor/cloud.google.com/go/storage/bucket.go +++ b/vendor/cloud.google.com/go/storage/bucket.go @@ -26,7 +26,6 @@ import ( "cloud.google.com/go/compute/metadata" "cloud.google.com/go/internal/optional" - "cloud.google.com/go/internal/trace" "cloud.google.com/go/storage/internal/apiv2/storagepb" "google.golang.org/api/googleapi" "google.golang.org/api/iamcredentials/v1" @@ -82,8 +81,8 @@ func (c *Client) Bucket(name string) *BucketHandle { // Create creates the Bucket in the project. // If attrs is nil the API defaults will be used. func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *BucketAttrs) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.Create") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.Create") + defer func() { endSpan(ctx, err) }() o := makeStorageOpts(true, b.retry, b.userProject) @@ -95,8 +94,8 @@ func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *Buck // Delete deletes the Bucket. func (b *BucketHandle) Delete(ctx context.Context) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.Delete") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.Delete") + defer func() { endSpan(ctx, err) }() o := makeStorageOpts(true, b.retry, b.userProject) return b.c.tc.DeleteBucket(ctx, b.name, b.conds, o...) @@ -150,8 +149,8 @@ func (b *BucketHandle) Object(name string) *ObjectHandle { // Attrs returns the metadata for the bucket. func (b *BucketHandle) Attrs(ctx context.Context) (attrs *BucketAttrs, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.Attrs") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.Attrs") + defer func() { endSpan(ctx, err) }() o := makeStorageOpts(true, b.retry, b.userProject) return b.c.tc.GetBucket(ctx, b.name, b.conds, o...) @@ -159,8 +158,8 @@ func (b *BucketHandle) Attrs(ctx context.Context) (attrs *BucketAttrs, err error // Update updates a bucket's attributes. func (b *BucketHandle) Update(ctx context.Context, uattrs BucketAttrsToUpdate) (attrs *BucketAttrs, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.Update") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.Update") + defer func() { endSpan(ctx, err) }() isIdempotent := b.conds != nil && b.conds.MetagenerationMatch != 0 o := makeStorageOpts(isIdempotent, b.retry, b.userProject) @@ -200,11 +199,11 @@ func (b *BucketHandle) SignedURL(object string, opts *SignedURLOptions) (string, newopts.GoogleAccessID = id } if newopts.SignBytes == nil && len(newopts.PrivateKey) == 0 { - if b.c.creds != nil && len(b.c.creds.JSON) > 0 { + if j, ok := b.c.credsJSON(); ok { var sa struct { PrivateKey string `json:"private_key"` } - err := json.Unmarshal(b.c.creds.JSON, &sa) + err := json.Unmarshal(j, &sa) if err == nil && sa.PrivateKey != "" { newopts.PrivateKey = []byte(sa.PrivateKey) } @@ -248,11 +247,11 @@ func (b *BucketHandle) GenerateSignedPostPolicyV4(object string, opts *PostPolic newopts.GoogleAccessID = id } if newopts.SignBytes == nil && newopts.SignRawBytes == nil && len(newopts.PrivateKey) == 0 { - if b.c.creds != nil && len(b.c.creds.JSON) > 0 { + if j, ok := b.c.credsJSON(); ok { var sa struct { PrivateKey string `json:"private_key"` } - err := json.Unmarshal(b.c.creds.JSON, &sa) + err := json.Unmarshal(j, &sa) if err == nil && sa.PrivateKey != "" { newopts.PrivateKey = []byte(sa.PrivateKey) } @@ -270,14 +269,14 @@ func (b *BucketHandle) GenerateSignedPostPolicyV4(object string, opts *PostPolic func (b *BucketHandle) detectDefaultGoogleAccessID() (string, error) { returnErr := errors.New("no credentials found on client and not on GCE (Google Compute Engine)") - if b.c.creds != nil && len(b.c.creds.JSON) > 0 { + if j, ok := b.c.credsJSON(); ok { var sa struct { ClientEmail string `json:"client_email"` SAImpersonationURL string `json:"service_account_impersonation_url"` CredType string `json:"type"` } - err := json.Unmarshal(b.c.creds.JSON, &sa) + err := json.Unmarshal(j, &sa) if err != nil { returnErr = err } else { @@ -320,9 +319,19 @@ func (b *BucketHandle) defaultSignBytesFunc(email string) func([]byte) ([]byte, return func(in []byte) ([]byte, error) { ctx := context.Background() + opts := []option.ClientOption{option.WithHTTPClient(b.c.hc)} + + if b.c.creds != nil { + universeDomain, err := b.c.creds.UniverseDomain(ctx) + if err != nil { + return nil, err + } + opts = append(opts, option.WithUniverseDomain(universeDomain)) + } + // It's ok to recreate this service per call since we pass in the http client, // circumventing the cost of recreating the auth/transport layer - svc, err := iamcredentials.NewService(ctx, option.WithHTTPClient(b.c.hc)) + svc, err := iamcredentials.NewService(ctx, opts...) if err != nil { return nil, fmt.Errorf("unable to create iamcredentials client: %w", err) } @@ -505,6 +514,9 @@ type BucketAttrs struct { // It cannot be modified after bucket creation time. // UniformBucketLevelAccess must also also be enabled on the bucket. HierarchicalNamespace *HierarchicalNamespace + + // OwnerEntity contains entity information in the form "project-owner-projectId". + OwnerEntity string } // BucketPolicyOnly is an alias for UniformBucketLevelAccess. @@ -855,6 +867,7 @@ func newBucket(b *raw.Bucket) (*BucketAttrs, error) { Autoclass: toAutoclassFromRaw(b.Autoclass), SoftDeletePolicy: toSoftDeletePolicyFromRaw(b.SoftDeletePolicy), HierarchicalNamespace: toHierarchicalNamespaceFromRaw(b.HierarchicalNamespace), + OwnerEntity: ownerEntityFromRaw(b.Owner), }, nil } @@ -891,6 +904,7 @@ func newBucketFromProto(b *storagepb.Bucket) *BucketAttrs { Autoclass: toAutoclassFromProto(b.GetAutoclass()), SoftDeletePolicy: toSoftDeletePolicyFromProto(b.SoftDeletePolicy), HierarchicalNamespace: toHierarchicalNamespaceFromProto(b.HierarchicalNamespace), + OwnerEntity: ownerEntityFromProto(b.GetOwner()), } } @@ -2215,6 +2229,20 @@ func toHierarchicalNamespaceFromRaw(r *raw.BucketHierarchicalNamespace) *Hierarc } } +func ownerEntityFromRaw(r *raw.BucketOwner) string { + if r == nil { + return "" + } + return r.Entity +} + +func ownerEntityFromProto(p *storagepb.Owner) string { + if p == nil { + return "" + } + return p.GetEntity() +} + // Objects returns an iterator over the objects in the bucket that match the // Query q. If q is nil, no filtering is done. Objects will be iterated over // lexicographically by name. diff --git a/vendor/cloud.google.com/go/storage/client.go b/vendor/cloud.google.com/go/storage/client.go index 1ea1d98ce5d..3e4aceaeb0c 100644 --- a/vendor/cloud.google.com/go/storage/client.go +++ b/vendor/cloud.google.com/go/storage/client.go @@ -16,7 +16,6 @@ package storage import ( "context" - "io" "time" "cloud.google.com/go/iam/apiv1/iampb" @@ -88,7 +87,7 @@ type storageClient interface { RewriteObject(ctx context.Context, req *rewriteObjectRequest, opts ...storageOption) (*rewriteObjectResponse, error) NewRangeReader(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (*Reader, error) - OpenWriter(params *openWriterParams, opts ...storageOption) (*io.PipeWriter, error) + OpenWriter(params *openWriterParams, opts ...storageOption) (internalWriter, error) // IAM methods. @@ -257,6 +256,9 @@ type openWriterParams struct { // conds - see `Writer.o.conds`. // Optional. conds *Conditions + // appendGen -- object generation to write to. + // Optional; required for taking over appendable objects only + appendGen int64 // encryptionKey - see `Writer.o.encryptionKey` // Optional. encryptionKey []byte @@ -266,6 +268,10 @@ type openWriterParams struct { // append - Write with appendable object semantics. // Optional. append bool + // finalizeOnClose - Finalize the object when the storage.Writer is closed + // successfully. + // Optional. + finalizeOnClose bool // Writer callbacks @@ -281,6 +287,10 @@ type openWriterParams struct { // setObj callback for reporting the resulting object - see `Writer.obj`. // Required. setObj func(*ObjectAttrs) + // setSize callback for updated the persisted size in Writer.obj. + setSize func(int64) + // setTakeoverOffset callback for returning offset to start writing from to Writer. + setTakeoverOffset func(int64) } type newMultiRangeDownloaderParams struct { diff --git a/vendor/cloud.google.com/go/storage/doc.go b/vendor/cloud.google.com/go/storage/doc.go index 4fcfb732648..6a64c6c03b2 100644 --- a/vendor/cloud.google.com/go/storage/doc.go +++ b/vendor/cloud.google.com/go/storage/doc.go @@ -274,15 +274,43 @@ To generate the signature, you must have: # Errors -Errors returned by this client are often of the type [googleapi.Error]. -These errors can be introspected for more information by using [errors.As] -with the richer [googleapi.Error] type. For example: +Errors returned by this client are often of the type [github.com/googleapis/gax-go/v2/apierror]. +The [apierror.APIError] type can wrap a [google.golang.org/grpc/status.Status] +if gRPC was used, or a [google.golang.org/api/googleapi.Error] if HTTP/REST was used. +You might also encounter [googleapi.Error] directly from HTTP operations. +These types of errors can be inspected for more information by using [errors.As] +to access the specific underlying error types and retrieve detailed information, +including HTTP or gRPC status codes. For example: + + // APIErrors often wrap a googleapi.Error (for JSON and XML calls) or a status.Status (for gRPC calls) + var ae *apierror.APIError + if ok := errors.As(err, &ae); ok { + // ae.HTTPCode() is the HTTP status code. + // ae.GRPCStatus().Code() is the gRPC status code + log.Printf("APIError: HTTPCode: %d, GRPCStatusCode: %s", ae.HTTPCode(), ae.GRPCStatus().Code()) + + if ae.GRPCStatus().Code() == codes.Unavailable { + // ... handle gRPC unavailable ... + } + } + // This allows a user to get more information directly from googleapi.Errors (for JSON/XML calls) var e *googleapi.Error if ok := errors.As(err, &e); ok { - if e.Code == 409 { ... } + // e.Code is the HTTP status code. + // e.Message is the error message. + // e.Body is the raw response body. + // e.Header contains the HTTP response headers. + log.Printf("HTTP Code: %d, Message: %s", e.Code, e.Message) + + if e.Code == 409 { + // ... handle conflict ... + } } +This library may also return other errors that are not wrapped as [apierror.APIError]. For +example, errors with authentication may return [cloud.google.com/go/auth.Error]. + # Retrying failed requests Methods in this package may retry calls that fail with transient errors. @@ -333,12 +361,13 @@ to add a [custom audit logging] header: # gRPC API -This package includes support for the Cloud Storage gRPC API. The -implementation uses gRPC rather than the Default -JSON & XML APIs to make requests to Cloud Storage. -The Go Storage gRPC client is generally available. -The Notifications, Serivce Account HMAC -and GetServiceAccount RPCs are not supported through the gRPC client. +This package includes support for the [Cloud Storage gRPC API]. This +implementation uses gRPC rather than the default JSON & XML APIs +to make requests to Cloud Storage. All methods on the [Client] support +the gRPC API, with the exception of [GetServiceAccount], [Notification], +and [HMACKey] methods. + +The Cloud Storage gRPC API is generally available. To create a client which will use gRPC, use the alternate constructor: @@ -349,43 +378,31 @@ To create a client which will use gRPC, use the alternate constructor: } // Use client as usual. -Using the gRPC API inside GCP with a bucket in the same region can allow for -[Direct Connectivity] (enabling requests to skip some proxy steps and reducing -response latency). A warning is emmitted if gRPC is not used within GCP to -warn that Direct Connectivity could not be initialized. Direct Connectivity -is not required to access the gRPC API. +One major advantage of the gRPC API is that it can use [Direct Connectivity], +enabling requests to skip some proxy steps and reducing response latency. +Requirements to use Direct Connectivity include: + + - Your application must be running inside Google Cloud. + - Your Cloud Storage [bucket location] must overlap with your VM or compute + environment zone. For example, if your VM is in us-east1a, your bucket + must be located in either us-east1 (single region), nam4 (dual region), + or us (multi-region). + - Your client must use service account authentication. + +Additional requirements for Direct Connectivity are documented in the +[Cloud Storage gRPC docs]. Dependencies for the gRPC API may slightly increase the size of binaries for applications depending on this package. If you are not using gRPC, you can use the build tag `disable_grpc_modules` to opt out of these dependencies and reduce the binary size. -The gRPC client emits metrics by default and will export the -gRPC telemetry discussed in [gRFC/66] and [gRFC/78] to -[Google Cloud Monitoring]. The metrics are accessible through Cloud Monitoring -API and you incur no additional cost for publishing the metrics. Google Cloud -Support can use this information to more quickly diagnose problems related to -GCS and gRPC. -Sending this data does not incur any billing charges, and requires minimal -CPU (a single RPC every minute) or memory (a few KiB to batch the -telemetry). - -To access the metrics you can view them through Cloud Monitoring -[metric explorer] with the prefix `storage.googleapis.com/client`. Metrics are emitted -every minute. - -You can disable metrics using the following example when creating a new gRPC -client using [WithDisabledClientMetrics]. - -The metrics exporter uses Cloud Monitoring API which determines -project ID and credentials doing the following: - -* Project ID is determined using OTel Resource Detector for the environment -otherwise it falls back to the project provided by [google.FindCredentials]. - -* Credentials are determined using [Application Default Credentials]. The -principal must have `roles/monitoring.metricWriter` role granted. If not a -logged warning will be emitted. Subsequent are silenced to prevent noisy logs. +The gRPC client is instrumented with Open Telemetry metrics which export to +Cloud Monitoring by default. More information is available in the +[gRPC client-side metrics] documentation, including information about +roles which must be enabled in order to do the export successfully. To +disable this export, you can use the [WithDisabledClientMetrics] client +option. # Storage Control API @@ -394,11 +411,6 @@ and Managed Folder operations) are supported via the autogenerated Storage Contr client, which is available as a subpackage in this module. See package docs at [cloud.google.com/go/storage/control/apiv2] or reference the [Storage Control API] docs. -[Application Default Credentials]: https://cloud.google.com/docs/authentication/application-default-credentials -[google.FindCredentials]: https://pkg.go.dev/golang.org/x/oauth2/google#FindDefaultCredentials -[gRFC/66]: https://github.com/grpc/proposal/blob/master/A66-otel-stats.md -[gRFC/78]: https://github.com/grpc/proposal/blob/master/A78-grpc-metrics-wrr-pf-xds.md -[Google Cloud Monitoring]: https://cloud.google.com/monitoring/docs [Cloud Storage IAM docs]: https://cloud.google.com/storage/docs/access-control/iam [XML POST Object docs]: https://cloud.google.com/storage/docs/xml-api/post-object [Cloud Storage retry docs]: https://cloud.google.com/storage/docs/retry-strategy @@ -408,7 +420,10 @@ client, which is available as a subpackage in this module. See package docs at [IAM Service Account Credentials API]: https://console.developers.google.com/apis/api/iamcredentials.googleapis.com/overview [custom audit logging]: https://cloud.google.com/storage/docs/audit-logging#add-custom-metadata [Storage Control API]: https://cloud.google.com/storage/docs/reference/rpc/google.storage.control.v2 -[metric explorer]: https://console.cloud.google.com/projectselector/monitoring/metrics-explorer +[Cloud Storage gRPC API]: https://cloud.google.com/storage/docs/enable-grpc-api [Direct Connectivity]: https://cloud.google.com/vpc-service-controls/docs/set-up-private-connectivity#direct-connectivity +[bucket location]: https://cloud.google.com/storage/docs/locations +[Cloud Storage gRPC docs]: https://cloud.google.com/storage/docs/enable-grpc-api#limitations +[gRPC client-side metrics]: https://cloud.google.com/storage/docs/client-side-metrics */ package storage // import "cloud.google.com/go/storage" diff --git a/vendor/cloud.google.com/go/storage/emulator_test.sh b/vendor/cloud.google.com/go/storage/emulator_test.sh index 258201ec9e6..4d8da2eeb37 100644 --- a/vendor/cloud.google.com/go/storage/emulator_test.sh +++ b/vendor/cloud.google.com/go/storage/emulator_test.sh @@ -89,4 +89,5 @@ then fi # Run tests -go test -v -timeout 15m ./ ./dataflux -run="^Test(RetryConformance|.*Emulated)$" -short 2>&1 | tee -a sponge_log.log + +go test -v -timeout 17m ./ ./dataflux -run="^Test(RetryConformance|.*Emulated)$" -short -race 2>&1 | tee -a sponge_log.log diff --git a/vendor/cloud.google.com/go/storage/experimental/experimental.go b/vendor/cloud.google.com/go/storage/experimental/experimental.go index 5bcc59ad2f4..a178f9ebb31 100644 --- a/vendor/cloud.google.com/go/storage/experimental/experimental.go +++ b/vendor/cloud.google.com/go/storage/experimental/experimental.go @@ -77,7 +77,8 @@ type ReadStallTimeoutConfig struct { // WithGRPCBidiReads provides an [option.ClientOption] that may be passed to // [cloud.google.com/go/storage.NewGRPCClient]. // It enables the client to use bi-directional gRPC APIs for downloads rather than the -// server streaming API. In particular, it allows users to use the [storage.MultiRangeDownloader] +// server streaming API. In particular, it allows users to use the +// [cloud.google.com/go/storage.MultiRangeDownloader] // surface, which requires bi-directional streaming. // // The bi-directional API is in private preview; please contact your account manager if @@ -85,3 +86,16 @@ type ReadStallTimeoutConfig struct { func WithGRPCBidiReads() option.ClientOption { return internal.WithGRPCBidiReads.(func() option.ClientOption)() } + +// WithZonalBucketAPIs provides an [option.ClientOption] that may be passed to +// [cloud.google.com/go/storage.NewGRPCClient]. +// It enables the client to use bi-directional gRPC APIs for downloads rather than the +// server streaming API (same as [WithGRPCBidiReads]) as well as appendable +// object semantics for uploads. By setting this option, both upload and download +// paths will use zonal bucket compatible APIs by default. +// +// Zonal buckets and rapid storage is in private preview; please contact your +// account manager if interested. +func WithZonalBucketAPIs() option.ClientOption { + return internal.WithZonalBucketAPIs.(func() option.ClientOption)() +} diff --git a/vendor/cloud.google.com/go/storage/grpc_client.go b/vendor/cloud.google.com/go/storage/grpc_client.go index 2d243bf9fe1..19c969f7392 100644 --- a/vendor/cloud.google.com/go/storage/grpc_client.go +++ b/vendor/cloud.google.com/go/storage/grpc_client.go @@ -22,7 +22,6 @@ import ( "hash/crc32" "io" "log" - "net/url" "os" "sync" @@ -31,7 +30,6 @@ import ( gapic "cloud.google.com/go/storage/internal/apiv2" "cloud.google.com/go/storage/internal/apiv2/storagepb" "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -57,12 +55,6 @@ const ( // This is only used for the gRPC client. defaultConnPoolSize = 1 - // maxPerMessageWriteSize is the maximum amount of content that can be sent - // per WriteObjectRequest message. A buffer reaching this amount will - // precipitate a flush of the buffer. It is only used by the gRPC Writer - // implementation. - maxPerMessageWriteSize int = int(storagepb.ServiceConstants_MAX_WRITE_CHUNK_BYTES) - // globalProjectAlias is the project ID alias used for global buckets. // // This is only used for the gRPC API. @@ -72,6 +64,10 @@ const ( // // This is only used for the gRPC API. msgEntityNotSupported = "The gRPC API currently does not support ACL entities using project ID, use project numbers instead" + + // Default value for Read ID on BidiReadObject streams. Used for NewRangeReader + // which only does a single read per stream. + defaultReadID = 1 ) // defaultGRPCOptions returns a set of the default client options @@ -105,6 +101,7 @@ func defaultGRPCOptions() []option.ClientOption { // Only enable DirectPath when the emulator is not being targeted. defaults = append(defaults, internaloption.EnableDirectPath(true), + internaloption.AllowNonDefaultServiceAccount(true), internaloption.EnableDirectPathXds()) } @@ -139,7 +136,7 @@ func enableClientMetrics(ctx context.Context, s *settings, config storageConfig) // newGRPCStorageClient initializes a new storageClient that uses the gRPC // Storage API. -func newGRPCStorageClient(ctx context.Context, opts ...storageOption) (storageClient, error) { +func newGRPCStorageClient(ctx context.Context, opts ...storageOption) (*grpcStorageClient, error) { s := initSettings(opts...) s.clientOption = append(defaultGRPCOptions(), s.clientOption...) // Disable all gax-level retries in favor of retry logic in the veneer client. @@ -305,17 +302,11 @@ func (c *grpcStorageClient) GetBucket(ctx context.Context, bucket string, conds var battrs *BucketAttrs err := run(ctx, func(ctx context.Context) error { res, err := c.raw.GetBucket(ctx, req, s.gax...) - battrs = newBucketFromProto(res) - return err }, s.retry, s.idempotent) - if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return nil, ErrBucketNotExist - } - - return battrs, err + return battrs, formatBucketError(err) } func (c *grpcStorageClient) UpdateBucket(ctx context.Context, bucket string, uattrs *BucketAttrsToUpdate, conds *BucketConditions, opts ...storageOption) (*BucketAttrs, error) { s := callSettings(c.settings, opts...) @@ -465,6 +456,9 @@ func (c *grpcStorageClient) ListObjects(ctx context.Context, bucket string, q *Q ctx = setUserProjectMetadata(ctx, s.userProject) } fetch := func(pageSize int, pageToken string) (token string, err error) { + // Add trace span around List API call within the fetch. + ctx, _ = startSpan(ctx, "grpcStorageClient.ObjectsListCall") + defer func() { endSpan(ctx, err) }() var objects []*storagepb.Object var gitr *gapic.ObjectIterator err = run(it.ctx, func(ctx context.Context) error { @@ -474,10 +468,7 @@ func (c *grpcStorageClient) ListObjects(ctx context.Context, bucket string, q *Q return err }, s.retry, s.idempotent) if err != nil { - if st, ok := status.FromError(err); ok && st.Code() == codes.NotFound { - err = ErrBucketNotExist - } - return "", err + return "", formatBucketError(err) } for _, obj := range objects { @@ -519,7 +510,7 @@ func (c *grpcStorageClient) DeleteObject(ctx context.Context, bucket, object str return c.raw.DeleteObject(ctx, req, s.gax...) }, s.retry, s.idempotent) if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return ErrObjectNotExist + return formatObjectErr(err) } return err } @@ -554,7 +545,7 @@ func (c *grpcStorageClient) GetObject(ctx context.Context, params *getObjectPara }, s.retry, s.idempotent) if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return nil, ErrObjectNotExist + return nil, formatObjectErr(err) } return attrs, err @@ -650,7 +641,7 @@ func (c *grpcStorageClient) UpdateObject(ctx context.Context, params *updateObje return err }, s.retry, s.idempotent) if e, ok := status.FromError(err); ok && e.Code() == codes.NotFound { - return nil, ErrObjectNotExist + return nil, formatObjectErr(err) } return attrs, err @@ -677,7 +668,7 @@ func (c *grpcStorageClient) RestoreObject(ctx context.Context, params *restoreOb return err }, s.retry, s.idempotent) if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return nil, ErrObjectNotExist + return nil, formatObjectErr(err) } return attrs, err } @@ -707,7 +698,7 @@ func (c *grpcStorageClient) MoveObject(ctx context.Context, params *moveObjectPa return err }, s.retry, s.idempotent) if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return nil, ErrObjectNotExist + return nil, formatObjectErr(err) } return attrs, err } @@ -949,6 +940,9 @@ func (c *grpcStorageClient) ComposeObject(ctx context.Context, req *composeObjec obj, err = c.raw.ComposeObject(ctx, rawReq, s.gax...) return err }, s.retry, s.idempotent); err != nil { + if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { + return nil, formatObjectErr(err) + } return nil, err } @@ -998,6 +992,9 @@ func (c *grpcStorageClient) RewriteObject(ctx context.Context, req *rewriteObjec retryCall := func(ctx context.Context) error { res, err = c.raw.RewriteObject(ctx, call, s.gax...); return err } if err := run(ctx, retryCall, s.retry, s.idempotent); err != nil { + if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { + return nil, formatObjectErr(err) + } return nil, err } @@ -1064,19 +1061,18 @@ func contextMetadataFromBidiReadObject(req *storagepb.BidiReadObjectRequest) []s return []string{"x-goog-request-params", fmt.Sprintf("bucket=%s", req.GetReadObjectSpec().GetBucket())} } -type rangeSpec struct { - readID int64 - writer io.Writer - offset int64 - limit int64 - bytesWritten int64 - callback func(int64, int64, error) -} - func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params *newMultiRangeDownloaderParams, opts ...storageOption) (mr *MultiRangeDownloader, err error) { + if !c.config.grpcBidiReads { + return nil, errors.New("storage: MultiRangeDownloader requires the experimental.WithGRPCBidiReads option") + } + ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewMultiRangeDownloader") defer func() { trace.EndSpan(ctx, err) }() s := callSettings(c.settings, opts...) + // Force the use of the custom codec to enable zero-copy reads. + s.gax = append(s.gax, gax.WithGRPCOptions( + grpc.ForceCodecV2(bytesCodecV2{}), + )) if s.userProject != "" { ctx = setUserProjectMetadata(ctx, s.userProject) @@ -1084,7 +1080,7 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params b := bucketResourceName(globalProjectAlias, params.bucket) object := params.object - r := &storagepb.BidiReadObjectSpec{ + bidiObject := &storagepb.BidiReadObjectSpec{ Bucket: b, Object: object, CommonObjectRequestParams: toProtoCommonObjectRequestParams(params.encryptionKey), @@ -1092,26 +1088,31 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params // The default is a negative value, which means latest. if params.gen >= 0 { - r.Generation = params.gen + bidiObject.Generation = params.gen } - if params.handle != nil { - r.ReadHandle = &storagepb.BidiReadHandle{ + if params.handle != nil && len(*params.handle) != 0 { + bidiObject.ReadHandle = &storagepb.BidiReadHandle{ Handle: *params.handle, } } req := &storagepb.BidiReadObjectRequest{ - ReadObjectSpec: r, + ReadObjectSpec: bidiObject, } ctx = gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...) - openStream := func() (*bidiReadStreamResponse, context.CancelFunc, error) { - if err := applyCondsProto("grpcStorageClient.BidiReadObject", params.gen, params.conds, r); err != nil { + openStream := func(readHandle ReadHandle) (*bidiReadStreamResponse, context.CancelFunc, error) { + if err := applyCondsProto("grpcStorageClient.BidiReadObject", params.gen, params.conds, bidiObject); err != nil { return nil, nil, err } + if len(readHandle) != 0 { + req.GetReadObjectSpec().ReadHandle = &storagepb.BidiReadHandle{ + Handle: readHandle, + } + } var stream storagepb.Storage_BidiReadObjectClient - var resp *storagepb.BidiReadObjectResponse + var decoder *readResponseDecoder cc, cancel := context.WithCancel(ctx) err = run(cc, func(ctx context.Context) error { stream, err = c.raw.BidiReadObject(ctx, s.gax...) @@ -1122,9 +1123,9 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params details := rpcStatus.Details() for _, detail := range details { if bidiError, ok := detail.(*storagepb.BidiReadObjectRedirectedError); ok { - r.ReadHandle = bidiError.ReadHandle - r.RoutingToken = bidiError.RoutingToken - req.ReadObjectSpec = r + bidiObject.ReadHandle = bidiError.ReadHandle + bidiObject.RoutingToken = bidiError.RoutingToken + req.ReadObjectSpec = bidiObject ctx = gax.InsertMetadataIntoOutgoingContext(ctx, contextMetadataFromBidiReadObject(req)...) } } @@ -1136,11 +1137,19 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params if err != nil { return err } - resp, err = stream.Recv() + // Use RecvMsg to get the raw buffer slice instead of Recv(). + databufs := mem.BufferSlice{} + err = stream.RecvMsg(&databufs) if err != nil { return err } - return nil + + // Use the custom decoder to parse the raw buffer without copying object data. + decoder = &readResponseDecoder{ + databufs: databufs, + } + err = decoder.readFullObjectResponse() + return err }, s.retry, s.idempotent) if err != nil { // Close the stream context we just created to ensure we don't leak @@ -1148,73 +1157,72 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params cancel() return nil, nil, err } - return &bidiReadStreamResponse{stream: stream, response: resp}, cancel, nil + return &bidiReadStreamResponse{stream: stream, decoder: decoder}, cancel, nil } // For the first time open stream without adding any range. - resp, cancel, err := openStream() + resp, cancel, err := openStream(nil) if err != nil { return nil, err } // The first message was Recv'd on stream open, use it to populate the // object metadata. - msg := resp.response + msg := resp.decoder.msg obj := msg.GetMetadata() - // This is the size of the entire object, even if only a range was requested. - size := obj.GetSize() - rr := &gRPCBidiReader{ + mrd := &gRPCBidiReader{ stream: resp.stream, cancel: cancel, settings: s, readHandle: msg.GetReadHandle().GetHandle(), - readID: 1, + readIDGenerator: &readIDGenerator{}, reopen: openStream, - readSpec: r, - data: make(chan []rangeSpec, 100), + readSpec: bidiObject, + rangesToRead: make(chan []mrdRange, 100), ctx: ctx, closeReceiver: make(chan bool, 10), - closeManager: make(chan bool, 10), - managerRetry: make(chan bool), // create unbuffered channel for closing the streamManager goroutine. + closeSender: make(chan bool, 10), + senderRetry: make(chan bool), // create unbuffered channel for closing the streamManager goroutine. receiverRetry: make(chan bool), // create unbuffered channel for closing the streamReceiver goroutine. - mp: make(map[int64]rangeSpec), + activeRanges: make(map[int64]mrdRange), done: false, - activeTask: 0, + numActiveRanges: 0, streamRecreation: false, } - // streamManager goroutine runs in background where we send message to gcs and process response. - streamManager := func() { - var currentSpec []rangeSpec + // sender receives ranges from user adds and requests these ranges from GCS. + sender := func() { + var currentSpec []mrdRange for { select { - case <-rr.ctx.Done(): - rr.mu.Lock() - rr.done = true - rr.mu.Unlock() + case <-mrd.ctx.Done(): + mrd.mu.Lock() + mrd.done = true + mrd.mu.Unlock() return - case <-rr.managerRetry: + case <-mrd.senderRetry: return - case <-rr.closeManager: - rr.mu.Lock() - if len(rr.mp) != 0 { - for key := range rr.mp { - rr.mp[key].callback(rr.mp[key].offset, rr.mp[key].limit, fmt.Errorf("stream closed early")) - delete(rr.mp, key) + case <-mrd.closeSender: + mrd.mu.Lock() + if len(mrd.activeRanges) != 0 { + for key := range mrd.activeRanges { + mrd.activeRanges[key].callback(mrd.activeRanges[key].offset, mrd.activeRanges[key].totalBytesWritten, fmt.Errorf("stream closed early")) + delete(mrd.activeRanges, key) } } - rr.mu.Unlock() + mrd.numActiveRanges = 0 + mrd.mu.Unlock() return - case currentSpec = <-rr.data: + case currentSpec = <-mrd.rangesToRead: var readRanges []*storagepb.ReadRange var err error - rr.mu.Lock() + mrd.mu.Lock() for _, v := range currentSpec { - rr.mp[v.readID] = v + mrd.activeRanges[v.readID] = v readRanges = append(readRanges, &storagepb.ReadRange{ReadOffset: v.offset, ReadLength: v.limit, ReadId: v.readID}) } - rr.mu.Unlock() + mrd.mu.Unlock() // We can just send 100 request to gcs in one request. // In case of Add we will send only one range request to gcs but in case of retry we can have more than 100 ranges. // Hence be will divide the request in chunk of 100. @@ -1230,13 +1238,13 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params end = len(readRanges) } curReq := readRanges[start:end] - err = rr.stream.Send(&storagepb.BidiReadObjectRequest{ + err = mrd.stream.Send(&storagepb.BidiReadObjectRequest{ ReadRanges: curReq, }) if err != nil { // cancel stream and reopen the stream again. // Incase again an error is thrown close the streamManager goroutine. - rr.retrier(err, "manager") + mrd.retrier(err, "manager") break } } @@ -1245,122 +1253,146 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params } } - streamReceiver := func() { - var resp *storagepb.BidiReadObjectResponse + // receives ranges responses on the stream and executes the callback. + receiver := func() { var err error for { select { - case <-rr.ctx.Done(): - rr.done = true + case <-mrd.ctx.Done(): + mrd.done = true return - case <-rr.receiverRetry: + case <-mrd.receiverRetry: return - case <-rr.closeReceiver: + case <-mrd.closeReceiver: return default: // This function reads the data sent for a particular range request and has a callback // to indicate that output buffer is filled. - resp, err = rr.stream.Recv() - if resp.GetReadHandle().GetHandle() != nil { - rr.readHandle = resp.GetReadHandle().GetHandle() - } + databufs := mem.BufferSlice{} + err = mrd.stream.RecvMsg(&databufs) if err == io.EOF { err = nil - } - if err != nil { - // cancel stream and reopen the stream again. - // Incase again an error is thrown close the streamManager goroutine. - rr.retrier(err, "receiver") + } else { + // Cancel stream and reopen the stream again. + // In case again an error is thrown, close the streamManager goroutine. + // TODO: special handling for not found error. + mrd.retrier(err, "receiver") } if err == nil { - rr.mu.Lock() - if len(rr.mp) == 0 && rr.activeTask == 0 { - rr.closeReceiver <- true - rr.closeManager <- true + // Use the custom decoder to parse the message. + decoder := &readResponseDecoder{databufs: databufs} + if err := decoder.readFullObjectResponse(); err != nil { + mrd.retrier(err, "receiver") + continue // Move to next iteration after retry + } + msg := decoder.msg + + if msg.GetReadHandle().GetHandle() != nil { + mrd.readHandle = msg.GetReadHandle().GetHandle() + } + + mrd.mu.Lock() + if len(mrd.activeRanges) == 0 && mrd.numActiveRanges == 0 { + mrd.mu.Unlock() + mrd.closeReceiver <- true + mrd.closeSender <- true return } - rr.mu.Unlock() - arr := resp.GetObjectDataRanges() - for _, val := range arr { + mrd.mu.Unlock() + for _, val := range msg.GetObjectDataRanges() { id := val.GetReadRange().GetReadId() - rr.mu.Lock() - _, err = rr.mp[id].writer.Write(val.GetChecksummedData().GetContent()) - if err != nil { - rr.mp[id].callback(rr.mp[id].offset, rr.mp[id].limit, err) - rr.activeTask-- - delete(rr.mp, id) - } else { - rr.mp[id] = rangeSpec{ - readID: rr.mp[id].readID, - writer: rr.mp[id].writer, - offset: rr.mp[id].offset, - limit: rr.mp[id].limit, - bytesWritten: rr.mp[id].bytesWritten + int64(len(val.GetChecksummedData().GetContent())), - callback: rr.mp[id].callback, + func() { + mrd.mu.Lock() + defer mrd.mu.Unlock() + currRange, ok := mrd.activeRanges[id] + if !ok { + // it's ok to ignore responses for read_id not in map as user would have been notified by callback. + return } - } - if val.GetRangeEnd() { - rr.mp[id].callback(rr.mp[id].offset, rr.mp[id].limit, nil) - rr.activeTask-- - delete(rr.mp, id) - } - rr.mu.Unlock() + + // The decoder holds the object content. writeToAndUpdateCRC writes + // it to the user's buffer without an intermediate copy. + written, _, err := decoder.writeToAndUpdateCRC(currRange.writer, id, func(b []byte) { + // crc update logic can be added here if needed + }) + + if err != nil { + currRange.callback(currRange.offset, currRange.totalBytesWritten, err) + mrd.numActiveRanges-- + delete(mrd.activeRanges, id) + } else { + currRange = mrdRange{ + readID: currRange.readID, + writer: currRange.writer, + offset: currRange.offset, + limit: currRange.limit, + currentBytesWritten: currRange.currentBytesWritten + written, + totalBytesWritten: currRange.totalBytesWritten + written, + callback: currRange.callback, + } + mrd.activeRanges[id] = currRange + } + if val.GetRangeEnd() { + currRange.callback(currRange.offset, currRange.totalBytesWritten, nil) + mrd.numActiveRanges-- + delete(mrd.activeRanges, id) + } + }() } + // Free the buffers once the message has been processed. + decoder.databufs.Free() } - } } } - rr.retrier = func(err error, thread string) { - rr.mu.Lock() - if !rr.streamRecreation { - rr.streamRecreation = true + mrd.retrier = func(err error, thread string) { + mrd.mu.Lock() + if !mrd.streamRecreation { + mrd.streamRecreation = true } else { - rr.mu.Unlock() + mrd.mu.Unlock() return } - rr.mu.Unlock() + mrd.mu.Unlock() // close both the go routines to make the stream recreation syncronous. if thread == "receiver" { - rr.managerRetry <- true + mrd.senderRetry <- true } else { - rr.receiverRetry <- true + mrd.receiverRetry <- true } - err = rr.retryStream(err) + err = mrd.retryStream(err) if err != nil { - rr.mu.Lock() - for key := range rr.mp { - rr.mp[key].callback(rr.mp[key].offset, rr.mp[key].limit, err) - delete(rr.mp, key) + mrd.mu.Lock() + for key := range mrd.activeRanges { + mrd.activeRanges[key].callback(mrd.activeRanges[key].offset, mrd.activeRanges[key].totalBytesWritten, err) + delete(mrd.activeRanges, key) } - rr.mu.Unlock() - rr.close() + // In case we hit an permanent error, delete entries from map and remove active tasks. + mrd.numActiveRanges = 0 + mrd.mu.Unlock() + mrd.close() } else { // If stream recreation happened successfully lets again start // both the goroutine making the whole flow asynchronous again. if thread == "receiver" { - go streamManager() + go sender() } else { - go streamReceiver() + go receiver() } } - rr.mu.Lock() - rr.streamRecreation = false - rr.mu.Unlock() + mrd.mu.Lock() + mrd.streamRecreation = false + mrd.mu.Unlock() } - rr.mu.Lock() - rr.objectSize = size - rr.mu.Unlock() - - go streamManager() - go streamReceiver() + go sender() + go receiver() return &MultiRangeDownloader{ Attrs: ReaderObjectAttrs{ - Size: size, + Size: obj.GetSize(), // this is the size of the entire object, even if only a range was requested. ContentType: obj.GetContentType(), ContentEncoding: obj.GetContentEncoding(), CacheControl: obj.GetCacheControl(), @@ -1368,120 +1400,194 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params Metageneration: obj.GetMetageneration(), Generation: obj.GetGeneration(), }, - reader: rr, + reader: mrd, }, nil } -func getActiveRange(r *gRPCBidiReader) []rangeSpec { - r.mu.Lock() - defer r.mu.Unlock() - var activeRange []rangeSpec - for k, v := range r.mp { - activeRange = append(activeRange, rangeSpec{ - readID: k, - writer: v.writer, - offset: (v.offset + v.bytesWritten), - limit: v.limit - v.bytesWritten, - callback: v.callback, - bytesWritten: 0, +type gRPCBidiReader struct { + ctx context.Context + stream storagepb.Storage_BidiReadObjectClient + cancel context.CancelFunc + settings *settings + readHandle ReadHandle + readIDGenerator *readIDGenerator + reopen func(ReadHandle) (*bidiReadStreamResponse, context.CancelFunc, error) + readSpec *storagepb.BidiReadObjectSpec + closeReceiver chan bool + closeSender chan bool + senderRetry chan bool + receiverRetry chan bool + // rangesToRead are ranges that have not yet been sent or have been sent but + // must be retried. + rangesToRead chan []mrdRange + // activeRanges are ranges that are currently being sent or are waiting for + // a response from GCS. + activeRanges map[int64]mrdRange // always use the mutex when accessing the map + numActiveRanges int64 // always use the mutex when accessing this variable + done bool // always use the mutex when accessing this variable, indicates whether stream is closed or not. + mu sync.Mutex // protects all vars in gRPCBidiReader from concurrent access + retrier func(error, string) + streamRecreation bool // This helps us identify if stream recreation is in progress or not. If stream recreation gets called from two goroutine then this will stop second one. +} + +func (mrd *gRPCBidiReader) activeRange() []mrdRange { + mrd.mu.Lock() + defer mrd.mu.Unlock() + var activeRange []mrdRange + for k, v := range mrd.activeRanges { + activeRange = append(activeRange, mrdRange{ + readID: k, + writer: v.writer, + offset: (v.offset + v.currentBytesWritten), + limit: v.limit - v.currentBytesWritten, + callback: v.callback, + currentBytesWritten: 0, + totalBytesWritten: v.totalBytesWritten, }) - r.mp[k] = activeRange[len(activeRange)-1] + mrd.activeRanges[k] = activeRange[len(activeRange)-1] } return activeRange } // retryStream cancel's stream and reopen the stream again. -func (r *gRPCBidiReader) retryStream(err error) error { - var shouldRetry = ShouldRetry - if r.settings.retry != nil && r.settings.retry.shouldRetry != nil { - shouldRetry = r.settings.retry.shouldRetry - } - if shouldRetry(err) { +func (mrd *gRPCBidiReader) retryStream(err error) error { + if mrd.settings.retry.runShouldRetry(err) { // This will "close" the existing stream and immediately attempt to // reopen the stream, but will backoff if further attempts are necessary. // When Reopening the stream only failed readID will be added to stream. - return r.reopenStream(getActiveRange(r)) + return mrd.reopenStream(mrd.activeRange()) } return err } // reopenStream "closes" the existing stream and attempts to reopen a stream and // sets the Reader's stream and cancelStream properties in the process. -func (r *gRPCBidiReader) reopenStream(failSpec []rangeSpec) error { +func (mrd *gRPCBidiReader) reopenStream(failSpec []mrdRange) error { // Close existing stream and initialize new stream with updated offset. - if r.cancel != nil { - r.cancel() + if mrd.cancel != nil { + mrd.cancel() } - res, cancel, err := r.reopen() + res, cancel, err := mrd.reopen(mrd.readHandle) if err != nil { return err } - r.stream = res.stream - r.cancel = cancel - r.readHandle = res.response.GetReadHandle().GetHandle() + mrd.stream = res.stream + mrd.cancel = cancel + msg := res.decoder.msg + if msg.GetReadHandle().GetHandle() != nil { + mrd.readHandle = msg.GetReadHandle().GetHandle() + } + + // Process any data ranges that came back in the initial response. + // This prevents data loss from the first message on the new stream. + for _, val := range msg.GetObjectDataRanges() { + id := val.GetReadRange().GetReadId() + mrd.mu.Lock() + activeRange, ok := mrd.activeRanges[id] + if !ok { + mrd.mu.Unlock() + continue + } + + // Use the decoder's zero-copy write method. + written, _, writeErr := res.decoder.writeToAndUpdateCRC(activeRange.writer, id, nil) + if writeErr != nil { + activeRange.callback(activeRange.offset, activeRange.totalBytesWritten, writeErr) + mrd.numActiveRanges-- + delete(mrd.activeRanges, id) + } else { + activeRange.currentBytesWritten += written + activeRange.totalBytesWritten += written + mrd.activeRanges[id] = activeRange + } + + if val.GetRangeEnd() { + activeRange.callback(activeRange.offset, activeRange.totalBytesWritten, nil) + mrd.numActiveRanges-- + delete(mrd.activeRanges, id) + } + mrd.mu.Unlock() + } + // Once all data in the initial response has been read out, free buffers. + res.decoder.databufs.Free() if failSpec != nil { - r.data <- failSpec + mrd.rangesToRead <- failSpec } return nil } -// Add will add current range to stream. -func (mr *gRPCBidiReader) add(output io.Writer, offset, limit int64, callback func(int64, int64, error)) { - mr.mu.Lock() - objectSize := mr.objectSize - mr.mu.Unlock() - - if offset > objectSize { - callback(offset, limit, fmt.Errorf("offset larger than size of object: %v", objectSize)) - return - } +// add will add current range to stream. The size of the range is not validated +// by add; if the client requests more bytes than are available in the object +// the server will return an error. +func (mrd *gRPCBidiReader) add(output io.Writer, offset, limit int64, callback func(int64, int64, error)) { if limit < 0 { - callback(offset, limit, fmt.Errorf("limit can't be negative")) + callback(offset, 0, errors.New("storage: cannot add range because the limit cannot be negative")) return } - mr.mu.Lock() - curentID := (*mr).readID - (*mr).readID++ - if !mr.done { - spec := rangeSpec{readID: curentID, writer: output, offset: offset, limit: limit, bytesWritten: 0, callback: callback} - mr.mp[curentID] = spec - mr.activeTask++ - mr.data <- []rangeSpec{spec} + + id := mrd.readIDGenerator.Next() + if !mrd.done { + spec := mrdRange{readID: id, writer: output, offset: offset, limit: limit, currentBytesWritten: 0, totalBytesWritten: 0, callback: callback} + mrd.mu.Lock() + mrd.numActiveRanges++ + mrd.mu.Unlock() + mrd.rangesToRead <- []mrdRange{spec} } else { - callback(offset, limit, fmt.Errorf("stream is closed, can't add range")) + callback(offset, 0, errors.New("storage: cannot add range because the stream is closed")) } - mr.mu.Unlock() } -func (mr *gRPCBidiReader) wait() { - mr.mu.Lock() - keepWaiting := len(mr.mp) != 0 && mr.activeTask != 0 - mr.mu.Unlock() +func (mrd *gRPCBidiReader) wait() { + mrd.mu.Lock() + // we should wait until there is active task or an entry in the map. + // there can be a scenario we have nothing in map for a moment or too but still have active task. + // hence in case we have permanent errors we reduce active task to 0 so that this does not block wait. + keepWaiting := len(mrd.activeRanges) != 0 || mrd.numActiveRanges != 0 + mrd.mu.Unlock() for keepWaiting { - mr.mu.Lock() - keepWaiting = len(mr.mp) != 0 && mr.activeTask != 0 - mr.mu.Unlock() + mrd.mu.Lock() + keepWaiting = len(mrd.activeRanges) != 0 || mrd.numActiveRanges != 0 + mrd.mu.Unlock() } } // Close will notify stream manager goroutine that the reader has been closed, if it's still running. -func (mr *gRPCBidiReader) close() error { - if mr.cancel != nil { - mr.cancel() - } - mr.mu.Lock() - mr.done = true - mr.activeTask = 0 - mr.mu.Unlock() - mr.closeReceiver <- true - mr.closeManager <- true +func (mrd *gRPCBidiReader) close() error { + if mrd.cancel != nil { + mrd.cancel() + } + mrd.mu.Lock() + mrd.done = true + mrd.numActiveRanges = 0 + mrd.mu.Unlock() + mrd.closeReceiver <- true + mrd.closeSender <- true return nil } -func (mrr *gRPCBidiReader) getHandle() []byte { - return mrr.readHandle +func (mrd *gRPCBidiReader) getHandle() []byte { + return mrd.readHandle +} + +func (mrd *gRPCBidiReader) error() error { + mrd.mu.Lock() + defer mrd.mu.Unlock() + if mrd.done { + return errors.New("storage: stream is permanently closed") + } + return nil +} + +type mrdRange struct { + readID int64 + writer io.Writer + offset int64 + limit int64 + currentBytesWritten int64 + totalBytesWritten int64 + callback func(int64, int64, error) } func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (r *Reader, err error) { @@ -1514,7 +1620,7 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange if err := applyCondsProto("gRPCReader.NewRangeReader", params.gen, params.conds, spec); err != nil { return nil, err } - if params.handle != nil { + if params.handle != nil && len(*params.handle) != 0 { spec.ReadHandle = &storagepb.BidiReadHandle{ Handle: *params.handle, } @@ -1538,7 +1644,7 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange // BidiReadObject can take multiple ranges, but we just request one in this case. readRange := &storagepb.ReadRange{ ReadOffset: params.offset + seen, - ReadId: 1, + ReadId: defaultReadID, } // Only set a ReadLength if length is greater than zero, because <= 0 means @@ -1573,7 +1679,7 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange // These types of errors show up on the RecvMsg call, rather than the // initialization of the stream via BidiReadObject above. if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return ErrObjectNotExist + return formatObjectErr(err) } if err != nil { return err @@ -1613,9 +1719,20 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange msg := res.decoder.msg obj := msg.GetMetadata() handle := ReadHandle(msg.GetReadHandle().GetHandle()) + // This is the size of the entire object, even if only a range was requested. + // Object size can be out of date in the case of unfinalized objects. size := obj.GetSize() + finalized := obj.GetFinalizeTime() != nil + negativeOffset := params.offset < 0 + if !finalized && negativeOffset { + // Fix the offset and length of a negative-offset read at time of first + // response to ensure data integrity. + params.offset = obj.Size + params.offset + params.length = obj.Size - params.offset + } + // Only support checksums when reading an entire object, not a range. var ( wantCRC uint32 @@ -1632,6 +1749,11 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange if params.offset < 0 { startOffset = size + params.offset } + // If caller has specified a negative start offset that's larger than the + // reported size, start at the beginning of the object. + if startOffset < 0 { + startOffset = 0 + } // The remaining bytes are the lesser of the requested range and all bytes // after params.offset. @@ -1663,15 +1785,18 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange cancel: cancel, size: size, // Preserve the decoder to read out object data when Read/WriteTo is called. - currMsg: res.decoder, - settings: s, - zeroRange: params.length == 0, - wantCRC: wantCRC, - checkCRC: checkCRC, + currMsg: res.decoder, + settings: s, + zeroRange: params.length == 0, + wantCRC: wantCRC, + checkCRC: checkCRC, + finalized: finalized, + negativeOffset: negativeOffset, }, - checkCRC: checkCRC, - handle: &handle, - remain: remain, + checkCRC: checkCRC, + handle: &handle, + remain: remain, + unfinalized: !finalized, } // For a zero-length request, explicitly close the stream and set remaining @@ -1684,72 +1809,6 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange return r, nil } -func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (*io.PipeWriter, error) { - var offset int64 - errorf := params.setError - setObj := params.setObj - pr, pw := io.Pipe() - - s := callSettings(c.settings, opts...) - - // This function reads the data sent to the pipe and sends sets of messages - // on the gRPC client-stream as the buffer is filled. - go func() { - err := func() error { - // Unless the user told us the content type, we have to determine it from - // the first read. - var r io.Reader = pr - if params.attrs.ContentType == "" && !params.forceEmptyContentType { - r, params.attrs.ContentType = gax.DetermineContentType(r) - } - - var gw *gRPCWriter - gw, err := newGRPCWriter(c, s, params, r) - if err != nil { - return err - } - - // Loop until there is an error or the Object has been finalized. - for { - // Note: This blocks until either the buffer is full or EOF is read. - recvd, doneReading, err := gw.read() - if err != nil { - return err - } - - var o *storagepb.Object - uploadBuff := func(ctx context.Context) error { - obj, err := gw.uploadBuffer(recvd, offset, doneReading) - o = obj - return err - } - - err = run(gw.ctx, uploadBuff, gw.settings.retry, s.idempotent) - if err != nil { - return err - } - offset += int64(recvd) - - // When we are done reading data without errors, set the object and - // finish. - if doneReading { - // Build Object from server's response. - setObj(newObjectFromProto(o)) - return nil - } - } - }() - - // These calls are still valid if err is nil - err = checkCanceled(err) - errorf(err) - pr.CloseWithError(err) - close(params.donec) - }() - - return pw, nil -} - // IAM methods. func (c *grpcStorageClient) GetIamPolicy(ctx context.Context, resource string, version int32, opts ...storageOption) (*iampb.Policy, error) { @@ -1869,46 +1928,25 @@ type readStreamResponse struct { } type bidiReadStreamResponse struct { - stream storagepb.Storage_BidiReadObjectClient - response *storagepb.BidiReadObjectResponse -} - -type gRPCBidiReader struct { - stream storagepb.Storage_BidiReadObjectClient - cancel context.CancelFunc - settings *settings - readHandle ReadHandle - readID int64 - reopen func() (*bidiReadStreamResponse, context.CancelFunc, error) - readSpec *storagepb.BidiReadObjectSpec - data chan []rangeSpec - ctx context.Context - closeReceiver chan bool - closeManager chan bool - managerRetry chan bool - receiverRetry chan bool - mu sync.Mutex // protects all vars in gRPCBidiReader from concurrent access - mp map[int64]rangeSpec // always use the mutex when accessing the map - done bool // always use the mutex when accessing this variable - activeTask int64 // always use the mutex when accessing this variable - objectSize int64 // always use the mutex when accessing this variable - retrier func(error, string) - streamRecreation bool // This helps us identify if stream recreation is in progress or not. If stream recreation gets called from two goroutine then this will stop second one. + stream storagepb.Storage_BidiReadObjectClient + decoder *readResponseDecoder } // gRPCReader is used by storage.Reader if the experimental option WithGRPCBidiReads is passed. type gRPCReader struct { - seen, size int64 - zeroRange bool - stream storagepb.Storage_BidiReadObjectClient - reopen func(seen int64) (*readStreamResponse, context.CancelFunc, error) - leftovers []byte - currMsg *readResponseDecoder // decoder for the current message - cancel context.CancelFunc - settings *settings - checkCRC bool // should we check the CRC? - wantCRC uint32 // the CRC32c value the server sent in the header - gotCRC uint32 // running crc + seen, size int64 + zeroRange bool + finalized bool // if we are reading from a finalized object; in this case, remain and size may be inaccurate + negativeOffset bool + stream storagepb.Storage_BidiReadObjectClient + reopen func(seen int64) (*readStreamResponse, context.CancelFunc, error) + leftovers []byte + currMsg *readResponseDecoder // decoder for the current message + cancel context.CancelFunc + settings *settings + checkCRC bool // should we check the CRC? + wantCRC uint32 // the CRC32c value the server sent in the header + gotCRC uint32 // running crc } // Update the running CRC with the data in the slice, if CRC checking was enabled. @@ -1930,7 +1968,7 @@ func (r *gRPCReader) runCRCCheck() error { func (r *gRPCReader) Read(p []byte) (int, error) { // The entire object has been read by this reader, check the checksum if // necessary and return EOF. - if r.size == r.seen || r.zeroRange { + if (r.finalized || r.negativeOffset) && r.size == r.seen || r.zeroRange { if err := r.runCRCCheck(); err != nil { return 0, err } @@ -1945,39 +1983,30 @@ func (r *gRPCReader) Read(p []byte) (int, error) { return 0, fmt.Errorf("storage: reader has been closed") } - var n int - - // If there is data remaining in the current message, return what was - // available to conform to the Reader - // interface: https://pkg.go.dev/io#Reader. - if !r.currMsg.done { - n = r.currMsg.readAndUpdateCRC(p, func(b []byte) { - r.updateCRC(b) - }) - r.seen += int64(n) - return n, nil - } + for { + // If there is data remaining in the current message, try to read from it. + if r.currMsg != nil && !r.currMsg.done { + n, found := r.currMsg.readAndUpdateCRC(p, 1, func(b []byte) { + r.updateCRC(b) + }) + + // If data for our readID was found, we can update `seen` and return. + if found { + r.seen += int64(n) + return n, nil + } + // If not found, this message is exhausted for our purposes. + // Fall through to recv() to get a new one. + } - // Attempt to Recv the next message on the stream. - // This will update r.currMsg with the decoder for the new message. - err := r.recv() - if err != nil { - return 0, err + // Get the next message from the stream. + err := r.recv() + if err != nil { + // This correctly handles io.EOF, context canceled, and other terminal errors. + return 0, err + } + // The loop will now restart and try to read from the new r.currMsg. } - - // TODO: Determine if we need to capture incremental CRC32C for this - // chunk. The Object CRC32C checksum is captured when directed to read - // the entire Object. If directed to read a range, we may need to - // calculate the range's checksum for verification if the checksum is - // present in the response here. - // TODO: Figure out if we need to support decompressive transcoding - // https://cloud.google.com/storage/docs/transcoding. - - n = r.currMsg.readAndUpdateCRC(p, func(b []byte) { - r.updateCRC(b) - }) - r.seen += int64(n) - return n, nil } // WriteTo writes all the data requested by the Reader into w, implementing @@ -1985,7 +2014,7 @@ func (r *gRPCReader) Read(p []byte) (int, error) { func (r *gRPCReader) WriteTo(w io.Writer) (int64, error) { // The entire object has been read by this reader, check the checksum if // necessary and return nil. - if r.size == r.seen || r.zeroRange { + if (r.finalized || r.negativeOffset) && r.size == r.seen || r.zeroRange { if err := r.runCRCCheck(); err != nil { return 0, err } @@ -2005,47 +2034,37 @@ func (r *gRPCReader) WriteTo(w io.Writer) (int64, error) { // Write any already received message to the stream. There will be some leftovers from the // original NewRangeReader call. - if r.currMsg != nil && !r.currMsg.done { - written, err := r.currMsg.writeToAndUpdateCRC(w, func(b []byte) { - r.updateCRC(b) - }) - r.seen += int64(written) - r.currMsg = nil - if err != nil { - return r.seen - alreadySeen, err + for { + // Write any data from the current message buffer. + if r.currMsg != nil && !r.currMsg.done { + written, _, err := r.currMsg.writeToAndUpdateCRC(w, defaultReadID, func(b []byte) { + r.updateCRC(b) + }) + r.seen += written + if err != nil { + return r.seen - alreadySeen, err + } + // If no data was found, we still need to fetch the next message. + // If data was found, we also need the next message. So we always fall through. } - } - // Loop and receive additional messages until the entire data is written. - for { // Attempt to receive the next message on the stream. - // Will terminate with io.EOF once data has all come through. - // recv() handles stream reopening and retry logic so no need for retries here. err := r.recv() if err != nil { if err == io.EOF { - // We are done; check the checksum if necessary and return. - err = r.runCRCCheck() + // We are done; exit the loop. + break } return r.seen - alreadySeen, err } - - // TODO: Determine if we need to capture incremental CRC32C for this - // chunk. The Object CRC32C checksum is captured when directed to read - // the entire Object. If directed to read a range, we may need to - // calculate the range's checksum for verification if the checksum is - // present in the response here. - // TODO: Figure out if we need to support decompressive transcoding - // https://cloud.google.com/storage/docs/transcoding. - written, err := r.currMsg.writeToAndUpdateCRC(w, func(b []byte) { - r.updateCRC(b) - }) - r.seen += int64(written) - if err != nil { - return r.seen - alreadySeen, err - } + // Continue loop to process the new message. } - + // Propagate any checksum error. + var finalErr error + if err := r.runCRCCheck(); err != nil { + finalErr = err + } + return r.seen - alreadySeen, finalErr } // Close cancels the read stream's context in order for it to be closed and @@ -2054,6 +2073,7 @@ func (r *gRPCReader) Close() error { if r.cancel != nil { r.cancel() } + r.currMsg = nil return nil } @@ -2073,11 +2093,7 @@ func (r *gRPCReader) Close() error { func (r *gRPCReader) recv() error { databufs := mem.BufferSlice{} err := r.stream.RecvMsg(&databufs) - var shouldRetry = ShouldRetry - if r.settings.retry != nil && r.settings.retry.shouldRetry != nil { - shouldRetry = r.settings.retry.shouldRetry - } - if err != nil && shouldRetry(err) { + if err != nil && r.settings.retry.runShouldRetry(err) { // This will "close" the existing stream and immediately attempt to // reopen the stream, but will backoff if further attempts are necessary. // Reopening the stream Recvs the first message, so if retrying is @@ -2119,7 +2135,7 @@ type readResponseDecoder struct { currOff uint64 // offset in the current buffer // Processed data msg *storagepb.BidiReadObjectResponse // processed response message with all fields other than object data populated - dataOffsets bufferSliceOffsets // offsets of the object data in the message. + dataOffsets map[int64]bufferSliceOffsets // Map ReadId to the offsets of the object data for that ID in the message. done bool // true if the data has been completely read. } @@ -2205,69 +2221,95 @@ func (d *readResponseDecoder) advanceOffset(n uint64) error { // This copies object data from the message into the buffer and returns the number of // bytes copied. The data offsets are incremented in the message. The updateCRC // function is called on the copied bytes. -func (d *readResponseDecoder) readAndUpdateCRC(p []byte, updateCRC func([]byte)) int { - // For a completely empty message, just return 0 +func (d *readResponseDecoder) readAndUpdateCRC(p []byte, readID int64, updateCRC func([]byte)) (n int, found bool) { + // For a completely empty message, just return 0. if len(d.databufs) == 0 { - return 0 + return 0, false + } + + // Look up the specific offsets for the requested readID. + offsets, ok := d.dataOffsets[readID] + if !ok { + // If the message contains no data for this ID, return 0 bytes read. + return 0, false } - databuf := d.databufs[d.dataOffsets.currBuf] - startOff := d.dataOffsets.currOff + + databuf := d.databufs[offsets.currBuf] + startOff := offsets.currOff var b []byte - if d.dataOffsets.currBuf == d.dataOffsets.endBuf { - b = databuf.ReadOnlyData()[startOff:d.dataOffsets.endOff] + if offsets.currBuf == offsets.endBuf { + b = databuf.ReadOnlyData()[startOff:offsets.endOff] } else { b = databuf.ReadOnlyData()[startOff:] } - n := copy(p, b) - updateCRC(b[:n]) - d.dataOffsets.currOff += uint64(n) + n = copy(p, b) + if updateCRC != nil { + updateCRC(b[:n]) + } + offsets.currOff += uint64(n) - // We've read all the data from this message. Free the underlying buffers. - if d.dataOffsets.currBuf == d.dataOffsets.endBuf && d.dataOffsets.currOff == d.dataOffsets.endOff { - d.done = true - d.databufs.Free() + // We've read all the data for this specific range from this message. + if offsets.currBuf == offsets.endBuf && offsets.currOff == offsets.endOff { + d.done = true // Mark as done for this read, though the overall message might have more data. } - // We are at the end of the current buffer - if d.dataOffsets.currBuf != d.dataOffsets.endBuf && d.dataOffsets.currOff == uint64(databuf.Len()) { - d.dataOffsets.currOff = 0 - d.dataOffsets.currBuf++ + // We are at the end of the current buffer for this range. + if offsets.currBuf != offsets.endBuf && offsets.currOff == uint64(databuf.Len()) { + offsets.currOff = 0 + offsets.currBuf++ } - return n + + // Update the map with the new offsets. + d.dataOffsets[readID] = offsets + + return n, true } -func (d *readResponseDecoder) writeToAndUpdateCRC(w io.Writer, updateCRC func([]byte)) (int64, error) { +func (d *readResponseDecoder) writeToAndUpdateCRC(w io.Writer, readID int64, updateCRC func([]byte)) (totalWritten int64, found bool, err error) { // For a completely empty message, just return 0 if len(d.databufs) == 0 { - return 0, nil + return 0, false, nil } - var written int64 - for !d.done { - databuf := d.databufs[d.dataOffsets.currBuf] - startOff := d.dataOffsets.currOff - var b []byte - if d.dataOffsets.currBuf == d.dataOffsets.endBuf { - b = databuf.ReadOnlyData()[startOff:d.dataOffsets.endOff] - } else { - b = databuf.ReadOnlyData()[startOff:] + // Look up the specific offsets for the requested readID. + offsets, ok := d.dataOffsets[readID] + if !ok { + // It's normal for a message to not contain data for every active range, + // so we return 0 bytes written and no error. + return 0, false, nil + } + + // Loop from the current buffer to the ending buffer for this specific data range. + for i := offsets.currBuf; i <= offsets.endBuf; i++ { + databuf := d.databufs[i] + + // Determine the start and end of the data slice for the current buffer. + start := offsets.currOff + end := uint64(databuf.Len()) + if i == offsets.endBuf { + end = offsets.endOff } - var n int - // Write all remaining data from the current buffer - n, err := w.Write(b) - written += int64(n) - updateCRC(b) - if err != nil { - return written, err + + // It's possible for a buffer to be empty in some edge cases. + if start >= end { + continue } - d.dataOffsets.currOff = 0 - // We've read all the data from this message. - if d.dataOffsets.currBuf == d.dataOffsets.endBuf { - d.done = true - d.databufs.Free() - } else { - d.dataOffsets.currBuf++ + + dataSlice := databuf.ReadOnlyData()[start:end] + + // Write the data slice to the user's writer. + n, err := w.Write(dataSlice) + totalWritten += int64(n) + offsets.currOff = 0 // moving to the next buffer, currOff resets to zero. + if updateCRC != nil { + updateCRC(dataSlice[:n]) + } + if err != nil { + // Return immediately on a write error. + return totalWritten, true, err } } - return written, nil + d.done = true + + return totalWritten, true, nil } // Consume the next available tag in the input data and return the field number and type. @@ -2410,6 +2452,8 @@ func (d *readResponseDecoder) consumeBytesCopy() ([]byte, error) { // Unmarshal that does that, this function can be dropped. func (d *readResponseDecoder) readFullObjectResponse() error { msg := &storagepb.BidiReadObjectResponse{} + // Initialize the new map. + d.dataOffsets = make(map[int64]bufferSliceOffsets) // Loop over the entire message, extracting fields as we go. This does not // handle field concatenation, in which the contents of a single field @@ -2431,10 +2475,16 @@ func (d *readResponseDecoder) readFullObjectResponse() error { case fieldNum == objectRangeDataField && fieldType == protowire.BytesType: // The object data field was found. Initialize the data ranges assuming // exactly one range in the message. - msg.ObjectDataRanges = []*storagepb.ObjectRangeData{{ChecksummedData: &storagepb.ChecksummedData{}, ReadRange: &storagepb.ReadRange{}}} + // Create a new ObjectRangeData for each instance of this repeated field. + currentRange := &storagepb.ObjectRangeData{ChecksummedData: &storagepb.ChecksummedData{}, ReadRange: &storagepb.ReadRange{}} + msg.ObjectDataRanges = append(msg.ObjectDataRanges, currentRange) + // This variable will temporarily hold the data offsets until the ReadId is known. + var contentOffsets bufferSliceOffsets + var hasContent bool + bytesFieldLen, err := d.consumeVarint() if err != nil { - return fmt.Errorf("consuming bytes: %v", err) + return fmt.Errorf("consuming bytes: %w", err) } var contentEndOff = d.off + bytesFieldLen for d.off < contentEndOff { @@ -2447,7 +2497,7 @@ func (d *readResponseDecoder) readFullObjectResponse() error { case gotNum == checksummedDataField && gotTyp == protowire.BytesType: checksummedDataFieldLen, err := d.consumeVarint() if err != nil { - return fmt.Errorf("consuming bytes: %v", err) + return fmt.Errorf("consuming bytes: %w", err) } var checksummedDataEndOff = d.off + checksummedDataFieldLen for d.off < checksummedDataEndOff { @@ -2458,16 +2508,18 @@ func (d *readResponseDecoder) readFullObjectResponse() error { switch { case gotNum == checksummedDataContentField && gotTyp == protowire.BytesType: // Get the offsets of the content bytes. - d.dataOffsets, err = d.consumeBytes() + contentOffsets, err = d.consumeBytes() if err != nil { return fmt.Errorf("invalid BidiReadObjectResponse.ChecksummedData.Content: %w", err) } + hasContent = true + case gotNum == checksummedDataCRC32CField && gotTyp == protowire.Fixed32Type: v, err := d.consumeFixed32() if err != nil { return fmt.Errorf("invalid BidiReadObjectResponse.ChecksummedData.Crc32C: %w", err) } - msg.ObjectDataRanges[0].ChecksummedData.Crc32C = &v + currentRange.ChecksummedData.Crc32C = &v default: err := d.consumeFieldValue(gotNum, gotTyp) if err != nil { @@ -2478,10 +2530,10 @@ func (d *readResponseDecoder) readFullObjectResponse() error { case gotNum == readRangeField && gotTyp == protowire.BytesType: buf, err := d.consumeBytesCopy() if err != nil { - return fmt.Errorf("invalid ObjectDataRange.ReadRange: %v", err) + return fmt.Errorf("invalid ObjectDataRange.ReadRange: %w", err) } - if err := proto.Unmarshal(buf, msg.ObjectDataRanges[0].ReadRange); err != nil { + if err := proto.Unmarshal(buf, currentRange.ReadRange); err != nil { return err } case gotNum == rangeEndField && gotTyp == protowire.VarintType: // proto encodes bool as int32 @@ -2489,15 +2541,19 @@ func (d *readResponseDecoder) readFullObjectResponse() error { if err != nil { return fmt.Errorf("invalid ObjectDataRange.RangeEnd: %w", err) } - msg.ObjectDataRanges[0].RangeEnd = protowire.DecodeBool(b) + currentRange.RangeEnd = protowire.DecodeBool(b) } } + if hasContent { + // Store the offsets in the map, keyed by the ReadId of the current range. + d.dataOffsets[currentRange.ReadRange.GetReadId()] = contentOffsets + } case fieldNum == metadataField && fieldType == protowire.BytesType: msg.Metadata = &storagepb.Object{} buf, err := d.consumeBytesCopy() if err != nil { - return fmt.Errorf("invalid BidiReadObjectResponse.Metadata: %v", err) + return fmt.Errorf("invalid BidiReadObjectResponse.Metadata: %w", err) } if err := proto.Unmarshal(buf, msg.Metadata); err != nil { @@ -2507,7 +2563,7 @@ func (d *readResponseDecoder) readFullObjectResponse() error { msg.ReadHandle = &storagepb.BidiReadHandle{} buf, err := d.consumeBytesCopy() if err != nil { - return fmt.Errorf("invalid BidiReadObjectResponse.ReadHandle: %v", err) + return fmt.Errorf("invalid BidiReadObjectResponse.ReadHandle: %w", err) } if err := proto.Unmarshal(buf, msg.ReadHandle); err != nil { @@ -2540,411 +2596,3 @@ func (r *gRPCReader) reopenStream() error { r.cancel = cancel return nil } - -func newGRPCWriter(c *grpcStorageClient, s *settings, params *openWriterParams, r io.Reader) (*gRPCWriter, error) { - if params.attrs.Retention != nil { - // TO-DO: remove once ObjectRetention is available - see b/308194853 - return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC") - } - - size := googleapi.MinUploadChunkSize - // A completely bufferless upload (params.chunkSize <= 0) is not possible in - // gRPC because the buffer must be provided to the message. Use the minimum - // size possible. - if params.chunkSize > 0 { - size = params.chunkSize - } - - // Round up chunksize to nearest 256KiB - if size%googleapi.MinUploadChunkSize != 0 { - size += googleapi.MinUploadChunkSize - (size % googleapi.MinUploadChunkSize) - } - - if s.userProject != "" { - params.ctx = setUserProjectMetadata(params.ctx, s.userProject) - } - - spec := &storagepb.WriteObjectSpec{ - Resource: params.attrs.toProtoObject(params.bucket), - Appendable: proto.Bool(params.append), - } - // WriteObject doesn't support the generation condition, so use default. - if err := applyCondsProto("WriteObject", defaultGen, params.conds, spec); err != nil { - return nil, err - } - - return &gRPCWriter{ - buf: make([]byte, size), - c: c, - ctx: params.ctx, - reader: r, - bucket: params.bucket, - attrs: params.attrs, - conds: params.conds, - spec: spec, - encryptionKey: params.encryptionKey, - settings: s, - progress: params.progress, - sendCRC32C: params.sendCRC32C, - forceOneShot: params.chunkSize <= 0, - forceEmptyContentType: params.forceEmptyContentType, - append: params.append, - }, nil -} - -// gRPCWriter is a wrapper around the the gRPC client-stream API that manages -// sending chunks of data provided by the user over the stream. -type gRPCWriter struct { - c *grpcStorageClient - buf []byte - reader io.Reader - - ctx context.Context - - bucket string - attrs *ObjectAttrs - conds *Conditions - spec *storagepb.WriteObjectSpec - encryptionKey []byte - settings *settings - progress func(int64) - - sendCRC32C bool - forceOneShot bool - forceEmptyContentType bool - append bool - - streamSender gRPCBidiWriteBufferSender -} - -func bucketContext(ctx context.Context, bucket string) context.Context { - hds := []string{"x-goog-request-params", fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(bucket))} - return gax.InsertMetadataIntoOutgoingContext(ctx, hds...) -} - -// drainInboundStream calls stream.Recv() repeatedly until an error is returned. -// It returns the last Resource received on the stream, or nil if no Resource -// was returned. drainInboundStream always returns a non-nil error. io.EOF -// indicates all messages were successfully read. -func drainInboundStream(stream storagepb.Storage_BidiWriteObjectClient) (object *storagepb.Object, err error) { - for err == nil { - var resp *storagepb.BidiWriteObjectResponse - resp, err = stream.Recv() - // GetResource() returns nil on a nil response - if resp.GetResource() != nil { - object = resp.GetResource() - } - } - return object, err -} - -func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *storagepb.BidiWriteObjectRequest { - return &storagepb.BidiWriteObjectRequest{ - Data: &storagepb.BidiWriteObjectRequest_ChecksummedData{ - ChecksummedData: &storagepb.ChecksummedData{ - Content: buf, - }, - }, - WriteOffset: offset, - FinishWrite: finishWrite, - Flush: flush, - StateLookup: flush, - } -} - -type gRPCBidiWriteBufferSender interface { - // sendBuffer implementations should upload buf, respecting flush and - // finishWrite. Callers must guarantee that buf is not too long to fit in a - // gRPC message. - // - // If flush is true, implementations must not return until the data in buf is - // stable. If finishWrite is true, implementations must return the object on - // success. - sendBuffer(buf []byte, offset int64, flush, finishWrite bool) (*storagepb.Object, error) -} - -type gRPCOneshotBidiWriteBufferSender struct { - ctx context.Context - firstMessage *storagepb.BidiWriteObjectRequest - raw *gapic.Client - stream storagepb.Storage_BidiWriteObjectClient - settings *settings -} - -func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() (*gRPCOneshotBidiWriteBufferSender, error) { - firstMessage := &storagepb.BidiWriteObjectRequest{ - FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{ - WriteObjectSpec: w.spec, - }, - CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), - // For a non-resumable upload, checksums must be sent in this message. - // TODO: Currently the checksums are only sent on the first message - // of the stream, but in the future, we must also support sending it - // on the *last* message of the stream (instead of the first). - ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), - } - - return &gRPCOneshotBidiWriteBufferSender{ - ctx: bucketContext(w.ctx, w.bucket), - firstMessage: firstMessage, - raw: w.c.raw, - settings: w.settings, - }, nil -} - -func (s *gRPCOneshotBidiWriteBufferSender) sendBuffer(buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) { - var firstMessage *storagepb.BidiWriteObjectRequest - if s.stream == nil { - s.stream, err = s.raw.BidiWriteObject(s.ctx, s.settings.gax...) - if err != nil { - return - } - firstMessage = s.firstMessage - } - req := bidiWriteObjectRequest(buf, offset, flush, finishWrite) - if firstMessage != nil { - proto.Merge(req, firstMessage) - } - - sendErr := s.stream.Send(req) - if sendErr != nil { - obj, err = drainInboundStream(s.stream) - s.stream = nil - if sendErr != io.EOF { - err = sendErr - } - return - } - // Oneshot uploads assume all flushes succeed - - if finishWrite { - s.stream.CloseSend() - // Oneshot uploads only read from the response stream on completion or - // failure - obj, err = drainInboundStream(s.stream) - s.stream = nil - if err == io.EOF { - err = nil - } - } - return -} - -type gRPCResumableBidiWriteBufferSender struct { - ctx context.Context - queryRetry *retryConfig - upid string - progress func(int64) - raw *gapic.Client - forceFirstMessage bool - stream storagepb.Storage_BidiWriteObjectClient - flushOffset int64 - settings *settings -} - -func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender() (*gRPCResumableBidiWriteBufferSender, error) { - req := &storagepb.StartResumableWriteRequest{ - WriteObjectSpec: w.spec, - CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), - // TODO: Currently the checksums are only sent on the request to initialize - // the upload, but in the future, we must also support sending it - // on the *last* message of the stream. - ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), - } - - ctx := bucketContext(w.ctx, w.bucket) - var upid string - err := run(ctx, func(ctx context.Context) error { - upres, err := w.c.raw.StartResumableWrite(ctx, req, w.settings.gax...) - upid = upres.GetUploadId() - return err - }, w.settings.retry, w.settings.idempotent) - if err != nil { - return nil, err - } - - // Set up an initial connection for the 0 offset, so we don't query state - // unnecessarily for the first buffer. If we fail, we'll just retry in the - // normal connect path. - stream, err := w.c.raw.BidiWriteObject(ctx, w.settings.gax...) - if err != nil { - stream = nil - } - - return &gRPCResumableBidiWriteBufferSender{ - ctx: ctx, - queryRetry: w.settings.retry, - upid: upid, - progress: w.progress, - raw: w.c.raw, - forceFirstMessage: true, - stream: stream, - settings: w.settings, - }, nil -} - -// queryProgress is a helper that queries the status of the resumable upload -// associated with the given upload ID. -func (s *gRPCResumableBidiWriteBufferSender) queryProgress() (int64, error) { - var persistedSize int64 - err := run(s.ctx, func(ctx context.Context) error { - q, err := s.raw.QueryWriteStatus(ctx, &storagepb.QueryWriteStatusRequest{ - UploadId: s.upid, - }, s.settings.gax...) - // q.GetPersistedSize() will return 0 if q is nil. - persistedSize = q.GetPersistedSize() - return err - }, s.queryRetry, true) - - return persistedSize, err -} - -func (s *gRPCResumableBidiWriteBufferSender) sendBuffer(buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) { - reconnected := false - if s.stream == nil { - // Determine offset and reconnect - s.flushOffset, err = s.queryProgress() - if err != nil { - return - } - s.stream, err = s.raw.BidiWriteObject(s.ctx, s.settings.gax...) - if err != nil { - return - } - reconnected = true - } - - // clean up buf. We'll still write the message if a flush/finishWrite was - // requested. - if offset < s.flushOffset { - trim := s.flushOffset - offset - if int64(len(buf)) <= trim { - trim = int64(len(buf)) - } - buf = buf[trim:] - } - if len(buf) == 0 && !flush && !finishWrite { - // no need to send anything - return nil, nil - } - - req := bidiWriteObjectRequest(buf, offset, flush, finishWrite) - if s.forceFirstMessage || reconnected { - req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid} - s.forceFirstMessage = false - } - - sendErr := s.stream.Send(req) - if sendErr != nil { - obj, err = drainInboundStream(s.stream) - s.stream = nil - if err == io.EOF { - // This is unexpected - we got an error on Send(), but not on Recv(). - // Bubble up the sendErr. - err = sendErr - } - return - } - - if finishWrite { - s.stream.CloseSend() - obj, err = drainInboundStream(s.stream) - s.stream = nil - if err == io.EOF { - err = nil - if obj.GetSize() > s.flushOffset { - s.progress(obj.GetSize()) - } - } - return - } - - if flush { - resp, err := s.stream.Recv() - if err != nil { - return nil, err - } - persistedOffset := resp.GetPersistedSize() - if persistedOffset > s.flushOffset { - s.flushOffset = persistedOffset - s.progress(s.flushOffset) - } - } - return -} - -// uploadBuffer uploads the buffer at the given offset using a bi-directional -// Write stream. It will open a new stream if necessary (on the first call or -// after resuming from failure) and chunk the buffer per maxPerMessageWriteSize. -// The final Object is returned on success if doneReading is true. -// -// Returns object and any error that is not retriable. -func (w *gRPCWriter) uploadBuffer(recvd int, start int64, doneReading bool) (obj *storagepb.Object, err error) { - if w.streamSender == nil { - if w.append { - // Appendable object semantics - w.streamSender, err = w.newGRPCAppendBidiWriteBufferSender() - } else if doneReading || w.forceOneShot { - // One shot semantics - w.streamSender, err = w.newGRPCOneshotBidiWriteBufferSender() - } else { - // Resumable write semantics - w.streamSender, err = w.newGRPCResumableBidiWriteBufferSender() - } - if err != nil { - return - } - } - - data := w.buf[:recvd] - offset := start - // We want to go through this loop at least once, in case we have to - // finishWrite with an empty buffer. - for { - // Send as much as we can fit into a single gRPC message. Only flush once, - // when sending the very last message. - l := maxPerMessageWriteSize - flush := false - if len(data) <= l { - l = len(data) - flush = true - } - obj, err = w.streamSender.sendBuffer(data[:l], offset, flush, flush && doneReading) - if err != nil { - return nil, err - } - data = data[l:] - offset += int64(l) - if len(data) == 0 { - break - } - } - return -} - -// read copies the data in the reader to the given buffer and reports how much -// data was read into the buffer and if there is no more data to read (EOF). -func (w *gRPCWriter) read() (int, bool, error) { - // Set n to -1 to start the Read loop. - var n, recvd int = -1, 0 - var err error - for err == nil && n != 0 { - // The routine blocks here until data is received. - n, err = w.reader.Read(w.buf[recvd:]) - recvd += n - } - var done bool - if err == io.EOF { - done = true - err = nil - } - return recvd, done, err -} - -func checkCanceled(err error) error { - if status.Code(err) == codes.Canceled { - return context.Canceled - } - - return err -} diff --git a/vendor/cloud.google.com/go/storage/grpc_reader.go b/vendor/cloud.google.com/go/storage/grpc_reader.go index e1dd397819b..14ec5048d8f 100644 --- a/vendor/cloud.google.com/go/storage/grpc_reader.go +++ b/vendor/cloud.google.com/go/storage/grpc_reader.go @@ -26,10 +26,8 @@ import ( "cloud.google.com/go/storage/internal/apiv2/storagepb" "github.com/googleapis/gax-go/v2" "google.golang.org/grpc" - "google.golang.org/grpc/codes" "google.golang.org/grpc/encoding" "google.golang.org/grpc/mem" - "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/proto" ) @@ -83,6 +81,7 @@ func (bytesCodecReadObject) Name() string { return "" } +// NewRangeReaderReadObject is the legacy (non-bidi) implementation of reads. func (c *grpcStorageClient) NewRangeReaderReadObject(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (r *Reader, err error) { ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewRangeReaderReadObject") defer func() { trace.EndSpan(ctx, err) }() @@ -146,13 +145,10 @@ func (c *grpcStorageClient) NewRangeReaderReadObject(ctx context.Context, params // use a custom decoder to avoid an extra copy at the protobuf layer. databufs := mem.BufferSlice{} err := stream.RecvMsg(&databufs) - // These types of errors show up on the Recv call, rather than the - // initialization of the stream via ReadObject above. - if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - return ErrObjectNotExist - } if err != nil { - return err + // NotFound types of errors show up on the Recv call, rather than the + // initialization of the stream via ReadObject above. + return formatObjectErr(err) } // Use a custom decoder that uses protobuf unmarshalling for all // fields except the object data. Object data is handled separately @@ -429,11 +425,7 @@ func (r *gRPCReadObjectReader) recv() error { databufs := mem.BufferSlice{} err := r.stream.RecvMsg(&databufs) - var shouldRetry = ShouldRetry - if r.settings.retry != nil && r.settings.retry.shouldRetry != nil { - shouldRetry = r.settings.retry.shouldRetry - } - if err != nil && shouldRetry(err) { + if err != nil && r.settings.retry.runShouldRetry(err) { // This will "close" the existing stream and immediately attempt to // reopen the stream, but will backoff if further attempts are necessary. // Reopening the stream Recvs the first message, so if retrying is @@ -780,7 +772,7 @@ func (d *readObjectResponseDecoder) readFullObjectResponse() error { bytesFieldLen, err := d.consumeVarint() if err != nil { - return fmt.Errorf("consuming bytes: %v", err) + return fmt.Errorf("consuming bytes: %w", err) } var contentEndOff = d.off + bytesFieldLen @@ -816,7 +808,7 @@ func (d *readObjectResponseDecoder) readFullObjectResponse() error { // Consume the bytes and copy them into a single buffer if they are split across buffers. buf, err := d.consumeBytesCopy() if err != nil { - return fmt.Errorf("invalid ReadObjectResponse.ObjectChecksums: %v", err) + return fmt.Errorf("invalid ReadObjectResponse.ObjectChecksums: %w", err) } // Unmarshal. if err := proto.Unmarshal(buf, msg.ObjectChecksums); err != nil { @@ -826,7 +818,7 @@ func (d *readObjectResponseDecoder) readFullObjectResponse() error { msg.ContentRange = &storagepb.ContentRange{} buf, err := d.consumeBytesCopy() if err != nil { - return fmt.Errorf("invalid ReadObjectResponse.ContentRange: %v", err) + return fmt.Errorf("invalid ReadObjectResponse.ContentRange: %w", err) } if err := proto.Unmarshal(buf, msg.ContentRange); err != nil { return err @@ -836,7 +828,7 @@ func (d *readObjectResponseDecoder) readFullObjectResponse() error { buf, err := d.consumeBytesCopy() if err != nil { - return fmt.Errorf("invalid ReadObjectResponse.Metadata: %v", err) + return fmt.Errorf("invalid ReadObjectResponse.Metadata: %w", err) } if err := proto.Unmarshal(buf, msg.Metadata); err != nil { diff --git a/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go b/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go new file mode 100644 index 00000000000..14b78e1a1bd --- /dev/null +++ b/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go @@ -0,0 +1,40 @@ +// Copyright 2025 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. + +package storage + +import "sync" + +// readIDGenerator generates unique read IDs for multi-range reads. +// Call readIDGenerator.Next to get the next ID. Safe to be called concurrently. +type readIDGenerator struct { + initOnce sync.Once + nextID chan int64 // do not use this field directly +} + +func (g *readIDGenerator) init() { + g.nextID = make(chan int64, 1) + g.nextID <- 1 +} + +// Next returns the Next read ID. It initializes the readIDGenerator if needed. +func (g *readIDGenerator) Next() int64 { + g.initOnce.Do(g.init) + + id := <-g.nextID + n := id + 1 + g.nextID <- n + + return id +} diff --git a/vendor/cloud.google.com/go/storage/grpc_writer.go b/vendor/cloud.google.com/go/storage/grpc_writer.go index 9c8e8fc30e6..3d82e595172 100644 --- a/vendor/cloud.google.com/go/storage/grpc_writer.go +++ b/vendor/cloud.google.com/go/storage/grpc_writer.go @@ -19,17 +19,663 @@ import ( "errors" "fmt" "io" + "net/url" + "time" gapic "cloud.google.com/go/storage/internal/apiv2" "cloud.google.com/go/storage/internal/apiv2/storagepb" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" ) +const ( + // defaultWriteChunkRetryDeadline is the default deadline for the upload + // of a single chunk. It can be overwritten by Writer.ChunkRetryDeadline. + defaultWriteChunkRetryDeadline = 32 * time.Second + // maxPerMessageWriteSize is the maximum amount of content that can be sent + // per WriteObjectRequest message. A buffer reaching this amount will + // precipitate a flush of the buffer. It is only used by the gRPC Writer + // implementation. + maxPerMessageWriteSize int = int(storagepb.ServiceConstants_MAX_WRITE_CHUNK_BYTES) +) + +func withBidiWriteObjectRedirectionErrorRetries(s *settings) (newr *retryConfig) { + oldr := s.retry + newr = oldr.clone() + if newr == nil { + newr = &retryConfig{} + } + if (oldr.policy == RetryIdempotent && !s.idempotent) || oldr.policy == RetryNever { + // We still retry redirection errors even when settings indicate not to + // retry. + // + // The protocol requires us to respect redirection errors, so RetryNever has + // to ignore them. + // + // Idempotency is always protected by redirection errors: they either + // contain a handle which can be used as idempotency information, or they do + // not contain a handle and are "affirmative failures" which indicate that + // no server-side action occurred. + newr.policy = RetryAlways + newr.shouldRetry = func(err error) bool { + return errors.Is(err, bidiWriteObjectRedirectionError{}) + } + return newr + } + // If retry settings allow retries normally, fall back to that behavior. + newr.shouldRetry = func(err error) bool { + if errors.Is(err, bidiWriteObjectRedirectionError{}) { + return true + } + v := oldr.runShouldRetry(err) + return v + } + return newr +} + +type flushResult struct { + err error + offset int64 +} + +type gRPCInternalWriter struct { + flushSupported bool + flushInProgress bool + + pw *io.PipeWriter + + flushComplete chan flushResult +} + +func (giw *gRPCInternalWriter) Flush() (int64, error) { + if !giw.flushSupported { + return 0, errors.New("Flush is supported only if Writer.Append is set to true") + } + + giw.flushInProgress = true + giw.pw.Close() + + // Return the offset based on flushComplete. + r := <-giw.flushComplete + return r.offset, r.err +} + +// Forward other methods to *io.PipeWriter +func (giw *gRPCInternalWriter) Write(p []byte) (int, error) { + return giw.pw.Write(p) +} + +func (giw *gRPCInternalWriter) Close() error { + return giw.pw.Close() +} + +func (giw *gRPCInternalWriter) CloseWithError(err error) error { + return giw.pw.CloseWithError(err) +} + +func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (internalWriter, error) { + var offset int64 + errorf := params.setError + setObj := params.setObj + pr, pw := io.Pipe() + + s := callSettings(c.settings, opts...) + + retryDeadline := defaultWriteChunkRetryDeadline + if params.chunkRetryDeadline != 0 { + retryDeadline = params.chunkRetryDeadline + } + if s.retry == nil { + s.retry = defaultRetry.clone() + } + if params.append { + s.retry = withBidiWriteObjectRedirectionErrorRetries(s) + } + s.retry.maxRetryDuration = retryDeadline + + gw, err := newGRPCWriter(c, s, params, pr, pr, pw) + if err != nil { + errorf(err) + pr.CloseWithError(err) + close(params.donec) + return nil, err + } + + var o *storagepb.Object + + // If we are taking over an appendable object, send the first message here + // to get the append offset. + if params.append && params.appendGen >= 0 { + // Create the buffer sender. This opens a stream and blocks until we + // get a response that tells us what offset to write from. + wbs, err := gw.newGRPCAppendTakeoverWriteBufferSender(params.ctx) + if err != nil { + return nil, fmt.Errorf("storage: creating buffer sender: %w", err) + } + // Propagate append offset to caller and buffer sending logic below. + params.setTakeoverOffset(wbs.takeoverOffset) + offset = wbs.takeoverOffset + gw.streamSender = wbs + o = wbs.objResource + setObj(newObjectFromProto(o)) + } + + // This function reads the data sent to the pipe and sends sets of messages + // on the gRPC client-stream as the buffer is filled. + go func() { + err := func() error { + // Unless the user told us the content type, we have to determine it from + // the first read. + if params.attrs.ContentType == "" && !params.forceEmptyContentType { + gw.reader, gw.spec.Resource.ContentType = gax.DetermineContentType(gw.reader) + } + + // Loop until there is an error or the Object has been finalized. + for { + // Note: This blocks until either the buffer is full or EOF is read. + recvd, doneReading, err := gw.read() + if err != nil { + return err + } + + uploadBuff := func(ctx context.Context) error { + obj, err := gw.uploadBuffer(ctx, recvd, offset, doneReading) + if obj != nil { + o = obj + setObj(newObjectFromProto(o)) + } + return err + } + + // Add routing headers to the context metadata for single-shot and resumable + // writes. Append writes need to set this at a lower level to pass the routing + // token. + bctx := gw.ctx + if !gw.append { + bctx = bucketContext(bctx, gw.bucket) + } + err = run(bctx, uploadBuff, gw.settings.retry, s.idempotent) + offset += int64(recvd) + // If this buffer upload was triggered by a flush, reset and + // communicate back the result. + if gw.iw.flushInProgress { + gw.setSize(offset) + gw.iw.flushInProgress = false + gw.iw.flushComplete <- flushResult{offset: offset, err: err} + } + if err != nil { + return err + } + // When we are done reading data without errors, set the object and + // finish. + if doneReading { + // Build Object from server's response. + setObj(newObjectFromProto(o)) + return nil + } + } + }() + + // These calls are still valid if err is nil + err = checkCanceled(err) + errorf(err) + gw.pr.CloseWithError(err) + close(params.donec) + }() + + return gw.iw, nil +} + +func newGRPCWriter(c *grpcStorageClient, s *settings, params *openWriterParams, r io.Reader, pr *io.PipeReader, pw *io.PipeWriter) (*gRPCWriter, error) { + if params.attrs.Retention != nil { + // TO-DO: remove once ObjectRetention is available - see b/308194853 + return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC") + } + + size := googleapi.MinUploadChunkSize + // A completely bufferless upload (params.chunkSize <= 0) is not possible in + // gRPC because the buffer must be provided to the message. Use the minimum + // size possible. + if params.chunkSize > 0 { + size = params.chunkSize + } + + // Round up chunksize to nearest 256KiB + if size%googleapi.MinUploadChunkSize != 0 { + size += googleapi.MinUploadChunkSize - (size % googleapi.MinUploadChunkSize) + } + + if s.userProject != "" { + params.ctx = setUserProjectMetadata(params.ctx, s.userProject) + } + + spec := &storagepb.WriteObjectSpec{ + Resource: params.attrs.toProtoObject(params.bucket), + Appendable: proto.Bool(params.append), + } + var appendSpec *storagepb.AppendObjectSpec + if params.append && params.appendGen >= 0 { + appendSpec = &storagepb.AppendObjectSpec{ + Bucket: bucketResourceName(globalProjectAlias, params.bucket), + Object: params.attrs.Name, + Generation: params.appendGen, + } + } + // WriteObject doesn't support the generation condition, so use default. + if err := applyCondsProto("WriteObject", defaultGen, params.conds, spec); err != nil { + return nil, err + } + + return &gRPCWriter{ + buf: make([]byte, size), + c: c, + ctx: params.ctx, + reader: r, + pr: pr, + iw: &gRPCInternalWriter{ + flushSupported: params.append, + flushInProgress: false, + pw: pw, + flushComplete: make(chan flushResult), + }, + bucket: params.bucket, + attrs: params.attrs, + conds: params.conds, + spec: spec, + appendSpec: appendSpec, + encryptionKey: params.encryptionKey, + settings: s, + progress: params.progress, + setSize: params.setSize, + sendCRC32C: params.sendCRC32C, + forceOneShot: params.chunkSize <= 0, + forceEmptyContentType: params.forceEmptyContentType, + append: params.append, + finalizeOnClose: params.finalizeOnClose, + }, nil +} + +// gRPCWriter is a wrapper around the the gRPC client-stream API that manages +// sending chunks of data provided by the user over the stream. +type gRPCWriter struct { + c *grpcStorageClient + buf []byte + reader io.Reader + pr *io.PipeReader // Keep track of pr to update post-flush + iw *gRPCInternalWriter + + ctx context.Context + + bucket string + attrs *ObjectAttrs + conds *Conditions + spec *storagepb.WriteObjectSpec + appendSpec *storagepb.AppendObjectSpec + encryptionKey []byte + settings *settings + progress func(int64) + setSize func(int64) + + sendCRC32C bool + forceOneShot bool + forceEmptyContentType bool + append bool + finalizeOnClose bool + + streamSender gRPCBidiWriteBufferSender +} + +func bucketContext(ctx context.Context, bucket string) context.Context { + hds := []string{"x-goog-request-params", fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(bucket))} + return gax.InsertMetadataIntoOutgoingContext(ctx, hds...) +} + +// drainInboundStream calls stream.Recv() repeatedly until an error is returned. +// It returns the last Resource received on the stream, or nil if no Resource +// was returned. drainInboundStream always returns a non-nil error. io.EOF +// indicates all messages were successfully read. +func drainInboundStream(stream storagepb.Storage_BidiWriteObjectClient) (object *storagepb.Object, err error) { + for err == nil { + var resp *storagepb.BidiWriteObjectResponse + resp, err = stream.Recv() + // GetResource() returns nil on a nil response + if resp.GetResource() != nil { + object = resp.GetResource() + } + } + return object, err +} + +func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *storagepb.BidiWriteObjectRequest { + var data *storagepb.BidiWriteObjectRequest_ChecksummedData + if buf != nil { + data = &storagepb.BidiWriteObjectRequest_ChecksummedData{ + ChecksummedData: &storagepb.ChecksummedData{ + Content: buf, + }, + } + } + req := &storagepb.BidiWriteObjectRequest{ + Data: data, + WriteOffset: offset, + FinishWrite: finishWrite, + Flush: flush, + StateLookup: flush, + } + return req +} + +type gRPCBidiWriteBufferSender interface { + // sendBuffer implementations should upload buf, respecting flush and + // finishWrite. Callers must guarantee that buf is not too long to fit in a + // gRPC message. + // + // If flush is true, implementations must not return until the data in buf is + // stable. If finishWrite is true, implementations must return the object on + // success. + sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (*storagepb.Object, error) +} + +type gRPCOneshotBidiWriteBufferSender struct { + firstMessage *storagepb.BidiWriteObjectRequest + raw *gapic.Client + stream storagepb.Storage_BidiWriteObjectClient + settings *settings +} + +func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() (*gRPCOneshotBidiWriteBufferSender, error) { + firstMessage := &storagepb.BidiWriteObjectRequest{ + FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{ + WriteObjectSpec: w.spec, + }, + CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), + // For a non-resumable upload, checksums must be sent in this message. + // TODO: Currently the checksums are only sent on the first message + // of the stream, but in the future, we must also support sending it + // on the *last* message of the stream (instead of the first). + ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + } + + return &gRPCOneshotBidiWriteBufferSender{ + firstMessage: firstMessage, + raw: w.c.raw, + settings: w.settings, + }, nil +} + +func (s *gRPCOneshotBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) { + var firstMessage *storagepb.BidiWriteObjectRequest + if s.stream == nil { + s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...) + if err != nil { + return + } + firstMessage = s.firstMessage + } + req := bidiWriteObjectRequest(buf, offset, flush, finishWrite) + if firstMessage != nil { + proto.Merge(req, firstMessage) + } + + sendErr := s.stream.Send(req) + if sendErr != nil { + obj, err = drainInboundStream(s.stream) + s.stream = nil + if sendErr != io.EOF { + err = sendErr + } + return + } + // Oneshot uploads assume all flushes succeed + + if finishWrite { + s.stream.CloseSend() + // Oneshot uploads only read from the response stream on completion or + // failure + obj, err = drainInboundStream(s.stream) + s.stream = nil + if err == io.EOF { + err = nil + } + } + return +} + +type gRPCResumableBidiWriteBufferSender struct { + queryRetry *retryConfig + upid string + progress func(int64) + raw *gapic.Client + forceFirstMessage bool + stream storagepb.Storage_BidiWriteObjectClient + flushOffset int64 + settings *settings +} + +func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender(ctx context.Context) (*gRPCResumableBidiWriteBufferSender, error) { + req := &storagepb.StartResumableWriteRequest{ + WriteObjectSpec: w.spec, + CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), + // TODO: Currently the checksums are only sent on the request to initialize + // the upload, but in the future, we must also support sending it + // on the *last* message of the stream. + ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + } + + var upid string + err := run(ctx, func(ctx context.Context) error { + upres, err := w.c.raw.StartResumableWrite(ctx, req, w.settings.gax...) + upid = upres.GetUploadId() + return err + }, w.settings.retry, w.settings.idempotent) + if err != nil { + return nil, err + } + + // Set up an initial connection for the 0 offset, so we don't query state + // unnecessarily for the first buffer. If we fail, we'll just retry in the + // normal connect path. + stream, err := w.c.raw.BidiWriteObject(ctx, w.settings.gax...) + if err != nil { + stream = nil + } + + return &gRPCResumableBidiWriteBufferSender{ + queryRetry: w.settings.retry, + upid: upid, + progress: w.progress, + raw: w.c.raw, + forceFirstMessage: true, + stream: stream, + settings: w.settings, + }, nil +} + +// queryProgress is a helper that queries the status of the resumable upload +// associated with the given upload ID. +func (s *gRPCResumableBidiWriteBufferSender) queryProgress(ctx context.Context) (int64, error) { + var persistedSize int64 + err := run(ctx, func(ctx context.Context) error { + q, err := s.raw.QueryWriteStatus(ctx, &storagepb.QueryWriteStatusRequest{ + UploadId: s.upid, + }, s.settings.gax...) + // q.GetPersistedSize() will return 0 if q is nil. + persistedSize = q.GetPersistedSize() + return err + }, s.queryRetry, true) + + return persistedSize, err +} + +func (s *gRPCResumableBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) { + if s.stream == nil { + // Determine offset and reconnect + s.flushOffset, err = s.queryProgress(ctx) + if err != nil { + return + } + s.stream, err = s.raw.BidiWriteObject(ctx, s.settings.gax...) + if err != nil { + return + } + s.forceFirstMessage = true + } + + // clean up buf. We'll still write the message if a flush/finishWrite was + // requested. + if offset < s.flushOffset { + trim := s.flushOffset - offset + if int64(len(buf)) <= trim { + trim = int64(len(buf)) + } + buf = buf[trim:] + offset += trim + } + if len(buf) == 0 && !flush && !finishWrite { + // no need to send anything + return nil, nil + } + + req := bidiWriteObjectRequest(buf, offset, flush, finishWrite) + if s.forceFirstMessage { + req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid} + s.forceFirstMessage = false + } + + sendErr := s.stream.Send(req) + if sendErr != nil { + obj, err = drainInboundStream(s.stream) + s.stream = nil + if err == io.EOF { + // This is unexpected - we got an error on Send(), but not on Recv(). + // Bubble up the sendErr. + err = sendErr + } + return + } + + if finishWrite { + s.stream.CloseSend() + obj, err = drainInboundStream(s.stream) + s.stream = nil + if err == io.EOF { + err = nil + if obj.GetSize() > s.flushOffset { + s.progress(obj.GetSize()) + } + } + return + } + + if flush { + resp, err := s.stream.Recv() + if err != nil { + return nil, err + } + persistedOffset := resp.GetPersistedSize() + if persistedOffset > s.flushOffset { + s.flushOffset = persistedOffset + s.progress(s.flushOffset) + } + } + return +} + +// uploadBuffer uploads the buffer at the given offset using a bi-directional +// Write stream. It will open a new stream if necessary (on the first call or +// after resuming from failure) and chunk the buffer per maxPerMessageWriteSize. +// The final Object is returned on success if doneReading is true. +// +// Returns object and any error that is not retriable. +func (w *gRPCWriter) uploadBuffer(ctx context.Context, recvd int, start int64, doneReading bool) (obj *storagepb.Object, err error) { + if w.streamSender == nil { + if w.append { + // Appendable object semantics + w.streamSender, err = w.newGRPCAppendableObjectBufferSender() + } else if doneReading || w.forceOneShot { + // One shot semantics + w.streamSender, err = w.newGRPCOneshotBidiWriteBufferSender() + } else { + // Resumable write semantics + w.streamSender, err = w.newGRPCResumableBidiWriteBufferSender(ctx) + } + if err != nil { + return + } + } + + data := w.buf[:recvd] + offset := start + // We want to go through this loop at least once, in case we have to + // finishWrite with an empty buffer. + for { + // Send as much as we can fit into a single gRPC message. Only flush once, + // when sending the very last message. + l := maxPerMessageWriteSize + flush := false + if len(data) <= l { + l = len(data) + flush = true + } + obj, err = w.streamSender.sendBuffer(ctx, data[:l], offset, flush, flush && doneReading) + if err != nil { + return nil, err + } + data = data[l:] + offset += int64(l) + if len(data) == 0 { + // Update object size to match persisted offset. + if obj != nil { + obj.Size = offset + } + break + } + } + return +} + +// read copies the data in the reader to the given buffer and reports how much +// data was read into the buffer and if there is no more data to read (EOF). +// read returns when either 1. the buffer is full, 2. Writer.Flush was called, +// or 3. Writer.Close was called. +func (w *gRPCWriter) read() (int, bool, error) { + // Set n to -1 to start the Read loop. + var n, recvd int = -1, 0 + var err error + for err == nil && n != 0 { + // The routine blocks here until data is received. + n, err = w.reader.Read(w.buf[recvd:]) + recvd += n + } + var done bool + if err == io.EOF { + err = nil + // EOF can come from Writer.Flush or Writer.Close. + if w.iw.flushInProgress { + // Reset pipe for additional writes after the flush. + pr, pw := io.Pipe() + w.reader = pr + w.pr = pr + w.iw.pw = pw + } else { + done = true + } + } + return recvd, done, err +} + +func checkCanceled(err error) error { + if status.Code(err) == codes.Canceled { + return context.Canceled + } + + return err +} + type gRPCAppendBidiWriteBufferSender struct { - ctx context.Context bucket string routingToken *string raw *gapic.Client @@ -38,8 +684,13 @@ type gRPCAppendBidiWriteBufferSender struct { firstMessage *storagepb.BidiWriteObjectRequest objectChecksums *storagepb.ObjectChecksums + finalizeOnClose bool + forceFirstMessage bool + progress func(int64) flushOffset int64 + takeoverOffset int64 + objResource *storagepb.Object // Captures received obj to set w.Attrs. // Fields used to report responses from the receive side of the stream // recvs is closed when the current recv goroutine is complete. recvErr is set @@ -48,12 +699,12 @@ type gRPCAppendBidiWriteBufferSender struct { recvErr error } -func (w *gRPCWriter) newGRPCAppendBidiWriteBufferSender() (*gRPCAppendBidiWriteBufferSender, error) { +// Use for a newly created appendable object. +func (w *gRPCWriter) newGRPCAppendableObjectBufferSender() (*gRPCAppendBidiWriteBufferSender, error) { s := &gRPCAppendBidiWriteBufferSender{ - ctx: w.ctx, bucket: w.spec.GetResource().GetBucket(), raw: w.c.raw, - settings: w.c.settings, + settings: w.settings, firstMessage: &storagepb.BidiWriteObjectRequest{ FirstMessage: &storagepb.BidiWriteObjectRequest_WriteObjectSpec{ WriteObjectSpec: w.spec, @@ -61,12 +712,53 @@ func (w *gRPCWriter) newGRPCAppendBidiWriteBufferSender() (*gRPCAppendBidiWriteB CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), }, objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + finalizeOnClose: w.finalizeOnClose, + forceFirstMessage: true, + progress: w.progress, + flushOffset: -1, // We should ack flushes to length 0. + } + return s, nil +} + +// Use for a takeover of an appendable object. +// Unlike newGRPCAppendableObjectBufferSender, this blocks until the stream is +// open because it needs to get the append offset from the server. +func (w *gRPCWriter) newGRPCAppendTakeoverWriteBufferSender(ctx context.Context) (*gRPCAppendBidiWriteBufferSender, error) { + s := &gRPCAppendBidiWriteBufferSender{ + bucket: w.spec.GetResource().GetBucket(), + raw: w.c.raw, + settings: w.settings, + firstMessage: &storagepb.BidiWriteObjectRequest{ + FirstMessage: &storagepb.BidiWriteObjectRequest_AppendObjectSpec{ + AppendObjectSpec: w.appendSpec, + }, + }, + objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + finalizeOnClose: w.finalizeOnClose, forceFirstMessage: true, + progress: w.progress, + } + if err := s.connect(ctx); err != nil { + return nil, fmt.Errorf("storage: opening appendable write stream: %w", err) } + _, err := s.sendOnConnectedStream(nil, 0, false, false, true) + if err != nil { + return nil, err + } + firstResp := <-s.recvs + // Check recvErr after getting the response. + if s.recvErr != nil { + return nil, s.recvErr + } + + // Object resource is returned in the first response on takeover, so capture + // this now. + s.objResource = firstResp.GetResource() + s.takeoverOffset = firstResp.GetResource().GetSize() return s, nil } -func (s *gRPCAppendBidiWriteBufferSender) connect() (err error) { +func (s *gRPCAppendBidiWriteBufferSender) connect(ctx context.Context) (err error) { err = func() error { // If this is a forced first message, we've already determined it's safe to // send. @@ -80,6 +772,14 @@ func (s *gRPCAppendBidiWriteBufferSender) connect() (err error) { if s.firstMessage.GetAppendObjectSpec().GetWriteHandle() != nil { return nil } + // Also always okay to reconnect if there is a generation. + if s.firstMessage.GetAppendObjectSpec().GetGeneration() != 0 { + return nil + } + // Also always ok to reconnect if we've seen a redirect token + if s.routingToken != nil { + return nil + } // We can also reconnect if the first message has an if_generation_match or // if_metageneration_match condition. Note that negative conditions like @@ -105,7 +805,7 @@ func (s *gRPCAppendBidiWriteBufferSender) connect() (err error) { return err } - return s.startReceiver() + return s.startReceiver(ctx) } func (s *gRPCAppendBidiWriteBufferSender) withRequestParams(ctx context.Context) context.Context { @@ -113,11 +813,11 @@ func (s *gRPCAppendBidiWriteBufferSender) withRequestParams(ctx context.Context) if s.routingToken != nil { param = param + fmt.Sprintf("&routing_token=%s", *s.routingToken) } - return gax.InsertMetadataIntoOutgoingContext(s.ctx, "x-goog-request-params", param) + return gax.InsertMetadataIntoOutgoingContext(ctx, "x-goog-request-params", param) } -func (s *gRPCAppendBidiWriteBufferSender) startReceiver() (err error) { - s.stream, err = s.raw.BidiWriteObject(s.withRequestParams(s.ctx), s.settings.gax...) +func (s *gRPCAppendBidiWriteBufferSender) startReceiver(ctx context.Context) (err error) { + s.stream, err = s.raw.BidiWriteObject(s.withRequestParams(ctx), s.settings.gax...) if err != nil { return } @@ -162,7 +862,7 @@ func (s *gRPCAppendBidiWriteBufferSender) maybeUpdateFirstMessage(resp *storagep type bidiWriteObjectRedirectionError struct{} func (e bidiWriteObjectRedirectionError) Error() string { - return "BidiWriteObjectRedirectedError" + return "" } func (s *gRPCAppendBidiWriteBufferSender) handleRedirectionError(e *storagepb.BidiWriteObjectRedirectedError) bool { @@ -207,10 +907,10 @@ func (s *gRPCAppendBidiWriteBufferSender) receiveMessages(resps chan<- *storagep if st, ok := status.FromError(err); ok && st.Code() == codes.Aborted { for _, d := range st.Details() { if e, ok := d.(*storagepb.BidiWriteObjectRedirectedError); ok { - // If we can handle this error, replace it with the sentinel. Otherwise, - // report it to the user. + // If we can handle this error, wrap it with the sentinel so it gets + // retried. if ok := s.handleRedirectionError(e); ok { - err = bidiWriteObjectRedirectionError{} + err = fmt.Errorf("%w%w", bidiWriteObjectRedirectionError{}, err) } } } @@ -223,9 +923,16 @@ func (s *gRPCAppendBidiWriteBufferSender) receiveMessages(resps chan<- *storagep } func (s *gRPCAppendBidiWriteBufferSender) sendOnConnectedStream(buf []byte, offset int64, flush, finishWrite, sendFirstMessage bool) (obj *storagepb.Object, err error) { - req := bidiWriteObjectRequest(buf, offset, flush, finishWrite) + var req *storagepb.BidiWriteObjectRequest + finalizeObject := finishWrite && s.finalizeOnClose if finishWrite { - // appendable objects pass checksums on the last message only + // Always flush when finishing the Write, even if not finalizing. + req = bidiWriteObjectRequest(buf, offset, true, finalizeObject) + } else { + req = bidiWriteObjectRequest(buf, offset, flush, false) + } + if finalizeObject { + // appendable objects pass checksums on the finalize message only req.ObjectChecksums = s.objectChecksums } if sendFirstMessage { @@ -242,46 +949,69 @@ func (s *gRPCAppendBidiWriteBufferSender) sendOnConnectedStream(buf []byte, offs if resp.GetResource() != nil { obj = resp.GetResource() } + // When closing the stream, update the object resource to reflect + // the persisted size. We get a new object from the stream if + // the object was finalized, but not if it's unfinalized. + if s.objResource != nil && resp.GetPersistedSize() > 0 { + s.objResource.Size = resp.GetPersistedSize() + } } if s.recvErr != io.EOF { return nil, s.recvErr } + if obj.GetSize() > s.flushOffset { + s.flushOffset = obj.GetSize() + s.progress(s.flushOffset) + } return } if flush { // We don't necessarily expect multiple responses for a single flush, but // this allows the server to send multiple responses if it wants to. - for s.flushOffset < offset+int64(len(buf)) { + flushOffset := s.flushOffset + + for flushOffset < offset+int64(len(buf)) { resp, ok := <-s.recvs if !ok { return nil, s.recvErr } pSize := resp.GetPersistedSize() rSize := resp.GetResource().GetSize() - if s.flushOffset < pSize { - s.flushOffset = pSize + if flushOffset < pSize { + flushOffset = pSize + } + if flushOffset < rSize { + flushOffset = rSize } - if s.flushOffset < rSize { - s.flushOffset = rSize + // On the first flush, we expect to get an object resource back and + // should return it. + if resp.GetResource() != nil { + obj = resp.GetResource() } } + if s.flushOffset < flushOffset { + s.flushOffset = flushOffset + s.progress(s.flushOffset) + } } - return } -func (s *gRPCAppendBidiWriteBufferSender) sendBuffer(buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) { +func (s *gRPCAppendBidiWriteBufferSender) sendBuffer(ctx context.Context, buf []byte, offset int64, flush, finishWrite bool) (obj *storagepb.Object, err error) { for { sendFirstMessage := false if s.stream == nil { sendFirstMessage = true - if err = s.connect(); err != nil { + if err = s.connect(ctx); err != nil { return } } obj, err = s.sendOnConnectedStream(buf, offset, flush, finishWrite, sendFirstMessage) + if obj != nil { + s.objResource = obj + } if err == nil { return } @@ -293,13 +1023,6 @@ func (s *gRPCAppendBidiWriteBufferSender) sendBuffer(buf []byte, offset int64, f err = s.recvErr } s.stream = nil - - // Retry transparently on a redirection error - if _, ok := err.(bidiWriteObjectRedirectionError); ok { - s.forceFirstMessage = true - continue - } - return } } diff --git a/vendor/cloud.google.com/go/storage/http_client.go b/vendor/cloud.google.com/go/storage/http_client.go index 61b20555f44..a4b601300dd 100644 --- a/vendor/cloud.google.com/go/storage/http_client.go +++ b/vendor/cloud.google.com/go/storage/http_client.go @@ -21,7 +21,6 @@ import ( "fmt" "hash/crc32" "io" - "io/ioutil" "log" "net/http" "net/url" @@ -31,24 +30,24 @@ import ( "strings" "time" + "cloud.google.com/go/auth" "cloud.google.com/go/iam/apiv1/iampb" "cloud.google.com/go/internal/optional" "cloud.google.com/go/internal/trace" + "github.com/google/uuid" "github.com/googleapis/gax-go/v2/callctx" - "golang.org/x/oauth2/google" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" raw "google.golang.org/api/storage/v1" - "google.golang.org/api/transport" htransport "google.golang.org/api/transport/http" ) // httpStorageClient is the HTTP-JSON API implementation of the transport-agnostic // storageClient interface. type httpStorageClient struct { - creds *google.Credentials + creds *auth.Credentials hc *http.Client xmlHost string raw *raw.Service @@ -65,7 +64,7 @@ func newHTTPStorageClient(ctx context.Context, opts ...storageOption) (storageCl o := s.clientOption config := newStorageConfig(o...) - var creds *google.Credentials + var creds *auth.Credentials // In general, it is recommended to use raw.NewService instead of htransport.NewClient // since raw.NewService configures the correct default endpoints when initializing the // internal http client. However, in our case, "NewRangeReader" in reader.go needs to @@ -83,10 +82,10 @@ func newHTTPStorageClient(ctx context.Context, opts ...storageOption) (storageCl ) // Don't error out here. The user may have passed in their own HTTP // client which does not auth with ADC or other common conventions. - c, err := transport.Creds(ctx, o...) + c, err := internaloption.AuthCreds(ctx, o) if err == nil { creds = c - o = append(o, internaloption.WithCredentials(creds)) + o = append(o, option.WithAuthCredentials(creds)) } } else { var hostURL *url.URL @@ -287,12 +286,8 @@ func (c *httpStorageClient) GetBucket(ctx context.Context, bucket string, conds return err }, s.retry, s.idempotent) - var e *googleapi.Error - if ok := errors.As(err, &e); ok && e.Code == http.StatusNotFound { - return nil, ErrBucketNotExist - } if err != nil { - return nil, err + return nil, formatBucketError(err) } return newBucket(resp) } @@ -348,6 +343,10 @@ func (c *httpStorageClient) ListObjects(ctx context.Context, bucket string, q *Q it.query = *q } fetch := func(pageSize int, pageToken string) (string, error) { + var err error + // Add trace span around List API call within the fetch. + ctx, _ = startSpan(ctx, "httpStorageClient.ObjectsListCall") + defer func() { endSpan(ctx, err) }() req := c.raw.Objects.List(bucket) if it.query.SoftDeleted { req.SoftDeleted(it.query.SoftDeleted) @@ -376,17 +375,12 @@ func (c *httpStorageClient) ListObjects(ctx context.Context, bucket string, q *Q req.MaxResults(int64(pageSize)) } var resp *raw.Objects - var err error err = run(it.ctx, func(ctx context.Context) error { resp, err = req.Context(ctx).Do() return err }, s.retry, s.idempotent) if err != nil { - var e *googleapi.Error - if ok := errors.As(err, &e); ok && e.Code == http.StatusNotFound { - err = ErrBucketNotExist - } - return "", err + return "", formatBucketError(err) } for _, item := range resp.Items { it.items = append(it.items, newObject(item)) @@ -416,11 +410,7 @@ func (c *httpStorageClient) DeleteObject(ctx context.Context, bucket, object str req.UserProject(s.userProject) } err := run(ctx, func(ctx context.Context) error { return req.Context(ctx).Do() }, s.retry, s.idempotent) - var e *googleapi.Error - if ok := errors.As(err, &e); ok && e.Code == http.StatusNotFound { - return ErrObjectNotExist - } - return err + return formatObjectErr(err) } func (c *httpStorageClient) GetObject(ctx context.Context, params *getObjectParams, opts ...storageOption) (*ObjectAttrs, error) { @@ -445,12 +435,8 @@ func (c *httpStorageClient) GetObject(ctx context.Context, params *getObjectPara obj, err = req.Context(ctx).Do() return err }, s.retry, s.idempotent) - var e *googleapi.Error - if ok := errors.As(err, &e); ok && e.Code == http.StatusNotFound { - return nil, ErrObjectNotExist - } if err != nil { - return nil, err + return nil, formatObjectErr(err) } return newObject(obj), nil } @@ -555,12 +541,8 @@ func (c *httpStorageClient) UpdateObject(ctx context.Context, params *updateObje var obj *raw.Object var err error err = run(ctx, func(ctx context.Context) error { obj, err = call.Context(ctx).Do(); return err }, s.retry, s.idempotent) - var e *googleapi.Error - if errors.As(err, &e) && e.Code == http.StatusNotFound { - return nil, ErrObjectNotExist - } if err != nil { - return nil, err + return nil, formatObjectErr(err) } return newObject(obj), nil } @@ -585,9 +567,8 @@ func (c *httpStorageClient) RestoreObject(ctx context.Context, params *restoreOb var obj *raw.Object var err error err = run(ctx, func(ctx context.Context) error { obj, err = req.Context(ctx).Do(); return err }, s.retry, s.idempotent) - var e *googleapi.Error - if ok := errors.As(err, &e); ok && e.Code == http.StatusNotFound { - return nil, ErrObjectNotExist + if err != nil { + return nil, formatObjectErr(err) } return newObject(obj), err } @@ -610,9 +591,8 @@ func (c *httpStorageClient) MoveObject(ctx context.Context, params *moveObjectPa var obj *raw.Object var err error err = run(ctx, func(ctx context.Context) error { obj, err = req.Context(ctx).Do(); return err }, s.retry, s.idempotent) - var e *googleapi.Error - if ok := errors.As(err, &e); ok && e.Code == http.StatusNotFound { - return nil, ErrObjectNotExist + if err != nil { + return nil, formatObjectErr(err) } return newObject(obj), err } @@ -800,7 +780,7 @@ func (c *httpStorageClient) ComposeObject(ctx context.Context, req *composeObjec retryCall := func(ctx context.Context) error { obj, err = call.Context(ctx).Do(); return err } if err := run(ctx, retryCall, s.retry, s.idempotent); err != nil { - return nil, err + return nil, formatObjectErr(err) } return newObject(obj), nil } @@ -847,7 +827,7 @@ func (c *httpStorageClient) RewriteObject(ctx context.Context, req *rewriteObjec retryCall := func(ctx context.Context) error { res, err = call.Context(ctx).Do(); return err } if err := run(ctx, retryCall, s.retry, s.idempotent); err != nil { - return nil, err + return nil, formatObjectErr(err) } r := &rewriteObjectResponse{ @@ -879,6 +859,7 @@ func (c *httpStorageClient) NewRangeReader(ctx context.Context, params *newRange } func (c *httpStorageClient) newRangeReaderXML(ctx context.Context, params *newRangeReaderParams, s *settings) (r *Reader, err error) { + requestID := uuid.New() u := &url.URL{ Scheme: c.scheme, Host: c.xmlHost, @@ -936,12 +917,13 @@ func (c *httpStorageClient) newRangeReaderXML(ctx context.Context, params *newRa timer := time.After(stallTimeout) select { case <-timer: - log.Printf("stalled read-req (%p) cancelled after %fs", req, stallTimeout.Seconds()) + log.Printf("[%s] stalled read-req cancelled after %fs", requestID, stallTimeout.Seconds()) cancel() - err = context.DeadlineExceeded + <-done if res != nil && res.Body != nil { res.Body.Close() } + return res, context.DeadlineExceeded case <-done: cancel = nil } @@ -981,7 +963,15 @@ func (c *httpStorageClient) newRangeReaderJSON(ctx context.Context, params *newR return parseReadResponse(res, params, reopen) } -func (c *httpStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (*io.PipeWriter, error) { +type httpInternalWriter struct { + *io.PipeWriter +} + +func (hiw httpInternalWriter) Flush() (int64, error) { + return 0, errors.New("Writer.Flush is only supported for gRPC-based clients") +} + +func (c *httpStorageClient) OpenWriter(params *openWriterParams, opts ...storageOption) (internalWriter, error) { if params.append { return nil, errors.New("storage: append not supported on HTTP Client; use gRPC") } @@ -1074,7 +1064,7 @@ func (c *httpStorageClient) OpenWriter(params *openWriterParams, opts ...storage setObj(newObject(resp)) }() - return pw, nil + return httpInternalWriter{pw}, nil } // IAM methods. @@ -1273,9 +1263,6 @@ func (c *httpStorageClient) DeleteHMACKey(ctx context.Context, project string, a // Note: This API does not support pagination. However, entity limits cap the number of notifications on a single bucket, // so all results will be returned in the first response. See https://cloud.google.com/storage/quotas#buckets. func (c *httpStorageClient) ListNotifications(ctx context.Context, bucket string, opts ...storageOption) (n map[string]*Notification, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.httpStorageClient.ListNotifications") - defer func() { trace.EndSpan(ctx, err) }() - s := callSettings(c.settings, opts...) call := c.raw.Notifications.List(bucket) if s.userProject != "" { @@ -1293,9 +1280,6 @@ func (c *httpStorageClient) ListNotifications(ctx context.Context, bucket string } func (c *httpStorageClient) CreateNotification(ctx context.Context, bucket string, n *Notification, opts ...storageOption) (ret *Notification, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.httpStorageClient.CreateNotification") - defer func() { trace.EndSpan(ctx, err) }() - s := callSettings(c.settings, opts...) call := c.raw.Notifications.Insert(bucket, toRawNotification(n)) if s.userProject != "" { @@ -1313,9 +1297,6 @@ func (c *httpStorageClient) CreateNotification(ctx context.Context, bucket strin } func (c *httpStorageClient) DeleteNotification(ctx context.Context, bucket string, id string, opts ...storageOption) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.httpStorageClient.DeleteNotification") - defer func() { trace.EndSpan(ctx, err) }() - s := callSettings(c.settings, opts...) call := c.raw.Notifications.Delete(bucket, id) if s.userProject != "" { @@ -1420,13 +1401,7 @@ func readerReopen(ctx context.Context, header http.Header, params *newRangeReade err = run(ctx, func(ctx context.Context) error { res, err = doDownload(ctx) if err != nil { - var e *googleapi.Error - if errors.As(err, &e) { - if e.Code == http.StatusNotFound { - return ErrObjectNotExist - } - } - return err + return formatObjectErr(err) } if res.StatusCode == http.StatusNotFound { @@ -1435,7 +1410,7 @@ func readerReopen(ctx context.Context, header http.Header, params *newRangeReade return ErrObjectNotExist } if res.StatusCode < 200 || res.StatusCode > 299 { - body, _ := ioutil.ReadAll(res.Body) + body, _ := io.ReadAll(res.Body) res.Body.Close() return &googleapi.Error{ Code: res.StatusCode, @@ -1459,7 +1434,7 @@ func readerReopen(ctx context.Context, header http.Header, params *newRangeReade // https://cloud.google.com/storage/docs/transcoding#range, // thus we have to manually move the body forward by seen bytes. if decompressiveTranscoding(res) && seen > 0 { - _, _ = io.CopyN(ioutil.Discard, res.Body, seen) + _, _ = io.CopyN(io.Discard, res.Body, seen) } // If a generation hasn't been specified, and this is the first response we get, let's record the diff --git a/vendor/cloud.google.com/go/storage/iam.go b/vendor/cloud.google.com/go/storage/iam.go index 4c01bff4f3d..9c9a3a87292 100644 --- a/vendor/cloud.google.com/go/storage/iam.go +++ b/vendor/cloud.google.com/go/storage/iam.go @@ -19,7 +19,6 @@ import ( "cloud.google.com/go/iam" "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/internal/trace" raw "google.golang.org/api/storage/v1" "google.golang.org/genproto/googleapis/type/expr" ) @@ -45,16 +44,16 @@ func (c *iamClient) Get(ctx context.Context, resource string) (p *iampb.Policy, } func (c *iamClient) GetWithVersion(ctx context.Context, resource string, requestedPolicyVersion int32) (p *iampb.Policy, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.IAM.Get") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "storage.IAM.Get") + defer func() { endSpan(ctx, err) }() o := makeStorageOpts(true, c.retry, c.userProject) return c.client.tc.GetIamPolicy(ctx, resource, requestedPolicyVersion, o...) } func (c *iamClient) Set(ctx context.Context, resource string, p *iampb.Policy) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.IAM.Set") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "storage.IAM.Set") + defer func() { endSpan(ctx, err) }() isIdempotent := len(p.Etag) > 0 o := makeStorageOpts(isIdempotent, c.retry, c.userProject) @@ -62,8 +61,8 @@ func (c *iamClient) Set(ctx context.Context, resource string, p *iampb.Policy) ( } func (c *iamClient) Test(ctx context.Context, resource string, perms []string) (permissions []string, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.IAM.Test") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "storage.IAM.Test") + defer func() { endSpan(ctx, err) }() o := makeStorageOpts(true, c.retry, c.userProject) return c.client.tc.TestIamPermissions(ctx, resource, perms, o...) diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/doc.go b/vendor/cloud.google.com/go/storage/internal/apiv2/doc.go index 502fa56786f..c46be7aa77b 100644 --- a/vendor/cloud.google.com/go/storage/internal/apiv2/doc.go +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/doc.go @@ -17,15 +17,7 @@ // Package storage is an auto-generated package for the // Cloud Storage API. // -// This folder contains protocol buffer definitions for an API only -// accessible to select customers. Customers not participating should not -// depend on this file. Please contact Google Cloud sales if you are -// interested. Unless told otherwise by a Google Cloud representative, do not -// use or otherwise rely on any of the contents of this folder. If you would -// like to use Cloud Storage, please consult our official documentation (at -// https://cloud.google.com/storage/docs/apis) for details on our XML and -// JSON APIs, or else consider one of our client libraries (at -// https://cloud.google.com/storage/docs/reference/libraries). +// Lets you store and retrieve potentially-large, immutable data objects. // // # General documentation // diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/helpers.go b/vendor/cloud.google.com/go/storage/internal/apiv2/helpers.go index 0de9b31f641..78116e92485 100644 --- a/vendor/cloud.google.com/go/storage/internal/apiv2/helpers.go +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/helpers.go @@ -18,16 +18,20 @@ package storage import ( "context" + "fmt" "log/slog" "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" ) const serviceName = "storage.googleapis.com" +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go b/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go index 4a50254d891..68133628c39 100644 --- a/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go @@ -510,14 +510,18 @@ func (c *Client) LockBucketRetentionPolicy(ctx context.Context, req *storagepb.L // GetIamPolicy gets the IAM policy for a specified bucket. // The resource field in the request should be -// projects/_/buckets/{bucket}. +// projects/_/buckets/{bucket} for a bucket, or +// projects/_/buckets/{bucket}/managedFolders/{managedFolder} +// for a managed folder. func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } // SetIamPolicy updates an IAM policy for the specified bucket. // The resource field in the request should be -// projects/_/buckets/{bucket}. +// projects/_/buckets/{bucket} for a bucket, or +// projects/_/buckets/{bucket}/managedFolders/{managedFolder} +// for a managed folder. func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -876,7 +880,7 @@ func (c *gRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } @@ -1056,6 +1060,9 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe if reg := regexp.MustCompile("(?P.*)"); reg.MatchString(req.GetResource()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1])) > 0 { routingHeadersMap["bucket"] = url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1]) } + if reg := regexp.MustCompile("(?Pprojects/[^/]+/buckets/[^/]+)(?:/.*)?"); reg.MatchString(req.GetResource()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1])) > 0 { + routingHeadersMap["bucket"] = url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1]) + } for headerName, headerValue := range routingHeadersMap { routingHeaders = fmt.Sprintf("%s%s=%s&", routingHeaders, headerName, headerValue) } @@ -1083,6 +1090,9 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe if reg := regexp.MustCompile("(?P.*)"); reg.MatchString(req.GetResource()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1])) > 0 { routingHeadersMap["bucket"] = url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1]) } + if reg := regexp.MustCompile("(?Pprojects/[^/]+/buckets/[^/]+)(?:/.*)?"); reg.MatchString(req.GetResource()) && len(url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1])) > 0 { + routingHeadersMap["bucket"] = url.QueryEscape(reg.FindStringSubmatch(req.GetResource())[1]) + } for headerName, headerValue := range routingHeadersMap { routingHeaders = fmt.Sprintf("%s%s=%s&", routingHeaders, headerName, headerValue) } diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go b/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go index 7f286f3549e..ee6639e49d8 100644 --- a/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,17 +15,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/storage/v2/storage.proto package storagepb import ( - context "context" - reflect "reflect" - sync "sync" - iampb "cloud.google.com/go/iam/apiv1/iampb" + context "context" _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" date "google.golang.org/genproto/googleapis/type/date" @@ -38,6 +35,8 @@ import ( emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -181,6 +180,63 @@ func (ServiceConstants_Values) EnumDescriptor() ([]byte, []int) { return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{42, 0} } +// Retention mode values. +type Object_Retention_Mode int32 + +const ( + // No specified mode. Object is not under retention. + Object_Retention_MODE_UNSPECIFIED Object_Retention_Mode = 0 + // Retention period may be decreased or increased. + // The Retention configuration may be removed. + // The mode may be changed to locked. + Object_Retention_UNLOCKED Object_Retention_Mode = 1 + // Retention period may be increased. + // The Retention configuration cannot be removed. + // The mode cannot be changed. + Object_Retention_LOCKED Object_Retention_Mode = 2 +) + +// Enum value maps for Object_Retention_Mode. +var ( + Object_Retention_Mode_name = map[int32]string{ + 0: "MODE_UNSPECIFIED", + 1: "UNLOCKED", + 2: "LOCKED", + } + Object_Retention_Mode_value = map[string]int32{ + "MODE_UNSPECIFIED": 0, + "UNLOCKED": 1, + "LOCKED": 2, + } +) + +func (x Object_Retention_Mode) Enum() *Object_Retention_Mode { + p := new(Object_Retention_Mode) + *p = x + return p +} + +func (x Object_Retention_Mode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Object_Retention_Mode) Descriptor() protoreflect.EnumDescriptor { + return file_google_storage_v2_storage_proto_enumTypes[1].Descriptor() +} + +func (Object_Retention_Mode) Type() protoreflect.EnumType { + return &file_google_storage_v2_storage_proto_enumTypes[1] +} + +func (x Object_Retention_Mode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Object_Retention_Mode.Descriptor instead. +func (Object_Retention_Mode) EnumDescriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{50, 0, 0} +} + // Request message for DeleteBucket. type DeleteBucketRequest struct { state protoimpl.MessageState @@ -331,9 +387,11 @@ type CreateBucketRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Required. The project to which this bucket will belong. + // Required. The project to which this bucket will belong. This field must + // either be empty or `projects/_`. The project ID that owns this bucket + // should be specified in the `bucket.project` field. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Properties of the new bucket being inserted. + // Optional. Properties of the new bucket being inserted. // The name of the bucket is specified in the `bucket_id` field. Populating // `bucket.name` field will result in an error. // The project of the bucket must be specified in the `bucket.project` field. @@ -345,14 +403,16 @@ type CreateBucketRequest struct { // component of the bucket's resource name. For example, the value `foo` might // result in a bucket with the name `projects/123456/buckets/foo`. BucketId string `protobuf:"bytes,3,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` - // Apply a predefined set of access controls to this bucket. + // Optional. Apply a predefined set of access controls to this bucket. // Valid values are "authenticatedRead", "private", "projectPrivate", // "publicRead", or "publicReadWrite". PredefinedAcl string `protobuf:"bytes,6,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` - // Apply a predefined set of default object access controls to this bucket. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of default object access controls to this + // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". PredefinedDefaultObjectAcl string `protobuf:"bytes,7,opt,name=predefined_default_object_acl,json=predefinedDefaultObjectAcl,proto3" json:"predefined_default_object_acl,omitempty"` + // Optional. If true, enable object retention on the bucket. + EnableObjectRetention bool `protobuf:"varint,9,opt,name=enable_object_retention,json=enableObjectRetention,proto3" json:"enable_object_retention,omitempty"` } func (x *CreateBucketRequest) Reset() { @@ -420,6 +480,13 @@ func (x *CreateBucketRequest) GetPredefinedDefaultObjectAcl() string { return "" } +func (x *CreateBucketRequest) GetEnableObjectRetention() bool { + if x != nil { + return x.EnableObjectRetention + } + return false +} + // Request message for ListBuckets. type ListBucketsRequest struct { state protoimpl.MessageState @@ -428,15 +495,15 @@ type ListBucketsRequest struct { // Required. The project whose buckets we are listing. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Maximum number of buckets to return in a single response. The service will - // use this parameter or 1,000 items, whichever is smaller. If "acl" is - // present in the read_mask, the service will use this parameter of 200 items, - // whichever is smaller. + // Optional. Maximum number of buckets to return in a single response. The + // service will use this parameter or 1,000 items, whichever is smaller. If + // "acl" is present in the read_mask, the service will use this parameter of + // 200 items, whichever is smaller. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // A previously-returned page token representing part of the larger set of - // results to view. + // Optional. A previously-returned page token representing part of the larger + // set of results to view. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Filter results to buckets whose names begin with this prefix. + // Optional. Filter results to buckets whose names begin with this prefix. Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"` // Mask specifying which fields to read from each result. // If no mask is specified, will default to all fields except items.owner, @@ -639,12 +706,12 @@ type UpdateBucketRequest struct { // If set, will only modify the bucket if its metageneration does not match // this value. IfMetagenerationNotMatch *int64 `protobuf:"varint,3,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // Apply a predefined set of access controls to this bucket. + // Optional. Apply a predefined set of access controls to this bucket. // Valid values are "authenticatedRead", "private", "projectPrivate", // "publicRead", or "publicReadWrite". PredefinedAcl string `protobuf:"bytes,8,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` - // Apply a predefined set of default object access controls to this bucket. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of default object access controls to this + // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". PredefinedDefaultObjectAcl string `protobuf:"bytes,9,opt,name=predefined_default_object_acl,json=predefinedDefaultObjectAcl,proto3" json:"predefined_default_object_acl,omitempty"` // Required. List of fields to be updated. @@ -738,10 +805,11 @@ type ComposeObjectRequest struct { // Required. Properties of the resulting object. Destination *Object `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // The list of source objects that will be concatenated into a single object. + // Optional. The list of source objects that will be concatenated into a + // single object. SourceObjects []*ComposeObjectRequest_SourceObject `protobuf:"bytes,2,rep,name=source_objects,json=sourceObjects,proto3" json:"source_objects,omitempty"` - // Apply a predefined set of access controls to the destination object. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of access controls to the destination + // object. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". DestinationPredefinedAcl string `protobuf:"bytes,9,opt,name=destination_predefined_acl,json=destinationPredefinedAcl,proto3" json:"destination_predefined_acl,omitempty"` // Makes the operation conditional on whether the object's current generation @@ -751,15 +819,16 @@ type ComposeObjectRequest struct { // Makes the operation conditional on whether the object's current // metageneration matches the given value. IfMetagenerationMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"` - // Resource name of the Cloud KMS key, of the form + // Optional. Resource name of the Cloud KMS key, of the form // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, // that will be used to encrypt the object. Overrides the object // metadata's `kms_key_name` value, if any. KmsKey string `protobuf:"bytes,6,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,7,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` - // The checksums of the complete object. This will be validated against the - // combined checksums of the component objects. + // Optional. The checksums of the complete object. This will be validated + // against the combined checksums of the component objects. ObjectChecksums *ObjectChecksums `protobuf:"bytes,10,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` } @@ -862,8 +931,8 @@ type DeleteObjectRequest struct { // Note: If you want to delete an unfinalized resumable upload please use // `CancelResumableWrite`. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` - // If present, permanently deletes a specific revision of this object (as - // opposed to the latest version, the default). + // Optional. If present, permanently deletes a specific revision of this + // object (as opposed to the latest version, the default). Generation int64 `protobuf:"varint,4,opt,name=generation,proto3" json:"generation,omitempty"` // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -880,7 +949,8 @@ type DeleteObjectRequest struct { // Makes the operation conditional on whether the object's current // metageneration does not match the given value. IfMetagenerationNotMatch *int64 `protobuf:"varint,8,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,10,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` } @@ -1008,7 +1078,8 @@ type RestoreObjectRequest struct { // If true, copy the source object's access controls. // Return an error if bucket has UBLA enabled. CopySourceAcl *bool `protobuf:"varint,9,opt,name=copy_source_acl,json=copySourceAcl,proto3,oneof" json:"copy_source_acl,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` } @@ -1209,11 +1280,11 @@ type ReadObjectRequest struct { Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` // Required. The name of the object to read. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` - // If present, selects a specific revision of this object (as opposed - // to the latest version, the default). + // Optional. If present, selects a specific revision of this object (as + // opposed to the latest version, the default). Generation int64 `protobuf:"varint,3,opt,name=generation,proto3" json:"generation,omitempty"` - // The offset for the first byte to return in the read, relative to the start - // of the object. + // Optional. The offset for the first byte to return in the read, relative to + // the start of the object. // // A negative `read_offset` value will be interpreted as the number of bytes // back from the end of the object to be returned. For example, if an object's @@ -1222,9 +1293,10 @@ type ReadObjectRequest struct { // a negative offset with magnitude larger than the size of the object will // return the entire object. ReadOffset int64 `protobuf:"varint,4,opt,name=read_offset,json=readOffset,proto3" json:"read_offset,omitempty"` - // The maximum number of `data` bytes the server is allowed to return in the - // sum of all `Object` messages. A `read_limit` of zero indicates that there - // is no limit, and a negative `read_limit` will cause an error. + // Optional. The maximum number of `data` bytes the server is allowed to + // return in the sum of all `Object` messages. A `read_limit` of zero + // indicates that there is no limit, and a negative `read_limit` will cause an + // error. // // If the stream returns fewer bytes than allowed by the `read_limit` and no // error occurred, the stream includes all data from the `read_offset` to the @@ -1245,7 +1317,8 @@ type ReadObjectRequest struct { // Makes the operation conditional on whether the object's current // metageneration does not match the given value. IfMetagenerationNotMatch *int64 `protobuf:"varint,9,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,10,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` // Mask specifying which fields to read. // The checksummed_data field and its children will always be present. @@ -1372,8 +1445,8 @@ type GetObjectRequest struct { Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` // Required. Name of the object. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` - // If present, selects a specific revision of this object (as opposed to the - // latest version, the default). + // Optional. If present, selects a specific revision of this object (as + // opposed to the latest version, the default). Generation int64 `protobuf:"varint,3,opt,name=generation,proto3" json:"generation,omitempty"` // If true, return the soft-deleted version of this object. SoftDeleted *bool `protobuf:"varint,11,opt,name=soft_deleted,json=softDeleted,proto3,oneof" json:"soft_deleted,omitempty"` @@ -1392,7 +1465,8 @@ type GetObjectRequest struct { // Makes the operation conditional on whether the object's current // metageneration does not match the given value. IfMetagenerationNotMatch *int64 `protobuf:"varint,7,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` // Mask specifying which fields to read. // If no mask is specified, will default to all fields except metadata.acl and @@ -1606,8 +1680,8 @@ type BidiReadObjectSpec struct { Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` // Required. The name of the object to read. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` - // If present, selects a specific revision of this object (as opposed - // to the latest version, the default). + // Optional. If present, selects a specific revision of this object (as + // opposed to the latest version, the default). Generation int64 `protobuf:"varint,3,opt,name=generation,proto3" json:"generation,omitempty"` // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -1624,7 +1698,8 @@ type BidiReadObjectSpec struct { // Makes the operation conditional on whether the object's current // metageneration does not match the given value. IfMetagenerationNotMatch *int64 `protobuf:"varint,7,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` // Mask specifying which fields to read. // The checksummed_data field and its children will always be present. @@ -1760,15 +1835,16 @@ type BidiReadObjectRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The first message of each stream should set this field. If this is not - // the first message, an error will be returned. Describes the object to read. + // Optional. The first message of each stream should set this field. If this + // is not the first message, an error will be returned. Describes the object + // to read. ReadObjectSpec *BidiReadObjectSpec `protobuf:"bytes,1,opt,name=read_object_spec,json=readObjectSpec,proto3" json:"read_object_spec,omitempty"` - // Provides a list of 0 or more (up to 100) ranges to read. If a single range - // is large enough to require multiple responses, they are guaranteed to be - // delivered in increasing offset order. There are no ordering guarantees - // across ranges. When no ranges are provided, the response message will not - // include ObjectRangeData. For full object downloads, the offset and size can - // be set to 0. + // Optional. Provides a list of 0 or more (up to 100) ranges to read. If a + // single range is large enough to require multiple responses, they are + // guaranteed to be delivered in increasing offset order. There are no + // ordering guarantees across ranges. When no ranges are provided, the + // response message will not include ObjectRangeData. For full object + // downloads, the offset and size can be set to 0. ReadRanges []*ReadRange `protobuf:"bytes,8,rep,name=read_ranges,json=readRanges,proto3" json:"read_ranges,omitempty"` } @@ -1891,17 +1967,19 @@ func (x *BidiReadObjectResponse) GetReadHandle() *BidiReadHandle { return nil } -// Error proto containing details for a redirected read. This error is only -// returned on initial open in case of a redirect. +// Error proto containing details for a redirected read. This error may be +// attached as details for an ABORTED response to BidiReadObject. type BidiReadObjectRedirectedError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The read handle for the redirected read. The client can use this for the - // subsequent open. + // The read handle for the redirected read. If set, the client may use this in + // the BidiReadObjectSpec when retrying the read stream. ReadHandle *BidiReadHandle `protobuf:"bytes,1,opt,name=read_handle,json=readHandle,proto3" json:"read_handle,omitempty"` - // The routing token that should be used when reopening the read stream. + // The routing token the client must use when retrying the read stream. + // This value must be provided in the header `x-goog-request-params`, with key + // `routing_token` and this string verbatim as the value. RoutingToken *string `protobuf:"bytes,2,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"` } @@ -1949,21 +2027,24 @@ func (x *BidiReadObjectRedirectedError) GetRoutingToken() string { return "" } -// Error proto containing details for a redirected write. This error is only -// returned on initial open in case of a redirect. +// Error proto containing details for a redirected write. This error may be +// attached as details for an ABORTED response to BidiWriteObject. type BidiWriteObjectRedirectedError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The routing token that should be used when reopening the write stream. + // The routing token the client must use when retrying the write stream. + // This value must be provided in the header `x-goog-request-params`, with key + // `routing_token` and this string verbatim as the value. RoutingToken *string `protobuf:"bytes,1,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"` - // Opaque value describing a previous write. + // Opaque value describing a previous write. If set, the client must use this + // in an AppendObjectSpec first_message when retrying the write stream. If not + // set, clients may retry the original request. WriteHandle *BidiWriteHandle `protobuf:"bytes,2,opt,name=write_handle,json=writeHandle,proto3,oneof" json:"write_handle,omitempty"` - // The generation of the object that triggered the redirect. - // Note that if this error was returned as part of an appendable object - // create, this object generation is now successfully created and - // append_object_spec should be used when reconnecting. + // The generation of the object that triggered the redirect. This will be set + // iff write_handle is set. If set, the client must use this in an + // AppendObjectSpec first_message when retrying the write stream. Generation *int64 `protobuf:"varint,3,opt,name=generation,proto3,oneof" json:"generation,omitempty"` } @@ -2380,7 +2461,7 @@ type WriteObjectSpec struct { // Required. Destination object, including its name and its metadata. Resource *Object `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // Apply a predefined set of access controls to this object. + // Optional. Apply a predefined set of access controls to this object. // Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". PredefinedAcl string `protobuf:"bytes,7,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` @@ -2531,19 +2612,20 @@ type WriteObjectRequest struct { // // *WriteObjectRequest_ChecksummedData Data isWriteObjectRequest_Data `protobuf_oneof:"data"` - // Checksums for the complete object. If the checksums computed by the service - // don't match the specified checksums the call will fail. May only be - // provided in the first or last request (either with first_message, or - // finish_write set). + // Optional. Checksums for the complete object. If the checksums computed by + // the service don't match the specified checksums the call will fail. May + // only be provided in the first or last request (either with first_message, + // or finish_write set). ObjectChecksums *ObjectChecksums `protobuf:"bytes,6,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` - // If `true`, this indicates that the write is complete. Sending any + // Optional. If `true`, this indicates that the write is complete. Sending any // `WriteObjectRequest`s subsequent to one in which `finish_write` is `true` // will cause an error. // For a non-resumable write (where the upload_id was not set in the first // message), it is an error not to set this field in the final message of the // stream. FinishWrite bool `protobuf:"varint,7,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` } @@ -2772,15 +2854,24 @@ type AppendObjectSpec struct { Generation int64 `protobuf:"varint,3,opt,name=generation,proto3" json:"generation,omitempty"` // Makes the operation conditional on whether the object's current // metageneration matches the given value. + // + // Note that metageneration preconditions are only checked if `write_handle` + // is empty. IfMetagenerationMatch *int64 `protobuf:"varint,4,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"` // Makes the operation conditional on whether the object's current // metageneration does not match the given value. + // + // Note that metageneration preconditions are only checked if `write_handle` + // is empty. IfMetagenerationNotMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` // An optional routing token that influences request routing for the stream. // Must be provided if a BidiWriteObjectRedirectedError is returned. RoutingToken *string `protobuf:"bytes,6,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"` // An optional write handle returned from a previous BidiWriteObjectResponse // message or a BidiWriteObjectRedirectedError error. + // + // Note that metageneration preconditions are only checked if `write_handle` + // is empty. WriteHandle *BidiWriteHandle `protobuf:"bytes,7,opt,name=write_handle,json=writeHandle,proto3,oneof" json:"write_handle,omitempty"` } @@ -2897,35 +2988,36 @@ type BidiWriteObjectRequest struct { // // *BidiWriteObjectRequest_ChecksummedData Data isBidiWriteObjectRequest_Data `protobuf_oneof:"data"` - // Checksums for the complete object. If the checksums computed by the service - // don't match the specified checksums the call will fail. May only be - // provided in the first request or the - // last request (with finish_write set). + // Optional. Checksums for the complete object. If the checksums computed by + // the service don't match the specified checksums the call will fail. May + // only be provided in the first request or the last request (with + // finish_write set). ObjectChecksums *ObjectChecksums `protobuf:"bytes,6,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` - // For each BidiWriteObjectRequest where state_lookup is `true` or the client - // closes the stream, the service will send a BidiWriteObjectResponse - // containing the current persisted size. The persisted size sent in responses - // covers all the bytes the server has persisted thus far and can be used to - // decide what data is safe for the client to drop. Note that the object's - // current size reported by the BidiWriteObjectResponse may lag behind the - // number of bytes written by the client. This field is ignored if - // `finish_write` is set to true. + // Optional. For each BidiWriteObjectRequest where state_lookup is `true` or + // the client closes the stream, the service will send a + // BidiWriteObjectResponse containing the current persisted size. The + // persisted size sent in responses covers all the bytes the server has + // persisted thus far and can be used to decide what data is safe for the + // client to drop. Note that the object's current size reported by the + // BidiWriteObjectResponse may lag behind the number of bytes written by the + // client. This field is ignored if `finish_write` is set to true. StateLookup bool `protobuf:"varint,7,opt,name=state_lookup,json=stateLookup,proto3" json:"state_lookup,omitempty"` - // Persists data written on the stream, up to and including the current - // message, to permanent storage. This option should be used sparingly as it - // may reduce performance. Ongoing writes will periodically be persisted on - // the server even when `flush` is not set. This field is ignored if + // Optional. Persists data written on the stream, up to and including the + // current message, to permanent storage. This option should be used sparingly + // as it may reduce performance. Ongoing writes will periodically be persisted + // on the server even when `flush` is not set. This field is ignored if // `finish_write` is set to true since there's no need to checkpoint or flush // if this message completes the write. Flush bool `protobuf:"varint,8,opt,name=flush,proto3" json:"flush,omitempty"` - // If `true`, this indicates that the write is complete. Sending any + // Optional. If `true`, this indicates that the write is complete. Sending any // `WriteObjectRequest`s subsequent to one in which `finish_write` is `true` // will cause an error. // For a non-resumable write (where the upload_id was not set in the first // message), it is an error not to set this field in the final message of the // stream. FinishWrite bool `protobuf:"varint,9,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,10,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` } @@ -3187,28 +3279,27 @@ type ListObjectsRequest struct { // Required. Name of the bucket in which to look for objects. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Maximum number of `items` plus `prefixes` to return + // Optional. Maximum number of `items` plus `prefixes` to return // in a single page of responses. As duplicate `prefixes` are // omitted, fewer total results may be returned than requested. The service // will use this parameter or 1,000 items, whichever is smaller. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // A previously-returned page token representing part of the larger set of - // results to view. + // Optional. A previously-returned page token representing part of the larger + // set of results to view. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // If set, returns results in a directory-like mode. `items` will contain - // only objects whose names, aside from the `prefix`, do not - // contain `delimiter`. Objects whose names, aside from the - // `prefix`, contain `delimiter` will have their name, - // truncated after the `delimiter`, returned in - // `prefixes`. Duplicate `prefixes` are omitted. + // Optional. If set, returns results in a directory-like mode. `items` will + // contain only objects whose names, aside from the `prefix`, do not contain + // `delimiter`. Objects whose names, aside from the `prefix`, contain + // `delimiter` will have their name, truncated after the `delimiter`, returned + // in `prefixes`. Duplicate `prefixes` are omitted. Delimiter string `protobuf:"bytes,4,opt,name=delimiter,proto3" json:"delimiter,omitempty"` - // If true, objects that end in exactly one instance of `delimiter` + // Optional. If true, objects that end in exactly one instance of `delimiter` // will have their metadata included in `items` in addition to // `prefixes`. IncludeTrailingDelimiter bool `protobuf:"varint,5,opt,name=include_trailing_delimiter,json=includeTrailingDelimiter,proto3" json:"include_trailing_delimiter,omitempty"` - // Filter results to objects whose names begin with this prefix. + // Optional. Filter results to objects whose names begin with this prefix. Prefix string `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"` - // If `true`, lists all versions of an object as distinct results. + // Optional. If `true`, lists all versions of an object as distinct results. // For more information, see // [Object // Versioning](https://cloud.google.com/storage/docs/object-versioning). @@ -3239,6 +3330,10 @@ type ListObjectsRequest struct { // Glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob) // for the full syntax. MatchGlob string `protobuf:"bytes,14,opt,name=match_glob,json=matchGlob,proto3" json:"match_glob,omitempty"` + // Optional. Filter the returned objects. Currently only supported for the + // `contexts` field. If `delimiter` is set, the returned `prefixes` are exempt + // from this filter. + Filter string `protobuf:"bytes,15,opt,name=filter,proto3" json:"filter,omitempty"` } func (x *ListObjectsRequest) Reset() { @@ -3362,6 +3457,13 @@ func (x *ListObjectsRequest) GetMatchGlob() string { return "" } +func (x *ListObjectsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + // Request object for `QueryWriteStatus`. type QueryWriteStatusRequest struct { state protoimpl.MessageState @@ -3371,7 +3473,8 @@ type QueryWriteStatusRequest struct { // Required. The name of the resume token for the object whose write status is // being requested. UploadId string `protobuf:"bytes,1,opt,name=upload_id,json=uploadId,proto3" json:"upload_id,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,2,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` } @@ -3531,13 +3634,13 @@ type RewriteObjectRequest struct { // Required. Immutable. The name of the bucket containing the destination // object. DestinationBucket string `protobuf:"bytes,25,opt,name=destination_bucket,json=destinationBucket,proto3" json:"destination_bucket,omitempty"` - // The name of the Cloud KMS key that will be used to encrypt the destination - // object. The Cloud KMS key must be located in same location as the object. - // If the parameter is not specified, the request uses the destination - // bucket's default encryption key, if any, or else the Google-managed - // encryption key. + // Optional. The name of the Cloud KMS key that will be used to encrypt the + // destination object. The Cloud KMS key must be located in same location as + // the object. If the parameter is not specified, the request uses the + // destination bucket's default encryption key, if any, or else the + // Google-managed encryption key. DestinationKmsKey string `protobuf:"bytes,27,opt,name=destination_kms_key,json=destinationKmsKey,proto3" json:"destination_kms_key,omitempty"` - // Properties of the destination, post-rewrite object. + // Optional. Properties of the destination, post-rewrite object. // The `name`, `bucket` and `kms_key` fields must not be populated (these // values are specified in the `destination_name`, `destination_bucket`, and // `destination_kms_key` fields). @@ -3549,17 +3652,17 @@ type RewriteObjectRequest struct { SourceBucket string `protobuf:"bytes,2,opt,name=source_bucket,json=sourceBucket,proto3" json:"source_bucket,omitempty"` // Required. Name of the source object. SourceObject string `protobuf:"bytes,3,opt,name=source_object,json=sourceObject,proto3" json:"source_object,omitempty"` - // If present, selects a specific revision of the source object (as opposed to - // the latest version, the default). + // Optional. If present, selects a specific revision of the source object (as + // opposed to the latest version, the default). SourceGeneration int64 `protobuf:"varint,4,opt,name=source_generation,json=sourceGeneration,proto3" json:"source_generation,omitempty"` - // Include this field (from the previous rewrite response) on each rewrite - // request after the first one, until the rewrite response 'done' flag is - // true. Calls that provide a rewriteToken can omit all other request fields, - // but if included those fields must match the values provided in the first - // rewrite request. + // Optional. Include this field (from the previous rewrite response) on each + // rewrite request after the first one, until the rewrite response 'done' flag + // is true. Calls that provide a rewriteToken can omit all other request + // fields, but if included those fields must match the values provided in the + // first rewrite request. RewriteToken string `protobuf:"bytes,5,opt,name=rewrite_token,json=rewriteToken,proto3" json:"rewrite_token,omitempty"` - // Apply a predefined set of access controls to the destination object. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of access controls to the destination + // object. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". DestinationPredefinedAcl string `protobuf:"bytes,28,opt,name=destination_predefined_acl,json=destinationPredefinedAcl,proto3" json:"destination_predefined_acl,omitempty"` // Makes the operation conditional on whether the object's current generation @@ -3589,30 +3692,30 @@ type RewriteObjectRequest struct { // Makes the operation conditional on whether the source object's current // metageneration does not match the given value. IfSourceMetagenerationNotMatch *int64 `protobuf:"varint,14,opt,name=if_source_metageneration_not_match,json=ifSourceMetagenerationNotMatch,proto3,oneof" json:"if_source_metageneration_not_match,omitempty"` - // The maximum number of bytes that will be rewritten per rewrite request. - // Most callers - // shouldn't need to specify this parameter - it is primarily in place to - // support testing. If specified the value must be an integral multiple of - // 1 MiB (1048576). Also, this only applies to requests where the source and - // destination span locations and/or storage classes. Finally, this value must - // not change across rewrite calls else you'll get an error that the - // `rewriteToken` is invalid. + // Optional. The maximum number of bytes that will be rewritten per rewrite + // request. Most callers shouldn't need to specify this parameter - it is + // primarily in place to support testing. If specified the value must be an + // integral multiple of 1 MiB (1048576). Also, this only applies to requests + // where the source and destination span locations and/or storage classes. + // Finally, this value must not change across rewrite calls else you'll get an + // error that the `rewriteToken` is invalid. MaxBytesRewrittenPerCall int64 `protobuf:"varint,15,opt,name=max_bytes_rewritten_per_call,json=maxBytesRewrittenPerCall,proto3" json:"max_bytes_rewritten_per_call,omitempty"` - // The algorithm used to encrypt the source object, if any. Used if the source - // object was encrypted with a Customer-Supplied Encryption Key. + // Optional. The algorithm used to encrypt the source object, if any. Used if + // the source object was encrypted with a Customer-Supplied Encryption Key. CopySourceEncryptionAlgorithm string `protobuf:"bytes,16,opt,name=copy_source_encryption_algorithm,json=copySourceEncryptionAlgorithm,proto3" json:"copy_source_encryption_algorithm,omitempty"` - // The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt - // the source object, if it was encrypted with a Customer-Supplied Encryption - // Key. - CopySourceEncryptionKeyBytes []byte `protobuf:"bytes,21,opt,name=copy_source_encryption_key_bytes,json=copySourceEncryptionKeyBytes,proto3" json:"copy_source_encryption_key_bytes,omitempty"` - // The raw bytes (not base64-encoded) SHA256 hash of the encryption key used - // to encrypt the source object, if it was encrypted with a Customer-Supplied + // Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to + // encrypt the source object, if it was encrypted with a Customer-Supplied // Encryption Key. + CopySourceEncryptionKeyBytes []byte `protobuf:"bytes,21,opt,name=copy_source_encryption_key_bytes,json=copySourceEncryptionKeyBytes,proto3" json:"copy_source_encryption_key_bytes,omitempty"` + // Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption + // key used to encrypt the source object, if it was encrypted with a + // Customer-Supplied Encryption Key. CopySourceEncryptionKeySha256Bytes []byte `protobuf:"bytes,22,opt,name=copy_source_encryption_key_sha256_bytes,json=copySourceEncryptionKeySha256Bytes,proto3" json:"copy_source_encryption_key_sha256_bytes,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,19,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` - // The checksums of the complete object. This will be used to validate the - // destination object after rewriting. + // Optional. The checksums of the complete object. This will be used to + // validate the destination object after rewriting. ObjectChecksums *ObjectChecksums `protobuf:"bytes,29,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` } @@ -4072,11 +4175,12 @@ type StartResumableWriteRequest struct { // Required. Contains the information necessary to start a resumable write. WriteObjectSpec *WriteObjectSpec `protobuf:"bytes,1,opt,name=write_object_spec,json=writeObjectSpec,proto3" json:"write_object_spec,omitempty"` - // A set of parameters common to Storage API requests related to an object. + // Optional. A set of parameters common to Storage API requests related to an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,3,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` - // The checksums of the complete object. This is used to validate the - // uploaded object. For each upload, `object_checksums` can be provided when - // initiating a resumable upload with`StartResumableWriteRequest` or when + // Optional. The checksums of the complete object. This is used to validate + // the uploaded object. For each upload, `object_checksums` can be provided + // when initiating a resumable upload with`StartResumableWriteRequest` or when // completing a write with `WriteObjectRequest` with // `finish_write` set to `true`. ObjectChecksums *ObjectChecksums `protobuf:"bytes,5,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` @@ -4211,7 +4315,7 @@ type UpdateObjectRequest struct { // Makes the operation conditional on whether the object's current // metageneration does not match the given value. IfMetagenerationNotMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // Apply a predefined set of access controls to this object. + // Optional. Apply a predefined set of access controls to this object. // Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". PredefinedAcl string `protobuf:"bytes,10,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` @@ -4224,8 +4328,11 @@ type UpdateObjectRequest struct { // // Not specifying any fields is an error. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - // A set of parameters common to Storage API requests concerning an object. + // Optional. A set of parameters common to Storage API requests concerning an + // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` + // Optional. Overrides the unlocked retention config on the object. + OverrideUnlockedRetention bool `protobuf:"varint,11,opt,name=override_unlocked_retention,json=overrideUnlockedRetention,proto3" json:"override_unlocked_retention,omitempty"` } func (x *UpdateObjectRequest) Reset() { @@ -4314,20 +4421,27 @@ func (x *UpdateObjectRequest) GetCommonObjectRequestParams() *CommonObjectReques return nil } +func (x *UpdateObjectRequest) GetOverrideUnlockedRetention() bool { + if x != nil { + return x.OverrideUnlockedRetention + } + return false +} + // Parameters that can be passed to any object request. type CommonObjectRequestParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Encryption algorithm used with the Customer-Supplied Encryption Keys - // feature. + // Optional. Encryption algorithm used with the Customer-Supplied Encryption + // Keys feature. EncryptionAlgorithm string `protobuf:"bytes,1,opt,name=encryption_algorithm,json=encryptionAlgorithm,proto3" json:"encryption_algorithm,omitempty"` - // Encryption key used with the Customer-Supplied Encryption Keys feature. - // In raw bytes format (not base64-encoded). + // Optional. Encryption key used with the Customer-Supplied Encryption Keys + // feature. In raw bytes format (not base64-encoded). EncryptionKeyBytes []byte `protobuf:"bytes,4,opt,name=encryption_key_bytes,json=encryptionKeyBytes,proto3" json:"encryption_key_bytes,omitempty"` - // SHA256 hash of encryption key used with the Customer-Supplied Encryption - // Keys feature. + // Optional. SHA256 hash of encryption key used with the Customer-Supplied + // Encryption Keys feature. EncryptionKeySha256Bytes []byte `protobuf:"bytes,5,opt,name=encryption_key_sha256_bytes,json=encryptionKeySha256Bytes,proto3" json:"encryption_key_sha256_bytes,omitempty"` } @@ -4425,7 +4539,7 @@ type Bucket struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Immutable. The name of the bucket. + // Identifier. The name of the bucket. // Format: `projects/{project}/buckets/{bucket}` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Output only. The user-chosen part of the bucket name. The `{bucket}` @@ -4439,6 +4553,7 @@ type Bucket struct { // Immutable. The project which owns this bucket, in the format of // "projects/{projectIdentifier}". // {projectIdentifier} can be the project ID or project number. + // Output values will always be in project number format. Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` // Output only. The metadata generation of this bucket. Metageneration int64 `protobuf:"varint,4,opt,name=metageneration,proto3" json:"metageneration,omitempty"` @@ -4452,92 +4567,94 @@ type Bucket struct { // Output only. The location type of the bucket (region, dual-region, // multi-region, etc). LocationType string `protobuf:"bytes,6,opt,name=location_type,json=locationType,proto3" json:"location_type,omitempty"` - // The bucket's default storage class, used whenever no storageClass is - // specified for a newly-created object. This defines how objects in the + // Optional. The bucket's default storage class, used whenever no storageClass + // is specified for a newly-created object. This defines how objects in the // bucket are stored and determines the SLA and the cost of storage. // If this value is not specified when the bucket is created, it will default // to `STANDARD`. For more information, see // https://developers.google.com/storage/docs/storage-classes. StorageClass string `protobuf:"bytes,7,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` - // The recovery point objective for cross-region replication of the bucket. - // Applicable only for dual- and multi-region buckets. "DEFAULT" uses default - // replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region - // buckets only. If rpo is not specified when the bucket is created, it - // defaults to "DEFAULT". For more information, see + // Optional. The recovery point objective for cross-region replication of the + // bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses + // default replication. "ASYNC_TURBO" enables turbo replication, valid for + // dual-region buckets only. If rpo is not specified when the bucket is + // created, it defaults to "DEFAULT". For more information, see // https://cloud.google.com/storage/docs/availability-durability#turbo-replication. Rpo string `protobuf:"bytes,27,opt,name=rpo,proto3" json:"rpo,omitempty"` - // Access controls on the bucket. + // Optional. Access controls on the bucket. // If iam_config.uniform_bucket_level_access is enabled on this bucket, // requests to set, read, or modify acl is an error. Acl []*BucketAccessControl `protobuf:"bytes,8,rep,name=acl,proto3" json:"acl,omitempty"` - // Default access controls to apply to new objects when no ACL is provided. - // If iam_config.uniform_bucket_level_access is enabled on this bucket, - // requests to set, read, or modify acl is an error. + // Optional. Default access controls to apply to new objects when no ACL is + // provided. If iam_config.uniform_bucket_level_access is enabled on this + // bucket, requests to set, read, or modify acl is an error. DefaultObjectAcl []*ObjectAccessControl `protobuf:"bytes,9,rep,name=default_object_acl,json=defaultObjectAcl,proto3" json:"default_object_acl,omitempty"` - // The bucket's lifecycle config. See + // Optional. The bucket's lifecycle config. See // [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management] // for more information. Lifecycle *Bucket_Lifecycle `protobuf:"bytes,10,opt,name=lifecycle,proto3" json:"lifecycle,omitempty"` // Output only. The creation time of the bucket. CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing] - // (CORS) config. + // Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource + // Sharing] (CORS) config. Cors []*Bucket_Cors `protobuf:"bytes,12,rep,name=cors,proto3" json:"cors,omitempty"` // Output only. The modification time of the bucket. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // The default value for event-based hold on newly created objects in this - // bucket. Event-based hold is a way to retain objects indefinitely until an - // event occurs, signified by the - // hold's release. After being released, such objects will be subject to - // bucket-level retention (if any). One sample use case of this flag is for - // banks to hold loan documents for at least 3 years after loan is paid in - // full. Here, bucket-level retention is 3 years and the event is loan being - // paid in full. In this example, these objects will be held intact for any - // number of years until the event has occurred (event-based hold on the - // object is released) and then 3 more years after that. That means retention - // duration of the objects begins from the moment event-based hold - // transitioned from true to false. Objects under event-based hold cannot be - // deleted, overwritten or archived until the hold is removed. + // Optional. The default value for event-based hold on newly created objects + // in this bucket. Event-based hold is a way to retain objects indefinitely + // until an event occurs, signified by the hold's release. After being + // released, such objects will be subject to bucket-level retention (if any). + // One sample use case of this flag is for banks to hold loan documents for at + // least 3 years after loan is paid in full. Here, bucket-level retention is 3 + // years and the event is loan being paid in full. In this example, these + // objects will be held intact for any number of years until the event has + // occurred (event-based hold on the object is released) and then 3 more years + // after that. That means retention duration of the objects begins from the + // moment event-based hold transitioned from true to false. Objects under + // event-based hold cannot be deleted, overwritten or archived until the hold + // is removed. DefaultEventBasedHold bool `protobuf:"varint,14,opt,name=default_event_based_hold,json=defaultEventBasedHold,proto3" json:"default_event_based_hold,omitempty"` - // User-provided labels, in key/value pairs. + // Optional. User-provided labels, in key/value pairs. Labels map[string]string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The bucket's website config, controlling how the service behaves + // Optional. The bucket's website config, controlling how the service behaves // when accessing bucket contents as a web site. See the // [https://cloud.google.com/storage/docs/static-website][Static Website // Examples] for more information. Website *Bucket_Website `protobuf:"bytes,16,opt,name=website,proto3" json:"website,omitempty"` - // The bucket's versioning config. + // Optional. The bucket's versioning config. Versioning *Bucket_Versioning `protobuf:"bytes,17,opt,name=versioning,proto3" json:"versioning,omitempty"` - // The bucket's logging config, which defines the destination bucket + // Optional. The bucket's logging config, which defines the destination bucket // and name prefix (if any) for the current bucket's logs. Logging *Bucket_Logging `protobuf:"bytes,18,opt,name=logging,proto3" json:"logging,omitempty"` // Output only. The owner of the bucket. This is always the project team's // owner group. Owner *Owner `protobuf:"bytes,19,opt,name=owner,proto3" json:"owner,omitempty"` - // Encryption config for a bucket. + // Optional. Encryption config for a bucket. Encryption *Bucket_Encryption `protobuf:"bytes,20,opt,name=encryption,proto3" json:"encryption,omitempty"` - // The bucket's billing config. + // Optional. The bucket's billing config. Billing *Bucket_Billing `protobuf:"bytes,21,opt,name=billing,proto3" json:"billing,omitempty"` - // The bucket's retention policy. The retention policy enforces a minimum - // retention time for all objects contained in the bucket, based on their - // creation time. Any attempt to overwrite or delete objects younger than the - // retention period will result in a PERMISSION_DENIED error. An unlocked - // retention policy can be modified or removed from the bucket via a + // Optional. The bucket's retention policy. The retention policy enforces a + // minimum retention time for all objects contained in the bucket, based on + // their creation time. Any attempt to overwrite or delete objects younger + // than the retention period will result in a PERMISSION_DENIED error. An + // unlocked retention policy can be modified or removed from the bucket via a // storage.buckets.update operation. A locked retention policy cannot be // removed or shortened in duration for the lifetime of the bucket. // Attempting to remove or decrease period of a locked retention policy will // result in a PERMISSION_DENIED error. RetentionPolicy *Bucket_RetentionPolicy `protobuf:"bytes,22,opt,name=retention_policy,json=retentionPolicy,proto3" json:"retention_policy,omitempty"` - // The bucket's IAM config. + // Optional. The bucket's IAM config. IamConfig *Bucket_IamConfig `protobuf:"bytes,23,opt,name=iam_config,json=iamConfig,proto3" json:"iam_config,omitempty"` - // Reserved for future use. + // Optional. Reserved for future use. SatisfiesPzs bool `protobuf:"varint,25,opt,name=satisfies_pzs,json=satisfiesPzs,proto3" json:"satisfies_pzs,omitempty"` - // Configuration that, if present, specifies the data placement for a + // Optional. Configuration that, if present, specifies the data placement for + // a // [https://cloud.google.com/storage/docs/locations#location-dr][configurable // dual-region]. CustomPlacementConfig *Bucket_CustomPlacementConfig `protobuf:"bytes,26,opt,name=custom_placement_config,json=customPlacementConfig,proto3" json:"custom_placement_config,omitempty"` - // The bucket's Autoclass configuration. If there is no configuration, the - // Autoclass feature will be disabled and have no effect on the bucket. + // Optional. The bucket's Autoclass configuration. If there is no + // configuration, the Autoclass feature will be disabled and have no effect on + // the bucket. Autoclass *Bucket_Autoclass `protobuf:"bytes,28,opt,name=autoclass,proto3" json:"autoclass,omitempty"` // Optional. The bucket's hierarchical namespace configuration. If there is no // configuration, the hierarchical namespace feature will be disabled and have @@ -4546,6 +4663,11 @@ type Bucket struct { // Optional. The bucket's soft delete policy. The soft delete policy prevents // soft-deleted objects from being permanently deleted. SoftDeletePolicy *Bucket_SoftDeletePolicy `protobuf:"bytes,31,opt,name=soft_delete_policy,json=softDeletePolicy,proto3" json:"soft_delete_policy,omitempty"` + // Optional. The bucket's object retention configuration. Must be enabled + // before objects in the bucket may have retention configured. + ObjectRetention *Bucket_ObjectRetention `protobuf:"bytes,33,opt,name=object_retention,json=objectRetention,proto3" json:"object_retention,omitempty"` + // Optional. The bucket's IP filter configuration. + IpFilter *Bucket_IpFilter `protobuf:"bytes,38,opt,name=ip_filter,json=ipFilter,proto3,oneof" json:"ip_filter,omitempty"` } func (x *Bucket) Reset() { @@ -4788,17 +4910,31 @@ func (x *Bucket) GetSoftDeletePolicy() *Bucket_SoftDeletePolicy { return nil } +func (x *Bucket) GetObjectRetention() *Bucket_ObjectRetention { + if x != nil { + return x.ObjectRetention + } + return nil +} + +func (x *Bucket) GetIpFilter() *Bucket_IpFilter { + if x != nil { + return x.IpFilter + } + return nil +} + // An access-control entry. type BucketAccessControl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The access permission for the entity. + // Optional. The access permission for the entity. Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - // The ID of the access-control entry. + // Optional. The ID of the access-control entry. Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // The entity holding the permission, in one of the following forms: + // Optional. The entity holding the permission, in one of the following forms: // * `user-{userid}` // * `user-{email}` // * `group-{groupid}` @@ -4820,18 +4956,18 @@ type BucketAccessControl struct { // Output only. The alternative entity format, if exists. For project // entities, `project-{team}-{projectid}` format will be returned on response. EntityAlt string `protobuf:"bytes,9,opt,name=entity_alt,json=entityAlt,proto3" json:"entity_alt,omitempty"` - // The ID for the entity, if any. + // Optional. The ID for the entity, if any. EntityId string `protobuf:"bytes,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - // The etag of the BucketAccessControl. + // Optional. The etag of the BucketAccessControl. // If included in the metadata of an update or delete request message, the // operation operation will only be performed if the etag matches that of the // bucket's BucketAccessControl. Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` - // The email address associated with the entity, if any. + // Optional. The email address associated with the entity, if any. Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` - // The domain associated with the entity, if any. + // Optional. The domain associated with the entity, if any. Domain string `protobuf:"bytes,6,opt,name=domain,proto3" json:"domain,omitempty"` - // The project team associated with the entity, if any. + // Optional. The project team associated with the entity, if any. ProjectTeam *ProjectTeam `protobuf:"bytes,7,opt,name=project_team,json=projectTeam,proto3" json:"project_team,omitempty"` } @@ -4996,7 +5132,7 @@ type ObjectChecksums struct { // If set in a WriteObjectRequest, service will validate that the stored // object matches this checksum. Crc32C *uint32 `protobuf:"fixed32,1,opt,name=crc32c,proto3,oneof" json:"crc32c,omitempty"` - // 128 bit MD5 hash of the object data. + // Optional. 128 bit MD5 hash of the object data. // For more information about using the MD5 hash, see // [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and // ETags: Best Practices]. @@ -5050,6 +5186,118 @@ func (x *ObjectChecksums) GetMd5Hash() []byte { return nil } +// The payload of a single user-defined object context. +type ObjectCustomContextPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The value of the object context. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // Output only. The time at which the object context was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The time at which the object context was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *ObjectCustomContextPayload) Reset() { + *x = ObjectCustomContextPayload{} + mi := &file_google_storage_v2_storage_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ObjectCustomContextPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectCustomContextPayload) ProtoMessage() {} + +func (x *ObjectCustomContextPayload) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[47] + 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 ObjectCustomContextPayload.ProtoReflect.Descriptor instead. +func (*ObjectCustomContextPayload) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{47} +} + +func (x *ObjectCustomContextPayload) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ObjectCustomContextPayload) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ObjectCustomContextPayload) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// All contexts of an object grouped by type. +type ObjectContexts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. User-defined object contexts. + Custom map[string]*ObjectCustomContextPayload `protobuf:"bytes,1,rep,name=custom,proto3" json:"custom,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ObjectContexts) Reset() { + *x = ObjectContexts{} + mi := &file_google_storage_v2_storage_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ObjectContexts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectContexts) ProtoMessage() {} + +func (x *ObjectContexts) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[48] + 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 ObjectContexts.ProtoReflect.Descriptor instead. +func (*ObjectContexts) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{48} +} + +func (x *ObjectContexts) GetCustom() map[string]*ObjectCustomContextPayload { + if x != nil { + return x.Custom + } + return nil +} + // Describes the Customer-Supplied Encryption Key mechanism used to store an // Object's data at rest. type CustomerEncryption struct { @@ -5057,16 +5305,16 @@ type CustomerEncryption struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The encryption algorithm. + // Optional. The encryption algorithm. EncryptionAlgorithm string `protobuf:"bytes,1,opt,name=encryption_algorithm,json=encryptionAlgorithm,proto3" json:"encryption_algorithm,omitempty"` - // SHA256 hash value of the encryption key. + // Optional. SHA256 hash value of the encryption key. // In raw bytes format (not base64-encoded). KeySha256Bytes []byte `protobuf:"bytes,3,opt,name=key_sha256_bytes,json=keySha256Bytes,proto3" json:"key_sha256_bytes,omitempty"` } func (x *CustomerEncryption) Reset() { *x = CustomerEncryption{} - mi := &file_google_storage_v2_storage_proto_msgTypes[47] + mi := &file_google_storage_v2_storage_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5078,7 +5326,7 @@ func (x *CustomerEncryption) String() string { func (*CustomerEncryption) ProtoMessage() {} func (x *CustomerEncryption) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[47] + mi := &file_google_storage_v2_storage_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5091,7 +5339,7 @@ func (x *CustomerEncryption) ProtoReflect() protoreflect.Message { // Deprecated: Use CustomerEncryption.ProtoReflect.Descriptor instead. func (*CustomerEncryption) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{47} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{49} } func (x *CustomerEncryption) GetEncryptionAlgorithm() string { @@ -5124,7 +5372,7 @@ type Object struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Immutable. The name of the bucket containing this object. Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"` - // The etag of the object. + // Optional. The etag of the object. // If included in the metadata of an update or delete request message, the // operation will only be performed if the etag matches that of the live // object. @@ -5141,27 +5389,27 @@ type Object struct { // metageneration number is only meaningful in the context of a particular // generation of a particular object. Metageneration int64 `protobuf:"varint,4,opt,name=metageneration,proto3" json:"metageneration,omitempty"` - // Storage class of the object. + // Optional. Storage class of the object. StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` // Output only. Content-Length of the object data in bytes, matching // [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2]. Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` - // Content-Encoding of the object data, matching + // Optional. Content-Encoding of the object data, matching // [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2] ContentEncoding string `protobuf:"bytes,7,opt,name=content_encoding,json=contentEncoding,proto3" json:"content_encoding,omitempty"` - // Content-Disposition of the object data, matching + // Optional. Content-Disposition of the object data, matching // [https://tools.ietf.org/html/rfc6266][RFC 6266]. ContentDisposition string `protobuf:"bytes,8,opt,name=content_disposition,json=contentDisposition,proto3" json:"content_disposition,omitempty"` - // Cache-Control directive for the object data, matching + // Optional. Cache-Control directive for the object data, matching // [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2]. // If omitted, and the object is accessible to all anonymous users, the // default will be `public, max-age=3600`. CacheControl string `protobuf:"bytes,9,opt,name=cache_control,json=cacheControl,proto3" json:"cache_control,omitempty"` - // Access controls on the object. + // Optional. Access controls on the object. // If iam_config.uniform_bucket_level_access is enabled on the parent // bucket, requests to set, read, or modify acl is an error. Acl []*ObjectAccessControl `protobuf:"bytes,10,rep,name=acl,proto3" json:"acl,omitempty"` - // Content-Language of the object data, matching + // Optional. Content-Language of the object data, matching // [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2]. ContentLanguage string `protobuf:"bytes,11,opt,name=content_language,json=contentLanguage,proto3" json:"content_language,omitempty"` // Output only. If this object is noncurrent, this is the time when the object @@ -5169,7 +5417,7 @@ type Object struct { DeleteTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` // Output only. The time when the object was finalized. FinalizeTime *timestamppb.Timestamp `protobuf:"bytes,36,opt,name=finalize_time,json=finalizeTime,proto3" json:"finalize_time,omitempty"` - // Content-Type of the object data, matching + // Optional. Content-Type of the object data, matching // [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5]. // If an object is stored without a Content-Type, it is served as // `application/octet-stream`. @@ -5192,28 +5440,32 @@ type Object struct { // on behalf of a requester, such as changing the storage class based on an // Object Lifecycle Configuration. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Cloud KMS Key used to encrypt this object, if the object is encrypted by - // such a key. + // Optional. Cloud KMS Key used to encrypt this object, if the object is + // encrypted by such a key. KmsKey string `protobuf:"bytes,18,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"` // Output only. The time at which the object's storage class was last changed. // When the object is initially created, it will be set to time_created. UpdateStorageClassTime *timestamppb.Timestamp `protobuf:"bytes,19,opt,name=update_storage_class_time,json=updateStorageClassTime,proto3" json:"update_storage_class_time,omitempty"` - // Whether an object is under temporary hold. While this flag is set to true, - // the object is protected against deletion and overwrites. A common use case - // of this flag is regulatory investigations where objects need to be retained - // while the investigation is ongoing. Note that unlike event-based hold, - // temporary hold does not impact retention expiration time of an object. + // Optional. Whether an object is under temporary hold. While this flag is set + // to true, the object is protected against deletion and overwrites. A common + // use case of this flag is regulatory investigations where objects need to be + // retained while the investigation is ongoing. Note that unlike event-based + // hold, temporary hold does not impact retention expiration time of an + // object. TemporaryHold bool `protobuf:"varint,20,opt,name=temporary_hold,json=temporaryHold,proto3" json:"temporary_hold,omitempty"` - // A server-determined value that specifies the earliest time that the - // object's retention period expires. - // Note 1: This field is not provided for objects with an active event-based - // hold, since retention expiration is unknown until the hold is removed. - // Note 2: This value can be provided even when temporary hold is set (so that - // the user can reason about policy without having to first unset the - // temporary hold). + // Optional. A server-determined value that specifies the earliest time that + // the object's retention period expires. Note 1: This field is not provided + // for objects with an active event-based hold, since retention expiration is + // unknown until the hold is removed. Note 2: This value can be provided even + // when temporary hold is set (so that the user can reason about policy + // without having to first unset the temporary hold). RetentionExpireTime *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=retention_expire_time,json=retentionExpireTime,proto3" json:"retention_expire_time,omitempty"` - // User-provided metadata, in key/value pairs. + // Optional. User-provided metadata, in key/value pairs. Metadata map[string]string `protobuf:"bytes,22,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. User-defined or system-defined object contexts. Each object + // context is a key-payload pair, where the key provides the identification + // and the payload holds the associated value and additional metadata. + Contexts *ObjectContexts `protobuf:"bytes,38,opt,name=contexts,proto3" json:"contexts,omitempty"` // Whether an object is under event-based hold. // An event-based hold is a way to force the retention of an object until // after some event occurs. Once the hold is released by explicitly setting @@ -5229,10 +5481,10 @@ type Object struct { // Output only. The owner of the object. This will always be the uploader of // the object. Owner *Owner `protobuf:"bytes,24,opt,name=owner,proto3" json:"owner,omitempty"` - // Metadata of Customer-Supplied Encryption Key, if the object is encrypted by - // such a key. + // Optional. Metadata of Customer-Supplied Encryption Key, if the object is + // encrypted by such a key. CustomerEncryption *CustomerEncryption `protobuf:"bytes,25,opt,name=customer_encryption,json=customerEncryption,proto3" json:"customer_encryption,omitempty"` - // A user-specified timestamp set on an object. + // Optional. A user-specified timestamp set on an object. CustomTime *timestamppb.Timestamp `protobuf:"bytes,26,opt,name=custom_time,json=customTime,proto3" json:"custom_time,omitempty"` // Output only. This is the time when the object became soft-deleted. // @@ -5244,11 +5496,14 @@ type Object struct { // Only set when an object becomes soft-deleted with a soft_delete_policy. // Otherwise, the object will not be accessible. HardDeleteTime *timestamppb.Timestamp `protobuf:"bytes,29,opt,name=hard_delete_time,json=hardDeleteTime,proto3,oneof" json:"hard_delete_time,omitempty"` + // Optional. Retention configuration of this object. + // May only be configured if the bucket has object retention enabled. + Retention *Object_Retention `protobuf:"bytes,30,opt,name=retention,proto3" json:"retention,omitempty"` } func (x *Object) Reset() { *x = Object{} - mi := &file_google_storage_v2_storage_proto_msgTypes[48] + mi := &file_google_storage_v2_storage_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5260,7 +5515,7 @@ func (x *Object) String() string { func (*Object) ProtoMessage() {} func (x *Object) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[48] + mi := &file_google_storage_v2_storage_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5273,7 +5528,7 @@ func (x *Object) ProtoReflect() protoreflect.Message { // Deprecated: Use Object.ProtoReflect.Descriptor instead. func (*Object) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{48} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{50} } func (x *Object) GetName() string { @@ -5451,6 +5706,13 @@ func (x *Object) GetMetadata() map[string]string { return nil } +func (x *Object) GetContexts() *ObjectContexts { + if x != nil { + return x.Contexts + } + return nil +} + func (x *Object) GetEventBasedHold() bool { if x != nil && x.EventBasedHold != nil { return *x.EventBasedHold @@ -5493,20 +5755,28 @@ func (x *Object) GetHardDeleteTime() *timestamppb.Timestamp { return nil } +func (x *Object) GetRetention() *Object_Retention { + if x != nil { + return x.Retention + } + return nil +} + // An access-control entry. type ObjectAccessControl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The access permission for the entity. One of the following values: + // Optional. The access permission for the entity. One of the following + // values: // * `READER` // * `WRITER` // * `OWNER` Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - // The ID of the access-control entry. + // Optional. The ID of the access-control entry. Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // The entity holding the permission, in one of the following forms: + // Optional. The entity holding the permission, in one of the following forms: // * `user-{userid}` // * `user-{email}` // * `group-{groupid}` @@ -5528,24 +5798,24 @@ type ObjectAccessControl struct { // Output only. The alternative entity format, if exists. For project // entities, `project-{team}-{projectid}` format will be returned on response. EntityAlt string `protobuf:"bytes,9,opt,name=entity_alt,json=entityAlt,proto3" json:"entity_alt,omitempty"` - // The ID for the entity, if any. + // Optional. The ID for the entity, if any. EntityId string `protobuf:"bytes,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - // The etag of the ObjectAccessControl. + // Optional. The etag of the ObjectAccessControl. // If included in the metadata of an update or delete request message, the // operation will only be performed if the etag matches that of the live // object's ObjectAccessControl. Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` - // The email address associated with the entity, if any. + // Optional. The email address associated with the entity, if any. Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` - // The domain associated with the entity, if any. + // Optional. The domain associated with the entity, if any. Domain string `protobuf:"bytes,6,opt,name=domain,proto3" json:"domain,omitempty"` - // The project team associated with the entity, if any. + // Optional. The project team associated with the entity, if any. ProjectTeam *ProjectTeam `protobuf:"bytes,7,opt,name=project_team,json=projectTeam,proto3" json:"project_team,omitempty"` } func (x *ObjectAccessControl) Reset() { *x = ObjectAccessControl{} - mi := &file_google_storage_v2_storage_proto_msgTypes[49] + mi := &file_google_storage_v2_storage_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5557,7 +5827,7 @@ func (x *ObjectAccessControl) String() string { func (*ObjectAccessControl) ProtoMessage() {} func (x *ObjectAccessControl) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[49] + mi := &file_google_storage_v2_storage_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5570,7 +5840,7 @@ func (x *ObjectAccessControl) ProtoReflect() protoreflect.Message { // Deprecated: Use ObjectAccessControl.ProtoReflect.Descriptor instead. func (*ObjectAccessControl) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{49} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{51} } func (x *ObjectAccessControl) GetRole() string { @@ -5654,7 +5924,7 @@ type ListObjectsResponse struct { func (x *ListObjectsResponse) Reset() { *x = ListObjectsResponse{} - mi := &file_google_storage_v2_storage_proto_msgTypes[50] + mi := &file_google_storage_v2_storage_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5666,7 +5936,7 @@ func (x *ListObjectsResponse) String() string { func (*ListObjectsResponse) ProtoMessage() {} func (x *ListObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[50] + mi := &file_google_storage_v2_storage_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5679,7 +5949,7 @@ func (x *ListObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListObjectsResponse.ProtoReflect.Descriptor instead. func (*ListObjectsResponse) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{50} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{52} } func (x *ListObjectsResponse) GetObjects() []*Object { @@ -5709,15 +5979,15 @@ type ProjectTeam struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The project number. + // Optional. The project number. ProjectNumber string `protobuf:"bytes,1,opt,name=project_number,json=projectNumber,proto3" json:"project_number,omitempty"` - // The team. + // Optional. The team. Team string `protobuf:"bytes,2,opt,name=team,proto3" json:"team,omitempty"` } func (x *ProjectTeam) Reset() { *x = ProjectTeam{} - mi := &file_google_storage_v2_storage_proto_msgTypes[51] + mi := &file_google_storage_v2_storage_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5729,7 +5999,7 @@ func (x *ProjectTeam) String() string { func (*ProjectTeam) ProtoMessage() {} func (x *ProjectTeam) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[51] + mi := &file_google_storage_v2_storage_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5742,7 +6012,7 @@ func (x *ProjectTeam) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectTeam.ProtoReflect.Descriptor instead. func (*ProjectTeam) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{51} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{53} } func (x *ProjectTeam) GetProjectNumber() string { @@ -5765,15 +6035,15 @@ type Owner struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The entity, in the form `user-`*userId*. + // Optional. The entity, in the form `user-`*userId*. Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` - // The ID for the entity. + // Optional. The ID for the entity. EntityId string `protobuf:"bytes,2,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` } func (x *Owner) Reset() { *x = Owner{} - mi := &file_google_storage_v2_storage_proto_msgTypes[52] + mi := &file_google_storage_v2_storage_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5785,7 +6055,7 @@ func (x *Owner) String() string { func (*Owner) ProtoMessage() {} func (x *Owner) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[52] + mi := &file_google_storage_v2_storage_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5798,7 +6068,7 @@ func (x *Owner) ProtoReflect() protoreflect.Message { // Deprecated: Use Owner.ProtoReflect.Descriptor instead. func (*Owner) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{52} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{54} } func (x *Owner) GetEntity() string { @@ -5831,7 +6101,7 @@ type ContentRange struct { func (x *ContentRange) Reset() { *x = ContentRange{} - mi := &file_google_storage_v2_storage_proto_msgTypes[53] + mi := &file_google_storage_v2_storage_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5843,7 +6113,7 @@ func (x *ContentRange) String() string { func (*ContentRange) ProtoMessage() {} func (x *ContentRange) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[53] + mi := &file_google_storage_v2_storage_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5856,7 +6126,7 @@ func (x *ContentRange) ProtoReflect() protoreflect.Message { // Deprecated: Use ContentRange.ProtoReflect.Descriptor instead. func (*ContentRange) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{53} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{55} } func (x *ContentRange) GetStart() int64 { @@ -5889,15 +6159,15 @@ type ComposeObjectRequest_SourceObject struct { // Required. The source object's name. All source objects must reside in the // same bucket. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The generation of this object to use as the source. + // Optional. The generation of this object to use as the source. Generation int64 `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"` - // Conditions that must be met for this operation to execute. + // Optional. Conditions that must be met for this operation to execute. ObjectPreconditions *ComposeObjectRequest_SourceObject_ObjectPreconditions `protobuf:"bytes,3,opt,name=object_preconditions,json=objectPreconditions,proto3" json:"object_preconditions,omitempty"` } func (x *ComposeObjectRequest_SourceObject) Reset() { *x = ComposeObjectRequest_SourceObject{} - mi := &file_google_storage_v2_storage_proto_msgTypes[54] + mi := &file_google_storage_v2_storage_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5909,7 +6179,7 @@ func (x *ComposeObjectRequest_SourceObject) String() string { func (*ComposeObjectRequest_SourceObject) ProtoMessage() {} func (x *ComposeObjectRequest_SourceObject) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[54] + mi := &file_google_storage_v2_storage_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5960,7 +6230,7 @@ type ComposeObjectRequest_SourceObject_ObjectPreconditions struct { func (x *ComposeObjectRequest_SourceObject_ObjectPreconditions) Reset() { *x = ComposeObjectRequest_SourceObject_ObjectPreconditions{} - mi := &file_google_storage_v2_storage_proto_msgTypes[55] + mi := &file_google_storage_v2_storage_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5972,7 +6242,7 @@ func (x *ComposeObjectRequest_SourceObject_ObjectPreconditions) String() string func (*ComposeObjectRequest_SourceObject_ObjectPreconditions) ProtoMessage() {} func (x *ComposeObjectRequest_SourceObject_ObjectPreconditions) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[55] + mi := &file_google_storage_v2_storage_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6001,13 +6271,13 @@ type Bucket_Billing struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // When set to true, Requester Pays is enabled for this bucket. + // Optional. When set to true, Requester Pays is enabled for this bucket. RequesterPays bool `protobuf:"varint,1,opt,name=requester_pays,json=requesterPays,proto3" json:"requester_pays,omitempty"` } func (x *Bucket_Billing) Reset() { *x = Bucket_Billing{} - mi := &file_google_storage_v2_storage_proto_msgTypes[56] + mi := &file_google_storage_v2_storage_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6019,7 +6289,7 @@ func (x *Bucket_Billing) String() string { func (*Bucket_Billing) ProtoMessage() {} func (x *Bucket_Billing) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[56] + mi := &file_google_storage_v2_storage_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6051,19 +6321,20 @@ type Bucket_Cors struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The list of Origins eligible to receive CORS response headers. See - // [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. + // Optional. The list of Origins eligible to receive CORS response headers. + // See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. // Note: "*" is permitted in the list of origins, and means "any Origin". Origin []string `protobuf:"bytes,1,rep,name=origin,proto3" json:"origin,omitempty"` - // The list of HTTP methods on which to include CORS response headers, + // Optional. The list of HTTP methods on which to include CORS response + // headers, // (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of // methods, and means "any method". Method []string `protobuf:"bytes,2,rep,name=method,proto3" json:"method,omitempty"` - // The list of HTTP headers other than the + // Optional. The list of HTTP headers other than the // [https://www.w3.org/TR/cors/#simple-response-header][simple response // headers] to give permission for the user-agent to share across domains. ResponseHeader []string `protobuf:"bytes,3,rep,name=response_header,json=responseHeader,proto3" json:"response_header,omitempty"` - // The value, in seconds, to return in the + // Optional. The value, in seconds, to return in the // [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age // header] used in preflight responses. MaxAgeSeconds int32 `protobuf:"varint,4,opt,name=max_age_seconds,json=maxAgeSeconds,proto3" json:"max_age_seconds,omitempty"` @@ -6071,7 +6342,7 @@ type Bucket_Cors struct { func (x *Bucket_Cors) Reset() { *x = Bucket_Cors{} - mi := &file_google_storage_v2_storage_proto_msgTypes[57] + mi := &file_google_storage_v2_storage_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6083,7 +6354,7 @@ func (x *Bucket_Cors) String() string { func (*Bucket_Cors) ProtoMessage() {} func (x *Bucket_Cors) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[57] + mi := &file_google_storage_v2_storage_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6133,14 +6404,29 @@ type Bucket_Encryption struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the Cloud KMS key that will be used to encrypt objects - // inserted into this bucket, if no encryption method is specified. + // Optional. The name of the Cloud KMS key that will be used to encrypt + // objects inserted into this bucket, if no encryption method is specified. DefaultKmsKey string `protobuf:"bytes,1,opt,name=default_kms_key,json=defaultKmsKey,proto3" json:"default_kms_key,omitempty"` + // Optional. If omitted, then new objects with GMEK encryption-type is + // allowed. If set, then new objects created in this bucket must comply with + // enforcement config. Changing this has no effect on existing objects; it + // applies to new objects only. + GoogleManagedEncryptionEnforcementConfig *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig `protobuf:"bytes,2,opt,name=google_managed_encryption_enforcement_config,json=googleManagedEncryptionEnforcementConfig,proto3,oneof" json:"google_managed_encryption_enforcement_config,omitempty"` + // Optional. If omitted, then new objects with CMEK encryption-type is + // allowed. If set, then new objects created in this bucket must comply with + // enforcement config. Changing this has no effect on existing objects; it + // applies to new objects only. + CustomerManagedEncryptionEnforcementConfig *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig `protobuf:"bytes,3,opt,name=customer_managed_encryption_enforcement_config,json=customerManagedEncryptionEnforcementConfig,proto3,oneof" json:"customer_managed_encryption_enforcement_config,omitempty"` + // Optional. If omitted, then new objects with CSEK encryption-type is + // allowed. If set, then new objects created in this bucket must comply with + // enforcement config. Changing this has no effect on existing objects; it + // applies to new objects only. + CustomerSuppliedEncryptionEnforcementConfig *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig `protobuf:"bytes,4,opt,name=customer_supplied_encryption_enforcement_config,json=customerSuppliedEncryptionEnforcementConfig,proto3,oneof" json:"customer_supplied_encryption_enforcement_config,omitempty"` } func (x *Bucket_Encryption) Reset() { *x = Bucket_Encryption{} - mi := &file_google_storage_v2_storage_proto_msgTypes[58] + mi := &file_google_storage_v2_storage_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6152,7 +6438,7 @@ func (x *Bucket_Encryption) String() string { func (*Bucket_Encryption) ProtoMessage() {} func (x *Bucket_Encryption) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[58] + mi := &file_google_storage_v2_storage_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6175,22 +6461,43 @@ func (x *Bucket_Encryption) GetDefaultKmsKey() string { return "" } -// Bucket restriction options. -type Bucket_IamConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Bucket restriction options currently enforced on the bucket. - UniformBucketLevelAccess *Bucket_IamConfig_UniformBucketLevelAccess `protobuf:"bytes,1,opt,name=uniform_bucket_level_access,json=uniformBucketLevelAccess,proto3" json:"uniform_bucket_level_access,omitempty"` - // Whether IAM will enforce public access prevention. Valid values are - // "enforced" or "inherited". - PublicAccessPrevention string `protobuf:"bytes,3,opt,name=public_access_prevention,json=publicAccessPrevention,proto3" json:"public_access_prevention,omitempty"` +func (x *Bucket_Encryption) GetGoogleManagedEncryptionEnforcementConfig() *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig { + if x != nil { + return x.GoogleManagedEncryptionEnforcementConfig + } + return nil } -func (x *Bucket_IamConfig) Reset() { +func (x *Bucket_Encryption) GetCustomerManagedEncryptionEnforcementConfig() *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig { + if x != nil { + return x.CustomerManagedEncryptionEnforcementConfig + } + return nil +} + +func (x *Bucket_Encryption) GetCustomerSuppliedEncryptionEnforcementConfig() *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig { + if x != nil { + return x.CustomerSuppliedEncryptionEnforcementConfig + } + return nil +} + +// Bucket restriction options. +type Bucket_IamConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Bucket restriction options currently enforced on the bucket. + UniformBucketLevelAccess *Bucket_IamConfig_UniformBucketLevelAccess `protobuf:"bytes,1,opt,name=uniform_bucket_level_access,json=uniformBucketLevelAccess,proto3" json:"uniform_bucket_level_access,omitempty"` + // Optional. Whether IAM will enforce public access prevention. Valid values + // are "enforced" or "inherited". + PublicAccessPrevention string `protobuf:"bytes,3,opt,name=public_access_prevention,json=publicAccessPrevention,proto3" json:"public_access_prevention,omitempty"` +} + +func (x *Bucket_IamConfig) Reset() { *x = Bucket_IamConfig{} - mi := &file_google_storage_v2_storage_proto_msgTypes[59] + mi := &file_google_storage_v2_storage_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6202,7 +6509,7 @@ func (x *Bucket_IamConfig) String() string { func (*Bucket_IamConfig) ProtoMessage() {} func (x *Bucket_IamConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[59] + mi := &file_google_storage_v2_storage_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6239,14 +6546,14 @@ type Bucket_Lifecycle struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A lifecycle management rule, which is made of an action to take and the - // condition(s) under which the action will be taken. + // Optional. A lifecycle management rule, which is made of an action to take + // and the condition(s) under which the action will be taken. Rule []*Bucket_Lifecycle_Rule `protobuf:"bytes,1,rep,name=rule,proto3" json:"rule,omitempty"` } func (x *Bucket_Lifecycle) Reset() { *x = Bucket_Lifecycle{} - mi := &file_google_storage_v2_storage_proto_msgTypes[60] + mi := &file_google_storage_v2_storage_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6258,7 +6565,7 @@ func (x *Bucket_Lifecycle) String() string { func (*Bucket_Lifecycle) ProtoMessage() {} func (x *Bucket_Lifecycle) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[60] + mi := &file_google_storage_v2_storage_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6287,16 +6594,16 @@ type Bucket_Logging struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The destination bucket where the current bucket's logs should be placed, - // using path format (like `projects/123456/buckets/foo`). + // Optional. The destination bucket where the current bucket's logs should + // be placed, using path format (like `projects/123456/buckets/foo`). LogBucket string `protobuf:"bytes,1,opt,name=log_bucket,json=logBucket,proto3" json:"log_bucket,omitempty"` - // A prefix for log object names. + // Optional. A prefix for log object names. LogObjectPrefix string `protobuf:"bytes,2,opt,name=log_object_prefix,json=logObjectPrefix,proto3" json:"log_object_prefix,omitempty"` } func (x *Bucket_Logging) Reset() { *x = Bucket_Logging{} - mi := &file_google_storage_v2_storage_proto_msgTypes[61] + mi := &file_google_storage_v2_storage_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6308,7 +6615,7 @@ func (x *Bucket_Logging) String() string { func (*Bucket_Logging) ProtoMessage() {} func (x *Bucket_Logging) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[61] + mi := &file_google_storage_v2_storage_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6338,28 +6645,76 @@ func (x *Bucket_Logging) GetLogObjectPrefix() string { return "" } +// Object Retention related properties of a bucket. +type Bucket_ObjectRetention struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Output only. If true, object retention is enabled for the + // bucket. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (x *Bucket_ObjectRetention) Reset() { + *x = Bucket_ObjectRetention{} + mi := &file_google_storage_v2_storage_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_ObjectRetention) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_ObjectRetention) ProtoMessage() {} + +func (x *Bucket_ObjectRetention) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[64] + 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 Bucket_ObjectRetention.ProtoReflect.Descriptor instead. +func (*Bucket_ObjectRetention) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 6} +} + +func (x *Bucket_ObjectRetention) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + // Retention policy properties of a bucket. type Bucket_RetentionPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Server-determined value that indicates the time from which policy was - // enforced and effective. + // Optional. Server-determined value that indicates the time from which + // policy was enforced and effective. EffectiveTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=effective_time,json=effectiveTime,proto3" json:"effective_time,omitempty"` - // Once locked, an object retention policy cannot be modified. + // Optional. Once locked, an object retention policy cannot be modified. IsLocked bool `protobuf:"varint,2,opt,name=is_locked,json=isLocked,proto3" json:"is_locked,omitempty"` - // The duration that objects need to be retained. Retention duration must be - // greater than zero and less than 100 years. Note that enforcement of - // retention periods less than a day is not guaranteed. Such periods should - // only be used for testing purposes. Any `nanos` value specified will be - // rounded down to the nearest second. + // Optional. The duration that objects need to be retained. Retention + // duration must be greater than zero and less than 100 years. Note that + // enforcement of retention periods less than a day is not guaranteed. Such + // periods should only be used for testing purposes. Any `nanos` value + // specified will be rounded down to the nearest second. RetentionDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=retention_duration,json=retentionDuration,proto3" json:"retention_duration,omitempty"` } func (x *Bucket_RetentionPolicy) Reset() { *x = Bucket_RetentionPolicy{} - mi := &file_google_storage_v2_storage_proto_msgTypes[62] + mi := &file_google_storage_v2_storage_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6371,7 +6726,7 @@ func (x *Bucket_RetentionPolicy) String() string { func (*Bucket_RetentionPolicy) ProtoMessage() {} func (x *Bucket_RetentionPolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[62] + mi := &file_google_storage_v2_storage_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6384,7 +6739,7 @@ func (x *Bucket_RetentionPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_RetentionPolicy.ProtoReflect.Descriptor instead. func (*Bucket_RetentionPolicy) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 6} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 7} } func (x *Bucket_RetentionPolicy) GetEffectiveTime() *timestamppb.Timestamp { @@ -6424,7 +6779,7 @@ type Bucket_SoftDeletePolicy struct { func (x *Bucket_SoftDeletePolicy) Reset() { *x = Bucket_SoftDeletePolicy{} - mi := &file_google_storage_v2_storage_proto_msgTypes[63] + mi := &file_google_storage_v2_storage_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6436,7 +6791,7 @@ func (x *Bucket_SoftDeletePolicy) String() string { func (*Bucket_SoftDeletePolicy) ProtoMessage() {} func (x *Bucket_SoftDeletePolicy) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[63] + mi := &file_google_storage_v2_storage_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6449,7 +6804,7 @@ func (x *Bucket_SoftDeletePolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_SoftDeletePolicy.ProtoReflect.Descriptor instead. func (*Bucket_SoftDeletePolicy) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 7} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 8} } func (x *Bucket_SoftDeletePolicy) GetRetentionDuration() *durationpb.Duration { @@ -6474,13 +6829,13 @@ type Bucket_Versioning struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // While set to true, versioning is fully enabled for this bucket. + // Optional. While set to true, versioning is fully enabled for this bucket. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` } func (x *Bucket_Versioning) Reset() { *x = Bucket_Versioning{} - mi := &file_google_storage_v2_storage_proto_msgTypes[64] + mi := &file_google_storage_v2_storage_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6492,7 +6847,7 @@ func (x *Bucket_Versioning) String() string { func (*Bucket_Versioning) ProtoMessage() {} func (x *Bucket_Versioning) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[64] + mi := &file_google_storage_v2_storage_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6505,7 +6860,7 @@ func (x *Bucket_Versioning) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_Versioning.ProtoReflect.Descriptor instead. func (*Bucket_Versioning) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 8} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 9} } func (x *Bucket_Versioning) GetEnabled() bool { @@ -6523,12 +6878,12 @@ type Bucket_Website struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If the requested object path is missing, the service will ensure the path - // has a trailing '/', append this suffix, and attempt to retrieve the - // resulting object. This allows the creation of `index.html` + // Optional. If the requested object path is missing, the service will + // ensure the path has a trailing '/', append this suffix, and attempt to + // retrieve the resulting object. This allows the creation of `index.html` // objects to represent directory pages. MainPageSuffix string `protobuf:"bytes,1,opt,name=main_page_suffix,json=mainPageSuffix,proto3" json:"main_page_suffix,omitempty"` - // If the requested object path is missing, and any + // Optional. If the requested object path is missing, and any // `mainPageSuffix` object is missing, if applicable, the service // will return the named object from this bucket as the content for a // [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found] @@ -6538,7 +6893,7 @@ type Bucket_Website struct { func (x *Bucket_Website) Reset() { *x = Bucket_Website{} - mi := &file_google_storage_v2_storage_proto_msgTypes[65] + mi := &file_google_storage_v2_storage_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6550,7 +6905,7 @@ func (x *Bucket_Website) String() string { func (*Bucket_Website) ProtoMessage() {} func (x *Bucket_Website) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[65] + mi := &file_google_storage_v2_storage_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6563,7 +6918,7 @@ func (x *Bucket_Website) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_Website.ProtoReflect.Descriptor instead. func (*Bucket_Website) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 9} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 10} } func (x *Bucket_Website) GetMainPageSuffix() string { @@ -6582,19 +6937,19 @@ func (x *Bucket_Website) GetNotFoundPage() string { // Configuration for Custom Dual Regions. It should specify precisely two // eligible regions within the same Multiregion. More information on regions -// may be found [https://cloud.google.com/storage/docs/locations][here]. +// may be found [here](https://cloud.google.com/storage/docs/locations). type Bucket_CustomPlacementConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of locations to use for data placement. + // Optional. List of locations to use for data placement. DataLocations []string `protobuf:"bytes,1,rep,name=data_locations,json=dataLocations,proto3" json:"data_locations,omitempty"` } func (x *Bucket_CustomPlacementConfig) Reset() { *x = Bucket_CustomPlacementConfig{} - mi := &file_google_storage_v2_storage_proto_msgTypes[66] + mi := &file_google_storage_v2_storage_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6606,7 +6961,7 @@ func (x *Bucket_CustomPlacementConfig) String() string { func (*Bucket_CustomPlacementConfig) ProtoMessage() {} func (x *Bucket_CustomPlacementConfig) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[66] + mi := &file_google_storage_v2_storage_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6619,7 +6974,7 @@ func (x *Bucket_CustomPlacementConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_CustomPlacementConfig.ProtoReflect.Descriptor instead. func (*Bucket_CustomPlacementConfig) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 10} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 11} } func (x *Bucket_CustomPlacementConfig) GetDataLocations() []string { @@ -6635,7 +6990,7 @@ type Bucket_Autoclass struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Enables Autoclass. + // Optional. Enables Autoclass. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // Output only. Latest instant at which the `enabled` field was set to true // after being disabled/unconfigured or set to false after being enabled. If @@ -6653,7 +7008,7 @@ type Bucket_Autoclass struct { func (x *Bucket_Autoclass) Reset() { *x = Bucket_Autoclass{} - mi := &file_google_storage_v2_storage_proto_msgTypes[67] + mi := &file_google_storage_v2_storage_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6665,7 +7020,7 @@ func (x *Bucket_Autoclass) String() string { func (*Bucket_Autoclass) ProtoMessage() {} func (x *Bucket_Autoclass) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[67] + mi := &file_google_storage_v2_storage_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6678,7 +7033,7 @@ func (x *Bucket_Autoclass) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_Autoclass.ProtoReflect.Descriptor instead. func (*Bucket_Autoclass) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 11} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 12} } func (x *Bucket_Autoclass) GetEnabled() bool { @@ -6709,6 +7064,102 @@ func (x *Bucket_Autoclass) GetTerminalStorageClassUpdateTime() *timestamppb.Time return nil } +// The [bucket IP +// filtering](https://cloud.google.com/storage/docs/ip-filtering-overview) +// configuration. Specifies the network sources that can access the bucket, as +// well as its underlying objects. +type Bucket_IpFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The state of the IP filter configuration. Valid values are `Enabled` and + // `Disabled`. When set to `Enabled`, IP filtering rules are applied to a + // bucket and all incoming requests to the bucket are evaluated against + // these rules. When set to `Disabled`, IP filtering rules are not applied + // to a bucket.". + Mode *string `protobuf:"bytes,1,opt,name=mode,proto3,oneof" json:"mode,omitempty"` + // Public IPs allowed to operate or access the bucket. + PublicNetworkSource *Bucket_IpFilter_PublicNetworkSource `protobuf:"bytes,2,opt,name=public_network_source,json=publicNetworkSource,proto3,oneof" json:"public_network_source,omitempty"` + // Optional. The list of network sources that are allowed to access + // operations on the bucket or the underlying objects. + VpcNetworkSources []*Bucket_IpFilter_VpcNetworkSource `protobuf:"bytes,3,rep,name=vpc_network_sources,json=vpcNetworkSources,proto3" json:"vpc_network_sources,omitempty"` + // Optional. Whether or not to allow VPCs from orgs different than the + // bucket's parent org to access the bucket. When set to true, validations + // on the existence of the VPCs won't be performed. If set to false, each + // VPC network source will be checked to belong to the same org as the + // bucket as well as validated for existence. + AllowCrossOrgVpcs bool `protobuf:"varint,4,opt,name=allow_cross_org_vpcs,json=allowCrossOrgVpcs,proto3" json:"allow_cross_org_vpcs,omitempty"` + // Whether or not to allow all P4SA access to the bucket. When set to true, + // IP filter config validation will not apply. + AllowAllServiceAgentAccess *bool `protobuf:"varint,5,opt,name=allow_all_service_agent_access,json=allowAllServiceAgentAccess,proto3,oneof" json:"allow_all_service_agent_access,omitempty"` +} + +func (x *Bucket_IpFilter) Reset() { + *x = Bucket_IpFilter{} + mi := &file_google_storage_v2_storage_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_IpFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_IpFilter) ProtoMessage() {} + +func (x *Bucket_IpFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[71] + 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 Bucket_IpFilter.ProtoReflect.Descriptor instead. +func (*Bucket_IpFilter) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 13} +} + +func (x *Bucket_IpFilter) GetMode() string { + if x != nil && x.Mode != nil { + return *x.Mode + } + return "" +} + +func (x *Bucket_IpFilter) GetPublicNetworkSource() *Bucket_IpFilter_PublicNetworkSource { + if x != nil { + return x.PublicNetworkSource + } + return nil +} + +func (x *Bucket_IpFilter) GetVpcNetworkSources() []*Bucket_IpFilter_VpcNetworkSource { + if x != nil { + return x.VpcNetworkSources + } + return nil +} + +func (x *Bucket_IpFilter) GetAllowCrossOrgVpcs() bool { + if x != nil { + return x.AllowCrossOrgVpcs + } + return false +} + +func (x *Bucket_IpFilter) GetAllowAllServiceAgentAccess() bool { + if x != nil && x.AllowAllServiceAgentAccess != nil { + return *x.AllowAllServiceAgentAccess + } + return false +} + // Configuration for a bucket's hierarchical namespace feature. type Bucket_HierarchicalNamespace struct { state protoimpl.MessageState @@ -6721,7 +7172,7 @@ type Bucket_HierarchicalNamespace struct { func (x *Bucket_HierarchicalNamespace) Reset() { *x = Bucket_HierarchicalNamespace{} - mi := &file_google_storage_v2_storage_proto_msgTypes[68] + mi := &file_google_storage_v2_storage_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6733,7 +7184,7 @@ func (x *Bucket_HierarchicalNamespace) String() string { func (*Bucket_HierarchicalNamespace) ProtoMessage() {} func (x *Bucket_HierarchicalNamespace) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[68] + mi := &file_google_storage_v2_storage_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6746,7 +7197,7 @@ func (x *Bucket_HierarchicalNamespace) ProtoReflect() protoreflect.Message { // Deprecated: Use Bucket_HierarchicalNamespace.ProtoReflect.Descriptor instead. func (*Bucket_HierarchicalNamespace) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 12} + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 14} } func (x *Bucket_HierarchicalNamespace) GetEnabled() bool { @@ -6756,37 +7207,38 @@ func (x *Bucket_HierarchicalNamespace) GetEnabled() bool { return false } -// Settings for Uniform Bucket level access. -// See https://cloud.google.com/storage/docs/uniform-bucket-level-access. -type Bucket_IamConfig_UniformBucketLevelAccess struct { +// Google Managed Encryption (GMEK) enforcement config of a bucket. +type Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If set, access checks only use bucket-level IAM policies or above. - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - // The deadline time for changing - // `iam_config.uniform_bucket_level_access.enabled` from `true` to - // `false`. Mutable until the specified deadline is reached, but not - // afterward. - LockTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // Restriction mode for google-managed encryption for new objects within + // the bucket. Valid values are: "NotRestricted", "FullyRestricted". + // If `NotRestricted` or unset, creation of new objects with + // google-managed encryption is allowed. + // If `FullyRestricted`, new objects can't be created using google-managed + // encryption. + RestrictionMode *string `protobuf:"bytes,3,opt,name=restriction_mode,json=restrictionMode,proto3,oneof" json:"restriction_mode,omitempty"` + // Time from which the config was effective. This is service-provided. + EffectiveTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=effective_time,json=effectiveTime,proto3,oneof" json:"effective_time,omitempty"` } -func (x *Bucket_IamConfig_UniformBucketLevelAccess) Reset() { - *x = Bucket_IamConfig_UniformBucketLevelAccess{} - mi := &file_google_storage_v2_storage_proto_msgTypes[70] +func (x *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) Reset() { + *x = Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig{} + mi := &file_google_storage_v2_storage_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Bucket_IamConfig_UniformBucketLevelAccess) String() string { +func (x *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bucket_IamConfig_UniformBucketLevelAccess) ProtoMessage() {} +func (*Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) ProtoMessage() {} -func (x *Bucket_IamConfig_UniformBucketLevelAccess) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[70] +func (x *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6797,53 +7249,57 @@ func (x *Bucket_IamConfig_UniformBucketLevelAccess) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use Bucket_IamConfig_UniformBucketLevelAccess.ProtoReflect.Descriptor instead. -func (*Bucket_IamConfig_UniformBucketLevelAccess) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 3, 0} +// Deprecated: Use Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig.ProtoReflect.Descriptor instead. +func (*Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 2, 0} } -func (x *Bucket_IamConfig_UniformBucketLevelAccess) GetEnabled() bool { - if x != nil { - return x.Enabled +func (x *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) GetRestrictionMode() string { + if x != nil && x.RestrictionMode != nil { + return *x.RestrictionMode } - return false + return "" } -func (x *Bucket_IamConfig_UniformBucketLevelAccess) GetLockTime() *timestamppb.Timestamp { +func (x *Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig) GetEffectiveTime() *timestamppb.Timestamp { if x != nil { - return x.LockTime + return x.EffectiveTime } return nil } -// A lifecycle Rule, combining an action to take on an object and a -// condition which will trigger that action. -type Bucket_Lifecycle_Rule struct { +// Customer Managed Encryption (CMEK) enforcement config of a bucket. +type Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The action to take. - Action *Bucket_Lifecycle_Rule_Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` - // The condition(s) under which the action will be taken. - Condition *Bucket_Lifecycle_Rule_Condition `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"` + // Restriction mode for customer-managed encryption for new objects within + // the bucket. Valid values are: "NotRestricted", "FullyRestricted". + // If `NotRestricted` or unset, creation of new objects with + // customer-managed encryption is allowed. + // If `FullyRestricted`, new objects can't be created using + // customer-managed encryption. + RestrictionMode *string `protobuf:"bytes,3,opt,name=restriction_mode,json=restrictionMode,proto3,oneof" json:"restriction_mode,omitempty"` + // Time from which the config was effective. This is service-provided. + EffectiveTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=effective_time,json=effectiveTime,proto3,oneof" json:"effective_time,omitempty"` } -func (x *Bucket_Lifecycle_Rule) Reset() { - *x = Bucket_Lifecycle_Rule{} - mi := &file_google_storage_v2_storage_proto_msgTypes[71] +func (x *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) Reset() { + *x = Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig{} + mi := &file_google_storage_v2_storage_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Bucket_Lifecycle_Rule) String() string { +func (x *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bucket_Lifecycle_Rule) ProtoMessage() {} +func (*Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) ProtoMessage() {} -func (x *Bucket_Lifecycle_Rule) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[71] +func (x *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6854,54 +7310,58 @@ func (x *Bucket_Lifecycle_Rule) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bucket_Lifecycle_Rule.ProtoReflect.Descriptor instead. -func (*Bucket_Lifecycle_Rule) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 4, 0} +// Deprecated: Use Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig.ProtoReflect.Descriptor instead. +func (*Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 2, 1} } -func (x *Bucket_Lifecycle_Rule) GetAction() *Bucket_Lifecycle_Rule_Action { - if x != nil { - return x.Action +func (x *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) GetRestrictionMode() string { + if x != nil && x.RestrictionMode != nil { + return *x.RestrictionMode } - return nil + return "" } -func (x *Bucket_Lifecycle_Rule) GetCondition() *Bucket_Lifecycle_Rule_Condition { +func (x *Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig) GetEffectiveTime() *timestamppb.Timestamp { if x != nil { - return x.Condition + return x.EffectiveTime } return nil } -// An action to take on an object. -type Bucket_Lifecycle_Rule_Action struct { +// Customer Supplied Encryption (CSEK) enforcement config of a bucket. +type Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Type of the action. Currently, only `Delete`, `SetStorageClass`, and - // `AbortIncompleteMultipartUpload` are supported. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Target storage class. Required iff the type of the action is - // SetStorageClass. - StorageClass string `protobuf:"bytes,2,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` + // Restriction mode for customer-supplied encryption for new objects + // within the bucket. Valid values are: "NotRestricted", + // "FullyRestricted". + // If `NotRestricted` or unset, creation of new objects with + // customer-supplied encryption is allowed. + // If `FullyRestricted`, new objects can't be created using + // customer-supplied encryption. + RestrictionMode *string `protobuf:"bytes,3,opt,name=restriction_mode,json=restrictionMode,proto3,oneof" json:"restriction_mode,omitempty"` + // Time from which the config was effective. This is service-provided. + EffectiveTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=effective_time,json=effectiveTime,proto3,oneof" json:"effective_time,omitempty"` } -func (x *Bucket_Lifecycle_Rule_Action) Reset() { - *x = Bucket_Lifecycle_Rule_Action{} - mi := &file_google_storage_v2_storage_proto_msgTypes[72] +func (x *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) Reset() { + *x = Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig{} + mi := &file_google_storage_v2_storage_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Bucket_Lifecycle_Rule_Action) String() string { +func (x *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bucket_Lifecycle_Rule_Action) ProtoMessage() {} +func (*Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) ProtoMessage() {} -func (x *Bucket_Lifecycle_Rule_Action) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[72] +func (x *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6912,58 +7372,235 @@ func (x *Bucket_Lifecycle_Rule_Action) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bucket_Lifecycle_Rule_Action.ProtoReflect.Descriptor instead. -func (*Bucket_Lifecycle_Rule_Action) Descriptor() ([]byte, []int) { - return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 4, 0, 0} +// Deprecated: Use Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig.ProtoReflect.Descriptor instead. +func (*Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 2, 2} } -func (x *Bucket_Lifecycle_Rule_Action) GetType() string { - if x != nil { - return x.Type +func (x *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) GetRestrictionMode() string { + if x != nil && x.RestrictionMode != nil { + return *x.RestrictionMode } return "" } -func (x *Bucket_Lifecycle_Rule_Action) GetStorageClass() string { +func (x *Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig) GetEffectiveTime() *timestamppb.Timestamp { if x != nil { - return x.StorageClass + return x.EffectiveTime } - return "" + return nil } -// A condition of an object which triggers some action. -type Bucket_Lifecycle_Rule_Condition struct { +// Settings for Uniform Bucket level access. +// See https://cloud.google.com/storage/docs/uniform-bucket-level-access. +type Bucket_IamConfig_UniformBucketLevelAccess struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Age of an object (in days). This condition is satisfied when an - // object reaches the specified age. - // A value of 0 indicates that all objects immediately match this - // condition. - AgeDays *int32 `protobuf:"varint,1,opt,name=age_days,json=ageDays,proto3,oneof" json:"age_days,omitempty"` - // This condition is satisfied when an object is created before midnight - // of the specified date in UTC. - CreatedBefore *date.Date `protobuf:"bytes,2,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"` - // Relevant only for versioned objects. If the value is - // `true`, this condition matches live objects; if the value - // is `false`, it matches archived objects. - IsLive *bool `protobuf:"varint,3,opt,name=is_live,json=isLive,proto3,oneof" json:"is_live,omitempty"` - // Relevant only for versioned objects. If the value is N, this - // condition is satisfied when there are at least N versions (including - // the live version) newer than this version of the object. - NumNewerVersions *int32 `protobuf:"varint,4,opt,name=num_newer_versions,json=numNewerVersions,proto3,oneof" json:"num_newer_versions,omitempty"` - // Objects having any of the storage classes specified by this condition - // will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`, - // `NEARLINE`, `COLDLINE`, `STANDARD`, and - // `DURABLE_REDUCED_AVAILABILITY`. - MatchesStorageClass []string `protobuf:"bytes,5,rep,name=matches_storage_class,json=matchesStorageClass,proto3" json:"matches_storage_class,omitempty"` - // Number of days that have elapsed since the custom timestamp set on an - // object. - // The value of the field must be a nonnegative integer. + // Optional. If set, access checks only use bucket-level IAM policies or + // above. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Optional. The deadline time for changing + // `iam_config.uniform_bucket_level_access.enabled` from `true` to + // `false`. Mutable until the specified deadline is reached, but not + // afterward. + LockTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` +} + +func (x *Bucket_IamConfig_UniformBucketLevelAccess) Reset() { + *x = Bucket_IamConfig_UniformBucketLevelAccess{} + mi := &file_google_storage_v2_storage_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_IamConfig_UniformBucketLevelAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_IamConfig_UniformBucketLevelAccess) ProtoMessage() {} + +func (x *Bucket_IamConfig_UniformBucketLevelAccess) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[77] + 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 Bucket_IamConfig_UniformBucketLevelAccess.ProtoReflect.Descriptor instead. +func (*Bucket_IamConfig_UniformBucketLevelAccess) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 3, 0} +} + +func (x *Bucket_IamConfig_UniformBucketLevelAccess) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *Bucket_IamConfig_UniformBucketLevelAccess) GetLockTime() *timestamppb.Timestamp { + if x != nil { + return x.LockTime + } + return nil +} + +// A lifecycle Rule, combining an action to take on an object and a +// condition which will trigger that action. +type Bucket_Lifecycle_Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The action to take. + Action *Bucket_Lifecycle_Rule_Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` + // Optional. The condition(s) under which the action will be taken. + Condition *Bucket_Lifecycle_Rule_Condition `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"` +} + +func (x *Bucket_Lifecycle_Rule) Reset() { + *x = Bucket_Lifecycle_Rule{} + mi := &file_google_storage_v2_storage_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_Lifecycle_Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_Lifecycle_Rule) ProtoMessage() {} + +func (x *Bucket_Lifecycle_Rule) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[78] + 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 Bucket_Lifecycle_Rule.ProtoReflect.Descriptor instead. +func (*Bucket_Lifecycle_Rule) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 4, 0} +} + +func (x *Bucket_Lifecycle_Rule) GetAction() *Bucket_Lifecycle_Rule_Action { + if x != nil { + return x.Action + } + return nil +} + +func (x *Bucket_Lifecycle_Rule) GetCondition() *Bucket_Lifecycle_Rule_Condition { + if x != nil { + return x.Condition + } + return nil +} + +// An action to take on an object. +type Bucket_Lifecycle_Rule_Action struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Type of the action. Currently, only `Delete`, + // `SetStorageClass`, and `AbortIncompleteMultipartUpload` are + // supported. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Optional. Target storage class. Required iff the type of the action + // is SetStorageClass. + StorageClass string `protobuf:"bytes,2,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` +} + +func (x *Bucket_Lifecycle_Rule_Action) Reset() { + *x = Bucket_Lifecycle_Rule_Action{} + mi := &file_google_storage_v2_storage_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_Lifecycle_Rule_Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_Lifecycle_Rule_Action) ProtoMessage() {} + +func (x *Bucket_Lifecycle_Rule_Action) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[79] + 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 Bucket_Lifecycle_Rule_Action.ProtoReflect.Descriptor instead. +func (*Bucket_Lifecycle_Rule_Action) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 4, 0, 0} +} + +func (x *Bucket_Lifecycle_Rule_Action) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Bucket_Lifecycle_Rule_Action) GetStorageClass() string { + if x != nil { + return x.StorageClass + } + return "" +} + +// A condition of an object which triggers some action. +type Bucket_Lifecycle_Rule_Condition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Age of an object (in days). This condition is satisfied when an + // object reaches the specified age. + // A value of 0 indicates that all objects immediately match this + // condition. + AgeDays *int32 `protobuf:"varint,1,opt,name=age_days,json=ageDays,proto3,oneof" json:"age_days,omitempty"` + // Optional. This condition is satisfied when an object is created + // before midnight of the specified date in UTC. + CreatedBefore *date.Date `protobuf:"bytes,2,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"` + // Relevant only for versioned objects. If the value is + // `true`, this condition matches live objects; if the value + // is `false`, it matches archived objects. + IsLive *bool `protobuf:"varint,3,opt,name=is_live,json=isLive,proto3,oneof" json:"is_live,omitempty"` + // Relevant only for versioned objects. If the value is N, this + // condition is satisfied when there are at least N versions (including + // the live version) newer than this version of the object. + NumNewerVersions *int32 `protobuf:"varint,4,opt,name=num_newer_versions,json=numNewerVersions,proto3,oneof" json:"num_newer_versions,omitempty"` + // Optional. Objects having any of the storage classes specified by this + // condition will be matched. Values include `MULTI_REGIONAL`, + // `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and + // `DURABLE_REDUCED_AVAILABILITY`. + MatchesStorageClass []string `protobuf:"bytes,5,rep,name=matches_storage_class,json=matchesStorageClass,proto3" json:"matches_storage_class,omitempty"` + // Number of days that have elapsed since the custom timestamp set on an + // object. + // The value of the field must be a nonnegative integer. DaysSinceCustomTime *int32 `protobuf:"varint,7,opt,name=days_since_custom_time,json=daysSinceCustomTime,proto3,oneof" json:"days_since_custom_time,omitempty"` - // An object matches this condition if the custom timestamp set on the - // object is before the specified date in UTC. + // Optional. An object matches this condition if the custom timestamp + // set on the object is before the specified date in UTC. CustomTimeBefore *date.Date `protobuf:"bytes,8,opt,name=custom_time_before,json=customTimeBefore,proto3" json:"custom_time_before,omitempty"` // This condition is relevant only for versioned objects. An object // version satisfies this condition only if these many days have been @@ -6971,21 +7608,21 @@ type Bucket_Lifecycle_Rule_Condition struct { // nonnegative integer. If it's zero, the object version will become // eligible for Lifecycle action as soon as it becomes noncurrent. DaysSinceNoncurrentTime *int32 `protobuf:"varint,9,opt,name=days_since_noncurrent_time,json=daysSinceNoncurrentTime,proto3,oneof" json:"days_since_noncurrent_time,omitempty"` - // This condition is relevant only for versioned objects. An object - // version satisfies this condition only if it became noncurrent before - // the specified date in UTC. + // Optional. This condition is relevant only for versioned objects. An + // object version satisfies this condition only if it became noncurrent + // before the specified date in UTC. NoncurrentTimeBefore *date.Date `protobuf:"bytes,10,opt,name=noncurrent_time_before,json=noncurrentTimeBefore,proto3" json:"noncurrent_time_before,omitempty"` - // List of object name prefixes. If any prefix exactly matches the - // beginning of the object name, the condition evaluates to true. + // Optional. List of object name prefixes. If any prefix exactly matches + // the beginning of the object name, the condition evaluates to true. MatchesPrefix []string `protobuf:"bytes,11,rep,name=matches_prefix,json=matchesPrefix,proto3" json:"matches_prefix,omitempty"` - // List of object name suffixes. If any suffix exactly matches the - // end of the object name, the condition evaluates to true. + // Optional. List of object name suffixes. If any suffix exactly matches + // the end of the object name, the condition evaluates to true. MatchesSuffix []string `protobuf:"bytes,12,rep,name=matches_suffix,json=matchesSuffix,proto3" json:"matches_suffix,omitempty"` } func (x *Bucket_Lifecycle_Rule_Condition) Reset() { *x = Bucket_Lifecycle_Rule_Condition{} - mi := &file_google_storage_v2_storage_proto_msgTypes[73] + mi := &file_google_storage_v2_storage_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6997,7 +7634,7 @@ func (x *Bucket_Lifecycle_Rule_Condition) String() string { func (*Bucket_Lifecycle_Rule_Condition) ProtoMessage() {} func (x *Bucket_Lifecycle_Rule_Condition) ProtoReflect() protoreflect.Message { - mi := &file_google_storage_v2_storage_proto_msgTypes[73] + mi := &file_google_storage_v2_storage_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7090,6 +7727,176 @@ func (x *Bucket_Lifecycle_Rule_Condition) GetMatchesSuffix() []string { return nil } +// The public network IP address ranges that can access the bucket and its +// data. +type Bucket_IpFilter_PublicNetworkSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to + // operate or access the bucket and its underlying objects. + AllowedIpCidrRanges []string `protobuf:"bytes,1,rep,name=allowed_ip_cidr_ranges,json=allowedIpCidrRanges,proto3" json:"allowed_ip_cidr_ranges,omitempty"` +} + +func (x *Bucket_IpFilter_PublicNetworkSource) Reset() { + *x = Bucket_IpFilter_PublicNetworkSource{} + mi := &file_google_storage_v2_storage_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_IpFilter_PublicNetworkSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_IpFilter_PublicNetworkSource) ProtoMessage() {} + +func (x *Bucket_IpFilter_PublicNetworkSource) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[81] + 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 Bucket_IpFilter_PublicNetworkSource.ProtoReflect.Descriptor instead. +func (*Bucket_IpFilter_PublicNetworkSource) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 13, 0} +} + +func (x *Bucket_IpFilter_PublicNetworkSource) GetAllowedIpCidrRanges() []string { + if x != nil { + return x.AllowedIpCidrRanges + } + return nil +} + +// The list of VPC networks that can access the bucket. +type Bucket_IpFilter_VpcNetworkSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the network. + // + // Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME` + Network *string `protobuf:"bytes,1,opt,name=network,proto3,oneof" json:"network,omitempty"` + // Optional. The list of public or private IPv4 and IPv6 CIDR ranges that + // can access the bucket. In the CIDR IP address block, the specified IP + // address must be properly truncated, meaning all the host bits must be + // zero or else the input is considered malformed. For example, + // `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for + // IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not. + AllowedIpCidrRanges []string `protobuf:"bytes,2,rep,name=allowed_ip_cidr_ranges,json=allowedIpCidrRanges,proto3" json:"allowed_ip_cidr_ranges,omitempty"` +} + +func (x *Bucket_IpFilter_VpcNetworkSource) Reset() { + *x = Bucket_IpFilter_VpcNetworkSource{} + mi := &file_google_storage_v2_storage_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Bucket_IpFilter_VpcNetworkSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket_IpFilter_VpcNetworkSource) ProtoMessage() {} + +func (x *Bucket_IpFilter_VpcNetworkSource) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[82] + 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 Bucket_IpFilter_VpcNetworkSource.ProtoReflect.Descriptor instead. +func (*Bucket_IpFilter_VpcNetworkSource) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{43, 13, 1} +} + +func (x *Bucket_IpFilter_VpcNetworkSource) GetNetwork() string { + if x != nil && x.Network != nil { + return *x.Network + } + return "" +} + +func (x *Bucket_IpFilter_VpcNetworkSource) GetAllowedIpCidrRanges() []string { + if x != nil { + return x.AllowedIpCidrRanges + } + return nil +} + +// Specifies retention parameters of the object. Objects under retention +// cannot be deleted or overwritten until their retention expires. +type Object_Retention struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The mode of the Retention. + Mode Object_Retention_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.storage.v2.Object_Retention_Mode" json:"mode,omitempty"` + // Optional. The timestamp that the object needs to be retained until. + // Value cannot be set in the past or more than 100 years in the future. + RetainUntilTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=retain_until_time,json=retainUntilTime,proto3" json:"retain_until_time,omitempty"` +} + +func (x *Object_Retention) Reset() { + *x = Object_Retention{} + mi := &file_google_storage_v2_storage_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Object_Retention) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Object_Retention) ProtoMessage() {} + +func (x *Object_Retention) ProtoReflect() protoreflect.Message { + mi := &file_google_storage_v2_storage_proto_msgTypes[84] + 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 Object_Retention.ProtoReflect.Descriptor instead. +func (*Object_Retention) Descriptor() ([]byte, []int) { + return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{50, 0} +} + +func (x *Object_Retention) GetMode() Object_Retention_Mode { + if x != nil { + return x.Mode + } + return Object_Retention_MODE_UNSPECIFIED +} + +func (x *Object_Retention) GetRetainUntilTime() *timestamppb.Timestamp { + if x != nil { + return x.RetainUntilTime + } + return nil +} + var File_google_storage_v2_storage_proto protoreflect.FileDescriptor var file_google_storage_v2_storage_proto_rawDesc = []byte{ @@ -7156,392 +7963,284 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x93, 0x02, 0x0a, 0x13, 0x43, 0x72, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xdf, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x12, 0x31, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x12, 0x36, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, - 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, - 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x41, 0x0a, 0x1d, - 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x22, - 0xf3, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, - 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 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, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, - 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x72, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, + 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x3b, + 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x02, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, + 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x22, 0x72, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, + 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, + 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x4c, 0x6f, - 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, - 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, - 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, + 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, + 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, + 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a, + 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x1a, 0x0a, 0x18, + 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe5, 0x07, 0x0a, 0x14, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, + 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb6, 0x03, 0x0a, 0x13, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, + 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, + 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, + 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x72, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x1a, 0xb3, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, + 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x22, 0xec, 0x04, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, + 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, + 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x70, - 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, - 0x63, 0x6c, 0x12, 0x41, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, - 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x22, 0xc3, 0x07, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, - 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0d, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, - 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, - 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x01, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x07, 0x6b, - 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xfa, 0x41, - 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x1c, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x1a, 0xa8, 0x02, 0x0a, 0x0c, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7b, 0x0a, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, - 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, - 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x62, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, - 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, - 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe2, 0x04, 0x0a, 0x13, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, - 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, - 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, - 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, - 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xd3, - 0x05, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, - 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, + 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, + 0xd8, 0x05, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, + 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, - 0x0d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x88, 0x01, - 0x01, 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, + 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x3f, 0x0a, 0x1b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, - 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xec, 0x05, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, - 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, - 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, - 0x61, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, - 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, - 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, - 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, + 0x52, 0x0d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x88, + 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x8e, 0x06, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, - 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x73, - 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, - 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x11, 0x69, 0x66, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, - 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x03, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x04, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3c, - 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x05, 0x52, - 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, - 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, - 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc6, 0x06, 0x0a, 0x12, 0x42, 0x69, 0x64, 0x69, - 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, - 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, - 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, - 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, - 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x6d, 0x0a, 0x1c, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x02, 0x18, 0x01, 0x48, 0x04, - 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, - 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x48, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, - 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x3f, 0x0a, 0x1b, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x06, 0x0a, 0x11, + 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, + 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, + 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x13, + 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, + 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, + 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, + 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x48, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, @@ -7549,1371 +8248,1727 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0xa7, 0x01, 0x0a, 0x15, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x72, 0x65, - 0x61, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x72, 0x65, 0x61, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x0b, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0a, - 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x42, - 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, - 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, - 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, - 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, - 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xed, 0x01, 0x0a, 0x1e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, - 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x11, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x55, 0x0a, 0x0e, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, - 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, - 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 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, 0x22, 0x75, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, - 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, - 0x72, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x65, - 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x22, 0xba, 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0a, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x72, - 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x45, 0x6e, 0x64, 0x22, 0x2d, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, - 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xc0, 0x04, 0x0a, 0x0f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, - 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, - 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x98, + 0x06, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, + 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, + 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x11, 0x69, 0x66, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, + 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x02, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, + 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, + 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x04, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x48, 0x05, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, + 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, + 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, - 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, - 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, - 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x04, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, - 0x64, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, - 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xf8, 0x03, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, - 0x11, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x19, + 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x52, 0x65, + 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x44, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x06, 0x0a, 0x12, + 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, + 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, + 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, - 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, - 0x10, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, - 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, - 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x48, 0x03, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x72, 0x65, 0x61, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x02, 0x18, 0x01, 0x48, 0x04, 0x52, 0x08, + 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x0b, 0x72, + 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x48, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0c, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16, + 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, + 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1, + 0x01, 0x0a, 0x15, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, + 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, + 0x72, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, + 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, + 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, + 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x42, + 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0b, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xed, 0x01, 0x0a, + 0x1e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13, + 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x11, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x22, 0x55, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 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, 0x22, 0x75, 0x0a, 0x09, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, + 0x22, 0xba, 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x22, 0x2d, 0x0a, + 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, + 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2e, 0x0a, 0x0f, + 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, + 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xc5, 0x04, 0x0a, + 0x0f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x0e, + 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, + 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, + 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, + 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, + 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x04, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x23, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, + 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, + 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x8a, 0x05, 0x0a, 0x16, 0x42, 0x69, 0x64, - 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x53, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x10, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, - 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x22, 0x87, 0x04, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x75, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x87, + 0x01, 0x0a, 0x13, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x41, 0x70, 0x70, + 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, + 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, + 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x48, 0x03, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xa3, 0x05, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, + 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, + 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x53, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, - 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x6d, 0x0a, + 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x48, 0x00, 0x52, 0x10, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, + 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, + 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, + 0x75, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, + 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x5f, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x65, 0x72, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, - 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x48, 0x01, 0x52, - 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, - 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, - 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x22, 0xe3, 0x04, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, - 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, - 0x12, 0x3c, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, - 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, - 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, - 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x12, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, - 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, - 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x6f, 0x6c, 0x64, - 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x41, 0x73, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x67, 0x6c, - 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaa, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x42, + 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9e, 0x05, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6c, 0x65, 0x78, + 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, 0x65, 0x78, 0x69, 0x63, + 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, + 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x41, 0x73, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x49, 0x64, 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, + 0x61, 0x64, 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, - 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0xb5, 0x0e, 0x0a, 0x14, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x10, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x0f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x57, - 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xe0, - 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x56, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x1b, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x11, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, - 0x3b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3c, 0x0a, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, - 0x63, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, - 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, - 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, + 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xea, 0x0e, 0x0a, 0x14, 0x52, 0x65, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x31, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, + 0x41, 0x05, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x28, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x13, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, + 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x30, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, + 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1a, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, + 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, + 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x48, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x48, 0x06, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x22, 0x69, 0x66, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x03, 0x48, 0x07, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x1c, 0x6d, 0x61, - 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, - 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x18, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x74, 0x65, 0x6e, 0x50, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x47, 0x0a, 0x20, 0x63, 0x6f, - 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x12, 0x46, 0x0a, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1c, 0x63, - 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x27, 0x63, + 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, + 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x40, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x1a, 0x69, 0x66, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x1e, 0x69, + 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x06, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x07, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x74, 0x65, 0x6e, 0x50, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x22, 0x63, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1d, 0x63, 0x6f, 0x70, 0x79, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x4b, 0x0a, 0x20, 0x63, 0x6f, 0x70, + 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1c, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x27, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x22, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x16, - 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, - 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1d, - 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, - 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, - 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, - 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0xec, 0x07, 0x0a, 0x11, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, - 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x32, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x45, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, - 0x00, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, - 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x1a, 0x69, 0x66, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x1e, 0x69, + 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, + 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x02, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x22, 0x69, 0x66, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x03, 0x52, 0x1e, 0x69, - 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x38, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x48, 0x04, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x17, 0x69, 0x66, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x48, 0x05, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x17, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x48, 0x06, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, - 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x07, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, + 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xec, 0x07, + 0x0a, 0x11, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x12, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x45, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x17, 0x69, 0x66, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, - 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, - 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x48, 0x02, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x03, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x13, 0x69, 0x66, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x04, 0x52, 0x11, + 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x05, 0x52, 0x14, 0x69, 0x66, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x06, 0x52, 0x15, 0x69, + 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x48, 0x07, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, + 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x22, 0xaf, 0x02, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, - 0x22, 0x87, 0x05, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, - 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, - 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, - 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, - 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x6d, 0x0a, 0x1c, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, - 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, - 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xbf, 0x01, 0x0a, 0x19, 0x43, + 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, + 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb9, 0x02, 0x0a, + 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x11, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x49, 0x64, 0x22, 0xd6, 0x05, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, + 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x14, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a, - 0x1b, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, - 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xca, 0x05, 0x0a, - 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x12, - 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x14, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, 0x41, 0x44, + 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65, + 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f, + 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a, + 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, + 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xce, 0x01, + 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x14, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x1b, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, + 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xca, + 0x05, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, + 0x0a, 0x12, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x14, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, + 0x41, 0x44, 0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, + 0x80, 0x80, 0x01, 0x12, 0x1c, 0x0a, 0x15, 0x4d, 0x41, 0x58, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x80, 0x80, - 0x01, 0x12, 0x1c, 0x0a, 0x15, 0x4d, 0x41, 0x58, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x43, - 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x80, 0x80, 0x01, 0x12, - 0x19, 0x0a, 0x12, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x49, - 0x5a, 0x45, 0x5f, 0x4d, 0x42, 0x10, 0x80, 0x80, 0xc0, 0x02, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, - 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, - 0x41, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x59, 0x54, - 0x45, 0x53, 0x10, 0x80, 0x08, 0x12, 0x2a, 0x0a, 0x25, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, - 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46, 0x49, 0x45, - 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, - 0x20, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, - 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, - 0x49, 0x5a, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x40, 0x12, 0x2a, 0x0a, 0x24, - 0x4d, 0x41, 0x58, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, - 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x42, - 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0xa0, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x41, 0x58, 0x5f, - 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, - 0x46, 0x49, 0x47, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, - 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43, 0x59, 0x43, - 0x4c, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, - 0x4b, 0x45, 0x54, 0x10, 0x64, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, - 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, - 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x53, 0x10, 0x05, 0x12, 0x31, 0x0a, - 0x2c, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, - 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x80, 0x02, - 0x12, 0x33, 0x0a, 0x2e, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, - 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, - 0x54, 0x48, 0x10, 0x80, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, - 0x45, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x10, 0x40, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, - 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, - 0x54, 0x48, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, 0x45, - 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, - 0x45, 0x53, 0x10, 0x80, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, - 0x45, 0x43, 0x54, 0x5f, 0x49, 0x44, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, - 0x53, 0x54, 0x10, 0xe8, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x50, 0x4c, 0x49, 0x54, 0x5f, 0x54, - 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x44, - 0x41, 0x59, 0x53, 0x10, 0x0e, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x86, 0x24, 0x0a, 0x06, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, - 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, - 0x10, 0x0a, 0x03, 0x72, 0x70, 0x6f, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x70, - 0x6f, 0x12, 0x38, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x54, 0x0a, 0x12, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, - 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, - 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, - 0x6c, 0x12, 0x41, 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x0b, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x0c, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x43, 0x6f, 0x72, 0x73, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, + 0x01, 0x12, 0x19, 0x0a, 0x12, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, + 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x4d, 0x42, 0x10, 0x80, 0x80, 0xc0, 0x02, 0x12, 0x29, 0x0a, 0x24, + 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, + 0x41, 0x54, 0x41, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42, + 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x08, 0x12, 0x2a, 0x0a, 0x25, 0x4d, 0x41, 0x58, 0x5f, 0x43, + 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46, + 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, + 0x10, 0x80, 0x20, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, + 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, + 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x40, 0x12, 0x2a, + 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x45, 0x54, + 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, + 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0xa0, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x41, + 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, + 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, + 0x54, 0x10, 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43, + 0x59, 0x43, 0x4c, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, + 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x64, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x58, 0x5f, 0x4e, + 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, + 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x53, 0x10, 0x05, 0x12, + 0x31, 0x0a, 0x2c, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, + 0x42, 0x55, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, + 0x80, 0x02, 0x12, 0x33, 0x0a, 0x2e, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, + 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, + 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, + 0x4e, 0x47, 0x54, 0x48, 0x10, 0x80, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x58, 0x5f, 0x4c, + 0x41, 0x42, 0x45, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x10, 0x40, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, + 0x45, 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, + 0x4e, 0x47, 0x54, 0x48, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, + 0x42, 0x45, 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, + 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x4d, 0x41, 0x58, 0x5f, 0x4f, + 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x49, 0x44, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x45, + 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x45, 0x53, 0x54, 0x10, 0xe8, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x50, 0x4c, 0x49, 0x54, + 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x0e, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xb5, 0x37, 0x0a, 0x06, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x70, 0x6f, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x72, 0x70, 0x6f, 0x12, 0x3d, 0x0a, + 0x03, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x59, 0x0a, 0x12, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, + 0x63, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, + 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, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, - 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x18, + 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, - 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, - 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, - 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, - 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, - 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6c, 0x6f, 0x67, - 0x67, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3b, 0x0a, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x69, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x54, 0x0a, 0x10, - 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x42, 0x0a, 0x0a, 0x69, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x69, 0x61, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, - 0x69, 0x65, 0x73, 0x5f, 0x70, 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, - 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, + 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x40, + 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, + 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, + 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x6c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x16, 0x68, 0x69, 0x65, 0x72, 0x61, - 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x48, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x68, + 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, + 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, + 0x59, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x47, 0x0a, 0x0a, 0x69, 0x61, + 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x69, 0x61, 0x6d, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, + 0x5f, 0x70, 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0c, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x12, 0x6c, 0x0a, + 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x09, 0x61, + 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x16, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, + 0x63, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x20, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x48, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x66, 0x74, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x1a, 0x30, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x25, - 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x61, 0x79, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x04, 0x43, 0x6f, 0x72, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x27, - 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, - 0x5c, 0x0a, 0x0a, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, - 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x0d, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x1a, 0xb1, 0x02, - 0x0a, 0x09, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7b, 0x0a, 0x1b, 0x75, - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x18, - 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x18, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, + 0x70, 0x61, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x68, 0x69, 0x65, 0x72, 0x61, + 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x5d, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73, + 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x59, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x70, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, + 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x73, 0x1a, 0x9b, 0x01, 0x0a, + 0x04, 0x43, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x2c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, + 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78, + 0x41, 0x67, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xa0, 0x0b, 0x0a, 0x0a, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0xb7, 0x01, 0x0a, + 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x2a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0xc0, 0x01, 0x0a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x50, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, + 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x02, 0x52, 0x2b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x1a, 0xca, 0x01, 0x0a, 0x28, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x2a, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, + 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcd, 0x01, 0x0a, 0x2b, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, + 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x0a, 0x2d, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x31, 0x0a, 0x2f, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x32, 0x0a, 0x30, 0x5f, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x02, + 0x0a, 0x09, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x1b, + 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, + 0x0a, 0x18, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x77, 0x0a, + 0x18, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, - 0x65, 0x1a, 0xdb, 0x07, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x12, - 0x3c, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, - 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0x8f, 0x07, - 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x50, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x92, 0x08, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, - 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x41, 0x0a, 0x06, 0x41, 0x63, 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, - 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x1a, 0xa8, 0x05, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x44, 0x61, 0x79, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x38, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, - 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x07, - 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, - 0x06, 0x69, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6e, 0x75, - 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x10, 0x6e, 0x75, 0x6d, 0x4e, 0x65, 0x77, - 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, - 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x12, 0x38, 0x0a, 0x16, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x48, 0x03, 0x52, 0x13, 0x64, 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x12, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1a, - 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, - 0x48, 0x04, 0x52, 0x17, 0x64, 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x47, - 0x0a, 0x16, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, - 0x65, 0x52, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x25, - 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, - 0x75, 0x66, 0x66, 0x69, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, - 0x79, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x15, - 0x0a, 0x13, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, - 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, - 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, - 0x54, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, - 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6c, 0x6f, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x6f, 0x67, - 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0xbb, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x0d, 0x65, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, - 0x69, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x69, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x74, - 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 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, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0xd3, 0x01, 0x0a, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4d, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x48, - 0x00, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x48, 0x01, 0x52, 0x0d, 0x65, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, - 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x26, 0x0a, 0x0a, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x1a, 0x59, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x10, - 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x67, 0x65, - 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x61, 0x67, 0x65, 0x1a, 0x3e, 0x0a, 0x15, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, - 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xd6, 0x02, 0x0a, - 0x09, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x5f, 0x74, + 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0xc1, 0x07, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, + 0x12, 0x4c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, + 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, + 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4b, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x1a, 0xc6, 0x05, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x44, 0x61, 0x79, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x3d, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, + 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, + 0x1c, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x01, 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, + 0x12, 0x6e, 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x10, 0x6e, 0x75, 0x6d, + 0x4e, 0x65, 0x77, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x37, 0x0a, 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x16, 0x64, 0x61, 0x79, + 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x13, 0x64, 0x61, 0x79, + 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, + 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, + 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x64, 0x61, 0x79, + 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52, + 0x17, 0x64, 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x16, 0x6e, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, + 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, + 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, + 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x1d, 0x0a, 0x1b, + 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x5e, 0x0a, 0x07, 0x4c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x09, 0x6c, 0x6f, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, + 0x67, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x33, 0x0a, 0x0f, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, + 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x06, 0xe0, 0x41, 0x01, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x1a, 0xca, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, + 0x69, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x4d, + 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 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, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xd3, 0x01, + 0x0a, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x4d, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x67, 0x67, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x70, 0x0a, 0x22, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x01, - 0x52, 0x1e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, - 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x25, - 0x0a, 0x23, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x36, 0x0a, 0x15, 0x48, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, - 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, - 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x39, 0x0a, - 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x3a, 0x58, 0xea, 0x41, 0x55, 0x0a, 0x1d, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x23, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, - 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x7d, 0x2a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, + 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x1a, 0x2b, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x1a, 0x63, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x6d, + 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, + 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x0e, 0x6e, 0x6f, + 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, + 0x64, 0x50, 0x61, 0x67, 0x65, 0x1a, 0x43, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, + 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x64, 0x61, 0x74, + 0x61, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xdb, 0x02, 0x0a, 0x09, 0x41, + 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x6f, 0x67, 0x67, 0x6c, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, + 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x70, 0x0a, 0x22, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x48, 0x01, 0x52, 0x1e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x08, 0x49, 0x70, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, + 0x0a, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x68, 0x0a, 0x13, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x56, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x76, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6f, 0x72, 0x67, 0x5f, 0x76, 0x70, 0x63, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x4f, 0x72, 0x67, 0x56, 0x70, 0x63, 0x73, 0x12, + 0x47, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x38, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, + 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, + 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x77, 0x0a, 0x10, 0x56, 0x70, 0x63, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, + 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64, 0x72, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, + 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x36, 0x0a, 0x15, 0x48, 0x69, 0x65, 0x72, + 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x3a, 0x58, 0xea, 0x41, 0x55, + 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x23, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x7d, 0x2a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x72, + 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x5a, 0x0a, 0x0f, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x05, 0xe0, 0x41, 0x01, 0x08, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0x54, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, - 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x64, 0x35, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x64, 0x35, 0x48, - 0x61, 0x73, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0x71, - 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x28, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, 0x73, - 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x22, 0xbd, 0x0e, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x05, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x23, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0e, - 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, - 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x38, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x03, 0x61, - 0x63, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, - 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, - 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 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, 0x42, 0x03, - 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x24, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, + 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, + 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x5a, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0xe0, 0x41, 0x01, 0x08, 0x01, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, + 0x63, 0x22, 0x59, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01, + 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6d, 0x64, 0x35, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6d, 0x64, 0x35, 0x48, 0x61, 0x73, + 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xbb, 0x01, 0x0a, + 0x1a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, - 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x4a, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, + 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x68, 0x0a, 0x0b, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x7b, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x12, 0x2d, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x22, 0xe3, 0x11, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0a, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x6d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, + 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x12, 0x34, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x12, 0x3d, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, + 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 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, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, - 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, - 0x65, 0x79, 0x12, 0x5a, 0x0a, 0x19, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x13, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, - 0x79, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x4e, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x24, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 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, 0x13, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x10, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x17, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, - 0x65, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x56, - 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x45, 0x0a, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 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, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x02, - 0x52, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x10, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, + 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x5a, 0x0a, 0x19, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x13, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, + 0x6f, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, + 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, 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, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, + 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, + 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, + 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x13, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1a, 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, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x03, - 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x88, 0x01, 0x01, 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, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x73, - 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x6f, 0x66, 0x74, - 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x22, 0x97, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, - 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x73, 0x6f, + 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c, + 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, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x10, 0x68, 0x61, + 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1d, + 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, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65, + 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0xd3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x41, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x0b, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x13, - 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, - 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x48, 0x0a, 0x0b, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x3c, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x0f, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x32, 0xc1, 0x1e, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x15, - 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, + 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d, + 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x75, 0x6e, + 0x74, 0x69, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0f, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x36, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 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, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x13, 0x0a, 0x11, + 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, + 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x46, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0a, 0x0b, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x46, 0x0a, + 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x32, 0x9f, 0x1f, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x58, 0xda, 0x41, 0x17, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x1e, 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, + 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x58, 0xda, 0x41, 0x17, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x1e, 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, + 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x93, 0x01, + 0x0a, 0x19, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x06, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, + 0x2a, 0x2a, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, + 0x58, 0xda, 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x8a, 0xd3, 0xe4, 0x93, + 0x02, 0x47, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, + 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x0c, 0x53, 0x65, + 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x5f, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, + 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, + 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xaa, 0x01, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x8a, 0xd3, 0xe4, 0x93, + 0x02, 0x8c, 0x01, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x34, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2a, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, + 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x64, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2a, 0x12, + 0x8a, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x22, 0x37, 0xda, 0x41, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1c, + 0x12, 0x1a, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x0d, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x22, 0x29, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, + 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x48, 0xda, + 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, + 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0xda, + 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, + 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, + 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xa5, 0x01, 0x0a, + 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, - 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, - 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, - 0x19, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x06, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, - 0x2a, 0x7d, 0x12, 0x75, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2a, 0xda, - 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7c, 0x0a, 0x0c, 0x53, 0x65, 0x74, - 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x22, 0x31, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x96, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, - 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x8a, 0xd3, 0xe4, - 0x93, 0x02, 0x8c, 0x01, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x34, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x7b, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x2f, 0x2a, 0x2a, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x2f, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2a, - 0x12, 0x8a, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x2a, 0x7d, 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, + 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x8a, 0xd3, + 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x0a, 0x17, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x8c, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x22, 0x37, 0xda, 0x41, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x22, 0x39, 0xda, 0x41, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x1c, 0x12, 0x1a, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, - 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0x29, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, - 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, + 0x1e, 0x12, 0x1c, 0x0a, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, + 0x60, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x48, - 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, + 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, + 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x26, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, - 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, + 0x0f, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, + 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x8a, 0xd3, 0xe4, 0x93, + 0x02, 0x32, 0x12, 0x30, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xa5, 0x01, - 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, - 0x2a, 0x2a, 0x7d, 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, - 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, - 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x8a, - 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x0a, 0x17, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x28, 0x01, 0x30, - 0x01, 0x12, 0x8c, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, + 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x39, 0xda, 0x41, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, - 0x02, 0x1e, 0x12, 0x1c, 0x0a, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, - 0x12, 0x60, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x28, 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, - 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x26, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, 0x93, - 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x7b, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0d, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x34, - 0x12, 0x0f, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x8a, 0xd3, 0xe4, - 0x93, 0x02, 0x32, 0x12, 0x30, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, - 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4d, 0x6f, 0x76, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x47, 0xda, 0x41, 0x27, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x1a, - 0xa7, 0x02, 0xca, 0x41, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x8a, 0x02, 0x68, - 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x47, 0xda, 0x41, 0x27, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x1a, 0xa7, + 0x02, 0xca, 0x41, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x8a, 0x02, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, - 0x64, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, - 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2c, 0x68, - 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, - 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, - 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xe2, 0x01, 0xea, 0x41, 0x78, 0x0a, - 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x12, 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x70, 0x62, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64, + 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2c, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, + 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xe2, 0x01, 0xea, 0x41, 0x78, 0x0a, 0x21, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x12, 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x70, 0x62, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8928,263 +9983,293 @@ func file_google_storage_v2_storage_proto_rawDescGZIP() []byte { return file_google_storage_v2_storage_proto_rawDescData } -var file_google_storage_v2_storage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_storage_v2_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 75) +var file_google_storage_v2_storage_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_storage_v2_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 86) var file_google_storage_v2_storage_proto_goTypes = []any{ (ServiceConstants_Values)(0), // 0: google.storage.v2.ServiceConstants.Values - (*DeleteBucketRequest)(nil), // 1: google.storage.v2.DeleteBucketRequest - (*GetBucketRequest)(nil), // 2: google.storage.v2.GetBucketRequest - (*CreateBucketRequest)(nil), // 3: google.storage.v2.CreateBucketRequest - (*ListBucketsRequest)(nil), // 4: google.storage.v2.ListBucketsRequest - (*ListBucketsResponse)(nil), // 5: google.storage.v2.ListBucketsResponse - (*LockBucketRetentionPolicyRequest)(nil), // 6: google.storage.v2.LockBucketRetentionPolicyRequest - (*UpdateBucketRequest)(nil), // 7: google.storage.v2.UpdateBucketRequest - (*ComposeObjectRequest)(nil), // 8: google.storage.v2.ComposeObjectRequest - (*DeleteObjectRequest)(nil), // 9: google.storage.v2.DeleteObjectRequest - (*RestoreObjectRequest)(nil), // 10: google.storage.v2.RestoreObjectRequest - (*CancelResumableWriteRequest)(nil), // 11: google.storage.v2.CancelResumableWriteRequest - (*CancelResumableWriteResponse)(nil), // 12: google.storage.v2.CancelResumableWriteResponse - (*ReadObjectRequest)(nil), // 13: google.storage.v2.ReadObjectRequest - (*GetObjectRequest)(nil), // 14: google.storage.v2.GetObjectRequest - (*ReadObjectResponse)(nil), // 15: google.storage.v2.ReadObjectResponse - (*BidiReadObjectSpec)(nil), // 16: google.storage.v2.BidiReadObjectSpec - (*BidiReadObjectRequest)(nil), // 17: google.storage.v2.BidiReadObjectRequest - (*BidiReadObjectResponse)(nil), // 18: google.storage.v2.BidiReadObjectResponse - (*BidiReadObjectRedirectedError)(nil), // 19: google.storage.v2.BidiReadObjectRedirectedError - (*BidiWriteObjectRedirectedError)(nil), // 20: google.storage.v2.BidiWriteObjectRedirectedError - (*BidiReadObjectError)(nil), // 21: google.storage.v2.BidiReadObjectError - (*ReadRangeError)(nil), // 22: google.storage.v2.ReadRangeError - (*ReadRange)(nil), // 23: google.storage.v2.ReadRange - (*ObjectRangeData)(nil), // 24: google.storage.v2.ObjectRangeData - (*BidiReadHandle)(nil), // 25: google.storage.v2.BidiReadHandle - (*BidiWriteHandle)(nil), // 26: google.storage.v2.BidiWriteHandle - (*WriteObjectSpec)(nil), // 27: google.storage.v2.WriteObjectSpec - (*WriteObjectRequest)(nil), // 28: google.storage.v2.WriteObjectRequest - (*WriteObjectResponse)(nil), // 29: google.storage.v2.WriteObjectResponse - (*AppendObjectSpec)(nil), // 30: google.storage.v2.AppendObjectSpec - (*BidiWriteObjectRequest)(nil), // 31: google.storage.v2.BidiWriteObjectRequest - (*BidiWriteObjectResponse)(nil), // 32: google.storage.v2.BidiWriteObjectResponse - (*ListObjectsRequest)(nil), // 33: google.storage.v2.ListObjectsRequest - (*QueryWriteStatusRequest)(nil), // 34: google.storage.v2.QueryWriteStatusRequest - (*QueryWriteStatusResponse)(nil), // 35: google.storage.v2.QueryWriteStatusResponse - (*RewriteObjectRequest)(nil), // 36: google.storage.v2.RewriteObjectRequest - (*RewriteResponse)(nil), // 37: google.storage.v2.RewriteResponse - (*MoveObjectRequest)(nil), // 38: google.storage.v2.MoveObjectRequest - (*StartResumableWriteRequest)(nil), // 39: google.storage.v2.StartResumableWriteRequest - (*StartResumableWriteResponse)(nil), // 40: google.storage.v2.StartResumableWriteResponse - (*UpdateObjectRequest)(nil), // 41: google.storage.v2.UpdateObjectRequest - (*CommonObjectRequestParams)(nil), // 42: google.storage.v2.CommonObjectRequestParams - (*ServiceConstants)(nil), // 43: google.storage.v2.ServiceConstants - (*Bucket)(nil), // 44: google.storage.v2.Bucket - (*BucketAccessControl)(nil), // 45: google.storage.v2.BucketAccessControl - (*ChecksummedData)(nil), // 46: google.storage.v2.ChecksummedData - (*ObjectChecksums)(nil), // 47: google.storage.v2.ObjectChecksums - (*CustomerEncryption)(nil), // 48: google.storage.v2.CustomerEncryption - (*Object)(nil), // 49: google.storage.v2.Object - (*ObjectAccessControl)(nil), // 50: google.storage.v2.ObjectAccessControl - (*ListObjectsResponse)(nil), // 51: google.storage.v2.ListObjectsResponse - (*ProjectTeam)(nil), // 52: google.storage.v2.ProjectTeam - (*Owner)(nil), // 53: google.storage.v2.Owner - (*ContentRange)(nil), // 54: google.storage.v2.ContentRange - (*ComposeObjectRequest_SourceObject)(nil), // 55: google.storage.v2.ComposeObjectRequest.SourceObject - (*ComposeObjectRequest_SourceObject_ObjectPreconditions)(nil), // 56: google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions - (*Bucket_Billing)(nil), // 57: google.storage.v2.Bucket.Billing - (*Bucket_Cors)(nil), // 58: google.storage.v2.Bucket.Cors - (*Bucket_Encryption)(nil), // 59: google.storage.v2.Bucket.Encryption - (*Bucket_IamConfig)(nil), // 60: google.storage.v2.Bucket.IamConfig - (*Bucket_Lifecycle)(nil), // 61: google.storage.v2.Bucket.Lifecycle - (*Bucket_Logging)(nil), // 62: google.storage.v2.Bucket.Logging - (*Bucket_RetentionPolicy)(nil), // 63: google.storage.v2.Bucket.RetentionPolicy - (*Bucket_SoftDeletePolicy)(nil), // 64: google.storage.v2.Bucket.SoftDeletePolicy - (*Bucket_Versioning)(nil), // 65: google.storage.v2.Bucket.Versioning - (*Bucket_Website)(nil), // 66: google.storage.v2.Bucket.Website - (*Bucket_CustomPlacementConfig)(nil), // 67: google.storage.v2.Bucket.CustomPlacementConfig - (*Bucket_Autoclass)(nil), // 68: google.storage.v2.Bucket.Autoclass - (*Bucket_HierarchicalNamespace)(nil), // 69: google.storage.v2.Bucket.HierarchicalNamespace - nil, // 70: google.storage.v2.Bucket.LabelsEntry - (*Bucket_IamConfig_UniformBucketLevelAccess)(nil), // 71: google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess - (*Bucket_Lifecycle_Rule)(nil), // 72: google.storage.v2.Bucket.Lifecycle.Rule - (*Bucket_Lifecycle_Rule_Action)(nil), // 73: google.storage.v2.Bucket.Lifecycle.Rule.Action - (*Bucket_Lifecycle_Rule_Condition)(nil), // 74: google.storage.v2.Bucket.Lifecycle.Rule.Condition - nil, // 75: google.storage.v2.Object.MetadataEntry - (*fieldmaskpb.FieldMask)(nil), // 76: google.protobuf.FieldMask - (*status.Status)(nil), // 77: google.rpc.Status - (*timestamppb.Timestamp)(nil), // 78: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 79: google.protobuf.Duration - (*date.Date)(nil), // 80: google.type.Date - (*iampb.GetIamPolicyRequest)(nil), // 81: google.iam.v1.GetIamPolicyRequest - (*iampb.SetIamPolicyRequest)(nil), // 82: google.iam.v1.SetIamPolicyRequest - (*iampb.TestIamPermissionsRequest)(nil), // 83: google.iam.v1.TestIamPermissionsRequest - (*emptypb.Empty)(nil), // 84: google.protobuf.Empty - (*iampb.Policy)(nil), // 85: google.iam.v1.Policy - (*iampb.TestIamPermissionsResponse)(nil), // 86: google.iam.v1.TestIamPermissionsResponse + (Object_Retention_Mode)(0), // 1: google.storage.v2.Object.Retention.Mode + (*DeleteBucketRequest)(nil), // 2: google.storage.v2.DeleteBucketRequest + (*GetBucketRequest)(nil), // 3: google.storage.v2.GetBucketRequest + (*CreateBucketRequest)(nil), // 4: google.storage.v2.CreateBucketRequest + (*ListBucketsRequest)(nil), // 5: google.storage.v2.ListBucketsRequest + (*ListBucketsResponse)(nil), // 6: google.storage.v2.ListBucketsResponse + (*LockBucketRetentionPolicyRequest)(nil), // 7: google.storage.v2.LockBucketRetentionPolicyRequest + (*UpdateBucketRequest)(nil), // 8: google.storage.v2.UpdateBucketRequest + (*ComposeObjectRequest)(nil), // 9: google.storage.v2.ComposeObjectRequest + (*DeleteObjectRequest)(nil), // 10: google.storage.v2.DeleteObjectRequest + (*RestoreObjectRequest)(nil), // 11: google.storage.v2.RestoreObjectRequest + (*CancelResumableWriteRequest)(nil), // 12: google.storage.v2.CancelResumableWriteRequest + (*CancelResumableWriteResponse)(nil), // 13: google.storage.v2.CancelResumableWriteResponse + (*ReadObjectRequest)(nil), // 14: google.storage.v2.ReadObjectRequest + (*GetObjectRequest)(nil), // 15: google.storage.v2.GetObjectRequest + (*ReadObjectResponse)(nil), // 16: google.storage.v2.ReadObjectResponse + (*BidiReadObjectSpec)(nil), // 17: google.storage.v2.BidiReadObjectSpec + (*BidiReadObjectRequest)(nil), // 18: google.storage.v2.BidiReadObjectRequest + (*BidiReadObjectResponse)(nil), // 19: google.storage.v2.BidiReadObjectResponse + (*BidiReadObjectRedirectedError)(nil), // 20: google.storage.v2.BidiReadObjectRedirectedError + (*BidiWriteObjectRedirectedError)(nil), // 21: google.storage.v2.BidiWriteObjectRedirectedError + (*BidiReadObjectError)(nil), // 22: google.storage.v2.BidiReadObjectError + (*ReadRangeError)(nil), // 23: google.storage.v2.ReadRangeError + (*ReadRange)(nil), // 24: google.storage.v2.ReadRange + (*ObjectRangeData)(nil), // 25: google.storage.v2.ObjectRangeData + (*BidiReadHandle)(nil), // 26: google.storage.v2.BidiReadHandle + (*BidiWriteHandle)(nil), // 27: google.storage.v2.BidiWriteHandle + (*WriteObjectSpec)(nil), // 28: google.storage.v2.WriteObjectSpec + (*WriteObjectRequest)(nil), // 29: google.storage.v2.WriteObjectRequest + (*WriteObjectResponse)(nil), // 30: google.storage.v2.WriteObjectResponse + (*AppendObjectSpec)(nil), // 31: google.storage.v2.AppendObjectSpec + (*BidiWriteObjectRequest)(nil), // 32: google.storage.v2.BidiWriteObjectRequest + (*BidiWriteObjectResponse)(nil), // 33: google.storage.v2.BidiWriteObjectResponse + (*ListObjectsRequest)(nil), // 34: google.storage.v2.ListObjectsRequest + (*QueryWriteStatusRequest)(nil), // 35: google.storage.v2.QueryWriteStatusRequest + (*QueryWriteStatusResponse)(nil), // 36: google.storage.v2.QueryWriteStatusResponse + (*RewriteObjectRequest)(nil), // 37: google.storage.v2.RewriteObjectRequest + (*RewriteResponse)(nil), // 38: google.storage.v2.RewriteResponse + (*MoveObjectRequest)(nil), // 39: google.storage.v2.MoveObjectRequest + (*StartResumableWriteRequest)(nil), // 40: google.storage.v2.StartResumableWriteRequest + (*StartResumableWriteResponse)(nil), // 41: google.storage.v2.StartResumableWriteResponse + (*UpdateObjectRequest)(nil), // 42: google.storage.v2.UpdateObjectRequest + (*CommonObjectRequestParams)(nil), // 43: google.storage.v2.CommonObjectRequestParams + (*ServiceConstants)(nil), // 44: google.storage.v2.ServiceConstants + (*Bucket)(nil), // 45: google.storage.v2.Bucket + (*BucketAccessControl)(nil), // 46: google.storage.v2.BucketAccessControl + (*ChecksummedData)(nil), // 47: google.storage.v2.ChecksummedData + (*ObjectChecksums)(nil), // 48: google.storage.v2.ObjectChecksums + (*ObjectCustomContextPayload)(nil), // 49: google.storage.v2.ObjectCustomContextPayload + (*ObjectContexts)(nil), // 50: google.storage.v2.ObjectContexts + (*CustomerEncryption)(nil), // 51: google.storage.v2.CustomerEncryption + (*Object)(nil), // 52: google.storage.v2.Object + (*ObjectAccessControl)(nil), // 53: google.storage.v2.ObjectAccessControl + (*ListObjectsResponse)(nil), // 54: google.storage.v2.ListObjectsResponse + (*ProjectTeam)(nil), // 55: google.storage.v2.ProjectTeam + (*Owner)(nil), // 56: google.storage.v2.Owner + (*ContentRange)(nil), // 57: google.storage.v2.ContentRange + (*ComposeObjectRequest_SourceObject)(nil), // 58: google.storage.v2.ComposeObjectRequest.SourceObject + (*ComposeObjectRequest_SourceObject_ObjectPreconditions)(nil), // 59: google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions + (*Bucket_Billing)(nil), // 60: google.storage.v2.Bucket.Billing + (*Bucket_Cors)(nil), // 61: google.storage.v2.Bucket.Cors + (*Bucket_Encryption)(nil), // 62: google.storage.v2.Bucket.Encryption + (*Bucket_IamConfig)(nil), // 63: google.storage.v2.Bucket.IamConfig + (*Bucket_Lifecycle)(nil), // 64: google.storage.v2.Bucket.Lifecycle + (*Bucket_Logging)(nil), // 65: google.storage.v2.Bucket.Logging + (*Bucket_ObjectRetention)(nil), // 66: google.storage.v2.Bucket.ObjectRetention + (*Bucket_RetentionPolicy)(nil), // 67: google.storage.v2.Bucket.RetentionPolicy + (*Bucket_SoftDeletePolicy)(nil), // 68: google.storage.v2.Bucket.SoftDeletePolicy + (*Bucket_Versioning)(nil), // 69: google.storage.v2.Bucket.Versioning + (*Bucket_Website)(nil), // 70: google.storage.v2.Bucket.Website + (*Bucket_CustomPlacementConfig)(nil), // 71: google.storage.v2.Bucket.CustomPlacementConfig + (*Bucket_Autoclass)(nil), // 72: google.storage.v2.Bucket.Autoclass + (*Bucket_IpFilter)(nil), // 73: google.storage.v2.Bucket.IpFilter + (*Bucket_HierarchicalNamespace)(nil), // 74: google.storage.v2.Bucket.HierarchicalNamespace + nil, // 75: google.storage.v2.Bucket.LabelsEntry + (*Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig)(nil), // 76: google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig + (*Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig)(nil), // 77: google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig + (*Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig)(nil), // 78: google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig + (*Bucket_IamConfig_UniformBucketLevelAccess)(nil), // 79: google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess + (*Bucket_Lifecycle_Rule)(nil), // 80: google.storage.v2.Bucket.Lifecycle.Rule + (*Bucket_Lifecycle_Rule_Action)(nil), // 81: google.storage.v2.Bucket.Lifecycle.Rule.Action + (*Bucket_Lifecycle_Rule_Condition)(nil), // 82: google.storage.v2.Bucket.Lifecycle.Rule.Condition + (*Bucket_IpFilter_PublicNetworkSource)(nil), // 83: google.storage.v2.Bucket.IpFilter.PublicNetworkSource + (*Bucket_IpFilter_VpcNetworkSource)(nil), // 84: google.storage.v2.Bucket.IpFilter.VpcNetworkSource + nil, // 85: google.storage.v2.ObjectContexts.CustomEntry + (*Object_Retention)(nil), // 86: google.storage.v2.Object.Retention + nil, // 87: google.storage.v2.Object.MetadataEntry + (*fieldmaskpb.FieldMask)(nil), // 88: google.protobuf.FieldMask + (*status.Status)(nil), // 89: google.rpc.Status + (*timestamppb.Timestamp)(nil), // 90: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 91: google.protobuf.Duration + (*date.Date)(nil), // 92: google.type.Date + (*iampb.GetIamPolicyRequest)(nil), // 93: google.iam.v1.GetIamPolicyRequest + (*iampb.SetIamPolicyRequest)(nil), // 94: google.iam.v1.SetIamPolicyRequest + (*iampb.TestIamPermissionsRequest)(nil), // 95: google.iam.v1.TestIamPermissionsRequest + (*emptypb.Empty)(nil), // 96: google.protobuf.Empty + (*iampb.Policy)(nil), // 97: google.iam.v1.Policy + (*iampb.TestIamPermissionsResponse)(nil), // 98: google.iam.v1.TestIamPermissionsResponse } var file_google_storage_v2_storage_proto_depIdxs = []int32{ - 76, // 0: google.storage.v2.GetBucketRequest.read_mask:type_name -> google.protobuf.FieldMask - 44, // 1: google.storage.v2.CreateBucketRequest.bucket:type_name -> google.storage.v2.Bucket - 76, // 2: google.storage.v2.ListBucketsRequest.read_mask:type_name -> google.protobuf.FieldMask - 44, // 3: google.storage.v2.ListBucketsResponse.buckets:type_name -> google.storage.v2.Bucket - 44, // 4: google.storage.v2.UpdateBucketRequest.bucket:type_name -> google.storage.v2.Bucket - 76, // 5: google.storage.v2.UpdateBucketRequest.update_mask:type_name -> google.protobuf.FieldMask - 49, // 6: google.storage.v2.ComposeObjectRequest.destination:type_name -> google.storage.v2.Object - 55, // 7: google.storage.v2.ComposeObjectRequest.source_objects:type_name -> google.storage.v2.ComposeObjectRequest.SourceObject - 42, // 8: google.storage.v2.ComposeObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 47, // 9: google.storage.v2.ComposeObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums - 42, // 10: google.storage.v2.DeleteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 42, // 11: google.storage.v2.RestoreObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 42, // 12: google.storage.v2.ReadObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 76, // 13: google.storage.v2.ReadObjectRequest.read_mask:type_name -> google.protobuf.FieldMask - 42, // 14: google.storage.v2.GetObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 76, // 15: google.storage.v2.GetObjectRequest.read_mask:type_name -> google.protobuf.FieldMask - 46, // 16: google.storage.v2.ReadObjectResponse.checksummed_data:type_name -> google.storage.v2.ChecksummedData - 47, // 17: google.storage.v2.ReadObjectResponse.object_checksums:type_name -> google.storage.v2.ObjectChecksums - 54, // 18: google.storage.v2.ReadObjectResponse.content_range:type_name -> google.storage.v2.ContentRange - 49, // 19: google.storage.v2.ReadObjectResponse.metadata:type_name -> google.storage.v2.Object - 42, // 20: google.storage.v2.BidiReadObjectSpec.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 76, // 21: google.storage.v2.BidiReadObjectSpec.read_mask:type_name -> google.protobuf.FieldMask - 25, // 22: google.storage.v2.BidiReadObjectSpec.read_handle:type_name -> google.storage.v2.BidiReadHandle - 16, // 23: google.storage.v2.BidiReadObjectRequest.read_object_spec:type_name -> google.storage.v2.BidiReadObjectSpec - 23, // 24: google.storage.v2.BidiReadObjectRequest.read_ranges:type_name -> google.storage.v2.ReadRange - 24, // 25: google.storage.v2.BidiReadObjectResponse.object_data_ranges:type_name -> google.storage.v2.ObjectRangeData - 49, // 26: google.storage.v2.BidiReadObjectResponse.metadata:type_name -> google.storage.v2.Object - 25, // 27: google.storage.v2.BidiReadObjectResponse.read_handle:type_name -> google.storage.v2.BidiReadHandle - 25, // 28: google.storage.v2.BidiReadObjectRedirectedError.read_handle:type_name -> google.storage.v2.BidiReadHandle - 26, // 29: google.storage.v2.BidiWriteObjectRedirectedError.write_handle:type_name -> google.storage.v2.BidiWriteHandle - 22, // 30: google.storage.v2.BidiReadObjectError.read_range_errors:type_name -> google.storage.v2.ReadRangeError - 77, // 31: google.storage.v2.ReadRangeError.status:type_name -> google.rpc.Status - 46, // 32: google.storage.v2.ObjectRangeData.checksummed_data:type_name -> google.storage.v2.ChecksummedData - 23, // 33: google.storage.v2.ObjectRangeData.read_range:type_name -> google.storage.v2.ReadRange - 49, // 34: google.storage.v2.WriteObjectSpec.resource:type_name -> google.storage.v2.Object - 27, // 35: google.storage.v2.WriteObjectRequest.write_object_spec:type_name -> google.storage.v2.WriteObjectSpec - 46, // 36: google.storage.v2.WriteObjectRequest.checksummed_data:type_name -> google.storage.v2.ChecksummedData - 47, // 37: google.storage.v2.WriteObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums - 42, // 38: google.storage.v2.WriteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 49, // 39: google.storage.v2.WriteObjectResponse.resource:type_name -> google.storage.v2.Object - 26, // 40: google.storage.v2.AppendObjectSpec.write_handle:type_name -> google.storage.v2.BidiWriteHandle - 27, // 41: google.storage.v2.BidiWriteObjectRequest.write_object_spec:type_name -> google.storage.v2.WriteObjectSpec - 30, // 42: google.storage.v2.BidiWriteObjectRequest.append_object_spec:type_name -> google.storage.v2.AppendObjectSpec - 46, // 43: google.storage.v2.BidiWriteObjectRequest.checksummed_data:type_name -> google.storage.v2.ChecksummedData - 47, // 44: google.storage.v2.BidiWriteObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums - 42, // 45: google.storage.v2.BidiWriteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 49, // 46: google.storage.v2.BidiWriteObjectResponse.resource:type_name -> google.storage.v2.Object - 26, // 47: google.storage.v2.BidiWriteObjectResponse.write_handle:type_name -> google.storage.v2.BidiWriteHandle - 76, // 48: google.storage.v2.ListObjectsRequest.read_mask:type_name -> google.protobuf.FieldMask - 42, // 49: google.storage.v2.QueryWriteStatusRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 49, // 50: google.storage.v2.QueryWriteStatusResponse.resource:type_name -> google.storage.v2.Object - 49, // 51: google.storage.v2.RewriteObjectRequest.destination:type_name -> google.storage.v2.Object - 42, // 52: google.storage.v2.RewriteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 47, // 53: google.storage.v2.RewriteObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums - 49, // 54: google.storage.v2.RewriteResponse.resource:type_name -> google.storage.v2.Object - 27, // 55: google.storage.v2.StartResumableWriteRequest.write_object_spec:type_name -> google.storage.v2.WriteObjectSpec - 42, // 56: google.storage.v2.StartResumableWriteRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 47, // 57: google.storage.v2.StartResumableWriteRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums - 49, // 58: google.storage.v2.UpdateObjectRequest.object:type_name -> google.storage.v2.Object - 76, // 59: google.storage.v2.UpdateObjectRequest.update_mask:type_name -> google.protobuf.FieldMask - 42, // 60: google.storage.v2.UpdateObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams - 45, // 61: google.storage.v2.Bucket.acl:type_name -> google.storage.v2.BucketAccessControl - 50, // 62: google.storage.v2.Bucket.default_object_acl:type_name -> google.storage.v2.ObjectAccessControl - 61, // 63: google.storage.v2.Bucket.lifecycle:type_name -> google.storage.v2.Bucket.Lifecycle - 78, // 64: google.storage.v2.Bucket.create_time:type_name -> google.protobuf.Timestamp - 58, // 65: google.storage.v2.Bucket.cors:type_name -> google.storage.v2.Bucket.Cors - 78, // 66: google.storage.v2.Bucket.update_time:type_name -> google.protobuf.Timestamp - 70, // 67: google.storage.v2.Bucket.labels:type_name -> google.storage.v2.Bucket.LabelsEntry - 66, // 68: google.storage.v2.Bucket.website:type_name -> google.storage.v2.Bucket.Website - 65, // 69: google.storage.v2.Bucket.versioning:type_name -> google.storage.v2.Bucket.Versioning - 62, // 70: google.storage.v2.Bucket.logging:type_name -> google.storage.v2.Bucket.Logging - 53, // 71: google.storage.v2.Bucket.owner:type_name -> google.storage.v2.Owner - 59, // 72: google.storage.v2.Bucket.encryption:type_name -> google.storage.v2.Bucket.Encryption - 57, // 73: google.storage.v2.Bucket.billing:type_name -> google.storage.v2.Bucket.Billing - 63, // 74: google.storage.v2.Bucket.retention_policy:type_name -> google.storage.v2.Bucket.RetentionPolicy - 60, // 75: google.storage.v2.Bucket.iam_config:type_name -> google.storage.v2.Bucket.IamConfig - 67, // 76: google.storage.v2.Bucket.custom_placement_config:type_name -> google.storage.v2.Bucket.CustomPlacementConfig - 68, // 77: google.storage.v2.Bucket.autoclass:type_name -> google.storage.v2.Bucket.Autoclass - 69, // 78: google.storage.v2.Bucket.hierarchical_namespace:type_name -> google.storage.v2.Bucket.HierarchicalNamespace - 64, // 79: google.storage.v2.Bucket.soft_delete_policy:type_name -> google.storage.v2.Bucket.SoftDeletePolicy - 52, // 80: google.storage.v2.BucketAccessControl.project_team:type_name -> google.storage.v2.ProjectTeam - 50, // 81: google.storage.v2.Object.acl:type_name -> google.storage.v2.ObjectAccessControl - 78, // 82: google.storage.v2.Object.delete_time:type_name -> google.protobuf.Timestamp - 78, // 83: google.storage.v2.Object.finalize_time:type_name -> google.protobuf.Timestamp - 78, // 84: google.storage.v2.Object.create_time:type_name -> google.protobuf.Timestamp - 47, // 85: google.storage.v2.Object.checksums:type_name -> google.storage.v2.ObjectChecksums - 78, // 86: google.storage.v2.Object.update_time:type_name -> google.protobuf.Timestamp - 78, // 87: google.storage.v2.Object.update_storage_class_time:type_name -> google.protobuf.Timestamp - 78, // 88: google.storage.v2.Object.retention_expire_time:type_name -> google.protobuf.Timestamp - 75, // 89: google.storage.v2.Object.metadata:type_name -> google.storage.v2.Object.MetadataEntry - 53, // 90: google.storage.v2.Object.owner:type_name -> google.storage.v2.Owner - 48, // 91: google.storage.v2.Object.customer_encryption:type_name -> google.storage.v2.CustomerEncryption - 78, // 92: google.storage.v2.Object.custom_time:type_name -> google.protobuf.Timestamp - 78, // 93: google.storage.v2.Object.soft_delete_time:type_name -> google.protobuf.Timestamp - 78, // 94: google.storage.v2.Object.hard_delete_time:type_name -> google.protobuf.Timestamp - 52, // 95: google.storage.v2.ObjectAccessControl.project_team:type_name -> google.storage.v2.ProjectTeam - 49, // 96: google.storage.v2.ListObjectsResponse.objects:type_name -> google.storage.v2.Object - 56, // 97: google.storage.v2.ComposeObjectRequest.SourceObject.object_preconditions:type_name -> google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions - 71, // 98: google.storage.v2.Bucket.IamConfig.uniform_bucket_level_access:type_name -> google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess - 72, // 99: google.storage.v2.Bucket.Lifecycle.rule:type_name -> google.storage.v2.Bucket.Lifecycle.Rule - 78, // 100: google.storage.v2.Bucket.RetentionPolicy.effective_time:type_name -> google.protobuf.Timestamp - 79, // 101: google.storage.v2.Bucket.RetentionPolicy.retention_duration:type_name -> google.protobuf.Duration - 79, // 102: google.storage.v2.Bucket.SoftDeletePolicy.retention_duration:type_name -> google.protobuf.Duration - 78, // 103: google.storage.v2.Bucket.SoftDeletePolicy.effective_time:type_name -> google.protobuf.Timestamp - 78, // 104: google.storage.v2.Bucket.Autoclass.toggle_time:type_name -> google.protobuf.Timestamp - 78, // 105: google.storage.v2.Bucket.Autoclass.terminal_storage_class_update_time:type_name -> google.protobuf.Timestamp - 78, // 106: google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess.lock_time:type_name -> google.protobuf.Timestamp - 73, // 107: google.storage.v2.Bucket.Lifecycle.Rule.action:type_name -> google.storage.v2.Bucket.Lifecycle.Rule.Action - 74, // 108: google.storage.v2.Bucket.Lifecycle.Rule.condition:type_name -> google.storage.v2.Bucket.Lifecycle.Rule.Condition - 80, // 109: google.storage.v2.Bucket.Lifecycle.Rule.Condition.created_before:type_name -> google.type.Date - 80, // 110: google.storage.v2.Bucket.Lifecycle.Rule.Condition.custom_time_before:type_name -> google.type.Date - 80, // 111: google.storage.v2.Bucket.Lifecycle.Rule.Condition.noncurrent_time_before:type_name -> google.type.Date - 1, // 112: google.storage.v2.Storage.DeleteBucket:input_type -> google.storage.v2.DeleteBucketRequest - 2, // 113: google.storage.v2.Storage.GetBucket:input_type -> google.storage.v2.GetBucketRequest - 3, // 114: google.storage.v2.Storage.CreateBucket:input_type -> google.storage.v2.CreateBucketRequest - 4, // 115: google.storage.v2.Storage.ListBuckets:input_type -> google.storage.v2.ListBucketsRequest - 6, // 116: google.storage.v2.Storage.LockBucketRetentionPolicy:input_type -> google.storage.v2.LockBucketRetentionPolicyRequest - 81, // 117: google.storage.v2.Storage.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest - 82, // 118: google.storage.v2.Storage.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest - 83, // 119: google.storage.v2.Storage.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest - 7, // 120: google.storage.v2.Storage.UpdateBucket:input_type -> google.storage.v2.UpdateBucketRequest - 8, // 121: google.storage.v2.Storage.ComposeObject:input_type -> google.storage.v2.ComposeObjectRequest - 9, // 122: google.storage.v2.Storage.DeleteObject:input_type -> google.storage.v2.DeleteObjectRequest - 10, // 123: google.storage.v2.Storage.RestoreObject:input_type -> google.storage.v2.RestoreObjectRequest - 11, // 124: google.storage.v2.Storage.CancelResumableWrite:input_type -> google.storage.v2.CancelResumableWriteRequest - 14, // 125: google.storage.v2.Storage.GetObject:input_type -> google.storage.v2.GetObjectRequest - 13, // 126: google.storage.v2.Storage.ReadObject:input_type -> google.storage.v2.ReadObjectRequest - 17, // 127: google.storage.v2.Storage.BidiReadObject:input_type -> google.storage.v2.BidiReadObjectRequest - 41, // 128: google.storage.v2.Storage.UpdateObject:input_type -> google.storage.v2.UpdateObjectRequest - 28, // 129: google.storage.v2.Storage.WriteObject:input_type -> google.storage.v2.WriteObjectRequest - 31, // 130: google.storage.v2.Storage.BidiWriteObject:input_type -> google.storage.v2.BidiWriteObjectRequest - 33, // 131: google.storage.v2.Storage.ListObjects:input_type -> google.storage.v2.ListObjectsRequest - 36, // 132: google.storage.v2.Storage.RewriteObject:input_type -> google.storage.v2.RewriteObjectRequest - 39, // 133: google.storage.v2.Storage.StartResumableWrite:input_type -> google.storage.v2.StartResumableWriteRequest - 34, // 134: google.storage.v2.Storage.QueryWriteStatus:input_type -> google.storage.v2.QueryWriteStatusRequest - 38, // 135: google.storage.v2.Storage.MoveObject:input_type -> google.storage.v2.MoveObjectRequest - 84, // 136: google.storage.v2.Storage.DeleteBucket:output_type -> google.protobuf.Empty - 44, // 137: google.storage.v2.Storage.GetBucket:output_type -> google.storage.v2.Bucket - 44, // 138: google.storage.v2.Storage.CreateBucket:output_type -> google.storage.v2.Bucket - 5, // 139: google.storage.v2.Storage.ListBuckets:output_type -> google.storage.v2.ListBucketsResponse - 44, // 140: google.storage.v2.Storage.LockBucketRetentionPolicy:output_type -> google.storage.v2.Bucket - 85, // 141: google.storage.v2.Storage.GetIamPolicy:output_type -> google.iam.v1.Policy - 85, // 142: google.storage.v2.Storage.SetIamPolicy:output_type -> google.iam.v1.Policy - 86, // 143: google.storage.v2.Storage.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse - 44, // 144: google.storage.v2.Storage.UpdateBucket:output_type -> google.storage.v2.Bucket - 49, // 145: google.storage.v2.Storage.ComposeObject:output_type -> google.storage.v2.Object - 84, // 146: google.storage.v2.Storage.DeleteObject:output_type -> google.protobuf.Empty - 49, // 147: google.storage.v2.Storage.RestoreObject:output_type -> google.storage.v2.Object - 12, // 148: google.storage.v2.Storage.CancelResumableWrite:output_type -> google.storage.v2.CancelResumableWriteResponse - 49, // 149: google.storage.v2.Storage.GetObject:output_type -> google.storage.v2.Object - 15, // 150: google.storage.v2.Storage.ReadObject:output_type -> google.storage.v2.ReadObjectResponse - 18, // 151: google.storage.v2.Storage.BidiReadObject:output_type -> google.storage.v2.BidiReadObjectResponse - 49, // 152: google.storage.v2.Storage.UpdateObject:output_type -> google.storage.v2.Object - 29, // 153: google.storage.v2.Storage.WriteObject:output_type -> google.storage.v2.WriteObjectResponse - 32, // 154: google.storage.v2.Storage.BidiWriteObject:output_type -> google.storage.v2.BidiWriteObjectResponse - 51, // 155: google.storage.v2.Storage.ListObjects:output_type -> google.storage.v2.ListObjectsResponse - 37, // 156: google.storage.v2.Storage.RewriteObject:output_type -> google.storage.v2.RewriteResponse - 40, // 157: google.storage.v2.Storage.StartResumableWrite:output_type -> google.storage.v2.StartResumableWriteResponse - 35, // 158: google.storage.v2.Storage.QueryWriteStatus:output_type -> google.storage.v2.QueryWriteStatusResponse - 49, // 159: google.storage.v2.Storage.MoveObject:output_type -> google.storage.v2.Object - 136, // [136:160] is the sub-list for method output_type - 112, // [112:136] is the sub-list for method input_type - 112, // [112:112] is the sub-list for extension type_name - 112, // [112:112] is the sub-list for extension extendee - 0, // [0:112] is the sub-list for field type_name + 88, // 0: google.storage.v2.GetBucketRequest.read_mask:type_name -> google.protobuf.FieldMask + 45, // 1: google.storage.v2.CreateBucketRequest.bucket:type_name -> google.storage.v2.Bucket + 88, // 2: google.storage.v2.ListBucketsRequest.read_mask:type_name -> google.protobuf.FieldMask + 45, // 3: google.storage.v2.ListBucketsResponse.buckets:type_name -> google.storage.v2.Bucket + 45, // 4: google.storage.v2.UpdateBucketRequest.bucket:type_name -> google.storage.v2.Bucket + 88, // 5: google.storage.v2.UpdateBucketRequest.update_mask:type_name -> google.protobuf.FieldMask + 52, // 6: google.storage.v2.ComposeObjectRequest.destination:type_name -> google.storage.v2.Object + 58, // 7: google.storage.v2.ComposeObjectRequest.source_objects:type_name -> google.storage.v2.ComposeObjectRequest.SourceObject + 43, // 8: google.storage.v2.ComposeObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 48, // 9: google.storage.v2.ComposeObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums + 43, // 10: google.storage.v2.DeleteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 43, // 11: google.storage.v2.RestoreObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 43, // 12: google.storage.v2.ReadObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 88, // 13: google.storage.v2.ReadObjectRequest.read_mask:type_name -> google.protobuf.FieldMask + 43, // 14: google.storage.v2.GetObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 88, // 15: google.storage.v2.GetObjectRequest.read_mask:type_name -> google.protobuf.FieldMask + 47, // 16: google.storage.v2.ReadObjectResponse.checksummed_data:type_name -> google.storage.v2.ChecksummedData + 48, // 17: google.storage.v2.ReadObjectResponse.object_checksums:type_name -> google.storage.v2.ObjectChecksums + 57, // 18: google.storage.v2.ReadObjectResponse.content_range:type_name -> google.storage.v2.ContentRange + 52, // 19: google.storage.v2.ReadObjectResponse.metadata:type_name -> google.storage.v2.Object + 43, // 20: google.storage.v2.BidiReadObjectSpec.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 88, // 21: google.storage.v2.BidiReadObjectSpec.read_mask:type_name -> google.protobuf.FieldMask + 26, // 22: google.storage.v2.BidiReadObjectSpec.read_handle:type_name -> google.storage.v2.BidiReadHandle + 17, // 23: google.storage.v2.BidiReadObjectRequest.read_object_spec:type_name -> google.storage.v2.BidiReadObjectSpec + 24, // 24: google.storage.v2.BidiReadObjectRequest.read_ranges:type_name -> google.storage.v2.ReadRange + 25, // 25: google.storage.v2.BidiReadObjectResponse.object_data_ranges:type_name -> google.storage.v2.ObjectRangeData + 52, // 26: google.storage.v2.BidiReadObjectResponse.metadata:type_name -> google.storage.v2.Object + 26, // 27: google.storage.v2.BidiReadObjectResponse.read_handle:type_name -> google.storage.v2.BidiReadHandle + 26, // 28: google.storage.v2.BidiReadObjectRedirectedError.read_handle:type_name -> google.storage.v2.BidiReadHandle + 27, // 29: google.storage.v2.BidiWriteObjectRedirectedError.write_handle:type_name -> google.storage.v2.BidiWriteHandle + 23, // 30: google.storage.v2.BidiReadObjectError.read_range_errors:type_name -> google.storage.v2.ReadRangeError + 89, // 31: google.storage.v2.ReadRangeError.status:type_name -> google.rpc.Status + 47, // 32: google.storage.v2.ObjectRangeData.checksummed_data:type_name -> google.storage.v2.ChecksummedData + 24, // 33: google.storage.v2.ObjectRangeData.read_range:type_name -> google.storage.v2.ReadRange + 52, // 34: google.storage.v2.WriteObjectSpec.resource:type_name -> google.storage.v2.Object + 28, // 35: google.storage.v2.WriteObjectRequest.write_object_spec:type_name -> google.storage.v2.WriteObjectSpec + 47, // 36: google.storage.v2.WriteObjectRequest.checksummed_data:type_name -> google.storage.v2.ChecksummedData + 48, // 37: google.storage.v2.WriteObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums + 43, // 38: google.storage.v2.WriteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 52, // 39: google.storage.v2.WriteObjectResponse.resource:type_name -> google.storage.v2.Object + 27, // 40: google.storage.v2.AppendObjectSpec.write_handle:type_name -> google.storage.v2.BidiWriteHandle + 28, // 41: google.storage.v2.BidiWriteObjectRequest.write_object_spec:type_name -> google.storage.v2.WriteObjectSpec + 31, // 42: google.storage.v2.BidiWriteObjectRequest.append_object_spec:type_name -> google.storage.v2.AppendObjectSpec + 47, // 43: google.storage.v2.BidiWriteObjectRequest.checksummed_data:type_name -> google.storage.v2.ChecksummedData + 48, // 44: google.storage.v2.BidiWriteObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums + 43, // 45: google.storage.v2.BidiWriteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 52, // 46: google.storage.v2.BidiWriteObjectResponse.resource:type_name -> google.storage.v2.Object + 27, // 47: google.storage.v2.BidiWriteObjectResponse.write_handle:type_name -> google.storage.v2.BidiWriteHandle + 88, // 48: google.storage.v2.ListObjectsRequest.read_mask:type_name -> google.protobuf.FieldMask + 43, // 49: google.storage.v2.QueryWriteStatusRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 52, // 50: google.storage.v2.QueryWriteStatusResponse.resource:type_name -> google.storage.v2.Object + 52, // 51: google.storage.v2.RewriteObjectRequest.destination:type_name -> google.storage.v2.Object + 43, // 52: google.storage.v2.RewriteObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 48, // 53: google.storage.v2.RewriteObjectRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums + 52, // 54: google.storage.v2.RewriteResponse.resource:type_name -> google.storage.v2.Object + 28, // 55: google.storage.v2.StartResumableWriteRequest.write_object_spec:type_name -> google.storage.v2.WriteObjectSpec + 43, // 56: google.storage.v2.StartResumableWriteRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 48, // 57: google.storage.v2.StartResumableWriteRequest.object_checksums:type_name -> google.storage.v2.ObjectChecksums + 52, // 58: google.storage.v2.UpdateObjectRequest.object:type_name -> google.storage.v2.Object + 88, // 59: google.storage.v2.UpdateObjectRequest.update_mask:type_name -> google.protobuf.FieldMask + 43, // 60: google.storage.v2.UpdateObjectRequest.common_object_request_params:type_name -> google.storage.v2.CommonObjectRequestParams + 46, // 61: google.storage.v2.Bucket.acl:type_name -> google.storage.v2.BucketAccessControl + 53, // 62: google.storage.v2.Bucket.default_object_acl:type_name -> google.storage.v2.ObjectAccessControl + 64, // 63: google.storage.v2.Bucket.lifecycle:type_name -> google.storage.v2.Bucket.Lifecycle + 90, // 64: google.storage.v2.Bucket.create_time:type_name -> google.protobuf.Timestamp + 61, // 65: google.storage.v2.Bucket.cors:type_name -> google.storage.v2.Bucket.Cors + 90, // 66: google.storage.v2.Bucket.update_time:type_name -> google.protobuf.Timestamp + 75, // 67: google.storage.v2.Bucket.labels:type_name -> google.storage.v2.Bucket.LabelsEntry + 70, // 68: google.storage.v2.Bucket.website:type_name -> google.storage.v2.Bucket.Website + 69, // 69: google.storage.v2.Bucket.versioning:type_name -> google.storage.v2.Bucket.Versioning + 65, // 70: google.storage.v2.Bucket.logging:type_name -> google.storage.v2.Bucket.Logging + 56, // 71: google.storage.v2.Bucket.owner:type_name -> google.storage.v2.Owner + 62, // 72: google.storage.v2.Bucket.encryption:type_name -> google.storage.v2.Bucket.Encryption + 60, // 73: google.storage.v2.Bucket.billing:type_name -> google.storage.v2.Bucket.Billing + 67, // 74: google.storage.v2.Bucket.retention_policy:type_name -> google.storage.v2.Bucket.RetentionPolicy + 63, // 75: google.storage.v2.Bucket.iam_config:type_name -> google.storage.v2.Bucket.IamConfig + 71, // 76: google.storage.v2.Bucket.custom_placement_config:type_name -> google.storage.v2.Bucket.CustomPlacementConfig + 72, // 77: google.storage.v2.Bucket.autoclass:type_name -> google.storage.v2.Bucket.Autoclass + 74, // 78: google.storage.v2.Bucket.hierarchical_namespace:type_name -> google.storage.v2.Bucket.HierarchicalNamespace + 68, // 79: google.storage.v2.Bucket.soft_delete_policy:type_name -> google.storage.v2.Bucket.SoftDeletePolicy + 66, // 80: google.storage.v2.Bucket.object_retention:type_name -> google.storage.v2.Bucket.ObjectRetention + 73, // 81: google.storage.v2.Bucket.ip_filter:type_name -> google.storage.v2.Bucket.IpFilter + 55, // 82: google.storage.v2.BucketAccessControl.project_team:type_name -> google.storage.v2.ProjectTeam + 90, // 83: google.storage.v2.ObjectCustomContextPayload.create_time:type_name -> google.protobuf.Timestamp + 90, // 84: google.storage.v2.ObjectCustomContextPayload.update_time:type_name -> google.protobuf.Timestamp + 85, // 85: google.storage.v2.ObjectContexts.custom:type_name -> google.storage.v2.ObjectContexts.CustomEntry + 53, // 86: google.storage.v2.Object.acl:type_name -> google.storage.v2.ObjectAccessControl + 90, // 87: google.storage.v2.Object.delete_time:type_name -> google.protobuf.Timestamp + 90, // 88: google.storage.v2.Object.finalize_time:type_name -> google.protobuf.Timestamp + 90, // 89: google.storage.v2.Object.create_time:type_name -> google.protobuf.Timestamp + 48, // 90: google.storage.v2.Object.checksums:type_name -> google.storage.v2.ObjectChecksums + 90, // 91: google.storage.v2.Object.update_time:type_name -> google.protobuf.Timestamp + 90, // 92: google.storage.v2.Object.update_storage_class_time:type_name -> google.protobuf.Timestamp + 90, // 93: google.storage.v2.Object.retention_expire_time:type_name -> google.protobuf.Timestamp + 87, // 94: google.storage.v2.Object.metadata:type_name -> google.storage.v2.Object.MetadataEntry + 50, // 95: google.storage.v2.Object.contexts:type_name -> google.storage.v2.ObjectContexts + 56, // 96: google.storage.v2.Object.owner:type_name -> google.storage.v2.Owner + 51, // 97: google.storage.v2.Object.customer_encryption:type_name -> google.storage.v2.CustomerEncryption + 90, // 98: google.storage.v2.Object.custom_time:type_name -> google.protobuf.Timestamp + 90, // 99: google.storage.v2.Object.soft_delete_time:type_name -> google.protobuf.Timestamp + 90, // 100: google.storage.v2.Object.hard_delete_time:type_name -> google.protobuf.Timestamp + 86, // 101: google.storage.v2.Object.retention:type_name -> google.storage.v2.Object.Retention + 55, // 102: google.storage.v2.ObjectAccessControl.project_team:type_name -> google.storage.v2.ProjectTeam + 52, // 103: google.storage.v2.ListObjectsResponse.objects:type_name -> google.storage.v2.Object + 59, // 104: google.storage.v2.ComposeObjectRequest.SourceObject.object_preconditions:type_name -> google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions + 76, // 105: google.storage.v2.Bucket.Encryption.google_managed_encryption_enforcement_config:type_name -> google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig + 77, // 106: google.storage.v2.Bucket.Encryption.customer_managed_encryption_enforcement_config:type_name -> google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig + 78, // 107: google.storage.v2.Bucket.Encryption.customer_supplied_encryption_enforcement_config:type_name -> google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig + 79, // 108: google.storage.v2.Bucket.IamConfig.uniform_bucket_level_access:type_name -> google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess + 80, // 109: google.storage.v2.Bucket.Lifecycle.rule:type_name -> google.storage.v2.Bucket.Lifecycle.Rule + 90, // 110: google.storage.v2.Bucket.RetentionPolicy.effective_time:type_name -> google.protobuf.Timestamp + 91, // 111: google.storage.v2.Bucket.RetentionPolicy.retention_duration:type_name -> google.protobuf.Duration + 91, // 112: google.storage.v2.Bucket.SoftDeletePolicy.retention_duration:type_name -> google.protobuf.Duration + 90, // 113: google.storage.v2.Bucket.SoftDeletePolicy.effective_time:type_name -> google.protobuf.Timestamp + 90, // 114: google.storage.v2.Bucket.Autoclass.toggle_time:type_name -> google.protobuf.Timestamp + 90, // 115: google.storage.v2.Bucket.Autoclass.terminal_storage_class_update_time:type_name -> google.protobuf.Timestamp + 83, // 116: google.storage.v2.Bucket.IpFilter.public_network_source:type_name -> google.storage.v2.Bucket.IpFilter.PublicNetworkSource + 84, // 117: google.storage.v2.Bucket.IpFilter.vpc_network_sources:type_name -> google.storage.v2.Bucket.IpFilter.VpcNetworkSource + 90, // 118: google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig.effective_time:type_name -> google.protobuf.Timestamp + 90, // 119: google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig.effective_time:type_name -> google.protobuf.Timestamp + 90, // 120: google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig.effective_time:type_name -> google.protobuf.Timestamp + 90, // 121: google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess.lock_time:type_name -> google.protobuf.Timestamp + 81, // 122: google.storage.v2.Bucket.Lifecycle.Rule.action:type_name -> google.storage.v2.Bucket.Lifecycle.Rule.Action + 82, // 123: google.storage.v2.Bucket.Lifecycle.Rule.condition:type_name -> google.storage.v2.Bucket.Lifecycle.Rule.Condition + 92, // 124: google.storage.v2.Bucket.Lifecycle.Rule.Condition.created_before:type_name -> google.type.Date + 92, // 125: google.storage.v2.Bucket.Lifecycle.Rule.Condition.custom_time_before:type_name -> google.type.Date + 92, // 126: google.storage.v2.Bucket.Lifecycle.Rule.Condition.noncurrent_time_before:type_name -> google.type.Date + 49, // 127: google.storage.v2.ObjectContexts.CustomEntry.value:type_name -> google.storage.v2.ObjectCustomContextPayload + 1, // 128: google.storage.v2.Object.Retention.mode:type_name -> google.storage.v2.Object.Retention.Mode + 90, // 129: google.storage.v2.Object.Retention.retain_until_time:type_name -> google.protobuf.Timestamp + 2, // 130: google.storage.v2.Storage.DeleteBucket:input_type -> google.storage.v2.DeleteBucketRequest + 3, // 131: google.storage.v2.Storage.GetBucket:input_type -> google.storage.v2.GetBucketRequest + 4, // 132: google.storage.v2.Storage.CreateBucket:input_type -> google.storage.v2.CreateBucketRequest + 5, // 133: google.storage.v2.Storage.ListBuckets:input_type -> google.storage.v2.ListBucketsRequest + 7, // 134: google.storage.v2.Storage.LockBucketRetentionPolicy:input_type -> google.storage.v2.LockBucketRetentionPolicyRequest + 93, // 135: google.storage.v2.Storage.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest + 94, // 136: google.storage.v2.Storage.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest + 95, // 137: google.storage.v2.Storage.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest + 8, // 138: google.storage.v2.Storage.UpdateBucket:input_type -> google.storage.v2.UpdateBucketRequest + 9, // 139: google.storage.v2.Storage.ComposeObject:input_type -> google.storage.v2.ComposeObjectRequest + 10, // 140: google.storage.v2.Storage.DeleteObject:input_type -> google.storage.v2.DeleteObjectRequest + 11, // 141: google.storage.v2.Storage.RestoreObject:input_type -> google.storage.v2.RestoreObjectRequest + 12, // 142: google.storage.v2.Storage.CancelResumableWrite:input_type -> google.storage.v2.CancelResumableWriteRequest + 15, // 143: google.storage.v2.Storage.GetObject:input_type -> google.storage.v2.GetObjectRequest + 14, // 144: google.storage.v2.Storage.ReadObject:input_type -> google.storage.v2.ReadObjectRequest + 18, // 145: google.storage.v2.Storage.BidiReadObject:input_type -> google.storage.v2.BidiReadObjectRequest + 42, // 146: google.storage.v2.Storage.UpdateObject:input_type -> google.storage.v2.UpdateObjectRequest + 29, // 147: google.storage.v2.Storage.WriteObject:input_type -> google.storage.v2.WriteObjectRequest + 32, // 148: google.storage.v2.Storage.BidiWriteObject:input_type -> google.storage.v2.BidiWriteObjectRequest + 34, // 149: google.storage.v2.Storage.ListObjects:input_type -> google.storage.v2.ListObjectsRequest + 37, // 150: google.storage.v2.Storage.RewriteObject:input_type -> google.storage.v2.RewriteObjectRequest + 40, // 151: google.storage.v2.Storage.StartResumableWrite:input_type -> google.storage.v2.StartResumableWriteRequest + 35, // 152: google.storage.v2.Storage.QueryWriteStatus:input_type -> google.storage.v2.QueryWriteStatusRequest + 39, // 153: google.storage.v2.Storage.MoveObject:input_type -> google.storage.v2.MoveObjectRequest + 96, // 154: google.storage.v2.Storage.DeleteBucket:output_type -> google.protobuf.Empty + 45, // 155: google.storage.v2.Storage.GetBucket:output_type -> google.storage.v2.Bucket + 45, // 156: google.storage.v2.Storage.CreateBucket:output_type -> google.storage.v2.Bucket + 6, // 157: google.storage.v2.Storage.ListBuckets:output_type -> google.storage.v2.ListBucketsResponse + 45, // 158: google.storage.v2.Storage.LockBucketRetentionPolicy:output_type -> google.storage.v2.Bucket + 97, // 159: google.storage.v2.Storage.GetIamPolicy:output_type -> google.iam.v1.Policy + 97, // 160: google.storage.v2.Storage.SetIamPolicy:output_type -> google.iam.v1.Policy + 98, // 161: google.storage.v2.Storage.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse + 45, // 162: google.storage.v2.Storage.UpdateBucket:output_type -> google.storage.v2.Bucket + 52, // 163: google.storage.v2.Storage.ComposeObject:output_type -> google.storage.v2.Object + 96, // 164: google.storage.v2.Storage.DeleteObject:output_type -> google.protobuf.Empty + 52, // 165: google.storage.v2.Storage.RestoreObject:output_type -> google.storage.v2.Object + 13, // 166: google.storage.v2.Storage.CancelResumableWrite:output_type -> google.storage.v2.CancelResumableWriteResponse + 52, // 167: google.storage.v2.Storage.GetObject:output_type -> google.storage.v2.Object + 16, // 168: google.storage.v2.Storage.ReadObject:output_type -> google.storage.v2.ReadObjectResponse + 19, // 169: google.storage.v2.Storage.BidiReadObject:output_type -> google.storage.v2.BidiReadObjectResponse + 52, // 170: google.storage.v2.Storage.UpdateObject:output_type -> google.storage.v2.Object + 30, // 171: google.storage.v2.Storage.WriteObject:output_type -> google.storage.v2.WriteObjectResponse + 33, // 172: google.storage.v2.Storage.BidiWriteObject:output_type -> google.storage.v2.BidiWriteObjectResponse + 54, // 173: google.storage.v2.Storage.ListObjects:output_type -> google.storage.v2.ListObjectsResponse + 38, // 174: google.storage.v2.Storage.RewriteObject:output_type -> google.storage.v2.RewriteResponse + 41, // 175: google.storage.v2.Storage.StartResumableWrite:output_type -> google.storage.v2.StartResumableWriteResponse + 36, // 176: google.storage.v2.Storage.QueryWriteStatus:output_type -> google.storage.v2.QueryWriteStatusResponse + 52, // 177: google.storage.v2.Storage.MoveObject:output_type -> google.storage.v2.Object + 154, // [154:178] is the sub-list for method output_type + 130, // [130:154] is the sub-list for method input_type + 130, // [130:130] is the sub-list for extension type_name + 130, // [130:130] is the sub-list for extension extendee + 0, // [0:130] is the sub-list for field type_name } func init() { file_google_storage_v2_storage_proto_init() } @@ -9233,20 +10318,27 @@ func file_google_storage_v2_storage_proto_init() { file_google_storage_v2_storage_proto_msgTypes[35].OneofWrappers = []any{} file_google_storage_v2_storage_proto_msgTypes[37].OneofWrappers = []any{} file_google_storage_v2_storage_proto_msgTypes[40].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[43].OneofWrappers = []any{} file_google_storage_v2_storage_proto_msgTypes[45].OneofWrappers = []any{} file_google_storage_v2_storage_proto_msgTypes[46].OneofWrappers = []any{} - file_google_storage_v2_storage_proto_msgTypes[48].OneofWrappers = []any{} - file_google_storage_v2_storage_proto_msgTypes[55].OneofWrappers = []any{} - file_google_storage_v2_storage_proto_msgTypes[63].OneofWrappers = []any{} - file_google_storage_v2_storage_proto_msgTypes[67].OneofWrappers = []any{} - file_google_storage_v2_storage_proto_msgTypes[73].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[50].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[57].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[60].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[66].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[70].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[71].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[74].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[75].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[76].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[80].OneofWrappers = []any{} + file_google_storage_v2_storage_proto_msgTypes[82].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_storage_v2_storage_proto_rawDesc, - NumEnums: 1, - NumMessages: 75, + NumEnums: 2, + NumMessages: 86, NumExtensions: 0, NumServices: 1, }, @@ -9285,11 +10377,15 @@ type StorageClient interface { LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) // Gets the IAM policy for a specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}`. + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) // Updates an IAM policy for the specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}`. + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) // Tests a set of permissions on the given bucket, object, or managed folder // to see which, if any, are held by the caller. @@ -9836,11 +10932,15 @@ type StorageServer interface { LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) // Gets the IAM policy for a specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}`. + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) // Updates an IAM policy for the specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}`. + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) // Tests a set of permissions on the given bucket, object, or managed folder // to see which, if any, are held by the caller. diff --git a/vendor/cloud.google.com/go/storage/internal/experimental.go b/vendor/cloud.google.com/go/storage/internal/experimental.go index 2fd5111fb30..4482eab8a34 100644 --- a/vendor/cloud.google.com/go/storage/internal/experimental.go +++ b/vendor/cloud.google.com/go/storage/internal/experimental.go @@ -33,4 +33,9 @@ var ( // WithGRPCBidiReads is a function which is implemented by the storage package. // It sets the gRPC client to use the BidiReadObject API for downloads. WithGRPCBidiReads any // func() option.ClientOption + + // WithZonalBucketAPIs is a function which is implemented by the storage package. + // It sets the gRPC client to use the BidiReadObject API for downloads and + // appendable object semantics by default for uploads. + WithZonalBucketAPIs any // func() option.ClientOption ) diff --git a/vendor/cloud.google.com/go/storage/internal/version.go b/vendor/cloud.google.com/go/storage/internal/version.go index ba56cacd8ed..f801fb63b98 100644 --- a/vendor/cloud.google.com/go/storage/internal/version.go +++ b/vendor/cloud.google.com/go/storage/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.50.0" +const Version = "1.56.0" diff --git a/vendor/cloud.google.com/go/storage/invoke.go b/vendor/cloud.google.com/go/storage/invoke.go index 99783f3df47..7d0a45c7d79 100644 --- a/vendor/cloud.google.com/go/storage/invoke.go +++ b/vendor/cloud.google.com/go/storage/invoke.go @@ -21,7 +21,10 @@ import ( "io" "net" "net/url" + "os" "strings" + "sync" + "time" "cloud.google.com/go/internal" "cloud.google.com/go/internal/version" @@ -38,10 +41,25 @@ var defaultRetry *retryConfig = &retryConfig{} var xGoogDefaultHeader = fmt.Sprintf("gl-go/%s gccl/%s", version.Go(), sinternal.Version) const ( - xGoogHeaderKey = "x-goog-api-client" - idempotencyHeaderKey = "x-goog-gcs-idempotency-token" + xGoogHeaderKey = "x-goog-api-client" + idempotencyHeaderKey = "x-goog-gcs-idempotency-token" + cookieHeaderKey = "cookie" + directpathCookieHeaderKey = "x-directpath-tracing-cookie" ) +var ( + cookieHeader = sync.OnceValue(func() string { + return os.Getenv("GOOGLE_SDK_GO_TRACING_COOKIE") + }) +) + +func (r *retryConfig) runShouldRetry(err error) bool { + if r == nil || r.shouldRetry == nil { + return ShouldRetry(err) + } + return r.shouldRetry(err) +} + // run determines whether a retry is necessary based on the config and // idempotency information. It then calls the function with or without retries // as appropriate, using the configured settings. @@ -62,19 +80,33 @@ func run(ctx context.Context, call func(ctx context.Context) error, retry *retry bo.Initial = retry.backoff.Initial bo.Max = retry.backoff.Max } - var errorFunc func(err error) bool = ShouldRetry - if retry.shouldRetry != nil { - errorFunc = retry.shouldRetry + + var quitAfterTimer *time.Timer + if retry.maxRetryDuration != 0 { + quitAfterTimer = time.NewTimer(retry.maxRetryDuration) + defer quitAfterTimer.Stop() } + var lastErr error return internal.Retry(ctx, bo, func() (stop bool, err error) { + if retry.maxRetryDuration != 0 { + select { + case <-quitAfterTimer.C: + if lastErr == nil { + return true, fmt.Errorf("storage: request not sent, choose a larger value for the retry deadline (currently set to %s)", retry.maxRetryDuration) + } + return true, fmt.Errorf("storage: retry deadline of %s reached after %v attempts; last error: %w", retry.maxRetryDuration, attempts, lastErr) + default: + } + } + ctxWithHeaders := setInvocationHeaders(ctx, invocationID, attempts) - err = call(ctxWithHeaders) - if err != nil && retry.maxAttempts != nil && attempts >= *retry.maxAttempts { - return true, fmt.Errorf("storage: retry failed after %v attempts; last error: %w", *retry.maxAttempts, err) + lastErr = call(ctxWithHeaders) + if lastErr != nil && retry.maxAttempts != nil && attempts >= *retry.maxAttempts { + return true, fmt.Errorf("storage: retry failed after %v attempts; last error: %w", *retry.maxAttempts, lastErr) } attempts++ - retryable := errorFunc(err) + retryable := retry.runShouldRetry(lastErr) // Explicitly check context cancellation so that we can distinguish between a // DEADLINE_EXCEEDED error from the server and a user-set context deadline. // Unfortunately gRPC will codes.DeadlineExceeded (which may be retryable if it's @@ -82,7 +114,7 @@ func run(ctx context.Context, call func(ctx context.Context) error, retry *retry if ctxErr := ctx.Err(); errors.Is(ctxErr, context.Canceled) || errors.Is(ctxErr, context.DeadlineExceeded) { retryable = false } - return !retryable, err + return !retryable, lastErr }) } @@ -94,6 +126,12 @@ func setInvocationHeaders(ctx context.Context, invocationID string, attempts int ctx = callctx.SetHeaders(ctx, xGoogHeaderKey, xGoogHeader) ctx = callctx.SetHeaders(ctx, idempotencyHeaderKey, invocationID) + + if c := cookieHeader(); c != "" { + ctx = callctx.SetHeaders(ctx, cookieHeaderKey, c) + ctx = callctx.SetHeaders(ctx, directpathCookieHeaderKey, c) + } + return ctx } @@ -132,6 +170,15 @@ func ShouldRetry(err error) bool { return true } } + // TODO: remove when https://github.com/golang/go/issues/53472 is resolved. + // We don't want to retry io.EOF errors, since these can indicate normal + // functioning terminations such as internally in the case of Reader and + // externally in the case of iterator methods. However, the linked bug + // requires us to retry the EOFs that it causes, which should be wrapped + // in net or url errors. + if errors.Is(err, io.EOF) { + return true + } case *net.DNSError: if e.IsTemporary { return true diff --git a/vendor/cloud.google.com/go/storage/notifications.go b/vendor/cloud.google.com/go/storage/notifications.go index bc15900f01e..3b1df8afb54 100644 --- a/vendor/cloud.google.com/go/storage/notifications.go +++ b/vendor/cloud.google.com/go/storage/notifications.go @@ -20,7 +20,6 @@ import ( "fmt" "regexp" - "cloud.google.com/go/internal/trace" raw "google.golang.org/api/storage/v1" ) @@ -121,8 +120,8 @@ func toRawNotification(n *Notification) *raw.Notification { // returned Notification's ID can be used to refer to it. // Note: gRPC is not supported. func (b *BucketHandle) AddNotification(ctx context.Context, n *Notification) (ret *Notification, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.AddNotification") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.AddNotification") + defer func() { endSpan(ctx, err) }() if n.ID != "" { return nil, errors.New("storage: AddNotification: ID must not be set") @@ -143,8 +142,8 @@ func (b *BucketHandle) AddNotification(ctx context.Context, n *Notification) (re // indexed by notification ID. // Note: gRPC is not supported. func (b *BucketHandle) Notifications(ctx context.Context) (n map[string]*Notification, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.Notifications") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.Notifications") + defer func() { endSpan(ctx, err) }() opts := makeStorageOpts(true, b.retry, b.userProject) n, err = b.c.tc.ListNotifications(ctx, b.name, opts...) @@ -162,8 +161,8 @@ func notificationsToMap(rns []*raw.Notification) map[string]*Notification { // DeleteNotification deletes the notification with the given ID. // Note: gRPC is not supported. func (b *BucketHandle) DeleteNotification(ctx context.Context, id string) (err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Bucket.DeleteNotification") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Bucket.DeleteNotification") + defer func() { endSpan(ctx, err) }() opts := makeStorageOpts(true, b.retry, b.userProject) return b.c.tc.DeleteNotification(ctx, b.name, id, opts...) diff --git a/vendor/cloud.google.com/go/storage/option.go b/vendor/cloud.google.com/go/storage/option.go index 16d57644aae..6548cc18e82 100644 --- a/vendor/cloud.google.com/go/storage/option.go +++ b/vendor/cloud.google.com/go/storage/option.go @@ -41,6 +41,7 @@ func init() { storageinternal.WithMetricInterval = withMetricInterval storageinternal.WithReadStallTimeout = withReadStallTimeout storageinternal.WithGRPCBidiReads = withGRPCBidiReads + storageinternal.WithZonalBucketAPIs = withZonalBucketAPIs } // getDynamicReadReqIncreaseRateFromEnv returns the value set in the env variable. @@ -83,6 +84,7 @@ type storageConfig struct { manualReader *metric.ManualReader readStallTimeoutConfig *experimental.ReadStallTimeoutConfig grpcBidiReads bool + grpcAppendableUploads bool } // newStorageConfig generates a new storageConfig with all the given @@ -254,3 +256,17 @@ type withGRPCBidiReadsConfig struct { func (w *withGRPCBidiReadsConfig) ApplyStorageOpt(config *storageConfig) { config.grpcBidiReads = true } + +func withZonalBucketAPIs() option.ClientOption { + return &withZonalBucketAPIsConfig{} +} + +type withZonalBucketAPIsConfig struct { + internaloption.EmbeddableAdapter +} + +func (w *withZonalBucketAPIsConfig) ApplyStorageOpt(config *storageConfig) { + // Use both appendable upload semantics and bidi reads. + config.grpcAppendableUploads = true + config.grpcBidiReads = true +} diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go index 6b14fd1dce1..793c1b2e0e8 100644 --- a/vendor/cloud.google.com/go/storage/reader.go +++ b/vendor/cloud.google.com/go/storage/reader.go @@ -19,7 +19,6 @@ import ( "fmt" "hash/crc32" "io" - "io/ioutil" "net/http" "strings" "sync" @@ -37,6 +36,7 @@ var crc32cTable = crc32.MakeTable(crc32.Castagnoli) // Each field is read-only. type ReaderObjectAttrs struct { // Size is the length of the object's content. + // Size may be out of date for unfinalized objects. Size int64 // StartOffset is the byte offset within the object @@ -161,7 +161,9 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) // Must be called on a gRPC client created using [NewGRPCClient]. // // This uses the gRPC-specific bi-directional read API, which is in private -// preview; please contact your account manager if interested. +// preview; please contact your account manager if interested. The option +// [experimental.WithGRPCBidiReads] or [experimental.WithZonalBucketAPIs] +// must be selected in order to use this API. func (o *ObjectHandle) NewMultiRangeDownloader(ctx context.Context) (mrd *MultiRangeDownloader, err error) { // This span covers the life of the reader. It is closed via the context // in Reader.Close. @@ -258,7 +260,7 @@ func setConditionsHeaders(headers http.Header, conds *Conditions) error { return nil } -var emptyBody = ioutil.NopCloser(strings.NewReader("")) +var emptyBody = io.NopCloser(strings.NewReader("")) // Reader reads a Cloud Storage object. // It implements io.Reader. @@ -273,10 +275,11 @@ type Reader struct { seen, remain, size int64 checkCRC bool // Did we check the CRC? This is now only used by tests. - reader io.ReadCloser - ctx context.Context - mu sync.Mutex - handle *ReadHandle + reader io.ReadCloser + ctx context.Context + mu sync.Mutex + handle *ReadHandle + unfinalized bool } // Close closes the Reader. It must be called when done reading. @@ -309,6 +312,7 @@ func (r *Reader) WriteTo(w io.Writer) (int64, error) { // Size returns the size of the object in bytes. // The returned value is always the same and is not affected by // calls to Read or Close. +// Size may be out of date for a Reader to an unfinalized object. // // Deprecated: use Reader.Attrs.Size. func (r *Reader) Size() int64 { @@ -316,7 +320,11 @@ func (r *Reader) Size() int64 { } // Remain returns the number of bytes left to read, or -1 if unknown. +// Unfinalized objects will return -1. func (r *Reader) Remain() int64 { + if r.unfinalized { + return -1 + } return r.remain } @@ -393,6 +401,7 @@ type multiRangeDownloader interface { wait() close() error getHandle() []byte + error() error } // Add adds a new range to MultiRangeDownloader. @@ -411,6 +420,10 @@ type multiRangeDownloader interface { // This will initiate the read range but is non-blocking; call callback to // process the result. Add is thread-safe and can be called simultaneously // from different goroutines. +// +// Callback will be called with the offset, length of data read, and error +// of the read. Note that the length of the data read may be less than the +// requested length if the end of the object is reached. func (mrd *MultiRangeDownloader) Add(output io.Writer, offset, length int64, callback func(int64, int64, error)) { mrd.reader.add(output, offset, length, callback) } @@ -439,3 +452,10 @@ func (mrd *MultiRangeDownloader) Wait() { func (mrd *MultiRangeDownloader) GetHandle() []byte { return mrd.reader.getHandle() } + +// Error returns an error if the MultiRangeDownloader is in a permanent failure +// state. It returns a nil error if the MultiRangeDownloader is open and can be +// used. +func (mrd *MultiRangeDownloader) Error() error { + return mrd.reader.error() +} diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go index 9c40ca1b47e..d8455425fdc 100644 --- a/vendor/cloud.google.com/go/storage/storage.go +++ b/vendor/cloud.google.com/go/storage/storage.go @@ -38,6 +38,7 @@ import ( "time" "unicode/utf8" + "cloud.google.com/go/auth" "cloud.google.com/go/internal/optional" "cloud.google.com/go/internal/trace" "cloud.google.com/go/storage/internal" @@ -46,15 +47,15 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/metric/metricdata" - "golang.org/x/oauth2/google" "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" raw "google.golang.org/api/storage/v1" - "google.golang.org/api/transport" htransport "google.golang.org/api/transport/http" + "google.golang.org/grpc/codes" "google.golang.org/grpc/experimental/stats" "google.golang.org/grpc/stats/opentelemetry" + "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/known/fieldmaskpb" @@ -65,9 +66,11 @@ import ( var signedURLMethods = map[string]bool{"DELETE": true, "GET": true, "HEAD": true, "POST": true, "PUT": true} var ( - // ErrBucketNotExist indicates that the bucket does not exist. + // ErrBucketNotExist indicates that the bucket does not exist. It should be + // checked for using [errors.Is] instead of direct equality. ErrBucketNotExist = errors.New("storage: bucket doesn't exist") - // ErrObjectNotExist indicates that the object does not exist. + // ErrObjectNotExist indicates that the object does not exist. It should be + // checked for using [errors.Is] instead of direct equality. ErrObjectNotExist = errors.New("storage: object doesn't exist") // errMethodNotSupported indicates that the method called is not currently supported by the client. // TODO: Export this error when launching the transport-agnostic client. @@ -117,11 +120,23 @@ type Client struct { // xmlHost is the default host used for XML requests. xmlHost string // May be nil. - creds *google.Credentials + creds *auth.Credentials retry *retryConfig // tc is the transport-agnostic client implemented with either gRPC or HTTP. tc storageClient + + // Option to use gRRPC appendable upload API was set. + grpcAppendableUploads bool +} + +// credsJSON returns the raw JSON of the Client's creds and true, or an empty slice +// and false if no credentials JSON is available. +func (c Client) credsJSON() ([]byte, bool) { + if c.creds != nil && len(c.creds.JSON()) > 0 { + return c.creds.JSON(), true + } + return []byte{}, false } // NewClient creates a new Google Cloud Storage client using the HTTP transport. @@ -134,7 +149,7 @@ type Client struct { // You may configure the client by passing in options from the [google.golang.org/api/option] // package. You may also use options defined in this package, such as [WithJSONReads]. func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { - var creds *google.Credentials + var creds *auth.Credentials // In general, it is recommended to use raw.NewService instead of htransport.NewClient // since raw.NewService configures the correct default endpoints when initializing the @@ -150,14 +165,15 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error opts = append(opts, internaloption.WithDefaultEndpointTemplate("https://storage.UNIVERSE_DOMAIN/storage/v1/"), internaloption.WithDefaultMTLSEndpoint("https://storage.mtls.googleapis.com/storage/v1/"), internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.EnableNewAuthLibrary(), ) // Don't error out here. The user may have passed in their own HTTP // client which does not auth with ADC or other common conventions. - c, err := transport.Creds(ctx, opts...) + c, err := internaloption.AuthCreds(ctx, opts) if err == nil { creds = c - opts = append(opts, internaloption.WithCredentials(creds)) + opts = append(opts, option.WithAuthCredentials(creds)) } } else { var hostURL *url.URL @@ -234,8 +250,10 @@ func NewGRPCClient(ctx context.Context, opts ...option.ClientOption) (*Client, e if err != nil { return nil, err } - - return &Client{tc: tc}, nil + return &Client{ + tc: tc, + grpcAppendableUploads: tc.config.grpcAppendableUploads, + }, nil } // CheckDirectConnectivitySupported checks if gRPC direct connectivity @@ -1019,8 +1037,8 @@ func (o *ObjectHandle) Key(encryptionKey []byte) *ObjectHandle { // Attrs returns meta information about the object. // ErrObjectNotExist will be returned if the object is not found. func (o *ObjectHandle) Attrs(ctx context.Context) (attrs *ObjectAttrs, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Attrs") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Object.Attrs") + defer func() { endSpan(ctx, err) }() if err := o.validate(); err != nil { return nil, err @@ -1033,8 +1051,8 @@ func (o *ObjectHandle) Attrs(ctx context.Context) (attrs *ObjectAttrs, err error // ObjectAttrsToUpdate docs for details on treatment of zero values. // ErrObjectNotExist will be returned if the object is not found. func (o *ObjectHandle) Update(ctx context.Context, uattrs ObjectAttrsToUpdate) (oa *ObjectAttrs, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Update") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Object.Update") + defer func() { endSpan(ctx, err) }() if err := o.validate(); err != nil { return nil, err @@ -1103,7 +1121,9 @@ type ObjectAttrsToUpdate struct { } // Delete deletes the single specified object. -func (o *ObjectHandle) Delete(ctx context.Context) error { +func (o *ObjectHandle) Delete(ctx context.Context) (err error) { + ctx, _ = startSpan(ctx, "Object.Delete") + defer func() { endSpan(ctx, err) }() if err := o.validate(); err != nil { return err } @@ -1234,7 +1254,85 @@ func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer { donec: make(chan struct{}), ObjectAttrs: ObjectAttrs{Name: o.object}, ChunkSize: googleapi.DefaultUploadChunkSize, + Append: o.c.grpcAppendableUploads, + } +} + +// NewWriterFromAppendableObject opens a new Writer to an object which has been +// partially flushed to GCS, but not finalized. It returns the Writer as well +// as the current end offset of the object. All bytes written will be appended +// continuing from the offset. +// +// Generation must be set on the ObjectHandle or an error will be returned. +// +// Writer fields such as ChunkSize or ChunkRetryDuration can be set only +// by setting the equivalent field in [AppendableWriterOpts]. Attributes set +// on the returned Writer will not be honored since the stream to GCS has +// already been opened. Some fields such as ObjectAttrs and checksums cannot +// be set on a takeover for append. +// +// It is the caller's responsibility to call Close when writing is complete to +// close the stream. +// Calling Close or Flush is necessary to sync any data in the pipe to GCS. +// +// The returned Writer is not safe to use across multiple go routines. In +// addition, if you attempt to append to the same object from multiple +// Writers at the same time, an error will be returned on Flush or Close. +// +// NewWriterFromAppendableObject is supported only for gRPC clients and only for +// objects which were created append semantics and not finalized. +// This feature is in preview and is not yet available for general use. +func (o *ObjectHandle) NewWriterFromAppendableObject(ctx context.Context, opts *AppendableWriterOpts) (*Writer, int64, error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Writer") + if o.gen < 0 { + return nil, 0, errors.New("storage: ObjectHandle.Generation must be set to use NewWriterFromAppendableObject") + } + w := &Writer{ + ctx: ctx, + o: o, + donec: make(chan struct{}), + ObjectAttrs: ObjectAttrs{Name: o.object}, + Append: true, + } + opts.apply(w) + if w.ChunkSize == 0 { + w.ChunkSize = googleapi.DefaultUploadChunkSize + } + err := w.openWriter() + if err != nil { + return nil, 0, err + } + return w, w.takeoverOffset, nil +} + +// AppendableWriterOpts provides options to set on a Writer initialized +// by [NewWriterFromAppendableObject]. Writer options must be set via this +// struct rather than being modified on the returned Writer. All Writer +// fields not present in this struct cannot be set when taking over an +// appendable object. +// +// AppendableWriterOpts is supported only for gRPC clients and only for +// objects which were created append semantics and not finalized. +// This feature is in preview and is not yet available for general use. +type AppendableWriterOpts struct { + // ChunkSize: See Writer.ChunkSize. + ChunkSize int + // ChunkRetryDeadline: See Writer.ChunkRetryDeadline. + ChunkRetryDeadline time.Duration + // ProgressFunc: See Writer.ProgressFunc. + ProgressFunc func(int64) + // FinalizeOnClose: See Writer.FinalizeOnClose. + FinalizeOnClose bool +} + +func (opts *AppendableWriterOpts) apply(w *Writer) { + if opts == nil { + return } + w.ChunkRetryDeadline = opts.ChunkRetryDeadline + w.ProgressFunc = opts.ProgressFunc + w.ChunkSize = opts.ChunkSize + w.FinalizeOnClose = opts.FinalizeOnClose } func (o *ObjectHandle) validate() error { @@ -1328,6 +1426,7 @@ func (o *ObjectAttrs) toProtoObject(b string) *storagepb.Object { Acl: toProtoObjectACL(o.ACL), Metadata: o.Metadata, CreateTime: toProtoTimestamp(o.Created), + FinalizeTime: toProtoTimestamp(o.Finalized), CustomTime: toProtoTimestamp(o.CustomTime), DeleteTime: toProtoTimestamp(o.Deleted), RetentionExpireTime: toProtoTimestamp(o.RetentionExpirationTime), @@ -1490,6 +1589,10 @@ type ObjectAttrs struct { // Created is the time the object was created. This field is read-only. Created time.Time + // Finalized is the time the object contents were finalized. This may differ + // from Created for appendable objects. This field is read-only. + Finalized time.Time + // Deleted is the time the object was deleted. // If not deleted, it is the zero value. This field is read-only. Deleted time.Time @@ -1654,6 +1757,7 @@ func newObject(o *raw.Object) *ObjectAttrs { CustomerKeySHA256: sha256, KMSKeyName: o.KmsKeyName, Created: convertTime(o.TimeCreated), + Finalized: convertTime(o.TimeFinalized), Deleted: convertTime(o.TimeDeleted), Updated: convertTime(o.Updated), Etag: o.Etag, @@ -1693,6 +1797,7 @@ func newObjectFromProto(o *storagepb.Object) *ObjectAttrs { CustomerKeySHA256: base64.StdEncoding.EncodeToString(o.GetCustomerEncryption().GetKeySha256Bytes()), KMSKeyName: o.GetKmsKey(), Created: convertProtoTime(o.GetCreateTime()), + Finalized: convertProtoTime(o.GetFinalizeTime()), Deleted: convertProtoTime(o.GetDeleteTime()), Updated: convertProtoTime(o.GetUpdateTime()), CustomTime: convertProtoTime(o.GetCustomTime()), @@ -1840,6 +1945,7 @@ var attrToFieldMap = map[string]string{ "CustomerKeySHA256": "customerEncryption", "KMSKeyName": "kmsKeyName", "Created": "timeCreated", + "Finalized": "timeFinalized", "Deleted": "timeDeleted", "Updated": "updated", "Etag": "etag", @@ -1868,6 +1974,7 @@ var attrToProtoFieldMap = map[string]string{ "Deleted": "delete_time", "ContentType": "content_type", "Created": "create_time", + "Finalized": "finalize_time", "CRC32C": "checksums.crc32c", "MD5": "checksums.md5_hash", "Updated": "update_time", @@ -2420,6 +2527,10 @@ type retryConfig struct { policy RetryPolicy shouldRetry func(err error) bool maxAttempts *int + // maxRetryDuration, if set, specifies a deadline after which the request + // will no longer be retried. A value of 0 allows infinite retries. + // maxRetryDuration is currently only set by Writer.ChunkRetryDeadline. + maxRetryDuration time.Duration } func (r *retryConfig) clone() *retryConfig { @@ -2437,10 +2548,11 @@ func (r *retryConfig) clone() *retryConfig { } return &retryConfig{ - backoff: bo, - policy: r.policy, - shouldRetry: r.shouldRetry, - maxAttempts: r.maxAttempts, + backoff: bo, + policy: r.policy, + shouldRetry: r.shouldRetry, + maxAttempts: r.maxAttempts, + maxRetryDuration: r.maxRetryDuration, } } @@ -2614,3 +2726,25 @@ func applyCondsProto(method string, gen int64, conds *Conditions, msg proto.Mess } return nil } + +// formatObjectErr checks if the provided error is NotFound and if so, wraps +// it in an ErrObjectNotExist error. If not, formatObjectErr has no effect. +func formatObjectErr(err error) error { + var e *googleapi.Error + if s, ok := status.FromError(err); (ok && s.Code() == codes.NotFound) || + (errors.As(err, &e) && e.Code == http.StatusNotFound) { + return fmt.Errorf("%w: %w", ErrObjectNotExist, err) + } + return err +} + +// formatBucketError checks if the provided error is NotFound and if so, wraps +// it in an ErrBucketNotExist error. If not, formatBucketError has no effect. +func formatBucketError(err error) error { + var e *googleapi.Error + if s, ok := status.FromError(err); (ok && s.Code() == codes.NotFound) || + (errors.As(err, &e) && e.Code == http.StatusNotFound) { + return fmt.Errorf("%w: %w", ErrBucketNotExist, err) + } + return err +} diff --git a/vendor/cloud.google.com/go/storage/trace.go b/vendor/cloud.google.com/go/storage/trace.go new file mode 100644 index 00000000000..0fb02325929 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/trace.go @@ -0,0 +1,98 @@ +// Copyright 2025 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. + +package storage + +import ( + "context" + "fmt" + "os" + + internalTrace "cloud.google.com/go/internal/trace" + "cloud.google.com/go/storage/internal" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + otelcodes "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +const ( + storageOtelTracingDevVar = "GO_STORAGE_DEV_OTEL_TRACING" + defaultTracerName = "cloud.google.com/go/storage" + gcpClientRepo = "googleapis/google-cloud-go" + gcpClientArtifact = "cloud.google.com/go/storage" +) + +// isOTelTracingDevEnabled checks the development flag until experimental feature is launched. +// TODO: Remove development flag upon experimental launch. +func isOTelTracingDevEnabled() bool { + return os.Getenv(storageOtelTracingDevVar) == "true" +} + +func tracer() trace.Tracer { + return otel.Tracer(defaultTracerName, trace.WithInstrumentationVersion(internal.Version)) +} + +// startSpan 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. +func startSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { + name = appendPackageName(name) + // TODO: Remove internalTrace upon experimental launch. + if !isOTelTracingDevEnabled() { + ctx = internalTrace.StartSpan(ctx, name) + return ctx, nil + } + opts = append(opts, getCommonTraceOptions()...) + ctx, span := tracer().Start(ctx, name, opts...) + return ctx, span +} + +// endSpan retrieves the current span from ctx and completes the span. +// If an error occurs, the error is recorded as an exception span event for this span, +// and the span status is set in the form of a code and a description. +func endSpan(ctx context.Context, err error) { + // TODO: Remove internalTrace upon experimental launch. + if !isOTelTracingDevEnabled() { + internalTrace.EndSpan(ctx, err) + } else { + span := trace.SpanFromContext(ctx) + if err != nil { + span.SetStatus(otelcodes.Error, err.Error()) + span.RecordError(err) + } + span.End() + } +} + +// getCommonTraceOptions makes a SpanStartOption with common attributes. +func getCommonTraceOptions() []trace.SpanStartOption { + opts := []trace.SpanStartOption{ + trace.WithAttributes(getCommonAttributes()...), + } + return opts +} + +// getCommonAttributes includes the common attributes used for Cloud Trace adoption tracking. +func getCommonAttributes() []attribute.KeyValue { + return []attribute.KeyValue{ + attribute.String("gcp.client.version", internal.Version), + attribute.String("gcp.client.repo", gcpClientRepo), + attribute.String("gcp.client.artifact", gcpClientArtifact), + } +} + +func appendPackageName(spanName string) string { + return fmt.Sprintf("%s.%s", gcpClientArtifact, spanName) +} diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go index ae8f6a63928..bc0893eeac9 100644 --- a/vendor/cloud.google.com/go/storage/writer.go +++ b/vendor/cloud.google.com/go/storage/writer.go @@ -26,6 +26,16 @@ import ( "cloud.google.com/go/internal/trace" ) +// Interface internalWriter wraps low-level implementations which may vary +// across client types. +type internalWriter interface { + io.WriteCloser + Flush() (int64, error) + // CloseWithError terminates the write operation and sets its status. + // Note that CloseWithError always returns nil. + CloseWithError(error) error +} + // A Writer writes a Cloud Storage object. type Writer struct { // ObjectAttrs are optional attributes to set on the object. Any attributes @@ -77,12 +87,12 @@ type Writer struct { // For uploads of larger files, the Writer will attempt to retry if the // request to upload a particular chunk fails with a transient error. // If a single chunk has been attempting to upload for longer than this - // deadline and the request fails, it will no longer be retried, and the error - // will be returned to the caller. This is only applicable for files which are - // large enough to require a multi-chunk resumable upload. The default value - // is 32s. Users may want to pick a longer deadline if they are using larger - // values for ChunkSize or if they expect to have a slow or unreliable - // internet connection. + // deadline and the request fails, it will no longer be retried, and the + // error will be returned to the caller. This is only applicable for files + // which are large enough to require a multi-chunk resumable upload. The + // default value is 32s. Users may want to pick a longer deadline if they + // are using larger values for ChunkSize or if they expect to have a slow or + // unreliable internet connection. // // To set a deadline on the entire upload, use context timeout or // cancellation. @@ -90,9 +100,11 @@ type Writer struct { // ChunkTransferTimeout sets a per-chunk request timeout for resumable uploads. // - // For resumable uploads, the Writer will terminate the request and attempt a retry - // if the request to upload a particular chunk stalls for longer than this duration. Retries - // may continue until the ChunkRetryDeadline is reached. + // For resumable uploads, the Writer will terminate the request and attempt + // a retry if the request to upload a particular chunk stalls for longer than + // this duration. Retries may continue until the ChunkRetryDeadline is reached. + // + // ChunkTransferTimeout is not applicable to uploads made using a gRPC client. // // The default value is no timeout. ChunkTransferTimeout time.Duration @@ -105,12 +117,28 @@ type Writer struct { // Append is a parameter to indicate whether the writer should use appendable // object semantics for the new object generation. Appendable objects are // visible on the first Write() call, and can be appended to until they are - // finalized. The object is finalized on a call to Close(). + // finalized. If Writer.FinalizeOnClose is set to true, the object is finalized + // when Writer.Close() is called; otherwise, the object is left unfinalized + // and can be appended to later. + // + // Defaults to false unless the experiemental WithZonalBucketAPIs option was + // set. // // Append is only supported for gRPC. This feature is in preview and is not // yet available for general use. Append bool + // FinalizeOnClose indicates whether the Writer should finalize an object when + // closing the write stream. This only applies to Writers where Append is + // true, since append semantics allow a prefix of the object to be durable and + // readable. By default, objects written with Append semantics will not be + // finalized, which means they can be appended to later. If Append is set + // to false, this parameter will be ignored; non-appendable objects will + // always be finalized when Writer.Close returns without error. + // + // This feature is in preview and is not yet available for general use. + FinalizeOnClose bool + // ProgressFunc can be used to monitor the progress of a large write // operation. If ProgressFunc is not nil and writing requires multiple // calls to the underlying service (see @@ -125,13 +153,15 @@ type Writer struct { o *ObjectHandle opened bool - pw *io.PipeWriter + closed bool + iw internalWriter donec chan struct{} // closed after err and obj are set. obj *ObjectAttrs - mu sync.Mutex - err error + mu sync.Mutex + err error + takeoverOffset int64 // offset from which the writer started appending to the object. } // Write appends to w. It implements the io.Writer interface. @@ -155,7 +185,7 @@ func (w *Writer) Write(p []byte) (n int, err error) { return 0, err } } - n, err = w.pw.Write(p) + n, err = w.iw.Write(p) if err != nil { w.mu.Lock() werr := w.err @@ -170,6 +200,49 @@ func (w *Writer) Write(p []byte) (n int, err error) { return n, err } +// Flush syncs all bytes currently in the Writer's buffer to Cloud Storage. +// It returns the offset of bytes that have been currently synced to +// Cloud Storage and an error. +// +// If Flush is never called, Writer will sync data automatically every +// [Writer.ChunkSize] bytes and on [Writer.Close]. +// +// [Writer.ProgressFunc] will be called on Flush if present. +// +// Do not call Flush concurrently with Write or Close. A single Writer is not +// safe for unsynchronized use across threads. +// +// Note that calling Flush very early (before 512 bytes) may interfere with +// automatic content sniffing in the Writer. +// +// Flush is supported only on gRPC clients where [Writer.Append] is set +// to true. This feature is in preview and is not yet available for general use. +func (w *Writer) Flush() (int64, error) { + // Return error if Append is not true. + if !w.Append { + return 0, errors.New("storage: Flush not supported unless client uses gRPC and Append is set to true") + } + if w.closed { + return 0, errors.New("storage: Flush called on closed Writer") + } + // Return error if already in error state. + w.mu.Lock() + werr := w.err + w.mu.Unlock() + if werr != nil { + return 0, werr + } + // If Flush called before any bytes written, it should start the upload + // at zero bytes. This will make the object visible with zero length data. + if !w.opened { + if err := w.openWriter(); err != nil { + return 0, err + } + } + + return w.iw.Flush() +} + // Close completes the write operation and flushes any buffered data. // If Close doesn't return an error, metadata about the written object // can be retrieved by calling Attrs. @@ -180,12 +253,12 @@ func (w *Writer) Close() error { } } - // Closing either the read or write causes the entire pipe to close. - if err := w.pw.Close(); err != nil { + if err := w.iw.Close(); err != nil { return err } <-w.donec + w.closed = true w.mu.Lock() defer w.mu.Unlock() trace.EndSpan(w.ctx, w.err) @@ -196,33 +269,41 @@ func (w *Writer) openWriter() (err error) { if err := w.validateWriteAttrs(); err != nil { return err } - if w.o.gen != defaultGen { - return fmt.Errorf("storage: generation not supported on Writer, got %v", w.o.gen) + if w.o.gen != defaultGen && !w.Append { + return fmt.Errorf("storage: generation supported on Writer for appendable objects only, got %v", w.o.gen) } - isIdempotent := w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist == true) + isIdempotent := w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist) opts := makeStorageOpts(isIdempotent, w.o.retry, w.o.userProject) params := &openWriterParams{ - ctx: w.ctx, - chunkSize: w.ChunkSize, - chunkRetryDeadline: w.ChunkRetryDeadline, - chunkTransferTimeout: w.ChunkTransferTimeout, - bucket: w.o.bucket, - attrs: &w.ObjectAttrs, - conds: w.o.conds, - encryptionKey: w.o.encryptionKey, - sendCRC32C: w.SendCRC32C, - append: w.Append, - donec: w.donec, - setError: w.error, - progress: w.progress, - setObj: func(o *ObjectAttrs) { w.obj = o }, + ctx: w.ctx, + chunkSize: w.ChunkSize, + chunkRetryDeadline: w.ChunkRetryDeadline, + chunkTransferTimeout: w.ChunkTransferTimeout, + bucket: w.o.bucket, + attrs: &w.ObjectAttrs, + conds: w.o.conds, + appendGen: w.o.gen, + encryptionKey: w.o.encryptionKey, + sendCRC32C: w.SendCRC32C, + append: w.Append, + finalizeOnClose: w.FinalizeOnClose, + donec: w.donec, + setError: w.error, + progress: w.progress, + setObj: func(o *ObjectAttrs) { w.obj = o }, + setSize: func(n int64) { + if w.obj != nil { + w.obj.Size = n + } + }, + setTakeoverOffset: func(n int64) { w.takeoverOffset = n }, forceEmptyContentType: w.ForceEmptyContentType, } if err := w.ctx.Err(); err != nil { return err // short-circuit } - w.pw, err = w.o.c.tc.OpenWriter(params, opts...) + w.iw, err = w.o.c.tc.OpenWriter(params, opts...) if err != nil { return err } @@ -243,7 +324,6 @@ func (w *Writer) monitorCancel() { w.err = werr w.mu.Unlock() - // Closing either the read or write causes the entire pipe to close. w.CloseWithError(werr) case <-w.donec: } @@ -257,7 +337,7 @@ func (w *Writer) CloseWithError(err error) error { if !w.opened { return nil } - return w.pw.CloseWithError(err) + return w.iw.CloseWithError(err) } // Attrs returns metadata about a successfully-written object. @@ -286,9 +366,9 @@ func (w *Writer) validateWriteAttrs() error { } // progress is a convenience wrapper that reports write progress to the Writer -// ProgressFunc if it is set and progress is non-zero. +// ProgressFunc if it is set. func (w *Writer) progress(p int64) { - if w.ProgressFunc != nil && p != 0 { + if w.ProgressFunc != nil { w.ProgressFunc(p) } } diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go index b0ab713c6d0..c69f43dbae9 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go @@ -106,25 +106,29 @@ func newMetricExporter(o *options) (*metricExporter, error) { return nil, errBlankProjectID } - clientOpts := append([]option.ClientOption{option.WithGRPCDialOption(grpc.WithUserAgent(userAgent))}, o.monitoringClientOptions...) - ctx := o.context - if ctx == nil { - ctx = context.Background() - } - client, err := monitoring.NewMetricClient(ctx, clientOpts...) - if err != nil { - return nil, err - } + client := o.monitoringClient + if client == nil { + clientOpts := append([]option.ClientOption{option.WithGRPCDialOption(grpc.WithUserAgent(userAgent))}, o.monitoringClientOptions...) + ctx := o.context + if ctx == nil { + ctx = context.Background() + } + var err error + client, err = monitoring.NewMetricClient(ctx, clientOpts...) + if err != nil { + return nil, err + } - if o.compression == "gzip" { - client.CallOptions.GetMetricDescriptor = append(client.CallOptions.GetMetricDescriptor, - gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) - client.CallOptions.CreateMetricDescriptor = append(client.CallOptions.CreateMetricDescriptor, - gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) - client.CallOptions.CreateTimeSeries = append(client.CallOptions.CreateTimeSeries, - gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) - client.CallOptions.CreateServiceTimeSeries = append(client.CallOptions.CreateServiceTimeSeries, - gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) + if o.compression == "gzip" { + client.CallOptions.GetMetricDescriptor = append(client.CallOptions.GetMetricDescriptor, + gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) + client.CallOptions.CreateMetricDescriptor = append(client.CallOptions.CreateMetricDescriptor, + gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) + client.CallOptions.CreateTimeSeries = append(client.CallOptions.CreateTimeSeries, + gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) + client.CallOptions.CreateServiceTimeSeries = append(client.CallOptions.CreateServiceTimeSeries, + gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name))) + } } cache := map[key]*googlemetricpb.MetricDescriptor{} diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go index 701b10b1014..8f2927b110b 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go @@ -21,8 +21,9 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/metric/metricdata" - semconv "go.opentelemetry.io/otel/semconv/v1.24.0" + monitoring "cloud.google.com/go/monitoring/apiv3/v2" + semconv "go.opentelemetry.io/otel/semconv/v1.24.0" apioption "google.golang.org/api/option" ) @@ -69,8 +70,11 @@ type options struct { projectID string // compression enables gzip compression on gRPC calls. compression string + // monitoringClient is used as the default client when not nil. If + // monitoringClient is nil, a client is created instead. + monitoringClient *monitoring.MetricClient // monitoringClientOptions are additional options to be passed - // to the underlying Stackdriver Monitoring API client. + // to the underlying Cloud Monitoring API client. // Optional. monitoringClientOptions []apioption.ClientOption // destinationProjectQuota sets whether the request should use quota from @@ -108,6 +112,16 @@ func WithDestinationProjectQuota() func(o *options) { } } +// WithMonitoringClient configures the client used by the exporter to write +// metrics to Cloud Monitoring. This option is mutually exclusive with +// WithMonitoringClientOptions. If both options are provided, +// WithMonitoringClient is used and WithMonitoringClientOptions is ignored. +func WithMonitoringClient(cl *monitoring.MetricClient) func(o *options) { + return func(o *options) { + o.monitoringClient = cl + } +} + // WithMonitoringClientOptions add the options for Cloud Monitoring client instance. // Available options are defined in. func WithMonitoringClientOptions(opts ...apioption.ClientOption) func(o *options) { diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go index 57dfab0c99f..bee9d333286 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go @@ -17,5 +17,5 @@ package metric // Version is the current release version of the OpenTelemetry // Operations Metric Exporter in use. func Version() string { - return "0.50.0" + return "0.53.0" } diff --git a/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go b/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go index 046af6cebb1..9358a2b42b6 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go +++ b/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go @@ -217,6 +217,10 @@ func (c *Cache) UpdateStats(s *Stats) { type bucket struct { mu sync.RWMutex + getCalls uint64 + setCalls uint64 + misses uint64 + // chunks is a ring buffer with encoded (k, v) pairs. // It consists of 64KB chunks. chunks [][]byte @@ -224,15 +228,12 @@ type bucket struct { // m maps hash(k) to idx of (k, v) pair in chunks. m map[uint64]uint64 - // idx points to chunks for writing the next (k, v) pair. - idx uint64 - // gen is the generation of chunks. gen uint64 - getCalls uint64 - setCalls uint64 - misses uint64 + // idx points to chunks for writing the next (k, v) pair. + idx uint64 + collisions uint64 corruptions uint64 } @@ -333,9 +334,9 @@ func (b *bucket) Set(k, v []byte, h uint64) { return } + b.mu.Lock() chunks := b.chunks needClean := false - b.mu.Lock() idx := b.idx idxNew := idx + kvLen chunkIdx := idx / chunkSize @@ -375,10 +376,10 @@ func (b *bucket) Set(k, v []byte, h uint64) { } func (b *bucket) Get(dst, k []byte, h uint64, returnDst bool) ([]byte, bool) { + b.mu.RLock() atomic.AddUint64(&b.getCalls, 1) found := false chunks := b.chunks - b.mu.RLock() v := b.m[h] bGen := b.gen & ((1 << genSizeBits) - 1) if v > 0 { diff --git a/vendor/github.com/VictoriaMetrics/fastcache/file.go b/vendor/github.com/VictoriaMetrics/fastcache/file.go index dfbc0701d93..46e3613bbcd 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/file.go +++ b/vendor/github.com/VictoriaMetrics/fastcache/file.go @@ -76,6 +76,16 @@ func (c *Cache) SaveToFileConcurrent(filePath string, concurrency int) error { return nil } +// LoadFromFileMaxBytes loads cache data from the specified filePath, +// enforcing that the cache capacity matches the provided maxBytes value. +// +// Returns an error if the stored cache's capacity differs from maxBytes. +// +// See SaveToFile* for functions that persist cache data to a file. +func LoadFromFileMaxBytes(filePath string, maxBytes int) (*Cache, error) { + return load(filePath, maxBytes) +} + // LoadFromFile loads cache data from the given filePath. // // See SaveToFile* for saving cache data to file. @@ -134,14 +144,14 @@ func load(filePath string, maxBytes int) (*Cache, error) { maxBucketBytes := uint64((maxBytes + bucketsCount - 1) / bucketsCount) expectedBucketChunks := (maxBucketBytes + chunkSize - 1) / chunkSize if maxBucketChunks != expectedBucketChunks { - return nil, fmt.Errorf("cache file %s contains maxBytes=%d; want %d", filePath, maxBytes, expectedBucketChunks*chunkSize*bucketsCount) + return nil, fmt.Errorf("cache file %s contains unexpected number of bucket chunks; got %d; want %d", filePath, maxBucketChunks, expectedBucketChunks) } } // Read bucket files from filePath dir. d, err := os.Open(filePath) if err != nil { - return nil, fmt.Errorf("cannot open %q: %s", filePath, err) + return nil, fmt.Errorf("cannot open %q: %w", filePath, err) } defer func() { _ = d.Close() @@ -206,7 +216,7 @@ func loadMetadata(dir string) (uint64, error) { metadataPath := dir + "/metadata.bin" metadataFile, err := os.Open(metadataPath) if err != nil { - return 0, fmt.Errorf("cannot open %q: %s", metadataPath, err) + return 0, fmt.Errorf("cannot open %q: %w", metadataPath, err) } defer func() { _ = metadataFile.Close() diff --git a/vendor/github.com/VictoriaMetrics/fastcache/malloc_heap.go b/vendor/github.com/VictoriaMetrics/fastcache/malloc_heap.go index 810d460b79e..54846f40f08 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/malloc_heap.go +++ b/vendor/github.com/VictoriaMetrics/fastcache/malloc_heap.go @@ -1,5 +1,5 @@ -//go:build appengine || windows -// +build appengine windows +//go:build appengine || windows || wasm || tinygo.wasm || js +// +build appengine windows wasm tinygo.wasm js package fastcache diff --git a/vendor/github.com/VictoriaMetrics/fastcache/malloc_mmap.go b/vendor/github.com/VictoriaMetrics/fastcache/malloc_mmap.go index e24d578bf75..c636b385f31 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/malloc_mmap.go +++ b/vendor/github.com/VictoriaMetrics/fastcache/malloc_mmap.go @@ -1,5 +1,5 @@ -//go:build !appengine && !windows -// +build !appengine,!windows +//go:build !appengine && !windows && !wasm && !tinygo.wasm && !js +// +build !appengine,!windows,!wasm,!tinygo.wasm,!js package fastcache diff --git a/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md b/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md index a475c1bb0a4..b2c840c6411 100644 --- a/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md +++ b/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md @@ -1,6 +1,21 @@ ## Changelog +## v2.36.1 +- support CLUSTER SHARDS (thanks @dadrus) + + +## v2.36.0 + +- return actual server address by CLUSTER NODES (thanks @nastik-kum) +- support DUMP and RESTORE (thanks @alyssaruth) +- support EVALRO (thanks @max-frank) +- add WAIT command as no-op (thanks @aroullet) +- support info stats (thanks @destinyoooo) +- add "-*" keys +- compare against Redis 8.4.0 + + ## v2.35.0 - add Lua redis.setresp({2,3}) diff --git a/vendor/github.com/alicebob/miniredis/v2/README.md b/vendor/github.com/alicebob/miniredis/v2/README.md index 272362e0eb4..b2282ffb1b5 100644 --- a/vendor/github.com/alicebob/miniredis/v2/README.md +++ b/vendor/github.com/alicebob/miniredis/v2/README.md @@ -36,6 +36,7 @@ Implemented commands: - Key - COPY - DEL + - DUMP -- partly, only handles string keys - EXISTS - EXPIRE - EXPIREAT @@ -50,11 +51,13 @@ Implemented commands: - RANDOMKEY -- see m.Seed(...) - RENAME - RENAMENX + - RESTORE -- partly, only handles string keys - SCAN - TOUCH - TTL - TYPE - UNLINK + - WAIT -- no-op - Transactions (complete) - DISCARD - EXEC @@ -222,6 +225,7 @@ Implemented commands: - CLUSTER SLOTS - CLUSTER KEYSLOT - CLUSTER NODES + - CLUSTER SHARDS - HyperLogLog (complete) - PFADD - PFCOUNT @@ -301,11 +305,8 @@ Commands which will probably not be implemented: - ~~READONLY~~ - ~~READWRITE~~ - Key - - ~~DUMP~~ - ~~MIGRATE~~ - ~~OBJECT~~ - - ~~RESTORE~~ - - ~~WAIT~~ - Scripting - ~~FCALL / FCALL_RO *~~ - ~~FUNCTION *~~ @@ -329,7 +330,7 @@ Commands which will probably not be implemented: ## &c. -Integration tests are run against Redis 7.2.4. The [./integration](./integration/) subdir +Integration tests are run against Redis 8.4.0. The [./integration](./integration/) subdir compares miniredis against a real redis instance. The Redis 6 RESP3 protocol is supported. If there are problems, please open diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_cluster.go b/vendor/github.com/alicebob/miniredis/v2/cmd_cluster.go index 9951f3dd3b7..4f7c77f4264 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_cluster.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_cluster.go @@ -31,6 +31,8 @@ func (m *Miniredis) cmdCluster(c *server.Peer, cmd string, args []string) { m.cmdClusterKeySlot(c, cmd, args) case "NODES": m.cmdClusterNodes(c, cmd, args) + case "SHARDS": + m.cmdClusterShards(c, cmd, args) default: setDirty(c) c.WriteError(fmt.Sprintf("ERR 'CLUSTER %s' not supported", strings.Join(args, " "))) @@ -62,6 +64,59 @@ func (m *Miniredis) cmdClusterKeySlot(c *server.Peer, cmd string, args []string) // CLUSTER NODES func (m *Miniredis) cmdClusterNodes(c *server.Peer, cmd string, args []string) { withTx(m, c, func(c *server.Peer, ctx *connCtx) { - c.WriteBulk("e7d1eecce10fd6bb5eb35b9f99a514335d9ba9ca 127.0.0.1:7000@7000 myself,master - 0 0 1 connected 0-16383") + // do not try to use m.Addr() here, as m is blocked by this tx. + addr := m.srv.Addr() + port := m.srv.Addr().Port + c.WriteBulk(fmt.Sprintf("e7d1eecce10fd6bb5eb35b9f99a514335d9ba9ca %s@%d myself,master - 0 0 1 connected 0-16383", addr, port)) + }) +} + +// CLUSTER SHARDS +func (m *Miniredis) cmdClusterShards(c *server.Peer, cmd string, args []string) { + withTx(m, c, func(c *server.Peer, ctx *connCtx) { + addr := m.srv.Addr() + host := addr.IP.String() + port := addr.Port + + // Array of shards (we return 1 shard) + c.WriteLen(1) + + // Shard is a map with 2 keys: "slots" and "nodes" + c.WriteMapLen(2) + + // "slots": flat list of start/end pairs (inclusive ranges) + c.WriteBulk("slots") + c.WriteLen(2) + c.WriteInt(0) + c.WriteInt(16383) + + // "nodes": array of node maps + c.WriteBulk("nodes") + c.WriteLen(1) + + // Node map. + // (id, endpoint, ip, port, role, replication-offset, health) + c.WriteMapLen(6) + + c.WriteBulk("id") + c.WriteBulk("13f84e686106847b76671957dd348fde540a77bb") + + //c.WriteBulk("endpoint") + //c.WriteBulk(host) // or host:port if your client expects that + + c.WriteBulk("ip") + c.WriteBulk(host) + + c.WriteBulk("port") + c.WriteInt(port) + + c.WriteBulk("role") + c.WriteBulk("master") + + c.WriteBulk("replication-offset") + c.WriteInt(0) + + c.WriteBulk("health") + c.WriteBulk("online") }) } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_connection.go b/vendor/github.com/alicebob/miniredis/v2/cmd_connection.go index 1afb5cea180..b4ec55d7da3 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_connection.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_connection.go @@ -177,7 +177,7 @@ func (m *Miniredis) cmdHello(c *server.Peer, cmd string, args []string) { c.WriteBulk("server") c.WriteBulk("miniredis") c.WriteBulk("version") - c.WriteBulk("6.0.5") + c.WriteBulk("8.4.0") c.WriteBulk("proto") c.WriteInt(opts.version) c.WriteBulk("id") @@ -186,21 +186,22 @@ func (m *Miniredis) cmdHello(c *server.Peer, cmd string, args []string) { c.WriteBulk("standalone") c.WriteBulk("role") c.WriteBulk("master") - c.WriteBulk("modules") - c.WriteLen(0) + c.WriteBulk("modules") // "modules": [ + c.WriteLen(1) // we have 1: "vectorset" + c.WriteMapLen(4) // { + c.WriteBulk("name") // + c.WriteBulk("vectorset") // + c.WriteBulk("ver") // + c.WriteInt(1) // + c.WriteBulk("path") // + c.WriteBulk("") // + c.WriteBulk("args") // + c.WriteLen(0) // ]} end modules } // ECHO func (m *Miniredis) cmdEcho(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -213,12 +214,7 @@ func (m *Miniredis) cmdEcho(c *server.Peer, cmd string, args []string) { // SELECT func (m *Miniredis) cmdSelect(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.isValidCMD(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_generic.go b/vendor/github.com/alicebob/miniredis/v2/cmd_generic.go index 721ad2fabe9..08c47a28ffe 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_generic.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_generic.go @@ -32,30 +32,31 @@ func inMilliSeconds(t time.Time) int { func commandsGeneric(m *Miniredis) { m.srv.Register("COPY", m.cmdCopy) m.srv.Register("DEL", m.cmdDel) - // DUMP - m.srv.Register("EXISTS", m.cmdExists) + m.srv.Register("DUMP", m.cmdDump, server.ReadOnlyOption()) + m.srv.Register("EXISTS", m.cmdExists, server.ReadOnlyOption()) m.srv.Register("EXPIRE", makeCmdExpire(m, false, time.Second)) m.srv.Register("EXPIREAT", makeCmdExpire(m, true, time.Second)) - m.srv.Register("EXPIRETIME", m.makeCmdExpireTime(inSeconds)) - m.srv.Register("PEXPIRETIME", m.makeCmdExpireTime(inMilliSeconds)) - m.srv.Register("KEYS", m.cmdKeys) + m.srv.Register("EXPIRETIME", m.makeCmdExpireTime(inSeconds), server.ReadOnlyOption()) + m.srv.Register("PEXPIRETIME", m.makeCmdExpireTime(inMilliSeconds), server.ReadOnlyOption()) + m.srv.Register("KEYS", m.cmdKeys, server.ReadOnlyOption()) // MIGRATE m.srv.Register("MOVE", m.cmdMove) // OBJECT m.srv.Register("PERSIST", m.cmdPersist) m.srv.Register("PEXPIRE", makeCmdExpire(m, false, time.Millisecond)) m.srv.Register("PEXPIREAT", makeCmdExpire(m, true, time.Millisecond)) - m.srv.Register("PTTL", m.cmdPTTL) - m.srv.Register("RANDOMKEY", m.cmdRandomkey) + m.srv.Register("PTTL", m.cmdPTTL, server.ReadOnlyOption()) + m.srv.Register("RANDOMKEY", m.cmdRandomkey, server.ReadOnlyOption()) m.srv.Register("RENAME", m.cmdRename) m.srv.Register("RENAMENX", m.cmdRenamenx) - // RESTORE - m.srv.Register("TOUCH", m.cmdTouch) - m.srv.Register("TTL", m.cmdTTL) - m.srv.Register("TYPE", m.cmdType) - m.srv.Register("SCAN", m.cmdScan) + m.srv.Register("RESTORE", m.cmdRestore) + m.srv.Register("TOUCH", m.cmdTouch, server.ReadOnlyOption()) + m.srv.Register("TTL", m.cmdTTL, server.ReadOnlyOption()) + m.srv.Register("TYPE", m.cmdType, server.ReadOnlyOption()) + m.srv.Register("SCAN", m.cmdScan, server.ReadOnlyOption()) // SORT m.srv.Register("UNLINK", m.cmdDel) + m.srv.Register("WAIT", m.cmdWait) } type expireOpts struct { @@ -104,15 +105,7 @@ func expireParse(cmd string, args []string) (*expireOpts, error) { // converted to a duration. func makeCmdExpire(m *Miniredis, unix bool, d time.Duration) func(*server.Peer, string, []string) { return func(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -178,16 +171,7 @@ func makeCmdExpire(m *Miniredis, unix bool, d time.Duration) func(*server.Peer, // [pexpiretime]: https://redis.io/commands/pexpiretime/ func (m *Miniredis) makeCmdExpireTime(timeResultStrategy func(time.Time) int) server.Cmd { return func(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -213,16 +197,7 @@ func (m *Miniredis) makeCmdExpireTime(timeResultStrategy func(time.Time) int) se // TOUCH func (m *Miniredis) cmdTouch(c *server.Peer, cmd string, args []string) { - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { - return - } - - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -241,15 +216,7 @@ func (m *Miniredis) cmdTouch(c *server.Peer, cmd string, args []string) { // TTL func (m *Miniredis) cmdTTL(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -276,15 +243,7 @@ func (m *Miniredis) cmdTTL(c *server.Peer, cmd string, args []string) { // PTTL func (m *Miniredis) cmdPTTL(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -311,15 +270,7 @@ func (m *Miniredis) cmdPTTL(c *server.Peer, cmd string, args []string) { // PERSIST func (m *Miniredis) cmdPersist(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -347,16 +298,7 @@ func (m *Miniredis) cmdPersist(c *server.Peer, cmd string, args []string) { // DEL and UNLINK func (m *Miniredis) cmdDel(c *server.Peer, cmd string, args []string) { - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { - return - } - - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -374,17 +316,30 @@ func (m *Miniredis) cmdDel(c *server.Peer, cmd string, args []string) { }) } -// TYPE -func (m *Miniredis) cmdType(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError("usage error") - return - } - if !m.handleAuth(c) { +// DUMP +func (m *Miniredis) cmdDump(c *server.Peer, cmd string, args []string) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } - if m.checkPubsub(c, cmd) { + + key := args[0] + + withTx(m, c, func(c *server.Peer, ctx *connCtx) { + db := m.db(ctx.selectedDB) + keyType, exists := db.keys[key] + if !exists { + c.WriteNull() + } else if keyType != keyTypeString { + c.WriteError(msgWrongType) + } else { + c.WriteBulk(db.stringGet(key)) + } + }) +} + +// TYPE +func (m *Miniredis) cmdType(c *server.Peer, cmd string, args []string) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -405,15 +360,7 @@ func (m *Miniredis) cmdType(c *server.Peer, cmd string, args []string) { // EXISTS func (m *Miniredis) cmdExists(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -432,15 +379,7 @@ func (m *Miniredis) cmdExists(c *server.Peer, cmd string, args []string) { // MOVE func (m *Miniredis) cmdMove(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -470,15 +409,7 @@ func (m *Miniredis) cmdMove(c *server.Peer, cmd string, args []string) { // KEYS func (m *Miniredis) cmdKeys(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -497,15 +428,7 @@ func (m *Miniredis) cmdKeys(c *server.Peer, cmd string, args []string) { // RANDOMKEY func (m *Miniredis) cmdRandomkey(c *server.Peer, cmd string, args []string) { - if len(args) != 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } @@ -529,15 +452,7 @@ func (m *Miniredis) cmdRandomkey(c *server.Peer, cmd string, args []string) { // RENAME func (m *Miniredis) cmdRename(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -564,15 +479,7 @@ func (m *Miniredis) cmdRename(c *server.Peer, cmd string, args []string) { // RENAMENX func (m *Miniredis) cmdRenamenx(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -602,6 +509,78 @@ func (m *Miniredis) cmdRenamenx(c *server.Peer, cmd string, args []string) { }) } +type restoreOpts struct { + key string + serializedValue string + rawTtl string + replace bool + absTtl bool +} + +func restoreParse(args []string) *restoreOpts { + var opts restoreOpts + + opts.key, opts.rawTtl, opts.serializedValue, args = args[0], args[1], args[2], args[3:] + + for len(args) > 0 { + switch arg := strings.ToUpper(args[0]); arg { + case "REPLACE": + opts.replace = true + case "ABSTTL": + opts.absTtl = true + default: + return nil + } + + args = args[1:] + } + + return &opts +} + +// RESTORE +func (m *Miniredis) cmdRestore(c *server.Peer, cmd string, args []string) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { + return + } + + var opts = restoreParse(args) + if opts == nil { + setDirty(c) + c.WriteError(msgSyntaxError) + return + } + + withTx(m, c, func(c *server.Peer, ctx *connCtx) { + db := m.db(ctx.selectedDB) + + _, keyExists := db.keys[opts.key] + if keyExists && !opts.replace { + setDirty(c) + c.WriteError("BUSYKEY Target key name already exists.") + return + } + + ttl, err := strconv.Atoi(opts.rawTtl) + if err != nil || ttl < 0 { + c.WriteError(msgInvalidInt) + return + } + + db.stringSet(opts.key, opts.serializedValue) + + if ttl != 0 { + if opts.absTtl { + db.ttl[opts.key] = m.at(ttl, time.Millisecond) + } else { + db.ttl[opts.key] = time.Duration(ttl) * time.Millisecond + } + } + + c.WriteOK() + }) +} + type scanOpts struct { cursor int count int @@ -658,15 +637,7 @@ func scanParse(cmd string, args []string) (*scanOpts, error) { // SCAN func (m *Miniredis) cmdScan(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -679,7 +650,8 @@ func (m *Miniredis) cmdScan(c *server.Peer, cmd string, args []string) { withTx(m, c, func(c *server.Peer, ctx *connCtx) { db := m.db(ctx.selectedDB) - // We return _all_ (matched) keys every time. + // We return _all_ (matched) keys every time, so that cursors work. + // We ignore "COUNT", which is allowed according to the Redis docs. var keys []string if opts.withType { @@ -700,25 +672,14 @@ func (m *Miniredis) cmdScan(c *server.Peer, cmd string, args []string) { keys, _ = matchKeys(keys, opts.match) } - low := opts.cursor - high := low + opts.count - // validate high is correct - if high > len(keys) || high == 0 { - high = len(keys) - } - if opts.cursor > high { - // invalid cursor + // we only ever return all at once, so no non-zero cursor can every be valid + if opts.cursor != 0 { c.WriteLen(2) c.WriteBulk("0") // no next cursor c.WriteLen(0) // no elements return } - cursorValue := low + opts.count - if cursorValue >= len(keys) { - cursorValue = 0 // no next cursor - } - keys = keys[low:high] - + cursorValue := 0 // we don't use cursors c.WriteLen(2) c.WriteBulk(fmt.Sprintf("%d", cursorValue)) c.WriteLen(len(keys)) @@ -766,15 +727,7 @@ func copyParse(cmd string, args []string) (*copyOpts, error) { // COPY func (m *Miniredis) cmdCopy(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -811,3 +764,26 @@ func (m *Miniredis) cmdCopy(c *server.Peer, cmd string, args []string) { c.WriteInt(1) }) } + +// WAIT +func (m *Miniredis) cmdWait(c *server.Peer, cmd string, args []string) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { + return + } + nReplicas, err := strconv.Atoi(args[0]) + if err != nil || nReplicas < 0 { + c.WriteError(msgInvalidInt) + return + } + timeout, err := strconv.Atoi(args[1]) + if err != nil { + c.WriteError(msgInvalidInt) + return + } + if timeout < 0 { + c.WriteError(msgTimeoutNegative) + return + } + // WAIT always returns 0 when called on a standalone instance + c.WriteInt(0) +} diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_geo.go b/vendor/github.com/alicebob/miniredis/v2/cmd_geo.go index 97f74c3b1ce..12cf99addec 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_geo.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_geo.go @@ -14,27 +14,26 @@ import ( // commandsGeo handles GEOADD, GEORADIUS etc. func commandsGeo(m *Miniredis) { m.srv.Register("GEOADD", m.cmdGeoadd) - m.srv.Register("GEODIST", m.cmdGeodist) - m.srv.Register("GEOPOS", m.cmdGeopos) + m.srv.Register("GEODIST", m.cmdGeodist, server.ReadOnlyOption()) + m.srv.Register("GEOPOS", m.cmdGeopos, server.ReadOnlyOption()) m.srv.Register("GEORADIUS", m.cmdGeoradius) - m.srv.Register("GEORADIUS_RO", m.cmdGeoradius) + m.srv.Register("GEORADIUS_RO", m.cmdGeoradius, server.ReadOnlyOption()) m.srv.Register("GEORADIUSBYMEMBER", m.cmdGeoradiusbymember) - m.srv.Register("GEORADIUSBYMEMBER_RO", m.cmdGeoradiusbymember) + m.srv.Register("GEORADIUSBYMEMBER_RO", m.cmdGeoradiusbymember, server.ReadOnlyOption()) } // GEOADD func (m *Miniredis) cmdGeoadd(c *server.Peer, cmd string, args []string) { - if len(args) < 3 || len(args[1:])%3 != 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + + if len(args[1:])%3 != 0 { + setDirty(c) + c.WriteError(errWrongNumber(cmd)) return } + key, args := args[0], args[1:] withTx(m, c, func(c *server.Peer, ctx *connCtx) { @@ -83,15 +82,7 @@ func (m *Miniredis) cmdGeoadd(c *server.Peer, cmd string, args []string) { // GEODIST func (m *Miniredis) cmdGeodist(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -141,17 +132,10 @@ func (m *Miniredis) cmdGeodist(c *server.Peer, cmd string, args []string) { // GEOPOS func (m *Miniredis) cmdGeopos(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } + key, args := args[0], args[1:] withTx(m, c, func(c *server.Peer, ctx *connCtx) { @@ -187,15 +171,7 @@ type geoDistance struct { // GEORADIUS and GEORADIUS_RO func (m *Miniredis) cmdGeoradius(c *server.Peer, cmd string, args []string) { - if len(args) < 5 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(5)) { return } @@ -374,15 +350,7 @@ func (m *Miniredis) cmdGeoradius(c *server.Peer, cmd string, args []string) { // GEORADIUSBYMEMBER and GEORADIUSBYMEMBER_RO func (m *Miniredis) cmdGeoradiusbymember(c *server.Peer, cmd string, args []string) { - if len(args) < 4 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(4)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_hash.go b/vendor/github.com/alicebob/miniredis/v2/cmd_hash.go index 55332956f60..29fec82293c 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_hash.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_hash.go @@ -13,34 +13,26 @@ import ( // commandsHash handles all hash value operations. func commandsHash(m *Miniredis) { m.srv.Register("HDEL", m.cmdHdel) - m.srv.Register("HEXISTS", m.cmdHexists) - m.srv.Register("HGET", m.cmdHget) - m.srv.Register("HGETALL", m.cmdHgetall) + m.srv.Register("HEXISTS", m.cmdHexists, server.ReadOnlyOption()) + m.srv.Register("HGET", m.cmdHget, server.ReadOnlyOption()) + m.srv.Register("HGETALL", m.cmdHgetall, server.ReadOnlyOption()) m.srv.Register("HINCRBY", m.cmdHincrby) m.srv.Register("HINCRBYFLOAT", m.cmdHincrbyfloat) - m.srv.Register("HKEYS", m.cmdHkeys) - m.srv.Register("HLEN", m.cmdHlen) - m.srv.Register("HMGET", m.cmdHmget) + m.srv.Register("HKEYS", m.cmdHkeys, server.ReadOnlyOption()) + m.srv.Register("HLEN", m.cmdHlen, server.ReadOnlyOption()) + m.srv.Register("HMGET", m.cmdHmget, server.ReadOnlyOption()) m.srv.Register("HMSET", m.cmdHmset) m.srv.Register("HSET", m.cmdHset) m.srv.Register("HSETNX", m.cmdHsetnx) - m.srv.Register("HSTRLEN", m.cmdHstrlen) - m.srv.Register("HVALS", m.cmdHvals) - m.srv.Register("HSCAN", m.cmdHscan) - m.srv.Register("HRANDFIELD", m.cmdHrandfield) + m.srv.Register("HSTRLEN", m.cmdHstrlen, server.ReadOnlyOption()) + m.srv.Register("HVALS", m.cmdHvals, server.ReadOnlyOption()) + m.srv.Register("HSCAN", m.cmdHscan, server.ReadOnlyOption()) + m.srv.Register("HRANDFIELD", m.cmdHrandfield, server.ReadOnlyOption()) } // HSET func (m *Miniredis) cmdHset(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -66,15 +58,7 @@ func (m *Miniredis) cmdHset(c *server.Peer, cmd string, args []string) { // HSETNX func (m *Miniredis) cmdHsetnx(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -113,15 +97,7 @@ func (m *Miniredis) cmdHsetnx(c *server.Peer, cmd string, args []string) { // HMSET func (m *Miniredis) cmdHmset(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -151,15 +127,7 @@ func (m *Miniredis) cmdHmset(c *server.Peer, cmd string, args []string) { // HGET func (m *Miniredis) cmdHget(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -188,15 +156,7 @@ func (m *Miniredis) cmdHget(c *server.Peer, cmd string, args []string) { // HDEL func (m *Miniredis) cmdHdel(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -242,15 +202,7 @@ func (m *Miniredis) cmdHdel(c *server.Peer, cmd string, args []string) { // HEXISTS func (m *Miniredis) cmdHexists(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -285,15 +237,7 @@ func (m *Miniredis) cmdHexists(c *server.Peer, cmd string, args []string) { // HGETALL func (m *Miniredis) cmdHgetall(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -322,15 +266,7 @@ func (m *Miniredis) cmdHgetall(c *server.Peer, cmd string, args []string) { // HKEYS func (m *Miniredis) cmdHkeys(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -358,15 +294,7 @@ func (m *Miniredis) cmdHkeys(c *server.Peer, cmd string, args []string) { // HSTRLEN func (m *Miniredis) cmdHstrlen(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -392,15 +320,7 @@ func (m *Miniredis) cmdHstrlen(c *server.Peer, cmd string, args []string) { // HVALS func (m *Miniredis) cmdHvals(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -429,15 +349,7 @@ func (m *Miniredis) cmdHvals(c *server.Peer, cmd string, args []string) { // HLEN func (m *Miniredis) cmdHlen(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -462,15 +374,7 @@ func (m *Miniredis) cmdHlen(c *server.Peer, cmd string, args []string) { // HMGET func (m *Miniredis) cmdHmget(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -503,15 +407,7 @@ func (m *Miniredis) cmdHmget(c *server.Peer, cmd string, args []string) { // HINCRBY func (m *Miniredis) cmdHincrby(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -546,15 +442,7 @@ func (m *Miniredis) cmdHincrby(c *server.Peer, cmd string, args []string) { // HINCRBYFLOAT func (m *Miniredis) cmdHincrbyfloat(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -593,15 +481,7 @@ func (m *Miniredis) cmdHincrbyfloat(c *server.Peer, cmd string, args []string) { // HSCAN func (m *Miniredis) cmdHscan(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -685,15 +565,7 @@ func (m *Miniredis) cmdHscan(c *server.Peer, cmd string, args []string) { // HRANDFIELD func (m *Miniredis) cmdHrandfield(c *server.Peer, cmd string, args []string) { - if len(args) > 3 || len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, between(1, 3)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_hll.go b/vendor/github.com/alicebob/miniredis/v2/cmd_hll.go index ffb4d6f1b45..7bfc9504d66 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_hll.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_hll.go @@ -5,21 +5,13 @@ import "github.com/alicebob/miniredis/v2/server" // commandsHll handles all hll related operations. func commandsHll(m *Miniredis) { m.srv.Register("PFADD", m.cmdPfadd) - m.srv.Register("PFCOUNT", m.cmdPfcount) + m.srv.Register("PFCOUNT", m.cmdPfcount, server.ReadOnlyOption()) m.srv.Register("PFMERGE", m.cmdPfmerge) } // PFADD func (m *Miniredis) cmdPfadd(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -40,15 +32,7 @@ func (m *Miniredis) cmdPfadd(c *server.Peer, cmd string, args []string) { // PFCOUNT func (m *Miniredis) cmdPfcount(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -69,15 +53,7 @@ func (m *Miniredis) cmdPfcount(c *server.Peer, cmd string, args []string) { // PFMERGE func (m *Miniredis) cmdPfmerge(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_info.go b/vendor/github.com/alicebob/miniredis/v2/cmd_info.go index e5984a9b2c0..9fa84711257 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_info.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_info.go @@ -2,39 +2,42 @@ package miniredis import ( "fmt" + "strings" "github.com/alicebob/miniredis/v2/server" ) +const ( + clientsSectionName = "clients" + clientsSectionContent = "# Clients\nconnected_clients:%d\r\n" + + statsSectionName = "stats" + statsSectionContent = "# Stats\ntotal_connections_received:%d\r\ntotal_commands_processed:%d\r\n" +) + // Command 'INFO' from https://redis.io/commands/info/ func (m *Miniredis) cmdInfo(c *server.Peer, cmd string, args []string) { - if !m.isValidCMD(c, cmd) { + if !m.isValidCMD(c, cmd, args, between(0, 1)) { return } - - if len(args) > 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + var result string + if len(args) == 0 { + result = fmt.Sprintf(clientsSectionContent, m.Server().ClientsLen()) + fmt.Sprintf(statsSectionContent, m.Server().TotalConnections(), m.Server().TotalCommands()) + c.WriteBulk(result) return } withTx(m, c, func(c *server.Peer, ctx *connCtx) { - const ( - clientsSectionName = "clients" - clientsSectionContent = "# Clients\nconnected_clients:%d\r\n" - ) - - var result string - - for _, key := range args { - if key != clientsSectionName { - setDirty(c) - c.WriteError(fmt.Sprintf("section (%s) is not supported", key)) - return - } + switch section := strings.ToLower(args[0]); section { + case clientsSectionName: + result = fmt.Sprintf(clientsSectionContent, m.Server().ClientsLen()) + case statsSectionName: + result = fmt.Sprintf(statsSectionContent, m.Server().TotalConnections(), m.Server().TotalCommands()) + default: + setDirty(c) + c.WriteError(fmt.Sprintf("section (%s) is not supported", section)) + return } - result = fmt.Sprintf(clientsSectionContent, m.Server().ClientsLen()) - c.WriteBulk(result) }) } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_list.go b/vendor/github.com/alicebob/miniredis/v2/cmd_list.go index 58199454a34..9de16359d54 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_list.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_list.go @@ -22,14 +22,14 @@ func commandsList(m *Miniredis) { m.srv.Register("BLPOP", m.cmdBlpop) m.srv.Register("BRPOP", m.cmdBrpop) m.srv.Register("BRPOPLPUSH", m.cmdBrpoplpush) - m.srv.Register("LINDEX", m.cmdLindex) - m.srv.Register("LPOS", m.cmdLpos) + m.srv.Register("LINDEX", m.cmdLindex, server.ReadOnlyOption()) + m.srv.Register("LPOS", m.cmdLpos, server.ReadOnlyOption()) m.srv.Register("LINSERT", m.cmdLinsert) - m.srv.Register("LLEN", m.cmdLlen) + m.srv.Register("LLEN", m.cmdLlen, server.ReadOnlyOption()) m.srv.Register("LPOP", m.cmdLpop) m.srv.Register("LPUSH", m.cmdLpush) m.srv.Register("LPUSHX", m.cmdLpushx) - m.srv.Register("LRANGE", m.cmdLrange) + m.srv.Register("LRANGE", m.cmdLrange, server.ReadOnlyOption()) m.srv.Register("LREM", m.cmdLrem) m.srv.Register("LSET", m.cmdLset) m.srv.Register("LTRIM", m.cmdLtrim) @@ -52,15 +52,7 @@ func (m *Miniredis) cmdBrpop(c *server.Peer, cmd string, args []string) { } func (m *Miniredis) cmdBXpop(c *server.Peer, cmd string, args []string, lr leftright) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -115,15 +107,7 @@ func (m *Miniredis) cmdBXpop(c *server.Peer, cmd string, args []string, lr leftr // LINDEX func (m *Miniredis) cmdLindex(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -164,16 +148,7 @@ func (m *Miniredis) cmdLindex(c *server.Peer, cmd string, args []string) { // LPOS key element [RANK rank] [COUNT num-matches] [MAXLEN len] func (m *Miniredis) cmdLpos(c *server.Peer, cmd string, args []string) { - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { - return - } - - if len(args) == 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -311,15 +286,7 @@ func (m *Miniredis) cmdLpos(c *server.Peer, cmd string, args []string) { // LINSERT func (m *Miniredis) cmdLinsert(c *server.Peer, cmd string, args []string) { - if len(args) != 4 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(4)) { return } @@ -378,15 +345,7 @@ func (m *Miniredis) cmdLinsert(c *server.Peer, cmd string, args []string) { // LLEN func (m *Miniredis) cmdLlen(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -421,15 +380,7 @@ func (m *Miniredis) cmdRpop(c *server.Peer, cmd string, args []string) { } func (m *Miniredis) cmdXpop(c *server.Peer, cmd string, args []string, lr leftright) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -513,15 +464,7 @@ func (m *Miniredis) cmdRpush(c *server.Peer, cmd string, args []string) { } func (m *Miniredis) cmdXpush(c *server.Peer, cmd string, args []string, lr leftright) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -559,15 +502,7 @@ func (m *Miniredis) cmdRpushx(c *server.Peer, cmd string, args []string) { } func (m *Miniredis) cmdXpushx(c *server.Peer, cmd string, args []string, lr leftright) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -600,15 +535,7 @@ func (m *Miniredis) cmdXpushx(c *server.Peer, cmd string, args []string, lr left // LRANGE func (m *Miniredis) cmdLrange(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -650,15 +577,7 @@ func (m *Miniredis) cmdLrange(c *server.Peer, cmd string, args []string) { // LREM func (m *Miniredis) cmdLrem(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -724,15 +643,7 @@ func (m *Miniredis) cmdLrem(c *server.Peer, cmd string, args []string) { // LSET func (m *Miniredis) cmdLset(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -777,15 +688,7 @@ func (m *Miniredis) cmdLset(c *server.Peer, cmd string, args []string) { // LTRIM func (m *Miniredis) cmdLtrim(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -831,15 +734,7 @@ func (m *Miniredis) cmdLtrim(c *server.Peer, cmd string, args []string) { // RPOPLPUSH func (m *Miniredis) cmdRpoplpush(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -864,15 +759,7 @@ func (m *Miniredis) cmdRpoplpush(c *server.Peer, cmd string, args []string) { // BRPOPLPUSH func (m *Miniredis) cmdBrpoplpush(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -918,15 +805,7 @@ func (m *Miniredis) cmdBrpoplpush(c *server.Peer, cmd string, args []string) { // LMOVE func (m *Miniredis) cmdLmove(c *server.Peer, cmd string, args []string) { - if len(args) != 4 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(4)) { return } @@ -979,15 +858,7 @@ func (m *Miniredis) cmdLmove(c *server.Peer, cmd string, args []string) { // BLMOVE func (m *Miniredis) cmdBlmove(c *server.Peer, cmd string, args []string) { - if len(args) != 5 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(5)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_object.go b/vendor/github.com/alicebob/miniredis/v2/cmd_object.go index b958a95cfe1..e8117c5294c 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_object.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_object.go @@ -14,15 +14,7 @@ func commandsObject(m *Miniredis) { // OBJECT func (m *Miniredis) cmdObject(c *server.Peer, cmd string, args []string) { - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_pubsub.go b/vendor/github.com/alicebob/miniredis/v2/cmd_pubsub.go index 0fc9f0de355..571431e8e05 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_pubsub.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_pubsub.go @@ -173,15 +173,7 @@ func (m *Miniredis) cmdPunsubscribe(c *server.Peer, cmd string, args []string) { // PUBLISH func (m *Miniredis) cmdPublish(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_scripting.go b/vendor/github.com/alicebob/miniredis/v2/cmd_scripting.go index 188a15e977b..32705b858f7 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_scripting.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_scripting.go @@ -18,7 +18,9 @@ import ( func commandsScripting(m *Miniredis) { m.srv.Register("EVAL", m.cmdEval) + m.srv.Register("EVAL_RO", m.cmdEvalro, server.ReadOnlyOption()) m.srv.Register("EVALSHA", m.cmdEvalsha) + m.srv.Register("EVALSHA_RO", m.cmdEvalshaRo, server.ReadOnlyOption()) m.srv.Register("SCRIPT", m.cmdScript) } @@ -28,7 +30,7 @@ var ( // Execute lua. Needs to run m.Lock()ed, from within withTx(). // Returns true if the lua was OK (and hence should be cached). -func (m *Miniredis) runLuaScript(c *server.Peer, sha, script string, args []string) bool { +func (m *Miniredis) runLuaScript(c *server.Peer, sha, script string, readOnly bool, args []string) bool { l := lua.NewState(lua.Options{SkipOpenLibs: true}) defer l.Close() @@ -85,7 +87,7 @@ func (m *Miniredis) runLuaScript(c *server.Peer, sha, script string, args []stri } l.SetGlobal("ARGV", argvTable) - redisFuncs, redisConstants := mkLua(m.srv, c, sha) + redisFuncs, redisConstants := mkLua(m.srv, c, sha, readOnly) // Register command handlers l.Push(l.NewFunction(func(l *lua.LState) int { mod := l.RegisterModule("redis", redisFuncs).(*lua.LTable) @@ -95,6 +97,7 @@ func (m *Miniredis) runLuaScript(c *server.Peer, sha, script string, args []stri l.Push(mod) return 1 })) + l.RegisterModule("os", mkLuaOS()) _ = doScript(l, protectGlobals) @@ -150,18 +153,12 @@ func compile(script string) (*lua.FunctionProto, error) { return proto, nil } -func (m *Miniredis) cmdEval(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { +// Shared implementation for EVAL and EVALRO +func (m *Miniredis) cmdEvalShared(c *server.Peer, cmd string, readOnly bool, args []string) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } + ctx := getCtx(c) if ctx.nested { c.WriteError(msgNotFromScripts(ctx.nestedSHA)) @@ -172,25 +169,24 @@ func (m *Miniredis) cmdEval(c *server.Peer, cmd string, args []string) { withTx(m, c, func(c *server.Peer, ctx *connCtx) { sha := sha1Hex(script) - ok := m.runLuaScript(c, sha, script, args) + ok := m.runLuaScript(c, sha, script, readOnly, args) if ok { m.scripts[sha] = script } }) } -func (m *Miniredis) cmdEvalsha(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { +// Wrapper function for EVAL command +func (m *Miniredis) cmdEval(c *server.Peer, cmd string, args []string) { + m.cmdEvalShared(c, cmd, false, args) +} + +// Shared implementation for EVALSHA and EVALSHA_RO +func (m *Miniredis) cmdEvalshaShared(c *server.Peer, cmd string, readOnly bool, args []string) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } + ctx := getCtx(c) if ctx.nested { c.WriteError(msgNotFromScripts(ctx.nestedSHA)) @@ -206,20 +202,27 @@ func (m *Miniredis) cmdEvalsha(c *server.Peer, cmd string, args []string) { return } - m.runLuaScript(c, sha, script, args) + m.runLuaScript(c, sha, script, readOnly, args) }) } +// Wrapper function for EVALSHA command +func (m *Miniredis) cmdEvalsha(c *server.Peer, cmd string, args []string) { + m.cmdEvalshaShared(c, cmd, false, args) +} + +// Wrapper function for EVALRO command +func (m *Miniredis) cmdEvalro(c *server.Peer, cmd string, args []string) { + m.cmdEvalShared(c, cmd, true, args) +} + +// Wrapper function for EVALSHA_RO command +func (m *Miniredis) cmdEvalshaRo(c *server.Peer, cmd string, args []string) { + m.cmdEvalshaShared(c, cmd, true, args) +} + func (m *Miniredis) cmdScript(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_server.go b/vendor/github.com/alicebob/miniredis/v2/cmd_server.go index 5fe55dd4f98..79e19fbc7e6 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_server.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_server.go @@ -13,7 +13,7 @@ import ( func commandsServer(m *Miniredis) { m.srv.Register("COMMAND", m.cmdCommand) - m.srv.Register("DBSIZE", m.cmdDbsize) + m.srv.Register("DBSIZE", m.cmdDbsize, server.ReadOnlyOption()) m.srv.Register("FLUSHALL", m.cmdFlushall) m.srv.Register("FLUSHDB", m.cmdFlushdb) m.srv.Register("INFO", m.cmdInfo) @@ -23,15 +23,7 @@ func commandsServer(m *Miniredis) { // MEMORY func (m *Miniredis) cmdMemory(c *server.Peer, cmd string, args []string) { - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -85,15 +77,7 @@ func (m *Miniredis) cmdMemory(c *server.Peer, cmd string, args []string) { // DBSIZE func (m *Miniredis) cmdDbsize(c *server.Peer, cmd string, args []string) { - if len(args) > 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } @@ -152,15 +136,7 @@ func (m *Miniredis) cmdFlushdb(c *server.Peer, cmd string, args []string) { // TIME func (m *Miniredis) cmdTime(c *server.Peer, cmd string, args []string) { - if len(args) > 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_set.go b/vendor/github.com/alicebob/miniredis/v2/cmd_set.go index 12e4d584547..ec35d5636f3 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_set.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_set.go @@ -13,35 +13,27 @@ import ( // commandsSet handles all set value operations. func commandsSet(m *Miniredis) { m.srv.Register("SADD", m.cmdSadd) - m.srv.Register("SCARD", m.cmdScard) - m.srv.Register("SDIFF", m.cmdSdiff) + m.srv.Register("SCARD", m.cmdScard, server.ReadOnlyOption()) + m.srv.Register("SDIFF", m.cmdSdiff, server.ReadOnlyOption()) m.srv.Register("SDIFFSTORE", m.cmdSdiffstore) - m.srv.Register("SINTERCARD", m.cmdSintercard) - m.srv.Register("SINTER", m.cmdSinter) + m.srv.Register("SINTERCARD", m.cmdSintercard, server.ReadOnlyOption()) + m.srv.Register("SINTER", m.cmdSinter, server.ReadOnlyOption()) m.srv.Register("SINTERSTORE", m.cmdSinterstore) - m.srv.Register("SISMEMBER", m.cmdSismember) - m.srv.Register("SMEMBERS", m.cmdSmembers) - m.srv.Register("SMISMEMBER", m.cmdSmismember) + m.srv.Register("SISMEMBER", m.cmdSismember, server.ReadOnlyOption()) + m.srv.Register("SMEMBERS", m.cmdSmembers, server.ReadOnlyOption()) + m.srv.Register("SMISMEMBER", m.cmdSmismember, server.ReadOnlyOption()) m.srv.Register("SMOVE", m.cmdSmove) m.srv.Register("SPOP", m.cmdSpop) - m.srv.Register("SRANDMEMBER", m.cmdSrandmember) + m.srv.Register("SRANDMEMBER", m.cmdSrandmember, server.ReadOnlyOption()) m.srv.Register("SREM", m.cmdSrem) - m.srv.Register("SUNION", m.cmdSunion) + m.srv.Register("SUNION", m.cmdSunion, server.ReadOnlyOption()) m.srv.Register("SUNIONSTORE", m.cmdSunionstore) - m.srv.Register("SSCAN", m.cmdSscan) + m.srv.Register("SSCAN", m.cmdSscan, server.ReadOnlyOption()) } // SADD func (m *Miniredis) cmdSadd(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -62,15 +54,7 @@ func (m *Miniredis) cmdSadd(c *server.Peer, cmd string, args []string) { // SCARD func (m *Miniredis) cmdScard(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -96,15 +80,7 @@ func (m *Miniredis) cmdScard(c *server.Peer, cmd string, args []string) { // SDIFF func (m *Miniredis) cmdSdiff(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -128,15 +104,7 @@ func (m *Miniredis) cmdSdiff(c *server.Peer, cmd string, args []string) { // SDIFFSTORE func (m *Miniredis) cmdSdiffstore(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -159,15 +127,7 @@ func (m *Miniredis) cmdSdiffstore(c *server.Peer, cmd string, args []string) { // SINTER func (m *Miniredis) cmdSinter(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -191,15 +151,7 @@ func (m *Miniredis) cmdSinter(c *server.Peer, cmd string, args []string) { // SINTERSTORE func (m *Miniredis) cmdSinterstore(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -222,15 +174,7 @@ func (m *Miniredis) cmdSinterstore(c *server.Peer, cmd string, args []string) { // SINTERCARD func (m *Miniredis) cmdSintercard(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -293,15 +237,7 @@ func (m *Miniredis) cmdSintercard(c *server.Peer, cmd string, args []string) { // SISMEMBER func (m *Miniredis) cmdSismember(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -330,15 +266,7 @@ func (m *Miniredis) cmdSismember(c *server.Peer, cmd string, args []string) { // SMEMBERS func (m *Miniredis) cmdSmembers(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -368,15 +296,7 @@ func (m *Miniredis) cmdSmembers(c *server.Peer, cmd string, args []string) { // SMISMEMBER func (m *Miniredis) cmdSmismember(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -412,15 +332,7 @@ func (m *Miniredis) cmdSmismember(c *server.Peer, cmd string, args []string) { // SMOVE func (m *Miniredis) cmdSmove(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -456,15 +368,7 @@ func (m *Miniredis) cmdSmove(c *server.Peer, cmd string, args []string) { // SPOP func (m *Miniredis) cmdSpop(c *server.Peer, cmd string, args []string) { - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -547,22 +451,15 @@ func (m *Miniredis) cmdSpop(c *server.Peer, cmd string, args []string) { // SRANDMEMBER func (m *Miniredis) cmdSrandmember(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } + if len(args) > 2 { setDirty(c) c.WriteError(msgSyntaxError) return } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { - return - } key := args[0] count := 0 @@ -625,15 +522,7 @@ func (m *Miniredis) cmdSrandmember(c *server.Peer, cmd string, args []string) { // SREM func (m *Miniredis) cmdSrem(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -658,15 +547,7 @@ func (m *Miniredis) cmdSrem(c *server.Peer, cmd string, args []string) { // SUNION func (m *Miniredis) cmdSunion(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -690,15 +571,7 @@ func (m *Miniredis) cmdSunion(c *server.Peer, cmd string, args []string) { // SUNIONSTORE func (m *Miniredis) cmdSunionstore(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -721,15 +594,7 @@ func (m *Miniredis) cmdSunionstore(c *server.Peer, cmd string, args []string) { // SSCAN func (m *Miniredis) cmdSscan(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_sorted_set.go b/vendor/github.com/alicebob/miniredis/v2/cmd_sorted_set.go index 85bc569f19e..1491a74f472 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_sorted_set.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_sorted_set.go @@ -16,45 +16,37 @@ import ( // commandsSortedSet handles all sorted set operations. func commandsSortedSet(m *Miniredis) { m.srv.Register("ZADD", m.cmdZadd) - m.srv.Register("ZCARD", m.cmdZcard) - m.srv.Register("ZCOUNT", m.cmdZcount) + m.srv.Register("ZCARD", m.cmdZcard, server.ReadOnlyOption()) + m.srv.Register("ZCOUNT", m.cmdZcount, server.ReadOnlyOption()) m.srv.Register("ZINCRBY", m.cmdZincrby) - m.srv.Register("ZINTER", m.makeCmdZinter(false)) + m.srv.Register("ZINTER", m.makeCmdZinter(false), server.ReadOnlyOption()) m.srv.Register("ZINTERSTORE", m.makeCmdZinter(true)) - m.srv.Register("ZLEXCOUNT", m.cmdZlexcount) - m.srv.Register("ZRANGE", m.cmdZrange) - m.srv.Register("ZRANGEBYLEX", m.makeCmdZrangebylex(false)) - m.srv.Register("ZRANGEBYSCORE", m.makeCmdZrangebyscore(false)) - m.srv.Register("ZRANK", m.makeCmdZrank(false)) + m.srv.Register("ZLEXCOUNT", m.cmdZlexcount, server.ReadOnlyOption()) + m.srv.Register("ZRANGE", m.cmdZrange, server.ReadOnlyOption()) + m.srv.Register("ZRANGEBYLEX", m.makeCmdZrangebylex(false), server.ReadOnlyOption()) + m.srv.Register("ZRANGEBYSCORE", m.makeCmdZrangebyscore(false), server.ReadOnlyOption()) + m.srv.Register("ZRANK", m.makeCmdZrank(false), server.ReadOnlyOption()) m.srv.Register("ZREM", m.cmdZrem) m.srv.Register("ZREMRANGEBYLEX", m.cmdZremrangebylex) m.srv.Register("ZREMRANGEBYRANK", m.cmdZremrangebyrank) m.srv.Register("ZREMRANGEBYSCORE", m.cmdZremrangebyscore) - m.srv.Register("ZREVRANGE", m.cmdZrevrange) - m.srv.Register("ZREVRANGEBYLEX", m.makeCmdZrangebylex(true)) - m.srv.Register("ZREVRANGEBYSCORE", m.makeCmdZrangebyscore(true)) - m.srv.Register("ZREVRANK", m.makeCmdZrank(true)) - m.srv.Register("ZSCORE", m.cmdZscore) - m.srv.Register("ZMSCORE", m.cmdZMscore) - m.srv.Register("ZUNION", m.cmdZunion) + m.srv.Register("ZREVRANGE", m.cmdZrevrange, server.ReadOnlyOption()) + m.srv.Register("ZREVRANGEBYLEX", m.makeCmdZrangebylex(true), server.ReadOnlyOption()) + m.srv.Register("ZREVRANGEBYSCORE", m.makeCmdZrangebyscore(true), server.ReadOnlyOption()) + m.srv.Register("ZREVRANK", m.makeCmdZrank(true), server.ReadOnlyOption()) + m.srv.Register("ZSCORE", m.cmdZscore, server.ReadOnlyOption()) + m.srv.Register("ZMSCORE", m.cmdZMscore, server.ReadOnlyOption()) + m.srv.Register("ZUNION", m.cmdZunion, server.ReadOnlyOption()) m.srv.Register("ZUNIONSTORE", m.cmdZunionstore) - m.srv.Register("ZSCAN", m.cmdZscan) + m.srv.Register("ZSCAN", m.cmdZscan, server.ReadOnlyOption()) m.srv.Register("ZPOPMAX", m.cmdZpopmax(true)) m.srv.Register("ZPOPMIN", m.cmdZpopmax(false)) - m.srv.Register("ZRANDMEMBER", m.cmdZrandmember) + m.srv.Register("ZRANDMEMBER", m.cmdZrandmember, server.ReadOnlyOption()) } // ZADD func (m *Miniredis) cmdZadd(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -194,15 +186,7 @@ outer: // ZCARD func (m *Miniredis) cmdZcard(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -227,15 +211,7 @@ func (m *Miniredis) cmdZcard(c *server.Peer, cmd string, args []string) { // ZCOUNT func (m *Miniredis) cmdZcount(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -285,15 +261,7 @@ func (m *Miniredis) cmdZcount(c *server.Peer, cmd string, args []string) { // ZINCRBY func (m *Miniredis) cmdZincrby(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -332,15 +300,7 @@ func (m *Miniredis) makeCmdZinter(store bool) func(c *server.Peer, cmd string, a if store { minArgs++ } - if len(args) < minArgs { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(minArgs)) { return } @@ -513,15 +473,7 @@ func (m *Miniredis) makeCmdZinter(store bool) func(c *server.Peer, cmd string, a // ZLEXCOUNT func (m *Miniredis) cmdZlexcount(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -566,15 +518,7 @@ func (m *Miniredis) cmdZlexcount(c *server.Peer, cmd string, args []string) { // ZRANGE func (m *Miniredis) cmdZrange(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -668,15 +612,7 @@ func (m *Miniredis) cmdZrange(c *server.Peer, cmd string, args []string) { // ZREVRANGE func (m *Miniredis) cmdZrevrange(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -707,17 +643,10 @@ func (m *Miniredis) cmdZrevrange(c *server.Peer, cmd string, args []string) { // ZRANGEBYLEX and ZREVRANGEBYLEX func (m *Miniredis) makeCmdZrangebylex(reverse bool) server.Cmd { return func(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } + opts := optsRangeByLex{ Reverse: reverse, Key: args[0], @@ -756,15 +685,7 @@ func (m *Miniredis) makeCmdZrangebylex(reverse bool) server.Cmd { // ZRANGEBYSCORE and ZREVRANGEBYSCORE func (m *Miniredis) makeCmdZrangebyscore(reverse bool) server.Cmd { return func(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -808,15 +729,7 @@ func (m *Miniredis) makeCmdZrangebyscore(reverse bool) server.Cmd { // ZRANK and ZREVRANK func (m *Miniredis) makeCmdZrank(reverse bool) server.Cmd { return func(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -878,15 +791,7 @@ func (m *Miniredis) makeCmdZrank(reverse bool) server.Cmd { // ZREM func (m *Miniredis) cmdZrem(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -917,15 +822,7 @@ func (m *Miniredis) cmdZrem(c *server.Peer, cmd string, args []string) { // ZREMRANGEBYLEX func (m *Miniredis) cmdZremrangebylex(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -973,15 +870,7 @@ func (m *Miniredis) cmdZremrangebylex(c *server.Peer, cmd string, args []string) // ZREMRANGEBYRANK func (m *Miniredis) cmdZremrangebyrank(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -1023,15 +912,7 @@ func (m *Miniredis) cmdZremrangebyrank(c *server.Peer, cmd string, args []string // ZREMRANGEBYSCORE func (m *Miniredis) cmdZremrangebyscore(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -1084,15 +965,7 @@ func (m *Miniredis) cmdZremrangebyscore(c *server.Peer, cmd string, args []strin // ZSCORE func (m *Miniredis) cmdZscore(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -1122,15 +995,7 @@ func (m *Miniredis) cmdZscore(c *server.Peer, cmd string, args []string) { // ZMSCORE func (m *Miniredis) cmdZMscore(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -1271,16 +1136,7 @@ func withLexRange(members []string, min string, minIncl bool, max string, maxInc // ZUNION func (m *Miniredis) cmdZunion(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -1348,15 +1204,7 @@ func (m *Miniredis) cmdZunion(c *server.Peer, cmd string, args []string) { // ZUNIONSTORE func (m *Miniredis) cmdZunionstore(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -1508,15 +1356,7 @@ func executeZUnion(db *RedisDB, opts zunionOptions) (sortedSet, error) { // ZSCAN func (m *Miniredis) cmdZscan(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -1680,15 +1520,7 @@ func (m *Miniredis) cmdZpopmax(reverse bool) server.Cmd { // ZRANDMEMBER func (m *Miniredis) cmdZrandmember(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go b/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go index 7ce89d10958..f2cccbb513e 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go @@ -16,16 +16,16 @@ import ( // commandsStream handles all stream operations. func commandsStream(m *Miniredis) { m.srv.Register("XADD", m.cmdXadd) - m.srv.Register("XLEN", m.cmdXlen) - m.srv.Register("XREAD", m.cmdXread) - m.srv.Register("XRANGE", m.makeCmdXrange(false)) - m.srv.Register("XREVRANGE", m.makeCmdXrange(true)) + m.srv.Register("XLEN", m.cmdXlen, server.ReadOnlyOption()) + m.srv.Register("XREAD", m.cmdXread, server.ReadOnlyOption()) + m.srv.Register("XRANGE", m.makeCmdXrange(false), server.ReadOnlyOption()) + m.srv.Register("XREVRANGE", m.makeCmdXrange(true), server.ReadOnlyOption()) m.srv.Register("XGROUP", m.cmdXgroup) m.srv.Register("XINFO", m.cmdXinfo) m.srv.Register("XREADGROUP", m.cmdXreadgroup) m.srv.Register("XACK", m.cmdXack) m.srv.Register("XDEL", m.cmdXdel) - m.srv.Register("XPENDING", m.cmdXpending) + m.srv.Register("XPENDING", m.cmdXpending, server.ReadOnlyOption()) m.srv.Register("XTRIM", m.cmdXtrim) m.srv.Register("XAUTOCLAIM", m.cmdXautoclaim) m.srv.Register("XCLAIM", m.cmdXclaim) @@ -33,15 +33,7 @@ func commandsStream(m *Miniredis) { // XADD func (m *Miniredis) cmdXadd(c *server.Peer, cmd string, args []string) { - if len(args) < 4 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(4)) { return } @@ -137,15 +129,7 @@ func (m *Miniredis) cmdXadd(c *server.Peer, cmd string, args []string) { // XLEN func (m *Miniredis) cmdXlen(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -171,9 +155,7 @@ func (m *Miniredis) cmdXlen(c *server.Peer, cmd string, args []string) { // XRANGE and XREVRANGE func (m *Miniredis) makeCmdXrange(reverse bool) server.Cmd { return func(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } if len(args) == 4 || len(args) > 5 { @@ -181,12 +163,6 @@ func (m *Miniredis) makeCmdXrange(reverse bool) server.Cmd { c.WriteError(msgSyntaxError) return } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { - return - } opts := struct { key string @@ -320,15 +296,7 @@ func (m *Miniredis) makeCmdXrange(reverse bool) server.Cmd { // XGROUP func (m *Miniredis) cmdXgroup(c *server.Peer, cmd string, args []string) { - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -513,15 +481,7 @@ func (m *Miniredis) cmdXgroupDelconsumer(c *server.Peer, cmd string, args []stri // XINFO func (m *Miniredis) cmdXinfo(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -684,15 +644,7 @@ func (m *Miniredis) sinceMilli(t time.Time) int { // XREADGROUP func (m *Miniredis) cmdXreadgroup(c *server.Peer, cmd string, args []string) { // XREADGROUP GROUP group consumer STREAMS key ID - if len(args) < 6 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(6)) { return } @@ -801,12 +753,6 @@ parsing: c, opts.blockTimeout, func(c *server.Peer, ctx *connCtx) bool { - if ctx.nested { - setDirty(c) - c.WriteError("ERR XREADGROUP command is not allowed with BLOCK option from scripts") - return false - } - db := m.db(ctx.selectedDB) res, err := xreadgroup( db, @@ -871,15 +817,7 @@ func xreadgroup( // XACK func (m *Miniredis) cmdXack(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -908,15 +846,7 @@ func (m *Miniredis) cmdXack(c *server.Peer, cmd string, args []string) { // XDEL func (m *Miniredis) cmdXdel(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -946,15 +876,7 @@ func (m *Miniredis) cmdXdel(c *server.Peer, cmd string, args []string) { // XREAD func (m *Miniredis) cmdXread(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -1041,12 +963,6 @@ parsing: c, opts.blockTimeout, func(c *server.Peer, ctx *connCtx) bool { - if ctx.nested { - setDirty(c) - c.WriteError("ERR XREAD command is not allowed with BLOCK option from scripts") - return false - } - db := m.db(ctx.selectedDB) res := xread(db, opts.streams, opts.ids, opts.count) if len(res) == 0 { @@ -1128,15 +1044,7 @@ func writeXread(c *server.Peer, streams []string, res map[string][]StreamEntry) // XPENDING func (m *Miniredis) cmdXpending(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -1325,15 +1233,7 @@ func writeXpending( // XTRIM func (m *Miniredis) cmdXtrim(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -1431,15 +1331,7 @@ func (m *Miniredis) cmdXtrim(c *server.Peer, cmd string, args []string) { // XAUTOCLAIM func (m *Miniredis) cmdXautoclaim(c *server.Peer, cmd string, args []string) { // XAUTOCLAIM key group consumer min-idle-time start - if len(args) < 5 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(5)) { return } @@ -1596,15 +1488,7 @@ func writeXautoclaim(c *server.Peer, nextCallId string, res []StreamEntry, justI // XCLAIM func (m *Miniredis) cmdXclaim(c *server.Peer, cmd string, args []string) { - if len(args) < 5 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(5)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_string.go b/vendor/github.com/alicebob/miniredis/v2/cmd_string.go index 08e67746bee..61c6732700a 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_string.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_string.go @@ -4,6 +4,7 @@ package miniredis import ( "math/big" + "math/bits" "strconv" "strings" "time" @@ -14,21 +15,21 @@ import ( // commandsString handles all string value operations. func commandsString(m *Miniredis) { m.srv.Register("APPEND", m.cmdAppend) - m.srv.Register("BITCOUNT", m.cmdBitcount) + m.srv.Register("BITCOUNT", m.cmdBitcount, server.ReadOnlyOption()) m.srv.Register("BITOP", m.cmdBitop) - m.srv.Register("BITPOS", m.cmdBitpos) + m.srv.Register("BITPOS", m.cmdBitpos, server.ReadOnlyOption()) m.srv.Register("DECRBY", m.cmdDecrby) m.srv.Register("DECR", m.cmdDecr) - m.srv.Register("GETBIT", m.cmdGetbit) - m.srv.Register("GET", m.cmdGet) + m.srv.Register("GETBIT", m.cmdGetbit, server.ReadOnlyOption()) + m.srv.Register("GET", m.cmdGet, server.ReadOnlyOption()) m.srv.Register("GETEX", m.cmdGetex) - m.srv.Register("GETRANGE", m.cmdGetrange) + m.srv.Register("GETRANGE", m.cmdGetrange, server.ReadOnlyOption()) m.srv.Register("GETSET", m.cmdGetset) m.srv.Register("GETDEL", m.cmdGetdel) m.srv.Register("INCRBYFLOAT", m.cmdIncrbyfloat) m.srv.Register("INCRBY", m.cmdIncrby) m.srv.Register("INCR", m.cmdIncr) - m.srv.Register("MGET", m.cmdMget) + m.srv.Register("MGET", m.cmdMget, server.ReadOnlyOption()) m.srv.Register("MSET", m.cmdMset) m.srv.Register("MSETNX", m.cmdMsetnx) m.srv.Register("PSETEX", m.cmdPsetex) @@ -37,20 +38,12 @@ func commandsString(m *Miniredis) { m.srv.Register("SET", m.cmdSet) m.srv.Register("SETNX", m.cmdSetnx) m.srv.Register("SETRANGE", m.cmdSetrange) - m.srv.Register("STRLEN", m.cmdStrlen) + m.srv.Register("STRLEN", m.cmdStrlen, server.ReadOnlyOption()) } // SET func (m *Miniredis) cmdSet(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -191,15 +184,7 @@ func (m *Miniredis) cmdSet(c *server.Peer, cmd string, args []string) { // SETEX func (m *Miniredis) cmdSetex(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -229,15 +214,7 @@ func (m *Miniredis) cmdSetex(c *server.Peer, cmd string, args []string) { // PSETEX func (m *Miniredis) cmdPsetex(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -270,15 +247,7 @@ func (m *Miniredis) cmdPsetex(c *server.Peer, cmd string, args []string) { // SETNX func (m *Miniredis) cmdSetnx(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -299,15 +268,7 @@ func (m *Miniredis) cmdSetnx(c *server.Peer, cmd string, args []string) { // MSET func (m *Miniredis) cmdMset(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -334,15 +295,7 @@ func (m *Miniredis) cmdMset(c *server.Peer, cmd string, args []string) { // MSETNX func (m *Miniredis) cmdMsetnx(c *server.Peer, cmd string, args []string) { - if len(args) < 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(2)) { return } @@ -382,15 +335,7 @@ func (m *Miniredis) cmdMsetnx(c *server.Peer, cmd string, args []string) { // GET func (m *Miniredis) cmdGet(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -414,15 +359,7 @@ func (m *Miniredis) cmdGet(c *server.Peer, cmd string, args []string) { // GETEX func (m *Miniredis) cmdGetex(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -501,15 +438,7 @@ func (m *Miniredis) cmdGetex(c *server.Peer, cmd string, args []string) { // GETSET func (m *Miniredis) cmdGetset(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -538,15 +467,7 @@ func (m *Miniredis) cmdGetset(c *server.Peer, cmd string, args []string) { // GETDEL func (m *Miniredis) cmdGetdel(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -573,15 +494,7 @@ func (m *Miniredis) cmdGetdel(c *server.Peer, cmd string, args []string) { // MGET func (m *Miniredis) cmdMget(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -607,15 +520,7 @@ func (m *Miniredis) cmdMget(c *server.Peer, cmd string, args []string) { // INCR func (m *Miniredis) cmdIncr(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -639,15 +544,7 @@ func (m *Miniredis) cmdIncr(c *server.Peer, cmd string, args []string) { // INCRBY func (m *Miniredis) cmdIncrby(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -680,15 +577,7 @@ func (m *Miniredis) cmdIncrby(c *server.Peer, cmd string, args []string) { // INCRBYFLOAT func (m *Miniredis) cmdIncrbyfloat(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -720,15 +609,7 @@ func (m *Miniredis) cmdIncrbyfloat(c *server.Peer, cmd string, args []string) { // DECR func (m *Miniredis) cmdDecr(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -752,15 +633,7 @@ func (m *Miniredis) cmdDecr(c *server.Peer, cmd string, args []string) { // DECRBY func (m *Miniredis) cmdDecrby(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -793,15 +666,7 @@ func (m *Miniredis) cmdDecrby(c *server.Peer, cmd string, args []string) { // STRLEN func (m *Miniredis) cmdStrlen(c *server.Peer, cmd string, args []string) { - if len(args) != 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(1)) { return } @@ -821,15 +686,7 @@ func (m *Miniredis) cmdStrlen(c *server.Peer, cmd string, args []string) { // APPEND func (m *Miniredis) cmdAppend(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -852,15 +709,7 @@ func (m *Miniredis) cmdAppend(c *server.Peer, cmd string, args []string) { // GETRANGE func (m *Miniredis) cmdGetrange(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -892,15 +741,7 @@ func (m *Miniredis) cmdGetrange(c *server.Peer, cmd string, args []string) { // SETRANGE func (m *Miniredis) cmdSetrange(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -943,15 +784,7 @@ func (m *Miniredis) cmdSetrange(c *server.Peer, cmd string, args []string) { // BITCOUNT func (m *Miniredis) cmdBitcount(c *server.Peer, cmd string, args []string) { - if len(args) < 1 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -972,6 +805,10 @@ func (m *Miniredis) cmdBitcount(c *server.Peer, cmd string, args []string) { } args = args[2:] } + if len(args) != 0 { + c.WriteError(msgSyntaxError) + return + } withTx(m, c, func(c *server.Peer, ctx *connCtx) { db := m.db(ctx.selectedDB) @@ -1002,15 +839,7 @@ func (m *Miniredis) cmdBitcount(c *server.Peer, cmd string, args []string) { // BITOP func (m *Miniredis) cmdBitop(c *server.Peer, cmd string, args []string) { - if len(args) < 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(3)) { return } @@ -1085,15 +914,7 @@ func (m *Miniredis) cmdBitop(c *server.Peer, cmd string, args []string) { // BITPOS func (m *Miniredis) cmdBitpos(c *server.Peer, cmd string, args []string) { - if len(args) < 2 || len(args) > 4 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, between(2, 4)) { return } @@ -1186,15 +1007,7 @@ func (m *Miniredis) cmdBitpos(c *server.Peer, cmd string, args []string) { // GETBIT func (m *Miniredis) cmdGetbit(c *server.Peer, cmd string, args []string) { - if len(args) != 2 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(2)) { return } @@ -1238,15 +1051,7 @@ func (m *Miniredis) cmdGetbit(c *server.Peer, cmd string, args []string) { // SETBIT func (m *Miniredis) cmdSetbit(c *server.Peer, cmd string, args []string) { - if len(args) != 3 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(3)) { return } @@ -1314,10 +1119,7 @@ func withRange(v string, start, end int) string { func countBits(v []byte) int { count := 0 for _, b := range []byte(v) { - for b > 0 { - count += int((b % uint8(2))) - b = b >> 1 - } + count += bits.OnesCount8(uint8(b)) } return count } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_transactions.go b/vendor/github.com/alicebob/miniredis/v2/cmd_transactions.go index 94729e00411..93d5354f7bd 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_transactions.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_transactions.go @@ -17,14 +17,7 @@ func commandsTransaction(m *Miniredis) { // MULTI func (m *Miniredis) cmdMulti(c *server.Peer, cmd string, args []string) { - if len(args) != 0 { - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } @@ -45,15 +38,7 @@ func (m *Miniredis) cmdMulti(c *server.Peer, cmd string, args []string) { // EXEC func (m *Miniredis) cmdExec(c *server.Peer, cmd string, args []string) { - if len(args) != 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } @@ -99,15 +84,7 @@ func (m *Miniredis) cmdExec(c *server.Peer, cmd string, args []string) { // DISCARD func (m *Miniredis) cmdDiscard(c *server.Peer, cmd string, args []string) { - if len(args) != 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } @@ -123,15 +100,7 @@ func (m *Miniredis) cmdDiscard(c *server.Peer, cmd string, args []string) { // WATCH func (m *Miniredis) cmdWatch(c *server.Peer, cmd string, args []string) { - if len(args) == 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, atLeast(1)) { return } @@ -157,15 +126,7 @@ func (m *Miniredis) cmdWatch(c *server.Peer, cmd string, args []string) { // UNWATCH func (m *Miniredis) cmdUnwatch(c *server.Peer, cmd string, args []string) { - if len(args) != 0 { - setDirty(c) - c.WriteError(errWrongNumber(cmd)) - return - } - if !m.handleAuth(c) { - return - } - if m.checkPubsub(c, cmd) { + if !m.isValidCMD(c, cmd, args, exactly(0)) { return } diff --git a/vendor/github.com/alicebob/miniredis/v2/direct.go b/vendor/github.com/alicebob/miniredis/v2/direct.go index 88ef361e984..ff527b800cb 100644 --- a/vendor/github.com/alicebob/miniredis/v2/direct.go +++ b/vendor/github.com/alicebob/miniredis/v2/direct.go @@ -822,3 +822,41 @@ func (db *RedisDB) HllMerge(destKey string, sourceKeys ...string) error { func (m *Miniredis) Copy(srcDB int, src string, destDB int, dest string) error { return m.copy(m.DB(srcDB), src, m.DB(destDB), dest) } + +func (m *Miniredis) SCard(key string) (int, error) { + return m.DB(m.selectedDB).SCard(key) +} + +func (db *RedisDB) SCard(key string) (int, error) { + db.master.Lock() + defer db.master.Unlock() + if !db.exists(key) { + return 0, nil + } + if db.t(key) != "set" { + return 0, ErrWrongType + } + return len(db.setMembers(key)), nil +} + +// return "" if there were no members +func (m *Miniredis) SRandMember(key string) (string, error) { + return m.DB(m.selectedDB).SRandMember(key) +} + +func (db *RedisDB) SRandMember(key string) (string, error) { + db.master.Lock() + defer db.master.Unlock() + if !db.exists(key) { + return "", nil + } + if db.t(key) != "set" { + return "", ErrWrongType + } + members := db.setMembers(key) + if len(members) == 0 { + return "", nil + } + db.master.shuffle(members) + return members[0], nil +} diff --git a/vendor/github.com/alicebob/miniredis/v2/lua.go b/vendor/github.com/alicebob/miniredis/v2/lua.go index f6237392132..29f3aeaec00 100644 --- a/vendor/github.com/alicebob/miniredis/v2/lua.go +++ b/vendor/github.com/alicebob/miniredis/v2/lua.go @@ -18,7 +18,7 @@ var luaRedisConstants = map[string]lua.LValue{ "LOG_WARNING": lua.LNumber(3), } -func mkLua(srv *server.Server, c *server.Peer, sha string) (map[string]lua.LGFunction, map[string]lua.LValue) { +func mkLua(srv *server.Server, c *server.Peer, sha string, readOnly bool) (map[string]lua.LGFunction, map[string]lua.LValue) { mkCall := func(failFast bool) func(l *lua.LState) int { // one server.Ctx for a single Lua run pCtx := &connCtx{} @@ -52,6 +52,20 @@ func mkLua(srv *server.Server, c *server.Peer, sha string) (map[string]lua.LGFun return 0 } + if readOnly && len(args) > 0 { + if srv.IsRegisteredCommand(args[0]) && !srv.IsReadOnlyCommand(args[0]) { + if failFast { + l.Error(lua.LString("Write commands are not allowed in read-only scripts"), 1) + return 0 + } + // pcall() mode - return error table + res := &lua.LTable{} + res.RawSetString("err", lua.LString("Write commands are not allowed in read-only scripts")) + l.Push(res) + return 1 + } + } + buf := &bytes.Buffer{} wr := bufio.NewWriter(buf) peer := server.NewPeer(wr) @@ -71,7 +85,13 @@ func mkLua(srv *server.Server, c *server.Peer, sha string) (map[string]lua.LGFun return 0 } // pcall() mode - l.Push(lua.LNil) + res := &lua.LTable{} + if strings.Contains(err.Error(), "ERR unknown command") { + res.RawSetString("err", lua.LString("ERR Unknown Redis command called from script")) + } else { + res.RawSetString("err", lua.LString(err.Error())) + } + l.Push(res) return 1 } @@ -279,3 +299,14 @@ func luaStatusReply(msg string) *lua.LTable { tab.RawSetString("ok", lua.LString(msg)) return tab } + +// Our very minimal "os." lua lib. +func mkLuaOS() map[string]lua.LGFunction { + return map[string]lua.LGFunction{ + // > Returns an approximation of the amount in seconds of CPU time used by the program + "clock": func(l *lua.LState) int { + l.Push(lua.LNumber(42)) + return 1 + }, + } +} diff --git a/vendor/github.com/alicebob/miniredis/v2/miniredis.go b/vendor/github.com/alicebob/miniredis/v2/miniredis.go index 6996872c463..cc87474dbf6 100644 --- a/vendor/github.com/alicebob/miniredis/v2/miniredis.go +++ b/vendor/github.com/alicebob/miniredis/v2/miniredis.go @@ -373,6 +373,14 @@ func (m *Miniredis) Server() *server.Server { return m.srv } +// IsReadOnlyCommand checks if a command is marked as read-only +func (m *Miniredis) IsReadOnlyCommand(cmd string) bool { + if m.srv == nil { + return false + } + return m.srv.IsReadOnlyCommand(cmd) +} + // Dump returns a text version of the selected DB, usable for debugging. // // Dump limits the maximum length of each key:value to "DumpMaxLineLen" characters. @@ -466,8 +474,31 @@ func (m *Miniredis) SetError(msg string) { m.srv.SetPreHook(cb) } +type argRequirements struct { + minimum int + maximum *int +} + +func atLeast(n int) argRequirements { + return argRequirements{n, nil} +} + +func between(a int, b int) argRequirements { + return argRequirements{a, &b} +} + +func exactly(n int) argRequirements { + return argRequirements{n, &n} +} + // isValidCMD returns true if command is valid and can be executed. -func (m *Miniredis) isValidCMD(c *server.Peer, cmd string) bool { +func (m *Miniredis) isValidCMD(c *server.Peer, cmd string, args []string, argReqs argRequirements) bool { + if len(args) < argReqs.minimum || (argReqs.maximum != nil && len(args) > *argReqs.maximum) { + setDirty(c) + c.WriteError(errWrongNumber(cmd)) + return false + } + if !m.handleAuth(c) { return false } diff --git a/vendor/github.com/alicebob/miniredis/v2/server/cmdmeta.go b/vendor/github.com/alicebob/miniredis/v2/server/cmdmeta.go new file mode 100644 index 00000000000..a1be7e151f6 --- /dev/null +++ b/vendor/github.com/alicebob/miniredis/v2/server/cmdmeta.go @@ -0,0 +1,17 @@ +package server + +// cmdMeta holds metadata about a registered command +type cmdMeta struct { + handler Cmd + readOnly bool +} + +// CmdOption is a function that configures command metadata +type CmdOption func(*cmdMeta) + +// ReadOnlyOption marks a command as read-only +func ReadOnlyOption() CmdOption { + return func(meta *cmdMeta) { + meta.readOnly = true + } +} diff --git a/vendor/github.com/alicebob/miniredis/v2/server/server.go b/vendor/github.com/alicebob/miniredis/v2/server/server.go index b5f1b61ce64..af36105f45d 100644 --- a/vendor/github.com/alicebob/miniredis/v2/server/server.go +++ b/vendor/github.com/alicebob/miniredis/v2/server/server.go @@ -34,7 +34,7 @@ type Hook func(*Peer, string, ...string) bool // Server is a simple redis server type Server struct { l net.Listener - cmds map[string]Cmd + cmds map[string]*cmdMeta preHook Hook peers map[net.Conn]struct{} mu sync.Mutex @@ -62,7 +62,7 @@ func NewServerTLS(addr string, cfg *tls.Config) (*Server, error) { func newServer(l net.Listener) *Server { s := Server{ - cmds: map[string]Cmd{}, + cmds: map[string]*cmdMeta{}, peers: map[net.Conn]struct{}{}, l: l, } @@ -143,14 +143,23 @@ func (s *Server) Close() { // Register a command. It can't have been registered before. Safe to call on a // running server. -func (s *Server) Register(cmd string, f Cmd) error { +func (s *Server) Register(cmd string, f Cmd, options ...CmdOption) error { s.mu.Lock() defer s.mu.Unlock() cmd = strings.ToUpper(cmd) if _, ok := s.cmds[cmd]; ok { return fmt.Errorf("command already registered: %s", cmd) } - s.cmds[cmd] = f + + meta := &cmdMeta{ + handler: f, + readOnly: false, + } + for _, option := range options { + option(meta) + } + s.cmds[cmd] = meta + return nil } @@ -205,7 +214,7 @@ func (s *Server) Dispatch(c *Peer, args []string) { } s.mu.Lock() - cb, ok := s.cmds[cmdUp] + cmdMeta, ok := s.cmds[cmdUp] s.mu.Unlock() if !ok { c.WriteError(errUnknownCommand(cmd, args)) @@ -215,7 +224,7 @@ func (s *Server) Dispatch(c *Peer, args []string) { s.mu.Lock() s.infoCmds++ s.mu.Unlock() - cb(c, cmdUp, args) + cmdMeta.handler(c, cmdUp, args) if c.SwitchResp3 != nil { c.Resp3 = *c.SwitchResp3 c.SwitchResp3 = nil @@ -229,6 +238,26 @@ func (s *Server) TotalCommands() int { return s.infoCmds } +// IsRegisteredCommand checks if a command is registered +func (s *Server) IsRegisteredCommand(cmd string) bool { + s.mu.Lock() + defer s.mu.Unlock() + cmdUp := strings.ToUpper(cmd) + _, ok := s.cmds[cmdUp] + return ok +} + +// IsReadOnlyCommand checks if a command is marked as read-only +func (s *Server) IsReadOnlyCommand(cmd string) bool { + s.mu.Lock() + defer s.mu.Unlock() + cmdUp := strings.ToUpper(cmd) + if cmdMeta, ok := s.cmds[cmdUp]; ok { + return cmdMeta.readOnly + } + return false +} + // ClientsLen gives the number of connected clients right now func (s *Server) ClientsLen() int { s.mu.Lock() diff --git a/vendor/github.com/alicebob/miniredis/v2/stream.go b/vendor/github.com/alicebob/miniredis/v2/stream.go index f2dd466d58a..27cc5209be8 100644 --- a/vendor/github.com/alicebob/miniredis/v2/stream.go +++ b/vendor/github.com/alicebob/miniredis/v2/stream.go @@ -57,9 +57,7 @@ func newStreamKey() *streamKey { } // generateID doesn't lock the mutex -func (s *streamKey) generateID(now time.Time) string { - ts := uint64(now.UnixNano()) / 1_000_000 - +func (s *streamKey) generateID(ts uint64) string { next := fmt.Sprintf("%d-%d", ts, 0) if s.lastAllocatedID != "" && streamCmp(s.lastAllocatedID, next) >= 0 { last, _ := parseStreamID(s.lastAllocatedID) @@ -230,14 +228,23 @@ func (s *streamKey) createGroup(group, id string) error { } // streamAdd adds an entry to a stream. Returns the new entry ID. -// If id is empty or "*" the ID will be generated automatically. +// If id is empty, "*", or "123-*", the ID will be generated automatically. // `values` should have an even length. func (s *streamKey) add(entryID string, values []string, now time.Time) (string, error) { s.mu.Lock() defer s.mu.Unlock() - if entryID == "" || entryID == "*" { - entryID = s.generateID(now) + switch { + case entryID == "" || entryID == "*": + entryID = s.generateID(uint64(now.UnixMilli())) + default: + // "-*" + parts := strings.Split(entryID, "-") + if len(parts) == 2 && parts[1] == "*" { + if ts, err := strconv.ParseUint(parts[0], 10, 64); err == nil { + entryID = s.generateID(uint64(ts)) + } + } } entryID, err := formatStreamID(entryID) diff --git a/vendor/github.com/asaskevich/govalidator/.gitignore b/vendor/github.com/asaskevich/govalidator/.gitignore deleted file mode 100644 index 8d69a9418aa..00000000000 --- a/vendor/github.com/asaskevich/govalidator/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -bin/ -.idea/ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - diff --git a/vendor/github.com/asaskevich/govalidator/.travis.yml b/vendor/github.com/asaskevich/govalidator/.travis.yml deleted file mode 100644 index bb83c6670df..00000000000 --- a/vendor/github.com/asaskevich/govalidator/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -dist: xenial -go: - - '1.10' - - '1.11' - - '1.12' - - '1.13' - - 'tip' - -script: - - go test -coverpkg=./... -coverprofile=coverage.info -timeout=5s - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md b/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md deleted file mode 100644 index 4b462b0d81b..00000000000 --- a/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor Code of Conduct - -This project adheres to [The Code Manifesto](http://codemanifesto.com) -as its guidelines for contributor interactions. - -## The Code Manifesto - -We want to work in an ecosystem that empowers developers to reach their -potential — one that encourages growth and effective collaboration. A space -that is safe for all. - -A space such as this benefits everyone that participates in it. It encourages -new developers to enter our field. It is through discussion and collaboration -that we grow, and through growth that we improve. - -In the effort to create such a place, we hold to these values: - -1. **Discrimination limits us.** This includes discrimination on the basis of - race, gender, sexual orientation, gender identity, age, nationality, - technology and any other arbitrary exclusion of a group of people. -2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort - levels. Remember that, and if brought to your attention, heed it. -3. **We are our biggest assets.** None of us were born masters of our trade. - Each of us has been helped along the way. Return that favor, when and where - you can. -4. **We are resources for the future.** As an extension of #3, share what you - know. Make yourself a resource to help those that come after you. -5. **Respect defines us.** Treat others as you wish to be treated. Make your - discussions, criticisms and debates from a position of respectfulness. Ask - yourself, is it true? Is it necessary? Is it constructive? Anything less is - unacceptable. -6. **Reactions require grace.** Angry responses are valid, but abusive language - and vindictive actions are toxic. When something happens that offends you, - handle it assertively, but be respectful. Escalate reasonably, and try to - allow the offender an opportunity to explain themselves, and possibly - correct the issue. -7. **Opinions are just that: opinions.** Each and every one of us, due to our - background and upbringing, have varying opinions. That is perfectly - acceptable. Remember this: if you respect your own opinions, you should - respect the opinions of others. -8. **To err is human.** You might not intend it, but mistakes do happen and - contribute to build experience. Tolerate honest mistakes, and don't - hesitate to apologize if you make one yourself. diff --git a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md deleted file mode 100644 index 7ed268a1edd..00000000000 --- a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md +++ /dev/null @@ -1,63 +0,0 @@ -#### Support -If you do have a contribution to the package, feel free to create a Pull Request or an Issue. - -#### What to contribute -If you don't know what to do, there are some features and functions that need to be done - -- [ ] Refactor code -- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check -- [ ] Create actual list of contributors and projects that currently using this package -- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) -- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) -- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new -- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) -- [ ] Implement fuzzing testing -- [ ] Implement some struct/map/array utilities -- [ ] Implement map/array validation -- [ ] Implement benchmarking -- [ ] Implement batch of examples -- [ ] Look at forks for new features and fixes - -#### Advice -Feel free to create what you want, but keep in mind when you implement new features: -- Code must be clear and readable, names of variables/constants clearly describes what they are doing -- Public functions must be documented and described in source file and added to README.md to the list of available functions -- There are must be unit-tests for any new functions and improvements - -## Financial contributions - -We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator). -Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. - - -## Credits - - -### Contributors - -Thank you to all the people who have already contributed to govalidator! - - - -### Backers - -Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)] - - - - -### Sponsors - -Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor)) - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md deleted file mode 100644 index 2c3fc35eb64..00000000000 --- a/vendor/github.com/asaskevich/govalidator/README.md +++ /dev/null @@ -1,622 +0,0 @@ -govalidator -=========== -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GoDoc](https://godoc.org/github.com/asaskevich/govalidator?status.png)](https://godoc.org/github.com/asaskevich/govalidator) -[![Build Status](https://travis-ci.org/asaskevich/govalidator.svg?branch=master)](https://travis-ci.org/asaskevich/govalidator) -[![Coverage](https://codecov.io/gh/asaskevich/govalidator/branch/master/graph/badge.svg)](https://codecov.io/gh/asaskevich/govalidator) [![Go Report Card](https://goreportcard.com/badge/github.com/asaskevich/govalidator)](https://goreportcard.com/report/github.com/asaskevich/govalidator) [![GoSearch](http://go-search.org/badge?id=github.com%2Fasaskevich%2Fgovalidator)](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [![Backers on Open Collective](https://opencollective.com/govalidator/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/govalidator/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield) - -A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js). - -#### Installation -Make sure that Go is installed on your computer. -Type the following command in your terminal: - - go get github.com/asaskevich/govalidator - -or you can get specified release of the package with `gopkg.in`: - - go get gopkg.in/asaskevich/govalidator.v10 - -After it the package is ready to use. - - -#### Import package in your project -Add following line in your `*.go` file: -```go -import "github.com/asaskevich/govalidator" -``` -If you are unhappy to use long `govalidator`, you can do something like this: -```go -import ( - valid "github.com/asaskevich/govalidator" -) -``` - -#### Activate behavior to require all fields have a validation tag by default -`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function. - -`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors. - -```go -import "github.com/asaskevich/govalidator" - -func init() { - govalidator.SetFieldsRequiredByDefault(true) -} -``` - -Here's some code to explain it: -```go -// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -type exampleStruct struct { - Name string `` - Email string `valid:"email"` -} - -// this, however, will only fail when Email is empty or an invalid email address: -type exampleStruct2 struct { - Name string `valid:"-"` - Email string `valid:"email"` -} - -// lastly, this will only fail when Email is an invalid email address but not when it's empty: -type exampleStruct2 struct { - Name string `valid:"-"` - Email string `valid:"email,optional"` -} -``` - -#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123)) -##### Custom validator function signature -A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible. -```go -import "github.com/asaskevich/govalidator" - -// old signature -func(i interface{}) bool - -// new signature -func(i interface{}, o interface{}) bool -``` - -##### Adding a custom validator -This was changed to prevent data races when accessing custom validators. -```go -import "github.com/asaskevich/govalidator" - -// before -govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool { - // ... -} - -// after -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool { - // ... -}) -``` - -#### List of functions: -```go -func Abs(value float64) float64 -func BlackList(str, chars string) string -func ByteLength(str string, params ...string) bool -func CamelCaseToUnderscore(str string) string -func Contains(str, substring string) bool -func Count(array []interface{}, iterator ConditionIterator) int -func Each(array []interface{}, iterator Iterator) -func ErrorByField(e error, field string) string -func ErrorsByField(e error) map[string]string -func Filter(array []interface{}, iterator ConditionIterator) []interface{} -func Find(array []interface{}, iterator ConditionIterator) interface{} -func GetLine(s string, index int) (string, error) -func GetLines(s string) []string -func HasLowerCase(str string) bool -func HasUpperCase(str string) bool -func HasWhitespace(str string) bool -func HasWhitespaceOnly(str string) bool -func InRange(value interface{}, left interface{}, right interface{}) bool -func InRangeFloat32(value, left, right float32) bool -func InRangeFloat64(value, left, right float64) bool -func InRangeInt(value, left, right interface{}) bool -func IsASCII(str string) bool -func IsAlpha(str string) bool -func IsAlphanumeric(str string) bool -func IsBase64(str string) bool -func IsByteLength(str string, min, max int) bool -func IsCIDR(str string) bool -func IsCRC32(str string) bool -func IsCRC32b(str string) bool -func IsCreditCard(str string) bool -func IsDNSName(str string) bool -func IsDataURI(str string) bool -func IsDialString(str string) bool -func IsDivisibleBy(str, num string) bool -func IsEmail(str string) bool -func IsExistingEmail(email string) bool -func IsFilePath(str string) (bool, int) -func IsFloat(str string) bool -func IsFullWidth(str string) bool -func IsHalfWidth(str string) bool -func IsHash(str string, algorithm string) bool -func IsHexadecimal(str string) bool -func IsHexcolor(str string) bool -func IsHost(str string) bool -func IsIP(str string) bool -func IsIPv4(str string) bool -func IsIPv6(str string) bool -func IsISBN(str string, version int) bool -func IsISBN10(str string) bool -func IsISBN13(str string) bool -func IsISO3166Alpha2(str string) bool -func IsISO3166Alpha3(str string) bool -func IsISO4217(str string) bool -func IsISO693Alpha2(str string) bool -func IsISO693Alpha3b(str string) bool -func IsIn(str string, params ...string) bool -func IsInRaw(str string, params ...string) bool -func IsInt(str string) bool -func IsJSON(str string) bool -func IsLatitude(str string) bool -func IsLongitude(str string) bool -func IsLowerCase(str string) bool -func IsMAC(str string) bool -func IsMD4(str string) bool -func IsMD5(str string) bool -func IsMagnetURI(str string) bool -func IsMongoID(str string) bool -func IsMultibyte(str string) bool -func IsNatural(value float64) bool -func IsNegative(value float64) bool -func IsNonNegative(value float64) bool -func IsNonPositive(value float64) bool -func IsNotNull(str string) bool -func IsNull(str string) bool -func IsNumeric(str string) bool -func IsPort(str string) bool -func IsPositive(value float64) bool -func IsPrintableASCII(str string) bool -func IsRFC3339(str string) bool -func IsRFC3339WithoutZone(str string) bool -func IsRGBcolor(str string) bool -func IsRegex(str string) bool -func IsRequestURI(rawurl string) bool -func IsRequestURL(rawurl string) bool -func IsRipeMD128(str string) bool -func IsRipeMD160(str string) bool -func IsRsaPub(str string, params ...string) bool -func IsRsaPublicKey(str string, keylen int) bool -func IsSHA1(str string) bool -func IsSHA256(str string) bool -func IsSHA384(str string) bool -func IsSHA512(str string) bool -func IsSSN(str string) bool -func IsSemver(str string) bool -func IsTiger128(str string) bool -func IsTiger160(str string) bool -func IsTiger192(str string) bool -func IsTime(str string, format string) bool -func IsType(v interface{}, params ...string) bool -func IsURL(str string) bool -func IsUTFDigit(str string) bool -func IsUTFLetter(str string) bool -func IsUTFLetterNumeric(str string) bool -func IsUTFNumeric(str string) bool -func IsUUID(str string) bool -func IsUUIDv3(str string) bool -func IsUUIDv4(str string) bool -func IsUUIDv5(str string) bool -func IsULID(str string) bool -func IsUnixTime(str string) bool -func IsUpperCase(str string) bool -func IsVariableWidth(str string) bool -func IsWhole(value float64) bool -func LeftTrim(str, chars string) string -func Map(array []interface{}, iterator ResultIterator) []interface{} -func Matches(str, pattern string) bool -func MaxStringLength(str string, params ...string) bool -func MinStringLength(str string, params ...string) bool -func NormalizeEmail(str string) (string, error) -func PadBoth(str string, padStr string, padLen int) string -func PadLeft(str string, padStr string, padLen int) string -func PadRight(str string, padStr string, padLen int) string -func PrependPathToErrors(err error, path string) error -func Range(str string, params ...string) bool -func RemoveTags(s string) string -func ReplacePattern(str, pattern, replace string) string -func Reverse(s string) string -func RightTrim(str, chars string) string -func RuneLength(str string, params ...string) bool -func SafeFileName(str string) string -func SetFieldsRequiredByDefault(value bool) -func SetNilPtrAllowedByRequired(value bool) -func Sign(value float64) float64 -func StringLength(str string, params ...string) bool -func StringMatches(s string, params ...string) bool -func StripLow(str string, keepNewLines bool) string -func ToBoolean(str string) (bool, error) -func ToFloat(str string) (float64, error) -func ToInt(value interface{}) (res int64, err error) -func ToJSON(obj interface{}) (string, error) -func ToString(obj interface{}) string -func Trim(str, chars string) string -func Truncate(str string, length int, ending string) string -func TruncatingErrorf(str string, args ...interface{}) error -func UnderscoreToCamelCase(s string) string -func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error) -func ValidateStruct(s interface{}) (bool, error) -func WhiteList(str, chars string) string -type ConditionIterator -type CustomTypeValidator -type Error -func (e Error) Error() string -type Errors -func (es Errors) Error() string -func (es Errors) Errors() []error -type ISO3166Entry -type ISO693Entry -type InterfaceParamValidator -type Iterator -type ParamValidator -type ResultIterator -type UnsupportedTypeError -func (e *UnsupportedTypeError) Error() string -type Validator -``` - -#### Examples -###### IsURL -```go -println(govalidator.IsURL(`http://user@pass:domain.com/path/page`)) -``` -###### IsType -```go -println(govalidator.IsType("Bob", "string")) -println(govalidator.IsType(1, "int")) -i := 1 -println(govalidator.IsType(&i, "*int")) -``` - -IsType can be used through the tag `type` which is essential for map validation: -```go -type User struct { - Name string `valid:"type(string)"` - Age int `valid:"type(int)"` - Meta interface{} `valid:"type(string)"` -} -result, err := govalidator.ValidateStruct(User{"Bob", 20, "meta"}) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` -###### ToString -```go -type User struct { - FirstName string - LastName string -} - -str := govalidator.ToString(&User{"John", "Juan"}) -println(str) -``` -###### Each, Map, Filter, Count for slices -Each iterates over the slice/array and calls Iterator for every item -```go -data := []interface{}{1, 2, 3, 4, 5} -var fn govalidator.Iterator = func(value interface{}, index int) { - println(value.(int)) -} -govalidator.Each(data, fn) -``` -```go -data := []interface{}{1, 2, 3, 4, 5} -var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} { - return value.(int) * 3 -} -_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15} -``` -```go -data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} -var fn govalidator.ConditionIterator = func(value interface{}, index int) bool { - return value.(int)%2 == 0 -} -_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10} -_ = govalidator.Count(data, fn) // result = 5 -``` -###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2) -If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this: -```go -govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { - return str == "duck" -}) -``` -For completely custom validators (interface-based), see below. - -Here is a list of available validators for struct fields (validator - used function): -```go -"email": IsEmail, -"url": IsURL, -"dialstring": IsDialString, -"requrl": IsRequestURL, -"requri": IsRequestURI, -"alpha": IsAlpha, -"utfletter": IsUTFLetter, -"alphanum": IsAlphanumeric, -"utfletternum": IsUTFLetterNumeric, -"numeric": IsNumeric, -"utfnumeric": IsUTFNumeric, -"utfdigit": IsUTFDigit, -"hexadecimal": IsHexadecimal, -"hexcolor": IsHexcolor, -"rgbcolor": IsRGBcolor, -"lowercase": IsLowerCase, -"uppercase": IsUpperCase, -"int": IsInt, -"float": IsFloat, -"null": IsNull, -"uuid": IsUUID, -"uuidv3": IsUUIDv3, -"uuidv4": IsUUIDv4, -"uuidv5": IsUUIDv5, -"creditcard": IsCreditCard, -"isbn10": IsISBN10, -"isbn13": IsISBN13, -"json": IsJSON, -"multibyte": IsMultibyte, -"ascii": IsASCII, -"printableascii": IsPrintableASCII, -"fullwidth": IsFullWidth, -"halfwidth": IsHalfWidth, -"variablewidth": IsVariableWidth, -"base64": IsBase64, -"datauri": IsDataURI, -"ip": IsIP, -"port": IsPort, -"ipv4": IsIPv4, -"ipv6": IsIPv6, -"dns": IsDNSName, -"host": IsHost, -"mac": IsMAC, -"latitude": IsLatitude, -"longitude": IsLongitude, -"ssn": IsSSN, -"semver": IsSemver, -"rfc3339": IsRFC3339, -"rfc3339WithoutZone": IsRFC3339WithoutZone, -"ISO3166Alpha2": IsISO3166Alpha2, -"ISO3166Alpha3": IsISO3166Alpha3, -"ulid": IsULID, -``` -Validators with parameters - -```go -"range(min|max)": Range, -"length(min|max)": ByteLength, -"runelength(min|max)": RuneLength, -"stringlength(min|max)": StringLength, -"matches(pattern)": StringMatches, -"in(string1|string2|...|stringN)": IsIn, -"rsapub(keylength)" : IsRsaPub, -"minstringlength(int): MinStringLength, -"maxstringlength(int): MaxStringLength, -``` -Validators with parameters for any type - -```go -"type(type)": IsType, -``` - -And here is small example of usage: -```go -type Post struct { - Title string `valid:"alphanum,required"` - Message string `valid:"duck,ascii"` - Message2 string `valid:"animal(dog)"` - AuthorIP string `valid:"ipv4"` - Date string `valid:"-"` -} -post := &Post{ - Title: "My Example Post", - Message: "duck", - Message2: "dog", - AuthorIP: "123.234.54.3", -} - -// Add your own struct validation tags -govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { - return str == "duck" -}) - -// Add your own struct validation tags with parameter -govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool { - species := params[0] - return str == species -}) -govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$") - -result, err := govalidator.ValidateStruct(post) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` -###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338) -If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}` - -So here is small example of usage: -```go -var mapTemplate = map[string]interface{}{ - "name":"required,alpha", - "family":"required,alpha", - "email":"required,email", - "cell-phone":"numeric", - "address":map[string]interface{}{ - "line1":"required,alphanum", - "line2":"alphanum", - "postal-code":"numeric", - }, -} - -var inputMap = map[string]interface{}{ - "name":"Bob", - "family":"Smith", - "email":"foo@bar.baz", - "address":map[string]interface{}{ - "line1":"", - "line2":"", - "postal-code":"", - }, -} - -result, err := govalidator.ValidateMap(inputMap, mapTemplate) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` - -###### WhiteList -```go -// Remove all characters from string ignoring characters between "a" and "z" -println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa") -``` - -###### Custom validation functions -Custom validation using your own domain specific validators is also available - here's an example of how to use it: -```go -import "github.com/asaskevich/govalidator" - -type CustomByteArray [6]byte // custom types are supported and can be validated - -type StructWithCustomByteArray struct { - ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence - Email string `valid:"email"` - CustomMinLength int `valid:"-"` -} - -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool { - switch v := context.(type) { // you can type switch on the context interface being validated - case StructWithCustomByteArray: - // you can check and validate against some other field in the context, - // return early or not validate against the context at all – your choice - case SomeOtherType: - // ... - default: - // expecting some other type? Throw/panic here or continue - } - - switch v := i.(type) { // type switch on the struct field being validated - case CustomByteArray: - for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes - if e != 0 { - return true - } - } - } - return false -}) -govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool { - switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation - case StructWithCustomByteArray: - return len(v.ID) >= v.CustomMinLength - } - return false -}) -``` - -###### Loop over Error() -By default .Error() returns all errors in a single String. To access each error you can do this: -```go - if err != nil { - errs := err.(govalidator.Errors).Errors() - for _, e := range errs { - fmt.Println(e.Error()) - } - } -``` - -###### Custom error messages -Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it: -```go -type Ticket struct { - Id int64 `json:"id"` - FirstName string `json:"firstname" valid:"required~First name is blank"` -} -``` - -#### Notes -Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator). -Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator). - -#### Support -If you do have a contribution to the package, feel free to create a Pull Request or an Issue. - -#### What to contribute -If you don't know what to do, there are some features and functions that need to be done - -- [ ] Refactor code -- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check -- [ ] Create actual list of contributors and projects that currently using this package -- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) -- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) -- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new -- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) -- [ ] Implement fuzzing testing -- [ ] Implement some struct/map/array utilities -- [ ] Implement map/array validation -- [ ] Implement benchmarking -- [ ] Implement batch of examples -- [ ] Look at forks for new features and fixes - -#### Advice -Feel free to create what you want, but keep in mind when you implement new features: -- Code must be clear and readable, names of variables/constants clearly describes what they are doing -- Public functions must be documented and described in source file and added to README.md to the list of available functions -- There are must be unit-tests for any new functions and improvements - -## Credits -### Contributors - -This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. - -#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors) -* [Daniel Lohse](https://github.com/annismckenzie) -* [Attila Oláh](https://github.com/attilaolah) -* [Daniel Korner](https://github.com/Dadie) -* [Steven Wilkin](https://github.com/stevenwilkin) -* [Deiwin Sarjas](https://github.com/deiwin) -* [Noah Shibley](https://github.com/slugmobile) -* [Nathan Davies](https://github.com/nathj07) -* [Matt Sanford](https://github.com/mzsanford) -* [Simon ccl1115](https://github.com/ccl1115) - - - - -### Backers - -Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)] - - - - -### Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)] - - - - - - - - - - - - - - - -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) diff --git a/vendor/github.com/asaskevich/govalidator/arrays.go b/vendor/github.com/asaskevich/govalidator/arrays.go deleted file mode 100644 index 3e1da7cb480..00000000000 --- a/vendor/github.com/asaskevich/govalidator/arrays.go +++ /dev/null @@ -1,87 +0,0 @@ -package govalidator - -// Iterator is the function that accepts element of slice/array and its index -type Iterator func(interface{}, int) - -// ResultIterator is the function that accepts element of slice/array and its index and returns any result -type ResultIterator func(interface{}, int) interface{} - -// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean -type ConditionIterator func(interface{}, int) bool - -// ReduceIterator is the function that accepts two element of slice/array and returns result of merging those values -type ReduceIterator func(interface{}, interface{}) interface{} - -// Some validates that any item of array corresponds to ConditionIterator. Returns boolean. -func Some(array []interface{}, iterator ConditionIterator) bool { - res := false - for index, data := range array { - res = res || iterator(data, index) - } - return res -} - -// Every validates that every item of array corresponds to ConditionIterator. Returns boolean. -func Every(array []interface{}, iterator ConditionIterator) bool { - res := true - for index, data := range array { - res = res && iterator(data, index) - } - return res -} - -// Reduce boils down a list of values into a single value by ReduceIterator -func Reduce(array []interface{}, iterator ReduceIterator, initialValue interface{}) interface{} { - for _, data := range array { - initialValue = iterator(initialValue, data) - } - return initialValue -} - -// Each iterates over the slice and apply Iterator to every item -func Each(array []interface{}, iterator Iterator) { - for index, data := range array { - iterator(data, index) - } -} - -// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result. -func Map(array []interface{}, iterator ResultIterator) []interface{} { - var result = make([]interface{}, len(array)) - for index, data := range array { - result[index] = iterator(data, index) - } - return result -} - -// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise. -func Find(array []interface{}, iterator ConditionIterator) interface{} { - for index, data := range array { - if iterator(data, index) { - return data - } - } - return nil -} - -// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice. -func Filter(array []interface{}, iterator ConditionIterator) []interface{} { - var result = make([]interface{}, 0) - for index, data := range array { - if iterator(data, index) { - result = append(result, data) - } - } - return result -} - -// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator. -func Count(array []interface{}, iterator ConditionIterator) int { - count := 0 - for index, data := range array { - if iterator(data, index) { - count = count + 1 - } - } - return count -} diff --git a/vendor/github.com/asaskevich/govalidator/converter.go b/vendor/github.com/asaskevich/govalidator/converter.go deleted file mode 100644 index d68e990fc25..00000000000 --- a/vendor/github.com/asaskevich/govalidator/converter.go +++ /dev/null @@ -1,81 +0,0 @@ -package govalidator - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" -) - -// ToString convert the input to a string. -func ToString(obj interface{}) string { - res := fmt.Sprintf("%v", obj) - return res -} - -// ToJSON convert the input to a valid JSON string -func ToJSON(obj interface{}) (string, error) { - res, err := json.Marshal(obj) - if err != nil { - res = []byte("") - } - return string(res), err -} - -// ToFloat convert the input string to a float, or 0.0 if the input is not a float. -func ToFloat(value interface{}) (res float64, err error) { - val := reflect.ValueOf(value) - - switch value.(type) { - case int, int8, int16, int32, int64: - res = float64(val.Int()) - case uint, uint8, uint16, uint32, uint64: - res = float64(val.Uint()) - case float32, float64: - res = val.Float() - case string: - res, err = strconv.ParseFloat(val.String(), 64) - if err != nil { - res = 0 - } - default: - err = fmt.Errorf("ToInt: unknown interface type %T", value) - res = 0 - } - - return -} - -// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer. -func ToInt(value interface{}) (res int64, err error) { - val := reflect.ValueOf(value) - - switch value.(type) { - case int, int8, int16, int32, int64: - res = val.Int() - case uint, uint8, uint16, uint32, uint64: - res = int64(val.Uint()) - case float32, float64: - res = int64(val.Float()) - case string: - if IsInt(val.String()) { - res, err = strconv.ParseInt(val.String(), 0, 64) - if err != nil { - res = 0 - } - } else { - err = fmt.Errorf("ToInt: invalid numeric format %g", value) - res = 0 - } - default: - err = fmt.Errorf("ToInt: unknown interface type %T", value) - res = 0 - } - - return -} - -// ToBoolean convert the input string to a boolean. -func ToBoolean(str string) (bool, error) { - return strconv.ParseBool(str) -} diff --git a/vendor/github.com/asaskevich/govalidator/doc.go b/vendor/github.com/asaskevich/govalidator/doc.go deleted file mode 100644 index 55dce62dc8c..00000000000 --- a/vendor/github.com/asaskevich/govalidator/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -package govalidator - -// A package of validators and sanitizers for strings, structures and collections. diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go deleted file mode 100644 index 1da2336f47e..00000000000 --- a/vendor/github.com/asaskevich/govalidator/error.go +++ /dev/null @@ -1,47 +0,0 @@ -package govalidator - -import ( - "sort" - "strings" -) - -// Errors is an array of multiple errors and conforms to the error interface. -type Errors []error - -// Errors returns itself. -func (es Errors) Errors() []error { - return es -} - -func (es Errors) Error() string { - var errs []string - for _, e := range es { - errs = append(errs, e.Error()) - } - sort.Strings(errs) - return strings.Join(errs, ";") -} - -// Error encapsulates a name, an error and whether there's a custom error message or not. -type Error struct { - Name string - Err error - CustomErrorMessageExists bool - - // Validator indicates the name of the validator that failed - Validator string - Path []string -} - -func (e Error) Error() string { - if e.CustomErrorMessageExists { - return e.Err.Error() - } - - errName := e.Name - if len(e.Path) > 0 { - errName = strings.Join(append(e.Path, e.Name), ".") - } - - return errName + ": " + e.Err.Error() -} diff --git a/vendor/github.com/asaskevich/govalidator/numerics.go b/vendor/github.com/asaskevich/govalidator/numerics.go deleted file mode 100644 index 5041d9e8684..00000000000 --- a/vendor/github.com/asaskevich/govalidator/numerics.go +++ /dev/null @@ -1,100 +0,0 @@ -package govalidator - -import ( - "math" -) - -// Abs returns absolute value of number -func Abs(value float64) float64 { - return math.Abs(value) -} - -// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise -func Sign(value float64) float64 { - if value > 0 { - return 1 - } else if value < 0 { - return -1 - } else { - return 0 - } -} - -// IsNegative returns true if value < 0 -func IsNegative(value float64) bool { - return value < 0 -} - -// IsPositive returns true if value > 0 -func IsPositive(value float64) bool { - return value > 0 -} - -// IsNonNegative returns true if value >= 0 -func IsNonNegative(value float64) bool { - return value >= 0 -} - -// IsNonPositive returns true if value <= 0 -func IsNonPositive(value float64) bool { - return value <= 0 -} - -// InRangeInt returns true if value lies between left and right border -func InRangeInt(value, left, right interface{}) bool { - value64, _ := ToInt(value) - left64, _ := ToInt(left) - right64, _ := ToInt(right) - if left64 > right64 { - left64, right64 = right64, left64 - } - return value64 >= left64 && value64 <= right64 -} - -// InRangeFloat32 returns true if value lies between left and right border -func InRangeFloat32(value, left, right float32) bool { - if left > right { - left, right = right, left - } - return value >= left && value <= right -} - -// InRangeFloat64 returns true if value lies between left and right border -func InRangeFloat64(value, left, right float64) bool { - if left > right { - left, right = right, left - } - return value >= left && value <= right -} - -// InRange returns true if value lies between left and right border, generic type to handle int, float32, float64 and string. -// All types must the same type. -// False if value doesn't lie in range or if it incompatible or not comparable -func InRange(value interface{}, left interface{}, right interface{}) bool { - switch value.(type) { - case int: - intValue, _ := ToInt(value) - intLeft, _ := ToInt(left) - intRight, _ := ToInt(right) - return InRangeInt(intValue, intLeft, intRight) - case float32, float64: - intValue, _ := ToFloat(value) - intLeft, _ := ToFloat(left) - intRight, _ := ToFloat(right) - return InRangeFloat64(intValue, intLeft, intRight) - case string: - return value.(string) >= left.(string) && value.(string) <= right.(string) - default: - return false - } -} - -// IsWhole returns true if value is whole number -func IsWhole(value float64) bool { - return math.Remainder(value, 1) == 0 -} - -// IsNatural returns true if value is natural number (positive and whole) -func IsNatural(value float64) bool { - return IsWhole(value) && IsPositive(value) -} diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go deleted file mode 100644 index bafc3765ea1..00000000000 --- a/vendor/github.com/asaskevich/govalidator/patterns.go +++ /dev/null @@ -1,113 +0,0 @@ -package govalidator - -import "regexp" - -// Basic regular expressions for validating strings -const ( - Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" - CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" - ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" - ISBN13 string = "^(?:[0-9]{13})$" - UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" - UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" - Alpha string = "^[a-zA-Z]+$" - Alphanumeric string = "^[a-zA-Z0-9]+$" - Numeric string = "^[0-9]+$" - Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" - Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" - Hexadecimal string = "^[0-9a-fA-F]+$" - Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" - ASCII string = "^[\x00-\x7F]+$" - Multibyte string = "[^\x00-\x7F]" - FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" - PrintableASCII string = "^[\x20-\x7E]+$" - DataURI string = "^data:.+\\/(.+);base64$" - MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$" - Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" - Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" - DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` - IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` - URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` - URLUsername string = `(\S+(:\S*)?@)` - URLPath string = `((\/|\?|#)[^\s]*)` - URLPort string = `(:(\d{1,5}))` - URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` - URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` - URL = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` - SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` - WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixPath string = `^(/[^/\x00]*)+/?$` - WinARPath string = `^(?:(?:[a-zA-Z]:|\\\\[a-z0-9_.$●-]+\\[a-z0-9_.$●-]+)\\|\\?[^\\/:*?"<>|\r\n]+\\?)(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixARPath string = `^((\.{0,2}/)?([^/\x00]*))+/?$` - Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" - tagName string = "valid" - hasLowerCase string = ".*[[:lower:]]" - hasUpperCase string = ".*[[:upper:]]" - hasWhitespace string = ".*[[:space:]]" - hasWhitespaceOnly string = "^[[:space:]]+$" - IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$" - IMSI string = "^\\d{14,15}$" - E164 string = `^\+?[1-9]\d{1,14}$` -) - -// Used by IsFilePath func -const ( - // Unknown is unresolved OS type - Unknown = iota - // Win is Windows type - Win - // Unix is *nix OS types - Unix -) - -var ( - userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") - hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") - userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") - rxEmail = regexp.MustCompile(Email) - rxCreditCard = regexp.MustCompile(CreditCard) - rxISBN10 = regexp.MustCompile(ISBN10) - rxISBN13 = regexp.MustCompile(ISBN13) - rxUUID3 = regexp.MustCompile(UUID3) - rxUUID4 = regexp.MustCompile(UUID4) - rxUUID5 = regexp.MustCompile(UUID5) - rxUUID = regexp.MustCompile(UUID) - rxAlpha = regexp.MustCompile(Alpha) - rxAlphanumeric = regexp.MustCompile(Alphanumeric) - rxNumeric = regexp.MustCompile(Numeric) - rxInt = regexp.MustCompile(Int) - rxFloat = regexp.MustCompile(Float) - rxHexadecimal = regexp.MustCompile(Hexadecimal) - rxHexcolor = regexp.MustCompile(Hexcolor) - rxRGBcolor = regexp.MustCompile(RGBcolor) - rxASCII = regexp.MustCompile(ASCII) - rxPrintableASCII = regexp.MustCompile(PrintableASCII) - rxMultibyte = regexp.MustCompile(Multibyte) - rxFullWidth = regexp.MustCompile(FullWidth) - rxHalfWidth = regexp.MustCompile(HalfWidth) - rxBase64 = regexp.MustCompile(Base64) - rxDataURI = regexp.MustCompile(DataURI) - rxMagnetURI = regexp.MustCompile(MagnetURI) - rxLatitude = regexp.MustCompile(Latitude) - rxLongitude = regexp.MustCompile(Longitude) - rxDNSName = regexp.MustCompile(DNSName) - rxURL = regexp.MustCompile(URL) - rxSSN = regexp.MustCompile(SSN) - rxWinPath = regexp.MustCompile(WinPath) - rxUnixPath = regexp.MustCompile(UnixPath) - rxARWinPath = regexp.MustCompile(WinARPath) - rxARUnixPath = regexp.MustCompile(UnixARPath) - rxSemver = regexp.MustCompile(Semver) - rxHasLowerCase = regexp.MustCompile(hasLowerCase) - rxHasUpperCase = regexp.MustCompile(hasUpperCase) - rxHasWhitespace = regexp.MustCompile(hasWhitespace) - rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) - rxIMEI = regexp.MustCompile(IMEI) - rxIMSI = regexp.MustCompile(IMSI) - rxE164 = regexp.MustCompile(E164) -) diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go deleted file mode 100644 index c573abb51af..00000000000 --- a/vendor/github.com/asaskevich/govalidator/types.go +++ /dev/null @@ -1,656 +0,0 @@ -package govalidator - -import ( - "reflect" - "regexp" - "sort" - "sync" -) - -// Validator is a wrapper for a validator function that returns bool and accepts string. -type Validator func(str string) bool - -// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type. -// The second parameter should be the context (in the case of validating a struct: the whole object being validated). -type CustomTypeValidator func(i interface{}, o interface{}) bool - -// ParamValidator is a wrapper for validator functions that accept additional parameters. -type ParamValidator func(str string, params ...string) bool - -// InterfaceParamValidator is a wrapper for functions that accept variants parameters for an interface value -type InterfaceParamValidator func(in interface{}, params ...string) bool -type tagOptionsMap map[string]tagOption - -func (t tagOptionsMap) orderedKeys() []string { - var keys []string - for k := range t { - keys = append(keys, k) - } - - sort.Slice(keys, func(a, b int) bool { - return t[keys[a]].order < t[keys[b]].order - }) - - return keys -} - -type tagOption struct { - name string - customErrorMessage string - order int -} - -// UnsupportedTypeError is a wrapper for reflect.Type -type UnsupportedTypeError struct { - Type reflect.Type -} - -// stringValues is a slice of reflect.Value holding *reflect.StringValue. -// It implements the methods to sort by string. -type stringValues []reflect.Value - -// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value -var InterfaceParamTagMap = map[string]InterfaceParamValidator{ - "type": IsType, -} - -// InterfaceParamTagRegexMap maps interface param tags to their respective regexes. -var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{ - "type": regexp.MustCompile(`^type\((.*)\)$`), -} - -// ParamTagMap is a map of functions accept variants parameters -var ParamTagMap = map[string]ParamValidator{ - "length": ByteLength, - "range": Range, - "runelength": RuneLength, - "stringlength": StringLength, - "matches": StringMatches, - "in": IsInRaw, - "rsapub": IsRsaPub, - "minstringlength": MinStringLength, - "maxstringlength": MaxStringLength, -} - -// ParamTagRegexMap maps param tags to their respective regexes. -var ParamTagRegexMap = map[string]*regexp.Regexp{ - "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"), - "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"), - "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"), - "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"), - "in": regexp.MustCompile(`^in\((.*)\)`), - "matches": regexp.MustCompile(`^matches\((.+)\)$`), - "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"), - "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"), - "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"), -} - -type customTypeTagMap struct { - validators map[string]CustomTypeValidator - - sync.RWMutex -} - -func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) { - tm.RLock() - defer tm.RUnlock() - v, ok := tm.validators[name] - return v, ok -} - -func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) { - tm.Lock() - defer tm.Unlock() - tm.validators[name] = ctv -} - -// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function. -// Use this to validate compound or custom types that need to be handled as a whole, e.g. -// `type UUID [16]byte` (this would be handled as an array of bytes). -var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)} - -// TagMap is a map of functions, that can be used as tags for ValidateStruct function. -var TagMap = map[string]Validator{ - "email": IsEmail, - "url": IsURL, - "dialstring": IsDialString, - "requrl": IsRequestURL, - "requri": IsRequestURI, - "alpha": IsAlpha, - "utfletter": IsUTFLetter, - "alphanum": IsAlphanumeric, - "utfletternum": IsUTFLetterNumeric, - "numeric": IsNumeric, - "utfnumeric": IsUTFNumeric, - "utfdigit": IsUTFDigit, - "hexadecimal": IsHexadecimal, - "hexcolor": IsHexcolor, - "rgbcolor": IsRGBcolor, - "lowercase": IsLowerCase, - "uppercase": IsUpperCase, - "int": IsInt, - "float": IsFloat, - "null": IsNull, - "notnull": IsNotNull, - "uuid": IsUUID, - "uuidv3": IsUUIDv3, - "uuidv4": IsUUIDv4, - "uuidv5": IsUUIDv5, - "creditcard": IsCreditCard, - "isbn10": IsISBN10, - "isbn13": IsISBN13, - "json": IsJSON, - "multibyte": IsMultibyte, - "ascii": IsASCII, - "printableascii": IsPrintableASCII, - "fullwidth": IsFullWidth, - "halfwidth": IsHalfWidth, - "variablewidth": IsVariableWidth, - "base64": IsBase64, - "datauri": IsDataURI, - "ip": IsIP, - "port": IsPort, - "ipv4": IsIPv4, - "ipv6": IsIPv6, - "dns": IsDNSName, - "host": IsHost, - "mac": IsMAC, - "latitude": IsLatitude, - "longitude": IsLongitude, - "ssn": IsSSN, - "semver": IsSemver, - "rfc3339": IsRFC3339, - "rfc3339WithoutZone": IsRFC3339WithoutZone, - "ISO3166Alpha2": IsISO3166Alpha2, - "ISO3166Alpha3": IsISO3166Alpha3, - "ISO4217": IsISO4217, - "IMEI": IsIMEI, - "ulid": IsULID, -} - -// ISO3166Entry stores country codes -type ISO3166Entry struct { - EnglishShortName string - FrenchShortName string - Alpha2Code string - Alpha3Code string - Numeric string -} - -//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" -var ISO3166List = []ISO3166Entry{ - {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"}, - {"Albania", "Albanie (l')", "AL", "ALB", "008"}, - {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"}, - {"Algeria", "Algérie (l')", "DZ", "DZA", "012"}, - {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"}, - {"Andorra", "Andorre (l')", "AD", "AND", "020"}, - {"Angola", "Angola (l')", "AO", "AGO", "024"}, - {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"}, - {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"}, - {"Argentina", "Argentine (l')", "AR", "ARG", "032"}, - {"Australia", "Australie (l')", "AU", "AUS", "036"}, - {"Austria", "Autriche (l')", "AT", "AUT", "040"}, - {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"}, - {"Bahrain", "Bahreïn", "BH", "BHR", "048"}, - {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"}, - {"Armenia", "Arménie (l')", "AM", "ARM", "051"}, - {"Barbados", "Barbade (la)", "BB", "BRB", "052"}, - {"Belgium", "Belgique (la)", "BE", "BEL", "056"}, - {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"}, - {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"}, - {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"}, - {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"}, - {"Botswana", "Botswana (le)", "BW", "BWA", "072"}, - {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"}, - {"Brazil", "Brésil (le)", "BR", "BRA", "076"}, - {"Belize", "Belize (le)", "BZ", "BLZ", "084"}, - {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"}, - {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"}, - {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"}, - {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"}, - {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"}, - {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"}, - {"Burundi", "Burundi (le)", "BI", "BDI", "108"}, - {"Belarus", "Bélarus (le)", "BY", "BLR", "112"}, - {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"}, - {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"}, - {"Canada", "Canada (le)", "CA", "CAN", "124"}, - {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"}, - {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"}, - {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"}, - {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"}, - {"Chad", "Tchad (le)", "TD", "TCD", "148"}, - {"Chile", "Chili (le)", "CL", "CHL", "152"}, - {"China", "Chine (la)", "CN", "CHN", "156"}, - {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"}, - {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"}, - {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"}, - {"Colombia", "Colombie (la)", "CO", "COL", "170"}, - {"Comoros (the)", "Comores (les)", "KM", "COM", "174"}, - {"Mayotte", "Mayotte", "YT", "MYT", "175"}, - {"Congo (the)", "Congo (le)", "CG", "COG", "178"}, - {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"}, - {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"}, - {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"}, - {"Croatia", "Croatie (la)", "HR", "HRV", "191"}, - {"Cuba", "Cuba", "CU", "CUB", "192"}, - {"Cyprus", "Chypre", "CY", "CYP", "196"}, - {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"}, - {"Benin", "Bénin (le)", "BJ", "BEN", "204"}, - {"Denmark", "Danemark (le)", "DK", "DNK", "208"}, - {"Dominica", "Dominique (la)", "DM", "DMA", "212"}, - {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"}, - {"Ecuador", "Équateur (l')", "EC", "ECU", "218"}, - {"El Salvador", "El Salvador", "SV", "SLV", "222"}, - {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"}, - {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"}, - {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"}, - {"Estonia", "Estonie (l')", "EE", "EST", "233"}, - {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"}, - {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"}, - {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"}, - {"Fiji", "Fidji (les)", "FJ", "FJI", "242"}, - {"Finland", "Finlande (la)", "FI", "FIN", "246"}, - {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"}, - {"France", "France (la)", "FR", "FRA", "250"}, - {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"}, - {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"}, - {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"}, - {"Djibouti", "Djibouti", "DJ", "DJI", "262"}, - {"Gabon", "Gabon (le)", "GA", "GAB", "266"}, - {"Georgia", "Géorgie (la)", "GE", "GEO", "268"}, - {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"}, - {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"}, - {"Germany", "Allemagne (l')", "DE", "DEU", "276"}, - {"Ghana", "Ghana (le)", "GH", "GHA", "288"}, - {"Gibraltar", "Gibraltar", "GI", "GIB", "292"}, - {"Kiribati", "Kiribati", "KI", "KIR", "296"}, - {"Greece", "Grèce (la)", "GR", "GRC", "300"}, - {"Greenland", "Groenland (le)", "GL", "GRL", "304"}, - {"Grenada", "Grenade (la)", "GD", "GRD", "308"}, - {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"}, - {"Guam", "Guam", "GU", "GUM", "316"}, - {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"}, - {"Guinea", "Guinée (la)", "GN", "GIN", "324"}, - {"Guyana", "Guyana (le)", "GY", "GUY", "328"}, - {"Haiti", "Haïti", "HT", "HTI", "332"}, - {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"}, - {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"}, - {"Honduras", "Honduras (le)", "HN", "HND", "340"}, - {"Hong Kong", "Hong Kong", "HK", "HKG", "344"}, - {"Hungary", "Hongrie (la)", "HU", "HUN", "348"}, - {"Iceland", "Islande (l')", "IS", "ISL", "352"}, - {"India", "Inde (l')", "IN", "IND", "356"}, - {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"}, - {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"}, - {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"}, - {"Ireland", "Irlande (l')", "IE", "IRL", "372"}, - {"Israel", "Israël", "IL", "ISR", "376"}, - {"Italy", "Italie (l')", "IT", "ITA", "380"}, - {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"}, - {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"}, - {"Japan", "Japon (le)", "JP", "JPN", "392"}, - {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"}, - {"Jordan", "Jordanie (la)", "JO", "JOR", "400"}, - {"Kenya", "Kenya (le)", "KE", "KEN", "404"}, - {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"}, - {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"}, - {"Kuwait", "Koweït (le)", "KW", "KWT", "414"}, - {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"}, - {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"}, - {"Lebanon", "Liban (le)", "LB", "LBN", "422"}, - {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"}, - {"Latvia", "Lettonie (la)", "LV", "LVA", "428"}, - {"Liberia", "Libéria (le)", "LR", "LBR", "430"}, - {"Libya", "Libye (la)", "LY", "LBY", "434"}, - {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"}, - {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"}, - {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"}, - {"Macao", "Macao", "MO", "MAC", "446"}, - {"Madagascar", "Madagascar", "MG", "MDG", "450"}, - {"Malawi", "Malawi (le)", "MW", "MWI", "454"}, - {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"}, - {"Maldives", "Maldives (les)", "MV", "MDV", "462"}, - {"Mali", "Mali (le)", "ML", "MLI", "466"}, - {"Malta", "Malte", "MT", "MLT", "470"}, - {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"}, - {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"}, - {"Mauritius", "Maurice", "MU", "MUS", "480"}, - {"Mexico", "Mexique (le)", "MX", "MEX", "484"}, - {"Monaco", "Monaco", "MC", "MCO", "492"}, - {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"}, - {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"}, - {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"}, - {"Montserrat", "Montserrat", "MS", "MSR", "500"}, - {"Morocco", "Maroc (le)", "MA", "MAR", "504"}, - {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"}, - {"Oman", "Oman", "OM", "OMN", "512"}, - {"Namibia", "Namibie (la)", "NA", "NAM", "516"}, - {"Nauru", "Nauru", "NR", "NRU", "520"}, - {"Nepal", "Népal (le)", "NP", "NPL", "524"}, - {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"}, - {"Curaçao", "Curaçao", "CW", "CUW", "531"}, - {"Aruba", "Aruba", "AW", "ABW", "533"}, - {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"}, - {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"}, - {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"}, - {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"}, - {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"}, - {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"}, - {"Niger (the)", "Niger (le)", "NE", "NER", "562"}, - {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"}, - {"Niue", "Niue", "NU", "NIU", "570"}, - {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"}, - {"Norway", "Norvège (la)", "NO", "NOR", "578"}, - {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"}, - {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"}, - {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"}, - {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"}, - {"Palau", "Palaos (les)", "PW", "PLW", "585"}, - {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"}, - {"Panama", "Panama (le)", "PA", "PAN", "591"}, - {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"}, - {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"}, - {"Peru", "Pérou (le)", "PE", "PER", "604"}, - {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"}, - {"Pitcairn", "Pitcairn", "PN", "PCN", "612"}, - {"Poland", "Pologne (la)", "PL", "POL", "616"}, - {"Portugal", "Portugal (le)", "PT", "PRT", "620"}, - {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"}, - {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"}, - {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"}, - {"Qatar", "Qatar (le)", "QA", "QAT", "634"}, - {"Réunion", "Réunion (La)", "RE", "REU", "638"}, - {"Romania", "Roumanie (la)", "RO", "ROU", "642"}, - {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"}, - {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"}, - {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"}, - {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"}, - {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"}, - {"Anguilla", "Anguilla", "AI", "AIA", "660"}, - {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"}, - {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"}, - {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"}, - {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"}, - {"San Marino", "Saint-Marin", "SM", "SMR", "674"}, - {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"}, - {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"}, - {"Senegal", "Sénégal (le)", "SN", "SEN", "686"}, - {"Serbia", "Serbie (la)", "RS", "SRB", "688"}, - {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"}, - {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"}, - {"Singapore", "Singapour", "SG", "SGP", "702"}, - {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"}, - {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"}, - {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"}, - {"Somalia", "Somalie (la)", "SO", "SOM", "706"}, - {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"}, - {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"}, - {"Spain", "Espagne (l')", "ES", "ESP", "724"}, - {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"}, - {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"}, - {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"}, - {"Suriname", "Suriname (le)", "SR", "SUR", "740"}, - {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"}, - {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"}, - {"Sweden", "Suède (la)", "SE", "SWE", "752"}, - {"Switzerland", "Suisse (la)", "CH", "CHE", "756"}, - {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"}, - {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"}, - {"Thailand", "Thaïlande (la)", "TH", "THA", "764"}, - {"Togo", "Togo (le)", "TG", "TGO", "768"}, - {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"}, - {"Tonga", "Tonga (les)", "TO", "TON", "776"}, - {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"}, - {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"}, - {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"}, - {"Turkey", "Turquie (la)", "TR", "TUR", "792"}, - {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"}, - {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"}, - {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"}, - {"Uganda", "Ouganda (l')", "UG", "UGA", "800"}, - {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"}, - {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"}, - {"Egypt", "Égypte (l')", "EG", "EGY", "818"}, - {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"}, - {"Guernsey", "Guernesey", "GG", "GGY", "831"}, - {"Jersey", "Jersey", "JE", "JEY", "832"}, - {"Isle of Man", "Île de Man", "IM", "IMN", "833"}, - {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"}, - {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"}, - {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"}, - {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"}, - {"Uruguay", "Uruguay (l')", "UY", "URY", "858"}, - {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"}, - {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"}, - {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"}, - {"Samoa", "Samoa (le)", "WS", "WSM", "882"}, - {"Yemen", "Yémen (le)", "YE", "YEM", "887"}, - {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"}, -} - -// ISO4217List is the list of ISO currency codes -var ISO4217List = []string{ - "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", - "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", - "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", - "DJF", "DKK", "DOP", "DZD", - "EGP", "ERN", "ETB", "EUR", - "FJD", "FKP", - "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", - "HKD", "HNL", "HRK", "HTG", "HUF", - "IDR", "ILS", "INR", "IQD", "IRR", "ISK", - "JMD", "JOD", "JPY", - "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", - "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", - "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", - "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", - "OMR", - "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", - "QAR", - "RON", "RSD", "RUB", "RWF", - "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "STN", "SVC", "SYP", "SZL", - "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", - "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", - "VEF", "VES", "VND", "VUV", - "WST", - "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", - "YER", - "ZAR", "ZMW", "ZWL", -} - -// ISO693Entry stores ISO language codes -type ISO693Entry struct { - Alpha3bCode string - Alpha2Code string - English string -} - -//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json -var ISO693List = []ISO693Entry{ - {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"}, - {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"}, - {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"}, - {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"}, - {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"}, - {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"}, - {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"}, - {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"}, - {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"}, - {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"}, - {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"}, - {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"}, - {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"}, - {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"}, - {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"}, - {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"}, - {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"}, - {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"}, - {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"}, - {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"}, - {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"}, - {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"}, - {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"}, - {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"}, - {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"}, - {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"}, - {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"}, - {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"}, - {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"}, - {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"}, - {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"}, - {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"}, - {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"}, - {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"}, - {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"}, - {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"}, - {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"}, - {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"}, - {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"}, - {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"}, - {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"}, - {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"}, - {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"}, - {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"}, - {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"}, - {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"}, - {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"}, - {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"}, - {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"}, - {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"}, - {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"}, - {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"}, - {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"}, - {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"}, - {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"}, - {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"}, - {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"}, - {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"}, - {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"}, - {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"}, - {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"}, - {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"}, - {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"}, - {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"}, - {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"}, - {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"}, - {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"}, - {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"}, - {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"}, - {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"}, - {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"}, - {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"}, - {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"}, - {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"}, - {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"}, - {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"}, - {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"}, - {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"}, - {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"}, - {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"}, - {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"}, - {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"}, - {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"}, - {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"}, - {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"}, - {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"}, - {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"}, - {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"}, - {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"}, - {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"}, - {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"}, - {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"}, - {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"}, - {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"}, - {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"}, - {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"}, - {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"}, - {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"}, - {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"}, - {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"}, - {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"}, - {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"}, - {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"}, - {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"}, - {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"}, - {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"}, - {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"}, - {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"}, - {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"}, - {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"}, - {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"}, - {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"}, - {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"}, - {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"}, - {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"}, - {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"}, - {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"}, - {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"}, - {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"}, - {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"}, - {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"}, - {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"}, - {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"}, - {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"}, - {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"}, - {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"}, - {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"}, - {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"}, - {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"}, - {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"}, - {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"}, - {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"}, - {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"}, - {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"}, - {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"}, - {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"}, - {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"}, - {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"}, - {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"}, - {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"}, - {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"}, - {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"}, - {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"}, - {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"}, - {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"}, - {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"}, - {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"}, - {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"}, - {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"}, - {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"}, - {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"}, - {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"}, - {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"}, - {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"}, - {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"}, - {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"}, - {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"}, - {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"}, - {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"}, - {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"}, - {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"}, - {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"}, - {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"}, - {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"}, - {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"}, - {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"}, - {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"}, - {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"}, - {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"}, - {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"}, - {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"}, - {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"}, - {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"}, - {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"}, - {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"}, - {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"}, - {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"}, - {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"}, - {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"}, - {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"}, - {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"}, - {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"}, - {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"}, - {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"}, -} diff --git a/vendor/github.com/asaskevich/govalidator/utils.go b/vendor/github.com/asaskevich/govalidator/utils.go deleted file mode 100644 index f4c30f824a2..00000000000 --- a/vendor/github.com/asaskevich/govalidator/utils.go +++ /dev/null @@ -1,270 +0,0 @@ -package govalidator - -import ( - "errors" - "fmt" - "html" - "math" - "path" - "regexp" - "strings" - "unicode" - "unicode/utf8" -) - -// Contains checks if the string contains the substring. -func Contains(str, substring string) bool { - return strings.Contains(str, substring) -} - -// Matches checks if string matches the pattern (pattern is regular expression) -// In case of error return false -func Matches(str, pattern string) bool { - match, _ := regexp.MatchString(pattern, str) - return match -} - -// LeftTrim trims characters from the left side of the input. -// If second argument is empty, it will remove leading spaces. -func LeftTrim(str, chars string) string { - if chars == "" { - return strings.TrimLeftFunc(str, unicode.IsSpace) - } - r, _ := regexp.Compile("^[" + chars + "]+") - return r.ReplaceAllString(str, "") -} - -// RightTrim trims characters from the right side of the input. -// If second argument is empty, it will remove trailing spaces. -func RightTrim(str, chars string) string { - if chars == "" { - return strings.TrimRightFunc(str, unicode.IsSpace) - } - r, _ := regexp.Compile("[" + chars + "]+$") - return r.ReplaceAllString(str, "") -} - -// Trim trims characters from both sides of the input. -// If second argument is empty, it will remove spaces. -func Trim(str, chars string) string { - return LeftTrim(RightTrim(str, chars), chars) -} - -// WhiteList removes characters that do not appear in the whitelist. -func WhiteList(str, chars string) string { - pattern := "[^" + chars + "]+" - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, "") -} - -// BlackList removes characters that appear in the blacklist. -func BlackList(str, chars string) string { - pattern := "[" + chars + "]+" - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, "") -} - -// StripLow removes characters with a numerical value < 32 and 127, mostly control characters. -// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD). -func StripLow(str string, keepNewLines bool) string { - chars := "" - if keepNewLines { - chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F" - } else { - chars = "\x00-\x1F\x7F" - } - return BlackList(str, chars) -} - -// ReplacePattern replaces regular expression pattern in string -func ReplacePattern(str, pattern, replace string) string { - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, replace) -} - -// Escape replaces <, >, & and " with HTML entities. -var Escape = html.EscapeString - -func addSegment(inrune, segment []rune) []rune { - if len(segment) == 0 { - return inrune - } - if len(inrune) != 0 { - inrune = append(inrune, '_') - } - inrune = append(inrune, segment...) - return inrune -} - -// UnderscoreToCamelCase converts from underscore separated form to camel case form. -// Ex.: my_func => MyFunc -func UnderscoreToCamelCase(s string) string { - return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1) -} - -// CamelCaseToUnderscore converts from camel case form to underscore separated form. -// Ex.: MyFunc => my_func -func CamelCaseToUnderscore(str string) string { - var output []rune - var segment []rune - for _, r := range str { - - // not treat number as separate segment - if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) { - output = addSegment(output, segment) - segment = nil - } - segment = append(segment, unicode.ToLower(r)) - } - output = addSegment(output, segment) - return string(output) -} - -// Reverse returns reversed string -func Reverse(s string) string { - r := []rune(s) - for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { - r[i], r[j] = r[j], r[i] - } - return string(r) -} - -// GetLines splits string by "\n" and return array of lines -func GetLines(s string) []string { - return strings.Split(s, "\n") -} - -// GetLine returns specified line of multiline string -func GetLine(s string, index int) (string, error) { - lines := GetLines(s) - if index < 0 || index >= len(lines) { - return "", errors.New("line index out of bounds") - } - return lines[index], nil -} - -// RemoveTags removes all tags from HTML string -func RemoveTags(s string) string { - return ReplacePattern(s, "<[^>]*>", "") -} - -// SafeFileName returns safe string that can be used in file names -func SafeFileName(str string) string { - name := strings.ToLower(str) - name = path.Clean(path.Base(name)) - name = strings.Trim(name, " ") - separators, err := regexp.Compile(`[ &_=+:]`) - if err == nil { - name = separators.ReplaceAllString(name, "-") - } - legal, err := regexp.Compile(`[^[:alnum:]-.]`) - if err == nil { - name = legal.ReplaceAllString(name, "") - } - for strings.Contains(name, "--") { - name = strings.Replace(name, "--", "-", -1) - } - return name -} - -// NormalizeEmail canonicalize an email address. -// The local part of the email address is lowercased for all domains; the hostname is always lowercased and -// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). -// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and -// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are -// normalized to @gmail.com. -func NormalizeEmail(str string) (string, error) { - if !IsEmail(str) { - return "", fmt.Errorf("%s is not an email", str) - } - parts := strings.Split(str, "@") - parts[0] = strings.ToLower(parts[0]) - parts[1] = strings.ToLower(parts[1]) - if parts[1] == "gmail.com" || parts[1] == "googlemail.com" { - parts[1] = "gmail.com" - parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0] - } - return strings.Join(parts, "@"), nil -} - -// Truncate a string to the closest length without breaking words. -func Truncate(str string, length int, ending string) string { - var aftstr, befstr string - if len(str) > length { - words := strings.Fields(str) - before, present := 0, 0 - for i := range words { - befstr = aftstr - before = present - aftstr = aftstr + words[i] + " " - present = len(aftstr) - if present > length && i != 0 { - if (length - before) < (present - length) { - return Trim(befstr, " /\\.,\"'#!?&@+-") + ending - } - return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending - } - } - } - - return str -} - -// PadLeft pads left side of a string if size of string is less then indicated pad length -func PadLeft(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, true, false) -} - -// PadRight pads right side of a string if size of string is less then indicated pad length -func PadRight(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, false, true) -} - -// PadBoth pads both sides of a string if size of string is less then indicated pad length -func PadBoth(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, true, true) -} - -// PadString either left, right or both sides. -// Note that padding string can be unicode and more then one character -func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string { - - // When padded length is less then the current string size - if padLen < utf8.RuneCountInString(str) { - return str - } - - padLen -= utf8.RuneCountInString(str) - - targetLen := padLen - - targetLenLeft := targetLen - targetLenRight := targetLen - if padLeft && padRight { - targetLenLeft = padLen / 2 - targetLenRight = padLen - targetLenLeft - } - - strToRepeatLen := utf8.RuneCountInString(padStr) - - repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen))) - repeatedString := strings.Repeat(padStr, repeatTimes) - - leftSide := "" - if padLeft { - leftSide = repeatedString[0:targetLenLeft] - } - - rightSide := "" - if padRight { - rightSide = repeatedString[0:targetLenRight] - } - - return leftSide + str + rightSide -} - -// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object -func TruncatingErrorf(str string, args ...interface{}) error { - n := strings.Count(str, "%s") - return fmt.Errorf(str, args[:n]...) -} diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go deleted file mode 100644 index c9c4fac0655..00000000000 --- a/vendor/github.com/asaskevich/govalidator/validator.go +++ /dev/null @@ -1,1768 +0,0 @@ -// Package govalidator is package of validators and sanitizers for strings, structs and collections. -package govalidator - -import ( - "bytes" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "fmt" - "io/ioutil" - "net" - "net/url" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode" - "unicode/utf8" -) - -var ( - fieldsRequiredByDefault bool - nilPtrAllowedByRequired = false - notNumberRegexp = regexp.MustCompile("[^0-9]+") - whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`) - paramsRegexp = regexp.MustCompile(`\(.*\)$`) -) - -const maxURLRuneCount = 2083 -const minURLRuneCount = 3 -const rfc3339WithoutZone = "2006-01-02T15:04:05" - -// SetFieldsRequiredByDefault causes validation to fail when struct fields -// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). -// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -// type exampleStruct struct { -// Name string `` -// Email string `valid:"email"` -// This, however, will only fail when Email is empty or an invalid email address: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email"` -// Lastly, this will only fail when Email is an invalid email address but not when it's empty: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email,optional"` -func SetFieldsRequiredByDefault(value bool) { - fieldsRequiredByDefault = value -} - -// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required. -// The validation will still reject ptr fields in their zero value state. Example with this enabled: -// type exampleStruct struct { -// Name *string `valid:"required"` -// With `Name` set to "", this will be considered invalid input and will cause a validation error. -// With `Name` set to nil, this will be considered valid by validation. -// By default this is disabled. -func SetNilPtrAllowedByRequired(value bool) { - nilPtrAllowedByRequired = value -} - -// IsEmail checks if the string is an email. -func IsEmail(str string) bool { - // TODO uppercase letters are not supported - return rxEmail.MatchString(str) -} - -// IsExistingEmail checks if the string is an email of existing domain -func IsExistingEmail(email string) bool { - - if len(email) < 6 || len(email) > 254 { - return false - } - at := strings.LastIndex(email, "@") - if at <= 0 || at > len(email)-3 { - return false - } - user := email[:at] - host := email[at+1:] - if len(user) > 64 { - return false - } - switch host { - case "localhost", "example.com": - return true - } - if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) { - return false - } - if _, err := net.LookupMX(host); err != nil { - if _, err := net.LookupIP(host); err != nil { - return false - } - } - - return true -} - -// IsURL checks if the string is an URL. -func IsURL(str string) bool { - if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") { - return false - } - strTemp := str - if strings.Contains(str, ":") && !strings.Contains(str, "://") { - // support no indicated urlscheme but with colon for port number - // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString - strTemp = "http://" + str - } - u, err := url.Parse(strTemp) - if err != nil { - return false - } - if strings.HasPrefix(u.Host, ".") { - return false - } - if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) { - return false - } - return rxURL.MatchString(str) -} - -// IsRequestURL checks if the string rawurl, assuming -// it was received in an HTTP request, is a valid -// URL confirm to RFC 3986 -func IsRequestURL(rawurl string) bool { - url, err := url.ParseRequestURI(rawurl) - if err != nil { - return false //Couldn't even parse the rawurl - } - if len(url.Scheme) == 0 { - return false //No Scheme found - } - return true -} - -// IsRequestURI checks if the string rawurl, assuming -// it was received in an HTTP request, is an -// absolute URI or an absolute path. -func IsRequestURI(rawurl string) bool { - _, err := url.ParseRequestURI(rawurl) - return err == nil -} - -// IsAlpha checks if the string contains only letters (a-zA-Z). Empty string is valid. -func IsAlpha(str string) bool { - if IsNull(str) { - return true - } - return rxAlpha.MatchString(str) -} - -//IsUTFLetter checks if the string contains only unicode letter characters. -//Similar to IsAlpha but for all languages. Empty string is valid. -func IsUTFLetter(str string) bool { - if IsNull(str) { - return true - } - - for _, c := range str { - if !unicode.IsLetter(c) { - return false - } - } - return true - -} - -// IsAlphanumeric checks if the string contains only letters and numbers. Empty string is valid. -func IsAlphanumeric(str string) bool { - if IsNull(str) { - return true - } - return rxAlphanumeric.MatchString(str) -} - -// IsUTFLetterNumeric checks if the string contains only unicode letters and numbers. Empty string is valid. -func IsUTFLetterNumeric(str string) bool { - if IsNull(str) { - return true - } - for _, c := range str { - if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok - return false - } - } - return true - -} - -// IsNumeric checks if the string contains only numbers. Empty string is valid. -func IsNumeric(str string) bool { - if IsNull(str) { - return true - } - return rxNumeric.MatchString(str) -} - -// IsUTFNumeric checks if the string contains only unicode numbers of any kind. -// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid. -func IsUTFNumeric(str string) bool { - if IsNull(str) { - return true - } - if strings.IndexAny(str, "+-") > 0 { - return false - } - if len(str) > 1 { - str = strings.TrimPrefix(str, "-") - str = strings.TrimPrefix(str, "+") - } - for _, c := range str { - if !unicode.IsNumber(c) { //numbers && minus sign are ok - return false - } - } - return true - -} - -// IsUTFDigit checks if the string contains only unicode radix-10 decimal digits. Empty string is valid. -func IsUTFDigit(str string) bool { - if IsNull(str) { - return true - } - if strings.IndexAny(str, "+-") > 0 { - return false - } - if len(str) > 1 { - str = strings.TrimPrefix(str, "-") - str = strings.TrimPrefix(str, "+") - } - for _, c := range str { - if !unicode.IsDigit(c) { //digits && minus sign are ok - return false - } - } - return true - -} - -// IsHexadecimal checks if the string is a hexadecimal number. -func IsHexadecimal(str string) bool { - return rxHexadecimal.MatchString(str) -} - -// IsHexcolor checks if the string is a hexadecimal color. -func IsHexcolor(str string) bool { - return rxHexcolor.MatchString(str) -} - -// IsRGBcolor checks if the string is a valid RGB color in form rgb(RRR, GGG, BBB). -func IsRGBcolor(str string) bool { - return rxRGBcolor.MatchString(str) -} - -// IsLowerCase checks if the string is lowercase. Empty string is valid. -func IsLowerCase(str string) bool { - if IsNull(str) { - return true - } - return str == strings.ToLower(str) -} - -// IsUpperCase checks if the string is uppercase. Empty string is valid. -func IsUpperCase(str string) bool { - if IsNull(str) { - return true - } - return str == strings.ToUpper(str) -} - -// HasLowerCase checks if the string contains at least 1 lowercase. Empty string is valid. -func HasLowerCase(str string) bool { - if IsNull(str) { - return true - } - return rxHasLowerCase.MatchString(str) -} - -// HasUpperCase checks if the string contains as least 1 uppercase. Empty string is valid. -func HasUpperCase(str string) bool { - if IsNull(str) { - return true - } - return rxHasUpperCase.MatchString(str) -} - -// IsInt checks if the string is an integer. Empty string is valid. -func IsInt(str string) bool { - if IsNull(str) { - return true - } - return rxInt.MatchString(str) -} - -// IsFloat checks if the string is a float. -func IsFloat(str string) bool { - return str != "" && rxFloat.MatchString(str) -} - -// IsDivisibleBy checks if the string is a number that's divisible by another. -// If second argument is not valid integer or zero, it's return false. -// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero). -func IsDivisibleBy(str, num string) bool { - f, _ := ToFloat(str) - p := int64(f) - q, _ := ToInt(num) - if q == 0 { - return false - } - return (p == 0) || (p%q == 0) -} - -// IsNull checks if the string is null. -func IsNull(str string) bool { - return len(str) == 0 -} - -// IsNotNull checks if the string is not null. -func IsNotNull(str string) bool { - return !IsNull(str) -} - -// HasWhitespaceOnly checks the string only contains whitespace -func HasWhitespaceOnly(str string) bool { - return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) -} - -// HasWhitespace checks if the string contains any whitespace -func HasWhitespace(str string) bool { - return len(str) > 0 && rxHasWhitespace.MatchString(str) -} - -// IsByteLength checks if the string's length (in bytes) falls in a range. -func IsByteLength(str string, min, max int) bool { - return len(str) >= min && len(str) <= max -} - -// IsUUIDv3 checks if the string is a UUID version 3. -func IsUUIDv3(str string) bool { - return rxUUID3.MatchString(str) -} - -// IsUUIDv4 checks if the string is a UUID version 4. -func IsUUIDv4(str string) bool { - return rxUUID4.MatchString(str) -} - -// IsUUIDv5 checks if the string is a UUID version 5. -func IsUUIDv5(str string) bool { - return rxUUID5.MatchString(str) -} - -// IsUUID checks if the string is a UUID (version 3, 4 or 5). -func IsUUID(str string) bool { - return rxUUID.MatchString(str) -} - -// Byte to index table for O(1) lookups when unmarshaling. -// We use 0xFF as sentinel value for invalid indexes. -var ulidDec = [...]byte{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, - 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, - 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, 0x15, 0xFF, - 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, 0x1D, 0x1E, - 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, - 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, - 0x15, 0xFF, 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, - 0x1D, 0x1E, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -} - -// EncodedSize is the length of a text encoded ULID. -const ulidEncodedSize = 26 - -// IsULID checks if the string is a ULID. -// -// Implementation got from: -// https://github.com/oklog/ulid (Apache-2.0 License) -// -func IsULID(str string) bool { - // Check if a base32 encoded ULID is the right length. - if len(str) != ulidEncodedSize { - return false - } - - // Check if all the characters in a base32 encoded ULID are part of the - // expected base32 character set. - if ulidDec[str[0]] == 0xFF || - ulidDec[str[1]] == 0xFF || - ulidDec[str[2]] == 0xFF || - ulidDec[str[3]] == 0xFF || - ulidDec[str[4]] == 0xFF || - ulidDec[str[5]] == 0xFF || - ulidDec[str[6]] == 0xFF || - ulidDec[str[7]] == 0xFF || - ulidDec[str[8]] == 0xFF || - ulidDec[str[9]] == 0xFF || - ulidDec[str[10]] == 0xFF || - ulidDec[str[11]] == 0xFF || - ulidDec[str[12]] == 0xFF || - ulidDec[str[13]] == 0xFF || - ulidDec[str[14]] == 0xFF || - ulidDec[str[15]] == 0xFF || - ulidDec[str[16]] == 0xFF || - ulidDec[str[17]] == 0xFF || - ulidDec[str[18]] == 0xFF || - ulidDec[str[19]] == 0xFF || - ulidDec[str[20]] == 0xFF || - ulidDec[str[21]] == 0xFF || - ulidDec[str[22]] == 0xFF || - ulidDec[str[23]] == 0xFF || - ulidDec[str[24]] == 0xFF || - ulidDec[str[25]] == 0xFF { - return false - } - - // Check if the first character in a base32 encoded ULID will overflow. This - // happens because the base32 representation encodes 130 bits, while the - // ULID is only 128 bits. - // - // See https://github.com/oklog/ulid/issues/9 for details. - if str[0] > '7' { - return false - } - return true -} - -// IsCreditCard checks if the string is a credit card. -func IsCreditCard(str string) bool { - sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") - if !rxCreditCard.MatchString(sanitized) { - return false - } - - number, _ := ToInt(sanitized) - number, lastDigit := number / 10, number % 10 - - var sum int64 - for i:=0; number > 0; i++ { - digit := number % 10 - - if i % 2 == 0 { - digit *= 2 - if digit > 9 { - digit -= 9 - } - } - - sum += digit - number = number / 10 - } - - return (sum + lastDigit) % 10 == 0 -} - -// IsISBN10 checks if the string is an ISBN version 10. -func IsISBN10(str string) bool { - return IsISBN(str, 10) -} - -// IsISBN13 checks if the string is an ISBN version 13. -func IsISBN13(str string) bool { - return IsISBN(str, 13) -} - -// IsISBN checks if the string is an ISBN (version 10 or 13). -// If version value is not equal to 10 or 13, it will be checks both variants. -func IsISBN(str string, version int) bool { - sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") - var checksum int32 - var i int32 - if version == 10 { - if !rxISBN10.MatchString(sanitized) { - return false - } - for i = 0; i < 9; i++ { - checksum += (i + 1) * int32(sanitized[i]-'0') - } - if sanitized[9] == 'X' { - checksum += 10 * 10 - } else { - checksum += 10 * int32(sanitized[9]-'0') - } - if checksum%11 == 0 { - return true - } - return false - } else if version == 13 { - if !rxISBN13.MatchString(sanitized) { - return false - } - factor := []int32{1, 3} - for i = 0; i < 12; i++ { - checksum += factor[i%2] * int32(sanitized[i]-'0') - } - return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0 - } - return IsISBN(str, 10) || IsISBN(str, 13) -} - -// IsJSON checks if the string is valid JSON (note: uses json.Unmarshal). -func IsJSON(str string) bool { - var js json.RawMessage - return json.Unmarshal([]byte(str), &js) == nil -} - -// IsMultibyte checks if the string contains one or more multibyte chars. Empty string is valid. -func IsMultibyte(str string) bool { - if IsNull(str) { - return true - } - return rxMultibyte.MatchString(str) -} - -// IsASCII checks if the string contains ASCII chars only. Empty string is valid. -func IsASCII(str string) bool { - if IsNull(str) { - return true - } - return rxASCII.MatchString(str) -} - -// IsPrintableASCII checks if the string contains printable ASCII chars only. Empty string is valid. -func IsPrintableASCII(str string) bool { - if IsNull(str) { - return true - } - return rxPrintableASCII.MatchString(str) -} - -// IsFullWidth checks if the string contains any full-width chars. Empty string is valid. -func IsFullWidth(str string) bool { - if IsNull(str) { - return true - } - return rxFullWidth.MatchString(str) -} - -// IsHalfWidth checks if the string contains any half-width chars. Empty string is valid. -func IsHalfWidth(str string) bool { - if IsNull(str) { - return true - } - return rxHalfWidth.MatchString(str) -} - -// IsVariableWidth checks if the string contains a mixture of full and half-width chars. Empty string is valid. -func IsVariableWidth(str string) bool { - if IsNull(str) { - return true - } - return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str) -} - -// IsBase64 checks if a string is base64 encoded. -func IsBase64(str string) bool { - return rxBase64.MatchString(str) -} - -// IsFilePath checks is a string is Win or Unix file path and returns it's type. -func IsFilePath(str string) (bool, int) { - if rxWinPath.MatchString(str) { - //check windows path limit see: - // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath - if len(str[3:]) > 32767 { - return false, Win - } - return true, Win - } else if rxUnixPath.MatchString(str) { - return true, Unix - } - return false, Unknown -} - -//IsWinFilePath checks both relative & absolute paths in Windows -func IsWinFilePath(str string) bool { - if rxARWinPath.MatchString(str) { - //check windows path limit see: - // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath - if len(str[3:]) > 32767 { - return false - } - return true - } - return false -} - -//IsUnixFilePath checks both relative & absolute paths in Unix -func IsUnixFilePath(str string) bool { - if rxARUnixPath.MatchString(str) { - return true - } - return false -} - -// IsDataURI checks if a string is base64 encoded data URI such as an image -func IsDataURI(str string) bool { - dataURI := strings.Split(str, ",") - if !rxDataURI.MatchString(dataURI[0]) { - return false - } - return IsBase64(dataURI[1]) -} - -// IsMagnetURI checks if a string is valid magnet URI -func IsMagnetURI(str string) bool { - return rxMagnetURI.MatchString(str) -} - -// IsISO3166Alpha2 checks if a string is valid two-letter country code -func IsISO3166Alpha2(str string) bool { - for _, entry := range ISO3166List { - if str == entry.Alpha2Code { - return true - } - } - return false -} - -// IsISO3166Alpha3 checks if a string is valid three-letter country code -func IsISO3166Alpha3(str string) bool { - for _, entry := range ISO3166List { - if str == entry.Alpha3Code { - return true - } - } - return false -} - -// IsISO693Alpha2 checks if a string is valid two-letter language code -func IsISO693Alpha2(str string) bool { - for _, entry := range ISO693List { - if str == entry.Alpha2Code { - return true - } - } - return false -} - -// IsISO693Alpha3b checks if a string is valid three-letter language code -func IsISO693Alpha3b(str string) bool { - for _, entry := range ISO693List { - if str == entry.Alpha3bCode { - return true - } - } - return false -} - -// IsDNSName will validate the given string as a DNS name -func IsDNSName(str string) bool { - if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 { - // constraints already violated - return false - } - return !IsIP(str) && rxDNSName.MatchString(str) -} - -// IsHash checks if a string is a hash of type algorithm. -// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b'] -func IsHash(str string, algorithm string) bool { - var len string - algo := strings.ToLower(algorithm) - - if algo == "crc32" || algo == "crc32b" { - len = "8" - } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" { - len = "32" - } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" { - len = "40" - } else if algo == "tiger192" { - len = "48" - } else if algo == "sha3-224" { - len = "56" - } else if algo == "sha256" || algo == "sha3-256" { - len = "64" - } else if algo == "sha384" || algo == "sha3-384" { - len = "96" - } else if algo == "sha512" || algo == "sha3-512" { - len = "128" - } else { - return false - } - - return Matches(str, "^[a-f0-9]{"+len+"}$") -} - -// IsSHA3224 checks is a string is a SHA3-224 hash. Alias for `IsHash(str, "sha3-224")` -func IsSHA3224(str string) bool { - return IsHash(str, "sha3-224") -} - -// IsSHA3256 checks is a string is a SHA3-256 hash. Alias for `IsHash(str, "sha3-256")` -func IsSHA3256(str string) bool { - return IsHash(str, "sha3-256") -} - -// IsSHA3384 checks is a string is a SHA3-384 hash. Alias for `IsHash(str, "sha3-384")` -func IsSHA3384(str string) bool { - return IsHash(str, "sha3-384") -} - -// IsSHA3512 checks is a string is a SHA3-512 hash. Alias for `IsHash(str, "sha3-512")` -func IsSHA3512(str string) bool { - return IsHash(str, "sha3-512") -} - -// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")` -func IsSHA512(str string) bool { - return IsHash(str, "sha512") -} - -// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")` -func IsSHA384(str string) bool { - return IsHash(str, "sha384") -} - -// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")` -func IsSHA256(str string) bool { - return IsHash(str, "sha256") -} - -// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")` -func IsTiger192(str string) bool { - return IsHash(str, "tiger192") -} - -// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")` -func IsTiger160(str string) bool { - return IsHash(str, "tiger160") -} - -// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")` -func IsRipeMD160(str string) bool { - return IsHash(str, "ripemd160") -} - -// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")` -func IsSHA1(str string) bool { - return IsHash(str, "sha1") -} - -// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")` -func IsTiger128(str string) bool { - return IsHash(str, "tiger128") -} - -// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")` -func IsRipeMD128(str string) bool { - return IsHash(str, "ripemd128") -} - -// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")` -func IsCRC32(str string) bool { - return IsHash(str, "crc32") -} - -// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")` -func IsCRC32b(str string) bool { - return IsHash(str, "crc32b") -} - -// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")` -func IsMD5(str string) bool { - return IsHash(str, "md5") -} - -// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")` -func IsMD4(str string) bool { - return IsHash(str, "md4") -} - -// IsDialString validates the given string for usage with the various Dial() functions -func IsDialString(str string) bool { - if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) { - return true - } - - return false -} - -// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP` -func IsIP(str string) bool { - return net.ParseIP(str) != nil -} - -// IsPort checks if a string represents a valid port -func IsPort(str string) bool { - if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 { - return true - } - return false -} - -// IsIPv4 checks if the string is an IP version 4. -func IsIPv4(str string) bool { - ip := net.ParseIP(str) - return ip != nil && strings.Contains(str, ".") -} - -// IsIPv6 checks if the string is an IP version 6. -func IsIPv6(str string) bool { - ip := net.ParseIP(str) - return ip != nil && strings.Contains(str, ":") -} - -// IsCIDR checks if the string is an valid CIDR notiation (IPV4 & IPV6) -func IsCIDR(str string) bool { - _, _, err := net.ParseCIDR(str) - return err == nil -} - -// IsMAC checks if a string is valid MAC address. -// Possible MAC formats: -// 01:23:45:67:89:ab -// 01:23:45:67:89:ab:cd:ef -// 01-23-45-67-89-ab -// 01-23-45-67-89-ab-cd-ef -// 0123.4567.89ab -// 0123.4567.89ab.cdef -func IsMAC(str string) bool { - _, err := net.ParseMAC(str) - return err == nil -} - -// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name -func IsHost(str string) bool { - return IsIP(str) || IsDNSName(str) -} - -// IsMongoID checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. -func IsMongoID(str string) bool { - return rxHexadecimal.MatchString(str) && (len(str) == 24) -} - -// IsLatitude checks if a string is valid latitude. -func IsLatitude(str string) bool { - return rxLatitude.MatchString(str) -} - -// IsLongitude checks if a string is valid longitude. -func IsLongitude(str string) bool { - return rxLongitude.MatchString(str) -} - -// IsIMEI checks if a string is valid IMEI -func IsIMEI(str string) bool { - return rxIMEI.MatchString(str) -} - -// IsIMSI checks if a string is valid IMSI -func IsIMSI(str string) bool { - if !rxIMSI.MatchString(str) { - return false - } - - mcc, err := strconv.ParseInt(str[0:3], 10, 32) - if err != nil { - return false - } - - switch mcc { - case 202, 204, 206, 208, 212, 213, 214, 216, 218, 219: - case 220, 221, 222, 226, 228, 230, 231, 232, 234, 235: - case 238, 240, 242, 244, 246, 247, 248, 250, 255, 257: - case 259, 260, 262, 266, 268, 270, 272, 274, 276, 278: - case 280, 282, 283, 284, 286, 288, 289, 290, 292, 293: - case 294, 295, 297, 302, 308, 310, 311, 312, 313, 314: - case 315, 316, 330, 332, 334, 338, 340, 342, 344, 346: - case 348, 350, 352, 354, 356, 358, 360, 362, 363, 364: - case 365, 366, 368, 370, 372, 374, 376, 400, 401, 402: - case 404, 405, 406, 410, 412, 413, 414, 415, 416, 417: - case 418, 419, 420, 421, 422, 424, 425, 426, 427, 428: - case 429, 430, 431, 432, 434, 436, 437, 438, 440, 441: - case 450, 452, 454, 455, 456, 457, 460, 461, 466, 467: - case 470, 472, 502, 505, 510, 514, 515, 520, 525, 528: - case 530, 536, 537, 539, 540, 541, 542, 543, 544, 545: - case 546, 547, 548, 549, 550, 551, 552, 553, 554, 555: - case 602, 603, 604, 605, 606, 607, 608, 609, 610, 611: - case 612, 613, 614, 615, 616, 617, 618, 619, 620, 621: - case 622, 623, 624, 625, 626, 627, 628, 629, 630, 631: - case 632, 633, 634, 635, 636, 637, 638, 639, 640, 641: - case 642, 643, 645, 646, 647, 648, 649, 650, 651, 652: - case 653, 654, 655, 657, 658, 659, 702, 704, 706, 708: - case 710, 712, 714, 716, 722, 724, 730, 732, 734, 736: - case 738, 740, 742, 744, 746, 748, 750, 995: - return true - default: - return false - } - return true -} - -// IsRsaPublicKey checks if a string is valid public key with provided length -func IsRsaPublicKey(str string, keylen int) bool { - bb := bytes.NewBufferString(str) - pemBytes, err := ioutil.ReadAll(bb) - if err != nil { - return false - } - block, _ := pem.Decode(pemBytes) - if block != nil && block.Type != "PUBLIC KEY" { - return false - } - var der []byte - - if block != nil { - der = block.Bytes - } else { - der, err = base64.StdEncoding.DecodeString(str) - if err != nil { - return false - } - } - - key, err := x509.ParsePKIXPublicKey(der) - if err != nil { - return false - } - pubkey, ok := key.(*rsa.PublicKey) - if !ok { - return false - } - bitlen := len(pubkey.N.Bytes()) * 8 - return bitlen == int(keylen) -} - -// IsRegex checks if a give string is a valid regex with RE2 syntax or not -func IsRegex(str string) bool { - if _, err := regexp.Compile(str); err == nil { - return true - } - return false -} - -func toJSONName(tag string) string { - if tag == "" { - return "" - } - - // JSON name always comes first. If there's no options then split[0] is - // JSON name, if JSON name is not set, then split[0] is an empty string. - split := strings.SplitN(tag, ",", 2) - - name := split[0] - - // However it is possible that the field is skipped when - // (de-)serializing from/to JSON, in which case assume that there is no - // tag name to use - if name == "-" { - return "" - } - return name -} - -func prependPathToErrors(err error, path string) error { - switch err2 := err.(type) { - case Error: - err2.Path = append([]string{path}, err2.Path...) - return err2 - case Errors: - errors := err2.Errors() - for i, err3 := range errors { - errors[i] = prependPathToErrors(err3, path) - } - return err2 - } - return err -} - -// ValidateArray performs validation according to condition iterator that validates every element of the array -func ValidateArray(array []interface{}, iterator ConditionIterator) bool { - return Every(array, iterator) -} - -// ValidateMap use validation map for fields. -// result will be equal to `false` if there are any errors. -// s is the map containing the data to be validated. -// m is the validation map in the form: -// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} -func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { - if s == nil { - return true, nil - } - result := true - var err error - var errs Errors - var index int - val := reflect.ValueOf(s) - for key, value := range s { - presentResult := true - validator, ok := m[key] - if !ok { - presentResult = false - var err error - err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - valueField := reflect.ValueOf(value) - mapResult := true - typeResult := true - structResult := true - resultField := true - switch subValidator := validator.(type) { - case map[string]interface{}: - var err error - if v, ok := value.(map[string]interface{}); !ok { - mapResult = false - err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String()) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } else { - mapResult, err = ValidateMap(v, subValidator) - if err != nil { - mapResult = false - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - } - case string: - if (valueField.Kind() == reflect.Struct || - (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && - subValidator != "-" { - var err error - structResult, err = ValidateStruct(valueField.Interface()) - if err != nil { - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - } - resultField, err = typeCheck(valueField, reflect.StructField{ - Name: key, - PkgPath: "", - Type: val.Type(), - Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)), - Offset: 0, - Index: []int{index}, - Anonymous: false, - }, val, nil) - if err != nil { - errs = append(errs, err) - } - case nil: - // already handlerd when checked before - default: - typeResult = false - err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String()) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - result = result && presentResult && typeResult && resultField && structResult && mapResult - index++ - } - // checks required keys - requiredResult := true - for key, value := range m { - if schema, ok := value.(string); ok { - tags := parseTagIntoMap(schema) - if required, ok := tags["required"]; ok { - if _, ok := s[key]; !ok { - requiredResult = false - if required.customErrorMessage != "" { - err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}} - } else { - err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}} - } - errs = append(errs, err) - } - } - } - } - - if len(errs) > 0 { - err = errs - } - return result && requiredResult, err -} - -// ValidateStruct use tags for fields. -// result will be equal to `false` if there are any errors. -// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail) -func ValidateStruct(s interface{}) (bool, error) { - if s == nil { - return true, nil - } - result := true - var err error - val := reflect.ValueOf(s) - if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { - val = val.Elem() - } - // we only accept structs - if val.Kind() != reflect.Struct { - return false, fmt.Errorf("function only accepts structs; got %s", val.Kind()) - } - var errs Errors - for i := 0; i < val.NumField(); i++ { - valueField := val.Field(i) - typeField := val.Type().Field(i) - if typeField.PkgPath != "" { - continue // Private field - } - structResult := true - if valueField.Kind() == reflect.Interface { - valueField = valueField.Elem() - } - if (valueField.Kind() == reflect.Struct || - (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && - typeField.Tag.Get(tagName) != "-" { - var err error - structResult, err = ValidateStruct(valueField.Interface()) - if err != nil { - err = prependPathToErrors(err, typeField.Name) - errs = append(errs, err) - } - } - resultField, err2 := typeCheck(valueField, typeField, val, nil) - if err2 != nil { - - // Replace structure name with JSON name if there is a tag on the variable - jsonTag := toJSONName(typeField.Tag.Get("json")) - if jsonTag != "" { - switch jsonError := err2.(type) { - case Error: - jsonError.Name = jsonTag - err2 = jsonError - case Errors: - for i2, err3 := range jsonError { - switch customErr := err3.(type) { - case Error: - customErr.Name = jsonTag - jsonError[i2] = customErr - } - } - - err2 = jsonError - } - } - - errs = append(errs, err2) - } - result = result && resultField && structResult - } - if len(errs) > 0 { - err = errs - } - return result, err -} - -// ValidateStructAsync performs async validation of the struct and returns results through the channels -func ValidateStructAsync(s interface{}) (<-chan bool, <-chan error) { - res := make(chan bool) - errors := make(chan error) - - go func() { - defer close(res) - defer close(errors) - - isValid, isFailed := ValidateStruct(s) - - res <- isValid - errors <- isFailed - }() - - return res, errors -} - -// ValidateMapAsync performs async validation of the map and returns results through the channels -func ValidateMapAsync(s map[string]interface{}, m map[string]interface{}) (<-chan bool, <-chan error) { - res := make(chan bool) - errors := make(chan error) - - go func() { - defer close(res) - defer close(errors) - - isValid, isFailed := ValidateMap(s, m) - - res <- isValid - errors <- isFailed - }() - - return res, errors -} - -// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""} -func parseTagIntoMap(tag string) tagOptionsMap { - optionsMap := make(tagOptionsMap) - options := strings.Split(tag, ",") - - for i, option := range options { - option = strings.TrimSpace(option) - - validationOptions := strings.Split(option, "~") - if !isValidTag(validationOptions[0]) { - continue - } - if len(validationOptions) == 2 { - optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i} - } else { - optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i} - } - } - return optionsMap -} - -func isValidTag(s string) bool { - if s == "" { - return false - } - for _, c := range s { - switch { - case strings.ContainsRune("\\'\"!#$%&()*+-./:<=>?@[]^_{|}~ ", c): - // Backslash and quote chars are reserved, but - // otherwise any punctuation chars are allowed - // in a tag name. - default: - if !unicode.IsLetter(c) && !unicode.IsDigit(c) { - return false - } - } - } - return true -} - -// IsSSN will validate the given string as a U.S. Social Security Number -func IsSSN(str string) bool { - if str == "" || len(str) != 11 { - return false - } - return rxSSN.MatchString(str) -} - -// IsSemver checks if string is valid semantic version -func IsSemver(str string) bool { - return rxSemver.MatchString(str) -} - -// IsType checks if interface is of some type -func IsType(v interface{}, params ...string) bool { - if len(params) == 1 { - typ := params[0] - return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1) - } - return false -} - -// IsTime checks if string is valid according to given format -func IsTime(str string, format string) bool { - _, err := time.Parse(format, str) - return err == nil -} - -// IsUnixTime checks if string is valid unix timestamp value -func IsUnixTime(str string) bool { - if _, err := strconv.Atoi(str); err == nil { - return true - } - return false -} - -// IsRFC3339 checks if string is valid timestamp value according to RFC3339 -func IsRFC3339(str string) bool { - return IsTime(str, time.RFC3339) -} - -// IsRFC3339WithoutZone checks if string is valid timestamp value according to RFC3339 which excludes the timezone. -func IsRFC3339WithoutZone(str string) bool { - return IsTime(str, rfc3339WithoutZone) -} - -// IsISO4217 checks if string is valid ISO currency code -func IsISO4217(str string) bool { - for _, currency := range ISO4217List { - if str == currency { - return true - } - } - - return false -} - -// ByteLength checks string's length -func ByteLength(str string, params ...string) bool { - if len(params) == 2 { - min, _ := ToInt(params[0]) - max, _ := ToInt(params[1]) - return len(str) >= int(min) && len(str) <= int(max) - } - - return false -} - -// RuneLength checks string's length -// Alias for StringLength -func RuneLength(str string, params ...string) bool { - return StringLength(str, params...) -} - -// IsRsaPub checks whether string is valid RSA key -// Alias for IsRsaPublicKey -func IsRsaPub(str string, params ...string) bool { - if len(params) == 1 { - len, _ := ToInt(params[0]) - return IsRsaPublicKey(str, int(len)) - } - - return false -} - -// StringMatches checks if a string matches a given pattern. -func StringMatches(s string, params ...string) bool { - if len(params) == 1 { - pattern := params[0] - return Matches(s, pattern) - } - return false -} - -// StringLength checks string's length (including multi byte strings) -func StringLength(str string, params ...string) bool { - - if len(params) == 2 { - strLength := utf8.RuneCountInString(str) - min, _ := ToInt(params[0]) - max, _ := ToInt(params[1]) - return strLength >= int(min) && strLength <= int(max) - } - - return false -} - -// MinStringLength checks string's minimum length (including multi byte strings) -func MinStringLength(str string, params ...string) bool { - - if len(params) == 1 { - strLength := utf8.RuneCountInString(str) - min, _ := ToInt(params[0]) - return strLength >= int(min) - } - - return false -} - -// MaxStringLength checks string's maximum length (including multi byte strings) -func MaxStringLength(str string, params ...string) bool { - - if len(params) == 1 { - strLength := utf8.RuneCountInString(str) - max, _ := ToInt(params[0]) - return strLength <= int(max) - } - - return false -} - -// Range checks string's length -func Range(str string, params ...string) bool { - if len(params) == 2 { - value, _ := ToFloat(str) - min, _ := ToFloat(params[0]) - max, _ := ToFloat(params[1]) - return InRange(value, min, max) - } - - return false -} - -// IsInRaw checks if string is in list of allowed values -func IsInRaw(str string, params ...string) bool { - if len(params) == 1 { - rawParams := params[0] - - parsedParams := strings.Split(rawParams, "|") - - return IsIn(str, parsedParams...) - } - - return false -} - -// IsIn checks if string str is a member of the set of strings params -func IsIn(str string, params ...string) bool { - for _, param := range params { - if str == param { - return true - } - } - - return false -} - -func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) { - if nilPtrAllowedByRequired { - k := v.Kind() - if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() { - return true, nil - } - } - - if requiredOption, isRequired := options["required"]; isRequired { - if len(requiredOption.customErrorMessage) > 0 { - return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}} - } - return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}} - } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional { - return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}} - } - // not required and empty is valid - return true, nil -} - -func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) { - if !v.IsValid() { - return false, nil - } - - tag := t.Tag.Get(tagName) - - // checks if the field should be ignored - switch tag { - case "": - if v.Kind() != reflect.Slice && v.Kind() != reflect.Map { - if !fieldsRequiredByDefault { - return true, nil - } - return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}} - } - case "-": - return true, nil - } - - isRootType := false - if options == nil { - isRootType = true - options = parseTagIntoMap(tag) - } - - if isEmptyValue(v) { - // an empty value is not validated, checks only required - isValid, resultErr = checkRequired(v, t, options) - for key := range options { - delete(options, key) - } - return isValid, resultErr - } - - var customTypeErrors Errors - optionsOrder := options.orderedKeys() - for _, validatorName := range optionsOrder { - validatorStruct := options[validatorName] - if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok { - delete(options, validatorName) - - if result := validatefunc(v.Interface(), o.Interface()); !result { - if len(validatorStruct.customErrorMessage) > 0 { - customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)}) - continue - } - customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)}) - } - } - } - - if len(customTypeErrors.Errors()) > 0 { - return false, customTypeErrors - } - - if isRootType { - // Ensure that we've checked the value by all specified validators before report that the value is valid - defer func() { - delete(options, "optional") - delete(options, "required") - - if isValid && resultErr == nil && len(options) != 0 { - optionsOrder := options.orderedKeys() - for _, validator := range optionsOrder { - isValid = false - resultErr = Error{t.Name, fmt.Errorf( - "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}} - return - } - } - }() - } - - for _, validatorSpec := range optionsOrder { - validatorStruct := options[validatorSpec] - var negate bool - validator := validatorSpec - customMsgExists := len(validatorStruct.customErrorMessage) > 0 - - // checks whether the tag looks like '!something' or 'something' - if validator[0] == '!' { - validator = validator[1:] - negate = true - } - - // checks for interface param validators - for key, value := range InterfaceParamTagRegexMap { - ps := value.FindStringSubmatch(validator) - if len(ps) == 0 { - continue - } - - validatefunc, ok := InterfaceParamTagMap[key] - if !ok { - continue - } - - delete(options, validatorSpec) - - field := fmt.Sprint(v) - if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - } - } - - switch v.Kind() { - case reflect.Bool, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, - reflect.Float32, reflect.Float64, - reflect.String: - // for each tag option checks the map of validator functions - for _, validatorSpec := range optionsOrder { - validatorStruct := options[validatorSpec] - var negate bool - validator := validatorSpec - customMsgExists := len(validatorStruct.customErrorMessage) > 0 - - // checks whether the tag looks like '!something' or 'something' - if validator[0] == '!' { - validator = validator[1:] - negate = true - } - - // checks for param validators - for key, value := range ParamTagRegexMap { - ps := value.FindStringSubmatch(validator) - if len(ps) == 0 { - continue - } - - validatefunc, ok := ParamTagMap[key] - if !ok { - continue - } - - delete(options, validatorSpec) - - switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - - field := fmt.Sprint(v) // make value into string, then validate with regex - if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - default: - // type not yet supported, fail - return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}} - } - } - - if validatefunc, ok := TagMap[validator]; ok { - delete(options, validatorSpec) - - switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - field := fmt.Sprint(v) // make value into string, then validate with regex - if result := validatefunc(field); !result && !negate || result && negate { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - default: - //Not Yet Supported Types (Fail here!) - err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v) - return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}} - } - } - } - return true, nil - case reflect.Map: - if v.Type().Key().Kind() != reflect.String { - return false, &UnsupportedTypeError{v.Type()} - } - var sv stringValues - sv = v.MapKeys() - sort.Sort(sv) - result := true - for i, k := range sv { - var resultItem bool - var err error - if v.MapIndex(k).Kind() != reflect.Struct { - resultItem, err = typeCheck(v.MapIndex(k), t, o, options) - if err != nil { - return false, err - } - } else { - resultItem, err = ValidateStruct(v.MapIndex(k).Interface()) - if err != nil { - err = prependPathToErrors(err, t.Name+"."+sv[i].Interface().(string)) - return false, err - } - } - result = result && resultItem - } - return result, nil - case reflect.Slice, reflect.Array: - result := true - for i := 0; i < v.Len(); i++ { - var resultItem bool - var err error - if v.Index(i).Kind() != reflect.Struct { - resultItem, err = typeCheck(v.Index(i), t, o, options) - if err != nil { - return false, err - } - } else { - resultItem, err = ValidateStruct(v.Index(i).Interface()) - if err != nil { - err = prependPathToErrors(err, t.Name+"."+strconv.Itoa(i)) - return false, err - } - } - result = result && resultItem - } - return result, nil - case reflect.Interface: - // If the value is an interface then encode its element - if v.IsNil() { - return true, nil - } - return ValidateStruct(v.Interface()) - case reflect.Ptr: - // If the value is a pointer then checks its element - if v.IsNil() { - return true, nil - } - return typeCheck(v.Elem(), t, o, options) - case reflect.Struct: - return true, nil - default: - return false, &UnsupportedTypeError{v.Type()} - } -} - -func stripParams(validatorString string) string { - return paramsRegexp.ReplaceAllString(validatorString, "") -} - -// isEmptyValue checks whether value empty or not -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.String, reflect.Array: - return v.Len() == 0 - case reflect.Map, reflect.Slice: - return v.Len() == 0 || v.IsNil() - 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.Interface, reflect.Ptr: - return v.IsNil() - } - - return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) -} - -// ErrorByField returns error for specified field of the struct -// validated by ValidateStruct or empty string if there are no errors -// or this field doesn't exists or doesn't have any errors. -func ErrorByField(e error, field string) string { - if e == nil { - return "" - } - return ErrorsByField(e)[field] -} - -// ErrorsByField returns map of errors of the struct validated -// by ValidateStruct or empty map if there are no errors. -func ErrorsByField(e error) map[string]string { - m := make(map[string]string) - if e == nil { - return m - } - // prototype for ValidateStruct - - switch e := e.(type) { - case Error: - m[e.Name] = e.Err.Error() - case Errors: - for _, item := range e.Errors() { - n := ErrorsByField(item) - for k, v := range n { - m[k] = v - } - } - } - - return m -} - -// Error returns string equivalent for reflect.Type -func (e *UnsupportedTypeError) Error() string { - return "validator: unsupported type: " + e.Type.String() -} - -func (sv stringValues) Len() int { return len(sv) } -func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } -func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) } -func (sv stringValues) get(i int) string { return sv[i].String() } - -func IsE164(str string) bool { - return rxE164.MatchString(str) -} diff --git a/vendor/github.com/asaskevich/govalidator/wercker.yml b/vendor/github.com/asaskevich/govalidator/wercker.yml deleted file mode 100644 index bc5f7b0864b..00000000000 --- a/vendor/github.com/asaskevich/govalidator/wercker.yml +++ /dev/null @@ -1,15 +0,0 @@ -box: golang -build: - steps: - - setup-go-workspace - - - script: - name: go get - code: | - go version - go get -t ./... - - - script: - name: go test - code: | - go test -race -v ./... 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 4ad2ee4405d..9f94cfe0046 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 @@ -118,6 +118,10 @@ const ( CredentialSourceHTTP // CredentialSourceIMDS credentials resolved from the instance metadata service (IMDS) CredentialSourceIMDS + // CredentialSourceProfileLogin credentials resolved from an `aws login` session sourced from a profile + CredentialSourceProfileLogin + // CredentialSourceLogin credentials resolved from an `aws login` session + CredentialSourceLogin ) // A Credentials is the AWS credentials value for individual credential fields. 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 1820ff0fba3..0e6fb65a1ee 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.39.2" +const goModuleVersion = "1.41.1" 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 3314230fd8c..157a71505cd 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 @@ -137,6 +137,9 @@ const ( UserAgentFeatureCredentialsIMDS = "0" UserAgentFeatureBearerServiceEnvVars = "3" + + UserAgentFeatureCredentialsProfileLogin = "AC" + UserAgentFeatureCredentialsLogin = "AD" ) var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ @@ -160,6 +163,8 @@ var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ aws.CredentialSourceProcess: UserAgentFeatureCredentialsProcess, aws.CredentialSourceHTTP: UserAgentFeatureCredentialsHTTP, aws.CredentialSourceIMDS: UserAgentFeatureCredentialsIMDS, + aws.CredentialSourceProfileLogin: UserAgentFeatureCredentialsProfileLogin, + aws.CredentialSourceLogin: UserAgentFeatureCredentialsLogin, } // RequestUserAgent is a build middleware that set the User-Agent for the request. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go index 8d7c35a9ec8..c7ef0acc4d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go @@ -18,6 +18,7 @@ var ( // Default connection pool options DefaultHTTPTransportMaxIdleConns = 100 DefaultHTTPTransportMaxIdleConnsPerHost = 10 + DefaultHTTPTransportMaxConnsPerHost = 2048 // Default connection timeouts DefaultHTTPTransportIdleConnTimeout = 90 * time.Second @@ -186,6 +187,7 @@ func defaultHTTPTransport() *http.Transport { TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout, MaxIdleConns: DefaultHTTPTransportMaxIdleConns, MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost, + MaxConnsPerHost: DefaultHTTPTransportMaxConnsPerHost, IdleConnTimeout: DefaultHTTPTransportIdleConnTimeout, ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout, ForceAttemptHTTP2: true, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go index 993929bd9b7..4881ae1445b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go @@ -64,6 +64,11 @@ func (r *timeoutReadCloser) Close() error { // AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the // response body so that a read that takes too long will return an error. +// +// Deprecated: This API was previously exposed to customize behavior of the +// Kinesis service. That customization has been removed and this middleware's +// implementation can cause panics within the standard library networking loop. +// See #2752. func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error { return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After) } 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 526537b8bb7..9f8511f7eb8 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,75 @@ +# v1.32.7 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.6 (2025-12-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.5 (2025-12-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.4 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.3 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.32.2 (2025-11-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.1 (2025-11-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2025-11-19.2) + +* **Feature**: Add support for AWS Login credentials (package credentials/logincreds) to the default credential chain. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.21 (2025-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.20 (2025-11-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.19 (2025-11-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.18 (2025-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.17 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.31.16 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.15 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.14 (2025-10-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.13 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.31.12 (2025-09-29) * **Dependency Update**: Updated to the latest SDK module versions 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 8274236780f..79f570a68ea 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.31.12" +const goModuleVersion = "1.32.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go index b00259df03a..de839859991 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go @@ -13,10 +13,12 @@ import ( "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds" + "github.com/aws/aws-sdk-go-v2/credentials/logincreds" "github.com/aws/aws-sdk-go-v2/credentials/processcreds" "github.com/aws/aws-sdk-go-v2/credentials/ssocreds" "github.com/aws/aws-sdk-go-v2/credentials/stscreds" "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" + "github.com/aws/aws-sdk-go-v2/service/signin" "github.com/aws/aws-sdk-go-v2/service/sso" "github.com/aws/aws-sdk-go-v2/service/ssooidc" "github.com/aws/aws-sdk-go-v2/service/sts" @@ -172,7 +174,10 @@ func resolveCredsFromProfile(ctx context.Context, cfg *aws.Config, envConfig *En ctx = addCredentialSource(ctx, aws.CredentialSourceProfileSSO) } err = resolveSSOCredentials(ctx, cfg, sharedConfig, configs) - + case len(sharedConfig.LoginSession) > 0: + ctx = addCredentialSource(ctx, aws.CredentialSourceProfileLogin) + ctx = addCredentialSource(ctx, aws.CredentialSourceLogin) + err = resolveLoginCredentials(ctx, cfg, sharedConfig, configs) case len(sharedConfig.CredentialProcess) != 0: // Get credentials from CredentialProcess ctx = addCredentialSource(ctx, aws.CredentialSourceProfileProcess) @@ -625,3 +630,21 @@ func addCredentialSource(ctx context.Context, source aws.CredentialSource) conte func getCredentialSources(ctx context.Context) []aws.CredentialSource { return ctx.Value(credentialSource{}).([]aws.CredentialSource) } + +func resolveLoginCredentials(ctx context.Context, cfg *aws.Config, sharedCfg *SharedConfig, configs configs) error { + cacheDir := os.Getenv("AWS_LOGIN_CACHE_DIRECTORY") + tokenPath, err := logincreds.StandardCachedTokenFilepath(sharedCfg.LoginSession, cacheDir) + if err != nil { + return err + } + + svc := signin.NewFromConfig(*cfg) + provider := logincreds.New(svc, tokenPath, func(o *logincreds.Options) { + o.CredentialSources = getCredentialSources(ctx) + }) + cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, provider) + if err != nil { + return err + } + return nil +} 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 97be3f75694..5a0fea22200 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 @@ -125,6 +125,8 @@ const ( checksumWhenRequired = "when_required" authSchemePreferenceKey = "auth_scheme_preference" + + loginSessionKey = "login_session" ) // defaultSharedConfigProfile allows for swapping the default profile for testing @@ -362,6 +364,9 @@ type SharedConfig struct { // Priority list of preferred auth scheme names (e.g. sigv4a). AuthSchemePreference []string + + // Session ARN from an `aws login` session. + LoginSession string } func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) { @@ -897,6 +902,8 @@ func mergeSections(dst *ini.Sections, src ini.Sections) error { ssoStartURLKey, authSchemePreferenceKey, + + loginSessionKey, } for i := range stringKeys { if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil { @@ -1175,6 +1182,8 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er c.AuthSchemePreference = toAuthSchemePreferenceList(section.String(authSchemePreferenceKey)) + updateString(&c.LoginSession, section, loginSessionKey) + 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 015f24d3be7..daca9241cb0 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,75 @@ +# v1.19.7 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.6 (2025-12-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.5 (2025-12-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.4 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.3 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.19.2 (2025-11-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.1 (2025-11-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.0 (2025-11-19.2) + +* **Feature**: Add support for AWS Login credentials (package credentials/logincreds) to the default credential chain. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.25 (2025-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.24 (2025-11-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.23 (2025-11-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.22 (2025-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.21 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.18.20 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.19 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.18 (2025-10-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.17 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.18.16 (2025-09-29) * **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 03357b7603e..5439cb44bd1 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.18.16" +const goModuleVersion = "1.19.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/dpop.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/dpop.go new file mode 100644 index 00000000000..6dc0845fdfd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/dpop.go @@ -0,0 +1,150 @@ +package logincreds + +import ( + "context" + "crypto/ecdsa" + cryptorand "crypto/rand" + "crypto/sha256" + "crypto/x509" + "encoding/base64" + "encoding/json" + "encoding/pem" + "fmt" + + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/aws-sdk-go-v2/service/signin" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// AWS signin DPOP always uses the P256 curve +const curvelen = 256 / 8 // bytes + +// https://datatracker.ietf.org/doc/html/rfc9449 +func mkdpop(token *loginToken, htu string) (string, error) { + key, err := parseKey(token.DPOPKey) + if err != nil { + return "", fmt.Errorf("parse key: %w", err) + } + + header, err := jsonb64(&dpopHeader{ + Typ: "dpop+jwt", + Alg: "ES256", + Jwk: &dpopHeaderJwk{ + Kty: "EC", + X: base64.RawURLEncoding.EncodeToString(key.X.Bytes()), + Y: base64.RawURLEncoding.EncodeToString(key.Y.Bytes()), + Crv: "P-256", + }, + }) + if err != nil { + return "", fmt.Errorf("marshal header: %w", err) + } + + uuid, err := smithyrand.NewUUID(cryptorand.Reader).GetUUID() + if err != nil { + return "", fmt.Errorf("uuid: %w", err) + } + + payload, err := jsonb64(&dpopPayload{ + Jti: uuid, + Htm: "POST", + Htu: htu, + Iat: sdk.NowTime().Unix(), + }) + if err != nil { + return "", fmt.Errorf("marshal payload: %w", err) + } + + msg := fmt.Sprintf("%s.%s", header, payload) + + h := sha256.New() + h.Write([]byte(msg)) + + r, s, err := ecdsa.Sign(cryptorand.Reader, key, h.Sum(nil)) + if err != nil { + return "", fmt.Errorf("sign: %w", err) + } + + // DPOP signatures are formatted in RAW r || s form (with each value padded + // to fit in curve size which in our case is always the 256 bits) - rather + // than encoded in something like asn.1 + sig := make([]byte, curvelen*2) + r.FillBytes(sig[0:curvelen]) + s.FillBytes(sig[curvelen:]) + + dpop := fmt.Sprintf("%s.%s", msg, base64.RawURLEncoding.EncodeToString(sig)) + return dpop, nil +} + +func parseKey(pemBlock string) (*ecdsa.PrivateKey, error) { + block, _ := pem.Decode([]byte(pemBlock)) + priv, err := x509.ParseECPrivateKey(block.Bytes) + if err != nil { + return nil, fmt.Errorf("parse ec private key: %w", err) + } + + return priv, nil +} + +func jsonb64(v any) (string, error) { + j, err := json.MarshalIndent(v, "", " ") + if err != nil { + return "", err + } + + return base64.RawURLEncoding.EncodeToString(j), nil +} + +type dpopHeader struct { + Typ string `json:"typ"` + Alg string `json:"alg"` + Jwk *dpopHeaderJwk `json:"jwk"` +} + +type dpopHeaderJwk struct { + Kty string `json:"kty"` + X string `json:"x"` + Y string `json:"y"` + Crv string `json:"crv"` +} + +type dpopPayload struct { + Jti string `json:"jti"` + Htm string `json:"htm"` + Htu string `json:"htu"` + Iat int64 `json:"iat"` +} + +type signDPOP struct { + Token *loginToken +} + +func addSignDPOP(token *loginToken) func(o *signin.Options) { + return signin.WithAPIOptions(func(stack *middleware.Stack) error { + return stack.Finalize.Add(&signDPOP{token}, middleware.After) + }) +} + +func (*signDPOP) ID() string { + return "signDPOP" +} + +func (m *signDPOP) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, md middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, md, fmt.Errorf("unexpected transport type %T", req) + } + + dpop, err := mkdpop(m.Token, req.URL.String()) + if err != nil { + return out, md, fmt.Errorf("sign dpop: %w", err) + } + + req.Header.Set("DPoP", dpop) + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go new file mode 100644 index 00000000000..6cd5281d49f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/file.go @@ -0,0 +1,14 @@ +package logincreds + +import ( + "io" + "os" +) + +var openFile func(string) (io.ReadCloser, error) = func(name string) (io.ReadCloser, error) { + return os.Open(name) +} + +var createFile func(string) (io.WriteCloser, error) = func(name string) (io.WriteCloser, error) { + return os.Create(name) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go new file mode 100644 index 00000000000..3e6357b87c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go @@ -0,0 +1,172 @@ +// Package logincreds implements AWS credential provision for sessions created +// via an `aws login` command. +package logincreds + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "os" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/aws-sdk-go-v2/service/signin" + "github.com/aws/aws-sdk-go-v2/service/signin/types" +) + +// ProviderName identifies the login provider. +const ProviderName = "LoginProvider" + +// TokenAPIClient provides the interface for the login session's token +// retrieval operation. +type TokenAPIClient interface { + CreateOAuth2Token(context.Context, *signin.CreateOAuth2TokenInput, ...func(*signin.Options)) (*signin.CreateOAuth2TokenOutput, error) +} + +// Provider supplies credentials for an `aws login` session. +type Provider struct { + options Options +} + +var _ aws.CredentialsProvider = (*Provider)(nil) + +// Options configures the Provider. +type Options struct { + Client TokenAPIClient + + // APIOptions to pass to the underlying CreateOAuth2Token operation. + ClientOptions []func(*signin.Options) + + // The path to the cached login token. + CachedTokenFilepath string + + // The chain of providers that was used to create this provider. + // + // These values are for reporting purposes and are not meant to be set up + // directly. + CredentialSources []aws.CredentialSource +} + +// New returns a new login session credentials provider. +func New(client TokenAPIClient, path string, opts ...func(*Options)) *Provider { + options := Options{ + Client: client, + CachedTokenFilepath: path, + } + + for _, opt := range opts { + opt(&options) + } + + return &Provider{options} +} + +// Retrieve generates a new set of temporary credentials using an `aws login` +// session. +func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { + token, err := p.loadToken() + if err != nil { + return aws.Credentials{}, fmt.Errorf("load login token: %w", err) + } + if err := token.Validate(); err != nil { + return aws.Credentials{}, fmt.Errorf("validate login token: %w", err) + } + + // the token may have been refreshed elsewhere or the login session might + // have just been created + if sdk.NowTime().Before(token.AccessToken.ExpiresAt) { + return token.Credentials(), nil + } + + opts := make([]func(*signin.Options), len(p.options.ClientOptions)+1) + opts[0] = addSignDPOP(token) + copy(opts[1:], p.options.ClientOptions) + + out, err := p.options.Client.CreateOAuth2Token(ctx, &signin.CreateOAuth2TokenInput{ + TokenInput: &types.CreateOAuth2TokenRequestBody{ + ClientId: aws.String(token.ClientID), + GrantType: aws.String("refresh_token"), + RefreshToken: aws.String(token.RefreshToken), + }, + }, opts...) + if err != nil { + var terr *types.AccessDeniedException + if errors.As(err, &terr) { + err = toAccessDeniedError(terr) + } + return aws.Credentials{}, fmt.Errorf("create oauth2 token: %w", err) + } + + token.Update(out) + if err := p.saveToken(token); err != nil { + return aws.Credentials{}, fmt.Errorf("save token: %w", err) + } + + return token.Credentials(), nil +} + +// ProviderSources returns the credential chain that was used to construct this +// provider. +func (p *Provider) ProviderSources() []aws.CredentialSource { + if p.options.CredentialSources == nil { + return []aws.CredentialSource{aws.CredentialSourceLogin} + } + return p.options.CredentialSources +} + +func (p *Provider) loadToken() (*loginToken, error) { + f, err := openFile(p.options.CachedTokenFilepath) + if err != nil && os.IsNotExist(err) { + return nil, fmt.Errorf("token file not found, please reauthenticate") + } + if err != nil { + return nil, err + } + defer f.Close() + + j, err := io.ReadAll(f) + if err != nil { + return nil, err + } + + var t *loginToken + if err := json.Unmarshal(j, &t); err != nil { + return nil, err + } + + return t, nil +} + +func (p *Provider) saveToken(token *loginToken) error { + j, err := json.Marshal(token) + if err != nil { + return err + } + + f, err := createFile(p.options.CachedTokenFilepath) + if err != nil { + return err + } + defer f.Close() + + if _, err := f.Write(j); err != nil { + return err + } + + return nil +} + +func toAccessDeniedError(err *types.AccessDeniedException) error { + switch err.Error_ { + case types.OAuth2ErrorCodeTokenExpired: + return fmt.Errorf("login session has expired, please reauthenticate") + case types.OAuth2ErrorCodeUserCredentialsChanged: + return fmt.Errorf("login session password has changed, please reauthenticate") + case types.OAuth2ErrorCodeInsufficientPermissions: + return fmt.Errorf("insufficient permissions, you may be missing permissions for the CreateOAuth2Token action") + default: + return err + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go new file mode 100644 index 00000000000..1a97b98cdc2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go @@ -0,0 +1,110 @@ +package logincreds + +import ( + "crypto/sha256" + "encoding/hex" + "errors" + "fmt" + "path/filepath" + "strings" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/sdk" + "github.com/aws/aws-sdk-go-v2/internal/shareddefaults" + "github.com/aws/aws-sdk-go-v2/service/signin" +) + +var userHomeDir = shareddefaults.UserHomeDir + +// StandardCachedTokenFilepath returns the filepath for the cached login token +// file. Key that will be used to compute a SHA256 value that is hex encoded. +// +// An overriden root dir can be provided, if not set the path defaults to +// ~/.aws/sso/cache. +func StandardCachedTokenFilepath(session, dir string) (string, error) { + session = strings.TrimSpace(session) + + if len(dir) == 0 { + dir = userHomeDir() + if len(dir) == 0 { + return "", errors.New("user home dir is blank") + } + dir = filepath.Join(dir, ".aws", "login", "cache") + } + + h := sha256.New() + h.Write([]byte(session)) + + filename := strings.ToLower(hex.EncodeToString(h.Sum(nil))) + ".json" + return filepath.Join(dir, filename), nil +} + +// contents of the token as they appear on disk +type loginToken struct { + AccessToken *loginTokenAccessToken `json:"accessToken"` + TokenType string `json:"tokenType"` + RefreshToken string `json:"refreshToken"` + IdentityToken string `json:"identityToken"` + ClientID string `json:"clientId"` + DPOPKey string `json:"dpopKey"` +} + +type loginTokenAccessToken struct { + AccessKeyID string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + SessionToken string `json:"sessionToken"` + AccountID string `json:"accountId"` + ExpiresAt time.Time `json:"expiresAt"` +} + +func (t *loginToken) Validate() error { + if t.AccessToken == nil { + return fmt.Errorf("missing accessToken") + } + if t.AccessToken.AccessKeyID == "" { + return fmt.Errorf("missing accessToken.accessKeyId") + } + if t.AccessToken.SecretAccessKey == "" { + return fmt.Errorf("missing accessToken.secretAccessKey") + } + if t.AccessToken.SessionToken == "" { + return fmt.Errorf("missing accessToken.sessionToken") + } + if t.AccessToken.AccountID == "" { + return fmt.Errorf("missing accessToken.accountId") + } + if t.AccessToken.ExpiresAt.IsZero() { + return fmt.Errorf("missing accessToken.expiresAt") + } + if t.ClientID == "" { + return fmt.Errorf("missing clientId") + } + if t.RefreshToken == "" { + return fmt.Errorf("missing refreshToken") + } + if t.DPOPKey == "" { + return fmt.Errorf("missing dpopKey") + } + return nil +} + +func (t *loginToken) Credentials() aws.Credentials { + return aws.Credentials{ + AccessKeyID: t.AccessToken.AccessKeyID, + SecretAccessKey: t.AccessToken.SecretAccessKey, + SessionToken: t.AccessToken.SessionToken, + Source: ProviderName, + CanExpire: true, + Expires: t.AccessToken.ExpiresAt, + AccountID: t.AccessToken.AccountID, + } +} + +func (t *loginToken) Update(out *signin.CreateOAuth2TokenOutput) { + t.AccessToken.AccessKeyID = *out.TokenOutput.AccessToken.AccessKeyId + t.AccessToken.SecretAccessKey = *out.TokenOutput.AccessToken.SecretAccessKey + t.AccessToken.SessionToken = *out.TokenOutput.AccessToken.SessionToken + t.AccessToken.ExpiresAt = sdk.NowTime().Add(time.Duration(*out.TokenOutput.ExpiresIn) * time.Second) + t.RefreshToken = *out.TokenOutput.RefreshToken +} 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 6b8c454739d..27d5e4d613c 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,38 @@ +# v1.18.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.18.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.18.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.18.9 (2025-09-26) * **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 ce89f5829de..0bb72d7b57c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.9" +const goModuleVersion = "1.18.17" 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 b34f47c9151..552fb90a8b3 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,38 @@ +# v1.4.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.4.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.4.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.9 (2025-09-26) * **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 ebc2f6a7651..59dbd389b81 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.9" +const goModuleVersion = "1.4.17" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go index 6ad5df64691..6ab4d9669fb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go @@ -386,6 +386,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "us-isob-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, }, }, { 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 b346b0be9b9..c789264d2b0 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 @@ -194,6 +194,9 @@ }, "us-isob-east-1" : { "description" : "US ISOB East (Ohio)" + }, + "us-isob-west-1" : { + "description" : "US ISOB West" } } }, { 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 8de3bfec8c7..cdf46e69d87 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,38 @@ +# v2.7.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v2.7.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v2.7.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v2.7.9 (2025-09-26) * **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 c5168da33a3..3d6ed9c6a6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.9" +const goModuleVersion = "2.7.17" 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 f729db535b7..4791d328c04 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.4 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. + # v1.8.3 (2025-02-18) * **Bug Fix**: Bump go version to 1.22 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 00df0e3cb9b..f94970e7742 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.3" +const goModuleVersion = "1.8.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md index 815e1331b7d..84a6cc94a07 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md @@ -1,3 +1,92 @@ +# v1.54.0 (2026-01-22) + +* **Feature**: Adds additional waiters to Amazon DynamoDB. + +# v1.53.6 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.5 (2025-12-09) + +* No change notes available for this release. + +# v1.53.4 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.3 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.53.2 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.53.1 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.0 (2025-11-19) + +* **Feature**: Extended Global Secondary Index (GSI) composite keys to support up to 8 attributes. + +# v1.52.6 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.52.5 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.52.4 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.52.3 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.2 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.1 (2025-10-22) + +* No change notes available for this release. + +# v1.52.0 (2025-10-21) + +* **Feature**: Add AccountID based endpoint metric to endpoint rules. + +# v1.51.1 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.51.0 (2025-10-02) + +* **Feature**: Add support for dual-stack account endpoint generation + +# v1.50.5 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.4 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.3 (2025-09-10) + +* No change notes available for this release. + +# v1.50.2 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.50.1 (2025-08-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go index 487c8200a6a..8ddfebeaf5f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go @@ -72,7 +72,12 @@ func timeOperationMetric[T any]( ctx context.Context, metric string, fn func() (T, error), opts ...metrics.RecordMetricOption, ) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) start := time.Now() @@ -85,7 +90,12 @@ func timeOperationMetric[T any]( } func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) var ended bool @@ -113,6 +123,12 @@ func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { type operationMetricsKey struct{} func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/dynamodb") om := &operationMetrics{} @@ -160,7 +176,10 @@ func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Hi } func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil } func operationTracer(p tracing.TracerProvider) tracing.Tracer { @@ -1038,138 +1057,49 @@ func addInterceptAttempt(stack *middleware.Stack, opts Options) error { }, "Retry", middleware.After) } -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -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 addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchExecuteStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchExecuteStatement.go index 0b4d0edaf22..5afc969d373 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchExecuteStatement.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchExecuteStatement.go @@ -187,40 +187,7 @@ func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware. if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchGetItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchGetItem.go index 5e2394a8521..11b0ea5a641 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchGetItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchGetItem.go @@ -337,40 +337,7 @@ func (c *Client) addOperationBatchGetItemMiddlewares(stack *middleware.Stack, op if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchWriteItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchWriteItem.go index 2056cdd927f..a21c3691588 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchWriteItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_BatchWriteItem.go @@ -357,40 +357,7 @@ func (c *Client) addOperationBatchWriteItemMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateBackup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateBackup.go index db7e0776102..fd8eefd66e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateBackup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateBackup.go @@ -196,40 +196,7 @@ func (c *Client) addOperationCreateBackupMiddlewares(stack *middleware.Stack, op if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateGlobalTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateGlobalTable.go index 163348c8280..bd2a8829e1a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateGlobalTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateGlobalTable.go @@ -218,40 +218,7 @@ func (c *Client) addOperationCreateGlobalTableMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateTable.go index 7d4510adb83..1d8a0254b73 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_CreateTable.go @@ -384,40 +384,7 @@ func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteBackup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteBackup.go index 799be66b63c..80f1a906013 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteBackup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteBackup.go @@ -163,40 +163,7 @@ func (c *Client) addOperationDeleteBackupMiddlewares(stack *middleware.Stack, op if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteItem.go index 386e2ecf1d6..b15f0f3edbb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteItem.go @@ -359,40 +359,7 @@ func (c *Client) addOperationDeleteItemMiddlewares(stack *middleware.Stack, opti if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteResourcePolicy.go index 768fb574dc7..6eb78bfabf1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteResourcePolicy.go @@ -190,40 +190,7 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteTable.go index a9dbd30779e..4768b497308 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DeleteTable.go @@ -184,40 +184,7 @@ func (c *Client) addOperationDeleteTableMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeBackup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeBackup.go index be01e640700..0ba89f0be26 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeBackup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeBackup.go @@ -163,40 +163,7 @@ func (c *Client) addOperationDescribeBackupMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContinuousBackups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContinuousBackups.go index b814e0517fb..f82ed62343f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContinuousBackups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContinuousBackups.go @@ -179,40 +179,7 @@ func (c *Client) addOperationDescribeContinuousBackupsMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContributorInsights.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContributorInsights.go index 338ff4df13d..8f4571f2f86 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContributorInsights.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeContributorInsights.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/dynamodb/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" ) @@ -198,45 +200,209 @@ func (c *Client) addOperationDescribeContributorInsightsMiddlewares(stack *middl if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { + if err = addInterceptors(stack, options); err != nil { return err } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err + return nil +} + +// ContributorInsightsEnabledWaiterOptions are waiter options for +// ContributorInsightsEnabledWaiter +type ContributorInsightsEnabledWaiterOptions 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, + // ContributorInsightsEnabledWaiter will use default minimum delay of 20 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, ContributorInsightsEnabledWaiter 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, *DescribeContributorInsightsInput, *DescribeContributorInsightsOutput, error) (bool, error) +} + +// ContributorInsightsEnabledWaiter defines the waiters for +// ContributorInsightsEnabled +type ContributorInsightsEnabledWaiter struct { + client DescribeContributorInsightsAPIClient + + options ContributorInsightsEnabledWaiterOptions +} + +// NewContributorInsightsEnabledWaiter constructs a +// ContributorInsightsEnabledWaiter. +func NewContributorInsightsEnabledWaiter(client DescribeContributorInsightsAPIClient, optFns ...func(*ContributorInsightsEnabledWaiterOptions)) *ContributorInsightsEnabledWaiter { + options := ContributorInsightsEnabledWaiterOptions{} + options.MinDelay = 20 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = contributorInsightsEnabledStateRetryable + + for _, fn := range optFns { + fn(&options) } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err + return &ContributorInsightsEnabledWaiter{ + client: client, + options: options, } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err +} + +// Wait calls the waiter function for ContributorInsightsEnabled waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *ContributorInsightsEnabledWaiter) Wait(ctx context.Context, params *DescribeContributorInsightsInput, maxWaitDur time.Duration, optFns ...func(*ContributorInsightsEnabledWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for ContributorInsightsEnabled 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 *ContributorInsightsEnabledWaiter) WaitForOutput(ctx context.Context, params *DescribeContributorInsightsInput, maxWaitDur time.Duration, optFns ...func(*ContributorInsightsEnabledWaiterOptions)) (*DescribeContributorInsightsOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") } - if err = addInterceptTransmit(stack, options); err != nil { - return err + + options := w.options + for _, fn := range optFns { + fn(&options) } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err + + 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) } - if err = addSpanInitializeStart(stack); err != nil { - return err + + 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.DescribeContributorInsights(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) + } } - if err = addSpanInitializeEnd(stack); err != nil { - return err + return nil, fmt.Errorf("exceeded max wait time for ContributorInsightsEnabled waiter") +} + +func contributorInsightsEnabledStateRetryable(ctx context.Context, input *DescribeContributorInsightsInput, output *DescribeContributorInsightsOutput, err error) (bool, error) { + + if err == nil { + v1 := output.ContributorInsightsStatus + expectedValue := "ENABLED" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, nil + } } - if err = addSpanBuildRequestStart(stack); err != nil { - return err + + if err == nil { + v1 := output.ContributorInsightsStatus + expectedValue := "FAILED" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err + + if err != nil { + return false, err } - return nil + return true, nil } +// DescribeContributorInsightsAPIClient is a client that implements the +// DescribeContributorInsights operation. +type DescribeContributorInsightsAPIClient interface { + DescribeContributorInsights(context.Context, *DescribeContributorInsightsInput, ...func(*Options)) (*DescribeContributorInsightsOutput, error) +} + +var _ DescribeContributorInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeContributorInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeEndpoints.go index 0e7c17b82f4..0818369b911 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeEndpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeEndpoints.go @@ -147,40 +147,7 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeExport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeExport.go index 22eba3e4abe..6c35bc510a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeExport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeExport.go @@ -8,7 +8,10 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/dynamodb/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" ) // Describes an existing table export. @@ -157,45 +160,215 @@ func (c *Client) addOperationDescribeExportMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { + if err = addInterceptors(stack, options); err != nil { return err } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err + return nil +} + +// ExportCompletedWaiterOptions are waiter options for ExportCompletedWaiter +type ExportCompletedWaiterOptions 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, + // ExportCompletedWaiter will use default minimum delay of 20 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, ExportCompletedWaiter 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, *DescribeExportInput, *DescribeExportOutput, error) (bool, error) +} + +// ExportCompletedWaiter defines the waiters for ExportCompleted +type ExportCompletedWaiter struct { + client DescribeExportAPIClient + + options ExportCompletedWaiterOptions +} + +// NewExportCompletedWaiter constructs a ExportCompletedWaiter. +func NewExportCompletedWaiter(client DescribeExportAPIClient, optFns ...func(*ExportCompletedWaiterOptions)) *ExportCompletedWaiter { + options := ExportCompletedWaiterOptions{} + options.MinDelay = 20 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = exportCompletedStateRetryable + + for _, fn := range optFns { + fn(&options) } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err + return &ExportCompletedWaiter{ + client: client, + options: options, } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err +} + +// Wait calls the waiter function for ExportCompleted waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *ExportCompletedWaiter) Wait(ctx context.Context, params *DescribeExportInput, maxWaitDur time.Duration, optFns ...func(*ExportCompletedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for ExportCompleted 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 *ExportCompletedWaiter) WaitForOutput(ctx context.Context, params *DescribeExportInput, maxWaitDur time.Duration, optFns ...func(*ExportCompletedWaiterOptions)) (*DescribeExportOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") } - if err = addInterceptTransmit(stack, options); err != nil { - return err + + options := w.options + for _, fn := range optFns { + fn(&options) } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err + + 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) } - if err = addSpanInitializeStart(stack); err != nil { - return err + + 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.DescribeExport(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) + } } - if err = addSpanInitializeEnd(stack); err != nil { - return err + return nil, fmt.Errorf("exceeded max wait time for ExportCompleted waiter") +} + +func exportCompletedStateRetryable(ctx context.Context, input *DescribeExportInput, output *DescribeExportOutput, err error) (bool, error) { + + if err == nil { + v1 := output.ExportDescription + var v2 types.ExportStatus + if v1 != nil { + v3 := v1.ExportStatus + v2 = v3 + } + expectedValue := "COMPLETED" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, nil + } } - if err = addSpanBuildRequestStart(stack); err != nil { - return err + + if err == nil { + v1 := output.ExportDescription + var v2 types.ExportStatus + if v1 != nil { + v3 := v1.ExportStatus + v2 = v3 + } + expectedValue := "FAILED" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err + + if err != nil { + return false, err } - return nil + return true, nil } +// DescribeExportAPIClient is a client that implements the DescribeExport +// operation. +type DescribeExportAPIClient interface { + DescribeExport(context.Context, *DescribeExportInput, ...func(*Options)) (*DescribeExportOutput, error) +} + +var _ DescribeExportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTable.go index 95b1fb4e63a..4e4a9d1cbd5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTable.go @@ -173,40 +173,7 @@ func (c *Client) addOperationDescribeGlobalTableMiddlewares(stack *middleware.St if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTableSettings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTableSettings.go index 78378b4c88f..3408736f217 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTableSettings.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeGlobalTableSettings.go @@ -176,40 +176,7 @@ func (c *Client) addOperationDescribeGlobalTableSettingsMiddlewares(stack *middl if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeImport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeImport.go index a4c70e5d5bb..606f9756a77 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeImport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeImport.go @@ -8,7 +8,10 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/dynamodb/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" ) // Represents the properties of the import. @@ -161,45 +164,230 @@ func (c *Client) addOperationDescribeImportMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { + if err = addInterceptors(stack, options); err != nil { return err } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err + return nil +} + +// ImportCompletedWaiterOptions are waiter options for ImportCompletedWaiter +type ImportCompletedWaiterOptions 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, + // ImportCompletedWaiter will use default minimum delay of 20 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, ImportCompletedWaiter 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, *DescribeImportInput, *DescribeImportOutput, error) (bool, error) +} + +// ImportCompletedWaiter defines the waiters for ImportCompleted +type ImportCompletedWaiter struct { + client DescribeImportAPIClient + + options ImportCompletedWaiterOptions +} + +// NewImportCompletedWaiter constructs a ImportCompletedWaiter. +func NewImportCompletedWaiter(client DescribeImportAPIClient, optFns ...func(*ImportCompletedWaiterOptions)) *ImportCompletedWaiter { + options := ImportCompletedWaiterOptions{} + options.MinDelay = 20 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = importCompletedStateRetryable + + for _, fn := range optFns { + fn(&options) } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err + return &ImportCompletedWaiter{ + client: client, + options: options, } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err +} + +// Wait calls the waiter function for ImportCompleted waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *ImportCompletedWaiter) Wait(ctx context.Context, params *DescribeImportInput, maxWaitDur time.Duration, optFns ...func(*ImportCompletedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for ImportCompleted 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 *ImportCompletedWaiter) WaitForOutput(ctx context.Context, params *DescribeImportInput, maxWaitDur time.Duration, optFns ...func(*ImportCompletedWaiterOptions)) (*DescribeImportOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err + + options := w.options + for _, fn := range optFns { + fn(&options) } - if err = addInterceptTransmit(stack, options); err != nil { - return err + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err + + 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) } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err + + 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.DescribeImport(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) + } } - if err = addSpanInitializeStart(stack); err != nil { - return err + return nil, fmt.Errorf("exceeded max wait time for ImportCompleted waiter") +} + +func importCompletedStateRetryable(ctx context.Context, input *DescribeImportInput, output *DescribeImportOutput, err error) (bool, error) { + + if err == nil { + v1 := output.ImportTableDescription + var v2 types.ImportStatus + if v1 != nil { + v3 := v1.ImportStatus + v2 = v3 + } + expectedValue := "COMPLETED" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, nil + } } - if err = addSpanInitializeEnd(stack); err != nil { - return err + + if err == nil { + v1 := output.ImportTableDescription + var v2 types.ImportStatus + if v1 != nil { + v3 := v1.ImportStatus + v2 = v3 + } + expectedValue := "FAILED" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } } - if err = addSpanBuildRequestStart(stack); err != nil { - return err + + if err == nil { + v1 := output.ImportTableDescription + var v2 types.ImportStatus + if v1 != nil { + v3 := v1.ImportStatus + v2 = v3 + } + expectedValue := "CANCELLED" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err + + if err != nil { + return false, err } - return nil + return true, nil } +// DescribeImportAPIClient is a client that implements the DescribeImport +// operation. +type DescribeImportAPIClient interface { + DescribeImport(context.Context, *DescribeImportInput, ...func(*Options)) (*DescribeImportOutput, error) +} + +var _ DescribeImportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go index dd882cfe735..ca6a2bf2999 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go @@ -9,7 +9,11 @@ import ( "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" "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" + "strconv" + "time" ) // Returns information about the status of Kinesis streaming. @@ -165,43 +169,235 @@ func (c *Client) addOperationDescribeKinesisStreamingDestinationMiddlewares(stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { + if err = addInterceptors(stack, options); err != nil { return err } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err + return nil +} + +// KinesisStreamingDestinationActiveWaiterOptions are waiter options for +// KinesisStreamingDestinationActiveWaiter +type KinesisStreamingDestinationActiveWaiterOptions 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, + // KinesisStreamingDestinationActiveWaiter will use default minimum delay of 20 + // 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, KinesisStreamingDestinationActiveWaiter 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, *DescribeKinesisStreamingDestinationInput, *DescribeKinesisStreamingDestinationOutput, error) (bool, error) +} + +// KinesisStreamingDestinationActiveWaiter defines the waiters for +// KinesisStreamingDestinationActive +type KinesisStreamingDestinationActiveWaiter struct { + client DescribeKinesisStreamingDestinationAPIClient + + options KinesisStreamingDestinationActiveWaiterOptions +} + +// NewKinesisStreamingDestinationActiveWaiter constructs a +// KinesisStreamingDestinationActiveWaiter. +func NewKinesisStreamingDestinationActiveWaiter(client DescribeKinesisStreamingDestinationAPIClient, optFns ...func(*KinesisStreamingDestinationActiveWaiterOptions)) *KinesisStreamingDestinationActiveWaiter { + options := KinesisStreamingDestinationActiveWaiterOptions{} + options.MinDelay = 20 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = kinesisStreamingDestinationActiveStateRetryable + + for _, fn := range optFns { + fn(&options) } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err + return &KinesisStreamingDestinationActiveWaiter{ + client: client, + options: options, } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err +} + +// Wait calls the waiter function for KinesisStreamingDestinationActive waiter. +// The maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur +// is required and must be greater than zero. +func (w *KinesisStreamingDestinationActiveWaiter) Wait(ctx context.Context, params *DescribeKinesisStreamingDestinationInput, maxWaitDur time.Duration, optFns ...func(*KinesisStreamingDestinationActiveWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for KinesisStreamingDestinationActive +// 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 *KinesisStreamingDestinationActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeKinesisStreamingDestinationInput, maxWaitDur time.Duration, optFns ...func(*KinesisStreamingDestinationActiveWaiterOptions)) (*DescribeKinesisStreamingDestinationOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") } - if err = addInterceptTransmit(stack, options); err != nil { - return err + + options := w.options + for _, fn := range optFns { + fn(&options) } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err + + 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) } - if err = addSpanInitializeStart(stack); err != nil { - return err + + 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.DescribeKinesisStreamingDestination(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) + } } - if err = addSpanInitializeEnd(stack); err != nil { - return err + return nil, fmt.Errorf("exceeded max wait time for KinesisStreamingDestinationActive waiter") +} + +func kinesisStreamingDestinationActiveStateRetryable(ctx context.Context, input *DescribeKinesisStreamingDestinationInput, output *DescribeKinesisStreamingDestinationOutput, err error) (bool, error) { + + if err == nil { + v1 := output.KinesisDataStreamDestinations + var v2 []types.DestinationStatus + for _, v := range v1 { + v3 := v.DestinationStatus + v2 = append(v2, v3) + } + expectedValue := "ACTIVE" + var match bool + for _, v := range v2 { + if string(v) == expectedValue { + match = true + break + } + } + + if match { + return false, nil + } } - if err = addSpanBuildRequestStart(stack); err != nil { - return err + + if err == nil { + v1 := output.KinesisDataStreamDestinations + v2 := len(v1) + v3 := 0 + v4 := int64(v2) > int64(v3) + v5 := output.KinesisDataStreamDestinations + var v6 []types.KinesisDataStreamDestination + for _, v := range v5 { + v7 := v.DestinationStatus + v8 := "DISABLED" + v9 := string(v7) == string(v8) + v10 := v.DestinationStatus + v11 := "ENABLE_FAILED" + v12 := string(v10) == string(v11) + v13 := v9 || v12 + if v13 { + v6 = append(v6, v) + } + } + v14 := len(v6) + v15 := output.KinesisDataStreamDestinations + v16 := len(v15) + v17 := int64(v14) == int64(v16) + v18 := v4 && v17 + expectedValue := "true" + bv, err := strconv.ParseBool(expectedValue) + if err != nil { + return false, fmt.Errorf("error parsing boolean from string %w", err) + } + if v18 == bv { + return false, fmt.Errorf("waiter state transitioned to Failure") + } } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err + + if err != nil { + return false, err } - return nil + return true, nil } func addOpDescribeKinesisStreamingDestinationDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { @@ -247,6 +443,14 @@ func (c *Client) fetchOpDescribeKinesisStreamingDestinationDiscoverEndpoint(ctx return internalEndpointDiscovery.WeightedAddress{}, nil } +// DescribeKinesisStreamingDestinationAPIClient is a client that implements the +// DescribeKinesisStreamingDestination operation. +type DescribeKinesisStreamingDestinationAPIClient interface { + DescribeKinesisStreamingDestination(context.Context, *DescribeKinesisStreamingDestinationInput, ...func(*Options)) (*DescribeKinesisStreamingDestinationOutput, error) +} + +var _ DescribeKinesisStreamingDestinationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeKinesisStreamingDestination(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeLimits.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeLimits.go index 915a2a018ac..2d09b8b1d47 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeLimits.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeLimits.go @@ -221,40 +221,7 @@ func (c *Client) addOperationDescribeLimitsMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTable.go index 4a0cd9d29db..291062aa42e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTable.go @@ -175,40 +175,7 @@ func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, o if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go index f8e2f77b78a..a5a888718bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go @@ -158,40 +158,7 @@ func (c *Client) addOperationDescribeTableReplicaAutoScalingMiddlewares(stack *m if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTimeToLive.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTimeToLive.go index 5ea9ab1eea7..834ba374970 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTimeToLive.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DescribeTimeToLive.go @@ -162,40 +162,7 @@ func (c *Client) addOperationDescribeTimeToLiveMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DisableKinesisStreamingDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DisableKinesisStreamingDestination.go index 5df8f9ea0df..2f5ea263fc3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DisableKinesisStreamingDestination.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_DisableKinesisStreamingDestination.go @@ -180,40 +180,7 @@ func (c *Client) addOperationDisableKinesisStreamingDestinationMiddlewares(stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_EnableKinesisStreamingDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_EnableKinesisStreamingDestination.go index c7b047c7f27..b7cbb83d3bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_EnableKinesisStreamingDestination.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_EnableKinesisStreamingDestination.go @@ -182,40 +182,7 @@ func (c *Client) addOperationEnableKinesisStreamingDestinationMiddlewares(stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteStatement.go index 655372e1434..419cd10a616 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteStatement.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteStatement.go @@ -235,40 +235,7 @@ func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteTransaction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteTransaction.go index 85c587bc3b2..8d33b0c6940 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteTransaction.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExecuteTransaction.go @@ -177,40 +177,7 @@ func (c *Client) addOperationExecuteTransactionMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExportTableToPointInTime.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExportTableToPointInTime.go index 491a4482329..65f7de7f0f9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExportTableToPointInTime.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ExportTableToPointInTime.go @@ -223,40 +223,7 @@ func (c *Client) addOperationExportTableToPointInTimeMiddlewares(stack *middlewa if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetItem.go index 5a8e1f6bedd..1186c3366a6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetItem.go @@ -269,40 +269,7 @@ func (c *Client) addOperationGetItemMiddlewares(stack *middleware.Stack, options if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetResourcePolicy.go index 31bae3f42ae..c4b6fb5c68f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_GetResourcePolicy.go @@ -195,40 +195,7 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ImportTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ImportTable.go index ab97739f8bc..e3cbba2674a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ImportTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ImportTable.go @@ -201,40 +201,7 @@ func (c *Client) addOperationImportTableMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListBackups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListBackups.go index 4d594fa5b04..7161f605b25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListBackups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListBackups.go @@ -215,40 +215,7 @@ func (c *Client) addOperationListBackupsMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListContributorInsights.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListContributorInsights.go index d4870973e5f..dc98ea16573 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListContributorInsights.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListContributorInsights.go @@ -163,40 +163,7 @@ func (c *Client) addOperationListContributorInsightsMiddlewares(stack *middlewar if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListExports.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListExports.go index 33c8aef4654..8bd9e56a037 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListExports.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListExports.go @@ -164,40 +164,7 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListGlobalTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListGlobalTables.go index dcf73cdadb6..ef80d1c6172 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListGlobalTables.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListGlobalTables.go @@ -177,40 +177,7 @@ func (c *Client) addOperationListGlobalTablesMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListImports.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListImports.go index 5a02bf9c9cb..77b305d3da5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListImports.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListImports.go @@ -164,40 +164,7 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTables.go index ec575e96791..9b5cc6707d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTables.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTables.go @@ -172,40 +172,7 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTagsOfResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTagsOfResource.go index 6d9ed73927a..0c6deb06341 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTagsOfResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_ListTagsOfResource.go @@ -177,40 +177,7 @@ func (c *Client) addOperationListTagsOfResourceMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutItem.go index 43bd113d2c0..2927b3e8f7a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutItem.go @@ -392,40 +392,7 @@ func (c *Client) addOperationPutItemMiddlewares(stack *middleware.Stack, options if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutResourcePolicy.go index d14c3e1f562..2ef9ef2757b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_PutResourcePolicy.go @@ -219,40 +219,7 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Query.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Query.go index d0e6f183624..37c934bf499 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Query.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Query.go @@ -561,40 +561,7 @@ func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options O if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableFromBackup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableFromBackup.go index 250d963882f..5e3f0fb737a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableFromBackup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableFromBackup.go @@ -207,40 +207,7 @@ func (c *Client) addOperationRestoreTableFromBackupMiddlewares(stack *middleware if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableToPointInTime.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableToPointInTime.go index 380fcb85e96..fef6374a519 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableToPointInTime.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_RestoreTableToPointInTime.go @@ -239,40 +239,7 @@ func (c *Client) addOperationRestoreTableToPointInTimeMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Scan.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Scan.go index d3604bc75c2..cb16c2804f5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Scan.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_Scan.go @@ -492,40 +492,7 @@ func (c *Client) addOperationScanMiddlewares(stack *middleware.Stack, options Op if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TagResource.go index f80afd79e96..8d23115e446 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TagResource.go @@ -182,40 +182,7 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactGetItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactGetItems.go index ce6db313c87..4a796353b0c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactGetItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactGetItems.go @@ -212,40 +212,7 @@ func (c *Client) addOperationTransactGetItemsMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactWriteItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactWriteItems.go index a345302a810..2ec6d35b745 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactWriteItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_TransactWriteItems.go @@ -317,40 +317,7 @@ func (c *Client) addOperationTransactWriteItemsMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UntagResource.go index c481bb262d4..f887ae2575a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UntagResource.go @@ -180,40 +180,7 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContinuousBackups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContinuousBackups.go index 4d9dcb86a7c..22112395ede 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContinuousBackups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContinuousBackups.go @@ -180,40 +180,7 @@ func (c *Client) addOperationUpdateContinuousBackupsMiddlewares(stack *middlewar if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContributorInsights.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContributorInsights.go index edb045481ff..62a46fed045 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContributorInsights.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateContributorInsights.go @@ -187,40 +187,7 @@ func (c *Client) addOperationUpdateContributorInsightsMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTable.go index 25878256fc5..20000167cbb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTable.go @@ -201,40 +201,7 @@ func (c *Client) addOperationUpdateGlobalTableMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTableSettings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTableSettings.go index 6505381e88e..60050aa8c7e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTableSettings.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateGlobalTableSettings.go @@ -204,40 +204,7 @@ func (c *Client) addOperationUpdateGlobalTableSettingsMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateItem.go index 8416ad88e78..36c44dbc112 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateItem.go @@ -445,40 +445,7 @@ func (c *Client) addOperationUpdateItemMiddlewares(stack *middleware.Stack, opti if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go index 9a1b68ebd00..127c84a2b5b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go @@ -179,40 +179,7 @@ func (c *Client) addOperationUpdateKinesisStreamingDestinationMiddlewares(stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTable.go index 325db35c8d1..16bec163fc8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTable.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTable.go @@ -290,40 +290,7 @@ func (c *Client) addOperationUpdateTableMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go index 26b33641df8..a76d1bd08a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go @@ -170,40 +170,7 @@ func (c *Client) addOperationUpdateTableReplicaAutoScalingMiddlewares(stack *mid if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTimeToLive.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTimeToLive.go index 6c0fc24a13e..451070a5320 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTimeToLive.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_op_UpdateTimeToLive.go @@ -197,40 +197,7 @@ func (c *Client) addOperationUpdateTimeToLiveMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/auth.go index b1d605c82de..1a80ea7f310 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/auth.go @@ -16,8 +16,9 @@ import ( "strings" ) -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { params.Region = options.Region + return nil } type setLegacyContextSigningOptionsMiddleware struct { @@ -94,14 +95,16 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(ctx, params, input, options) + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } - return params + return params, nil } // AuthSchemeResolver returns a set of possible authentication options for an @@ -152,7 +155,10 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") defer span.End() - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/endpoints.go index a859c043f04..afaaca494f6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/endpoints.go @@ -219,11 +219,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } -func bindRegion(region string) *string { +func bindRegion(region string) (*string, error) { if region == "" { - return nil + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) } - return aws.String(endpoints.MapFIPSRegion(region)) + + return aws.String(endpoints.MapFIPSRegion(region)), nil } // EndpointParameters provides the parameters that influence how endpoints are @@ -356,8 +360,49 @@ func (r *resolver) ResolveEndpoint( return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) } _UseDualStack := *params.UseDualStack + _ = _UseDualStack _UseFIPS := *params.UseFIPS + _ = _UseFIPS + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + 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") + } + if _Endpoint == func() string { + var out strings.Builder + out.WriteString("https://dynamodb.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html") + } + 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.Endpoint; exprVal != nil { _Endpoint := *exprVal _ = _Endpoint @@ -409,10 +454,10 @@ func (r *resolver) ResolveEndpoint( SchemeID: "aws.auth#sigv4", SignerProperties: func() smithy.Properties { var sp smithy.Properties + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + smithyhttp.SetSigV4SigningName(&sp, "dynamodb") smithyhttp.SetSigV4ASigningName(&sp, "dynamodb") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") return sp }(), }, @@ -514,12 +559,169 @@ func (r *resolver) ResolveEndpoint( } if _UseDualStack == true { if _PartitionResult.SupportsDualStack == true { + if exprVal := params.AccountIdEndpointMode; exprVal != nil { + _AccountIdEndpointMode := *exprVal + _ = _AccountIdEndpointMode + if !(_AccountIdEndpointMode == "disabled") { + if _PartitionResult.Name == "aws" { + if !(_UseFIPS == true) { + if exprVal := params.ResourceArn; exprVal != nil { + _ResourceArn := *exprVal + _ = _ResourceArn + if exprVal := awsrulesfn.ParseARN(_ResourceArn); exprVal != nil { + _ParsedArn := *exprVal + _ = _ParsedArn + if _ParsedArn.Service == "dynamodb" { + if rulesfn.IsValidHostLabel(_ParsedArn.Region, false) { + if _ParsedArn.Region == _Region { + if rulesfn.IsValidHostLabel(_ParsedArn.AccountId, false) { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_ParsedArn.AccountId) + out.WriteString(".ddb.") + 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{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("metricValues", []interface{}{ + "O", + }) + return out + }(), + }, nil + } + } + } + } + } + } + } + } + } + } + if exprVal := params.AccountIdEndpointMode; exprVal != nil { + _AccountIdEndpointMode := *exprVal + _ = _AccountIdEndpointMode + if !(_AccountIdEndpointMode == "disabled") { + if _PartitionResult.Name == "aws" { + if !(_UseFIPS == true) { + if exprVal := params.ResourceArnList; exprVal != nil { + _ResourceArnList := stringSlice(exprVal) + _ = _ResourceArnList + if exprVal := _ResourceArnList.Get(0); exprVal != nil { + _FirstArn := *exprVal + _ = _FirstArn + if exprVal := awsrulesfn.ParseARN(_FirstArn); exprVal != nil { + _ParsedArn := *exprVal + _ = _ParsedArn + if _ParsedArn.Service == "dynamodb" { + if rulesfn.IsValidHostLabel(_ParsedArn.Region, false) { + if _ParsedArn.Region == _Region { + if rulesfn.IsValidHostLabel(_ParsedArn.AccountId, false) { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_ParsedArn.AccountId) + out.WriteString(".ddb.") + 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{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("metricValues", []interface{}{ + "O", + }) + return out + }(), + }, nil + } + } + } + } + } + } + } + } + } + } + } + if exprVal := params.AccountIdEndpointMode; exprVal != nil { + _AccountIdEndpointMode := *exprVal + _ = _AccountIdEndpointMode + if !(_AccountIdEndpointMode == "disabled") { + if _PartitionResult.Name == "aws" { + if !(_UseFIPS == true) { + if exprVal := params.AccountId; exprVal != nil { + _AccountId := *exprVal + _ = _AccountId + if rulesfn.IsValidHostLabel(_AccountId, false) { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_AccountId) + out.WriteString(".ddb.") + 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{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("metricValues", []interface{}{ + "O", + }) + return out + }(), + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Credentials-sourced account ID parameter is invalid") + } + } + } + } + } if exprVal := params.AccountIdEndpointMode; exprVal != nil { _AccountIdEndpointMode := *exprVal _ = _AccountIdEndpointMode if _AccountIdEndpointMode == "required" { if !(_UseFIPS == true) { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required and DualStack is enabled, but DualStack account endpoints are not supported") + if _PartitionResult.Name == "aws" { + return endpoint, fmt.Errorf("endpoint rule error, %s", "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition") } return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported") } @@ -551,11 +753,66 @@ func (r *resolver) ResolveEndpoint( if !(_AccountIdEndpointMode == "disabled") { if _PartitionResult.Name == "aws" { if !(_UseFIPS == true) { - if !(_UseDualStack == true) { - if exprVal := params.ResourceArn; exprVal != nil { - _ResourceArn := *exprVal - _ = _ResourceArn - if exprVal := awsrulesfn.ParseARN(_ResourceArn); exprVal != nil { + if exprVal := params.ResourceArn; exprVal != nil { + _ResourceArn := *exprVal + _ = _ResourceArn + if exprVal := awsrulesfn.ParseARN(_ResourceArn); exprVal != nil { + _ParsedArn := *exprVal + _ = _ParsedArn + if _ParsedArn.Service == "dynamodb" { + if rulesfn.IsValidHostLabel(_ParsedArn.Region, false) { + if _ParsedArn.Region == _Region { + if rulesfn.IsValidHostLabel(_ParsedArn.AccountId, false) { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_ParsedArn.AccountId) + out.WriteString(".ddb.") + 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{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("metricValues", []interface{}{ + "O", + }) + return out + }(), + }, nil + } + } + } + } + } + } + } + } + } + } + if exprVal := params.AccountIdEndpointMode; exprVal != nil { + _AccountIdEndpointMode := *exprVal + _ = _AccountIdEndpointMode + if !(_AccountIdEndpointMode == "disabled") { + if _PartitionResult.Name == "aws" { + if !(_UseFIPS == true) { + if exprVal := params.ResourceArnList; exprVal != nil { + _ResourceArnList := stringSlice(exprVal) + _ = _ResourceArnList + if exprVal := _ResourceArnList.Get(0); exprVal != nil { + _FirstArn := *exprVal + _ = _FirstArn + if exprVal := awsrulesfn.ParseARN(_FirstArn); exprVal != nil { _ParsedArn := *exprVal _ = _ParsedArn if _ParsedArn.Service == "dynamodb" { @@ -581,6 +838,13 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("metricValues", []interface{}{ + "O", + }) + return out + }(), }, nil } } @@ -599,86 +863,39 @@ func (r *resolver) ResolveEndpoint( if !(_AccountIdEndpointMode == "disabled") { if _PartitionResult.Name == "aws" { if !(_UseFIPS == true) { - if !(_UseDualStack == true) { - if exprVal := params.ResourceArnList; exprVal != nil { - _ResourceArnList := stringSlice(exprVal) - _ = _ResourceArnList - if exprVal := _ResourceArnList.Get(0); exprVal != nil { - _FirstArn := *exprVal - _ = _FirstArn - if exprVal := awsrulesfn.ParseARN(_FirstArn); exprVal != nil { - _ParsedArn := *exprVal - _ = _ParsedArn - if _ParsedArn.Service == "dynamodb" { - if rulesfn.IsValidHostLabel(_ParsedArn.Region, false) { - if _ParsedArn.Region == _Region { - if rulesfn.IsValidHostLabel(_ParsedArn.AccountId, false) { - uriString := func() string { - var out strings.Builder - out.WriteString("https://") - out.WriteString(_ParsedArn.AccountId) - out.WriteString(".ddb.") - 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 - } - } - } - } - } + if exprVal := params.AccountId; exprVal != nil { + _AccountId := *exprVal + _ = _AccountId + if rulesfn.IsValidHostLabel(_AccountId, false) { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_AccountId) + out.WriteString(".ddb.") + 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) } - } - } - } - } - } - } - if exprVal := params.AccountIdEndpointMode; exprVal != nil { - _AccountIdEndpointMode := *exprVal - _ = _AccountIdEndpointMode - if !(_AccountIdEndpointMode == "disabled") { - if _PartitionResult.Name == "aws" { - if !(_UseFIPS == true) { - if !(_UseDualStack == true) { - if exprVal := params.AccountId; exprVal != nil { - _AccountId := *exprVal - _ = _AccountId - if rulesfn.IsValidHostLabel(_AccountId, false) { - uriString := func() string { - var out strings.Builder - out.WriteString("https://") - out.WriteString(_AccountId) - out.WriteString(".ddb.") - 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", "Credentials-sourced account ID parameter is invalid") + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("metricValues", []interface{}{ + "O", + }) + return out + }(), + }, nil } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Credentials-sourced account ID parameter is invalid") } } } @@ -689,13 +906,10 @@ func (r *resolver) ResolveEndpoint( _ = _AccountIdEndpointMode if _AccountIdEndpointMode == "required" { if !(_UseFIPS == true) { - if !(_UseDualStack == true) { - if _PartitionResult.Name == "aws" { - return endpoint, fmt.Errorf("endpoint rule error, %s", "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition") + if _PartitionResult.Name == "aws" { + return endpoint, fmt.Errorf("endpoint rule error, %s", "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded") } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required and DualStack is enabled, but DualStack account endpoints are not supported") + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition") } return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported") } @@ -728,10 +942,15 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint @@ -742,7 +961,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options) b.bindEndpointParams(params) } - return params + return params, nil } type resolveEndpointV2Middleware struct { @@ -776,7 +995,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", func() (smithyendpoints.Endpoint, error) { return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/generated.json index b2746adbd16..5c4f744ee34 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/generated.json @@ -87,7 +87,7 @@ "types/types_exported_test.go", "validators.go" ], - "go": "1.22", + "go": "1.23", "module": "github.com/aws/aws-sdk-go-v2/service/dynamodb", "unstable": false } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go index 6e1c54415cf..bc61647afe1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go @@ -3,4 +3,4 @@ package dynamodb // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.50.1" +const goModuleVersion = "1.54.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/endpoints/endpoints.go index 09e2b0eed08..07d61e80260 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/endpoints/endpoints.go @@ -390,6 +390,13 @@ var defaultPartitions = endpoints.Partitions{ { ID: "aws-eusc", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "dynamodb.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: endpoints.FIPSVariant, }: { @@ -397,6 +404,13 @@ var defaultPartitions = endpoints.Partitions{ Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "dynamodb-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: 0, }: { @@ -407,6 +421,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsEusc, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eusc-de-east-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso", @@ -463,6 +482,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-west-1", + }: endpoints.Endpoint{}, }, }, { 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 607fc092204..6ffbf3fe4ac 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,15 @@ +# v1.13.4 (2025-12-02) + +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.13.3 (2025-11-04) + +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.13.2 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. + # v1.13.1 (2025-08-27) * **Dependency Update**: Update to smithy-go v1.23.0. 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 7a0b6aae29a..970bb210ec9 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.13.1" +const goModuleVersion = "1.13.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md index 6214ff2917a..700b9e21155 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md @@ -1,3 +1,50 @@ +# v1.11.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.11.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.11.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.9 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.8 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.7 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.6 (2025-08-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go index b83027a6e1d..774e292805a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go @@ -3,4 +3,4 @@ package endpointdiscovery // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.6" +const goModuleVersion = "1.11.17" 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 6f143784e12..81fbac09c12 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,38 @@ +# v1.13.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.13.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.13.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.13.9 (2025-09-26) * **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 bc347369d8b..d7c886c139d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.9" +const goModuleVersion = "1.13.17" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md new file mode 100644 index 00000000000..38c6edd4a8c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md @@ -0,0 +1,26 @@ +# v1.0.5 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.0.4 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.0.3 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.0.2 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.0.1 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.0.0 (2025-11-19) + +* **Release**: New AWS service client module +* **Feature**: AWS Sign-In manages authentication for AWS services. This service provides secure authentication flows for accessing AWS resources from the console and developer tools. This release adds the CreateOAuth2Token API, which can be used to fetch OAuth2 access tokens and refresh tokens from Sign-In. + diff --git a/vendor/github.com/trivago/tgo/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/LICENSE.txt similarity index 99% rename from vendor/github.com/trivago/tgo/LICENSE rename to vendor/github.com/aws/aws-sdk-go-v2/service/signin/LICENSE.txt index 8f71f43fee3..d6456956733 100644 --- a/vendor/github.com/trivago/tgo/LICENSE +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/LICENSE.txt @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ 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 "{}" + 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 @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + 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. @@ -199,4 +200,3 @@ 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-sdk-go-v2/service/signin/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go new file mode 100644 index 00000000000..d2db11d2aa1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go @@ -0,0 +1,949 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +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 = "Signin" +const ServiceAPIVersion = "2023-01-01" + +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) { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.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() { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.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) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/signin") + 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 { + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/signin") +} + +// Client provides the API client to make operations call for AWS Sign-In Service. +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) + } + + 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/signin") + }) + 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, + AuthSchemePreference: cfg.AuthSchemePreference, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveInterceptors(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, func(o *Options) { + for _, opt := range cfg.ServiceOptions { + opt(ServiceID, o) + } + for _, opt := range optFns { + opt(o) + } + }) +} + +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 resolveInterceptors(cfg aws.Config, o *Options) { + o.Interceptors = cfg.Interceptors.Copy() +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "signin", 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/signin") + }) + 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) +} + +func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ + Interceptors: opts.Interceptors.BeforeRetryLoop, + }, "Retry", middleware.Before) +} + +func addInterceptAttempt(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ + BeforeAttempt: opts.Interceptors.BeforeAttempt, + AfterAttempt: opts.Interceptors.AfterAttempt, + }, "Retry", middleware.After) +} + +func addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } + + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go new file mode 100644 index 00000000000..54ba42422d0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// CreateOAuth2Token API +// +// Path: /v1/token Request Method: POST Content-Type: application/json or +// application/x-www-form-urlencoded +// +// This API implements OAuth 2.0 flows for AWS Sign-In CLI clients, supporting +// both: +// +// - Authorization code redemption (grant_type=authorization_code) - NOT +// idempotent +// - Token refresh (grant_type=refresh_token) - Idempotent within token validity +// window +// +// The operation behavior is determined by the grant_type parameter in the request +// body: +// +// Authorization Code Flow (NOT Idempotent): +// +// - JSON or form-encoded body with client_id, grant_type=authorization_code, +// code, redirect_uri, code_verifier +// - Returns access_token, token_type, expires_in, refresh_token, and id_token +// - Each authorization code can only be used ONCE for security (prevents replay +// attacks) +// +// Token Refresh Flow (Idempotent): +// +// - JSON or form-encoded body with client_id, grant_type=refresh_token, +// refresh_token +// - Returns access_token, token_type, expires_in, and refresh_token (no +// id_token) +// - Multiple calls with same refresh_token return consistent results within +// validity window +// +// Authentication and authorization: +// +// - Confidential clients: sigv4 signing required with signin:ExchangeToken +// permissions +// - CLI clients (public): authn/authz skipped based on client_id & grant_type +// +// Note: This operation cannot be marked as @idempotent because it handles both +// idempotent (token refresh) and non-idempotent (auth code redemption) flows in a +// single endpoint. +func (c *Client) CreateOAuth2Token(ctx context.Context, params *CreateOAuth2TokenInput, optFns ...func(*Options)) (*CreateOAuth2TokenOutput, error) { + if params == nil { + params = &CreateOAuth2TokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOAuth2Token", params, optFns, c.addOperationCreateOAuth2TokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOAuth2TokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input structure for CreateOAuth2Token operation +// +// Contains flattened token operation inputs for both authorization code and +// refresh token flows. The operation type is determined by the grant_type +// parameter in the request body. +type CreateOAuth2TokenInput struct { + + // Flattened token operation inputs The specific operation is determined by + // grant_type in the request body + // + // This member is required. + TokenInput *types.CreateOAuth2TokenRequestBody + + noSmithyDocumentSerde +} + +// Output structure for CreateOAuth2Token operation +// +// Contains flattened token operation outputs for both authorization code and +// refresh token flows. The response content depends on the grant_type from the +// original request. +type CreateOAuth2TokenOutput struct { + + // Flattened token operation outputs The specific response fields depend on the + // grant_type used in the request + // + // This member is required. + TokenOutput *types.CreateOAuth2TokenResponseBody + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOAuth2Token{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateOAuth2Token{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOAuth2Token"); 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 = 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 = addOpCreateOAuth2TokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOAuth2Token(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOAuth2Token(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOAuth2Token", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go new file mode 100644 index 00000000000..cf6b3650410 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/auth.go @@ -0,0 +1,351 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +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" + "slices" + "strings" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { + params.Region = options.Region + return nil +} + +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, error) { + params := &AuthResolverParameters{ + Operation: operation, + } + + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } + + return params, nil +} + +// 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{ + "CreateOAuth2Token": func(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + {SchemeID: smithyauth.SchemeIDAnonymous}, + } + }, +} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "signin") + 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, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } + 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) { + sorted := sortAuthOptions(options, m.options.AuthSchemePreference) + for _, option := range sorted { + 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 +} + +func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { + byPriority := make([]*smithyauth.Option, 0, len(options)) + for _, prefName := range preferred { + for _, option := range options { + optName := option.SchemeID + if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { + optName = parts[1] + } + if prefName == optName { + byPriority = append(byPriority, option) + } + } + } + for _, option := range options { + if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { + return o.SchemeID == option.SchemeID + }) { + byPriority = append(byPriority, option) + } + } + return byPriority +} + +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/signin/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go new file mode 100644 index 00000000000..b74b612e6b0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go @@ -0,0 +1,655 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/signin/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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "strings" +) + +type awsRestjson1_deserializeOpCreateOAuth2Token struct { +} + +func (*awsRestjson1_deserializeOpCreateOAuth2Token) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateOAuth2Token) 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_deserializeOpErrorCreateOAuth2Token(response, &metadata) + } + output := &CreateOAuth2TokenOutput{} + 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_deserializeDocumentCreateOAuth2TokenResponseBody(&output.TokenOutput, 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_deserializeOpErrorCreateOAuth2Token(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateOAuth2TokenOutput(v **CreateOAuth2TokenOutput, 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 *CreateOAuth2TokenOutput + if *v == nil { + sv = &CreateOAuth2TokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tokenOutput": + if err := awsRestjson1_deserializeDocumentCreateOAuth2TokenResponseBody(&sv.TokenOutput, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorTooManyRequestsError(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRequestsError{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentTooManyRequestsError(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) + } + sv.Error_ = types.OAuth2ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessToken(v **types.AccessToken, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessToken + if *v == nil { + sv = &types.AccessToken{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccessKeyId = ptr.String(jtv) + } + + case "secretAccessKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SecretAccessKey = ptr.String(jtv) + } + + case "sessionToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SessionToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateOAuth2TokenResponseBody(v **types.CreateOAuth2TokenResponseBody, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CreateOAuth2TokenResponseBody + if *v == nil { + sv = &types.CreateOAuth2TokenResponseBody{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessToken": + if err := awsRestjson1_deserializeDocumentAccessToken(&sv.AccessToken, value); err != nil { + return err + } + + case "expiresIn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ExpiresIn to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpiresIn = ptr.Int32(int32(i64)) + } + + case "idToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdToken to be of type string, got %T instead", value) + } + sv.IdToken = ptr.String(jtv) + } + + case "refreshToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value) + } + sv.RefreshToken = ptr.String(jtv) + } + + case "tokenType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TokenType to be of type string, got %T instead", value) + } + sv.TokenType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) + } + sv.Error_ = types.OAuth2ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTooManyRequestsError(v **types.TooManyRequestsError, 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.TooManyRequestsError + if *v == nil { + sv = &types.TooManyRequestsError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) + } + sv.Error_ = types.OAuth2ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) + } + sv.Error_ = types.OAuth2ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/doc.go new file mode 100644 index 00000000000..dc1a8b62f09 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/doc.go @@ -0,0 +1,9 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package signin provides the API client, operations, and parameter types for AWS +// Sign-In Service. +// +// AWS Sign-In manages authentication for AWS services. This service provides +// secure authentication flows for accessing AWS resources from the console and +// developer tools. +package signin diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go new file mode 100644 index 00000000000..db2e6a62a38 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go @@ -0,0 +1,624 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +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/signin/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" + "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 = "signin" + } + 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_SIGNIN") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Signin", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) (*string, error) { + if region == "" { + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) + } + + return aws.String(endpoints.MapFIPSRegion(region)), nil +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // 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 + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *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 + _ = _UseDualStack + _UseFIPS := *params.UseFIPS + _ = _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 _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Region) + out.WriteString(".signin.aws.amazon.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{}, + }, nil + } + } + } + if _PartitionResult.Name == "aws-cn" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Region) + out.WriteString(".signin.amazonaws.cn") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Region) + out.WriteString(".signin.amazonaws-us-gov.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{}, + }, nil + } + } + } + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin-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 _UseDualStack == false { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin-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 _UseFIPS == false { + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin.") + 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://signin.") + 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, error) { + params := &EndpointParameters{} + + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params, nil +} + +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, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } + 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/signin/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json new file mode 100644 index 00000000000..8014c56167c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json @@ -0,0 +1,34 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "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_CreateOAuth2Token.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.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", + "validators.go" + ], + "go": "1.23", + "module": "github.com/aws/aws-sdk-go-v2/service/signin", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go new file mode 100644 index 00000000000..b10ad4354ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package signin + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.0.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..cfb2efea8a3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints/endpoints.go @@ -0,0 +1,333 @@ +// 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 Signin 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 + AwsEusc *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+$"), + AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\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: "signin.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "signin-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "signin.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "signin-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-eusc", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "signin.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "signin-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsEusc, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{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: "signin-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "signin.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "signin-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "signin-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "signin.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go new file mode 100644 index 00000000000..3262aa58224 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +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 + + // Client registry of operation interceptors. + Interceptors smithyhttp.InterceptorRegistry + + // 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 + + // Priority list of preferred auth scheme names (e.g. sigv4a). + AuthSchemePreference []string +} + +// 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) + to.Interceptors = o.Interceptors.Copy() + + 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/signin/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/serializers.go new file mode 100644 index 00000000000..958240275e3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/serializers.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/signin/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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpCreateOAuth2Token struct { +} + +func (*awsRestjson1_serializeOpCreateOAuth2Token) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateOAuth2Token) 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.(*CreateOAuth2TokenInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/token") + 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 !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.TokenInput != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentCreateOAuth2TokenRequestBody(input.TokenInput, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.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 awsRestjson1_serializeOpHttpBindingsCreateOAuth2TokenInput(v *CreateOAuth2TokenInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeDocumentCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientId != nil { + ok := object.Key("clientId") + ok.String(*v.ClientId) + } + + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + + if v.CodeVerifier != nil { + ok := object.Key("codeVerifier") + ok.String(*v.CodeVerifier) + } + + if v.GrantType != nil { + ok := object.Key("grantType") + ok.String(*v.GrantType) + } + + if v.RedirectUri != nil { + ok := object.Key("redirectUri") + ok.String(*v.RedirectUri) + } + + if v.RefreshToken != nil { + ok := object.Key("refreshToken") + ok.String(*v.RefreshToken) + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go new file mode 100644 index 00000000000..ecfabb81f74 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go @@ -0,0 +1,37 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type OAuth2ErrorCode string + +// Enum values for OAuth2ErrorCode +const ( + // Token has expired and needs to be refreshed + OAuth2ErrorCodeTokenExpired OAuth2ErrorCode = "TOKEN_EXPIRED" + // User credentials have been changed + OAuth2ErrorCodeUserCredentialsChanged OAuth2ErrorCode = "USER_CREDENTIALS_CHANGED" + // Insufficient permissions to perform this operation + OAuth2ErrorCodeInsufficientPermissions OAuth2ErrorCode = "INSUFFICIENT_PERMISSIONS" + // Authorization code has expired + OAuth2ErrorCodeAuthcodeExpired OAuth2ErrorCode = "AUTHCODE_EXPIRED" + // Internal server error occurred + OAuth2ErrorCodeServerError OAuth2ErrorCode = "server_error" + // The request is missing a required parameter, includes an invalid parameter + // value, or is otherwise malformed + OAuth2ErrorCodeInvalidRequest OAuth2ErrorCode = "INVALID_REQUEST" +) + +// Values returns all known values for OAuth2ErrorCode. 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 (OAuth2ErrorCode) Values() []OAuth2ErrorCode { + return []OAuth2ErrorCode{ + "TOKEN_EXPIRED", + "USER_CREDENTIALS_CHANGED", + "INSUFFICIENT_PERMISSIONS", + "AUTHCODE_EXPIRED", + "server_error", + "INVALID_REQUEST", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go new file mode 100644 index 00000000000..ca4928a86c8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// Error thrown for access denied scenarios with flexible HTTP status mapping +// +// Runtime HTTP Status Code Mapping: +// +// - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED +// - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS +// +// The specific HTTP status code is determined at runtime based on the error enum +// value. Consumers should use the error field to determine the specific access +// denial reason. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error thrown when an internal server error occurs +// +// HTTP Status Code: 500 Internal Server Error +// +// Used for unexpected server-side errors that prevent request processing. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Error thrown when rate limit is exceeded +// +// HTTP Status Code: 429 Too Many Requests +// +// Possible OAuth2ErrorCode values: +// +// - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention +// +// Possible causes: +// +// - Too many token requests from the same client +// - Rate limiting based on client_id or IP address +// - Abuse prevention mechanisms triggered +// - Service protection against excessive token generation +type TooManyRequestsError struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *TooManyRequestsError) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyRequestsError) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyRequestsError) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyRequestsError" + } + return *e.ErrorCodeOverride +} +func (e *TooManyRequestsError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error thrown when request validation fails +// +// HTTP Status Code: 400 Bad Request +// +// Used for request validation errors such as malformed parameters, missing +// required fields, or invalid parameter values. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go new file mode 100644 index 00000000000..98afa20bfcb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go @@ -0,0 +1,115 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// AWS credentials structure containing temporary access credentials +// +// The scoped-down, 15 minute duration AWS credentials. Scoping down will be based +// on CLI policy (CLI team needs to create it). Similar to cloud shell +// implementation. +type AccessToken struct { + + // AWS access key ID for temporary credentials + // + // This member is required. + AccessKeyId *string + + // AWS secret access key for temporary credentials + // + // This member is required. + SecretAccessKey *string + + // AWS session token for temporary credentials + // + // This member is required. + SessionToken *string + + noSmithyDocumentSerde +} + +// Request body payload for CreateOAuth2Token operation +// +// The operation type is determined by the grant_type parameter: +// +// - grant_type=authorization_code: Requires code, redirect_uri, code_verifier +// - grant_type=refresh_token: Requires refresh_token +type CreateOAuth2TokenRequestBody struct { + + // The client identifier (ARN) used during Sign-In onboarding Required for both + // authorization code and refresh token flows + // + // This member is required. + ClientId *string + + // OAuth 2.0 grant type - determines which flow is used Must be + // "authorization_code" or "refresh_token" + // + // This member is required. + GrantType *string + + // The authorization code received from /v1/authorize Required only when + // grant_type=authorization_code + Code *string + + // PKCE code verifier to prove possession of the original code challenge Required + // only when grant_type=authorization_code + CodeVerifier *string + + // The redirect URI that must match the original authorization request Required + // only when grant_type=authorization_code + RedirectUri *string + + // The refresh token returned from auth_code redemption Required only when + // grant_type=refresh_token + RefreshToken *string + + noSmithyDocumentSerde +} + +// Response body payload for CreateOAuth2Token operation +// +// The response content depends on the grant_type from the request: +// +// - grant_type=authorization_code: Returns all fields including refresh_token +// and id_token +// - grant_type=refresh_token: Returns access_token, token_type, expires_in, +// refresh_token (no id_token) +type CreateOAuth2TokenResponseBody struct { + + // Scoped-down AWS credentials (15 minute duration) Present for both authorization + // code redemption and token refresh + // + // This member is required. + AccessToken *AccessToken + + // Time to expiry in seconds (maximum 900) Present for both authorization code + // redemption and token refresh + // + // This member is required. + ExpiresIn *int32 + + // Encrypted refresh token with cnf.jkt (SHA-256 thumbprint of presented jwk) + // Always present in responses (required for both flows) + // + // This member is required. + RefreshToken *string + + // Token type indicating this is AWS SigV4 credentials Value is "aws_sigv4" for + // both flows + // + // This member is required. + TokenType *string + + // ID token containing user identity information Present only in authorization + // code redemption response (grant_type=authorization_code) Not included in token + // refresh responses + IdToken *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go new file mode 100644 index 00000000000..f07252341ad --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go @@ -0,0 +1,72 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateOAuth2Token struct { +} + +func (*validateOpCreateOAuth2Token) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOAuth2Token) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOAuth2TokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOAuth2TokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateOAuth2TokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOAuth2Token{}, middleware.After) +} + +func validateCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOAuth2TokenRequestBody"} + if v.ClientId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientId")) + } + if v.GrantType == nil { + invalidParams.Add(smithy.NewErrParamRequired("GrantType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOAuth2TokenInput(v *CreateOAuth2TokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOAuth2TokenInput"} + if v.TokenInput == nil { + invalidParams.Add(smithy.NewErrParamRequired("TokenInput")) + } else if v.TokenInput != nil { + if err := validateCreateOAuth2TokenRequestBody(v.TokenInput); err != nil { + invalidParams.AddNested("TokenInput", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/CHANGELOG.md index d440d166ad2..099b5fecf78 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/CHANGELOG.md @@ -1,3 +1,60 @@ +# v1.39.11 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.10 (2025-12-09) + +* No change notes available for this release. + +# v1.39.9 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.8 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.39.7 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.39.6 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.5 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.39.4 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.39.3 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.39.2 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.1 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.0 (2025-10-22) + +* **Feature**: Update endpoint ruleset parameters casing + +# v1.38.6 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.38.5 (2025-09-26) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_client.go index 72bc075bb73..0b94cd2be81 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_client.go @@ -65,7 +65,12 @@ func timeOperationMetric[T any]( ctx context.Context, metric string, fn func() (T, error), opts ...metrics.RecordMetricOption, ) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) start := time.Now() @@ -78,7 +83,12 @@ func timeOperationMetric[T any]( } func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) var ended bool @@ -106,6 +116,12 @@ func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { type operationMetricsKey struct{} func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sns") om := &operationMetrics{} @@ -153,7 +169,10 @@ func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Hi } func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil } func operationTracer(p tracing.TracerProvider) tracing.Tracer { @@ -883,138 +902,49 @@ func addInterceptAttempt(stack *middleware.Stack, opts Options) error { }, "Retry", middleware.After) } -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -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 addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_AddPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_AddPermission.go index 8f56315e3c5..3af11a2bcf1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_AddPermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_AddPermission.go @@ -161,40 +161,7 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go index cb453b61ed6..0ca9af9993b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go @@ -154,40 +154,7 @@ func (c *Client) addOperationCheckIfPhoneNumberIsOptedOutMiddlewares(stack *midd if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ConfirmSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ConfirmSubscription.go index 624717fa4f6..1b5aa5270e5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ConfirmSubscription.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ConfirmSubscription.go @@ -158,40 +158,7 @@ func (c *Client) addOperationConfirmSubscriptionMiddlewares(stack *middleware.St if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformApplication.go index bbc9d224f32..f0777b18a50 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformApplication.go @@ -196,40 +196,7 @@ func (c *Client) addOperationCreatePlatformApplicationMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformEndpoint.go index c8a05096496..7b7d2556746 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformEndpoint.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreatePlatformEndpoint.go @@ -176,40 +176,7 @@ func (c *Client) addOperationCreatePlatformEndpointMiddlewares(stack *middleware if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateSMSSandboxPhoneNumber.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateSMSSandboxPhoneNumber.go index 73f025405e4..fb522d15ba5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateSMSSandboxPhoneNumber.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateSMSSandboxPhoneNumber.go @@ -155,40 +155,7 @@ func (c *Client) addOperationCreateSMSSandboxPhoneNumberMiddlewares(stack *middl if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateTopic.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateTopic.go index 8acc8f4779d..b11e9a03b93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateTopic.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_CreateTopic.go @@ -311,40 +311,7 @@ func (c *Client) addOperationCreateTopicMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteEndpoint.go index 44e233ca70b..9f3486a8384 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteEndpoint.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteEndpoint.go @@ -144,40 +144,7 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeletePlatformApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeletePlatformApplication.go index e1f674da49c..1e8981e0362 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeletePlatformApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeletePlatformApplication.go @@ -142,40 +142,7 @@ func (c *Client) addOperationDeletePlatformApplicationMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go index b29e6831199..ee7afccdc33 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go @@ -149,40 +149,7 @@ func (c *Client) addOperationDeleteSMSSandboxPhoneNumberMiddlewares(stack *middl if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteTopic.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteTopic.go index de35c46b971..8fcad63ce29 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteTopic.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_DeleteTopic.go @@ -140,40 +140,7 @@ func (c *Client) addOperationDeleteTopicMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetDataProtectionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetDataProtectionPolicy.go index c9ddf07b0f1..2a583d4f415 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetDataProtectionPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetDataProtectionPolicy.go @@ -147,40 +147,7 @@ func (c *Client) addOperationGetDataProtectionPolicyMiddlewares(stack *middlewar if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetEndpointAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetEndpointAttributes.go index aa7621e3d4d..8840f4824a6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetEndpointAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetEndpointAttributes.go @@ -161,40 +161,7 @@ func (c *Client) addOperationGetEndpointAttributesMiddlewares(stack *middleware. if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetPlatformApplicationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetPlatformApplicationAttributes.go index ee6d8e4a53c..23f5d70b0e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetPlatformApplicationAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetPlatformApplicationAttributes.go @@ -176,40 +176,7 @@ func (c *Client) addOperationGetPlatformApplicationAttributesMiddlewares(stack * if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSAttributes.go index 17614d10c88..c8eb79ff9d3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSAttributes.go @@ -148,40 +148,7 @@ func (c *Client) addOperationGetSMSAttributesMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSSandboxAccountStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSSandboxAccountStatus.go index 6ec1456f901..790f38aff4d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSSandboxAccountStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSMSSandboxAccountStatus.go @@ -146,40 +146,7 @@ func (c *Client) addOperationGetSMSSandboxAccountStatusMiddlewares(stack *middle if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSubscriptionAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSubscriptionAttributes.go index 5146c5e369f..25fdb83de64 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSubscriptionAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetSubscriptionAttributes.go @@ -202,40 +202,7 @@ func (c *Client) addOperationGetSubscriptionAttributesMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetTopicAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetTopicAttributes.go index b960f370cee..afd986294c0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetTopicAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_GetTopicAttributes.go @@ -222,40 +222,7 @@ func (c *Client) addOperationGetTopicAttributesMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListEndpointsByPlatformApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListEndpointsByPlatformApplication.go index ac4fb3e7102..1b9465b8228 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListEndpointsByPlatformApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListEndpointsByPlatformApplication.go @@ -163,40 +163,7 @@ func (c *Client) addOperationListEndpointsByPlatformApplicationMiddlewares(stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListOriginationNumbers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListOriginationNumbers.go index ba342a4197f..6530993b95f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListOriginationNumbers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListOriginationNumbers.go @@ -148,40 +148,7 @@ func (c *Client) addOperationListOriginationNumbersMiddlewares(stack *middleware if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPhoneNumbersOptedOut.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPhoneNumbersOptedOut.go index 8f595a836d8..ca7cfcf3637 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPhoneNumbersOptedOut.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPhoneNumbersOptedOut.go @@ -152,40 +152,7 @@ func (c *Client) addOperationListPhoneNumbersOptedOutMiddlewares(stack *middlewa if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPlatformApplications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPlatformApplications.go index 29ba29ab334..0c0a27d5852 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPlatformApplications.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListPlatformApplications.go @@ -155,40 +155,7 @@ func (c *Client) addOperationListPlatformApplicationsMiddlewares(stack *middlewa if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSMSSandboxPhoneNumbers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSMSSandboxPhoneNumbers.go index 85dad44fa30..55a73e1ef6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSMSSandboxPhoneNumbers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSMSSandboxPhoneNumbers.go @@ -158,40 +158,7 @@ func (c *Client) addOperationListSMSSandboxPhoneNumbersMiddlewares(stack *middle if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptions.go index 510e54b1673..1c8020a3374 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptions.go @@ -148,40 +148,7 @@ func (c *Client) addOperationListSubscriptionsMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptionsByTopic.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptionsByTopic.go index e27937e9724..dae01709965 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptionsByTopic.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListSubscriptionsByTopic.go @@ -156,40 +156,7 @@ func (c *Client) addOperationListSubscriptionsByTopicMiddlewares(stack *middlewa if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTagsForResource.go index 7151d245f5b..3191b611dcd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTagsForResource.go @@ -145,40 +145,7 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTopics.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTopics.go index 186766ed322..ad773d354b6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTopics.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_ListTopics.go @@ -146,40 +146,7 @@ func (c *Client) addOperationListTopicsMiddlewares(stack *middleware.Stack, opti if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_OptInPhoneNumber.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_OptInPhoneNumber.go index fd156ec9846..a236f412aa9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_OptInPhoneNumber.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_OptInPhoneNumber.go @@ -142,40 +142,7 @@ func (c *Client) addOperationOptInPhoneNumberMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Publish.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Publish.go index 057177ed041..8c9f05c554e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Publish.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Publish.go @@ -323,40 +323,7 @@ func (c *Client) addOperationPublishMiddlewares(stack *middleware.Stack, options if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PublishBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PublishBatch.go index a1161870e9b..5f0b52a0202 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PublishBatch.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PublishBatch.go @@ -185,40 +185,7 @@ func (c *Client) addOperationPublishBatchMiddlewares(stack *middleware.Stack, op if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PutDataProtectionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PutDataProtectionPolicy.go index 13a220a2602..6c284f7b166 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PutDataProtectionPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_PutDataProtectionPolicy.go @@ -152,40 +152,7 @@ func (c *Client) addOperationPutDataProtectionPolicyMiddlewares(stack *middlewar if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_RemovePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_RemovePermission.go index f98c7d4ae27..60bd92f008b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_RemovePermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_RemovePermission.go @@ -147,40 +147,7 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetEndpointAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetEndpointAttributes.go index 12ea9702418..f958803318a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetEndpointAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetEndpointAttributes.go @@ -159,40 +159,7 @@ func (c *Client) addOperationSetEndpointAttributesMiddlewares(stack *middleware. if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetPlatformApplicationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetPlatformApplicationAttributes.go index 5e85c2770e0..52d7413a472 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetPlatformApplicationAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetPlatformApplicationAttributes.go @@ -212,40 +212,7 @@ func (c *Client) addOperationSetPlatformApplicationAttributesMiddlewares(stack * if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSMSAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSMSAttributes.go index 10d53cee9ae..f6c360c7b80 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSMSAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSMSAttributes.go @@ -223,40 +223,7 @@ func (c *Client) addOperationSetSMSAttributesMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSubscriptionAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSubscriptionAttributes.go index f72cb8e4bd9..a47c2da9f4a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSubscriptionAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetSubscriptionAttributes.go @@ -191,40 +191,7 @@ func (c *Client) addOperationSetSubscriptionAttributesMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetTopicAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetTopicAttributes.go index 093ba2ba5ba..c587b90d0ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetTopicAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_SetTopicAttributes.go @@ -292,40 +292,7 @@ func (c *Client) addOperationSetTopicAttributesMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Subscribe.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Subscribe.go index 75c05fa600c..8c570404d12 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Subscribe.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Subscribe.go @@ -285,40 +285,7 @@ func (c *Client) addOperationSubscribeMiddlewares(stack *middleware.Stack, optio if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_TagResource.go index 448babeeb59..f43c50d4f62 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_TagResource.go @@ -164,40 +164,7 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Unsubscribe.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Unsubscribe.go index eeab207b484..70bf1b41718 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Unsubscribe.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_Unsubscribe.go @@ -146,40 +146,7 @@ func (c *Client) addOperationUnsubscribeMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_UntagResource.go index 244a3c42c14..516e7775fdf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_UntagResource.go @@ -145,40 +145,7 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_VerifySMSSandboxPhoneNumber.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_VerifySMSSandboxPhoneNumber.go index a3853d8865a..143aefcfa31 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_VerifySMSSandboxPhoneNumber.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/api_op_VerifySMSSandboxPhoneNumber.go @@ -156,40 +156,7 @@ func (c *Client) addOperationVerifySMSSandboxPhoneNumberMiddlewares(stack *middl if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/auth.go index 96fb2b5d907..9f11cc500bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/auth.go @@ -16,8 +16,9 @@ import ( "strings" ) -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { params.Region = options.Region + return nil } type setLegacyContextSigningOptionsMiddleware struct { @@ -94,14 +95,16 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(ctx, params, input, options) + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } - return params + return params, nil } // AuthSchemeResolver returns a set of possible authentication options for an @@ -152,7 +155,10 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") defer span.End() - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/endpoints.go index cb77c86bb0a..c2af00fcc64 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/endpoints.go @@ -14,6 +14,7 @@ import ( internalendpoints "github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" "github.com/aws/smithy-go/tracing" @@ -217,11 +218,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } -func bindRegion(region string) *string { +func bindRegion(region string) (*string, error) { if region == "" { - return nil + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) } - return aws.String(endpoints.MapFIPSRegion(region)) + + return aws.String(endpoints.MapFIPSRegion(region)), nil } // EndpointParameters provides the parameters that influence how endpoints are @@ -486,10 +491,15 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint @@ -498,7 +508,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options) b.bindEndpointParams(params) } - return params + return params, nil } type resolveEndpointV2Middleware struct { @@ -528,7 +538,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", func() (smithyendpoints.Endpoint, error) { return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/generated.json index a0241a2bdd1..67480e420ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/generated.json @@ -69,7 +69,7 @@ "types/types.go", "validators.go" ], - "go": "1.22", + "go": "1.23", "module": "github.com/aws/aws-sdk-go-v2/service/sns", "unstable": false } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/go_module_metadata.go index b41ab418df8..bf57895afee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/go_module_metadata.go @@ -3,4 +3,4 @@ package sns // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.38.5" +const goModuleVersion = "1.39.11" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints/endpoints.go index ce64599aa68..b2817d2c7d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints/endpoints.go @@ -570,6 +570,13 @@ var defaultPartitions = endpoints.Partitions{ { ID: "aws-eusc", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "sns.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: endpoints.FIPSVariant, }: { @@ -577,6 +584,13 @@ var defaultPartitions = endpoints.Partitions{ Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "sns-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: 0, }: { @@ -587,6 +601,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsEusc, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eusc-de-east-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso", @@ -643,6 +662,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-west-1", + }: endpoints.Endpoint{}, }, }, { 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 4c5e39d8739..2954b8f28d1 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,57 @@ +# v1.30.9 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.8 (2025-12-16) + +* No change notes available for this release. + +# v1.30.7 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.6 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.30.5 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.30.4 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.3 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.30.2 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.30.1 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.30.0 (2025-10-30) + +* **Feature**: Update endpoint ruleset parameters casing +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.8 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.7 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.29.6 (2025-09-29) * No change notes available for this release. 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 2c498e4689a..8e5a2e77f87 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 @@ -65,7 +65,12 @@ func timeOperationMetric[T any]( ctx context.Context, metric string, fn func() (T, error), opts ...metrics.RecordMetricOption, ) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) start := time.Now() @@ -78,7 +83,12 @@ func timeOperationMetric[T any]( } func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) var ended bool @@ -106,6 +116,12 @@ func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { type operationMetricsKey struct{} func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sso") om := &operationMetrics{} @@ -153,7 +169,10 @@ func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Hi } func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil } func operationTracer(p tracing.TracerProvider) tracing.Tracer { @@ -882,138 +901,49 @@ func addInterceptAttempt(stack *middleware.Stack, opts Options) error { }, "Retry", middleware.After) } -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -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 addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go index df5dc1674f3..c0b961fcf18 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go @@ -153,40 +153,7 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go index 2a3b2ad9021..f5ca09ac7d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go @@ -158,40 +158,7 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go index f6114a7c105..54511d34a6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go @@ -157,40 +157,7 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go index 2c7f181c344..a21116e96c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go @@ -152,40 +152,7 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go index 708e53c5ad5..c658615fdec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go @@ -16,8 +16,9 @@ import ( "strings" ) -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { params.Region = options.Region + return nil } type setLegacyContextSigningOptionsMiddleware struct { @@ -94,14 +95,16 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(ctx, params, input, options) + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } - return params + return params, nil } // AuthSchemeResolver returns a set of possible authentication options for an @@ -176,7 +179,10 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") defer span.End() - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go index 2b22ab779c2..551f05974e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go @@ -14,6 +14,7 @@ import ( internalendpoints "github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" "github.com/aws/smithy-go/tracing" @@ -217,11 +218,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } -func bindRegion(region string) *string { +func bindRegion(region string) (*string, error) { if region == "" { - return nil + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) } - return aws.String(endpoints.MapFIPSRegion(region)) + + return aws.String(endpoints.MapFIPSRegion(region)), nil } // EndpointParameters provides the parameters that influence how endpoints are @@ -479,10 +484,15 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint @@ -491,7 +501,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options) b.bindEndpointParams(params) } - return params + return params, nil } type resolveEndpointV2Middleware struct { @@ -521,7 +531,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", func() (smithyendpoints.Endpoint, error) { return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json index 1a88fe4df8e..1499c0a9591 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json @@ -30,7 +30,7 @@ "types/types.go", "validators.go" ], - "go": "1.22", + "go": "1.23", "module": "github.com/aws/aws-sdk-go-v2/service/sso", "unstable": false } 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 3628768ce40..427f36a52e7 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.29.6" +const goModuleVersion = "1.30.9" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go index 8bb8730be07..182423b4e6c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-east-1", }, }, + endpoints.EndpointKey{ + Region: "ap-east-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{ @@ -445,6 +448,13 @@ var defaultPartitions = endpoints.Partitions{ { ID: "aws-eusc", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "portal.sso.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: endpoints.FIPSVariant, }: { @@ -452,6 +462,13 @@ var defaultPartitions = endpoints.Partitions{ Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "portal.sso-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: 0, }: { 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 dc5e399a88b..a6f58761156 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,56 @@ +# v1.35.13 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.12 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.11 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.35.10 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.35.9 (2025-11-21) + +* No change notes available for this release. + +# v1.35.8 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.7 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.35.6 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.35.5 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.35.4 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.3 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.2 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.35.1 (2025-09-26) * **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 12ad2f5d9d5..8e8508fa349 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 @@ -65,7 +65,12 @@ func timeOperationMetric[T any]( ctx context.Context, metric string, fn func() (T, error), opts ...metrics.RecordMetricOption, ) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) start := time.Now() @@ -78,7 +83,12 @@ func timeOperationMetric[T any]( } func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) var ended bool @@ -106,6 +116,12 @@ func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { type operationMetricsKey struct{} func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") om := &operationMetrics{} @@ -153,7 +169,10 @@ func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Hi } func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil } func operationTracer(p tracing.TracerProvider) tracing.Tracer { @@ -882,138 +901,49 @@ func addInterceptAttempt(stack *middleware.Stack, opts Options) error { }, "Retry", middleware.After) } -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -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 addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) } 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 681eb4087c5..3f622dbcb95 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 @@ -223,40 +223,7 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil 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 d7a27da5953..24cb2fac8db 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 @@ -270,40 +270,7 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil 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 8d50092fb15..14472ee3be6 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 @@ -194,40 +194,7 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go index 7242ac82b68..92a6854a776 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go @@ -176,40 +176,7 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go index 89b01c629dd..5f253df305e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go @@ -16,8 +16,9 @@ import ( "strings" ) -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { params.Region = options.Region + return nil } type setLegacyContextSigningOptionsMiddleware struct { @@ -94,14 +95,16 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(ctx, params, input, options) + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } - return params + return params, nil } // AuthSchemeResolver returns a set of possible authentication options for an @@ -170,7 +173,10 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") defer span.End() - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go index 1e001f7a9e8..884983eb4d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go @@ -14,6 +14,7 @@ import ( internalendpoints "github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" "github.com/aws/smithy-go/tracing" @@ -217,11 +218,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } -func bindRegion(region string) *string { +func bindRegion(region string) (*string, error) { if region == "" { - return nil + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) } - return aws.String(endpoints.MapFIPSRegion(region)) + + return aws.String(endpoints.MapFIPSRegion(region)), nil } // EndpointParameters provides the parameters that influence how endpoints are @@ -479,10 +484,15 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint @@ -491,7 +501,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options) b.bindEndpointParams(params) } - return params + return params, nil } type resolveEndpointV2Middleware struct { @@ -521,7 +531,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", func() (smithyendpoints.Endpoint, error) { return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json index f3b0b242acc..ee79b48eaa5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json @@ -31,7 +31,7 @@ "types/types.go", "validators.go" ], - "go": "1.22", + "go": "1.23", "module": "github.com/aws/aws-sdk-go-v2/service/ssooidc", "unstable": false } 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 765f6371dae..50d95e9008e 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.35.1" +const goModuleVersion = "1.35.13" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go index f15c1a3ff52..2088fc7fb22 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-east-1", }, }, + endpoints.EndpointKey{ + Region: "ap-east-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{ @@ -445,6 +448,13 @@ var defaultPartitions = endpoints.Partitions{ { ID: "aws-eusc", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "oidc.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: endpoints.FIPSVariant, }: { @@ -452,6 +462,13 @@ var defaultPartitions = endpoints.Partitions{ Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "oidc-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: 0, }: { 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 77183922d3c..8f96faa386c 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,69 @@ +# v1.41.6 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.5 (2025-12-09) + +* No change notes available for this release. + +# v1.41.4 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.3 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.41.2 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.41.1 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.0 (2025-11-19) + +* **Feature**: IAM now supports outbound identity federation via the STS GetWebIdentityToken API, enabling AWS workloads to securely authenticate with external services using short-lived JSON Web Tokens. + +# v1.40.2 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.40.1 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.40.0 (2025-11-10) + +* **Feature**: Added GetDelegatedAccessToken API, which is not available for general use at this time. + +# v1.39.1 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.39.0 (2025-10-30) + +* **Feature**: Update endpoint ruleset parameters casing +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.9 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.8 (2025-10-22) + +* No change notes available for this release. + +# v1.38.7 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.38.6 (2025-09-26) * **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 6658babc95f..70228d0dfa7 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 @@ -68,7 +68,12 @@ func timeOperationMetric[T any]( ctx context.Context, metric string, fn func() (T, error), opts ...metrics.RecordMetricOption, ) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) start := time.Now() @@ -81,7 +86,12 @@ func timeOperationMetric[T any]( } func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) var ended bool @@ -109,6 +119,12 @@ func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { type operationMetricsKey struct{} func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sts") om := &operationMetrics{} @@ -156,7 +172,10 @@ func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Hi } func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil } func operationTracer(p tracing.TracerProvider) tracing.Tracer { @@ -1034,138 +1053,49 @@ func addInterceptAttempt(stack *middleware.Stack, opts Options) error { }, "Retry", middleware.After) } -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -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 addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) } 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 f3a93418fa0..0ddd3623ae5 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 @@ -147,7 +147,7 @@ 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: =,.@- + // 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 @@ -196,7 +196,7 @@ 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: =,.@:/- + // include underscores or any of the following characters: +=,.@:\/- // // [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html ExternalId *string @@ -279,7 +279,7 @@ 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: =,.@- + // include underscores or any of the following characters: +=/:,.@- SerialNumber *string // The source identity specified by the principal that is calling the AssumeRole @@ -508,40 +508,7 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil 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 9dcceec12a2..15f1dd91d29 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 @@ -23,6 +23,9 @@ import ( // these temporary security credentials to sign calls to Amazon Web Services // services. // +// AssumeRoleWithSAML will not work on IAM Identity Center managed roles. These +// roles' names start with AWSReservedSSO_ . +// // # Session Duration // // By default, the temporary security credentials created by AssumeRoleWithSAML @@ -440,40 +443,7 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil 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 5975a0cdee8..7006eb3b7fb 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 @@ -75,7 +75,7 @@ import ( // // (Optional) You can configure your IdP to pass attributes into your web identity // token as session tags. Each session tag consists of a key name and an associated -// value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User Guide. +// value. For more information about session tags, see [Passing session tags using AssumeRoleWithWebIdentity]in the IAM User Guide. // // You can pass up to 50 session tags. The plaintext session tag keys can’t exceed // 128 characters and the values can’t exceed 256 characters. For these and @@ -123,6 +123,7 @@ import ( // providers to get and use temporary security credentials. // // [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/ +// [Passing session tags using AssumeRoleWithWebIdentity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp // [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 // [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session @@ -135,7 +136,6 @@ import ( // [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [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 // [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 @@ -460,40 +460,7 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil 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 index 571f06728a5..009c4055838 100644 --- 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 @@ -12,7 +12,9 @@ import ( ) // Returns a set of short term credentials you can use to perform privileged tasks -// on a member account in your organization. +// on a member account in your organization. You must use credentials from an +// Organizations management account or a delegated administrator account for IAM to +// call AssumeRoot . You cannot use root user credentials to make this call. // // 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 @@ -24,8 +26,16 @@ import ( // 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. // +// When granting access to privileged tasks you should only grant the necessary +// permissions required to perform that task. For more information, see [Security best practices in IAM]. In +// addition, you can use [service control policies](SCPs) to manage and limit permissions in your +// organization. See [General examples]in the Organizations User Guide for more information on SCPs. +// // [Endpoints]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints +// [Security best practices in IAM]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html // [Track privileged tasks in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html +// [General examples]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html +// [service control policies]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.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 { @@ -50,8 +60,10 @@ type AssumeRootInput struct { 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. + // can be performed. You must + // + // use one of following Amazon Web Services managed policies to scope root session + // actions: // // [IAMAuditRootUserCredentials] // @@ -205,40 +217,7 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go index 786bac89b8a..b00b0c4096c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go @@ -177,40 +177,7 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go index 6c1f878981c..887bb081f3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go @@ -168,40 +168,7 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go index 7d0653398b3..2c8d8867013 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go @@ -156,40 +156,7 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go new file mode 100644 index 00000000000..092ec13e3a3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go @@ -0,0 +1,172 @@ +// 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" +) + +// Exchanges a trade-in token for temporary Amazon Web Services credentials with +// the permissions associated with the assumed principal. This operation allows you +// to obtain credentials for a specific principal based on a trade-in token, +// enabling delegation of access to Amazon Web Services resources. +func (c *Client) GetDelegatedAccessToken(ctx context.Context, params *GetDelegatedAccessTokenInput, optFns ...func(*Options)) (*GetDelegatedAccessTokenOutput, error) { + if params == nil { + params = &GetDelegatedAccessTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDelegatedAccessToken", params, optFns, c.addOperationGetDelegatedAccessTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDelegatedAccessTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDelegatedAccessTokenInput struct { + + // The token to exchange for temporary Amazon Web Services credentials. This token + // must be valid and unexpired at the time of the request. + // + // This member is required. + TradeInToken *string + + noSmithyDocumentSerde +} + +type GetDelegatedAccessTokenOutput struct { + + // The Amazon Resource Name (ARN) of the principal that was assumed when obtaining + // the delegated access token. This ARN identifies the IAM entity whose permissions + // are granted by the temporary credentials. + AssumedPrincipal *string + + // Amazon Web Services credentials for API authentication. + Credentials *types.Credentials + + // The percentage of the maximum policy size that is used by the session policy. + // The policy size is calculated as the sum of all the session policies and + // permission boundaries attached to the session. If the packed size exceeds 100%, + // the request fails. + PackedPolicySize *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetDelegatedAccessToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetDelegatedAccessToken{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDelegatedAccessToken"); 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 = addOpGetDelegatedAccessTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelegatedAccessToken(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDelegatedAccessToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDelegatedAccessToken", + } +} 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 1c2f28e519c..e0fc9a54848 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 @@ -381,40 +381,7 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return 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 25604699009..2f931f4446d 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 @@ -227,40 +227,7 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addInterceptAttempt(stack, options); err != nil { return err } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(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 { + if err = addInterceptors(stack, options); err != nil { return err } return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go new file mode 100644 index 00000000000..306ee43b1e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go @@ -0,0 +1,195 @@ +// 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" + "time" +) + +// Returns a signed JSON Web Token (JWT) that represents the calling Amazon Web +// Services identity. The returned JWT can be used to authenticate with external +// services that support OIDC discovery. The token is signed by Amazon Web Services +// STS and can be publicly verified using the verification keys published at the +// issuer's JWKS endpoint. +func (c *Client) GetWebIdentityToken(ctx context.Context, params *GetWebIdentityTokenInput, optFns ...func(*Options)) (*GetWebIdentityTokenOutput, error) { + if params == nil { + params = &GetWebIdentityTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetWebIdentityToken", params, optFns, c.addOperationGetWebIdentityTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetWebIdentityTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetWebIdentityTokenInput struct { + + // The intended recipient of the web identity token. This value populates the aud + // claim in the JWT and should identify the service or application that will + // validate and use the token. The external service should verify this claim to + // ensure the token was intended for their use. + // + // This member is required. + Audience []string + + // The cryptographic algorithm to use for signing the JSON Web Token (JWT). Valid + // values are RS256 (RSA with SHA-256) and ES384 (ECDSA using P-384 curve with + // SHA-384). + // + // This member is required. + SigningAlgorithm *string + + // The duration, in seconds, for which the JSON Web Token (JWT) will remain valid. + // The value can range from 60 seconds (1 minute) to 3600 seconds (1 hour). If not + // specified, the default duration is 300 seconds (5 minutes). The token is + // designed to be short-lived and should be used for proof of identity, then + // exchanged for credentials or short-lived tokens in the external service. + DurationSeconds *int32 + + // An optional list of tags to include in the JSON Web Token (JWT). These tags are + // added as custom claims to the JWT and can be used by the downstream service for + // authorization decisions. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type GetWebIdentityTokenOutput struct { + + // The date and time when the web identity token expires, in UTC. The expiration + // is determined by adding the DurationSeconds value to the time the token was + // issued. After this time, the token should no longer be considered valid. + Expiration *time.Time + + // A signed JSON Web Token (JWT) that represents the caller's Amazon Web Services + // identity. The token contains standard JWT claims such as subject, audience, + // expiration time, and additional identity attributes added by STS as custom + // claims. You can also add your own custom claims to the token by passing tags as + // request parameters to the GetWebIdentityToken API. The token is signed using + // the specified signing algorithm and can be verified using the verification keys + // available at the issuer's JWKS endpoint. + WebIdentityToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetWebIdentityToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetWebIdentityToken{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetWebIdentityToken"); 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 = addOpGetWebIdentityTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWebIdentityToken(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetWebIdentityToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetWebIdentityToken", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go index 2a81b3fb19d..4db5a51f938 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go @@ -16,8 +16,9 @@ import ( "strings" ) -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { params.Region = options.Region + return nil } type setLegacyContextSigningOptionsMiddleware struct { @@ -94,14 +95,16 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(ctx, params, input, options) + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } - return params + return params, nil } // AuthSchemeResolver returns a set of possible authentication options for an @@ -164,7 +167,10 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") defer span.End() - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) 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 a1ac917ec6a..8c1ce351616 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 @@ -846,6 +846,124 @@ func awsAwsquery_deserializeOpErrorGetCallerIdentity(response *smithyhttp.Respon } } +type awsAwsquery_deserializeOpGetDelegatedAccessToken struct { +} + +func (*awsAwsquery_deserializeOpGetDelegatedAccessToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetDelegatedAccessToken) 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_deserializeOpErrorGetDelegatedAccessToken(response, &metadata) + } + output := &GetDelegatedAccessTokenOutput{} + 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("GetDelegatedAccessTokenResult") + 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_deserializeOpDocumentGetDelegatedAccessTokenOutput(&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_deserializeOpErrorGetDelegatedAccessToken(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("ExpiredTradeInTokenException", errorCode): + return awsAwsquery_deserializeErrorExpiredTradeInTokenException(response, errorBody) + + case strings.EqualFold("PackedPolicyTooLarge", errorCode): + return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody) + + case strings.EqualFold("RegionDisabledException", errorCode): + return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpGetFederationToken struct { } @@ -1076,6 +1194,124 @@ func awsAwsquery_deserializeOpErrorGetSessionToken(response *smithyhttp.Response } } +type awsAwsquery_deserializeOpGetWebIdentityToken struct { +} + +func (*awsAwsquery_deserializeOpGetWebIdentityToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetWebIdentityToken) 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_deserializeOpErrorGetWebIdentityToken(response, &metadata) + } + output := &GetWebIdentityTokenOutput{} + 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("GetWebIdentityTokenResult") + 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_deserializeOpDocumentGetWebIdentityTokenOutput(&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_deserializeOpErrorGetWebIdentityToken(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("JWTPayloadSizeExceededException", errorCode): + return awsAwsquery_deserializeErrorJWTPayloadSizeExceededException(response, errorBody) + + case strings.EqualFold("OutboundWebIdentityFederationDisabledException", errorCode): + return awsAwsquery_deserializeErrorOutboundWebIdentityFederationDisabledException(response, errorBody) + + case strings.EqualFold("SessionDurationEscalationException", errorCode): + return awsAwsquery_deserializeErrorSessionDurationEscalationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ExpiredTokenException{} var buff [1024]byte @@ -1120,8 +1356,8 @@ func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Resp return output } -func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IDPCommunicationErrorException{} +func awsAwsquery_deserializeErrorExpiredTradeInTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ExpiredTradeInTokenException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1151,7 +1387,7 @@ func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithy } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentIDPCommunicationErrorException(&output, decoder) + err = awsAwsquery_deserializeDocumentExpiredTradeInTokenException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1164,8 +1400,8 @@ func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithy return output } -func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IDPRejectedClaimException{} +func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IDPCommunicationErrorException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1195,7 +1431,7 @@ func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentIDPRejectedClaimException(&output, decoder) + err = awsAwsquery_deserializeDocumentIDPCommunicationErrorException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1208,8 +1444,8 @@ func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp. return output } -func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidAuthorizationMessageException{} +func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IDPRejectedClaimException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1239,7 +1475,7 @@ func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response * } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(&output, decoder) + err = awsAwsquery_deserializeDocumentIDPRejectedClaimException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1252,8 +1488,8 @@ func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response * return output } -func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidIdentityTokenException{} +func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidAuthorizationMessageException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1283,7 +1519,7 @@ func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidIdentityTokenException(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1296,8 +1532,8 @@ func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyh return output } -func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.MalformedPolicyDocumentException{} +func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidIdentityTokenException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1327,7 +1563,7 @@ func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smit } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidIdentityTokenException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1340,8 +1576,8 @@ func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smit return output } -func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PackedPolicyTooLargeException{} +func awsAwsquery_deserializeErrorJWTPayloadSizeExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.JWTPayloadSizeExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1371,7 +1607,7 @@ func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(&output, decoder) + err = awsAwsquery_deserializeDocumentJWTPayloadSizeExceededException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1384,8 +1620,8 @@ func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyh return output } -func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RegionDisabledException{} +func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MalformedPolicyDocumentException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -1415,7 +1651,7 @@ func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentRegionDisabledException(&output, decoder) + err = awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1428,13 +1664,441 @@ func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Re return output } -func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeErrorOutboundWebIdentityFederationDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OutboundWebIdentityFederationDisabledException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentOutboundWebIdentityFederationDisabledException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PackedPolicyTooLargeException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RegionDisabledException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentRegionDisabledException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorSessionDurationEscalationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SessionDurationEscalationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentSessionDurationEscalationException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AssumedRoleUser + if *v == nil { + sv = &types.AssumedRoleUser{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AssumedRoleId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AssumedRoleId = 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_deserializeDocumentCredentials(v **types.Credentials, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Credentials + if *v == nil { + sv = &types.Credentials{} + } 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("AccessKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AccessKeyId = ptr.String(xtv) + } + + case strings.EqualFold("Expiration", 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 + } + sv.Expiration = ptr.Time(t) + } + + case strings.EqualFold("SecretAccessKey", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SecretAccessKey = ptr.String(xtv) + } + + case strings.EqualFold("SessionToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SessionToken = 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_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ExpiredTokenException + if *v == nil { + sv = &types.ExpiredTokenException{} + } 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("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = 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_deserializeDocumentExpiredTradeInTokenException(v **types.ExpiredTradeInTokenException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ExpiredTradeInTokenException + if *v == nil { + sv = &types.ExpiredTradeInTokenException{} + } 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("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = 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_deserializeDocumentFederatedUser(v **types.FederatedUser, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.AssumedRoleUser + var sv *types.FederatedUser if *v == nil { - sv = &types.AssumedRoleUser{} + sv = &types.FederatedUser{} } else { sv = *v } @@ -1463,7 +2127,7 @@ func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, d sv.Arn = ptr.String(xtv) } - case strings.EqualFold("AssumedRoleId", t.Name.Local): + case strings.EqualFold("FederatedUserId", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -1473,7 +2137,7 @@ func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, d } { xtv := string(val) - sv.AssumedRoleId = ptr.String(xtv) + sv.FederatedUserId = ptr.String(xtv) } default: @@ -1490,13 +2154,13 @@ func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, d return nil } -func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentIDPCommunicationErrorException(v **types.IDPCommunicationErrorException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.Credentials + var sv *types.IDPCommunicationErrorException if *v == nil { - sv = &types.Credentials{} + sv = &types.IDPCommunicationErrorException{} } else { sv = *v } @@ -1512,50 +2176,7 @@ func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder s originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("AccessKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AccessKeyId = ptr.String(xtv) - } - - case strings.EqualFold("Expiration", 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 - } - sv.Expiration = ptr.Time(t) - } - - case strings.EqualFold("SecretAccessKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SecretAccessKey = ptr.String(xtv) - } - - case strings.EqualFold("SessionToken", t.Name.Local): + case strings.EqualFold("message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -1565,7 +2186,7 @@ func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder s } { xtv := string(val) - sv.SessionToken = ptr.String(xtv) + sv.Message = ptr.String(xtv) } default: @@ -1582,13 +2203,13 @@ func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder s return nil } -func awsAwsquery_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentIDPRejectedClaimException(v **types.IDPRejectedClaimException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.ExpiredTokenException + var sv *types.IDPRejectedClaimException if *v == nil { - sv = &types.ExpiredTokenException{} + sv = &types.IDPRejectedClaimException{} } else { sv = *v } @@ -1631,13 +2252,13 @@ func awsAwsquery_deserializeDocumentExpiredTokenException(v **types.ExpiredToken return nil } -func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(v **types.InvalidAuthorizationMessageException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.FederatedUser + var sv *types.InvalidAuthorizationMessageException if *v == nil { - sv = &types.FederatedUser{} + sv = &types.InvalidAuthorizationMessageException{} } else { sv = *v } @@ -1653,20 +2274,7 @@ func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decod originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("Arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("FederatedUserId", t.Name.Local): + case strings.EqualFold("message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -1676,7 +2284,7 @@ func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decod } { xtv := string(val) - sv.FederatedUserId = ptr.String(xtv) + sv.Message = ptr.String(xtv) } default: @@ -1693,13 +2301,13 @@ func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decod return nil } -func awsAwsquery_deserializeDocumentIDPCommunicationErrorException(v **types.IDPCommunicationErrorException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.InvalidIdentityTokenException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.IDPCommunicationErrorException + var sv *types.InvalidIdentityTokenException if *v == nil { - sv = &types.IDPCommunicationErrorException{} + sv = &types.InvalidIdentityTokenException{} } else { sv = *v } @@ -1742,13 +2350,13 @@ func awsAwsquery_deserializeDocumentIDPCommunicationErrorException(v **types.IDP return nil } -func awsAwsquery_deserializeDocumentIDPRejectedClaimException(v **types.IDPRejectedClaimException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentJWTPayloadSizeExceededException(v **types.JWTPayloadSizeExceededException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.IDPRejectedClaimException + var sv *types.JWTPayloadSizeExceededException if *v == nil { - sv = &types.IDPRejectedClaimException{} + sv = &types.JWTPayloadSizeExceededException{} } else { sv = *v } @@ -1791,13 +2399,13 @@ func awsAwsquery_deserializeDocumentIDPRejectedClaimException(v **types.IDPRejec return nil } -func awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(v **types.InvalidAuthorizationMessageException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidAuthorizationMessageException + var sv *types.MalformedPolicyDocumentException if *v == nil { - sv = &types.InvalidAuthorizationMessageException{} + sv = &types.MalformedPolicyDocumentException{} } else { sv = *v } @@ -1840,13 +2448,13 @@ func awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(v **typ return nil } -func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.InvalidIdentityTokenException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentOutboundWebIdentityFederationDisabledException(v **types.OutboundWebIdentityFederationDisabledException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidIdentityTokenException + var sv *types.OutboundWebIdentityFederationDisabledException if *v == nil { - sv = &types.InvalidIdentityTokenException{} + sv = &types.OutboundWebIdentityFederationDisabledException{} } else { sv = *v } @@ -1889,13 +2497,13 @@ func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.Inva return nil } -func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.PackedPolicyTooLargeException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.MalformedPolicyDocumentException + var sv *types.PackedPolicyTooLargeException if *v == nil { - sv = &types.MalformedPolicyDocumentException{} + sv = &types.PackedPolicyTooLargeException{} } else { sv = *v } @@ -1938,13 +2546,13 @@ func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.M return nil } -func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.PackedPolicyTooLargeException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentRegionDisabledException(v **types.RegionDisabledException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.PackedPolicyTooLargeException + var sv *types.RegionDisabledException if *v == nil { - sv = &types.PackedPolicyTooLargeException{} + sv = &types.RegionDisabledException{} } else { sv = *v } @@ -1987,13 +2595,13 @@ func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.Pack return nil } -func awsAwsquery_deserializeDocumentRegionDisabledException(v **types.RegionDisabledException, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentSessionDurationEscalationException(v **types.SessionDurationEscalationException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.RegionDisabledException + var sv *types.SessionDurationEscalationException if *v == nil { - sv = &types.RegionDisabledException{} + sv = &types.SessionDurationEscalationException{} } else { sv = *v } @@ -2602,6 +3210,78 @@ func awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(v **GetCallerIdent return nil } +func awsAwsquery_deserializeOpDocumentGetDelegatedAccessTokenOutput(v **GetDelegatedAccessTokenOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetDelegatedAccessTokenOutput + if *v == nil { + sv = &GetDelegatedAccessTokenOutput{} + } 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("AssumedPrincipal", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AssumedPrincipal = ptr.String(xtv) + } + + 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("PackedPolicySize", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.PackedPolicySize = ptr.Int32(int32(i64)) + } + + 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_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2708,3 +3388,69 @@ func awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(v **GetSessionTokenO *v = sv return nil } + +func awsAwsquery_deserializeOpDocumentGetWebIdentityTokenOutput(v **GetWebIdentityTokenOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetWebIdentityTokenOutput + if *v == nil { + sv = &GetWebIdentityTokenOutput{} + } 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("Expiration", 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 + } + sv.Expiration = ptr.Time(t) + } + + case strings.EqualFold("WebIdentityToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.WebIdentityToken = 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go index 945682e1a50..c8f9526c78a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go @@ -15,6 +15,7 @@ import ( smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" "github.com/aws/smithy-go/tracing" @@ -218,11 +219,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } -func bindRegion(region string) *string { +func bindRegion(region string) (*string, error) { if region == "" { - return nil + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) } - return aws.String(endpoints.MapFIPSRegion(region)) + + return aws.String(endpoints.MapFIPSRegion(region)), nil } // EndpointParameters provides the parameters that influence how endpoints are @@ -1060,10 +1065,15 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { params := &EndpointParameters{} - params.Region = bindRegion(options.Region) + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.Endpoint = options.BaseEndpoint @@ -1072,7 +1082,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options) b.bindEndpointParams(params) } - return params + return params, nil } type resolveEndpointV2Middleware struct { @@ -1102,7 +1112,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", func() (smithyendpoints.Endpoint, error) { return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) 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 86bb3b79be4..e61823ea016 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 @@ -17,8 +17,10 @@ "api_op_DecodeAuthorizationMessage.go", "api_op_GetAccessKeyInfo.go", "api_op_GetCallerIdentity.go", + "api_op_GetDelegatedAccessToken.go", "api_op_GetFederationToken.go", "api_op_GetSessionToken.go", + "api_op_GetWebIdentityToken.go", "auth.go", "deserializers.go", "doc.go", @@ -37,7 +39,7 @@ "types/types.go", "validators.go" ], - "go": "1.22", + "go": "1.23", "module": "github.com/aws/aws-sdk-go-v2/service/sts", "unstable": false } 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 dd0eacf56c2..6f29ba1fbf9 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.38.6" +const goModuleVersion = "1.41.6" 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 1dc87dd6bf1..be72d93dccd 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 @@ -359,6 +359,13 @@ var defaultPartitions = endpoints.Partitions{ { ID: "aws-eusc", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "sts.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: endpoints.FIPSVariant, }: { @@ -366,6 +373,13 @@ var defaultPartitions = endpoints.Partitions{ Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "sts-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, { Variant: 0, }: { @@ -376,6 +390,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsEusc, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eusc-de-east-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso", @@ -430,6 +449,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-west-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 96b222136bf..5e227387827 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 @@ -502,6 +502,76 @@ func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpGetDelegatedAccessToken struct { +} + +func (*awsAwsquery_serializeOpGetDelegatedAccessToken) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetDelegatedAccessToken) 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.(*GetDelegatedAccessTokenInput) + _ = 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("GetDelegatedAccessToken") + body.Key("Version").String("2011-06-15") + + if err := awsAwsquery_serializeOpDocumentGetDelegatedAccessTokenInput(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_serializeOpGetFederationToken struct { } @@ -641,6 +711,76 @@ func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } + +type awsAwsquery_serializeOpGetWebIdentityToken struct { +} + +func (*awsAwsquery_serializeOpGetWebIdentityToken) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetWebIdentityToken) 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.(*GetWebIdentityTokenInput) + _ = 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("GetWebIdentityToken") + body.Key("Version").String("2011-06-15") + + if err := awsAwsquery_serializeOpDocumentGetWebIdentityTokenInput(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) +} func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error { array := value.Array("member") @@ -733,6 +873,16 @@ func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value) return nil } +func awsAwsquery_serializeDocumentWebIdentityTokenAudienceListType(v []string, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsquery_serializeOpDocumentAssumeRoleInput(v *AssumeRoleInput, value query.Value) error { object := value.Object() _ = object @@ -946,6 +1096,18 @@ func awsAwsquery_serializeOpDocumentGetCallerIdentityInput(v *GetCallerIdentityI return nil } +func awsAwsquery_serializeOpDocumentGetDelegatedAccessTokenInput(v *GetDelegatedAccessTokenInput, value query.Value) error { + object := value.Object() + _ = object + + if v.TradeInToken != nil { + objectKey := object.Key("TradeInToken") + objectKey.String(*v.TradeInToken) + } + + return nil +} + func awsAwsquery_serializeOpDocumentGetFederationTokenInput(v *GetFederationTokenInput, value query.Value) error { object := value.Object() _ = object @@ -1003,3 +1165,34 @@ func awsAwsquery_serializeOpDocumentGetSessionTokenInput(v *GetSessionTokenInput return nil } + +func awsAwsquery_serializeOpDocumentGetWebIdentityTokenInput(v *GetWebIdentityTokenInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Audience != nil { + objectKey := object.Key("Audience") + if err := awsAwsquery_serializeDocumentWebIdentityTokenAudienceListType(v.Audience, objectKey); err != nil { + return err + } + } + + if v.DurationSeconds != nil { + objectKey := object.Key("DurationSeconds") + objectKey.Integer(*v.DurationSeconds) + } + + if v.SigningAlgorithm != nil { + objectKey := object.Key("SigningAlgorithm") + objectKey.String(*v.SigningAlgorithm) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} 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 041629bba2c..70d99a220b8 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 @@ -34,6 +34,33 @@ func (e *ExpiredTokenException) ErrorCode() string { } func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The trade-in token provided in the request has expired and can no longer be +// exchanged for credentials. Request a new token and retry the operation. +type ExpiredTradeInTokenException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ExpiredTradeInTokenException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ExpiredTradeInTokenException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ExpiredTradeInTokenException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ExpiredTradeInTokenException" + } + return *e.ErrorCodeOverride +} +func (e *ExpiredTradeInTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request could not be fulfilled because the identity provider (IDP) that was // asked to verify the incoming identity token could not be reached. This is often // a transient error caused by network conditions. Retry the request a limited @@ -152,6 +179,34 @@ func (e *InvalidIdentityTokenException) ErrorCode() string { } func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The requested token payload size exceeds the maximum allowed size. Reduce the +// number of request tags included in the GetWebIdentityToken API call to reduce +// the token payload size. +type JWTPayloadSizeExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *JWTPayloadSizeExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *JWTPayloadSizeExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *JWTPayloadSizeExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "JWTPayloadSizeExceededException" + } + return *e.ErrorCodeOverride +} +func (e *JWTPayloadSizeExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request was rejected because the policy document was malformed. The error // message describes the specific error. type MalformedPolicyDocumentException struct { @@ -179,6 +234,36 @@ func (e *MalformedPolicyDocumentException) ErrorCode() string { } func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The outbound web identity federation feature is not enabled for this account. +// To use this feature, you must first enable it through the Amazon Web Services +// Management Console or API. +type OutboundWebIdentityFederationDisabledException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OutboundWebIdentityFederationDisabledException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OutboundWebIdentityFederationDisabledException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OutboundWebIdentityFederationDisabledException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OutboundWebIdentityFederationDisabledException" + } + return *e.ErrorCodeOverride +} +func (e *OutboundWebIdentityFederationDisabledException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The request was rejected because the total packed size of the session policies // and session tags combined was too large. An Amazon Web Services conversion // compresses the session policy document, session policy ARNs, and session tags @@ -221,7 +306,7 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return // 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 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#sts-regions-activate-deactivate type RegionDisabledException struct { Message *string @@ -246,3 +331,33 @@ func (e *RegionDisabledException) ErrorCode() string { return *e.ErrorCodeOverride } func (e *RegionDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The requested token duration would extend the session beyond its original +// expiration time. You cannot use this operation to extend the lifetime of a +// session beyond what was granted when the session was originally created. +type SessionDurationEscalationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *SessionDurationEscalationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SessionDurationEscalationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SessionDurationEscalationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SessionDurationEscalationException" + } + return *e.ErrorCodeOverride +} +func (e *SessionDurationEscalationException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} 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 1026e22118d..4d37dd22a1d 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 @@ -130,6 +130,26 @@ func (m *validateOpGetAccessKeyInfo) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpGetDelegatedAccessToken struct { +} + +func (*validateOpGetDelegatedAccessToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDelegatedAccessToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDelegatedAccessTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDelegatedAccessTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetFederationToken struct { } @@ -150,6 +170,26 @@ func (m *validateOpGetFederationToken) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetWebIdentityToken struct { +} + +func (*validateOpGetWebIdentityToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetWebIdentityToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetWebIdentityTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetWebIdentityTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpAssumeRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssumeRole{}, middleware.After) } @@ -174,10 +214,18 @@ func addOpGetAccessKeyInfoValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAccessKeyInfo{}, middleware.After) } +func addOpGetDelegatedAccessTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDelegatedAccessToken{}, middleware.After) +} + func addOpGetFederationTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetFederationToken{}, middleware.After) } +func addOpGetWebIdentityTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetWebIdentityToken{}, middleware.After) +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -326,6 +374,21 @@ func validateOpGetAccessKeyInfoInput(v *GetAccessKeyInfoInput) error { } } +func validateOpGetDelegatedAccessTokenInput(v *GetDelegatedAccessTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDelegatedAccessTokenInput"} + if v.TradeInToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("TradeInToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error { if v == nil { return nil @@ -345,3 +408,26 @@ func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error { return nil } } + +func validateOpGetWebIdentityTokenInput(v *GetWebIdentityTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetWebIdentityTokenInput"} + if v.Audience == nil { + invalidParams.Add(smithy.NewErrParamRequired("Audience")) + } + if v.SigningAlgorithm == nil { + invalidParams.Add(smithy.NewErrParamRequired("SigningAlgorithm")) + } + if v.Tags != nil { + if err := validateTagListType(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 8b6ab295004..80af245f087 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,34 @@ +# Release (2025-12-01) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.24.0 + * **Feature**: Improve allocation footprint of the middleware stack. This should convey a ~10% reduction in allocations per SDK request. + +# Release (2025-11-03) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.23.2 + * **Bug Fix**: Adjust the initial sizes of each middleware phase to avoid some unnecessary reallocation. + * **Bug Fix**: Avoid unnecessary allocation overhead from the metrics system when not in use. + +# Release (2025-10-15) + +## General Highlights +* **Dependency Update**: Bump minimum go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# Release (2025-09-18) + +## Module Highlights +* `github.com/aws/smithy-go/aws-http-auth`: [v1.1.0](aws-http-auth/CHANGELOG.md#v110-2025-09-18) + * **Feature**: Added support for SIG4/SIGV4A querystring authentication. + # Release (2025-08-27) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile index 34b17ab2fe0..a12b124d505 100644 --- a/vendor/github.com/aws/smithy-go/Makefile +++ b/vendor/github.com/aws/smithy-go/Makefile @@ -13,6 +13,7 @@ REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${R REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION} REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION} REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION} +REPOTOOLS_CMD_EACHMODULE = ${REPOTOOLS_MODULE}/cmd/eachmodule@${REPOTOOLS_VERSION} UNIT_TEST_TAGS= BUILD_TAGS= @@ -55,8 +56,11 @@ ensure-gradle-up: verify: vet -vet: - go vet ${BUILD_TAGS} --all ./... +vet: vet-modules-. + +vet-modules-%: + go run ${REPOTOOLS_CMD_EACHMODULE} -p $(subst vet-modules-,,$@) \ + "go vet ${BUILD_TAGS} --all ./..." cover: go test ${BUILD_TAGS} -coverprofile c.out ./... @@ -66,21 +70,22 @@ cover: ################ # Unit Testing # ################ -.PHONY: unit unit-race unit-test unit-race-test +.PHONY: test unit unit-race + +test: unit-race + +unit: verify unit-modules-. -unit: verify - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} ./... +unit-modules-%: + go run ${REPOTOOLS_CMD_EACHMODULE} -p $(subst unit-modules-,,$@) \ + "go test -timeout=1m ${UNIT_TEST_TAGS} ./..." -unit-race: verify - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... +unit-race: verify unit-race-modules-. -unit-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} ./... +unit-race-modules-%: + go run ${REPOTOOLS_CMD_EACHMODULE} -p $(subst unit-race-modules-,,$@) \ + "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..." -unit-race-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... ##################### # Release Process # diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index 77a74ae0c2c..ddce37b99ef 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -4,7 +4,7 @@ [Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime. -The smithy-go runtime requires a minimum version of Go 1.22. +The smithy-go runtime requires a minimum version of Go 1.23. **WARNING: All interfaces are subject to change.** @@ -80,7 +80,7 @@ example created from `smithy init`: "service": "example.weather#Weather", "module": "github.com/example/weather", "generateGoMod": true, - "goDirective": "1.22" + "goDirective": "1.23" } } } 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 945db0af309..b6c4c2f51cf 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.23.0" +const goModuleVersion = "1.24.0" diff --git a/vendor/github.com/aws/smithy-go/metrics/nop.go b/vendor/github.com/aws/smithy-go/metrics/nop.go index fb374e1fb85..444126df5a0 100644 --- a/vendor/github.com/aws/smithy-go/metrics/nop.go +++ b/vendor/github.com/aws/smithy-go/metrics/nop.go @@ -9,54 +9,82 @@ var _ MeterProvider = (*NopMeterProvider)(nil) // Meter returns a meter which creates no-op instruments. func (NopMeterProvider) Meter(string, ...MeterOption) Meter { - return nopMeter{} + return NopMeter{} } -type nopMeter struct{} +// NopMeter creates no-op instruments. +type NopMeter struct{} -var _ Meter = (*nopMeter)(nil) +var _ Meter = (*NopMeter)(nil) -func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) { - return nopInstrument[int64]{}, nil +// Int64Counter creates a no-op instrument. +func (NopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) { - return nopInstrument[int64]{}, nil + +// Int64UpDownCounter creates a no-op instrument. +func (NopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) { - return nopInstrument[int64]{}, nil + +// Int64Gauge creates a no-op instrument. +func (NopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) { - return nopInstrument[int64]{}, nil + +// Int64Histogram creates a no-op instrument. +func (NopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil + +// Int64AsyncCounter creates a no-op instrument. +func (NopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil + +// Int64AsyncUpDownCounter creates a no-op instrument. +func (NopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil + +// Int64AsyncGauge creates a no-op instrument. +func (NopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) { - return nopInstrument[float64]{}, nil + +// Float64Counter creates a no-op instrument. +func (NopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) { - return nopInstrument[float64]{}, nil + +// Float64UpDownCounter creates a no-op instrument. +func (NopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) { - return nopInstrument[float64]{}, nil + +// Float64Gauge creates a no-op instrument. +func (NopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) { - return nopInstrument[float64]{}, nil + +// Float64Histogram creates a no-op instrument. +func (NopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil + +// Float64AsyncCounter creates a no-op instrument. +func (NopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil + +// Float64AsyncUpDownCounter creates a no-op instrument. +func (NopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil + +// Float64AsyncGauge creates a no-op instrument. +func (NopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentFloat64, nil } type nopInstrument[N any] struct{} @@ -65,3 +93,6 @@ func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {} func (nopInstrument[N]) Sample(context.Context, N, ...RecordMetricOption) {} func (nopInstrument[N]) Record(context.Context, N, ...RecordMetricOption) {} func (nopInstrument[_]) Stop() {} + +var nopInstrumentInt64 = nopInstrument[int64]{} +var nopInstrumentFloat64 = nopInstrument[float64]{} diff --git a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go index 4b195308c59..daf90136e96 100644 --- a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go +++ b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go @@ -23,12 +23,14 @@ type orderedIDs struct { items map[string]ider } -const baseOrderedItems = 5 +// selected based on the general upper bound of # of middlewares in each step +// in the downstream aws-sdk-go-v2 +const baseOrderedItems = 8 -func newOrderedIDs() *orderedIDs { +func newOrderedIDs(cap int) *orderedIDs { return &orderedIDs{ - order: newRelativeOrder(), - items: make(map[string]ider, baseOrderedItems), + order: newRelativeOrder(cap), + items: make(map[string]ider, cap), } } @@ -141,9 +143,9 @@ type relativeOrder struct { order []string } -func newRelativeOrder() *relativeOrder { +func newRelativeOrder(cap int) *relativeOrder { return &relativeOrder{ - order: make([]string, 0, baseOrderedItems), + order: make([]string, 0, cap), } } diff --git a/vendor/github.com/aws/smithy-go/middleware/step_build.go b/vendor/github.com/aws/smithy-go/middleware/step_build.go index 7e1d94caeef..db8c26715cb 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_build.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_build.go @@ -1,7 +1,9 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware import ( "context" + "fmt" ) // BuildInput provides the input parameters for the BuildMiddleware to consume. @@ -25,14 +27,14 @@ type BuildHandler interface { } // BuildMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next BuildHandler for further +// build step. Delegates to the next BuildHandler for further // processing. type BuildMiddleware interface { - // Unique ID for the middleware in theBuildStep. The step does not allow - // duplicate IDs. + // ID returns a unique ID for the middleware in the BuildStep. The step does not + // allow duplicate IDs. ID() string - // Invokes the middleware behavior which must delegate to the next handler + // HandleBuild invokes the middleware behavior which must delegate to the next handler // for the middleware chain to continue. The method must return a result or // error to its caller. HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) ( @@ -54,7 +56,9 @@ type buildMiddlewareFunc struct { id string // Middleware function to be called. - fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error) + fn func(context.Context, BuildInput, BuildHandler) ( + BuildOutput, Metadata, error, + ) } // ID returns the unique ID for the middleware. @@ -69,23 +73,22 @@ func (s buildMiddlewareFunc) HandleBuild(ctx context.Context, in BuildInput, nex var _ BuildMiddleware = (buildMiddlewareFunc{}) -// BuildStep provides the ordered grouping of BuildMiddleware to be invoked on -// a handler. +// BuildStep provides the ordered grouping of BuildMiddleware to be +// invoked on a handler. type BuildStep struct { - ids *orderedIDs + head *decoratedBuildHandler + tail *decoratedBuildHandler } -// NewBuildStep returns a BuildStep ready to have middleware for -// initialization added to it. +// NewBuildStep returns an BuildStep ready to have middleware for +// build added to it. func NewBuildStep() *BuildStep { - return &BuildStep{ - ids: newOrderedIDs(), - } + return &BuildStep{} } var _ Middleware = (*BuildStep)(nil) -// ID returns the unique name of the step as a middleware. +// ID returns the unique ID of the step as a middleware. func (s *BuildStep) ID() string { return "Build stack step" } @@ -97,77 +100,161 @@ func (s *BuildStep) ID() string { func (s *BuildStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h BuildHandler = buildWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedBuildHandler{ - Next: h, - With: order[i].(BuildMiddleware), - } - } - sIn := BuildInput{ Request: in, } - res, metadata, err := h.HandleBuild(ctx, sIn) + wh := &buildWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleBuild(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleBuild(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *BuildStep) Get(id string) (BuildMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(BuildMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *BuildStep) Add(m BuildMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedBuildHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedBuildHandler{s.head, m} + } else { + tail := &decoratedBuildHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } -// Insert injects the middleware relative to an existing middleware id. -// Returns an error if the original middleware does not exist, or the middleware +// Insert injects the middleware relative to an existing middleware ID. +// Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *BuildStep) Insert(m BuildMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedBuildHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedBuildHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedBuildHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedBuildHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or an error if the middleware to be removed +// Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *BuildStep) Swap(id string, m BuildMiddleware) (BuildMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(BuildMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *BuildStep) Remove(id string) (BuildMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) } - return removed.(BuildMiddleware), nil + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedBuildHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle + } + + return found.With, nil } // List returns a list of the middleware in the step. func (s *BuildStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *buildWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedBuildHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *BuildStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *BuildStep) get(id string) (found, prev *decoratedBuildHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *buildWrapHandler + h, _ = h.Next.(*decoratedBuildHandler) + } + return } type buildWrapHandler struct { @@ -176,7 +263,7 @@ type buildWrapHandler struct { var _ BuildHandler = (*buildWrapHandler)(nil) -// Implements BuildHandler, converts types and delegates to underlying +// HandleBuild implements BuildHandler, converts types and delegates to underlying // generic handler. func (w buildWrapHandler) HandleBuild(ctx context.Context, in BuildInput) ( out BuildOutput, metadata Metadata, err error, @@ -200,12 +287,12 @@ func (h decoratedBuildHandler) HandleBuild(ctx context.Context, in BuildInput) ( return h.With.HandleBuild(ctx, in, h.Next) } -// BuildHandlerFunc provides a wrapper around a function to be used as a build middleware handler. +// BuildHandlerFunc provides a wrapper around a function to be used as buildMiddleware. type BuildHandlerFunc func(context.Context, BuildInput) (BuildOutput, Metadata, error) -// HandleBuild invokes the wrapped function with the provided arguments. -func (b BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) { - return b(ctx, in) +// HandleBuild calls the wrapped function with the provided arguments. +func (f BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) { + return f(ctx, in) } var _ BuildHandler = BuildHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go index 44860721571..1f337f2dbc9 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go @@ -1,7 +1,9 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware import ( "context" + "fmt" ) // DeserializeInput provides the input parameters for the DeserializeInput to @@ -11,10 +13,7 @@ type DeserializeInput struct { Request interface{} } -// DeserializeOutput provides the result returned by the next -// DeserializeHandler. The DeserializeMiddleware should deserialize the -// RawResponse into a Result that can be consumed by middleware higher up in -// the stack. +// DeserializeOutput provides the result returned by the next DeserializeHandler. type DeserializeOutput struct { RawResponse interface{} Result interface{} @@ -29,7 +28,7 @@ type DeserializeHandler interface { } // DeserializeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next DeserializeHandler for further +// deserialize step. Delegates to the next DeserializeHandler for further // processing. type DeserializeMiddleware interface { // ID returns a unique ID for the middleware in the DeserializeStep. The step does not @@ -44,8 +43,8 @@ type DeserializeMiddleware interface { ) } -// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID -// provided, and the func to be invoked. +// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID provided, +// and the func to be invoked. func DeserializeMiddlewareFunc(id string, fn func(context.Context, DeserializeInput, DeserializeHandler) (DeserializeOutput, Metadata, error)) DeserializeMiddleware { return deserializeMiddlewareFunc{ id: id, @@ -78,15 +77,14 @@ var _ DeserializeMiddleware = (deserializeMiddlewareFunc{}) // DeserializeStep provides the ordered grouping of DeserializeMiddleware to be // invoked on a handler. type DeserializeStep struct { - ids *orderedIDs + head *decoratedDeserializeHandler + tail *decoratedDeserializeHandler } -// NewDeserializeStep returns a DeserializeStep ready to have middleware for -// initialization added to it. +// NewDeserializeStep returns an DeserializeStep ready to have middleware for +// deserialize added to it. func NewDeserializeStep() *DeserializeStep { - return &DeserializeStep{ - ids: newOrderedIDs(), - } + return &DeserializeStep{} } var _ Middleware = (*DeserializeStep)(nil) @@ -103,77 +101,161 @@ func (s *DeserializeStep) ID() string { func (s *DeserializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h DeserializeHandler = deserializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedDeserializeHandler{ - Next: h, - With: order[i].(DeserializeMiddleware), - } - } - sIn := DeserializeInput{ Request: in, } - res, metadata, err := h.HandleDeserialize(ctx, sIn) + wh := &deserializeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleDeserialize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleDeserialize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *DeserializeStep) Get(id string) (DeserializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(DeserializeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *DeserializeStep) Add(m DeserializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedDeserializeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedDeserializeHandler{s.head, m} + } else { + tail := &decoratedDeserializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *DeserializeStep) Insert(m DeserializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedDeserializeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedDeserializeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedDeserializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedDeserializeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *DeserializeStep) Swap(id string, m DeserializeMiddleware) (DeserializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(DeserializeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *DeserializeStep) Remove(id string) (DeserializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) + } + + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedDeserializeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle } - return removed.(DeserializeMiddleware), nil + return found.With, nil } // List returns a list of the middleware in the step. func (s *DeserializeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *deserializeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedDeserializeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *DeserializeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *DeserializeStep) get(id string) (found, prev *decoratedDeserializeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *deserializeWrapHandler + h, _ = h.Next.(*decoratedDeserializeHandler) + } + return } type deserializeWrapHandler struct { @@ -187,9 +269,10 @@ var _ DeserializeHandler = (*deserializeWrapHandler)(nil) func (w deserializeWrapHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) ( out DeserializeOutput, metadata Metadata, err error, ) { - resp, metadata, err := w.Next.Handle(ctx, in.Request) + res, metadata, err := w.Next.Handle(ctx, in.Request) return DeserializeOutput{ - RawResponse: resp, + RawResponse: res, + Result: nil, }, metadata, err } @@ -206,12 +289,12 @@ func (h decoratedDeserializeHandler) HandleDeserialize(ctx context.Context, in D return h.With.HandleDeserialize(ctx, in, h.Next) } -// DeserializeHandlerFunc provides a wrapper around a function to be used as a deserialize middleware handler. +// DeserializeHandlerFunc provides a wrapper around a function to be used as deserializeMiddleware. type DeserializeHandlerFunc func(context.Context, DeserializeInput) (DeserializeOutput, Metadata, error) -// HandleDeserialize invokes the wrapped function with the given arguments. -func (d DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) { - return d(ctx, in) +// HandleDeserialize calls the wrapped function with the provided arguments. +func (f DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) { + return f(ctx, in) } var _ DeserializeHandler = DeserializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go index 065e3885de9..1a0ad9fb88b 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go @@ -1,6 +1,10 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware -import "context" +import ( + "context" + "fmt" +) // FinalizeInput provides the input parameters for the FinalizeMiddleware to // consume. FinalizeMiddleware may modify the Request value before forwarding @@ -23,7 +27,7 @@ type FinalizeHandler interface { } // FinalizeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next FinalizeHandler for further +// finalize step. Delegates to the next FinalizeHandler for further // processing. type FinalizeMiddleware interface { // ID returns a unique ID for the middleware in the FinalizeStep. The step does not @@ -38,8 +42,8 @@ type FinalizeMiddleware interface { ) } -// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID -// provided, and the func to be invoked. +// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID provided, +// and the func to be invoked. func FinalizeMiddlewareFunc(id string, fn func(context.Context, FinalizeInput, FinalizeHandler) (FinalizeOutput, Metadata, error)) FinalizeMiddleware { return finalizeMiddlewareFunc{ id: id, @@ -72,20 +76,19 @@ var _ FinalizeMiddleware = (finalizeMiddlewareFunc{}) // FinalizeStep provides the ordered grouping of FinalizeMiddleware to be // invoked on a handler. type FinalizeStep struct { - ids *orderedIDs + head *decoratedFinalizeHandler + tail *decoratedFinalizeHandler } -// NewFinalizeStep returns a FinalizeStep ready to have middleware for -// initialization added to it. +// NewFinalizeStep returns an FinalizeStep ready to have middleware for +// finalize added to it. func NewFinalizeStep() *FinalizeStep { - return &FinalizeStep{ - ids: newOrderedIDs(), - } + return &FinalizeStep{} } var _ Middleware = (*FinalizeStep)(nil) -// ID returns the unique id of the step as a middleware. +// ID returns the unique ID of the step as a middleware. func (s *FinalizeStep) ID() string { return "Finalize stack step" } @@ -97,77 +100,161 @@ func (s *FinalizeStep) ID() string { func (s *FinalizeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h FinalizeHandler = finalizeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedFinalizeHandler{ - Next: h, - With: order[i].(FinalizeMiddleware), - } - } - sIn := FinalizeInput{ Request: in, } - res, metadata, err := h.HandleFinalize(ctx, sIn) + wh := &finalizeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleFinalize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleFinalize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *FinalizeStep) Get(id string) (FinalizeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(FinalizeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *FinalizeStep) Add(m FinalizeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedFinalizeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedFinalizeHandler{s.head, m} + } else { + tail := &decoratedFinalizeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *FinalizeStep) Insert(m FinalizeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedFinalizeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedFinalizeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedFinalizeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedFinalizeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *FinalizeStep) Swap(id string, m FinalizeMiddleware) (FinalizeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(FinalizeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *FinalizeStep) Remove(id string) (FinalizeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) + } + + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedFinalizeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle } - return removed.(FinalizeMiddleware), nil + return found.With, nil } // List returns a list of the middleware in the step. func (s *FinalizeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *finalizeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedFinalizeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *FinalizeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *FinalizeStep) get(id string) (found, prev *decoratedFinalizeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *finalizeWrapHandler + h, _ = h.Next.(*decoratedFinalizeHandler) + } + return } type finalizeWrapHandler struct { @@ -200,10 +287,10 @@ func (h decoratedFinalizeHandler) HandleFinalize(ctx context.Context, in Finaliz return h.With.HandleFinalize(ctx, in, h.Next) } -// FinalizeHandlerFunc provides a wrapper around a function to be used as a finalize middleware handler. +// FinalizeHandlerFunc provides a wrapper around a function to be used as finalizeMiddleware. type FinalizeHandlerFunc func(context.Context, FinalizeInput) (FinalizeOutput, Metadata, error) -// HandleFinalize invokes the wrapped function with the given arguments. +// HandleFinalize calls the wrapped function with the provided arguments. func (f FinalizeHandlerFunc) HandleFinalize(ctx context.Context, in FinalizeInput) (FinalizeOutput, Metadata, error) { return f(ctx, in) } diff --git a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go index fe359144d24..446f3b7bb9c 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go @@ -1,10 +1,15 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware -import "context" +import ( + "context" + "fmt" +) // InitializeInput wraps the input parameters for the InitializeMiddlewares to // consume. InitializeMiddleware may modify the parameter value before // forwarding it along to the next InitializeHandler. + type InitializeInput struct { Parameters interface{} } @@ -72,15 +77,14 @@ var _ InitializeMiddleware = (initializeMiddlewareFunc{}) // InitializeStep provides the ordered grouping of InitializeMiddleware to be // invoked on a handler. type InitializeStep struct { - ids *orderedIDs + head *decoratedInitializeHandler + tail *decoratedInitializeHandler } // NewInitializeStep returns an InitializeStep ready to have middleware for -// initialization added to it. +// initialize added to it. func NewInitializeStep() *InitializeStep { - return &InitializeStep{ - ids: newOrderedIDs(), - } + return &InitializeStep{} } var _ Middleware = (*InitializeStep)(nil) @@ -97,77 +101,161 @@ func (s *InitializeStep) ID() string { func (s *InitializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h InitializeHandler = initializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedInitializeHandler{ - Next: h, - With: order[i].(InitializeMiddleware), - } - } - sIn := InitializeInput{ Parameters: in, } - res, metadata, err := h.HandleInitialize(ctx, sIn) + wh := &initializeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleInitialize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleInitialize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *InitializeStep) Get(id string) (InitializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(InitializeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *InitializeStep) Add(m InitializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedInitializeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedInitializeHandler{s.head, m} + } else { + tail := &decoratedInitializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *InitializeStep) Insert(m InitializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedInitializeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedInitializeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedInitializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedInitializeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *InitializeStep) Swap(id string, m InitializeMiddleware) (InitializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(InitializeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *InitializeStep) Remove(id string) (InitializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) } - return removed.(InitializeMiddleware), nil + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedInitializeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle + } + + return found.With, nil } // List returns a list of the middleware in the step. func (s *InitializeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *initializeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedInitializeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *InitializeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *InitializeStep) get(id string) (found, prev *decoratedInitializeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *initializeWrapHandler + h, _ = h.Next.(*decoratedInitializeHandler) + } + return } type initializeWrapHandler struct { @@ -200,12 +288,12 @@ func (h decoratedInitializeHandler) HandleInitialize(ctx context.Context, in Ini return h.With.HandleInitialize(ctx, in, h.Next) } -// InitializeHandlerFunc provides a wrapper around a function to be used as an initialize middleware handler. +// InitializeHandlerFunc provides a wrapper around a function to be used as initializeMiddleware. type InitializeHandlerFunc func(context.Context, InitializeInput) (InitializeOutput, Metadata, error) // HandleInitialize calls the wrapped function with the provided arguments. -func (i InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) { - return i(ctx, in) +func (f InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) { + return f(ctx, in) } var _ InitializeHandler = InitializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go index 114bafcedea..942ebb4f3e7 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go @@ -1,6 +1,10 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware -import "context" +import ( + "context" + "fmt" +) // SerializeInput provides the input parameters for the SerializeMiddleware to // consume. SerializeMiddleware may modify the Request value before forwarding @@ -41,8 +45,8 @@ type SerializeMiddleware interface { ) } -// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID -// provided, and the func to be invoked. +// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID provided, +// and the func to be invoked. func SerializeMiddlewareFunc(id string, fn func(context.Context, SerializeInput, SerializeHandler) (SerializeOutput, Metadata, error)) SerializeMiddleware { return serializeMiddlewareFunc{ id: id, @@ -75,17 +79,15 @@ var _ SerializeMiddleware = (serializeMiddlewareFunc{}) // SerializeStep provides the ordered grouping of SerializeMiddleware to be // invoked on a handler. type SerializeStep struct { + head *decoratedSerializeHandler + tail *decoratedSerializeHandler newRequest func() interface{} - ids *orderedIDs } -// NewSerializeStep returns a SerializeStep ready to have middleware for -// initialization added to it. The newRequest func parameter is used to -// initialize the transport specific request for the stack SerializeStep to -// serialize the input parameters into. +// NewSerializeStep returns an SerializeStep ready to have middleware for +// serialize added to it. func NewSerializeStep(newRequest func() interface{}) *SerializeStep { return &SerializeStep{ - ids: newOrderedIDs(), newRequest: newRequest, } } @@ -104,78 +106,162 @@ func (s *SerializeStep) ID() string { func (s *SerializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h SerializeHandler = serializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedSerializeHandler{ - Next: h, - With: order[i].(SerializeMiddleware), - } - } - sIn := SerializeInput{ Parameters: in, Request: s.newRequest(), } - res, metadata, err := h.HandleSerialize(ctx, sIn) + wh := &serializeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleSerialize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleSerialize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *SerializeStep) Get(id string) (SerializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(SerializeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *SerializeStep) Add(m SerializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedSerializeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedSerializeHandler{s.head, m} + } else { + tail := &decoratedSerializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *SerializeStep) Insert(m SerializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedSerializeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedSerializeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedSerializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedSerializeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *SerializeStep) Swap(id string, m SerializeMiddleware) (SerializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(SerializeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *SerializeStep) Remove(id string) (SerializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) + } + + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedSerializeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle } - return removed.(SerializeMiddleware), nil + return found.With, nil } // List returns a list of the middleware in the step. func (s *SerializeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *serializeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedSerializeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *SerializeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *SerializeStep) get(id string) (found, prev *decoratedSerializeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *serializeWrapHandler + h, _ = h.Next.(*decoratedSerializeHandler) + } + return } type serializeWrapHandler struct { @@ -184,7 +270,7 @@ type serializeWrapHandler struct { var _ SerializeHandler = (*serializeWrapHandler)(nil) -// Implements SerializeHandler, converts types and delegates to underlying +// HandleSerialize implements SerializeHandler, converts types and delegates to underlying // generic handler. func (w serializeWrapHandler) HandleSerialize(ctx context.Context, in SerializeInput) ( out SerializeOutput, metadata Metadata, err error, @@ -208,12 +294,12 @@ func (h decoratedSerializeHandler) HandleSerialize(ctx context.Context, in Seria return h.With.HandleSerialize(ctx, in, h.Next) } -// SerializeHandlerFunc provides a wrapper around a function to be used as a serialize middleware handler. +// SerializeHandlerFunc provides a wrapper around a function to be used as serializeMiddleware. type SerializeHandlerFunc func(context.Context, SerializeInput) (SerializeOutput, Metadata, error) // HandleSerialize calls the wrapped function with the provided arguments. -func (s SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) { - return s(ctx, in) +func (f SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) { + return f(ctx, in) } var _ SerializeHandler = SerializeHandlerFunc(nil) 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 d1beaa595d9..b4cd4a47e36 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/metrics.go +++ b/vendor/github.com/aws/smithy-go/transport/http/metrics.go @@ -17,6 +17,12 @@ var now = time.Now func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) ( context.Context, ClientDo, error, ) { + // WithClientTrace is an expensive operation - avoid calling it if we're + // not actually using a metrics sink. + if _, ok := meter.(metrics.NopMeter); ok { + return parent, client, nil + } + hm, err := newHTTPMetrics(meter) if err != nil { return nil, nil, err diff --git a/vendor/github.com/cenkalti/backoff/v5/exponential.go b/vendor/github.com/cenkalti/backoff/v5/exponential.go index c1f3e442d36..79d425e8746 100644 --- a/vendor/github.com/cenkalti/backoff/v5/exponential.go +++ b/vendor/github.com/cenkalti/backoff/v5/exponential.go @@ -1,7 +1,7 @@ package backoff import ( - "math/rand" + "math/rand/v2" "time" ) @@ -28,13 +28,7 @@ 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: +Example: Given the following default arguments, for 9 tries the sequence will be: Request # RetryInterval (seconds) Randomized Interval (seconds) @@ -47,7 +41,6 @@ and assuming we go over the MaxElapsedTime on the 10th try: 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. */ diff --git a/vendor/github.com/cenkalti/backoff/v5/retry.go b/vendor/github.com/cenkalti/backoff/v5/retry.go index e43f47fb8a5..32a7f988347 100644 --- a/vendor/github.com/cenkalti/backoff/v5/retry.go +++ b/vendor/github.com/cenkalti/backoff/v5/retry.go @@ -47,7 +47,7 @@ func WithNotify(n Notify) RetryOption { } } -// WithMaxTries limits the number of retry attempts. +// WithMaxTries limits the number of all attempts. func WithMaxTries(n uint) RetryOption { return func(args *retryOptions) { args.MaxTries = n @@ -97,7 +97,7 @@ func Retry[T any](ctx context.Context, operation Operation[T], opts ...RetryOpti // Handle permanent errors without retrying. var permanent *PermanentError if errors.As(err, &permanent) { - return res, err + return res, permanent.Unwrap() } // Stop retrying if context is cancelled. diff --git a/vendor/github.com/coder/quartz/mock.go b/vendor/github.com/coder/quartz/mock.go index 1b0c48c6c12..d168849d602 100644 --- a/vendor/github.com/coder/quartz/mock.go +++ b/vendor/github.com/coder/quartz/mock.go @@ -14,6 +14,7 @@ import ( // during a test, triggering any timers or tickers automatically. type Mock struct { tb testing.TB + logger Logger mu sync.Mutex testOver bool @@ -54,6 +55,9 @@ func (m *Mock) TickerFunc(ctx context.Context, d time.Duration, f func() error, return t } +// NewTicker creates a mocked ticker attached to this Mock. Note that it will cease sending ticks on its channel at the +// end of the test, to avoid leaking any goroutines. Ticks are suppressed even if the mock clock is advanced after the +// test completes. Best practice is to only manipulate the mock time in the main goroutine of the test. func (m *Mock) NewTicker(d time.Duration, tags ...string) *Ticker { if d <= 0 { panic("NewTicker called with negative or zero duration") @@ -63,17 +67,7 @@ func (m *Mock) NewTicker(d time.Duration, tags ...string) *Ticker { c := newCall(clockFunctionNewTicker, tags, withDuration(d)) m.matchCallLocked(c) defer close(c.complete) - // 1 element buffer follows standard library implementation - ticks := make(chan time.Time, 1) - t := &Ticker{ - C: ticks, - c: ticks, - d: d, - nxt: m.cur.Add(d), - mock: m, - } - m.addEventLocked(t) - return t + return newMockTickerLocked(m, d) } func (m *Mock) NewTimer(d time.Duration, tags ...string) *Timer { @@ -82,7 +76,7 @@ func (m *Mock) NewTimer(d time.Duration, tags ...string) *Timer { c := newCall(clockFunctionNewTimer, tags, withDuration(d)) defer close(c.complete) m.matchCallLocked(c) - ch := make(chan time.Time, 1) + ch := make(chan time.Time) t := &Timer{ C: ch, c: ch, @@ -199,7 +193,7 @@ func (m *Mock) matchCallLocked(c *apiCall) { } } if !m.testOver { - m.tb.Logf("Mock Clock - %s call, matched %d traps", c, len(traps)) + m.logger.Logf("Mock Clock - %s call, matched %d traps", c, len(traps)) } if len(traps) == 0 { return @@ -265,7 +259,7 @@ func (m *Mock) Advance(d time.Duration) AdvanceWaiter { w := AdvanceWaiter{tb: m.tb, ch: make(chan struct{})} m.mu.Lock() if !m.testOver { - m.tb.Logf("Mock Clock - Advance(%s)", d) + m.logger.Logf("Mock Clock - Advance(%s)", d) } fin := m.cur.Add(d) // nextTime.IsZero implies no events scheduled. @@ -276,8 +270,8 @@ func (m *Mock) Advance(d time.Duration) AdvanceWaiter { return w } if fin.After(m.nextTime) { - m.tb.Errorf(fmt.Sprintf("cannot advance %s which is beyond next timer/ticker event in %s", - d.String(), m.nextTime.Sub(m.cur))) + m.tb.Errorf("cannot advance %s which is beyond next timer/ticker event in %s", + d.String(), m.nextTime.Sub(m.cur)) m.mu.Unlock() close(w.ch) return w @@ -315,7 +309,7 @@ func (m *Mock) Set(t time.Time) AdvanceWaiter { w := AdvanceWaiter{tb: m.tb, ch: make(chan struct{})} m.mu.Lock() if !m.testOver { - m.tb.Logf("Mock Clock - Set(%s)", t) + m.logger.Logf("Mock Clock - Set(%s)", t) } if t.Before(m.cur) { defer close(w.ch) @@ -354,7 +348,7 @@ func (m *Mock) Set(t time.Time) AdvanceWaiter { func (m *Mock) AdvanceNext() (time.Duration, AdvanceWaiter) { m.mu.Lock() if !m.testOver { - m.tb.Logf("Mock Clock - AdvanceNext()") + m.logger.Logf("Mock Clock - AdvanceNext()") } m.tb.Helper() w := AdvanceWaiter{tb: m.tb, ch: make(chan struct{})} @@ -445,7 +439,7 @@ func (m *Mock) newTrap(fn clockFunction, tags []string) *Trap { m.mu.Lock() defer m.mu.Unlock() if !m.testOver { - m.tb.Logf("Mock Clock - Trap %s(..., %v)", fn, tags) + m.logger.Logf("Mock Clock - Trap %s(..., %v)", fn, tags) } tr := &Trap{ fn: fn, @@ -458,6 +452,18 @@ func (m *Mock) newTrap(fn clockFunction, tags []string) *Trap { return tr } +// WithLogger replaces the default testing logger with a custom one. +// +// This can be used to discard log messages with: +// +// quartz.NewMock(t).WithLogger(quartz.NoOpLogger) +func (m *Mock) WithLogger(l Logger) *Mock { + m.mu.Lock() + defer m.mu.Unlock() + m.logger = l + return m +} + // NewMock creates a new Mock with the time set to midnight UTC on Jan 1, 2024. // You may re-set the time earlier than this, but only before timers or tickers // are created. @@ -467,14 +473,15 @@ func NewMock(tb testing.TB) *Mock { panic(err) } m := &Mock{ - tb: tb, - cur: cur, + tb: tb, + logger: tb, + cur: cur, } tb.Cleanup(func() { m.mu.Lock() defer m.mu.Unlock() m.testOver = true - tb.Logf("Mock Clock - test cleanup; will no longer log clock events") + m.logger.Logf("Mock Clock - test cleanup; will no longer log clock events") }) return m } @@ -806,3 +813,16 @@ func (t *Trap) MustWait(ctx context.Context) *Call { } return c } + +type Logger interface { + Log(args ...any) + Logf(format string, args ...any) +} + +// NoOpLogger is a Logger that discards all log messages. +var NoOpLogger Logger = noOpLogger{} + +type noOpLogger struct{} + +func (noOpLogger) Log(args ...any) {} +func (noOpLogger) Logf(format string, args ...any) {} diff --git a/vendor/github.com/coder/quartz/ticker.go b/vendor/github.com/coder/quartz/ticker.go index 5506750d5d1..f4a4b066502 100644 --- a/vendor/github.com/coder/quartz/ticker.go +++ b/vendor/github.com/coder/quartz/ticker.go @@ -6,12 +6,25 @@ import "time" type Ticker struct { C <-chan time.Time //nolint: revive - c chan time.Time - ticker *time.Ticker // realtime impl, if set - d time.Duration // period, if set - nxt time.Time // next tick time - mock *Mock // mock clock, if set - stopped bool // true if the ticker is not running + c chan time.Time + ticker *time.Ticker // realtime impl, if set + d time.Duration // period, if set + nxt time.Time // next tick time + mock *Mock // mock clock, if set + stopped bool // true if the ticker is not running + internalTicks chan time.Time // used to deliver ticks to the runLoop goroutine + + // As of Go 1.23, ticker channels are unbuffered and guaranteed to block forever after a call to stop. + // + // When a mocked ticker fires, we don't want to block on a channel write, because it's fine for the code under test + // not to be reading. That means we need to start a new goroutine to do the channel write (runLoop) if we are a + // channel-based ticker. + // + // They also are not supposed to leak even if they are never read or stopped (Go runtime can garbage collect them). + // We can't garbage-collect because we can't check if any other code besides the mock references, but we can ensure + // that we don't leak goroutines so that the garbage collector can do its job when the mock is no longer + // referenced. The channels below allow us to interrupt the runLoop goroutine. + interrupt chan struct{} } func (t *Ticker) fire(tt time.Time) { @@ -24,9 +37,8 @@ func (t *Ticker) fire(tt time.Time) { t.nxt = t.nxt.Add(t.d) } t.mock.recomputeNextLocked() - select { - case t.c <- tt: - default: + if t.interrupt != nil { // implies runLoop is still going. + t.internalTicks <- tt } } @@ -49,6 +61,11 @@ func (t *Ticker) Stop(tags ...string) { defer close(c.complete) t.mock.removeEventLocked(t) t.stopped = true + // check if we've already fired, and if so, interrupt it. + if t.interrupt != nil { + <-t.interrupt + t.interrupt = nil + } } // Reset stops a ticker and resets its period to the specified duration. The @@ -72,4 +89,63 @@ func (t *Ticker) Reset(d time.Duration, tags ...string) { } else { t.mock.recomputeNextLocked() } + if t.interrupt == nil { + t.startRunLoopLocked() + } +} + +func (t *Ticker) runLoop(interrupt chan struct{}) { + defer close(interrupt) +outer: + for { + select { + case tt := <-t.internalTicks: + for { + select { + case t.c <- tt: + continue outer + case <-t.internalTicks: + // Discard future ticks until we can send this one. + case interrupt <- struct{}{}: + return + } + } + case interrupt <- struct{}{}: + return + } + } +} + +func (t *Ticker) startRunLoopLocked() { + // assert some assumptions. If these fire, it is a bug in Quartz itself. + if t.interrupt != nil { + t.mock.tb.Error("called startRunLoopLocked when interrupt suggests we are already running") + } + interrupt := make(chan struct{}) + t.interrupt = interrupt + go t.runLoop(interrupt) +} + +func newMockTickerLocked(m *Mock, d time.Duration) *Ticker { + // no buffer follows Go 1.23+ behavior + ticks := make(chan time.Time) + t := &Ticker{ + C: ticks, + c: ticks, + d: d, + nxt: m.cur.Add(d), + mock: m, + internalTicks: make(chan time.Time), + } + m.addEventLocked(t) + m.tb.Cleanup(func() { + m.mu.Lock() + defer m.mu.Unlock() + if t.interrupt != nil { + <-t.interrupt + t.interrupt = nil + } + }) + t.startRunLoopLocked() + return t } diff --git a/vendor/github.com/coder/quartz/timer.go b/vendor/github.com/coder/quartz/timer.go index 8d928ac6f60..8f571eb0dc6 100644 --- a/vendor/github.com/coder/quartz/timer.go +++ b/vendor/github.com/coder/quartz/timer.go @@ -1,6 +1,8 @@ package quartz -import "time" +import ( + "time" +) // The Timer type represents a single event. When the Timer expires, the current time will be sent // on C, unless the Timer was created by AfterFunc. A Timer must be created with NewTimer or @@ -14,14 +16,43 @@ type Timer struct { mock *Mock // mock clock, if set fn func() // AfterFunc function, if set stopped bool // True if stopped, false if running + + // As of Go 1.23, timer channels are unbuffered and guaranteed to block forever after a call to stop. + // + // When a mocked timer fires, we don't want to block on a channel write, because it's fine for the code under test + // not to be reading. That means we need to start a new goroutine to do the channel write if we are a channel-based + // timer. + // + // They also are not supposed to leak even if they are never read or stopped (Go runtime can garbage collect them). + // We can't garbage-collect because we can't check if any other code besides the mock references, but we can ensure + // that we don't leak goroutines so that the garbage collector can do its job when the mock is no longer + // referenced. The channels below allow us to interrupt the channel write goroutine. + interrupt chan struct{} } func (t *Timer) fire(tt time.Time) { - t.mock.removeTimer(t) + t.mock.mu.Lock() + t.mock.removeTimerLocked(t) if t.fn != nil { + t.mock.mu.Unlock() t.fn() + return } else { - t.c <- tt + interrupt := make(chan struct{}) + // Prevents the goroutine from leaking beyond the test. Side effect is that timer channels cannot be read + // after the test exits. + t.mock.tb.Cleanup(func() { + <-interrupt + }) + t.interrupt = interrupt + t.mock.mu.Unlock() + go func() { + defer close(interrupt) + select { + case t.c <- tt: + case interrupt <- struct{}{}: + } + }() } } @@ -45,6 +76,11 @@ func (t *Timer) Stop(tags ...string) bool { defer close(c.complete) result := !t.stopped t.mock.removeTimerLocked(t) + // check if we've already fired, and if so, interrupt it. + if t.interrupt != nil { + <-t.interrupt + t.interrupt = nil + } return result } @@ -62,9 +98,10 @@ func (t *Timer) Reset(d time.Duration, tags ...string) bool { t.mock.matchCallLocked(c) defer close(c.complete) result := !t.stopped - select { - case <-t.c: - default: + // check if we've already fired, and if so, interrupt it. + if t.interrupt != nil { + <-t.interrupt + t.interrupt = nil } if d <= 0 { // zero or negative duration timer means we should immediately re-fire diff --git a/vendor/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/coreos/go-semver/semver/semver.go index 76cf4852c76..eb9fb7ff2d8 100644 --- a/vendor/github.com/coreos/go-semver/semver/semver.go +++ b/vendor/github.com/coreos/go-semver/semver/semver.go @@ -85,7 +85,7 @@ func (v *Version) Set(version string) error { return fmt.Errorf("failed to validate metadata: %v", err) } - parsed := make([]int64, 3, 3) + parsed := make([]int64, 3) for i, v := range dotParts[:3] { val, err := strconv.ParseInt(v, 10, 64) diff --git a/vendor/github.com/go-logfmt/logfmt/CHANGELOG.md b/vendor/github.com/go-logfmt/logfmt/CHANGELOG.md index 8f349c4b8f5..9a7c0ca730e 100644 --- a/vendor/github.com/go-logfmt/logfmt/CHANGELOG.md +++ b/vendor/github.com/go-logfmt/logfmt/CHANGELOG.md @@ -5,6 +5,15 @@ 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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.1] - 2025-10-05 + +### Fixed + +- Encode DEL (0x7f) control character by [@spaceone] +- Modernize code through Go 1.21 by [@ChrisHines] + +[0.6.1]: https://github.com/go-logfmt/logfmt/compare/v0.6.0...v0.6.1 + ## [0.6.0] - 2023-01-30 [0.6.0]: https://github.com/go-logfmt/logfmt/compare/v0.5.1...v0.6.0 @@ -80,3 +89,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [@judwhite]: https://github.com/judwhite [@nussjustin]: https://github.com/nussjustin [@alexanderjophus]: https://github.com/alexanderjophus +[@spaceone]: https://github.com/spaceone diff --git a/vendor/github.com/go-logfmt/logfmt/encode.go b/vendor/github.com/go-logfmt/logfmt/encode.go index 4ea9d23998c..d8f69351a72 100644 --- a/vendor/github.com/go-logfmt/logfmt/encode.go +++ b/vendor/github.com/go-logfmt/logfmt/encode.go @@ -13,7 +13,7 @@ import ( // MarshalKeyvals returns the logfmt encoding of keyvals, a variadic sequence // of alternating keys and values. -func MarshalKeyvals(keyvals ...interface{}) ([]byte, error) { +func MarshalKeyvals(keyvals ...any) ([]byte, error) { buf := &bytes.Buffer{} if err := NewEncoder(buf).EncodeKeyvals(keyvals...); err != nil { return nil, err @@ -45,7 +45,7 @@ var ( // EncodeKeyval writes the logfmt encoding of key and value to the stream. A // single space is written before the second and subsequent keys in a record. // Nothing is written if a non-nil error is returned. -func (enc *Encoder) EncodeKeyval(key, value interface{}) error { +func (enc *Encoder) EncodeKeyval(key, value any) error { enc.scratch.Reset() if enc.needSep { if _, err := enc.scratch.Write(space); err != nil { @@ -72,7 +72,7 @@ func (enc *Encoder) EncodeKeyval(key, value interface{}) error { // unsupported type or that cause a MarshalerError are replaced by their error // but do not cause EncodeKeyvals to return an error. If a non-nil error is // returned some key/value pairs may not have be written. -func (enc *Encoder) EncodeKeyvals(keyvals ...interface{}) error { +func (enc *Encoder) EncodeKeyvals(keyvals ...any) error { if len(keyvals) == 0 { return nil } @@ -122,7 +122,7 @@ var ErrUnsupportedKeyType = errors.New("unsupported key type") // unsupported type. var ErrUnsupportedValueType = errors.New("unsupported value type") -func writeKey(w io.Writer, key interface{}) error { +func writeKey(w io.Writer, key any) error { if key == nil { return ErrNilKey } @@ -155,7 +155,7 @@ func writeKey(w io.Writer, key interface{}) error { switch rkey.Kind() { case reflect.Array, reflect.Chan, reflect.Func, reflect.Map, reflect.Slice, reflect.Struct: return ErrUnsupportedKeyType - case reflect.Ptr: + case reflect.Pointer: if rkey.IsNil() { return ErrNilKey } @@ -170,7 +170,7 @@ func writeKey(w io.Writer, key interface{}) error { // functions it causes them to remove invalid key runes from strings or byte // slices respectively. func keyRuneFilter(r rune) rune { - if r <= ' ' || r == '=' || r == '"' || r == utf8.RuneError { + if r <= ' ' || r == '=' || r == '"' || r == 0x7f || r == utf8.RuneError { return -1 } return r @@ -194,7 +194,7 @@ func writeBytesKey(w io.Writer, key []byte) error { return err } -func writeValue(w io.Writer, value interface{}) error { +func writeValue(w io.Writer, value any) error { switch v := value.(type) { case nil: return writeBytesValue(w, null) @@ -222,7 +222,7 @@ func writeValue(w io.Writer, value interface{}) error { switch rvalue.Kind() { case reflect.Array, reflect.Chan, reflect.Func, reflect.Map, reflect.Slice, reflect.Struct: return ErrUnsupportedValueType - case reflect.Ptr: + case reflect.Pointer: if rvalue.IsNil() { return writeBytesValue(w, null) } @@ -233,7 +233,7 @@ func writeValue(w io.Writer, value interface{}) error { } func needsQuotedValueRune(r rune) bool { - return r <= ' ' || r == '=' || r == '"' || r == utf8.RuneError + return r <= ' ' || r == '=' || r == '"' || r == 0x7f || r == utf8.RuneError } func writeStringValue(w io.Writer, value string, ok bool) error { @@ -276,7 +276,7 @@ func (enc *Encoder) Reset() { func safeError(err error) (s string, ok bool) { defer func() { if panicVal := recover(); panicVal != nil { - if v := reflect.ValueOf(err); v.Kind() == reflect.Ptr && v.IsNil() { + if v := reflect.ValueOf(err); v.Kind() == reflect.Pointer && v.IsNil() { s, ok = "null", false } else { s, ok = fmt.Sprintf("PANIC:%v", panicVal), false @@ -290,7 +290,7 @@ func safeError(err error) (s string, ok bool) { func safeString(str fmt.Stringer) (s string, ok bool) { defer func() { if panicVal := recover(); panicVal != nil { - if v := reflect.ValueOf(str); v.Kind() == reflect.Ptr && v.IsNil() { + if v := reflect.ValueOf(str); v.Kind() == reflect.Pointer && v.IsNil() { s, ok = "null", false } else { s, ok = fmt.Sprintf("PANIC:%v", panicVal), true @@ -304,7 +304,7 @@ func safeString(str fmt.Stringer) (s string, ok bool) { func safeMarshal(tm encoding.TextMarshaler) (b []byte, err error) { defer func() { if panicVal := recover(); panicVal != nil { - if v := reflect.ValueOf(tm); v.Kind() == reflect.Ptr && v.IsNil() { + if v := reflect.ValueOf(tm); v.Kind() == reflect.Pointer && v.IsNil() { b, err = nil, nil } else { b, err = nil, fmt.Errorf("panic when marshalling: %s", panicVal) diff --git a/vendor/github.com/go-logfmt/logfmt/jsonstring.go b/vendor/github.com/go-logfmt/logfmt/jsonstring.go index 030ac85fcc2..26e1b1c137c 100644 --- a/vendor/github.com/go-logfmt/logfmt/jsonstring.go +++ b/vendor/github.com/go-logfmt/logfmt/jsonstring.go @@ -19,7 +19,7 @@ import ( var hex = "0123456789abcdef" var bufferPool = sync.Pool{ - New: func() interface{} { + New: func() any { return &bytes.Buffer{} }, } @@ -40,7 +40,7 @@ func writeQuotedString(w io.Writer, s string) (int, error) { start := 0 for i := 0; i < len(s); { if b := s[i]; b < utf8.RuneSelf { - if 0x20 <= b && b != '\\' && b != '"' { + if 0x20 <= b && b != '\\' && b != '"' && b != 0x7f { i++ continue } @@ -91,14 +91,14 @@ func writeQuotedString(w io.Writer, s string) (int, error) { return n, err } -// NOTE: keep in sync with writeQuoteString above. +// NOTE: keep in sync with writeQuotedString above. func writeQuotedBytes(w io.Writer, s []byte) (int, error) { buf := getBuffer() buf.WriteByte('"') start := 0 for i := 0; i < len(s); { if b := s[i]; b < utf8.RuneSelf { - if 0x20 <= b && b != '\\' && b != '"' { + if 0x20 <= b && b != '\\' && b != '"' && b != 0x7f { i++ continue } diff --git a/vendor/github.com/go-openapi/analysis/.cliff.toml b/vendor/github.com/go-openapi/analysis/.cliff.toml new file mode 100644 index 00000000000..702629f5dc3 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.cliff.toml @@ -0,0 +1,181 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +header = """ +""" + +footer = """ + +----- + +**[{{ remote.github.repo }}]({{ self::remote_url() }}) license terms** + +[![License][license-badge]][license-url] + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: {{ self::remote_url() }}/?tab=Apache-2.0-1-ov-file#readme + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" + +body = """ +{%- if version %} +## [{{ version | trim_start_matches(pat="v") }}]({{ self::remote_url() }}/tree/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{%- else %} +## [unreleased] +{%- endif %} +{%- if message %} + {%- raw %}\n{% endraw %} +{{ message }} + {%- raw %}\n{% endraw %} +{%- endif %} +{%- if version %} + {%- if previous.version %} + +**Full Changelog**: <{{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}> + {%- endif %} +{%- else %} + {%- raw %}\n{% endraw %} +{%- endif %} + +{%- if statistics %}{% if statistics.commit_count %} + {%- raw %}\n{% endraw %} +{{ statistics.commit_count }} commits in this release. + {%- raw %}\n{% endraw %} +{%- endif %}{% endif %} +----- + +{%- for group, commits in commits | group_by(attribute="group") %} + {%- raw %}\n{% endraw %} +### {{ group | upper_first }} + {%- raw %}\n{% endraw %} + {%- for commit in commits %} + {%- if commit.remote.pr_title %} + {%- set commit_message = commit.remote.pr_title %} + {%- else %} + {%- set commit_message = commit.message %} + {%- endif %} +* {{ commit_message | split(pat="\n") | first | trim }} + {%- if commit.remote.username %} +{%- raw %} {% endraw %}by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) + {%- endif %} + {%- if commit.remote.pr_number %} +{%- raw %} {% endraw %}in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) + {%- endif %} +{%- raw %} {% endraw %}[...]({{ self::remote_url() }}/commit/{{ commit.id }}) + {%- endfor %} +{%- endfor %} + +{%- if github %} +{%- raw %}\n{% endraw -%} + {%- set all_contributors = github.contributors | length %} + {%- if github.contributors | filter(attribute="username", value="dependabot[bot]") | length < all_contributors %} +----- + +### People who contributed to this release + {% endif %} + {%- for contributor in github.contributors | filter(attribute="username") | sort(attribute="username") %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) + {%- endif %} + {%- endfor %} + + {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} +----- + {%- raw %}\n{% endraw %} + +### New Contributors + {%- endif %} + + {%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} + in [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} + {%- endif %} + {%- endfor %} +{%- endif %} + +{%- raw %}\n{% endraw %} + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" +# Remove leading and trailing whitespaces from the changelog's body. +trim = true +# Render body even when there are no releases to process. +render_always = true +# An array of regex based postprocessors to modify the changelog. +postprocessors = [ + # Replace the placeholder with a URL. + #{ pattern = '', replace = "https://github.com/orhun/git-cliff" }, +] +# output file path +# output = "test.md" + +[git] +# Parse commits according to the conventional commits specification. +# See https://www.conventionalcommits.org +conventional_commits = false +# Exclude commits that do not match the conventional commits specification. +filter_unconventional = false +# Require all commits to be conventional. +# Takes precedence over filter_unconventional. +require_conventional = false +# Split commits on newlines, treating each line as an individual commit. +split_commits = false +# An array of regex based parsers to modify commit messages prior to further processing. +commit_preprocessors = [ + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit message using https://github.com/crate-ci/typos. + # If the spelling is incorrect, it will be fixed automatically. + #{ pattern = '.*', replace_command = 'typos --write-changes -' } +] +# Prevent commits that are breaking from being excluded by commit parsers. +protect_breaking_commits = false +# An array of regex based parsers for extracting data from the commit message. +# Assigns commits to groups. +# Optionally sets the commit's scope and can decide to exclude commits from further processing. +commit_parsers = [ + { message = "^[Cc]hore\\([Rr]elease\\): prepare for", skip = true }, + { message = "(^[Mm]erge)|([Mm]erge conflict)", skip = true }, + { field = "author.name", pattern = "dependabot*", group = "Updates" }, + { message = "([Ss]ecurity)|([Vv]uln)", group = "Security" }, + { body = "(.*[Ss]ecurity)|([Vv]uln)", group = "Security" }, + { message = "([Cc]hore\\(lint\\))|(style)|(lint)|(codeql)|(golangci)", group = "Code quality" }, + { message = "(^[Dd]oc)|((?i)readme)|(badge)|(typo)|(documentation)", group = "Documentation" }, + { message = "(^[Ff]eat)|(^[Ee]nhancement)", group = "Implemented enhancements" }, + { message = "(^ci)|(\\(ci\\))|(fixup\\s+ci)|(fix\\s+ci)|(license)|(example)", group = "Miscellaneous tasks" }, + { message = "^test", group = "Testing" }, + { message = "(^fix)|(panic)", group = "Fixed bugs" }, + { message = "(^refact)|(rework)", group = "Refactor" }, + { message = "(^[Pp]erf)|(performance)", group = "Performance" }, + { message = "(^[Cc]hore)", group = "Miscellaneous tasks" }, + { message = "^[Rr]evert", group = "Reverted changes" }, + { message = "(upgrade.*?go)|(go\\s+version)", group = "Updates" }, + { message = ".*", group = "Other" }, +] +# Exclude commits that are not matched by any commit parser. +filter_commits = false +# An array of link parsers for extracting external references, and turning them into URLs, using regex. +link_parsers = [] +# Include only the tags that belong to the current branch. +use_branch_tags = false +# Order releases topologically instead of chronologically. +topo_order = false +# Order releases topologically instead of chronologically. +topo_order_commits = true +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest +sort_commits = "newest" +# Process submodules commits +recurse_submodules = false + +#[remote.github] +#owner = "go-openapi" diff --git a/vendor/github.com/go-openapi/analysis/.editorconfig b/vendor/github.com/go-openapi/analysis/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/analysis/.golangci.yml b/vendor/github.com/go-openapi/analysis/.golangci.yml index 5609b4fea9c..05808d52a68 100644 --- a/vendor/github.com/go-openapi/analysis/.golangci.yml +++ b/vendor/github.com/go-openapi/analysis/.golangci.yml @@ -2,34 +2,18 @@ version: "2" linters: default: all disable: - - cyclop - depguard - - errchkjson - - errorlint - - exhaustruct - - forcetypeassert - funlen - - gochecknoglobals - - gochecknoinits - - gocognit - - godot - godox - - gosmopolitan - - inamedparam - #- intrange # disabled while < go1.22 - - ireturn - - lll - - musttag - - nestif + - exhaustruct - nlreturn - - noinlineerr - nonamedreturns + - noinlineerr - paralleltest - recvcheck - testpackage - - thelper + - thelper # investigate how to parameterize / fix. Temporarily disabled. - tparallel - - unparam - varnamelen - whitespace - wrapcheck @@ -41,8 +25,17 @@ linters: goconst: min-len: 2 min-occurrences: 3 + cyclop: + max-complexity: 25 gocyclo: - min-complexity: 45 + min-complexity: 25 + gocognit: + min-complexity: 35 + exhaustive: + default-signifies-exhaustive: true + default-case-required: true + lll: + line-length: 180 exclusions: generated: lax presets: @@ -58,6 +51,7 @@ formatters: enable: - gofmt - goimports + - gofumpt exclusions: generated: lax paths: diff --git a/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md b/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md new file mode 100644 index 00000000000..03d3defe3be --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md @@ -0,0 +1,26 @@ +# Contributors + +- Repository: ['go-openapi/analysis'] + +| Total Contributors | Total Contributions | +| --- | --- | +| 14 | 192 | + +| Username | All Time Contribution Count | All Commits | +| --- | --- | --- | +| @fredbi | 90 | https://github.com/go-openapi/analysis/commits?author=fredbi | +| @casualjim | 70 | https://github.com/go-openapi/analysis/commits?author=casualjim | +| @keramix | 9 | https://github.com/go-openapi/analysis/commits?author=keramix | +| @youyuanwu | 8 | https://github.com/go-openapi/analysis/commits?author=youyuanwu | +| @msample | 3 | https://github.com/go-openapi/analysis/commits?author=msample | +| @kul-amr | 3 | https://github.com/go-openapi/analysis/commits?author=kul-amr | +| @mbohlool | 2 | https://github.com/go-openapi/analysis/commits?author=mbohlool | +| @danielfbm | 1 | https://github.com/go-openapi/analysis/commits?author=danielfbm | +| @gregmarr | 1 | https://github.com/go-openapi/analysis/commits?author=gregmarr | +| @guillemj | 1 | https://github.com/go-openapi/analysis/commits?author=guillemj | +| @knweiss | 1 | https://github.com/go-openapi/analysis/commits?author=knweiss | +| @tklauser | 1 | https://github.com/go-openapi/analysis/commits?author=tklauser | +| @cuishuang | 1 | https://github.com/go-openapi/analysis/commits?author=cuishuang | +| @ujjwalsh | 1 | https://github.com/go-openapi/analysis/commits?author=ujjwalsh | + + _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ diff --git a/vendor/github.com/go-openapi/analysis/README.md b/vendor/github.com/go-openapi/analysis/README.md index e005d4b37b7..69e2f4b1df4 100644 --- a/vendor/github.com/go-openapi/analysis/README.md +++ b/vendor/github.com/go-openapi/analysis/README.md @@ -1,13 +1,30 @@ -# OpenAPI analysis [![Build Status](https://github.com/go-openapi/analysis/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/analysis/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/analysis/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/analysis) +# analysis -[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/analysis/master/LICENSE) -[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/analysis.svg)](https://pkg.go.dev/github.com/go-openapi/analysis) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/analysis)](https://goreportcard.com/report/github.com/go-openapi/analysis) + +[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url] + + + +[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url] + + +[![GoDoc][godoc-badge]][godoc-url] [![Slack Channel][slack-logo]![slack-badge]][slack-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge] +--- A foundational library to analyze an OAI specification document for easier reasoning about the content. + +## Status + +API is stable. + +## Import this library in your project + +```cmd +go get github.com/go-openapi/analysis +``` + ## What's inside? * An analyzer providing methods to walk the functional content of a specification @@ -15,13 +32,83 @@ A foundational library to analyze an OAI specification document for easier reaso * A spec merger ("mixin") to merge several spec documents into a primary spec * A spec "fixer" ensuring that response descriptions are non empty -[Documentation](https://pkg.go.dev/github.com/go-openapi/analysis) - ## FAQ * Does this library support OpenAPI 3? - > No. > This package currently only supports OpenAPI 2.0 (aka Swagger 2.0). > There is no plan to make it evolve toward supporting OpenAPI 3.x. > This [discussion thread](https://github.com/go-openapi/spec/issues/21) relates the full story. + +## Change log + +See + + + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + + + + + +## Other documentation + +* [All-time contributors](./CONTRIBUTORS.md) +* [Contributing guidelines](.github/CONTRIBUTING.md) +* [Maintainers documentation](docs/MAINTAINERS.md) +* [Code style](docs/STYLE.md) + +## Cutting a new release + +Maintainers can cut a new release by either: + +* running [this workflow](https://github.com/go-openapi/analysis/actions/workflows/bump-release.yml) +* or pushing a semver tag + * signed tags are preferred + * The tag message is prepended to release notes + + +[test-badge]: https://github.com/go-openapi/analysis/actions/workflows/go-test.yml/badge.svg +[test-url]: https://github.com/go-openapi/analysis/actions/workflows/go-test.yml +[cov-badge]: https://codecov.io/gh/go-openapi/analysis/branch/master/graph/badge.svg +[cov-url]: https://codecov.io/gh/go-openapi/analysis +[vuln-scan-badge]: https://github.com/go-openapi/analysis/actions/workflows/scanner.yml/badge.svg +[vuln-scan-url]: https://github.com/go-openapi/analysis/actions/workflows/scanner.yml +[codeql-badge]: https://github.com/go-openapi/analysis/actions/workflows/codeql.yml/badge.svg +[codeql-url]: https://github.com/go-openapi/analysis/actions/workflows/codeql.yml + +[release-badge]: https://badge.fury.io/gh/go-openapi%2Fanalysis.svg +[release-url]: https://badge.fury.io/gh/go-openapi%2Fanalysis +[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fanalysis.svg +[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fanalysis + +[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/analysis +[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/analysis +[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/analysis +[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/analysis + +[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F +[doc-url]: https://goswagger.io/go-openapi +[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/analysis +[godoc-url]: http://pkg.go.dev/github.com/go-openapi/analysis +[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png +[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM +[slack-url]: https://goswagger.slack.com/archives/C04R30YMU + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: https://github.com/go-openapi/analysis/?tab=Apache-2.0-1-ov-file#readme + +[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/analysis +[goversion-url]: https://github.com/go-openapi/analysis/blob/master/go.mod +[top-badge]: https://img.shields.io/github/languages/top/go-openapi/analysis +[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/analysis/latest diff --git a/vendor/github.com/go-openapi/analysis/SECURITY.md b/vendor/github.com/go-openapi/analysis/SECURITY.md new file mode 100644 index 00000000000..f60adcd9e24 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This policy outlines the commitment and practices of the go-openapi maintainers regarding security. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.24.x | :white_check_mark: | + +## Reporting a vulnerability + +If you become aware of a security vulnerability that affects the current repository, +please report it privately to the maintainers. + +Please follow the instructions provided by github to +[Privately report a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). + +TL;DR: on Github, navigate to the project's "Security" tab then click on "Report a vulnerability". diff --git a/vendor/github.com/go-openapi/analysis/analyzer.go b/vendor/github.com/go-openapi/analysis/analyzer.go index 3e57de88701..af50a6fdfdb 100644 --- a/vendor/github.com/go-openapi/analysis/analyzer.go +++ b/vendor/github.com/go-openapi/analysis/analyzer.go @@ -1,21 +1,11 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package analysis import ( "fmt" + "maps" slashpath "path" "strconv" "strings" @@ -111,33 +101,33 @@ func (p *patternAnalysis) addSchemaPattern(key, pattern string) { } type enumAnalysis struct { - parameters map[string][]interface{} - headers map[string][]interface{} - items map[string][]interface{} - schemas map[string][]interface{} - allEnums map[string][]interface{} + parameters map[string][]any + headers map[string][]any + items map[string][]any + schemas map[string][]any + allEnums map[string][]any } -func (p *enumAnalysis) addEnum(key string, enum []interface{}) { +func (p *enumAnalysis) addEnum(key string, enum []any) { p.allEnums["#"+key] = enum } -func (p *enumAnalysis) addParameterEnum(key string, enum []interface{}) { +func (p *enumAnalysis) addParameterEnum(key string, enum []any) { p.parameters["#"+key] = enum p.addEnum(key, enum) } -func (p *enumAnalysis) addHeaderEnum(key string, enum []interface{}) { +func (p *enumAnalysis) addHeaderEnum(key string, enum []any) { p.headers["#"+key] = enum p.addEnum(key, enum) } -func (p *enumAnalysis) addItemsEnum(key string, enum []interface{}) { +func (p *enumAnalysis) addItemsEnum(key string, enum []any) { p.items["#"+key] = enum p.addEnum(key, enum) } -func (p *enumAnalysis) addSchemaEnum(key string, enum []interface{}) { +func (p *enumAnalysis) addSchemaEnum(key string, enum []any) { p.schemas["#"+key] = enum p.addEnum(key, enum) } @@ -174,13 +164,13 @@ func New(doc *spec.Swagger) *Spec { return a } -// SecurityRequirement is a representation of a security requirement for an operation +// SecurityRequirement is a representation of a security requirement for an operation. type SecurityRequirement struct { Name string Scopes []string } -// SecurityRequirementsFor gets the security requirements for the operation +// SecurityRequirementsFor gets the security requirements for the operation. func (s *Spec) SecurityRequirementsFor(operation *spec.Operation) [][]SecurityRequirement { if s.spec.Security == nil && operation.Security == nil { return nil @@ -214,7 +204,7 @@ func (s *Spec) SecurityRequirementsFor(operation *spec.Operation) [][]SecurityRe return result } -// SecurityDefinitionsForRequirements gets the matching security definitions for a set of requirements +// SecurityDefinitionsForRequirements gets the matching security definitions for a set of requirements. func (s *Spec) SecurityDefinitionsForRequirements(requirements []SecurityRequirement) map[string]spec.SecurityScheme { result := make(map[string]spec.SecurityScheme) @@ -229,7 +219,7 @@ func (s *Spec) SecurityDefinitionsForRequirements(requirements []SecurityRequire return result } -// SecurityDefinitionsFor gets the matching security definitions for a set of requirements +// SecurityDefinitionsFor gets the matching security definitions for a set of requirements. func (s *Spec) SecurityDefinitionsFor(operation *spec.Operation) map[string]spec.SecurityScheme { requirements := s.SecurityRequirementsFor(operation) if len(requirements) == 0 { @@ -260,7 +250,7 @@ func (s *Spec) SecurityDefinitionsFor(operation *spec.Operation) map[string]spec return result } -// ConsumesFor gets the mediatypes for the operation +// ConsumesFor gets the mediatypes for the operation. func (s *Spec) ConsumesFor(operation *spec.Operation) []string { if len(operation.Consumes) == 0 { cons := make(map[string]struct{}, len(s.spec.Consumes)) @@ -279,7 +269,7 @@ func (s *Spec) ConsumesFor(operation *spec.Operation) []string { return s.structMapKeys(cons) } -// ProducesFor gets the mediatypes for the operation +// ProducesFor gets the mediatypes for the operation. func (s *Spec) ProducesFor(operation *spec.Operation) []string { if len(operation.Produces) == 0 { prod := make(map[string]struct{}, len(s.spec.Produces)) @@ -410,7 +400,7 @@ func (s *Spec) SafeParamsFor(method, path string, callmeOnError ErrorOnParamFunc return res } -// OperationForName gets the operation for the given id +// OperationForName gets the operation for the given id. func (s *Spec) OperationForName(operationID string) (string, string, *spec.Operation, bool) { for method, pathItem := range s.operations { for path, op := range pathItem { @@ -423,7 +413,7 @@ func (s *Spec) OperationForName(operationID string) (string, string, *spec.Opera return "", "", nil, false } -// OperationFor the given method and path +// OperationFor the given method and path. func (s *Spec) OperationFor(method, path string) (*spec.Operation, bool) { if mp, ok := s.operations[strings.ToUpper(method)]; ok { op, fn := mp[path] @@ -434,12 +424,12 @@ func (s *Spec) OperationFor(method, path string) (*spec.Operation, bool) { return nil, false } -// Operations gathers all the operations specified in the spec document +// Operations gathers all the operations specified in the spec document. func (s *Spec) Operations() map[string]map[string]*spec.Operation { return s.operations } -// AllPaths returns all the paths in the swagger spec +// AllPaths returns all the paths in the swagger spec. func (s *Spec) AllPaths() map[string]spec.PathItem { if s.spec == nil || s.spec.Paths == nil { return nil @@ -448,7 +438,7 @@ func (s *Spec) AllPaths() map[string]spec.PathItem { return s.spec.Paths.Paths } -// OperationIDs gets all the operation ids based on method an dpath +// OperationIDs gets all the operation ids based on method an dpath. func (s *Spec) OperationIDs() []string { if len(s.operations) == 0 { return nil @@ -468,7 +458,7 @@ func (s *Spec) OperationIDs() []string { return result } -// OperationMethodPaths gets all the operation ids based on method an dpath +// OperationMethodPaths gets all the operation ids based on method an dpath. func (s *Spec) OperationMethodPaths() []string { if len(s.operations) == 0 { return nil @@ -484,22 +474,22 @@ func (s *Spec) OperationMethodPaths() []string { return result } -// RequiredConsumes gets all the distinct consumes that are specified in the specification document +// RequiredConsumes gets all the distinct consumes that are specified in the specification document. func (s *Spec) RequiredConsumes() []string { return s.structMapKeys(s.consumes) } -// RequiredProduces gets all the distinct produces that are specified in the specification document +// RequiredProduces gets all the distinct produces that are specified in the specification document. func (s *Spec) RequiredProduces() []string { return s.structMapKeys(s.produces) } -// RequiredSecuritySchemes gets all the distinct security schemes that are specified in the swagger spec +// RequiredSecuritySchemes gets all the distinct security schemes that are specified in the swagger spec. func (s *Spec) RequiredSecuritySchemes() []string { return s.structMapKeys(s.authSchemes) } -// SchemaRef is a reference to a schema +// SchemaRef is a reference to a schema. type SchemaRef struct { Name string Ref spec.Ref @@ -508,7 +498,7 @@ type SchemaRef struct { } // SchemasWithAllOf returns schema references to all schemas that are defined -// with an allOf key +// with an allOf key. func (s *Spec) SchemasWithAllOf() (result []SchemaRef) { for _, v := range s.allOfs { result = append(result, v) @@ -517,7 +507,7 @@ func (s *Spec) SchemasWithAllOf() (result []SchemaRef) { return } -// AllDefinitions returns schema references for all the definitions that were discovered +// AllDefinitions returns schema references for all the definitions that were discovered. func (s *Spec) AllDefinitions() (result []SchemaRef) { for _, v := range s.allSchemas { result = append(result, v) @@ -526,7 +516,7 @@ func (s *Spec) AllDefinitions() (result []SchemaRef) { return } -// AllDefinitionReferences returns json refs for all the discovered schemas +// AllDefinitionReferences returns json refs for all the discovered schemas. func (s *Spec) AllDefinitionReferences() (result []string) { for _, v := range s.references.schemas { result = append(result, v.String()) @@ -535,7 +525,7 @@ func (s *Spec) AllDefinitionReferences() (result []string) { return } -// AllParameterReferences returns json refs for all the discovered parameters +// AllParameterReferences returns json refs for all the discovered parameters. func (s *Spec) AllParameterReferences() (result []string) { for _, v := range s.references.parameters { result = append(result, v.String()) @@ -544,7 +534,7 @@ func (s *Spec) AllParameterReferences() (result []string) { return } -// AllResponseReferences returns json refs for all the discovered responses +// AllResponseReferences returns json refs for all the discovered responses. func (s *Spec) AllResponseReferences() (result []string) { for _, v := range s.references.responses { result = append(result, v.String()) @@ -553,7 +543,7 @@ func (s *Spec) AllResponseReferences() (result []string) { return } -// AllPathItemReferences returns the references for all the items +// AllPathItemReferences returns the references for all the items. func (s *Spec) AllPathItemReferences() (result []string) { for _, v := range s.references.pathItems { result = append(result, v.String()) @@ -574,7 +564,7 @@ func (s *Spec) AllItemsReferences() (result []string) { return } -// AllReferences returns all the references found in the document, with possible duplicates +// AllReferences returns all the references found in the document, with possible duplicates. func (s *Spec) AllReferences() (result []string) { for _, v := range s.references.allRefs { result = append(result, v.String()) @@ -583,7 +573,7 @@ func (s *Spec) AllReferences() (result []string) { return } -// AllRefs returns all the unique references found in the document +// AllRefs returns all the unique references found in the document. func (s *Spec) AllRefs() (result []spec.Ref) { set := make(map[string]struct{}) for _, v := range s.references.allRefs { @@ -602,62 +592,62 @@ func (s *Spec) AllRefs() (result []spec.Ref) { } // ParameterPatterns returns all the patterns found in parameters -// the map is cloned to avoid accidental changes +// the map is cloned to avoid accidental changes. func (s *Spec) ParameterPatterns() map[string]string { return cloneStringMap(s.patterns.parameters) } // HeaderPatterns returns all the patterns found in response headers -// the map is cloned to avoid accidental changes +// the map is cloned to avoid accidental changes. func (s *Spec) HeaderPatterns() map[string]string { return cloneStringMap(s.patterns.headers) } // ItemsPatterns returns all the patterns found in simple array items -// the map is cloned to avoid accidental changes +// the map is cloned to avoid accidental changes. func (s *Spec) ItemsPatterns() map[string]string { return cloneStringMap(s.patterns.items) } // SchemaPatterns returns all the patterns found in schemas -// the map is cloned to avoid accidental changes +// the map is cloned to avoid accidental changes. func (s *Spec) SchemaPatterns() map[string]string { return cloneStringMap(s.patterns.schemas) } // AllPatterns returns all the patterns found in the spec -// the map is cloned to avoid accidental changes +// the map is cloned to avoid accidental changes. func (s *Spec) AllPatterns() map[string]string { return cloneStringMap(s.patterns.allPatterns) } // ParameterEnums returns all the enums found in parameters -// the map is cloned to avoid accidental changes -func (s *Spec) ParameterEnums() map[string][]interface{} { +// the map is cloned to avoid accidental changes. +func (s *Spec) ParameterEnums() map[string][]any { return cloneEnumMap(s.enums.parameters) } // HeaderEnums returns all the enums found in response headers -// the map is cloned to avoid accidental changes -func (s *Spec) HeaderEnums() map[string][]interface{} { +// the map is cloned to avoid accidental changes. +func (s *Spec) HeaderEnums() map[string][]any { return cloneEnumMap(s.enums.headers) } // ItemsEnums returns all the enums found in simple array items -// the map is cloned to avoid accidental changes -func (s *Spec) ItemsEnums() map[string][]interface{} { +// the map is cloned to avoid accidental changes. +func (s *Spec) ItemsEnums() map[string][]any { return cloneEnumMap(s.enums.items) } // SchemaEnums returns all the enums found in schemas -// the map is cloned to avoid accidental changes -func (s *Spec) SchemaEnums() map[string][]interface{} { +// the map is cloned to avoid accidental changes. +func (s *Spec) SchemaEnums() map[string][]any { return cloneEnumMap(s.enums.schemas) } // AllEnums returns all the enums found in the spec -// the map is cloned to avoid accidental changes -func (s *Spec) AllEnums() map[string][]interface{} { +// the map is cloned to avoid accidental changes. +func (s *Spec) AllEnums() map[string][]any { return cloneEnumMap(s.enums.allEnums) } @@ -733,11 +723,11 @@ func (s *Spec) reset() { s.patterns.items = make(map[string]string, allocLargeMap) s.patterns.schemas = make(map[string]string, allocLargeMap) s.patterns.allPatterns = make(map[string]string, allocLargeMap) - s.enums.parameters = make(map[string][]interface{}, allocLargeMap) - s.enums.headers = make(map[string][]interface{}, allocLargeMap) - s.enums.items = make(map[string][]interface{}, allocLargeMap) - s.enums.schemas = make(map[string][]interface{}, allocLargeMap) - s.enums.allEnums = make(map[string][]interface{}, allocLargeMap) + s.enums.parameters = make(map[string][]any, allocLargeMap) + s.enums.headers = make(map[string][]any, allocLargeMap) + s.enums.items = make(map[string][]any, allocLargeMap) + s.enums.schemas = make(map[string][]any, allocLargeMap) + s.enums.allEnums = make(map[string][]any, allocLargeMap) } func (s *Spec) reload() { @@ -1051,18 +1041,14 @@ func (s *Spec) analyzeSchema(name string, schema *spec.Schema, prefix string) { func cloneStringMap(source map[string]string) map[string]string { res := make(map[string]string, len(source)) - for k, v := range source { - res[k] = v - } + maps.Copy(res, source) return res } -func cloneEnumMap(source map[string][]interface{}) map[string][]interface{} { - res := make(map[string][]interface{}, len(source)) - for k, v := range source { - res[k] = v - } +func cloneEnumMap(source map[string][]any) map[string][]any { + res := make(map[string][]any, len(source)) + maps.Copy(res, source) return res } diff --git a/vendor/github.com/go-openapi/analysis/debug.go b/vendor/github.com/go-openapi/analysis/debug.go index 33c15704ecb..8e777c432aa 100644 --- a/vendor/github.com/go-openapi/analysis/debug.go +++ b/vendor/github.com/go-openapi/analysis/debug.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package analysis @@ -20,4 +9,4 @@ import ( "github.com/go-openapi/analysis/internal/debug" ) -var debugLog = debug.GetLogger("analysis", os.Getenv("SWAGGER_DEBUG") != "") +var debugLog = debug.GetLogger("analysis", os.Getenv("SWAGGER_DEBUG") != "") //nolint:gochecknoglobals // it's okay to use a private global for logging diff --git a/vendor/github.com/go-openapi/analysis/doc.go b/vendor/github.com/go-openapi/analysis/doc.go index e8d9f9b1312..9d41371a9f0 100644 --- a/vendor/github.com/go-openapi/analysis/doc.go +++ b/vendor/github.com/go-openapi/analysis/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 /* Package analysis provides methods to work with a Swagger specification document from diff --git a/vendor/github.com/go-openapi/analysis/errors.go b/vendor/github.com/go-openapi/analysis/errors.go index 98133e7af06..540e159a23c 100644 --- a/vendor/github.com/go-openapi/analysis/errors.go +++ b/vendor/github.com/go-openapi/analysis/errors.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package analysis import ( diff --git a/vendor/github.com/go-openapi/analysis/fixer.go b/vendor/github.com/go-openapi/analysis/fixer.go index 8bac3a4d19b..74becbbe496 100644 --- a/vendor/github.com/go-openapi/analysis/fixer.go +++ b/vendor/github.com/go-openapi/analysis/fixer.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package analysis diff --git a/vendor/github.com/go-openapi/analysis/flatten.go b/vendor/github.com/go-openapi/analysis/flatten.go index 7042bb5adaf..e225b71a2b1 100644 --- a/vendor/github.com/go-openapi/analysis/flatten.go +++ b/vendor/github.com/go-openapi/analysis/flatten.go @@ -1,22 +1,12 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package analysis import ( "log" "path" + "slices" "sort" "strings" @@ -31,7 +21,7 @@ import ( const definitionsPath = "#/definitions" -// newRef stores information about refs created during the flattening process +// newRef stores information about refs created during the flattening process. type newRef struct { key string newName string @@ -42,7 +32,7 @@ type newRef struct { parents []string } -// context stores intermediary results from flatten +// context stores intermediary results from flatten. type context struct { newRefs map[string]*newRef warnings []string @@ -179,7 +169,7 @@ func expand(opts *FlattenOpts) error { } // normalizeRef strips the current file from any absolute file $ref. This works around issue go-openapi/spec#76: -// leading absolute file in $ref is stripped +// leading absolute file in $ref is stripped. func normalizeRef(opts *FlattenOpts) error { debugLog("normalizeRef") @@ -531,7 +521,7 @@ func stripOAIGen(opts *FlattenOpts) (bool, error) { return replacedWithComplex, nil } -// updateRefParents updates all parents of an updated $ref +// updateRefParents updates all parents of an updated $ref. func updateRefParents(allRefs map[string]spec.Ref, r *newRef) { if !r.isOAIGen || r.resolved { // bail on already resolved entries (avoid looping) return @@ -541,14 +531,7 @@ func updateRefParents(allRefs map[string]spec.Ref, r *newRef) { continue } - found := false - for _, p := range r.parents { - if p == k { - found = true - - break - } - } + found := slices.Contains(r.parents, k) if !found { r.parents = append(r.parents, k) } diff --git a/vendor/github.com/go-openapi/analysis/flatten_name.go b/vendor/github.com/go-openapi/analysis/flatten_name.go index 44ffe4226f2..922cae55c5e 100644 --- a/vendor/github.com/go-openapi/analysis/flatten_name.go +++ b/vendor/github.com/go-openapi/analysis/flatten_name.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package analysis import ( @@ -14,7 +17,7 @@ import ( "github.com/go-openapi/swag/mangling" ) -// InlineSchemaNamer finds a new name for an inlined type +// InlineSchemaNamer finds a new name for an inlined type. type InlineSchemaNamer struct { Spec *spec.Swagger Operations map[string]operations.OpRef @@ -22,7 +25,7 @@ type InlineSchemaNamer struct { opts *FlattenOpts } -// Name yields a new name for the inline schema +// Name yields a new name for the inline schema. func (isn *InlineSchemaNamer) Name(key string, schema *spec.Schema, aschema *AnalyzedSchema) error { debugLog("naming inlined schema at %s", key) @@ -105,7 +108,7 @@ func (isn *InlineSchemaNamer) Name(key string, schema *spec.Schema, aschema *Ana return nil } -// uniqifyName yields a unique name for a definition +// uniqifyName yields a unique name for a definition. func uniqifyName(definitions spec.Definitions, name string) (string, bool) { isOAIGen := false if name == "" { @@ -241,7 +244,7 @@ func namesForDefinition(parts sortref.SplitKey) ([][]string, int) { return [][]string{}, 0 } -// partAdder knows how to interpret a schema when it comes to build a name from parts +// partAdder knows how to interpret a schema when it comes to build a name from parts. func partAdder(aschema *AnalyzedSchema) sortref.PartAdder { return func(part string) []string { segments := make([]string, 0, minSegments) diff --git a/vendor/github.com/go-openapi/analysis/flatten_options.go b/vendor/github.com/go-openapi/analysis/flatten_options.go index c943fe1e84a..a9e54a85ac6 100644 --- a/vendor/github.com/go-openapi/analysis/flatten_options.go +++ b/vendor/github.com/go-openapi/analysis/flatten_options.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package analysis import ( @@ -41,13 +44,13 @@ func (f *FlattenOpts) ExpandOpts(skipSchemas bool) *spec.ExpandOptions { } } -// Swagger gets the swagger specification for this flatten operation +// Swagger gets the swagger specification for this flatten operation. func (f *FlattenOpts) Swagger() *spec.Swagger { return f.Spec.spec } // croak logs notifications and warnings about valid, but possibly unwanted constructs resulting -// from flattening a spec +// from flattening a spec. func (f *FlattenOpts) croak() { if !f.Verbose { return diff --git a/vendor/github.com/go-openapi/analysis/internal/debug/debug.go b/vendor/github.com/go-openapi/analysis/internal/debug/debug.go index 39f55a97bfd..d3fa08d3ba3 100644 --- a/vendor/github.com/go-openapi/analysis/internal/debug/debug.go +++ b/vendor/github.com/go-openapi/analysis/internal/debug/debug.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package debug @@ -22,20 +11,18 @@ import ( "runtime" ) -var ( - output = os.Stdout -) +var output = os.Stdout //nolint:gochecknoglobals // this is on purpose to be overridable during tests -// GetLogger provides a prefix debug logger -func GetLogger(prefix string, debug bool) func(string, ...interface{}) { +// GetLogger provides a prefix debug logger. +func GetLogger(prefix string, debug bool) func(string, ...any) { if debug { logger := log.New(output, prefix+":", log.LstdFlags) - return func(msg string, args ...interface{}) { + return func(msg string, args ...any) { _, file1, pos1, _ := runtime.Caller(1) logger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...)) } } - return func(_ string, _ ...interface{}) {} + return func(_ string, _ ...any) {} } diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go b/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go index 8c9df0580da..c04b6b4e74d 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package normalize import ( @@ -15,7 +18,7 @@ import ( // // NOTE(windows): // * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) -// * "/ in paths may appear as escape sequences +// * "/ in paths may appear as escape sequences. func RebaseRef(baseRef string, ref string) string { baseRef, _ = url.PathUnescape(baseRef) ref, _ = url.PathUnescape(ref) @@ -67,7 +70,7 @@ func RebaseRef(baseRef string, ref string) string { // // NOTE(windows): // * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) -// * "/ in paths may appear as escape sequences +// * "/ in paths may appear as escape sequences. func Path(ref spec.Ref, basePath string) string { uri, _ := url.PathUnescape(ref.String()) if ref.HasFragmentOnly || filepath.IsAbs(uri) { diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go b/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go index a1911b07674..325e2751f83 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package operations import ( @@ -11,12 +14,12 @@ import ( "github.com/go-openapi/swag/mangling" ) -// AllOpRefsByRef returns an index of sortable operations +// AllOpRefsByRef returns an index of sortable operations. func AllOpRefsByRef(specDoc Provider, operationIDs []string) map[string]OpRef { return OpRefsByRef(GatherOperations(specDoc, operationIDs)) } -// OpRefsByRef indexes a map of sortable operations +// OpRefsByRef indexes a map of sortable operations. func OpRefsByRef(oprefs map[string]OpRef) map[string]OpRef { result := make(map[string]OpRef, len(oprefs)) for _, v := range oprefs { @@ -26,7 +29,7 @@ func OpRefsByRef(oprefs map[string]OpRef) map[string]OpRef { return result } -// OpRef is an indexable, sortable operation +// OpRef is an indexable, sortable operation. type OpRef struct { Method string Path string @@ -36,19 +39,19 @@ type OpRef struct { Ref spec.Ref } -// OpRefs is a sortable collection of operations +// OpRefs is a sortable collection of operations. type OpRefs []OpRef func (o OpRefs) Len() int { return len(o) } func (o OpRefs) Swap(i, j int) { o[i], o[j] = o[j], o[i] } func (o OpRefs) Less(i, j int) bool { return o[i].Key < o[j].Key } -// Provider knows how to collect operations from a spec +// Provider knows how to collect operations from a spec. type Provider interface { Operations() map[string]map[string]*spec.Operation } -// GatherOperations builds a map of sorted operations from a spec +// GatherOperations builds a map of sorted operations from a spec. func GatherOperations(specDoc Provider, operationIDs []string) map[string]OpRef { var oprefs OpRefs mangler := mangling.NewNameMangler() diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/replace/errors.go b/vendor/github.com/go-openapi/analysis/internal/flatten/replace/errors.go index 60c3aa044af..b2a8a93ba67 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/replace/errors.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/replace/errors.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package replace import ( @@ -55,7 +58,7 @@ func ErrCyclicChain(key string) error { } func ErrInvalidPointerType(key string, value any, err error) error { - return fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T (%v): %w", + return fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T (%w): %w", key, value, err, ErrReplace, ) } diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go b/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go index f30a22ae2f2..e8365f3333d 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package replace import ( @@ -19,9 +22,10 @@ const ( allocMediumMap = 64 ) +//nolint:gochecknoglobals // it's okay to use a private global for logging var debugLog = debug.GetLogger("analysis/flatten/replace", os.Getenv("SWAGGER_DEBUG") != "") -// RewriteSchemaToRef replaces a schema with a Ref +// RewriteSchemaToRef replaces a schema with a Ref. func RewriteSchemaToRef(sp *spec.Swagger, key string, ref spec.Ref) error { debugLog("rewriting schema to ref for %s with %s", key, ref.String()) _, value, err := getPointerFromKey(sp, key) @@ -45,7 +49,7 @@ func RewriteSchemaToRef(sp *spec.Swagger, key string, ref spec.Ref) error { if refable.Schema != nil { refable.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} } - case map[string]interface{}: // this happens e.g. if a schema points to an extension unmarshaled as map[string]interface{} + case map[string]any: // this happens e.g. if a schema points to an extension unmarshaled as map[string]interface{} return rewriteParentRef(sp, key, ref) default: return ErrNoSchemaWithRef(key, value) @@ -127,7 +131,7 @@ func rewriteParentRef(sp *spec.Swagger, key string, ref spec.Ref) error { case spec.SchemaProperties: container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} - case *interface{}: + case *any: *container = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} // NOTE: can't have case *spec.SchemaOrBool = parent in this case is *Schema @@ -139,8 +143,8 @@ func rewriteParentRef(sp *spec.Swagger, key string, ref spec.Ref) error { return nil } -// getPointerFromKey retrieves the content of the JSON pointer "key" -func getPointerFromKey(sp interface{}, key string) (string, interface{}, error) { +// getPointerFromKey retrieves the content of the JSON pointer "key". +func getPointerFromKey(sp any, key string) (string, any, error) { switch sp.(type) { case *spec.Schema: case *spec.Swagger: @@ -151,7 +155,10 @@ func getPointerFromKey(sp interface{}, key string) (string, interface{}, error) return "", sp, nil } // unescape chars in key, e.g. "{}" from path params - pth, _ := url.PathUnescape(key[1:]) + pth, err := url.PathUnescape(key[1:]) + if err != nil { + return "", nil, errors.Join(err, ErrReplace) + } ptr, err := jsonpointer.New(pth) if err != nil { return "", nil, errors.Join(err, ErrReplace) @@ -167,8 +174,8 @@ func getPointerFromKey(sp interface{}, key string) (string, interface{}, error) return pth, value, nil } -// getParentFromKey retrieves the container of the JSON pointer "key" -func getParentFromKey(sp interface{}, key string) (string, string, interface{}, error) { +// getParentFromKey retrieves the container of the JSON pointer "key". +func getParentFromKey(sp any, key string) (string, string, any, error) { switch sp.(type) { case *spec.Schema: case *spec.Swagger: @@ -193,8 +200,8 @@ func getParentFromKey(sp interface{}, key string) (string, string, interface{}, return parent, entry, pvalue, nil } -// UpdateRef replaces a ref by another one -func UpdateRef(sp interface{}, key string, ref spec.Ref) error { +// UpdateRef replaces a ref by another one. +func UpdateRef(sp any, key string, ref spec.Ref) error { switch sp.(type) { case *spec.Schema: case *spec.Swagger: @@ -262,7 +269,7 @@ func UpdateRef(sp interface{}, key string, ref spec.Ref) error { return nil } -// UpdateRefWithSchema replaces a ref with a schema (i.e. re-inline schema) +// UpdateRefWithSchema replaces a ref with a schema (i.e. re-inline schema). func UpdateRefWithSchema(sp *spec.Swagger, key string, sch *spec.Schema) error { debugLog("updating ref for %s with schema", key) pth, value, err := getPointerFromKey(sp, key) @@ -321,7 +328,7 @@ func UpdateRefWithSchema(sp *spec.Swagger, key string, sch *spec.Schema) error { return nil } -// DeepestRefResult holds the results from DeepestRef analysis +// DeepestRefResult holds the results from DeepestRef analysis. type DeepestRefResult struct { Ref spec.Ref Schema *spec.Schema @@ -333,6 +340,8 @@ type DeepestRefResult struct { // - pointers to external files are expanded // // NOTE: all external $ref's are assumed to be already expanded at this stage. +// +//nolint:gocognit,cyclop,gocyclo // this is the most complex method in this package and we'll have to break it down some day func DeepestRef(sp *spec.Swagger, opts *spec.ExpandOptions, ref spec.Ref) (*DeepestRefResult, error) { if !ref.HasFragmentOnly { // we found an external $ref, which is odd at this stage: @@ -389,11 +398,13 @@ DOWNREF: case spec.Response: // a pointer points to a schema initially marshalled in responses section... // Attempt to convert this to a schema. If this fails, the spec is invalid - asJSON, _ := refable.MarshalJSON() + asJSON, err := refable.MarshalJSON() + if err != nil { + return nil, ErrInvalidPointerType(currentRef.String(), value, err) + } var asSchema spec.Schema - err := asSchema.UnmarshalJSON(asJSON) - if err != nil { + if err = asSchema.UnmarshalJSON(asJSON); err != nil { return nil, ErrInvalidPointerType(currentRef.String(), value, err) } warnings = append(warnings, fmt.Sprintf("found $ref %q (response) interpreted as schema", currentRef.String())) @@ -406,9 +417,12 @@ DOWNREF: case spec.Parameter: // a pointer points to a schema initially marshalled in parameters section... // Attempt to convert this to a schema. If this fails, the spec is invalid - asJSON, _ := refable.MarshalJSON() + asJSON, err := refable.MarshalJSON() + if err != nil { + return nil, ErrInvalidPointerType(currentRef.String(), value, err) + } var asSchema spec.Schema - if err := asSchema.UnmarshalJSON(asJSON); err != nil { + if err = asSchema.UnmarshalJSON(asJSON); err != nil { return nil, ErrInvalidPointerType(currentRef.String(), value, err) } @@ -425,9 +439,12 @@ DOWNREF: break DOWNREF } - asJSON, _ := json.Marshal(refable) + asJSON, err := json.Marshal(refable) + if err != nil { + return nil, ErrInvalidPointerType(currentRef.String(), value, err) + } var asSchema spec.Schema - if err := asSchema.UnmarshalJSON(asJSON); err != nil { + if err = asSchema.UnmarshalJSON(asJSON); err != nil { return nil, ErrInvalidPointerType(currentRef.String(), value, err) } warnings = append(warnings, fmt.Sprintf("found $ref %q (%T) interpreted as schema", currentRef.String(), refable)) diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go b/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go index fa7f6bf34e3..59855ef0727 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + // Package schutils provides tools to save or clone a schema // when flattening a spec. package schutils @@ -9,7 +12,7 @@ import ( const allocLargeMap = 150 -// Save registers a schema as an entry in spec #/definitions +// Save registers a schema as an entry in spec #/definitions. func Save(sp *spec.Swagger, name string, schema *spec.Schema) { if schema == nil { return @@ -22,7 +25,7 @@ func Save(sp *spec.Swagger, name string, schema *spec.Schema) { sp.Definitions[name] = *schema } -// Clone deep-clones a schema +// Clone deep-clones a schema. func Clone(schema *spec.Schema) *spec.Schema { var sch spec.Schema _ = jsonutils.FromDynamicJSON(schema, &sch) diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go index cbe16f65247..7ab8e4ea573 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package sortref import ( @@ -17,12 +20,8 @@ const ( definitions = "definitions" ) +//nolint:gochecknoglobals // it's okay to store small indexes like this as private globals var ( - ignoredKeys map[string]struct{} - validMethods map[string]struct{} -) - -func init() { ignoredKeys = map[string]struct{}{ "schema": {}, "properties": {}, @@ -40,15 +39,15 @@ func init() { "PUT": {}, "DELETE": {}, } -} +) -// Key represent a key item constructed from /-separated segments +// Key represent a key item constructed from /-separated segments. type Key struct { Segments int Key string } -// Keys is a sortable collable collection of Keys +// Keys is a sortable collable collection of Keys. type Keys []Key func (k Keys) Len() int { return len(k) } @@ -60,7 +59,7 @@ func (k Keys) Less(i, j int) bool { // KeyParts construct a SplitKey with all its /-separated segments decomposed. It is sortable. func KeyParts(key string) SplitKey { var res []string - for _, part := range strings.Split(key[1:], "/") { + for part := range strings.SplitSeq(key[1:], "/") { if part != "" { res = append(res, jsonpointer.Unescape(part)) } @@ -72,12 +71,12 @@ func KeyParts(key string) SplitKey { // SplitKey holds of the parts of a /-separated key, so that their location may be determined. type SplitKey []string -// IsDefinition is true when the split key is in the #/definitions section of a spec +// IsDefinition is true when the split key is in the #/definitions section of a spec. func (s SplitKey) IsDefinition() bool { return len(s) > 1 && s[0] == definitions } -// DefinitionName yields the name of the definition +// DefinitionName yields the name of the definition. func (s SplitKey) DefinitionName() string { if !s.IsDefinition() { return "" @@ -86,10 +85,10 @@ func (s SplitKey) DefinitionName() string { return s[1] } -// PartAdder know how to construct the components of a new name +// PartAdder know how to construct the components of a new name. type PartAdder func(string) []string -// BuildName builds a name from segments +// BuildName builds a name from segments. func (s SplitKey) BuildName(segments []string, startIndex int, adder PartAdder) string { for i, part := range s[startIndex:] { if _, ignored := ignoredKeys[part]; !ignored || s.isKeyName(startIndex+i) { @@ -100,42 +99,42 @@ func (s SplitKey) BuildName(segments []string, startIndex int, adder PartAdder) return strings.Join(segments, " ") } -// IsOperation is true when the split key is in the operations section +// IsOperation is true when the split key is in the operations section. func (s SplitKey) IsOperation() bool { return len(s) > 1 && s[0] == paths } -// IsSharedOperationParam is true when the split key is in the parameters section of a path +// IsSharedOperationParam is true when the split key is in the parameters section of a path. func (s SplitKey) IsSharedOperationParam() bool { return len(s) > 2 && s[0] == paths && s[2] == parameters } -// IsSharedParam is true when the split key is in the #/parameters section of a spec +// IsSharedParam is true when the split key is in the #/parameters section of a spec. func (s SplitKey) IsSharedParam() bool { return len(s) > 1 && s[0] == parameters } -// IsOperationParam is true when the split key is in the parameters section of an operation +// IsOperationParam is true when the split key is in the parameters section of an operation. func (s SplitKey) IsOperationParam() bool { return len(s) > 3 && s[0] == paths && s[3] == parameters } -// IsOperationResponse is true when the split key is in the responses section of an operation +// IsOperationResponse is true when the split key is in the responses section of an operation. func (s SplitKey) IsOperationResponse() bool { return len(s) > 3 && s[0] == paths && s[3] == responses } -// IsSharedResponse is true when the split key is in the #/responses section of a spec +// IsSharedResponse is true when the split key is in the #/responses section of a spec. func (s SplitKey) IsSharedResponse() bool { return len(s) > 1 && s[0] == responses } -// IsDefaultResponse is true when the split key is the default response for an operation +// IsDefaultResponse is true when the split key is the default response for an operation. func (s SplitKey) IsDefaultResponse() bool { return len(s) > 4 && s[0] == paths && s[3] == responses && s[4] == "default" } -// IsStatusCodeResponse is true when the split key is an operation response with a status code +// IsStatusCodeResponse is true when the split key is an operation response with a status code. func (s SplitKey) IsStatusCodeResponse() bool { isInt := func() bool { _, err := strconv.Atoi(s[4]) @@ -146,7 +145,7 @@ func (s SplitKey) IsStatusCodeResponse() bool { return len(s) > 4 && s[0] == paths && s[3] == responses && isInt() } -// ResponseName yields either the status code or "Default" for a response +// ResponseName yields either the status code or "Default" for a response. func (s SplitKey) ResponseName() string { if s.IsStatusCodeResponse() { code, _ := strconv.Atoi(s[4]) @@ -161,7 +160,7 @@ func (s SplitKey) ResponseName() string { return "" } -// PathItemRef constructs a $ref object from a split key of the form /{path}/{method} +// PathItemRef constructs a $ref object from a split key of the form /{path}/{method}. func (s SplitKey) PathItemRef() spec.Ref { const minValidPathItems = 3 if len(s) < minValidPathItems { @@ -176,7 +175,7 @@ func (s SplitKey) PathItemRef() spec.Ref { return spec.MustCreateRef("#" + path.Join("/", paths, jsonpointer.Escape(pth), strings.ToUpper(method))) } -// PathRef constructs a $ref object from a split key of the form /paths/{reference} +// PathRef constructs a $ref object from a split key of the form /paths/{reference}. func (s SplitKey) PathRef() spec.Ref { if !s.IsOperation() { return spec.Ref{} diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go index 73243df87f0..e4ad07b0960 100644 --- a/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go @@ -1,7 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package sortref import ( + "iter" "reflect" + "slices" "sort" "strings" @@ -9,10 +14,6 @@ import ( "github.com/go-openapi/spec" ) -var depthGroupOrder = []string{ - "sharedParam", "sharedResponse", "sharedOpParam", "opParam", "codeResponse", "defaultResponse", "definition", -} - type mapIterator struct { len int mapIter *reflect.MapIter @@ -30,7 +31,7 @@ func (i *mapIterator) Key() string { return i.mapIter.Key().String() } -func mustMapIterator(anyMap interface{}) *mapIterator { +func mustMapIterator(anyMap any) *mapIterator { val := reflect.ValueOf(anyMap) return &mapIterator{mapIter: val.MapRange(), len: val.Len()} @@ -39,8 +40,8 @@ func mustMapIterator(anyMap interface{}) *mapIterator { // DepthFirst sorts a map of anything. It groups keys by category // (shared params, op param, statuscode response, default response, definitions) // sort groups internally by number of parts in the key and lexical names -// flatten groups into a single list of keys -func DepthFirst(in interface{}) []string { +// flatten groups into a single list of keys. +func DepthFirst(in any) []string { iterator := mustMapIterator(in) sorted := make([]string, 0, iterator.Len()) grouped := make(map[string]Keys, iterator.Len()) @@ -74,7 +75,7 @@ func DepthFirst(in interface{}) []string { grouped[pk] = append(grouped[pk], Key{Segments: len(split), Key: k}) } - for _, pk := range depthGroupOrder { + for pk := range depthGroupOrder() { res := grouped[pk] sort.Sort(res) @@ -86,6 +87,12 @@ func DepthFirst(in interface{}) []string { return sorted } +func depthGroupOrder() iter.Seq[string] { + return slices.Values([]string{ + "sharedParam", "sharedResponse", "sharedOpParam", "opParam", "codeResponse", "defaultResponse", "definition", + }) +} + // topMostRefs is able to sort refs by hierarchical then lexicographic order, // yielding refs ordered breadth-first. type topmostRefs []string @@ -101,7 +108,7 @@ func (k topmostRefs) Less(i, j int) bool { return li < lj } -// TopmostFirst sorts references by depth +// TopmostFirst sorts references by depth. func TopmostFirst(refs []string) []string { res := topmostRefs(refs) sort.Sort(res) @@ -109,13 +116,13 @@ func TopmostFirst(refs []string) []string { return res } -// RefRevIdx is a reverse index for references +// RefRevIdx is a reverse index for references. type RefRevIdx struct { Ref spec.Ref Keys []string } -// ReverseIndex builds a reverse index for references in schemas +// ReverseIndex builds a reverse index for references in schemas. func ReverseIndex(schemas map[string]spec.Ref, basePath string) map[string]RefRevIdx { collected := make(map[string]RefRevIdx) for key, schRef := range schemas { diff --git a/vendor/github.com/go-openapi/analysis/mixin.go b/vendor/github.com/go-openapi/analysis/mixin.go index b0b41dba644..cc5c392334b 100644 --- a/vendor/github.com/go-openapi/analysis/mixin.go +++ b/vendor/github.com/go-openapi/analysis/mixin.go @@ -1,22 +1,12 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package analysis import ( "fmt" "reflect" + "slices" "github.com/go-openapi/spec" ) @@ -248,14 +238,7 @@ func mergeResponses(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { func mergeConsumes(primary *spec.Swagger, m *spec.Swagger) []string { for _, v := range m.Consumes { - found := false - for _, vv := range primary.Consumes { - if v == vv { - found = true - - break - } - } + found := slices.Contains(primary.Consumes, v) if found { // no warning here: we just skip it @@ -269,14 +252,7 @@ func mergeConsumes(primary *spec.Swagger, m *spec.Swagger) []string { func mergeProduces(primary *spec.Swagger, m *spec.Swagger) []string { for _, v := range m.Produces { - found := false - for _, vv := range primary.Produces { - if v == vv { - found = true - - break - } - } + found := slices.Contains(primary.Produces, v) if found { // no warning here: we just skip it @@ -317,14 +293,7 @@ func mergeTags(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { func mergeSchemes(primary *spec.Swagger, m *spec.Swagger) []string { for _, v := range m.Schemes { - found := false - for _, vv := range primary.Schemes { - if v == vv { - found = true - - break - } - } + found := slices.Contains(primary.Schemes, v) if found { // no warning here: we just skip it diff --git a/vendor/github.com/go-openapi/analysis/schema.go b/vendor/github.com/go-openapi/analysis/schema.go index baeb784e730..bedea652acf 100644 --- a/vendor/github.com/go-openapi/analysis/schema.go +++ b/vendor/github.com/go-openapi/analysis/schema.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package analysis import ( @@ -5,10 +8,10 @@ import ( "github.com/go-openapi/strfmt" ) -// SchemaOpts configures the schema analyzer +// SchemaOpts configures the schema analyzer. type SchemaOpts struct { Schema *spec.Schema - Root interface{} + Root any BasePath string _ struct{} } @@ -49,10 +52,10 @@ func Schema(opts SchemaOpts) (*AnalyzedSchema, error) { return a, nil } -// AnalyzedSchema indicates what the schema represents +// AnalyzedSchema indicates what the schema represents. type AnalyzedSchema struct { schema *spec.Schema - root interface{} + root any basePath string hasProps bool @@ -75,7 +78,7 @@ type AnalyzedSchema struct { IsEnum bool } -// Inherits copies value fields from other onto this schema +// Inherits copies value fields from other onto this schema. func (a *AnalyzedSchema) inherits(other *AnalyzedSchema) { if other == nil { return diff --git a/vendor/github.com/go-openapi/errors/.cliff.toml b/vendor/github.com/go-openapi/errors/.cliff.toml new file mode 100644 index 00000000000..702629f5dc3 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/.cliff.toml @@ -0,0 +1,181 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +header = """ +""" + +footer = """ + +----- + +**[{{ remote.github.repo }}]({{ self::remote_url() }}) license terms** + +[![License][license-badge]][license-url] + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: {{ self::remote_url() }}/?tab=Apache-2.0-1-ov-file#readme + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" + +body = """ +{%- if version %} +## [{{ version | trim_start_matches(pat="v") }}]({{ self::remote_url() }}/tree/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{%- else %} +## [unreleased] +{%- endif %} +{%- if message %} + {%- raw %}\n{% endraw %} +{{ message }} + {%- raw %}\n{% endraw %} +{%- endif %} +{%- if version %} + {%- if previous.version %} + +**Full Changelog**: <{{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}> + {%- endif %} +{%- else %} + {%- raw %}\n{% endraw %} +{%- endif %} + +{%- if statistics %}{% if statistics.commit_count %} + {%- raw %}\n{% endraw %} +{{ statistics.commit_count }} commits in this release. + {%- raw %}\n{% endraw %} +{%- endif %}{% endif %} +----- + +{%- for group, commits in commits | group_by(attribute="group") %} + {%- raw %}\n{% endraw %} +### {{ group | upper_first }} + {%- raw %}\n{% endraw %} + {%- for commit in commits %} + {%- if commit.remote.pr_title %} + {%- set commit_message = commit.remote.pr_title %} + {%- else %} + {%- set commit_message = commit.message %} + {%- endif %} +* {{ commit_message | split(pat="\n") | first | trim }} + {%- if commit.remote.username %} +{%- raw %} {% endraw %}by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) + {%- endif %} + {%- if commit.remote.pr_number %} +{%- raw %} {% endraw %}in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) + {%- endif %} +{%- raw %} {% endraw %}[...]({{ self::remote_url() }}/commit/{{ commit.id }}) + {%- endfor %} +{%- endfor %} + +{%- if github %} +{%- raw %}\n{% endraw -%} + {%- set all_contributors = github.contributors | length %} + {%- if github.contributors | filter(attribute="username", value="dependabot[bot]") | length < all_contributors %} +----- + +### People who contributed to this release + {% endif %} + {%- for contributor in github.contributors | filter(attribute="username") | sort(attribute="username") %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) + {%- endif %} + {%- endfor %} + + {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} +----- + {%- raw %}\n{% endraw %} + +### New Contributors + {%- endif %} + + {%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} + in [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} + {%- endif %} + {%- endfor %} +{%- endif %} + +{%- raw %}\n{% endraw %} + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" +# Remove leading and trailing whitespaces from the changelog's body. +trim = true +# Render body even when there are no releases to process. +render_always = true +# An array of regex based postprocessors to modify the changelog. +postprocessors = [ + # Replace the placeholder with a URL. + #{ pattern = '', replace = "https://github.com/orhun/git-cliff" }, +] +# output file path +# output = "test.md" + +[git] +# Parse commits according to the conventional commits specification. +# See https://www.conventionalcommits.org +conventional_commits = false +# Exclude commits that do not match the conventional commits specification. +filter_unconventional = false +# Require all commits to be conventional. +# Takes precedence over filter_unconventional. +require_conventional = false +# Split commits on newlines, treating each line as an individual commit. +split_commits = false +# An array of regex based parsers to modify commit messages prior to further processing. +commit_preprocessors = [ + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit message using https://github.com/crate-ci/typos. + # If the spelling is incorrect, it will be fixed automatically. + #{ pattern = '.*', replace_command = 'typos --write-changes -' } +] +# Prevent commits that are breaking from being excluded by commit parsers. +protect_breaking_commits = false +# An array of regex based parsers for extracting data from the commit message. +# Assigns commits to groups. +# Optionally sets the commit's scope and can decide to exclude commits from further processing. +commit_parsers = [ + { message = "^[Cc]hore\\([Rr]elease\\): prepare for", skip = true }, + { message = "(^[Mm]erge)|([Mm]erge conflict)", skip = true }, + { field = "author.name", pattern = "dependabot*", group = "Updates" }, + { message = "([Ss]ecurity)|([Vv]uln)", group = "Security" }, + { body = "(.*[Ss]ecurity)|([Vv]uln)", group = "Security" }, + { message = "([Cc]hore\\(lint\\))|(style)|(lint)|(codeql)|(golangci)", group = "Code quality" }, + { message = "(^[Dd]oc)|((?i)readme)|(badge)|(typo)|(documentation)", group = "Documentation" }, + { message = "(^[Ff]eat)|(^[Ee]nhancement)", group = "Implemented enhancements" }, + { message = "(^ci)|(\\(ci\\))|(fixup\\s+ci)|(fix\\s+ci)|(license)|(example)", group = "Miscellaneous tasks" }, + { message = "^test", group = "Testing" }, + { message = "(^fix)|(panic)", group = "Fixed bugs" }, + { message = "(^refact)|(rework)", group = "Refactor" }, + { message = "(^[Pp]erf)|(performance)", group = "Performance" }, + { message = "(^[Cc]hore)", group = "Miscellaneous tasks" }, + { message = "^[Rr]evert", group = "Reverted changes" }, + { message = "(upgrade.*?go)|(go\\s+version)", group = "Updates" }, + { message = ".*", group = "Other" }, +] +# Exclude commits that are not matched by any commit parser. +filter_commits = false +# An array of link parsers for extracting external references, and turning them into URLs, using regex. +link_parsers = [] +# Include only the tags that belong to the current branch. +use_branch_tags = false +# Order releases topologically instead of chronologically. +topo_order = false +# Order releases topologically instead of chronologically. +topo_order_commits = true +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest +sort_commits = "newest" +# Process submodules commits +recurse_submodules = false + +#[remote.github] +#owner = "go-openapi" diff --git a/vendor/github.com/go-openapi/errors/.editorconfig b/vendor/github.com/go-openapi/errors/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/errors/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/errors/.gitignore b/vendor/github.com/go-openapi/errors/.gitignore index dd91ed6a04e..9a8da7e5064 100644 --- a/vendor/github.com/go-openapi/errors/.gitignore +++ b/vendor/github.com/go-openapi/errors/.gitignore @@ -1,2 +1,3 @@ secrets.yml -coverage.out +*.out +settings.local.json diff --git a/vendor/github.com/go-openapi/errors/.golangci.yml b/vendor/github.com/go-openapi/errors/.golangci.yml index 5609b4fea9c..fdae591bce7 100644 --- a/vendor/github.com/go-openapi/errors/.golangci.yml +++ b/vendor/github.com/go-openapi/errors/.golangci.yml @@ -2,34 +2,17 @@ version: "2" linters: default: all disable: - - cyclop - depguard - - errchkjson - - errorlint - - exhaustruct - - forcetypeassert - funlen - - gochecknoglobals - - gochecknoinits - - gocognit - - godot - godox - - gosmopolitan - - inamedparam - #- intrange # disabled while < go1.22 - - ireturn - - lll - - musttag - - nestif + - exhaustruct - nlreturn - - noinlineerr - nonamedreturns + - noinlineerr - paralleltest - recvcheck - testpackage - - thelper - tparallel - - unparam - varnamelen - whitespace - wrapcheck @@ -41,8 +24,15 @@ linters: goconst: min-len: 2 min-occurrences: 3 + cyclop: + max-complexity: 20 gocyclo: - min-complexity: 45 + min-complexity: 20 + exhaustive: + default-signifies-exhaustive: true + default-case-required: true + lll: + line-length: 180 exclusions: generated: lax presets: @@ -58,6 +48,7 @@ formatters: enable: - gofmt - goimports + - gofumpt exclusions: generated: lax paths: diff --git a/vendor/github.com/go-openapi/errors/CONTRIBUTORS.md b/vendor/github.com/go-openapi/errors/CONTRIBUTORS.md new file mode 100644 index 00000000000..eb018f8aaff --- /dev/null +++ b/vendor/github.com/go-openapi/errors/CONTRIBUTORS.md @@ -0,0 +1,24 @@ +# Contributors + +- Repository: ['go-openapi/errors'] + +| Total Contributors | Total Contributions | +| --- | --- | +| 12 | 105 | + +| Username | All Time Contribution Count | All Commits | +| --- | --- | --- | +| @casualjim | 58 | https://github.com/go-openapi/errors/commits?author=casualjim | +| @fredbi | 32 | https://github.com/go-openapi/errors/commits?author=fredbi | +| @youyuanwu | 5 | https://github.com/go-openapi/errors/commits?author=youyuanwu | +| @alexandear | 2 | https://github.com/go-openapi/errors/commits?author=alexandear | +| @fiorix | 1 | https://github.com/go-openapi/errors/commits?author=fiorix | +| @ligustah | 1 | https://github.com/go-openapi/errors/commits?author=ligustah | +| @artemseleznev | 1 | https://github.com/go-openapi/errors/commits?author=artemseleznev | +| @gautierdelorme | 1 | https://github.com/go-openapi/errors/commits?author=gautierdelorme | +| @guillemj | 1 | https://github.com/go-openapi/errors/commits?author=guillemj | +| @maxatome | 1 | https://github.com/go-openapi/errors/commits?author=maxatome | +| @Simon-Li | 1 | https://github.com/go-openapi/errors/commits?author=Simon-Li | +| @ujjwalsh | 1 | https://github.com/go-openapi/errors/commits?author=ujjwalsh | + + _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ diff --git a/vendor/github.com/go-openapi/errors/README.md b/vendor/github.com/go-openapi/errors/README.md index 6d57ea55c7c..6102c6b5277 100644 --- a/vendor/github.com/go-openapi/errors/README.md +++ b/vendor/github.com/go-openapi/errors/README.md @@ -1,8 +1,123 @@ -# OpenAPI errors [![Build Status](https://github.com/go-openapi/errors/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/errors/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/errors/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/errors) +# errors -[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/errors/master/LICENSE) -[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/errors.svg)](https://pkg.go.dev/github.com/go-openapi/errors) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/errors)](https://goreportcard.com/report/github.com/go-openapi/errors) + +[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url] + + + +[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url] + + +[![GoDoc][godoc-badge]][godoc-url] [![Discord Channel][discord-badge]][discord-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge] + +--- Shared errors and error interface used throughout the various libraries found in the go-openapi toolkit. + +## Announcements + +* **2025-12-19** : new community chat on discord + * a new discord community channel is available to be notified of changes and support users + * our venerable Slack channel remains open, and will be eventually discontinued on **2026-03-31** + +You may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url] + +Or join our Slack channel: [![Slack Channel][slack-logo]![slack-badge]][slack-url] + +## Status + +API is stable. + +## Import this library in your project + +```cmd +go get github.com/go-openapi/errors +``` + +## Basic usage + +```go +const url = "https://www.example.com/#" + +errGeneric := New(401,"onvalid argument: %s", url) + +errNotFound := NotFound("resource not found: %s", url) + +errNotImplemented := NotImplemented("method: %s", url) +``` + +## Change log + +See + + + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + + + + + +## Other documentation + +* [All-time contributors](./CONTRIBUTORS.md) +* [Contributing guidelines](.github/CONTRIBUTING.md) +* [Maintainers documentation](docs/MAINTAINERS.md) +* [Code style](docs/STYLE.md) + +## Cutting a new release + +Maintainers can cut a new release by either: + +* running [this workflow](https://github.com/go-openapi/errors/actions/workflows/bump-release.yml) +* or pushing a semver tag + * signed tags are preferred + * The tag message is prepended to release notes + + +[test-badge]: https://github.com/go-openapi/errors/actions/workflows/go-test.yml/badge.svg +[test-url]: https://github.com/go-openapi/errors/actions/workflows/go-test.yml +[cov-badge]: https://codecov.io/gh/go-openapi/errors/branch/master/graph/badge.svg +[cov-url]: https://codecov.io/gh/go-openapi/errors +[vuln-scan-badge]: https://github.com/go-openapi/errors/actions/workflows/scanner.yml/badge.svg +[vuln-scan-url]: https://github.com/go-openapi/errors/actions/workflows/scanner.yml +[codeql-badge]: https://github.com/go-openapi/errors/actions/workflows/codeql.yml/badge.svg +[codeql-url]: https://github.com/go-openapi/errors/actions/workflows/codeql.yml + +[release-badge]: https://badge.fury.io/gh/go-openapi%2Ferrors.svg +[release-url]: https://badge.fury.io/gh/go-openapi%2Ferrors +[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Ferrors.svg +[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Ferrors + +[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/errors +[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/errors +[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/errors +[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/errors + +[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F +[doc-url]: https://goswagger.io/go-openapi +[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/errors +[godoc-url]: http://pkg.go.dev/github.com/go-openapi/errors +[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png +[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM +[slack-url]: https://goswagger.slack.com/archives/C04R30YMU +[discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue +[discord-url]: https://discord.gg/DrafRmZx + + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: https://github.com/go-openapi/errors/?tab=Apache-2.0-1-ov-file#readme + +[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/errors +[goversion-url]: https://github.com/go-openapi/errors/blob/master/go.mod +[top-badge]: https://img.shields.io/github/languages/top/go-openapi/errors +[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/errors/latest diff --git a/vendor/github.com/go-openapi/errors/SECURITY.md b/vendor/github.com/go-openapi/errors/SECURITY.md new file mode 100644 index 00000000000..2a7b6f0910d --- /dev/null +++ b/vendor/github.com/go-openapi/errors/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This policy outlines the commitment and practices of the go-openapi maintainers regarding security. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.22.x | :white_check_mark: | + +## Reporting a vulnerability + +If you become aware of a security vulnerability that affects the current repository, +please report it privately to the maintainers. + +Please follow the instructions provided by github to +[Privately report a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). + +TL;DR: on Github, navigate to the project's "Security" tab then click on "Report a vulnerability". diff --git a/vendor/github.com/go-openapi/errors/api.go b/vendor/github.com/go-openapi/errors/api.go index 52d45777280..cb139416af8 100644 --- a/vendor/github.com/go-openapi/errors/api.go +++ b/vendor/github.com/go-openapi/errors/api.go @@ -1,21 +1,11 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors import ( "encoding/json" + "errors" "fmt" "net/http" "reflect" @@ -23,9 +13,11 @@ import ( ) // DefaultHTTPCode is used when the error Code cannot be used as an HTTP code. +// +//nolint:gochecknoglobals // it should have been a constant in the first place, but now it is mutable so we have to leave it here or introduce a breaking change. var DefaultHTTPCode = http.StatusUnprocessableEntity -// Error represents a error interface all swagger framework errors implement +// Error represents a error interface all swagger framework errors implement. type Error interface { error Code() int32 @@ -36,24 +28,26 @@ type apiError struct { message string } +// Error implements the standard error interface. func (a *apiError) Error() string { return a.message } +// Code returns the HTTP status code associated with this error. func (a *apiError) Code() int32 { return a.code } -// MarshalJSON implements the JSON encoding interface +// MarshalJSON implements the JSON encoding interface. func (a apiError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": a.code, "message": a.message, }) } -// New creates a new API error with a code and a message -func New(code int32, message string, args ...interface{}) Error { +// New creates a new API error with a code and a message. +func New(code int32, message string, args ...any) Error { if len(args) > 0 { return &apiError{ code: code, @@ -66,38 +60,39 @@ func New(code int32, message string, args ...interface{}) Error { } } -// NotFound creates a new not found error -func NotFound(message string, args ...interface{}) Error { +// NotFound creates a new not found error. +func NotFound(message string, args ...any) Error { if message == "" { message = "Not found" } return New(http.StatusNotFound, message, args...) } -// NotImplemented creates a new not implemented error +// NotImplemented creates a new not implemented error. func NotImplemented(message string) Error { return New(http.StatusNotImplemented, "%s", message) } -// MethodNotAllowedError represents an error for when the path matches but the method doesn't +// MethodNotAllowedError represents an error for when the path matches but the method doesn't. type MethodNotAllowedError struct { code int32 Allowed []string message string } +// Error implements the standard error interface. func (m *MethodNotAllowedError) Error() string { return m.message } -// Code the error code +// Code returns 405 (Method Not Allowed) as the HTTP status code. func (m *MethodNotAllowedError) Code() int32 { return m.code } -// MarshalJSON implements the JSON encoding interface +// MarshalJSON implements the JSON encoding interface. func (m MethodNotAllowedError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": m.code, "message": m.message, "allowed": m.Allowed, @@ -115,25 +110,33 @@ func errorAsJSON(err Error) []byte { func flattenComposite(errs *CompositeError) *CompositeError { var res []error - for _, er := range errs.Errors { - switch e := er.(type) { - case *CompositeError: - if e != nil && len(e.Errors) > 0 { - flat := flattenComposite(e) - if len(flat.Errors) > 0 { - res = append(res, flat.Errors...) - } - } - default: - if e != nil { - res = append(res, e) - } + + for _, err := range errs.Errors { + if err == nil { + continue + } + + e := &CompositeError{} + if !errors.As(err, &e) { + res = append(res, err) + + continue } + + if len(e.Errors) == 0 { + res = append(res, e) + + continue + } + + flat := flattenComposite(e) + res = append(res, flat.Errors...) } + return CompositeValidationError(res...) } -// MethodNotAllowed creates a new method not allowed error +// MethodNotAllowed creates a new method not allowed error. func MethodNotAllowed(requested string, allow []string) Error { msg := fmt.Sprintf("method %s is not allowed, but [%s] are", requested, strings.Join(allow, ",")) return &MethodNotAllowedError{ @@ -143,39 +146,55 @@ func MethodNotAllowed(requested string, allow []string) Error { } } -// ServeError implements the http error handler interface +// ServeError implements the http error handler interface. func ServeError(rw http.ResponseWriter, r *http.Request, err error) { rw.Header().Set("Content-Type", "application/json") - switch e := err.(type) { - case *CompositeError: - er := flattenComposite(e) + + if err == nil { + rw.WriteHeader(http.StatusInternalServerError) + _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "Unknown error"))) + + return + } + + errComposite := &CompositeError{} + errMethodNotAllowed := &MethodNotAllowedError{} + var errError Error + + switch { + case errors.As(err, &errComposite): + er := flattenComposite(errComposite) // strips composite errors to first element only if len(er.Errors) > 0 { ServeError(rw, r, er.Errors[0]) - } else { - // guard against empty CompositeError (invalid construct) - ServeError(rw, r, nil) + + return } - case *MethodNotAllowedError: - rw.Header().Add("Allow", strings.Join(e.Allowed, ",")) - rw.WriteHeader(asHTTPCode(int(e.Code()))) + + // guard against empty CompositeError (invalid construct) + ServeError(rw, r, nil) + + case errors.As(err, &errMethodNotAllowed): + rw.Header().Add("Allow", strings.Join(errMethodNotAllowed.Allowed, ",")) + rw.WriteHeader(asHTTPCode(int(errMethodNotAllowed.Code()))) if r == nil || r.Method != http.MethodHead { - _, _ = rw.Write(errorAsJSON(e)) + _, _ = rw.Write(errorAsJSON(errMethodNotAllowed)) } - case Error: - value := reflect.ValueOf(e) + + case errors.As(err, &errError): + value := reflect.ValueOf(errError) if value.Kind() == reflect.Ptr && value.IsNil() { rw.WriteHeader(http.StatusInternalServerError) _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "Unknown error"))) + return } - rw.WriteHeader(asHTTPCode(int(e.Code()))) + + rw.WriteHeader(asHTTPCode(int(errError.Code()))) if r == nil || r.Method != http.MethodHead { - _, _ = rw.Write(errorAsJSON(e)) + _, _ = rw.Write(errorAsJSON(errError)) } - case nil: - rw.WriteHeader(http.StatusInternalServerError) - _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "Unknown error"))) + default: rw.WriteHeader(http.StatusInternalServerError) if r == nil || r.Method != http.MethodHead { diff --git a/vendor/github.com/go-openapi/errors/auth.go b/vendor/github.com/go-openapi/errors/auth.go index 0545b501bd7..1173b5642cc 100644 --- a/vendor/github.com/go-openapi/errors/auth.go +++ b/vendor/github.com/go-openapi/errors/auth.go @@ -1,22 +1,11 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors import "net/http" -// Unauthenticated returns an unauthenticated error +// Unauthenticated returns an unauthenticated error. func Unauthenticated(scheme string) Error { return New(http.StatusUnauthorized, "unauthenticated for %s", scheme) } diff --git a/vendor/github.com/go-openapi/errors/doc.go b/vendor/github.com/go-openapi/errors/doc.go index af01190ce61..b4627f30f4c 100644 --- a/vendor/github.com/go-openapi/errors/doc.go +++ b/vendor/github.com/go-openapi/errors/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 /* Package errors provides an Error interface and several concrete types diff --git a/vendor/github.com/go-openapi/errors/headers.go b/vendor/github.com/go-openapi/errors/headers.go index 6ea1151f415..717a51ac434 100644 --- a/vendor/github.com/go-openapi/errors/headers.go +++ b/vendor/github.com/go-openapi/errors/headers.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -20,28 +9,30 @@ import ( "net/http" ) -// Validation represents a failure of a precondition -type Validation struct { //nolint: errname +// Validation represents a failure of a precondition. +type Validation struct { //nolint: errname // changing the name to abide by the naming rule would bring a breaking change. code int32 Name string In string - Value interface{} + Value any message string - Values []interface{} + Values []any } +// Error implements the standard error interface. func (e *Validation) Error() string { return e.message } -// Code the error code +// Code returns the HTTP status code for this validation error. +// Returns 422 (Unprocessable Entity) by default. func (e *Validation) Code() int32 { return e.code } -// MarshalJSON implements the JSON encoding interface +// MarshalJSON implements the JSON encoding interface. func (e Validation) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": e.code, "message": e.message, "in": e.In, @@ -51,7 +42,7 @@ func (e Validation) MarshalJSON() ([]byte, error) { }) } -// ValidateName sets the name for a validation or updates it for a nested property +// ValidateName sets the name for a validation or updates it for a nested property. func (e *Validation) ValidateName(name string) *Validation { if name != "" { if e.Name == "" { @@ -70,9 +61,9 @@ const ( responseFormatFail = `unsupported media type requested, only %v are available` ) -// InvalidContentType error for an invalid content type +// InvalidContentType error for an invalid content type. func InvalidContentType(value string, allowed []string) *Validation { - values := make([]interface{}, 0, len(allowed)) + values := make([]any, 0, len(allowed)) for _, v := range allowed { values = append(values, v) } @@ -86,9 +77,9 @@ func InvalidContentType(value string, allowed []string) *Validation { } } -// InvalidResponseFormat error for an unacceptable response format request +// InvalidResponseFormat error for an unacceptable response format request. func InvalidResponseFormat(value string, allowed []string) *Validation { - values := make([]interface{}, 0, len(allowed)) + values := make([]any, 0, len(allowed)) for _, v := range allowed { values = append(values, v) } diff --git a/vendor/github.com/go-openapi/errors/middleware.go b/vendor/github.com/go-openapi/errors/middleware.go index 1b9f3a93016..f89275f9c1d 100644 --- a/vendor/github.com/go-openapi/errors/middleware.go +++ b/vendor/github.com/go-openapi/errors/middleware.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -21,13 +10,14 @@ import ( ) // APIVerificationFailed is an error that contains all the missing info for a mismatched section -// between the api registrations and the api spec +// between the api registrations and the api spec. type APIVerificationFailed struct { //nolint: errname Section string `json:"section,omitempty"` MissingSpecification []string `json:"missingSpecification,omitempty"` MissingRegistration []string `json:"missingRegistration,omitempty"` } +// Error implements the standard error interface. func (v *APIVerificationFailed) Error() string { buf := bytes.NewBuffer(nil) diff --git a/vendor/github.com/go-openapi/errors/parsing.go b/vendor/github.com/go-openapi/errors/parsing.go index 34930c087a7..46e6612cdfa 100644 --- a/vendor/github.com/go-openapi/errors/parsing.go +++ b/vendor/github.com/go-openapi/errors/parsing.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -20,7 +9,7 @@ import ( "net/http" ) -// ParseError represents a parsing error +// ParseError represents a parsing error. type ParseError struct { code int32 Name string @@ -30,7 +19,7 @@ type ParseError struct { message string } -// NewParseError creates a new parse error +// NewParseError creates a new parse error. func NewParseError(name, in, value string, reason error) *ParseError { var msg string if in == "" { @@ -48,22 +37,23 @@ func NewParseError(name, in, value string, reason error) *ParseError { } } +// Error implements the standard error interface. func (e *ParseError) Error() string { return e.message } -// Code returns the http status code for this error +// Code returns 400 (Bad Request) as the HTTP status code for parsing errors. func (e *ParseError) Code() int32 { return e.code } -// MarshalJSON implements the JSON encoding interface +// MarshalJSON implements the JSON encoding interface. func (e ParseError) MarshalJSON() ([]byte, error) { var reason string if e.Reason != nil { reason = e.Reason.Error() } - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": e.code, "message": e.message, "in": e.In, diff --git a/vendor/github.com/go-openapi/errors/schema.go b/vendor/github.com/go-openapi/errors/schema.go index 8f3239dfd9b..2378bae67f3 100644 --- a/vendor/github.com/go-openapi/errors/schema.go +++ b/vendor/github.com/go-openapi/errors/schema.go @@ -1,21 +1,11 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors import ( "encoding/json" + "errors" "fmt" "net/http" "strings" @@ -73,14 +63,15 @@ const ( const maximumValidHTTPCode = 600 // All code responses can be used to differentiate errors for different handling -// by the consuming program +// by the consuming program. const ( // CompositeErrorCode remains 422 for backwards-compatibility - // and to separate it from validation errors with cause + // and to separate it from validation errors with cause. CompositeErrorCode = http.StatusUnprocessableEntity - // InvalidTypeCode is used for any subclass of invalid types + // InvalidTypeCode is used for any subclass of invalid types. InvalidTypeCode = maximumValidHTTPCode + iota + // RequiredFailCode indicates a required field is missing. RequiredFailCode TooLongFailCode TooShortFailCode @@ -101,22 +92,26 @@ const ( ReadOnlyFailCode ) -// CompositeError is an error that groups several errors together +// CompositeError is an error that groups several errors together. type CompositeError struct { Errors []error code int32 message string } -// Code for this error +// Code returns the HTTP status code for this composite error. func (c *CompositeError) Code() int32 { return c.code } +// Error implements the standard error interface. func (c *CompositeError) Error() string { if len(c.Errors) > 0 { msgs := []string{c.message + ":"} for _, e := range c.Errors { + if e == nil { + continue + } msgs = append(msgs, e.Error()) } return strings.Join(msgs, "\n") @@ -124,20 +119,21 @@ func (c *CompositeError) Error() string { return c.message } +// Unwrap implements the [errors.Unwrap] interface. func (c *CompositeError) Unwrap() []error { return c.Errors } -// MarshalJSON implements the JSON encoding interface +// MarshalJSON implements the JSON encoding interface. func (c CompositeError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": c.code, "message": c.message, "errors": c.Errors, }) } -// CompositeValidationError an error to wrap a bunch of other errors +// CompositeValidationError an error to wrap a bunch of other errors. func CompositeValidationError(errors ...error) *CompositeError { return &CompositeError{ code: CompositeErrorCode, @@ -146,20 +142,33 @@ func CompositeValidationError(errors ...error) *CompositeError { } } -// ValidateName recursively sets the name for all validations or updates them for nested properties +// ValidateName recursively sets the name for all validations or updates them for nested properties. func (c *CompositeError) ValidateName(name string) *CompositeError { for i, e := range c.Errors { - if ve, ok := e.(*Validation); ok { - c.Errors[i] = ve.ValidateName(name) - } else if ce, ok := e.(*CompositeError); ok { + if e == nil { + continue + } + + ce := &CompositeError{} + if errors.As(e, &ce) { c.Errors[i] = ce.ValidateName(name) + + continue + } + + ve := &Validation{} + if errors.As(e, &ve) { + c.Errors[i] = ve.ValidateName(name) + + continue } + } return c } -// FailedAllPatternProperties an error for when the property doesn't match a pattern +// FailedAllPatternProperties an error for when the property doesn't match a pattern. func FailedAllPatternProperties(name, in, key string) *Validation { msg := fmt.Sprintf(failedAllPatternProps, name, key, in) if in == "" { @@ -174,7 +183,7 @@ func FailedAllPatternProperties(name, in, key string) *Validation { } } -// PropertyNotAllowed an error for when the property doesn't match a pattern +// PropertyNotAllowed an error for when the property doesn't match a pattern. func PropertyNotAllowed(name, in, key string) *Validation { msg := fmt.Sprintf(unallowedProperty, name, key, in) if in == "" { @@ -189,7 +198,7 @@ func PropertyNotAllowed(name, in, key string) *Validation { } } -// TooFewProperties an error for an object with too few properties +// TooFewProperties an error for an object with too few properties. func TooFewProperties(name, in string, n int64) *Validation { msg := fmt.Sprintf(tooFewProperties, name, in, n) if in == "" { @@ -204,7 +213,7 @@ func TooFewProperties(name, in string, n int64) *Validation { } } -// TooManyProperties an error for an object with too many properties +// TooManyProperties an error for an object with too many properties. func TooManyProperties(name, in string, n int64) *Validation { msg := fmt.Sprintf(tooManyProperties, name, in, n) if in == "" { @@ -219,7 +228,7 @@ func TooManyProperties(name, in string, n int64) *Validation { } } -// AdditionalItemsNotAllowed an error for invalid additional items +// AdditionalItemsNotAllowed an error for invalid additional items. func AdditionalItemsNotAllowed(name, in string) *Validation { msg := fmt.Sprintf(noAdditionalItems, name, in) if in == "" { @@ -233,7 +242,7 @@ func AdditionalItemsNotAllowed(name, in string) *Validation { } } -// InvalidCollectionFormat another flavor of invalid type error +// InvalidCollectionFormat another flavor of invalid type error. func InvalidCollectionFormat(name, in, format string) *Validation { return &Validation{ code: InvalidTypeCode, @@ -244,7 +253,7 @@ func InvalidCollectionFormat(name, in, format string) *Validation { } } -// InvalidTypeName an error for when the type is invalid +// InvalidTypeName an error for when the type is invalid. func InvalidTypeName(typeName string) *Validation { return &Validation{ code: InvalidTypeCode, @@ -253,8 +262,8 @@ func InvalidTypeName(typeName string) *Validation { } } -// InvalidType creates an error for when the type is invalid -func InvalidType(name, in, typeName string, value interface{}) *Validation { +// InvalidType creates an error for when the type is invalid. +func InvalidType(name, in, typeName string, value any) *Validation { var message string if in != "" { @@ -284,10 +293,9 @@ func InvalidType(name, in, typeName string, value interface{}) *Validation { Value: value, message: message, } - } -// DuplicateItems error for when an array contains duplicates +// DuplicateItems error for when an array contains duplicates. func DuplicateItems(name, in string) *Validation { msg := fmt.Sprintf(uniqueFail, name, in) if in == "" { @@ -301,8 +309,8 @@ func DuplicateItems(name, in string) *Validation { } } -// TooManyItems error for when an array contains too many items -func TooManyItems(name, in string, maximum int64, value interface{}) *Validation { +// TooManyItems error for when an array contains too many items. +func TooManyItems(name, in string, maximum int64, value any) *Validation { msg := fmt.Sprintf(maximumItemsFail, name, in, maximum) if in == "" { msg = fmt.Sprintf(maximumItemsFailNoIn, name, maximum) @@ -317,8 +325,8 @@ func TooManyItems(name, in string, maximum int64, value interface{}) *Validation } } -// TooFewItems error for when an array contains too few items -func TooFewItems(name, in string, minimum int64, value interface{}) *Validation { +// TooFewItems error for when an array contains too few items. +func TooFewItems(name, in string, minimum int64, value any) *Validation { msg := fmt.Sprintf(minItemsFail, name, in, minimum) if in == "" { msg = fmt.Sprintf(minItemsFailNoIn, name, minimum) @@ -332,8 +340,8 @@ func TooFewItems(name, in string, minimum int64, value interface{}) *Validation } } -// ExceedsMaximumInt error for when maximumimum validation fails -func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value interface{}) *Validation { +// ExceedsMaximumInt error for when maximum validation fails. +func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -357,8 +365,8 @@ func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value int } } -// ExceedsMaximumUint error for when maximumimum validation fails -func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value interface{}) *Validation { +// ExceedsMaximumUint error for when maximum validation fails. +func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -382,8 +390,8 @@ func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value i } } -// ExceedsMaximum error for when maximumimum validation fails -func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value interface{}) *Validation { +// ExceedsMaximum error for when maximum validation fails. +func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -407,8 +415,8 @@ func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value inte } } -// ExceedsMinimumInt error for when minimum validation fails -func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value interface{}) *Validation { +// ExceedsMinimumInt error for when minimum validation fails. +func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -432,8 +440,8 @@ func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value int } } -// ExceedsMinimumUint error for when minimum validation fails -func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value interface{}) *Validation { +// ExceedsMinimumUint error for when minimum validation fails. +func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -457,8 +465,8 @@ func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value i } } -// ExceedsMinimum error for when minimum validation fails -func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value interface{}) *Validation { +// ExceedsMinimum error for when minimum validation fails. +func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -482,8 +490,8 @@ func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value inte } } -// NotMultipleOf error for when multiple of validation fails -func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { +// NotMultipleOf error for when multiple of validation fails. +func NotMultipleOf(name, in string, multiple, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(multipleOfFailNoIn, name, multiple) @@ -499,8 +507,8 @@ func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { } } -// EnumFail error for when an enum validation fails -func EnumFail(name, in string, value interface{}, values []interface{}) *Validation { +// EnumFail error for when an enum validation fails. +func EnumFail(name, in string, value any, values []any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(enumFailNoIn, name, values) @@ -518,8 +526,8 @@ func EnumFail(name, in string, value interface{}, values []interface{}) *Validat } } -// Required error for when a value is missing -func Required(name, in string, value interface{}) *Validation { +// Required error for when a value is missing. +func Required(name, in string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(requiredFailNoIn, name) @@ -535,8 +543,8 @@ func Required(name, in string, value interface{}) *Validation { } } -// ReadOnly error for when a value is present in request -func ReadOnly(name, in string, value interface{}) *Validation { +// ReadOnly error for when a value is present in request. +func ReadOnly(name, in string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(readOnlyFailNoIn, name) @@ -552,8 +560,8 @@ func ReadOnly(name, in string, value interface{}) *Validation { } } -// TooLong error for when a string is too long -func TooLong(name, in string, maximum int64, value interface{}) *Validation { +// TooLong error for when a string is too long. +func TooLong(name, in string, maximum int64, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooLongMessageNoIn, name, maximum) @@ -569,8 +577,8 @@ func TooLong(name, in string, maximum int64, value interface{}) *Validation { } } -// TooShort error for when a string is too short -func TooShort(name, in string, minimum int64, value interface{}) *Validation { +// TooShort error for when a string is too short. +func TooShort(name, in string, minimum int64, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooShortMessageNoIn, name, minimum) @@ -589,7 +597,7 @@ func TooShort(name, in string, minimum int64, value interface{}) *Validation { // FailedPattern error for when a string fails a regex pattern match // the pattern that is returned is the ECMA syntax version of the pattern not the golang version. -func FailedPattern(name, in, pattern string, value interface{}) *Validation { +func FailedPattern(name, in, pattern string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(patternFailNoIn, name, pattern) @@ -607,8 +615,8 @@ func FailedPattern(name, in, pattern string, value interface{}) *Validation { } // MultipleOfMustBePositive error for when a -// multipleOf factor is negative -func MultipleOfMustBePositive(name, in string, factor interface{}) *Validation { +// multipleOf factor is negative. +func MultipleOfMustBePositive(name, in string, factor any) *Validation { return &Validation{ code: MultipleOfMustBePositiveCode, Name: name, diff --git a/vendor/github.com/go-openapi/jsonpointer/.cliff.toml b/vendor/github.com/go-openapi/jsonpointer/.cliff.toml new file mode 100644 index 00000000000..702629f5dc3 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.cliff.toml @@ -0,0 +1,181 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +header = """ +""" + +footer = """ + +----- + +**[{{ remote.github.repo }}]({{ self::remote_url() }}) license terms** + +[![License][license-badge]][license-url] + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: {{ self::remote_url() }}/?tab=Apache-2.0-1-ov-file#readme + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" + +body = """ +{%- if version %} +## [{{ version | trim_start_matches(pat="v") }}]({{ self::remote_url() }}/tree/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{%- else %} +## [unreleased] +{%- endif %} +{%- if message %} + {%- raw %}\n{% endraw %} +{{ message }} + {%- raw %}\n{% endraw %} +{%- endif %} +{%- if version %} + {%- if previous.version %} + +**Full Changelog**: <{{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}> + {%- endif %} +{%- else %} + {%- raw %}\n{% endraw %} +{%- endif %} + +{%- if statistics %}{% if statistics.commit_count %} + {%- raw %}\n{% endraw %} +{{ statistics.commit_count }} commits in this release. + {%- raw %}\n{% endraw %} +{%- endif %}{% endif %} +----- + +{%- for group, commits in commits | group_by(attribute="group") %} + {%- raw %}\n{% endraw %} +### {{ group | upper_first }} + {%- raw %}\n{% endraw %} + {%- for commit in commits %} + {%- if commit.remote.pr_title %} + {%- set commit_message = commit.remote.pr_title %} + {%- else %} + {%- set commit_message = commit.message %} + {%- endif %} +* {{ commit_message | split(pat="\n") | first | trim }} + {%- if commit.remote.username %} +{%- raw %} {% endraw %}by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) + {%- endif %} + {%- if commit.remote.pr_number %} +{%- raw %} {% endraw %}in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) + {%- endif %} +{%- raw %} {% endraw %}[...]({{ self::remote_url() }}/commit/{{ commit.id }}) + {%- endfor %} +{%- endfor %} + +{%- if github %} +{%- raw %}\n{% endraw -%} + {%- set all_contributors = github.contributors | length %} + {%- if github.contributors | filter(attribute="username", value="dependabot[bot]") | length < all_contributors %} +----- + +### People who contributed to this release + {% endif %} + {%- for contributor in github.contributors | filter(attribute="username") | sort(attribute="username") %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) + {%- endif %} + {%- endfor %} + + {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} +----- + {%- raw %}\n{% endraw %} + +### New Contributors + {%- endif %} + + {%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} + in [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} + {%- endif %} + {%- endfor %} +{%- endif %} + +{%- raw %}\n{% endraw %} + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" +# Remove leading and trailing whitespaces from the changelog's body. +trim = true +# Render body even when there are no releases to process. +render_always = true +# An array of regex based postprocessors to modify the changelog. +postprocessors = [ + # Replace the placeholder with a URL. + #{ pattern = '', replace = "https://github.com/orhun/git-cliff" }, +] +# output file path +# output = "test.md" + +[git] +# Parse commits according to the conventional commits specification. +# See https://www.conventionalcommits.org +conventional_commits = false +# Exclude commits that do not match the conventional commits specification. +filter_unconventional = false +# Require all commits to be conventional. +# Takes precedence over filter_unconventional. +require_conventional = false +# Split commits on newlines, treating each line as an individual commit. +split_commits = false +# An array of regex based parsers to modify commit messages prior to further processing. +commit_preprocessors = [ + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit message using https://github.com/crate-ci/typos. + # If the spelling is incorrect, it will be fixed automatically. + #{ pattern = '.*', replace_command = 'typos --write-changes -' } +] +# Prevent commits that are breaking from being excluded by commit parsers. +protect_breaking_commits = false +# An array of regex based parsers for extracting data from the commit message. +# Assigns commits to groups. +# Optionally sets the commit's scope and can decide to exclude commits from further processing. +commit_parsers = [ + { message = "^[Cc]hore\\([Rr]elease\\): prepare for", skip = true }, + { message = "(^[Mm]erge)|([Mm]erge conflict)", skip = true }, + { field = "author.name", pattern = "dependabot*", group = "Updates" }, + { message = "([Ss]ecurity)|([Vv]uln)", group = "Security" }, + { body = "(.*[Ss]ecurity)|([Vv]uln)", group = "Security" }, + { message = "([Cc]hore\\(lint\\))|(style)|(lint)|(codeql)|(golangci)", group = "Code quality" }, + { message = "(^[Dd]oc)|((?i)readme)|(badge)|(typo)|(documentation)", group = "Documentation" }, + { message = "(^[Ff]eat)|(^[Ee]nhancement)", group = "Implemented enhancements" }, + { message = "(^ci)|(\\(ci\\))|(fixup\\s+ci)|(fix\\s+ci)|(license)|(example)", group = "Miscellaneous tasks" }, + { message = "^test", group = "Testing" }, + { message = "(^fix)|(panic)", group = "Fixed bugs" }, + { message = "(^refact)|(rework)", group = "Refactor" }, + { message = "(^[Pp]erf)|(performance)", group = "Performance" }, + { message = "(^[Cc]hore)", group = "Miscellaneous tasks" }, + { message = "^[Rr]evert", group = "Reverted changes" }, + { message = "(upgrade.*?go)|(go\\s+version)", group = "Updates" }, + { message = ".*", group = "Other" }, +] +# Exclude commits that are not matched by any commit parser. +filter_commits = false +# An array of link parsers for extracting external references, and turning them into URLs, using regex. +link_parsers = [] +# Include only the tags that belong to the current branch. +use_branch_tags = false +# Order releases topologically instead of chronologically. +topo_order = false +# Order releases topologically instead of chronologically. +topo_order_commits = true +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest +sort_commits = "newest" +# Process submodules commits +recurse_submodules = false + +#[remote.github] +#owner = "go-openapi" diff --git a/vendor/github.com/go-openapi/jsonpointer/.gitignore b/vendor/github.com/go-openapi/jsonpointer/.gitignore index 769c244007b..59cd2948915 100644 --- a/vendor/github.com/go-openapi/jsonpointer/.gitignore +++ b/vendor/github.com/go-openapi/jsonpointer/.gitignore @@ -1 +1,4 @@ -secrets.yml +*.out +*.cov +.idea +.env diff --git a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml index 7cea1af8b52..fdae591bce7 100644 --- a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml +++ b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml @@ -2,34 +2,17 @@ version: "2" linters: default: all disable: - - cyclop - depguard - - errchkjson - - errorlint - - exhaustruct - - forcetypeassert - funlen - - gochecknoglobals - - gochecknoinits - - gocognit - - godot - godox - - gosmopolitan - - inamedparam - #- intrange # disabled while < go1.22 - - ireturn - - lll - - musttag - - nestif + - exhaustruct - nlreturn - nonamedreturns - noinlineerr - paralleltest - recvcheck - testpackage - - thelper - tparallel - - unparam - varnamelen - whitespace - wrapcheck @@ -41,8 +24,15 @@ linters: goconst: min-len: 2 min-occurrences: 3 + cyclop: + max-complexity: 20 gocyclo: - min-complexity: 45 + min-complexity: 20 + exhaustive: + default-signifies-exhaustive: true + default-case-required: true + lll: + line-length: 180 exclusions: generated: lax presets: @@ -58,6 +48,7 @@ formatters: enable: - gofmt - goimports + - gofumpt exclusions: generated: lax paths: diff --git a/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md b/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md new file mode 100644 index 00000000000..03c098316d4 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md @@ -0,0 +1,24 @@ +# Contributors + +- Repository: ['go-openapi/jsonpointer'] + +| Total Contributors | Total Contributions | +| --- | --- | +| 12 | 95 | + +| Username | All Time Contribution Count | All Commits | +| --- | --- | --- | +| @fredbi | 48 | https://github.com/go-openapi/jsonpointer/commits?author=fredbi | +| @casualjim | 33 | https://github.com/go-openapi/jsonpointer/commits?author=casualjim | +| @magodo | 3 | https://github.com/go-openapi/jsonpointer/commits?author=magodo | +| @youyuanwu | 3 | https://github.com/go-openapi/jsonpointer/commits?author=youyuanwu | +| @gaiaz-iusipov | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gaiaz-iusipov | +| @gbjk | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gbjk | +| @gordallott | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gordallott | +| @ianlancetaylor | 1 | https://github.com/go-openapi/jsonpointer/commits?author=ianlancetaylor | +| @mfleader | 1 | https://github.com/go-openapi/jsonpointer/commits?author=mfleader | +| @Neo2308 | 1 | https://github.com/go-openapi/jsonpointer/commits?author=Neo2308 | +| @olivierlemasle | 1 | https://github.com/go-openapi/jsonpointer/commits?author=olivierlemasle | +| @testwill | 1 | https://github.com/go-openapi/jsonpointer/commits?author=testwill | + + _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ diff --git a/vendor/github.com/go-openapi/jsonpointer/LICENSE b/vendor/github.com/go-openapi/jsonpointer/LICENSE index d6456956733..261eeb9e9f8 100644 --- a/vendor/github.com/go-openapi/jsonpointer/LICENSE +++ b/vendor/github.com/go-openapi/jsonpointer/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/vendor/github.com/go-openapi/jsonpointer/NOTICE b/vendor/github.com/go-openapi/jsonpointer/NOTICE new file mode 100644 index 00000000000..f3b51939a95 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/NOTICE @@ -0,0 +1,39 @@ +Copyright 2015-2025 go-swagger maintainers + +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +This software library, github.com/go-openapi/jsonpointer, includes software developed +by the go-swagger and go-openapi maintainers ("go-swagger maintainers"). + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this software except in compliance with the License. + +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0. + +This software is copied from, derived from, and inspired by other original software products. +It ships with copies of other software which license terms are recalled below. + +The original software was authored on 25-02-2013 by sigu-399 (https://github.com/sigu-399, sigu.399@gmail.com). + +github.com/sigh-399/jsonpointer +=========================== + +// SPDX-FileCopyrightText: Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// SPDX-License-Identifier: Apache-2.0 + +Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) + +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-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md index 45bd31b14fc..b61b63fd9af 100644 --- a/vendor/github.com/go-openapi/jsonpointer/README.md +++ b/vendor/github.com/go-openapi/jsonpointer/README.md @@ -1,16 +1,78 @@ -# gojsonpointer [![Build Status](https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonpointer/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) +# jsonpointer -[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) -[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer.svg)](https://pkg.go.dev/github.com/go-openapi/jsonpointer) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonpointer)](https://goreportcard.com/report/github.com/go-openapi/jsonpointer) + +[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url] + + + +[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url] + + +[![GoDoc][godoc-badge]][godoc-url] [![Slack Channel][slack-logo]![slack-badge]][slack-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge] -An implementation of JSON Pointer - Go language +--- + +An implementation of JSON Pointer for golang, which supports go `struct`. ## Status -Completed YES -Tested YES +API is stable. + +## Import this library in your project + +```cmd +go get github.com/go-openapi/jsonpointer +``` + +## Basic usage + +See also some [examples](./examples_test.go) + +### Retrieving a value + +```go + import ( + "github.com/go-openapi/jsonpointer" + ) + + + var doc any + + ... + + pointer, err := jsonpointer.New("/foo/1") + if err != nil { + ... // error: e.g. invalid JSON pointer specification + } + + value, kind, err := pointer.Get(doc) + if err != nil { + ... // error: e.g. key not found, index out of bounds, etc. + } + + ... +``` + +### Setting a value + +```go + ... + var doc any + ... + pointer, err := jsonpointer.New("/foo/1") + if err != nil { + ... // error: e.g. invalid JSON pointer specification + } + + doc, err = p.Set(doc, "value") + if err != nil { + ... // error: e.g. key not found, index out of bounds, etc. + } +``` + +## Change log + +See ## References @@ -18,9 +80,70 @@ Tested YES also known as [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) -### Note +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + +See the license [NOTICE](./NOTICE), which recalls the licensing terms of all the pieces of software +on top of which it has been built. + +## Limitations + +The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, +the reference token MUST contain either...' is not implemented. + +That is because our implementation of the JSON pointer only supports explicit references to array elements: +the provision in the spec to resolve non-existent members as "the last element in the array", +using the special trailing character "-" is not implemented. + +## Other documentation + +* [All-time contributors](./CONTRIBUTORS.md) +* [Contributing guidelines](.github/CONTRIBUTING.md) +* [Maintainers documentation](docs/MAINTAINERS.md) +* [Code style](docs/STYLE.md) + +## Cutting a new release + +Maintainers can cut a new release by either: -The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. +* running [this workflow](https://github.com/go-openapi/jsonpointer/actions/workflows/bump-release.yml) +* or pushing a semver tag + * signed tags are preferred + * The tag message is prepended to release notes -That is because our implementation of the JSON pointer only supports explicit references to array elements: the provision in the spec -to resolve non-existent members as "the last element in the array", using the special trailing character "-". + +[test-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg +[test-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml +[cov-badge]: https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg +[cov-url]: https://codecov.io/gh/go-openapi/jsonpointer +[vuln-scan-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/scanner.yml/badge.svg +[vuln-scan-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/scanner.yml +[codeql-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml/badge.svg +[codeql-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml + +[release-badge]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer.svg +[release-url]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer +[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg +[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer + +[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/jsonpointer +[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/jsonpointer +[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/jsonpointer +[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/jsonpointer + +[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F +[doc-url]: https://goswagger.io/go-openapi +[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer +[godoc-url]: http://pkg.go.dev/github.com/go-openapi/jsonpointer +[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png +[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM +[slack-url]: https://goswagger.slack.com/archives/C04R30YMU + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: https://github.com/go-openapi/jsonpointer/?tab=Apache-2.0-1-ov-file#readme + +[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/jsonpointer +[goversion-url]: https://github.com/go-openapi/jsonpointer/blob/master/go.mod +[top-badge]: https://img.shields.io/github/languages/top/go-openapi/jsonpointer +[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/jsonpointer/latest diff --git a/vendor/github.com/go-openapi/jsonpointer/SECURITY.md b/vendor/github.com/go-openapi/jsonpointer/SECURITY.md new file mode 100644 index 00000000000..2a7b6f0910d --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This policy outlines the commitment and practices of the go-openapi maintainers regarding security. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.22.x | :white_check_mark: | + +## Reporting a vulnerability + +If you become aware of a security vulnerability that affects the current repository, +please report it privately to the maintainers. + +Please follow the instructions provided by github to +[Privately report a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). + +TL;DR: on Github, navigate to the project's "Security" tab then click on "Report a vulnerability". diff --git a/vendor/github.com/go-openapi/jsonpointer/errors.go b/vendor/github.com/go-openapi/jsonpointer/errors.go index b84343d9d74..8c50dde8bcf 100644 --- a/vendor/github.com/go-openapi/jsonpointer/errors.go +++ b/vendor/github.com/go-openapi/jsonpointer/errors.go @@ -1,5 +1,10 @@ +// SPDX-FileCopyrightText: Copyright (c) 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package jsonpointer +import "fmt" + type pointerError string func (e pointerError) Error() string { @@ -7,12 +12,24 @@ func (e pointerError) Error() string { } const ( - // ErrPointer is an error raised by the jsonpointer package + // ErrPointer is a sentinel error raised by all errors from this package. ErrPointer pointerError = "JSON pointer error" - // ErrInvalidStart states that a JSON pointer must start with a separator ("/") + // ErrInvalidStart states that a JSON pointer must start with a separator ("/"). ErrInvalidStart pointerError = `JSON pointer must be empty or start with a "` + pointerSeparator - // ErrUnsupportedValueType indicates that a value of the wrong type is being set + // ErrUnsupportedValueType indicates that a value of the wrong type is being set. ErrUnsupportedValueType pointerError = "only structs, pointers, maps and slices are supported for setting values" ) + +func errNoKey(key string) error { + return fmt.Errorf("object has no key %q: %w", key, ErrPointer) +} + +func errOutOfBounds(length, idx int) error { + return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", length-1, idx, ErrPointer) +} + +func errInvalidReference(token string) error { + return fmt.Errorf("invalid token reference %q: %w", token, ErrPointer) +} diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go index 7513c4763ba..7df49af3b96 100644 --- a/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -1,28 +1,7 @@ -// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) -// -// 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. - -// author sigu-399 -// author-github https://github.com/sigu-399 -// author-mail sigu.399@gmail.com -// -// repository-name jsonpointer -// repository-desc An implementation of JSON Pointer - Go language -// -// description Main and unique file. -// -// created 25-02-2013 +// SPDX-FileCopyrightText: Copyright (c) 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 +// Package jsonpointer provides a golang implementation for json pointers. package jsonpointer import ( @@ -41,29 +20,47 @@ const ( pointerSeparator = `/` ) -var ( - jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() - jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() -) - -// JSONPointable is an interface for structs to implement when they need to customize the -// json pointer process +// JSONPointable is an interface for structs to implement, +// when they need to customize the json pointer process or want to avoid the use of reflection. type JSONPointable interface { - JSONLookup(string) (any, error) + // JSONLookup returns a value pointed at this (unescaped) key. + JSONLookup(key string) (any, error) } -// JSONSetable is an interface for structs to implement when they need to customize the -// json pointer process +// JSONSetable is an interface for structs to implement, +// when they need to customize the json pointer process or want to avoid the use of reflection. type JSONSetable interface { - JSONSet(string, any) error + // JSONSet sets the value pointed at the (unescaped) key. + JSONSet(key string, value any) error } -// Pointer is a representation of a json pointer +// Pointer is a representation of a json pointer. +// +// Use [Pointer.Get] to retrieve a value or [Pointer.Set] to set a value. +// +// It works with any go type interpreted as a JSON document, which means: +// +// - if a type implements [JSONPointable], its [JSONPointable.JSONLookup] method is used to resolve [Pointer.Get] +// - if a type implements [JSONSetable], its [JSONPointable.JSONSet] method is used to resolve [Pointer.Set] +// - a go map[K]V is interpreted as an object, with type K assignable to a string +// - a go slice []T is interpreted as an array +// - a go struct is interpreted as an object, with exported fields interpreted as keys +// - promoted fields from an embedded struct are traversed +// - scalars (e.g. int, float64 ...), channels, functions and go arrays cannot be traversed +// +// For struct s resolved by reflection, key mappings honor the conventional struct tag `json`. +// +// Fields that do not specify a `json` tag, or specify an empty one, or are tagged as `json:"-"` are ignored. +// +// # Limitations +// +// - Unlike go standard marshaling, untagged fields do not default to the go field name and are ignored. +// - anonymous fields are not traversed if untagged type Pointer struct { referenceTokens []string } -// New creates a new json pointer for the given string +// New creates a new json pointer from its string representation. func New(jsonPointerString string) (Pointer, error) { var p Pointer err := p.parse(jsonPointerString) @@ -71,34 +68,40 @@ func New(jsonPointerString string) (Pointer, error) { return p, err } -// Get uses the pointer to retrieve a value from a JSON document +// Get uses the pointer to retrieve a value from a JSON document. +// +// It returns the value with its type as a [reflect.Kind] or an error. func (p *Pointer) Get(document any) (any, reflect.Kind, error) { return p.get(document, jsonname.DefaultJSONNameProvider) } -// Set uses the pointer to set a value from a JSON document +// Set uses the pointer to set a value from a data type +// that represent a JSON document. +// +// It returns the updated document. func (p *Pointer) Set(document any, value any) (any, error) { return document, p.set(document, value, jsonname.DefaultJSONNameProvider) } -// DecodedTokens returns the decoded tokens of this JSON pointer +// DecodedTokens returns the decoded (unescaped) tokens of this JSON pointer. func (p *Pointer) DecodedTokens() []string { result := make([]string, 0, len(p.referenceTokens)) - for _, t := range p.referenceTokens { - result = append(result, Unescape(t)) + for _, token := range p.referenceTokens { + result = append(result, Unescape(token)) } + return result } -// IsEmpty returns true if this is an empty json pointer -// this indicates that it points to the root document +// IsEmpty returns true if this is an empty json pointer. +// +// This indicates that it points to the root document. func (p *Pointer) IsEmpty() bool { return len(p.referenceTokens) == 0 } -// Pointer to string representation function +// String representation of a pointer. func (p *Pointer) String() string { - if len(p.referenceTokens) == 0 { return emptyPointer } @@ -137,20 +140,21 @@ func (p *Pointer) Offset(document string) (int64, error) { return offset, nil } -// "Constructor", parses the given string JSON pointer +// "Constructor", parses the given string JSON pointer. func (p *Pointer) parse(jsonPointerString string) error { - var err error - - if jsonPointerString != emptyPointer { - if !strings.HasPrefix(jsonPointerString, pointerSeparator) { - err = errors.Join(ErrInvalidStart, ErrPointer) - } else { - referenceTokens := strings.Split(jsonPointerString, pointerSeparator) - p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) - } + if jsonPointerString == emptyPointer { + return nil + } + + if !strings.HasPrefix(jsonPointerString, pointerSeparator) { + // non empty pointer must start with "/" + return errors.Join(ErrInvalidStart, ErrPointer) } - return err + referenceTokens := strings.Split(jsonPointerString, pointerSeparator) + p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) + + return nil } func (p *Pointer) get(node any, nameProvider *jsonname.NameProvider) (any, reflect.Kind, error) { @@ -160,7 +164,7 @@ func (p *Pointer) get(node any, nameProvider *jsonname.NameProvider) (any, refle kind := reflect.Invalid - // Full document when empty + // full document when empty if len(p.referenceTokens) == 0 { return node, kind, nil } @@ -186,101 +190,103 @@ func (p *Pointer) set(node, data any, nameProvider *jsonname.NameProvider) error if knd != reflect.Pointer && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { return errors.Join( + fmt.Errorf("unexpected type: %T", node), //nolint:err113 // err wrapping is carried out by errors.Join, not fmt.Errorf. ErrUnsupportedValueType, ErrPointer, ) } + l := len(p.referenceTokens) + + // full document when empty + if l == 0 { + return nil + } + if nameProvider == nil { nameProvider = jsonname.DefaultJSONNameProvider } - // Full document when empty - if len(p.referenceTokens) == 0 { - return nil + var decodedToken string + lastIndex := l - 1 + + if lastIndex > 0 { // skip if we only have one token in pointer + for _, token := range p.referenceTokens[:lastIndex] { + decodedToken = Unescape(token) + next, err := p.resolveNodeForToken(node, decodedToken, nameProvider) + if err != nil { + return err + } + + node = next + } } - lastI := len(p.referenceTokens) - 1 - for i, token := range p.referenceTokens { - isLastToken := i == lastI - decodedToken := Unescape(token) + // last token + decodedToken = Unescape(p.referenceTokens[lastIndex]) - if isLastToken { + return setSingleImpl(node, data, decodedToken, nameProvider) +} - return setSingleImpl(node, data, decodedToken, nameProvider) +func (p *Pointer) resolveNodeForToken(node any, decodedToken string, nameProvider *jsonname.NameProvider) (next any, err error) { + // check for nil during traversal + if isNil(node) { + return nil, fmt.Errorf("cannot traverse through nil value at %q: %w", decodedToken, ErrPointer) + } + + pointable, ok := node.(JSONPointable) + if ok { + r, err := pointable.JSONLookup(decodedToken) + if err != nil { + return nil, err } - // Check for nil during traversal - if isNil(node) { - return fmt.Errorf("cannot traverse through nil value at %q: %w", decodedToken, ErrPointer) + fld := reflect.ValueOf(r) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Pointer { + return fld.Addr().Interface(), nil } - rValue := reflect.Indirect(reflect.ValueOf(node)) - kind := rValue.Kind() + return r, nil + } - if rValue.Type().Implements(jsonPointableType) { - r, err := node.(JSONPointable).JSONLookup(decodedToken) - if err != nil { - return err - } - fld := reflect.ValueOf(r) - if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Pointer { - node = fld.Addr().Interface() - continue - } - node = r - continue + rValue := reflect.Indirect(reflect.ValueOf(node)) + kind := rValue.Kind() + + switch kind { + case reflect.Struct: + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return nil, fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) } - switch kind { //nolint:exhaustive - case reflect.Struct: - nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) - if !ok { - return fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) - } - fld := rValue.FieldByName(nm) - if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Pointer { - node = fld.Addr().Interface() - continue - } - node = fld.Interface() + return typeFromValue(rValue.FieldByName(nm)), nil - case reflect.Map: - kv := reflect.ValueOf(decodedToken) - mv := rValue.MapIndex(kv) + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + mv := rValue.MapIndex(kv) - if !mv.IsValid() { - return fmt.Errorf("object has no key %q: %w", decodedToken, ErrPointer) - } - if mv.CanAddr() && mv.Kind() != reflect.Interface && mv.Kind() != reflect.Map && mv.Kind() != reflect.Slice && mv.Kind() != reflect.Pointer { - node = mv.Addr().Interface() - continue - } - node = mv.Interface() + if !mv.IsValid() { + return nil, errNoKey(decodedToken) + } - case reflect.Slice: - tokenIndex, err := strconv.Atoi(decodedToken) - if err != nil { - return err - } - sLength := rValue.Len() - if tokenIndex < 0 || tokenIndex >= sLength { - return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength, tokenIndex, ErrPointer) - } + return typeFromValue(mv), nil - elem := rValue.Index(tokenIndex) - if elem.CanAddr() && elem.Kind() != reflect.Interface && elem.Kind() != reflect.Map && elem.Kind() != reflect.Slice && elem.Kind() != reflect.Pointer { - node = elem.Addr().Interface() - continue - } - node = elem.Interface() + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return nil, errors.Join(err, ErrPointer) + } - default: - return fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer) + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return nil, errOutOfBounds(sLength, tokenIndex) } - } - return nil + return typeFromValue(rValue.Index(tokenIndex)), nil + + default: + return nil, errInvalidReference(decodedToken) + } } func isNil(input any) bool { @@ -289,7 +295,7 @@ func isNil(input any) bool { } kind := reflect.TypeOf(input).Kind() - switch kind { //nolint:exhaustive + switch kind { case reflect.Pointer, reflect.Map, reflect.Slice, reflect.Chan: return reflect.ValueOf(input).IsNil() default: @@ -297,12 +303,20 @@ func isNil(input any) bool { } } -// GetForToken gets a value for a json pointer token 1 level deep +func typeFromValue(v reflect.Value) any { + if v.CanAddr() && v.Kind() != reflect.Interface && v.Kind() != reflect.Map && v.Kind() != reflect.Slice && v.Kind() != reflect.Pointer { + return v.Addr().Interface() + } + + return v.Interface() +} + +// GetForToken gets a value for a json pointer token 1 level deep. func GetForToken(document any, decodedToken string) (any, reflect.Kind, error) { return getSingleImpl(document, decodedToken, jsonname.DefaultJSONNameProvider) } -// SetForToken gets a value for a json pointer token 1 level deep +// SetForToken sets a value for a json pointer token 1 level deep. func SetForToken(document any, decodedToken string, value any) (any, error) { return document, setSingleImpl(document, value, decodedToken, jsonname.DefaultJSONNameProvider) } @@ -325,13 +339,15 @@ func getSingleImpl(node any, decodedToken string, nameProvider *jsonname.NamePro return getSingleImpl(*typed, decodedToken, nameProvider) } - switch kind { //nolint:exhaustive + switch kind { case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return nil, kind, fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) } + fld := rValue.FieldByName(nm) + return fld.Interface(), kind, nil case reflect.Map: @@ -341,78 +357,99 @@ func getSingleImpl(node any, decodedToken string, nameProvider *jsonname.NamePro if mv.IsValid() { return mv.Interface(), kind, nil } - return nil, kind, fmt.Errorf("object has no key %q: %w", decodedToken, ErrPointer) + + return nil, kind, errNoKey(decodedToken) case reflect.Slice: tokenIndex, err := strconv.Atoi(decodedToken) if err != nil { - return nil, kind, err + return nil, kind, errors.Join(err, ErrPointer) } sLength := rValue.Len() if tokenIndex < 0 || tokenIndex >= sLength { - return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength-1, tokenIndex, ErrPointer) + return nil, kind, errOutOfBounds(sLength, tokenIndex) } elem := rValue.Index(tokenIndex) return elem.Interface(), kind, nil default: - return nil, kind, fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer) + return nil, kind, errInvalidReference(decodedToken) } } func setSingleImpl(node, data any, decodedToken string, nameProvider *jsonname.NameProvider) error { - rValue := reflect.Indirect(reflect.ValueOf(node)) - - // Check for nil to prevent panic when calling rValue.Type() + // check for nil to prevent panic when calling rValue.Type() if isNil(node) { return fmt.Errorf("cannot set field %q on nil value: %w", decodedToken, ErrPointer) } - if ns, ok := node.(JSONSetable); ok { // pointer impl + if ns, ok := node.(JSONSetable); ok { return ns.JSONSet(decodedToken, data) } - if rValue.Type().Implements(jsonSetableType) { - return node.(JSONSetable).JSONSet(decodedToken, data) - } + rValue := reflect.Indirect(reflect.ValueOf(node)) - switch rValue.Kind() { //nolint:exhaustive + switch rValue.Kind() { case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) } + fld := rValue.FieldByName(nm) - if fld.IsValid() { - fld.Set(reflect.ValueOf(data)) + if !fld.CanSet() { + return fmt.Errorf("can't set struct field %s to %v: %w", nm, data, ErrPointer) + } + + value := reflect.ValueOf(data) + valueType := value.Type() + assignedType := fld.Type() + + if !valueType.AssignableTo(assignedType) { + return fmt.Errorf("can't set value with type %T to field %s with type %v: %w", data, nm, assignedType, ErrPointer) } + + fld.Set(value) + return nil case reflect.Map: kv := reflect.ValueOf(decodedToken) rValue.SetMapIndex(kv, reflect.ValueOf(data)) + return nil case reflect.Slice: tokenIndex, err := strconv.Atoi(decodedToken) if err != nil { - return err + return errors.Join(err, ErrPointer) } + sLength := rValue.Len() if tokenIndex < 0 || tokenIndex >= sLength { - return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength, tokenIndex, ErrPointer) + return errOutOfBounds(sLength, tokenIndex) } elem := rValue.Index(tokenIndex) if !elem.CanSet() { return fmt.Errorf("can't set slice index %s to %v: %w", decodedToken, data, ErrPointer) } - elem.Set(reflect.ValueOf(data)) + + value := reflect.ValueOf(data) + valueType := value.Type() + assignedType := elem.Type() + + if !valueType.AssignableTo(assignedType) { + return fmt.Errorf("can't set value with type %T to slice element %d with type %v: %w", data, tokenIndex, assignedType, ErrPointer) + } + + elem.Set(value) + return nil default: - return fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer) + return errInvalidReference(decodedToken) } } @@ -443,13 +480,14 @@ func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) { return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer) } } + return 0, fmt.Errorf("token reference %q not found: %w", decodedToken, ErrPointer) } func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { idx, err := strconv.Atoi(decodedToken) if err != nil { - return 0, fmt.Errorf("token reference %q is not a number: %v: %w", decodedToken, err, ErrPointer) + return 0, fmt.Errorf("token reference %q is not a number: %w: %w", decodedToken, err, ErrPointer) } var i int for i = 0; i < idx && dec.More(); i++ { @@ -475,10 +513,12 @@ func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { if !dec.More() { return 0, fmt.Errorf("token reference %q not found: %w", decodedToken, ErrPointer) } + return dec.InputOffset(), nil } // drainSingle drains a single level of object or array. +// // The decoder has to guarantee the beginning delim (i.e. '{' or '[') has been consumed. func drainSingle(dec *json.Decoder) error { for dec.More() { @@ -500,14 +540,15 @@ func drainSingle(dec *json.Decoder) error { } } - // Consumes the ending delim + // consumes the ending delim if _, err := dec.Token(); err != nil { return err } + return nil } -// Specific JSON pointer encoding here +// JSON pointer encoding: // ~0 => ~ // ~1 => / // ... and vice versa @@ -520,16 +561,23 @@ const ( ) var ( - encRefTokReplacer = strings.NewReplacer(encRefTok1, decRefTok1, encRefTok0, decRefTok0) - decRefTokReplacer = strings.NewReplacer(decRefTok1, encRefTok1, decRefTok0, encRefTok0) + encRefTokReplacer = strings.NewReplacer(encRefTok1, decRefTok1, encRefTok0, decRefTok0) //nolint:gochecknoglobals // it's okay to declare a replacer as a private global + decRefTokReplacer = strings.NewReplacer(decRefTok1, encRefTok1, decRefTok0, encRefTok0) //nolint:gochecknoglobals // it's okay to declare a replacer as a private global ) -// Unescape unescapes a json pointer reference token string to the original representation +// Unescape unescapes a json pointer reference token string to the original representation. func Unescape(token string) string { return encRefTokReplacer.Replace(token) } -// Escape escapes a pointer reference token string +// Escape escapes a pointer reference token string. +// +// The JSONPointer specification defines "/" as a separator and "~" as an escape prefix. +// +// Keys containing such characters are escaped with the following rules: +// +// - "~" is escaped as "~0" +// - "/" is escaped as "~1" func Escape(token string) string { return decRefTokReplacer.Replace(token) } diff --git a/vendor/github.com/go-openapi/jsonreference/.cliff.toml b/vendor/github.com/go-openapi/jsonreference/.cliff.toml new file mode 100644 index 00000000000..702629f5dc3 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/.cliff.toml @@ -0,0 +1,181 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +header = """ +""" + +footer = """ + +----- + +**[{{ remote.github.repo }}]({{ self::remote_url() }}) license terms** + +[![License][license-badge]][license-url] + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: {{ self::remote_url() }}/?tab=Apache-2.0-1-ov-file#readme + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" + +body = """ +{%- if version %} +## [{{ version | trim_start_matches(pat="v") }}]({{ self::remote_url() }}/tree/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{%- else %} +## [unreleased] +{%- endif %} +{%- if message %} + {%- raw %}\n{% endraw %} +{{ message }} + {%- raw %}\n{% endraw %} +{%- endif %} +{%- if version %} + {%- if previous.version %} + +**Full Changelog**: <{{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}> + {%- endif %} +{%- else %} + {%- raw %}\n{% endraw %} +{%- endif %} + +{%- if statistics %}{% if statistics.commit_count %} + {%- raw %}\n{% endraw %} +{{ statistics.commit_count }} commits in this release. + {%- raw %}\n{% endraw %} +{%- endif %}{% endif %} +----- + +{%- for group, commits in commits | group_by(attribute="group") %} + {%- raw %}\n{% endraw %} +### {{ group | upper_first }} + {%- raw %}\n{% endraw %} + {%- for commit in commits %} + {%- if commit.remote.pr_title %} + {%- set commit_message = commit.remote.pr_title %} + {%- else %} + {%- set commit_message = commit.message %} + {%- endif %} +* {{ commit_message | split(pat="\n") | first | trim }} + {%- if commit.remote.username %} +{%- raw %} {% endraw %}by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) + {%- endif %} + {%- if commit.remote.pr_number %} +{%- raw %} {% endraw %}in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) + {%- endif %} +{%- raw %} {% endraw %}[...]({{ self::remote_url() }}/commit/{{ commit.id }}) + {%- endfor %} +{%- endfor %} + +{%- if github %} +{%- raw %}\n{% endraw -%} + {%- set all_contributors = github.contributors | length %} + {%- if github.contributors | filter(attribute="username", value="dependabot[bot]") | length < all_contributors %} +----- + +### People who contributed to this release + {% endif %} + {%- for contributor in github.contributors | filter(attribute="username") | sort(attribute="username") %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) + {%- endif %} + {%- endfor %} + + {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} +----- + {%- raw %}\n{% endraw %} + +### New Contributors + {%- endif %} + + {%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} +* @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} + in [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} + {%- endif %} + {%- endfor %} +{%- endif %} + +{%- raw %}\n{% endraw %} + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" +# Remove leading and trailing whitespaces from the changelog's body. +trim = true +# Render body even when there are no releases to process. +render_always = true +# An array of regex based postprocessors to modify the changelog. +postprocessors = [ + # Replace the placeholder with a URL. + #{ pattern = '', replace = "https://github.com/orhun/git-cliff" }, +] +# output file path +# output = "test.md" + +[git] +# Parse commits according to the conventional commits specification. +# See https://www.conventionalcommits.org +conventional_commits = false +# Exclude commits that do not match the conventional commits specification. +filter_unconventional = false +# Require all commits to be conventional. +# Takes precedence over filter_unconventional. +require_conventional = false +# Split commits on newlines, treating each line as an individual commit. +split_commits = false +# An array of regex based parsers to modify commit messages prior to further processing. +commit_preprocessors = [ + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit message using https://github.com/crate-ci/typos. + # If the spelling is incorrect, it will be fixed automatically. + #{ pattern = '.*', replace_command = 'typos --write-changes -' } +] +# Prevent commits that are breaking from being excluded by commit parsers. +protect_breaking_commits = false +# An array of regex based parsers for extracting data from the commit message. +# Assigns commits to groups. +# Optionally sets the commit's scope and can decide to exclude commits from further processing. +commit_parsers = [ + { message = "^[Cc]hore\\([Rr]elease\\): prepare for", skip = true }, + { message = "(^[Mm]erge)|([Mm]erge conflict)", skip = true }, + { field = "author.name", pattern = "dependabot*", group = "Updates" }, + { message = "([Ss]ecurity)|([Vv]uln)", group = "Security" }, + { body = "(.*[Ss]ecurity)|([Vv]uln)", group = "Security" }, + { message = "([Cc]hore\\(lint\\))|(style)|(lint)|(codeql)|(golangci)", group = "Code quality" }, + { message = "(^[Dd]oc)|((?i)readme)|(badge)|(typo)|(documentation)", group = "Documentation" }, + { message = "(^[Ff]eat)|(^[Ee]nhancement)", group = "Implemented enhancements" }, + { message = "(^ci)|(\\(ci\\))|(fixup\\s+ci)|(fix\\s+ci)|(license)|(example)", group = "Miscellaneous tasks" }, + { message = "^test", group = "Testing" }, + { message = "(^fix)|(panic)", group = "Fixed bugs" }, + { message = "(^refact)|(rework)", group = "Refactor" }, + { message = "(^[Pp]erf)|(performance)", group = "Performance" }, + { message = "(^[Cc]hore)", group = "Miscellaneous tasks" }, + { message = "^[Rr]evert", group = "Reverted changes" }, + { message = "(upgrade.*?go)|(go\\s+version)", group = "Updates" }, + { message = ".*", group = "Other" }, +] +# Exclude commits that are not matched by any commit parser. +filter_commits = false +# An array of link parsers for extracting external references, and turning them into URLs, using regex. +link_parsers = [] +# Include only the tags that belong to the current branch. +use_branch_tags = false +# Order releases topologically instead of chronologically. +topo_order = false +# Order releases topologically instead of chronologically. +topo_order_commits = true +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest +sort_commits = "newest" +# Process submodules commits +recurse_submodules = false + +#[remote.github] +#owner = "go-openapi" diff --git a/vendor/github.com/go-openapi/jsonreference/.editorconfig b/vendor/github.com/go-openapi/jsonreference/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/jsonreference/.golangci.yml b/vendor/github.com/go-openapi/jsonreference/.golangci.yml index 7cea1af8b52..fdae591bce7 100644 --- a/vendor/github.com/go-openapi/jsonreference/.golangci.yml +++ b/vendor/github.com/go-openapi/jsonreference/.golangci.yml @@ -2,34 +2,17 @@ version: "2" linters: default: all disable: - - cyclop - depguard - - errchkjson - - errorlint - - exhaustruct - - forcetypeassert - funlen - - gochecknoglobals - - gochecknoinits - - gocognit - - godot - godox - - gosmopolitan - - inamedparam - #- intrange # disabled while < go1.22 - - ireturn - - lll - - musttag - - nestif + - exhaustruct - nlreturn - nonamedreturns - noinlineerr - paralleltest - recvcheck - testpackage - - thelper - tparallel - - unparam - varnamelen - whitespace - wrapcheck @@ -41,8 +24,15 @@ linters: goconst: min-len: 2 min-occurrences: 3 + cyclop: + max-complexity: 20 gocyclo: - min-complexity: 45 + min-complexity: 20 + exhaustive: + default-signifies-exhaustive: true + default-case-required: true + lll: + line-length: 180 exclusions: generated: lax presets: @@ -58,6 +48,7 @@ formatters: enable: - gofmt - goimports + - gofumpt exclusions: generated: lax paths: diff --git a/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md b/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md new file mode 100644 index 00000000000..9907d5d2124 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md @@ -0,0 +1,21 @@ +# Contributors + +- Repository: ['go-openapi/jsonreference'] + +| Total Contributors | Total Contributions | +| --- | --- | +| 9 | 68 | + +| Username | All Time Contribution Count | All Commits | +| --- | --- | --- | +| @fredbi | 31 | https://github.com/go-openapi/jsonreference/commits?author=fredbi | +| @casualjim | 25 | https://github.com/go-openapi/jsonreference/commits?author=casualjim | +| @youyuanwu | 5 | https://github.com/go-openapi/jsonreference/commits?author=youyuanwu | +| @olivierlemasle | 2 | https://github.com/go-openapi/jsonreference/commits?author=olivierlemasle | +| @apelisse | 1 | https://github.com/go-openapi/jsonreference/commits?author=apelisse | +| @gbjk | 1 | https://github.com/go-openapi/jsonreference/commits?author=gbjk | +| @honza | 1 | https://github.com/go-openapi/jsonreference/commits?author=honza | +| @Neo2308 | 1 | https://github.com/go-openapi/jsonreference/commits?author=Neo2308 | +| @erraggy | 1 | https://github.com/go-openapi/jsonreference/commits?author=erraggy | + + _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ diff --git a/vendor/github.com/go-openapi/jsonreference/NOTICE b/vendor/github.com/go-openapi/jsonreference/NOTICE new file mode 100644 index 00000000000..f3b51939a95 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/NOTICE @@ -0,0 +1,39 @@ +Copyright 2015-2025 go-swagger maintainers + +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +This software library, github.com/go-openapi/jsonpointer, includes software developed +by the go-swagger and go-openapi maintainers ("go-swagger maintainers"). + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this software except in compliance with the License. + +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0. + +This software is copied from, derived from, and inspired by other original software products. +It ships with copies of other software which license terms are recalled below. + +The original software was authored on 25-02-2013 by sigu-399 (https://github.com/sigu-399, sigu.399@gmail.com). + +github.com/sigh-399/jsonpointer +=========================== + +// SPDX-FileCopyrightText: Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// SPDX-License-Identifier: Apache-2.0 + +Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) + +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-openapi/jsonreference/README.md b/vendor/github.com/go-openapi/jsonreference/README.md index c7fc2049c1d..d479dbdc731 100644 --- a/vendor/github.com/go-openapi/jsonreference/README.md +++ b/vendor/github.com/go-openapi/jsonreference/README.md @@ -1,19 +1,99 @@ -# gojsonreference [![Build Status](https://github.com/go-openapi/jsonreference/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonreference/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) +# jsonreference -[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) -[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonreference.svg)](https://pkg.go.dev/github.com/go-openapi/jsonreference) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonreference)](https://goreportcard.com/report/github.com/go-openapi/jsonreference) + +[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url] + + + +[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url] + + +[![GoDoc][godoc-badge]][godoc-url] [![Slack Channel][slack-logo]![slack-badge]][slack-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge] -An implementation of JSON Reference - Go language +--- + +An implementation of JSON Reference for golang. ## Status -Feature complete. Stable API + +API is stable. + +## Import this library in your project + +```cmd +go get github.com/go-openapi/jsonreference +``` ## Dependencies + * https://github.com/go-openapi/jsonpointer +## Basic usage + +## Change log + +See + ## References * http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 * http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + +See the license [NOTICE](./NOTICE), which recalls the licensing terms of all the pieces of software +on top of which it has been built. + +## Other documentation + +* [All-time contributors](./CONTRIBUTORS.md) +* [Contributing guidelines](.github/CONTRIBUTING.md) +* [Maintainers documentation](docs/MAINTAINERS.md) +* [Code style](docs/STYLE.md) + +## Cutting a new release + +Maintainers can cut a new release by either: + +* running [this workflow](https://github.com/go-openapi/jsonreference/actions/workflows/bump-release.yml) +* or pushing a semver tag + * signed tags are preferred + * The tag message is prepended to release notes + + +[test-badge]: https://github.com/go-openapi/jsonreference/actions/workflows/go-test.yml/badge.svg +[test-url]: https://github.com/go-openapi/jsonreference/actions/workflows/go-test.yml +[cov-badge]: https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg +[cov-url]: https://codecov.io/gh/go-openapi/jsonreference +[vuln-scan-badge]: https://github.com/go-openapi/jsonreference/actions/workflows/scanner.yml/badge.svg +[vuln-scan-url]: https://github.com/go-openapi/jsonreference/actions/workflows/scanner.yml +[codeql-badge]: https://github.com/go-openapi/jsonreference/actions/workflows/codeql.yml/badge.svg +[codeql-url]: https://github.com/go-openapi/jsonreference/actions/workflows/codeql.yml + +[release-badge]: https://badge.fury.io/gh/go-openapi%2Fjsonreference.svg +[release-url]: https://badge.fury.io/gh/go-openapi%2Fjsonreference +[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonreference.svg +[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonreference + +[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/jsonreference +[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/jsonreference +[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/jsonreference +[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/jsonreference + +[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F +[doc-url]: https://goswagger.io/go-openapi +[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/jsonreference +[godoc-url]: http://pkg.go.dev/github.com/go-openapi/jsonreference +[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png +[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM +[slack-url]: https://goswagger.slack.com/archives/C04R30YMU + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: https://github.com/go-openapi/jsonreference/?tab=Apache-2.0-1-ov-file#readme + +[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/jsonreference +[goversion-url]: https://github.com/go-openapi/jsonreference/blob/master/go.mod +[top-badge]: https://img.shields.io/github/languages/top/go-openapi/jsonreference +[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/jsonreference/latest diff --git a/vendor/github.com/go-openapi/jsonreference/SECURITY.md b/vendor/github.com/go-openapi/jsonreference/SECURITY.md new file mode 100644 index 00000000000..2a7b6f0910d --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This policy outlines the commitment and practices of the go-openapi maintainers regarding security. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.22.x | :white_check_mark: | + +## Reporting a vulnerability + +If you become aware of a security vulnerability that affects the current repository, +please report it privately to the maintainers. + +Please follow the instructions provided by github to +[Privately report a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). + +TL;DR: on Github, navigate to the project's "Security" tab then click on "Report a vulnerability". diff --git a/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go b/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go index f0610cf1e57..a08b47320e7 100644 --- a/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go +++ b/vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package internal import ( @@ -11,9 +14,11 @@ const ( defaultHTTPSPort = ":443" ) -// Regular expressions used by the normalizations -var rxPort = regexp.MustCompile(`(:\d+)/?$`) -var rxDupSlashes = regexp.MustCompile(`/{2,}`) +// Regular expressions used by the normalizations. +var ( + rxPort = regexp.MustCompile(`(:\d+)/?$`) + rxDupSlashes = regexp.MustCompile(`/{2,}`) +) // NormalizeURL will normalize the specified URL // This was added to replace a previous call to the no longer maintained purell library: diff --git a/vendor/github.com/go-openapi/jsonreference/reference.go b/vendor/github.com/go-openapi/jsonreference/reference.go index 6a1fed5dfe7..6e3ae499515 100644 --- a/vendor/github.com/go-openapi/jsonreference/reference.go +++ b/vendor/github.com/go-openapi/jsonreference/reference.go @@ -1,27 +1,5 @@ -// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) -// -// 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. - -// author sigu-399 -// author-github https://github.com/sigu-399 -// author-mail sigu.399@gmail.com -// -// repository-name jsonreference -// repository-desc An implementation of JSON Reference - Go language -// -// description Main and unique file. -// -// created 26-02-2013 +// SPDX-FileCopyrightText: Copyright (c) 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package jsonreference @@ -40,7 +18,7 @@ const ( var ErrChildURL = errors.New("child url is nil") -// Ref represents a json reference object +// Ref represents a json reference object. type Ref struct { referenceURL *url.URL referencePointer jsonpointer.Pointer @@ -52,7 +30,7 @@ type Ref struct { HasFullFilePath bool } -// New creates a new reference for the given string +// New creates a new reference for the given string. func New(jsonReferenceString string) (Ref, error) { var r Ref err := r.parse(jsonReferenceString) @@ -60,7 +38,7 @@ func New(jsonReferenceString string) (Ref, error) { } // MustCreateRef parses the ref string and panics when it's invalid. -// Use the New method for a version that returns an error +// Use the New method for a version that returns an error. func MustCreateRef(ref string) Ref { r, err := New(ref) if err != nil { @@ -70,17 +48,17 @@ func MustCreateRef(ref string) Ref { return r } -// GetURL gets the URL for this reference +// GetURL gets the URL for this reference. func (r *Ref) GetURL() *url.URL { return r.referenceURL } -// GetPointer gets the json pointer for this reference +// GetPointer gets the json pointer for this reference. func (r *Ref) GetPointer() *jsonpointer.Pointer { return &r.referencePointer } -// String returns the best version of the url for this reference +// String returns the best version of the url for this reference. func (r *Ref) String() string { if r.referenceURL != nil { return r.referenceURL.String() @@ -93,7 +71,7 @@ func (r *Ref) String() string { return r.referencePointer.String() } -// IsRoot returns true if this reference is a root document +// IsRoot returns true if this reference is a root document. func (r *Ref) IsRoot() bool { return r.referenceURL != nil && !r.IsCanonical() && @@ -101,13 +79,13 @@ func (r *Ref) IsRoot() bool { r.referenceURL.Fragment == "" } -// IsCanonical returns true when this pointer starts with http(s):// or file:// +// IsCanonical returns true when this pointer starts with http(s):// or file://. func (r *Ref) IsCanonical() bool { return (r.HasFileScheme && r.HasFullFilePath) || (!r.HasFileScheme && r.HasFullURL) } // Inherits creates a new reference from a parent and a child -// If the child cannot inherit from the parent, an error is returned +// If the child cannot inherit from the parent, an error is returned. func (r *Ref) Inherits(child Ref) (*Ref, error) { childURL := child.GetURL() parentURL := r.GetURL() @@ -125,7 +103,7 @@ func (r *Ref) Inherits(child Ref) (*Ref, error) { return &ref, nil } -// "Constructor", parses the given string JSON reference +// "Constructor", parses the given string JSON reference. func (r *Ref) parse(jsonReferenceString string) error { parsed, err := url.Parse(jsonReferenceString) if err != nil { diff --git a/vendor/github.com/go-openapi/loads/.golangci.yml b/vendor/github.com/go-openapi/loads/.golangci.yml index 7cea1af8b52..1ad5adf47e6 100644 --- a/vendor/github.com/go-openapi/loads/.golangci.yml +++ b/vendor/github.com/go-openapi/loads/.golangci.yml @@ -16,7 +16,7 @@ linters: - godox - gosmopolitan - inamedparam - #- intrange # disabled while < go1.22 + - intrange - ireturn - lll - musttag diff --git a/vendor/github.com/go-openapi/loads/README.md b/vendor/github.com/go-openapi/loads/README.md index 6164ebe40a3..1f0174f2d91 100644 --- a/vendor/github.com/go-openapi/loads/README.md +++ b/vendor/github.com/go-openapi/loads/README.md @@ -26,3 +26,7 @@ Primary usage: ``` See also the provided [examples](https://pkg.go.dev/github.com/go-openapi/loads#pkg-examples). + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). diff --git a/vendor/github.com/go-openapi/loads/doc.go b/vendor/github.com/go-openapi/loads/doc.go index 1ca47bcfb0d..7981e70e9f1 100644 --- a/vendor/github.com/go-openapi/loads/doc.go +++ b/vendor/github.com/go-openapi/loads/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package loads provides document loading methods for swagger (OAI v2) API specifications. // diff --git a/vendor/github.com/go-openapi/loads/errors.go b/vendor/github.com/go-openapi/loads/errors.go index 132a702e938..8f2d602f5cc 100644 --- a/vendor/github.com/go-openapi/loads/errors.go +++ b/vendor/github.com/go-openapi/loads/errors.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package loads type loaderError string diff --git a/vendor/github.com/go-openapi/loads/loaders.go b/vendor/github.com/go-openapi/loads/loaders.go index 646d35af393..25b157302e4 100644 --- a/vendor/github.com/go-openapi/loads/loaders.go +++ b/vendor/github.com/go-openapi/loads/loaders.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package loads import ( diff --git a/vendor/github.com/go-openapi/loads/options.go b/vendor/github.com/go-openapi/loads/options.go index 3b055319b3d..adb5e6d15b0 100644 --- a/vendor/github.com/go-openapi/loads/options.go +++ b/vendor/github.com/go-openapi/loads/options.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package loads import "github.com/go-openapi/swag/loading" diff --git a/vendor/github.com/go-openapi/loads/spec.go b/vendor/github.com/go-openapi/loads/spec.go index 838231a580e..213c40c657a 100644 --- a/vendor/github.com/go-openapi/loads/spec.go +++ b/vendor/github.com/go-openapi/loads/spec.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package loads diff --git a/vendor/github.com/go-openapi/runtime/.golangci.yml b/vendor/github.com/go-openapi/runtime/.golangci.yml index 5a0faa2e5f6..0087ed31130 100644 --- a/vendor/github.com/go-openapi/runtime/.golangci.yml +++ b/vendor/github.com/go-openapi/runtime/.golangci.yml @@ -18,7 +18,6 @@ linters: - gomoddirectives # moved to mono-repo, multi-modules, so replace directives are needed - gosmopolitan - inamedparam - #- intrange # disabled while < go1.22 - ireturn - lll - musttag diff --git a/vendor/github.com/go-openapi/runtime/README.md b/vendor/github.com/go-openapi/runtime/README.md index 16a151234f4..9e15b1adb5b 100644 --- a/vendor/github.com/go-openapi/runtime/README.md +++ b/vendor/github.com/go-openapi/runtime/README.md @@ -11,7 +11,7 @@ The runtime component for use in code generation or as untyped usage. ## Release notes -### v0.29.0 [draft, unpublished] +### v0.29.0 **New with this release**: @@ -37,3 +37,7 @@ Moving forward, we want to : independently from the main package (to avoid breaking changes, the existing API will remain maintained, but evolve at a slower pace than opentelemetry). * [ ] fix a few known issues with some file upload requests (e.g. #286) + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). diff --git a/vendor/github.com/go-openapi/runtime/bytestream.go b/vendor/github.com/go-openapi/runtime/bytestream.go index 98e961878d9..eb649742e8e 100644 --- a/vendor/github.com/go-openapi/runtime/bytestream.go +++ b/vendor/github.com/go-openapi/runtime/bytestream.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -54,7 +43,7 @@ func ByteStreamConsumer(opts ...byteStreamOpt) Consumer { opt(&vals) } - return ConsumerFunc(func(reader io.Reader, data interface{}) error { + return ConsumerFunc(func(reader io.Reader, data any) error { if reader == nil { return errors.New("ByteStreamConsumer requires a reader") // early exit } @@ -148,7 +137,7 @@ func ByteStreamProducer(opts ...byteStreamOpt) Producer { opt(&vals) } - return ProducerFunc(func(writer io.Writer, data interface{}) error { + return ProducerFunc(func(writer io.Writer, data any) error { if writer == nil { return errors.New("ByteStreamProducer requires a writer") // early exit } diff --git a/vendor/github.com/go-openapi/runtime/client/auth_info.go b/vendor/github.com/go-openapi/runtime/client/auth_info.go index 4f26e92347a..a98690c4d60 100644 --- a/vendor/github.com/go-openapi/runtime/client/auth_info.go +++ b/vendor/github.com/go-openapi/runtime/client/auth_info.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package client diff --git a/vendor/github.com/go-openapi/runtime/client/keepalive.go b/vendor/github.com/go-openapi/runtime/client/keepalive.go index 7dd6b51c4df..831d23b511d 100644 --- a/vendor/github.com/go-openapi/runtime/client/keepalive.go +++ b/vendor/github.com/go-openapi/runtime/client/keepalive.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package client import ( diff --git a/vendor/github.com/go-openapi/runtime/client/opentelemetry.go b/vendor/github.com/go-openapi/runtime/client/opentelemetry.go index db246fc686e..e77941293f9 100644 --- a/vendor/github.com/go-openapi/runtime/client/opentelemetry.go +++ b/vendor/github.com/go-openapi/runtime/client/opentelemetry.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package client import ( @@ -108,7 +111,7 @@ func newOpenTelemetryTransport(transport runtime.ClientTransport, host string, o return tr } -func (t *openTelemetryTransport) Submit(op *runtime.ClientOperation) (interface{}, error) { +func (t *openTelemetryTransport) Submit(op *runtime.ClientOperation) (any, error) { if op.Context == nil { return t.transport.Submit(op) } @@ -128,7 +131,7 @@ func (t *openTelemetryTransport) Submit(op *runtime.ClientOperation) (interface{ return params.WriteToRequest(req, reg) }) - op.Reader = runtime.ClientResponseReaderFunc(func(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + op.Reader = runtime.ClientResponseReaderFunc(func(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { if span != nil { statusCode := response.Code() // NOTE: this is replaced by semconv.HTTPResponseStatusCode in semconv v1.21 diff --git a/vendor/github.com/go-openapi/runtime/client/request.go b/vendor/github.com/go-openapi/runtime/client/request.go index 8f8bab03439..6d9b25912ec 100644 --- a/vendor/github.com/go-openapi/runtime/client/request.go +++ b/vendor/github.com/go-openapi/runtime/client/request.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package client diff --git a/vendor/github.com/go-openapi/runtime/client/response.go b/vendor/github.com/go-openapi/runtime/client/response.go index 0bbd388bc8b..59abc3b549a 100644 --- a/vendor/github.com/go-openapi/runtime/client/response.go +++ b/vendor/github.com/go-openapi/runtime/client/response.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package client diff --git a/vendor/github.com/go-openapi/runtime/client/runtime.go b/vendor/github.com/go-openapi/runtime/client/runtime.go index 8dc50c15e36..203c74e49db 100644 --- a/vendor/github.com/go-openapi/runtime/client/runtime.go +++ b/vendor/github.com/go-openapi/runtime/client/runtime.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package client @@ -363,7 +352,7 @@ func (r *Runtime) CreateHttpRequest(operation *runtime.ClientOperation) (req *ht // Submit a request and when there is a body on success it will turn that into the result // all other things are turned into an api error for swagger which retains the status code -func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error) { +func (r *Runtime) Submit(operation *runtime.ClientOperation) (any, error) { _, readResponse, _ := operation.Params, operation.Reader, operation.AuthInfo request, req, err := r.createHttpRequest(operation) diff --git a/vendor/github.com/go-openapi/runtime/client_auth_info.go b/vendor/github.com/go-openapi/runtime/client_auth_info.go index c6c97d9a7c3..581e64451a2 100644 --- a/vendor/github.com/go-openapi/runtime/client_auth_info.go +++ b/vendor/github.com/go-openapi/runtime/client_auth_info.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime diff --git a/vendor/github.com/go-openapi/runtime/client_operation.go b/vendor/github.com/go-openapi/runtime/client_operation.go index 5a5d63563ad..b0bb0977db5 100644 --- a/vendor/github.com/go-openapi/runtime/client_operation.go +++ b/vendor/github.com/go-openapi/runtime/client_operation.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -37,5 +26,5 @@ type ClientOperation struct { // A ClientTransport implementor knows how to submit Request objects to some destination type ClientTransport interface { // Submit(string, RequestWriter, ResponseReader, AuthInfoWriter) (interface{}, error) - Submit(*ClientOperation) (interface{}, error) + Submit(*ClientOperation) (any, error) } diff --git a/vendor/github.com/go-openapi/runtime/client_request.go b/vendor/github.com/go-openapi/runtime/client_request.go index 4ebb2deabe9..6e335b36f32 100644 --- a/vendor/github.com/go-openapi/runtime/client_request.go +++ b/vendor/github.com/go-openapi/runtime/client_request.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -53,7 +42,7 @@ type ClientRequest interface { //nolint:interfacebloat // a swagger-capable requ SetFileParam(string, ...NamedReadCloser) error - SetBodyParam(interface{}) error + SetBodyParam(any) error SetTimeout(time.Duration) error @@ -63,7 +52,7 @@ type ClientRequest interface { //nolint:interfacebloat // a swagger-capable requ GetBody() []byte - GetBodyParam() interface{} + GetBodyParam() any GetFileParam() map[string][]NamedReadCloser } @@ -103,7 +92,7 @@ func (n *namedReadCloser) Name() string { type TestClientRequest struct { Headers http.Header - Body interface{} + Body any } func (t *TestClientRequest) SetHeaderParam(name string, values ...string) error { @@ -122,7 +111,7 @@ func (t *TestClientRequest) SetPathParam(_ string, _ string) error { return nil func (t *TestClientRequest) SetFileParam(_ string, _ ...NamedReadCloser) error { return nil } -func (t *TestClientRequest) SetBodyParam(body interface{}) error { +func (t *TestClientRequest) SetBodyParam(body any) error { t.Body = body return nil } @@ -139,7 +128,7 @@ func (t *TestClientRequest) GetPath() string { return "" } func (t *TestClientRequest) GetBody() []byte { return nil } -func (t *TestClientRequest) GetBodyParam() interface{} { +func (t *TestClientRequest) GetBodyParam() any { return t.Body } diff --git a/vendor/github.com/go-openapi/runtime/client_response.go b/vendor/github.com/go-openapi/runtime/client_response.go index b9929946d80..f2cf942ab36 100644 --- a/vendor/github.com/go-openapi/runtime/client_response.go +++ b/vendor/github.com/go-openapi/runtime/client_response.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -18,6 +7,7 @@ import ( "encoding/json" "fmt" "io" + "strings" ) // A ClientResponse represents a client response. @@ -32,28 +22,28 @@ type ClientResponse interface { } // A ClientResponseReaderFunc turns a function into a ClientResponseReader interface implementation -type ClientResponseReaderFunc func(ClientResponse, Consumer) (interface{}, error) +type ClientResponseReaderFunc func(ClientResponse, Consumer) (any, error) // ReadResponse reads the response -func (read ClientResponseReaderFunc) ReadResponse(resp ClientResponse, consumer Consumer) (interface{}, error) { +func (read ClientResponseReaderFunc) ReadResponse(resp ClientResponse, consumer Consumer) (any, error) { return read(resp, consumer) } // A ClientResponseReader is an interface for things want to read a response. // An application of this is to create structs from response values type ClientResponseReader interface { - ReadResponse(ClientResponse, Consumer) (interface{}, error) + ReadResponse(ClientResponse, Consumer) (any, error) } // APIError wraps an error model and captures the status code type APIError struct { OperationName string - Response interface{} + Response any Code int } // NewAPIError creates a new API error -func NewAPIError(opName string, payload interface{}, code int) *APIError { +func NewAPIError(opName string, payload any, code int) *APIError { return &APIError{ OperationName: opName, Response: payload, @@ -61,13 +51,17 @@ func NewAPIError(opName string, payload interface{}, code int) *APIError { } } +// sanitizer ensures that single quotes are escaped +var sanitizer = strings.NewReplacer(`\`, `\\`, `'`, `\'`) + func (o *APIError) Error() string { var resp []byte if err, ok := o.Response.(error); ok { - resp = []byte("'" + err.Error() + "'") + resp = []byte("'" + sanitizer.Replace(err.Error()) + "'") } else { resp, _ = json.Marshal(o.Response) } + return fmt.Sprintf("%s (status %d): %s", o.OperationName, o.Code, resp) } diff --git a/vendor/github.com/go-openapi/runtime/constants.go b/vendor/github.com/go-openapi/runtime/constants.go index 515969242ca..62ae9eec0cf 100644 --- a/vendor/github.com/go-openapi/runtime/constants.go +++ b/vendor/github.com/go-openapi/runtime/constants.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime diff --git a/vendor/github.com/go-openapi/runtime/csv.go b/vendor/github.com/go-openapi/runtime/csv.go index c9597bcd6e0..567e3d9db24 100644 --- a/vendor/github.com/go-openapi/runtime/csv.go +++ b/vendor/github.com/go-openapi/runtime/csv.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -48,7 +37,7 @@ import ( func CSVConsumer(opts ...CSVOpt) Consumer { o := csvOptsWithDefaults(opts) - return ConsumerFunc(func(reader io.Reader, data interface{}) error { + return ConsumerFunc(func(reader io.Reader, data any) error { if reader == nil { return errors.New("CSVConsumer requires a reader") } @@ -181,7 +170,7 @@ func CSVConsumer(opts ...CSVOpt) Consumer { func CSVProducer(opts ...CSVOpt) Producer { o := csvOptsWithDefaults(opts) - return ProducerFunc(func(writer io.Writer, data interface{}) error { + return ProducerFunc(func(writer io.Writer, data any) error { if writer == nil { return errors.New("CSVProducer requires a writer") } diff --git a/vendor/github.com/go-openapi/runtime/csv_options.go b/vendor/github.com/go-openapi/runtime/csv_options.go index 89665788242..4cc04390010 100644 --- a/vendor/github.com/go-openapi/runtime/csv_options.go +++ b/vendor/github.com/go-openapi/runtime/csv_options.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package runtime import ( diff --git a/vendor/github.com/go-openapi/runtime/discard.go b/vendor/github.com/go-openapi/runtime/discard.go index 0d390cfd64c..b05678becd9 100644 --- a/vendor/github.com/go-openapi/runtime/discard.go +++ b/vendor/github.com/go-openapi/runtime/discard.go @@ -1,9 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package runtime import "io" // DiscardConsumer does absolutely nothing, it's a black hole. -var DiscardConsumer = ConsumerFunc(func(_ io.Reader, _ interface{}) error { return nil }) +var DiscardConsumer = ConsumerFunc(func(_ io.Reader, _ any) error { return nil }) // DiscardProducer does absolutely nothing, it's a black hole. -var DiscardProducer = ProducerFunc(func(_ io.Writer, _ interface{}) error { return nil }) +var DiscardProducer = ProducerFunc(func(_ io.Writer, _ any) error { return nil }) diff --git a/vendor/github.com/go-openapi/runtime/file.go b/vendor/github.com/go-openapi/runtime/file.go index 1bc6aabf705..2a85379a748 100644 --- a/vendor/github.com/go-openapi/runtime/file.go +++ b/vendor/github.com/go-openapi/runtime/file.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime diff --git a/vendor/github.com/go-openapi/runtime/flagext/byte_size.go b/vendor/github.com/go-openapi/runtime/flagext/byte_size.go index 0f3eeba1f6f..4e514eaef25 100644 --- a/vendor/github.com/go-openapi/runtime/flagext/byte_size.go +++ b/vendor/github.com/go-openapi/runtime/flagext/byte_size.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package flagext import ( diff --git a/vendor/github.com/go-openapi/runtime/go.work.sum b/vendor/github.com/go-openapi/runtime/go.work.sum index a60668ab8a0..b0c2c9a63de 100644 --- a/vendor/github.com/go-openapi/runtime/go.work.sum +++ b/vendor/github.com/go-openapi/runtime/go.work.sum @@ -43,15 +43,18 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/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.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -70,6 +73,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= +golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -83,6 +87,7 @@ golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/github.com/go-openapi/runtime/headers.go b/vendor/github.com/go-openapi/runtime/headers.go index 4d111db4fec..510e396ca73 100644 --- a/vendor/github.com/go-openapi/runtime/headers.go +++ b/vendor/github.com/go-openapi/runtime/headers.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime diff --git a/vendor/github.com/go-openapi/runtime/interfaces.go b/vendor/github.com/go-openapi/runtime/interfaces.go index e3341286834..90046bf367e 100644 --- a/vendor/github.com/go-openapi/runtime/interfaces.go +++ b/vendor/github.com/go-openapi/runtime/interfaces.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -23,23 +12,23 @@ import ( ) // OperationHandlerFunc an adapter for a function to the OperationHandler interface -type OperationHandlerFunc func(interface{}) (interface{}, error) +type OperationHandlerFunc func(any) (any, error) // Handle implements the operation handler interface -func (s OperationHandlerFunc) Handle(data interface{}) (interface{}, error) { +func (s OperationHandlerFunc) Handle(data any) (any, error) { return s(data) } // OperationHandler a handler for a swagger operation type OperationHandler interface { - Handle(interface{}) (interface{}, error) + Handle(any) (any, error) } // ConsumerFunc represents a function that can be used as a consumer -type ConsumerFunc func(io.Reader, interface{}) error +type ConsumerFunc func(io.Reader, any) error // Consume consumes the reader into the data parameter -func (fn ConsumerFunc) Consume(reader io.Reader, data interface{}) error { +func (fn ConsumerFunc) Consume(reader io.Reader, data any) error { return fn(reader, data) } @@ -47,14 +36,14 @@ func (fn ConsumerFunc) Consume(reader io.Reader, data interface{}) error { // data provided by the request body type Consumer interface { // Consume performs the binding of request values - Consume(io.Reader, interface{}) error + Consume(io.Reader, any) error } // ProducerFunc represents a function that can be used as a producer -type ProducerFunc func(io.Writer, interface{}) error +type ProducerFunc func(io.Writer, any) error // Produce produces the response for the provided data -func (f ProducerFunc) Produce(writer io.Writer, data interface{}) error { +func (f ProducerFunc) Produce(writer io.Writer, data any) error { return f(writer, data) } @@ -62,14 +51,14 @@ func (f ProducerFunc) Produce(writer io.Writer, data interface{}) error { // HTTP response type Producer interface { // Produce writes to the http response - Produce(io.Writer, interface{}) error + Produce(io.Writer, any) error } // AuthenticatorFunc turns a function into an authenticator -type AuthenticatorFunc func(interface{}) (bool, interface{}, error) +type AuthenticatorFunc func(any) (bool, any, error) // Authenticate authenticates the request with the provided data -func (f AuthenticatorFunc) Authenticate(params interface{}) (bool, interface{}, error) { +func (f AuthenticatorFunc) Authenticate(params any) (bool, any, error) { return f(params) } @@ -77,14 +66,14 @@ func (f AuthenticatorFunc) Authenticate(params interface{}) (bool, interface{}, // implementations of Authenticator know how to authenticate the // request data and translate that into a valid principal object or an error type Authenticator interface { - Authenticate(interface{}) (bool, interface{}, error) + Authenticate(any) (bool, any, error) } // AuthorizerFunc turns a function into an authorizer -type AuthorizerFunc func(*http.Request, interface{}) error +type AuthorizerFunc func(*http.Request, any) error // Authorize authorizes the processing of the request for the principal -func (f AuthorizerFunc) Authorize(r *http.Request, principal interface{}) error { +func (f AuthorizerFunc) Authorize(r *http.Request, principal any) error { return f(r, principal) } @@ -92,7 +81,7 @@ func (f AuthorizerFunc) Authorize(r *http.Request, principal interface{}) error // implementations of Authorizer know how to authorize the principal object // using the request data and returns error if unauthorized type Authorizer interface { - Authorize(*http.Request, interface{}) error + Authorize(*http.Request, any) error } // Validatable types implementing this interface allow customizing their validation diff --git a/vendor/github.com/go-openapi/runtime/json.go b/vendor/github.com/go-openapi/runtime/json.go index 5a690559cc5..8f93eebfaa2 100644 --- a/vendor/github.com/go-openapi/runtime/json.go +++ b/vendor/github.com/go-openapi/runtime/json.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -21,7 +10,7 @@ import ( // JSONConsumer creates a new JSON consumer func JSONConsumer() Consumer { - return ConsumerFunc(func(reader io.Reader, data interface{}) error { + return ConsumerFunc(func(reader io.Reader, data any) error { dec := json.NewDecoder(reader) dec.UseNumber() // preserve number formats return dec.Decode(data) @@ -30,7 +19,7 @@ func JSONConsumer() Consumer { // JSONProducer creates a new JSON producer func JSONProducer() Producer { - return ProducerFunc(func(writer io.Writer, data interface{}) error { + return ProducerFunc(func(writer io.Writer, data any) error { enc := json.NewEncoder(writer) enc.SetEscapeHTML(false) return enc.Encode(data) diff --git a/vendor/github.com/go-openapi/runtime/logger/logger.go b/vendor/github.com/go-openapi/runtime/logger/logger.go index 6f4debcc145..45484deb593 100644 --- a/vendor/github.com/go-openapi/runtime/logger/logger.go +++ b/vendor/github.com/go-openapi/runtime/logger/logger.go @@ -1,10 +1,13 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package logger import "os" type Logger interface { - Printf(format string, args ...interface{}) - Debugf(format string, args ...interface{}) + Printf(format string, args ...any) + Debugf(format string, args ...any) } func DebugEnabled() bool { diff --git a/vendor/github.com/go-openapi/runtime/logger/standard.go b/vendor/github.com/go-openapi/runtime/logger/standard.go index 30035a77770..48ba27f4a3d 100644 --- a/vendor/github.com/go-openapi/runtime/logger/standard.go +++ b/vendor/github.com/go-openapi/runtime/logger/standard.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package logger import ( @@ -9,14 +12,14 @@ var _ Logger = StandardLogger{} type StandardLogger struct{} -func (StandardLogger) Printf(format string, args ...interface{}) { +func (StandardLogger) Printf(format string, args ...any) { if len(format) == 0 || format[len(format)-1] != '\n' { format += "\n" } fmt.Fprintf(os.Stderr, format, args...) } -func (StandardLogger) Debugf(format string, args ...interface{}) { +func (StandardLogger) Debugf(format string, args ...any) { if len(format) == 0 || format[len(format)-1] != '\n' { format += "\n" } diff --git a/vendor/github.com/go-openapi/runtime/middleware/context.go b/vendor/github.com/go-openapi/runtime/middleware/context.go index f2cade3ca0a..bb00b93b89b 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/context.go +++ b/vendor/github.com/go-openapi/runtime/middleware/context.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware @@ -126,7 +115,7 @@ func newRoutableUntypedAPI(spec *loads.Document, api *untyped.API, context *Cont } // bind and validate the request using reflection - var bound interface{} + var bound any var validation error bound, r, validation = context.BindAndValidate(r, route) if validation != nil { @@ -287,7 +276,7 @@ func MatchedRouteFrom(req *http.Request) *MatchedRoute { } // SecurityPrincipalFrom request context value. -func SecurityPrincipalFrom(req *http.Request) interface{} { +func SecurityPrincipalFrom(req *http.Request) any { return req.Context().Value(ctxSecurityPrincipal) } @@ -466,7 +455,7 @@ func (c *Context) ResetAuth(request *http.Request) *http.Request { // Returns the principal object and a shallow copy of the request when its // context doesn't contain the principal, otherwise the same request or an error // (the last) if one of the authenticators returns one or an Unauthenticated error -func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (interface{}, *http.Request, error) { +func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (any, *http.Request, error) { if route == nil || !route.HasAuth() { return nil, nil, nil } @@ -504,7 +493,7 @@ func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (interfa // Returns the validation map and a shallow copy of the request when its context // doesn't contain the validation, otherwise it returns the same request or an // CompositeValidationError error -func (c *Context) BindAndValidate(request *http.Request, matched *MatchedRoute) (interface{}, *http.Request, error) { +func (c *Context) BindAndValidate(request *http.Request, matched *MatchedRoute) (any, *http.Request, error) { var rCtx = request.Context() if v, ok := rCtx.Value(ctxBoundParams).(*validation); ok { @@ -530,7 +519,7 @@ func (c *Context) NotFound(rw http.ResponseWriter, r *http.Request) { } // Respond renders the response after doing some content negotiation -func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []string, route *MatchedRoute, data interface{}) { +func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []string, route *MatchedRoute, data any) { c.debugLogf("responding to %s %s with produces: %v", r.Method, r.URL.Path, produces) offers := []string{} for _, mt := range produces { diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/router.go b/vendor/github.com/go-openapi/runtime/middleware/denco/router.go index 21808ede332..b371a2cf84e 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/denco/router.go +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/router.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + // Package denco provides fast URL router. package denco @@ -36,14 +39,14 @@ type Router struct { // By default, SizeHint will be determined from given records to Build. SizeHint int - static map[string]interface{} + static map[string]any } // New returns a new Router. func New() *Router { return &Router{ SizeHint: -1, - static: make(map[string]interface{}), + static: make(map[string]any), param: newDoubleArray(), } } @@ -51,7 +54,7 @@ func New() *Router { // Lookup returns data and path parameters that associated with path. // params is a slice of the Param that arranged in the order in which parameters appeared. // e.g. when built routing path is "/path/to/:id/:name" and given path is "/path/to/1/alice". params order is [{"id": "1"}, {"name": "alice"}], not [{"name": "alice"}, {"id": "1"}]. -func (rt *Router) Lookup(path string) (data interface{}, params Params, found bool) { +func (rt *Router) Lookup(path string) (data any, params Params, found bool) { if data, found = rt.static[path]; found { return data, nil, true } @@ -348,7 +351,7 @@ func (da *doubleArray) arrange(records []*record, idx, depth int, usedBase map[i // node represents a node of Double-Array. type node struct { - data interface{} + data any // Names of path parameters. paramNames []string @@ -422,11 +425,11 @@ type Record struct { Key string // Result value for Key. - Value interface{} + Value any } // NewRecord returns a new Record. -func NewRecord(key string, value interface{}) Record { +func NewRecord(key string, value any) Record { return Record{ Key: key, Value: value, diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/server.go b/vendor/github.com/go-openapi/runtime/middleware/denco/server.go index 0886713c181..8f04d93dba9 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/denco/server.go +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/server.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package denco import ( diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/util.go b/vendor/github.com/go-openapi/runtime/middleware/denco/util.go index edc1f6ab80a..f002bc4693f 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/denco/util.go +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/util.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package denco // NextSeparator returns an index of next separator in path. diff --git a/vendor/github.com/go-openapi/runtime/middleware/doc.go b/vendor/github.com/go-openapi/runtime/middleware/doc.go index 836a98850d7..04b83223638 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/doc.go +++ b/vendor/github.com/go-openapi/runtime/middleware/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 /* Package middleware provides the library with helper functions for serving swagger APIs. diff --git a/vendor/github.com/go-openapi/runtime/middleware/header/header.go b/vendor/github.com/go-openapi/runtime/middleware/header/header.go index 13d7dc31203..6ce870d8936 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/header/header.go +++ b/vendor/github.com/go-openapi/runtime/middleware/header/header.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + // Copyright 2013 The Go Authors. All rights reserved. // // Use of this source code is governed by a BSD-style @@ -10,6 +13,7 @@ package header import ( + "maps" "net/http" "strings" "time" @@ -65,9 +69,7 @@ func init() { // Copy returns a shallow copy of the header. func Copy(header http.Header) http.Header { h := make(http.Header) - for k, vs := range header { - h[k] = vs - } + maps.Copy(h, header) return h } diff --git a/vendor/github.com/go-openapi/runtime/middleware/negotiate.go b/vendor/github.com/go-openapi/runtime/middleware/negotiate.go index d25d58cf3a3..cb0a85283c1 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/negotiate.go +++ b/vendor/github.com/go-openapi/runtime/middleware/negotiate.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + // Copyright 2013 The Go Authors. All rights reserved. // // Use of this source code is governed by a BSD-style diff --git a/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go b/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go index bc6942a0f1b..2e63780c70b 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go +++ b/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware @@ -22,7 +11,7 @@ import ( type errorResp struct { code int - response interface{} + response any headers http.Header } @@ -49,7 +38,7 @@ func NotImplemented(message string) Responder { // Error creates a generic responder for returning errors, the data will be serialized // with the matching producer for the request -func Error(code int, data interface{}, headers ...http.Header) Responder { +func Error(code int, data any, headers ...http.Header) Responder { var hdr http.Header for _, h := range headers { for k, v := range h { diff --git a/vendor/github.com/go-openapi/runtime/middleware/operation.go b/vendor/github.com/go-openapi/runtime/middleware/operation.go index 1175a63cf29..2a7ab1fadaf 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/operation.go +++ b/vendor/github.com/go-openapi/runtime/middleware/operation.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware diff --git a/vendor/github.com/go-openapi/runtime/middleware/parameter.go b/vendor/github.com/go-openapi/runtime/middleware/parameter.go index 5301b4c3340..7d630d6cce6 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/parameter.go +++ b/vendor/github.com/go-openapi/runtime/middleware/parameter.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware @@ -192,34 +181,34 @@ func (p *untypedParamBinder) Bind(request *http.Request, routeParams RouteParams func (p *untypedParamBinder) typeForSchema(tpe, format string, items *spec.Items) reflect.Type { switch tpe { case "boolean": - return reflect.TypeOf(true) + return reflect.TypeFor[bool]() case typeString: if tt, ok := p.formats.GetType(format); ok { return tt } - return reflect.TypeOf("") + return reflect.TypeFor[string]() case "integer": switch format { case "int8": - return reflect.TypeOf(int8(0)) + return reflect.TypeFor[int8]() case "int16": - return reflect.TypeOf(int16(0)) + return reflect.TypeFor[int16]() case "int32": - return reflect.TypeOf(int32(0)) + return reflect.TypeFor[int32]() case "int64": - return reflect.TypeOf(int64(0)) + return reflect.TypeFor[int64]() default: - return reflect.TypeOf(int64(0)) + return reflect.TypeFor[int64]() } case "number": switch format { case "float": - return reflect.TypeOf(float32(0)) + return reflect.TypeFor[float32]() case "double": - return reflect.TypeOf(float64(0)) + return reflect.TypeFor[float64]() } case typeArray: @@ -233,10 +222,10 @@ func (p *untypedParamBinder) typeForSchema(tpe, format string, items *spec.Items return reflect.MakeSlice(reflect.SliceOf(itemsType), 0, 0).Type() case "file": - return reflect.TypeOf(&runtime.File{}).Elem() + return reflect.TypeFor[runtime.File]() case "object": - return reflect.TypeOf(map[string]interface{}{}) + return reflect.TypeFor[map[string]any]() } return nil } @@ -279,7 +268,7 @@ func (p *untypedParamBinder) bindValue(data []string, hasKey bool, target reflec return p.setFieldValue(target, p.parameter.Default, d, hasKey) } -func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue interface{}, data string, hasKey bool) error { //nolint:gocyclo +func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue any, data string, hasKey bool) error { //nolint:gocyclo tpe := p.parameter.Type if p.parameter.Format != "" { tpe = p.parameter.Format @@ -341,7 +330,7 @@ func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue in case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: if data == "" { if target.CanSet() { - rd := defVal.Convert(reflect.TypeOf(int64(0))) + rd := defVal.Convert(reflect.TypeFor[int64]()) target.SetInt(rd.Int()) } return nil @@ -360,7 +349,7 @@ func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue in case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: if data == "" { if target.CanSet() { - rd := defVal.Convert(reflect.TypeOf(uint64(0))) + rd := defVal.Convert(reflect.TypeFor[uint64]()) target.SetUint(rd.Uint()) } return nil @@ -379,7 +368,7 @@ func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue in case reflect.Float32, reflect.Float64: if data == "" { if target.CanSet() { - rd := defVal.Convert(reflect.TypeOf(float64(0))) + rd := defVal.Convert(reflect.TypeFor[float64]()) target.SetFloat(rd.Float()) } return nil @@ -426,7 +415,7 @@ func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue in return nil } -func (p *untypedParamBinder) tryUnmarshaler(target reflect.Value, defaultValue interface{}, data string) (bool, error) { +func (p *untypedParamBinder) tryUnmarshaler(target reflect.Value, defaultValue any, data string) (bool, error) { if !target.CanSet() { return false, nil } @@ -458,7 +447,7 @@ func (p *untypedParamBinder) readFormattedSliceFieldValue(data string, target re return stringutils.SplitByFormat(data, p.parameter.CollectionFormat), false, nil } -func (p *untypedParamBinder) setSliceFieldValue(target reflect.Value, defaultValue interface{}, data []string, hasKey bool) error { +func (p *untypedParamBinder) setSliceFieldValue(target reflect.Value, defaultValue any, data []string, hasKey bool) error { sz := len(data) if (!hasKey || (!p.parameter.AllowEmptyValue && (sz == 0 || (sz == 1 && data[0] == "")))) && p.parameter.Required && defaultValue == nil { return errors.Required(p.Name, p.parameter.In, data) diff --git a/vendor/github.com/go-openapi/runtime/middleware/rapidoc.go b/vendor/github.com/go-openapi/runtime/middleware/rapidoc.go index ef75e7441fc..6039a26f33e 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/rapidoc.go +++ b/vendor/github.com/go-openapi/runtime/middleware/rapidoc.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package middleware import ( diff --git a/vendor/github.com/go-openapi/runtime/middleware/redoc.go b/vendor/github.com/go-openapi/runtime/middleware/redoc.go index b96b01e7f3f..cbaec73c438 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/redoc.go +++ b/vendor/github.com/go-openapi/runtime/middleware/redoc.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package middleware import ( diff --git a/vendor/github.com/go-openapi/runtime/middleware/request.go b/vendor/github.com/go-openapi/runtime/middleware/request.go index 577e4a0f107..52facfefcd2 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/request.go +++ b/vendor/github.com/go-openapi/runtime/middleware/request.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware @@ -50,7 +39,7 @@ func NewUntypedRequestBinder(parameters map[string]spec.Parameter, spec *spec.Sw } // Bind perform the databinding and validation -func (o *UntypedRequestBinder) Bind(request *http.Request, routeParams RouteParams, consumer runtime.Consumer, data interface{}) error { +func (o *UntypedRequestBinder) Bind(request *http.Request, routeParams RouteParams, consumer runtime.Consumer, data any) error { val := reflect.Indirect(reflect.ValueOf(data)) isMap := val.Kind() == reflect.Map var result []error @@ -68,9 +57,9 @@ func (o *UntypedRequestBinder) Bind(request *http.Request, routeParams RoutePara tpe := binder.Type() if tpe == nil { if param.Schema.Type.Contains(typeArray) { - tpe = reflect.TypeOf([]interface{}{}) + tpe = reflect.TypeFor[[]any]() } else { - tpe = reflect.TypeOf(map[string]interface{}{}) + tpe = reflect.TypeFor[map[string]any]() } } target = reflect.Indirect(reflect.New(tpe)) diff --git a/vendor/github.com/go-openapi/runtime/middleware/router.go b/vendor/github.com/go-openapi/runtime/middleware/router.go index 0f9317903c7..16816580da8 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/router.go +++ b/vendor/github.com/go-openapi/runtime/middleware/router.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware @@ -208,13 +197,13 @@ func (ra *RouteAuthenticator) CommonScopes() []string { } // Authenticate Authenticator interface implementation -func (ra *RouteAuthenticator) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) { +func (ra *RouteAuthenticator) Authenticate(req *http.Request, route *MatchedRoute) (bool, any, error) { if ra.allowAnonymous { route.Authenticator = ra return true, nil, nil } // iterate in proper order - var lastResult interface{} + var lastResult any for _, scheme := range ra.Schemes { if authenticator, ok := ra.Authenticator[scheme]; ok { applies, princ, err := authenticator.Authenticate(&security.ScopedAuthRequest{ @@ -287,7 +276,7 @@ func (ras RouteAuthenticators) AllowsAnonymous() bool { } // Authenticate method implemention so this collection can be used as authenticator -func (ras RouteAuthenticators) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) { +func (ras RouteAuthenticators) Authenticate(req *http.Request, route *MatchedRoute) (bool, any, error) { var lastError error var allowsAnon bool var anonAuth RouteAuthenticator diff --git a/vendor/github.com/go-openapi/runtime/middleware/security.go b/vendor/github.com/go-openapi/runtime/middleware/security.go index 2b061caefcb..37ecfa6fd4e 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/security.go +++ b/vendor/github.com/go-openapi/runtime/middleware/security.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware diff --git a/vendor/github.com/go-openapi/runtime/middleware/spec.go b/vendor/github.com/go-openapi/runtime/middleware/spec.go index 87e17e34249..9cc9940aaa5 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/spec.go +++ b/vendor/github.com/go-openapi/runtime/middleware/spec.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go index ec3c10cbafa..b25a3a2cff7 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package middleware import ( diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go index e81212f71c8..879bdbaadea 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package middleware import ( diff --git a/vendor/github.com/go-openapi/runtime/middleware/ui_options.go b/vendor/github.com/go-openapi/runtime/middleware/ui_options.go index 7a5fb16f633..cf2f673d3cb 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/ui_options.go +++ b/vendor/github.com/go-openapi/runtime/middleware/ui_options.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package middleware import ( @@ -39,7 +42,7 @@ type uiOptions struct { // toCommonUIOptions converts any UI option type to retain the common options. // // This uses gob encoding/decoding to convert common fields from one struct to another. -func toCommonUIOptions(opts interface{}) uiOptions { +func toCommonUIOptions(opts any) uiOptions { var buf bytes.Buffer enc := gob.NewEncoder(&buf) dec := gob.NewDecoder(&buf) diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go index a98d6690a4f..774da0ba0c8 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go +++ b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package untyped diff --git a/vendor/github.com/go-openapi/runtime/middleware/validation.go b/vendor/github.com/go-openapi/runtime/middleware/validation.go index 3879d754ee7..ed026d626ba 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/validation.go +++ b/vendor/github.com/go-openapi/runtime/middleware/validation.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package middleware diff --git a/vendor/github.com/go-openapi/runtime/request.go b/vendor/github.com/go-openapi/runtime/request.go index 203dab2f1d0..aab7b8c055a 100644 --- a/vendor/github.com/go-openapi/runtime/request.go +++ b/vendor/github.com/go-openapi/runtime/request.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime diff --git a/vendor/github.com/go-openapi/runtime/security/authenticator.go b/vendor/github.com/go-openapi/runtime/security/authenticator.go index def3746e20c..b5b7904dc1e 100644 --- a/vendor/github.com/go-openapi/runtime/security/authenticator.go +++ b/vendor/github.com/go-openapi/runtime/security/authenticator.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package security @@ -31,8 +20,8 @@ const ( ) // HttpAuthenticator is a function that authenticates a HTTP request -func HttpAuthenticator(handler func(*http.Request) (bool, interface{}, error)) runtime.Authenticator { //nolint:revive - return runtime.AuthenticatorFunc(func(params interface{}) (bool, interface{}, error) { +func HttpAuthenticator(handler func(*http.Request) (bool, any, error)) runtime.Authenticator { //nolint:revive + return runtime.AuthenticatorFunc(func(params any) (bool, any, error) { if request, ok := params.(*http.Request); ok { return handler(request) } @@ -44,8 +33,8 @@ func HttpAuthenticator(handler func(*http.Request) (bool, interface{}, error)) r } // ScopedAuthenticator is a function that authenticates a HTTP request against a list of valid scopes -func ScopedAuthenticator(handler func(*ScopedAuthRequest) (bool, interface{}, error)) runtime.Authenticator { - return runtime.AuthenticatorFunc(func(params interface{}) (bool, interface{}, error) { +func ScopedAuthenticator(handler func(*ScopedAuthRequest) (bool, any, error)) runtime.Authenticator { + return runtime.AuthenticatorFunc(func(params any) (bool, any, error) { if request, ok := params.(*ScopedAuthRequest); ok { return handler(request) } @@ -54,22 +43,22 @@ func ScopedAuthenticator(handler func(*ScopedAuthRequest) (bool, interface{}, er } // UserPassAuthentication authentication function -type UserPassAuthentication func(string, string) (interface{}, error) +type UserPassAuthentication func(string, string) (any, error) // UserPassAuthenticationCtx authentication function with context.Context -type UserPassAuthenticationCtx func(context.Context, string, string) (context.Context, interface{}, error) +type UserPassAuthenticationCtx func(context.Context, string, string) (context.Context, any, error) // TokenAuthentication authentication function -type TokenAuthentication func(string) (interface{}, error) +type TokenAuthentication func(string) (any, error) // TokenAuthenticationCtx authentication function with context.Context -type TokenAuthenticationCtx func(context.Context, string) (context.Context, interface{}, error) +type TokenAuthenticationCtx func(context.Context, string) (context.Context, any, error) // ScopedTokenAuthentication authentication function -type ScopedTokenAuthentication func(string, []string) (interface{}, error) +type ScopedTokenAuthentication func(string, []string) (any, error) // ScopedTokenAuthenticationCtx authentication function with context.Context -type ScopedTokenAuthenticationCtx func(context.Context, string, []string) (context.Context, interface{}, error) +type ScopedTokenAuthenticationCtx func(context.Context, string, []string) (context.Context, any, error) var DefaultRealmName = "API" @@ -115,7 +104,7 @@ func BasicAuthRealm(realm string, authenticate UserPassAuthentication) runtime.A realm = DefaultRealmName } - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + return HttpAuthenticator(func(r *http.Request) (bool, any, error) { if usr, pass, ok := r.BasicAuth(); ok { p, err := authenticate(usr, pass) if err != nil { @@ -139,7 +128,7 @@ func BasicAuthRealmCtx(realm string, authenticate UserPassAuthenticationCtx) run realm = DefaultRealmName } - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + return HttpAuthenticator(func(r *http.Request) (bool, any, error) { if usr, pass, ok := r.BasicAuth(); ok { ctx, p, err := authenticate(r.Context(), usr, pass) if err != nil { @@ -170,7 +159,7 @@ func APIKeyAuth(name, in string, authenticate TokenAuthentication) runtime.Authe getToken = func(r *http.Request) string { return r.URL.Query().Get(name) } } - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + return HttpAuthenticator(func(r *http.Request) (bool, any, error) { token := getToken(r) if token == "" { return false, nil, nil @@ -198,7 +187,7 @@ func APIKeyAuthCtx(name, in string, authenticate TokenAuthenticationCtx) runtime getToken = func(r *http.Request) string { return r.URL.Query().Get(name) } } - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + return HttpAuthenticator(func(r *http.Request) (bool, any, error) { token := getToken(r) if token == "" { return false, nil, nil @@ -219,11 +208,11 @@ type ScopedAuthRequest struct { // BearerAuth for use with oauth2 flows func BearerAuth(name string, authenticate ScopedTokenAuthentication) runtime.Authenticator { const prefix = "Bearer " - return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { + return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, any, error) { var token string hdr := r.Request.Header.Get(runtime.HeaderAuthorization) - if strings.HasPrefix(hdr, prefix) { - token = strings.TrimPrefix(hdr, prefix) + if after, ok := strings.CutPrefix(hdr, prefix); ok { + token = after } if token == "" { qs := r.Request.URL.Query() @@ -249,11 +238,11 @@ func BearerAuth(name string, authenticate ScopedTokenAuthentication) runtime.Aut // BearerAuthCtx for use with oauth2 flows with support for context.Context. func BearerAuthCtx(name string, authenticate ScopedTokenAuthenticationCtx) runtime.Authenticator { const prefix = "Bearer " - return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { + return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, any, error) { var token string hdr := r.Request.Header.Get(runtime.HeaderAuthorization) - if strings.HasPrefix(hdr, prefix) { - token = strings.TrimPrefix(hdr, prefix) + if after, ok := strings.CutPrefix(hdr, prefix); ok { + token = after } if token == "" { qs := r.Request.URL.Query() diff --git a/vendor/github.com/go-openapi/runtime/security/authorizer.go b/vendor/github.com/go-openapi/runtime/security/authorizer.go index 00c1a4d6a4c..69bd497a3c2 100644 --- a/vendor/github.com/go-openapi/runtime/security/authorizer.go +++ b/vendor/github.com/go-openapi/runtime/security/authorizer.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package security @@ -23,5 +12,5 @@ import ( // Authorized provides a default implementation of the Authorizer interface where all // requests are authorized (successful) func Authorized() runtime.Authorizer { - return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil }) + return runtime.AuthorizerFunc(func(_ *http.Request, _ any) error { return nil }) } diff --git a/vendor/github.com/go-openapi/runtime/statuses.go b/vendor/github.com/go-openapi/runtime/statuses.go index 3b011a0bff1..7e10a5a56c2 100644 --- a/vendor/github.com/go-openapi/runtime/statuses.go +++ b/vendor/github.com/go-openapi/runtime/statuses.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime diff --git a/vendor/github.com/go-openapi/runtime/text.go b/vendor/github.com/go-openapi/runtime/text.go index d8dee9410cb..2b8e4ac09d0 100644 --- a/vendor/github.com/go-openapi/runtime/text.go +++ b/vendor/github.com/go-openapi/runtime/text.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -27,7 +16,7 @@ import ( // TextConsumer creates a new text consumer func TextConsumer() Consumer { - return ConsumerFunc(func(reader io.Reader, data interface{}) error { + return ConsumerFunc(func(reader io.Reader, data any) error { if reader == nil { return errors.New("TextConsumer requires a reader") // early exit } @@ -69,7 +58,7 @@ func TextConsumer() Consumer { // TextProducer creates a new text producer func TextProducer() Producer { - return ProducerFunc(func(writer io.Writer, data interface{}) error { + return ProducerFunc(func(writer io.Writer, data any) error { if writer == nil { return errors.New("TextProducer requires a writer") // early exit } diff --git a/vendor/github.com/go-openapi/runtime/values.go b/vendor/github.com/go-openapi/runtime/values.go index 11f5732af4e..19894e78451 100644 --- a/vendor/github.com/go-openapi/runtime/values.go +++ b/vendor/github.com/go-openapi/runtime/values.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package runtime // Values typically represent parameters on a http request. diff --git a/vendor/github.com/go-openapi/runtime/xml.go b/vendor/github.com/go-openapi/runtime/xml.go index 821c7393dfb..5060b5c8e91 100644 --- a/vendor/github.com/go-openapi/runtime/xml.go +++ b/vendor/github.com/go-openapi/runtime/xml.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package runtime @@ -21,7 +10,7 @@ import ( // XMLConsumer creates a new XML consumer func XMLConsumer() Consumer { - return ConsumerFunc(func(reader io.Reader, data interface{}) error { + return ConsumerFunc(func(reader io.Reader, data any) error { dec := xml.NewDecoder(reader) return dec.Decode(data) }) @@ -29,7 +18,7 @@ func XMLConsumer() Consumer { // XMLProducer creates a new XML producer func XMLProducer() Producer { - return ProducerFunc(func(writer io.Writer, data interface{}) error { + return ProducerFunc(func(writer io.Writer, data any) error { enc := xml.NewEncoder(writer) return enc.Encode(data) }) diff --git a/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go b/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go index 467408c4f66..ca63430e0b7 100644 --- a/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go +++ b/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package yamlpc diff --git a/vendor/github.com/go-openapi/strfmt/.golangci.yml b/vendor/github.com/go-openapi/strfmt/.golangci.yml index 7cea1af8b52..1ad5adf47e6 100644 --- a/vendor/github.com/go-openapi/strfmt/.golangci.yml +++ b/vendor/github.com/go-openapi/strfmt/.golangci.yml @@ -16,7 +16,7 @@ linters: - godox - gosmopolitan - inamedparam - #- intrange # disabled while < go1.22 + - intrange - ireturn - lll - musttag diff --git a/vendor/github.com/go-openapi/strfmt/README.md b/vendor/github.com/go-openapi/strfmt/README.md index f6b39c6c56c..de5afe13760 100644 --- a/vendor/github.com/go-openapi/strfmt/README.md +++ b/vendor/github.com/go-openapi/strfmt/README.md @@ -35,7 +35,7 @@ It also provides convenient extensions to go-openapi users. - mac (e.g "01:02:03:04:05:06") - rgbcolor (e.g. "rgb(100,100,100)") - ssn - - uuid, uuid3, uuid4, uuid5 + - uuid, uuid3, uuid4, uuid5, uuid7 - cidr (e.g. "192.0.2.1/24", "2001:db8:a0b:12f0::1/32") - ulid (e.g. "00000PP9HGSBSSDZ1JTEXBJ0PW", [spec](https://github.com/ulid/spec)) @@ -81,7 +81,12 @@ List of defined types: - SSN - URI - UUID -- UUID3 -- UUID4 -- UUID5 +- [UUID3](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-3) +- [UUID4](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-4) +- [UUID5](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-5) +- [UUID7](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-7) - [ULID](https://github.com/ulid/spec) + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). diff --git a/vendor/github.com/go-openapi/strfmt/bson.go b/vendor/github.com/go-openapi/strfmt/bson.go index 78d6e073587..0eec8f6432c 100644 --- a/vendor/github.com/go-openapi/strfmt/bson.go +++ b/vendor/github.com/go-openapi/strfmt/bson.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -18,9 +7,6 @@ import ( "database/sql/driver" "fmt" - "go.mongodb.org/mongo-driver/bson" - - "go.mongodb.org/mongo-driver/bson/bsontype" bsonprim "go.mongodb.org/mongo-driver/bson/primitive" ) @@ -75,7 +61,7 @@ func (id *ObjectId) UnmarshalText(data []byte) error { // validation is performe } // Scan read a value from a database driver -func (id *ObjectId) Scan(raw interface{}) error { +func (id *ObjectId) Scan(raw any) error { var data []byte switch v := raw.(type) { case []byte: @@ -113,42 +99,6 @@ func (id *ObjectId) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON renders the object id as a BSON document -func (id ObjectId) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": bsonprim.ObjectID(id)}) -} - -// UnmarshalBSON reads the objectId from a BSON document -func (id *ObjectId) UnmarshalBSON(data []byte) error { - var obj struct { - Data bsonprim.ObjectID - } - if err := bson.Unmarshal(data, &obj); err != nil { - return err - } - *id = ObjectId(obj.Data) - return nil -} - -// MarshalBSONValue is an interface implemented by types that can marshal themselves -// into a BSON document represented as bytes. The bytes returned must be a valid -// BSON document if the error is nil. -func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) { - oid := bsonprim.ObjectID(id) - return bson.TypeObjectID, oid[:], nil -} - -// UnmarshalBSONValue is an interface implemented by types that can unmarshal a -// BSON value representation of themselves. The BSON bytes and type can be -// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it -// wishes to retain the data after returning. -func (id *ObjectId) UnmarshalBSONValue(_ bsontype.Type, data []byte) error { - var oid bsonprim.ObjectID - copy(oid[:], data) - *id = ObjectId(oid) - return nil -} - // DeepCopyInto copies the receiver and writes its value into out. func (id *ObjectId) DeepCopyInto(out *ObjectId) { *out = *id diff --git a/vendor/github.com/go-openapi/strfmt/date.go b/vendor/github.com/go-openapi/strfmt/date.go index a8f52ff354d..8aa17b8ea55 100644 --- a/vendor/github.com/go-openapi/strfmt/date.go +++ b/vendor/github.com/go-openapi/strfmt/date.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -19,8 +8,6 @@ import ( "encoding/json" "fmt" "time" - - "go.mongodb.org/mongo-driver/bson" ) func init() { @@ -70,7 +57,7 @@ func (d Date) MarshalText() ([]byte, error) { } // Scan scans a Date value from database driver type. -func (d *Date) Scan(raw interface{}) error { +func (d *Date) Scan(raw any) error { switch v := raw.(type) { case []byte: return d.UnmarshalText(v) @@ -114,28 +101,6 @@ func (d *Date) UnmarshalJSON(data []byte) error { return nil } -func (d Date) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": d.String()}) -} - -func (d *Date) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if data, ok := m["data"].(string); ok { - rd, err := time.ParseInLocation(RFC3339FullDate, data, DefaultTimeLocation) - if err != nil { - return err - } - *d = Date(rd) - return nil - } - - return fmt.Errorf("couldn't unmarshal bson bytes value as Date: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (d *Date) DeepCopyInto(out *Date) { *out = *d diff --git a/vendor/github.com/go-openapi/strfmt/default.go b/vendor/github.com/go-openapi/strfmt/default.go index 02e11122937..8a80cfbdb8a 100644 --- a/vendor/github.com/go-openapi/strfmt/default.go +++ b/vendor/github.com/go-openapi/strfmt/default.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -19,14 +8,15 @@ import ( "encoding/base64" "encoding/json" "fmt" + "net" "net/mail" "net/netip" + "net/url" + "regexp" "strconv" "strings" - "github.com/asaskevich/govalidator" "github.com/google/uuid" - "go.mongodb.org/mongo-driver/bson" "golang.org/x/net/idna" ) @@ -60,10 +50,33 @@ const ( // // Deprecated: strfmt no longer uses regular expressions to validate UUIDs. UUID5Pattern = `(?i)(^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)|(^[0-9a-f]{12}5[0-9a-f]{3}[89ab][0-9a-f]{15}$)` + + isbn10Pattern string = "^(?:[0-9]{9}X|[0-9]{10})$" + isbn13Pattern string = "^(?:[0-9]{13})$" + usCardPattern string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" + ssnPattern string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` + hexColorPattern string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + rgbColorPattern string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" +) + +const ( + isbnVersion10 = 10 + isbnVersion13 = 13 + decimalBase = 10 ) -var idnaHostChecker = idna.New( - idna.ValidateForRegistration(), // shorthand for [idna.StrictDomainName], [idna.ValidateLabels], [idna.VerifyDNSLength], [idna.BidiRule] +var ( + idnaHostChecker = idna.New( + idna.ValidateForRegistration(), // shorthand for [idna.StrictDomainName], [idna.ValidateLabels], [idna.VerifyDNSLength], [idna.BidiRule] + ) + + whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`) + rxISBN10 = regexp.MustCompile(isbn10Pattern) + rxISBN13 = regexp.MustCompile(isbn13Pattern) + rxCreditCard = regexp.MustCompile(usCardPattern) + rxSSN = regexp.MustCompile(ssnPattern) + rxHexcolor = regexp.MustCompile(hexColorPattern) + rxRGBcolor = regexp.MustCompile(rgbColorPattern) ) // IsHostname returns true when the string is a valid hostname. @@ -322,6 +335,7 @@ const ( uuidV3 = 3 uuidV4 = 4 uuidV5 = 5 + uuidV7 = 7 ) // IsUUID3 returns true is the string matches a UUID v3, upper case is allowed @@ -342,6 +356,12 @@ func IsUUID5(str string) bool { return err == nil && id.Version() == uuid.Version(uuidV5) } +// IsUUID7 returns true is the string matches a UUID v7, upper case is allowed +func IsUUID7(str string) bool { + id, err := uuid.Parse(str) + return err == nil && id.Version() == uuid.Version(uuidV7) +} + // IsEmail validates an email address. func IsEmail(str string) bool { addr, e := mail.ParseAddress(str) @@ -370,8 +390,9 @@ func init() { // - uuid3 // - uuid4 // - uuid5 + // - uuid7 u := URI("") - Default.Add("uri", &u, govalidator.IsRequestURI) + Default.Add("uri", &u, isRequestURI) eml := Email("") Default.Add("email", &eml, IsEmail) @@ -380,16 +401,16 @@ func init() { Default.Add("hostname", &hn, IsHostname) ip4 := IPv4("") - Default.Add("ipv4", &ip4, govalidator.IsIPv4) + Default.Add("ipv4", &ip4, isIPv4) ip6 := IPv6("") - Default.Add("ipv6", &ip6, govalidator.IsIPv6) + Default.Add("ipv6", &ip6, isIPv6) cidr := CIDR("") - Default.Add("cidr", &cidr, govalidator.IsCIDR) + Default.Add("cidr", &cidr, isCIDR) mac := MAC("") - Default.Add("mac", &mac, govalidator.IsMAC) + Default.Add("mac", &mac, isMAC) uid := UUID("") Default.Add("uuid", &uid, IsUUID) @@ -403,29 +424,32 @@ func init() { uid5 := UUID5("") Default.Add("uuid5", &uid5, IsUUID5) + uid7 := UUID7("") + Default.Add("uuid7", &uid7, IsUUID7) + isbn := ISBN("") - Default.Add("isbn", &isbn, func(str string) bool { return govalidator.IsISBN10(str) || govalidator.IsISBN13(str) }) + Default.Add("isbn", &isbn, func(str string) bool { return isISBN10(str) || isISBN13(str) }) isbn10 := ISBN10("") - Default.Add("isbn10", &isbn10, govalidator.IsISBN10) + Default.Add("isbn10", &isbn10, isISBN10) isbn13 := ISBN13("") - Default.Add("isbn13", &isbn13, govalidator.IsISBN13) + Default.Add("isbn13", &isbn13, isISBN13) cc := CreditCard("") - Default.Add("creditcard", &cc, govalidator.IsCreditCard) + Default.Add("creditcard", &cc, isCreditCard) ssn := SSN("") - Default.Add("ssn", &ssn, govalidator.IsSSN) + Default.Add("ssn", &ssn, isSSN) hc := HexColor("") - Default.Add("hexcolor", &hc, govalidator.IsHexcolor) + Default.Add("hexcolor", &hc, isHexcolor) rc := RGBColor("") - Default.Add("rgbcolor", &rc, govalidator.IsRGBcolor) + Default.Add("rgbcolor", &rc, isRGBcolor) b64 := Base64([]byte(nil)) - Default.Add("byte", &b64, govalidator.IsBase64) + Default.Add("byte", &b64, isBase64) pw := Password("") Default.Add("password", &pw, func(_ string) bool { return true }) @@ -460,7 +484,7 @@ func (b *Base64) UnmarshalText(data []byte) error { // validation is performed l } // Scan read a value from a database driver -func (b *Base64) Scan(raw interface{}) error { +func (b *Base64) Scan(raw any) error { switch v := raw.(type) { case []byte: dbuf := make([]byte, base64.StdEncoding.DecodedLen(len(v))) @@ -510,29 +534,6 @@ func (b *Base64) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (b Base64) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": b.String()}) -} - -// UnmarshalBSON document into this value -func (b *Base64) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if bd, ok := m["data"].(string); ok { - vb, err := base64.StdEncoding.DecodeString(bd) - if err != nil { - return err - } - *b = Base64(vb) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as base64: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (b *Base64) DeepCopyInto(out *Base64) { *out = *b @@ -565,7 +566,7 @@ func (u *URI) UnmarshalText(data []byte) error { // validation is performed late } // Scan read a value from a database driver -func (u *URI) Scan(raw interface{}) error { +func (u *URI) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = URI(string(v)) @@ -602,25 +603,6 @@ func (u *URI) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u URI) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *URI) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = URI(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as uri: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *URI) DeepCopyInto(out *URI) { *out = *u @@ -653,7 +635,7 @@ func (e *Email) UnmarshalText(data []byte) error { // validation is performed la } // Scan read a value from a database driver -func (e *Email) Scan(raw interface{}) error { +func (e *Email) Scan(raw any) error { switch v := raw.(type) { case []byte: *e = Email(string(v)) @@ -690,25 +672,6 @@ func (e *Email) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (e Email) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": e.String()}) -} - -// UnmarshalBSON document into this value -func (e *Email) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *e = Email(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as email: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (e *Email) DeepCopyInto(out *Email) { *out = *e @@ -741,7 +704,7 @@ func (h *Hostname) UnmarshalText(data []byte) error { // validation is performed } // Scan read a value from a database driver -func (h *Hostname) Scan(raw interface{}) error { +func (h *Hostname) Scan(raw any) error { switch v := raw.(type) { case []byte: *h = Hostname(string(v)) @@ -778,25 +741,6 @@ func (h *Hostname) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (h Hostname) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": h.String()}) -} - -// UnmarshalBSON document into this value -func (h *Hostname) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *h = Hostname(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as hostname: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (h *Hostname) DeepCopyInto(out *Hostname) { *out = *h @@ -829,7 +773,7 @@ func (u *IPv4) UnmarshalText(data []byte) error { // validation is performed lat } // Scan read a value from a database driver -func (u *IPv4) Scan(raw interface{}) error { +func (u *IPv4) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = IPv4(string(v)) @@ -866,25 +810,6 @@ func (u *IPv4) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u IPv4) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *IPv4) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = IPv4(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as ipv4: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *IPv4) DeepCopyInto(out *IPv4) { *out = *u @@ -917,7 +842,7 @@ func (u *IPv6) UnmarshalText(data []byte) error { // validation is performed lat } // Scan read a value from a database driver -func (u *IPv6) Scan(raw interface{}) error { +func (u *IPv6) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = IPv6(string(v)) @@ -954,25 +879,6 @@ func (u *IPv6) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u IPv6) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *IPv6) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = IPv6(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as ipv6: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *IPv6) DeepCopyInto(out *IPv6) { *out = *u @@ -1005,7 +911,7 @@ func (u *CIDR) UnmarshalText(data []byte) error { // validation is performed lat } // Scan read a value from a database driver -func (u *CIDR) Scan(raw interface{}) error { +func (u *CIDR) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = CIDR(string(v)) @@ -1042,25 +948,6 @@ func (u *CIDR) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u CIDR) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *CIDR) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = CIDR(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as CIDR: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *CIDR) DeepCopyInto(out *CIDR) { *out = *u @@ -1093,7 +980,7 @@ func (u *MAC) UnmarshalText(data []byte) error { // validation is performed late } // Scan read a value from a database driver -func (u *MAC) Scan(raw interface{}) error { +func (u *MAC) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = MAC(string(v)) @@ -1130,25 +1017,6 @@ func (u *MAC) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u MAC) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *MAC) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = MAC(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as MAC: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *MAC) DeepCopyInto(out *MAC) { *out = *u @@ -1181,7 +1049,7 @@ func (u *UUID) UnmarshalText(data []byte) error { // validation is performed lat } // Scan read a value from a database driver -func (u *UUID) Scan(raw interface{}) error { +func (u *UUID) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = UUID(string(v)) @@ -1221,25 +1089,6 @@ func (u *UUID) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u UUID) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *UUID) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = UUID(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as UUID: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *UUID) DeepCopyInto(out *UUID) { *out = *u @@ -1272,7 +1121,7 @@ func (u *UUID3) UnmarshalText(data []byte) error { // validation is performed la } // Scan read a value from a database driver -func (u *UUID3) Scan(raw interface{}) error { +func (u *UUID3) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = UUID3(string(v)) @@ -1312,25 +1161,6 @@ func (u *UUID3) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u UUID3) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *UUID3) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = UUID3(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as UUID3: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *UUID3) DeepCopyInto(out *UUID3) { *out = *u @@ -1363,7 +1193,7 @@ func (u *UUID4) UnmarshalText(data []byte) error { // validation is performed la } // Scan read a value from a database driver -func (u *UUID4) Scan(raw interface{}) error { +func (u *UUID4) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = UUID4(string(v)) @@ -1403,25 +1233,6 @@ func (u *UUID4) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u UUID4) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *UUID4) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = UUID4(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as UUID4: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *UUID4) DeepCopyInto(out *UUID4) { *out = *u @@ -1454,7 +1265,7 @@ func (u *UUID5) UnmarshalText(data []byte) error { // validation is performed la } // Scan read a value from a database driver -func (u *UUID5) Scan(raw interface{}) error { +func (u *UUID5) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = UUID5(string(v)) @@ -1494,36 +1305,89 @@ func (u *UUID5) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u UUID5) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) +// DeepCopyInto copies the receiver and writes its value into out. +func (u *UUID5) DeepCopyInto(out *UUID5) { + *out = *u } -// UnmarshalBSON document into this value -func (u *UUID5) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err +// DeepCopy copies the receiver into a new UUID5. +func (u *UUID5) DeepCopy() *UUID5 { + if u == nil { + return nil } + out := new(UUID5) + u.DeepCopyInto(out) + return out +} - if ud, ok := m["data"].(string); ok { - *u = UUID5(ud) +// UUID7 represents a uuid7 string format +// +// swagger:strfmt uuid7 +type UUID7 string + +// MarshalText turns this instance into text +func (u UUID7) MarshalText() ([]byte, error) { + return []byte(string(u)), nil +} + +// UnmarshalText hydrates this instance from text +func (u *UUID7) UnmarshalText(data []byte) error { // validation is performed later on + *u = UUID7(string(data)) + return nil +} + +// Scan read a value from a database driver +func (u *UUID7) Scan(raw any) error { + switch v := raw.(type) { + case []byte: + *u = UUID7(string(v)) + case string: + *u = UUID7(v) + default: + return fmt.Errorf("cannot sql.Scan() strfmt.UUID7 from: %#v: %w", v, ErrFormat) + } + + return nil +} + +// Value converts a value to a database driver value +func (u UUID7) Value() (driver.Value, error) { + return driver.Value(string(u)), nil +} + +func (u UUID7) String() string { + return string(u) +} + +// MarshalJSON returns the UUID as JSON +func (u UUID7) MarshalJSON() ([]byte, error) { + return json.Marshal(string(u)) +} + +// UnmarshalJSON sets the UUID from JSON +func (u *UUID7) UnmarshalJSON(data []byte) error { + if string(data) == jsonNull { return nil } - return fmt.Errorf("couldn't unmarshal bson bytes as UUID5: %w", ErrFormat) + var ustr string + if err := json.Unmarshal(data, &ustr); err != nil { + return err + } + *u = UUID7(ustr) + return nil } // DeepCopyInto copies the receiver and writes its value into out. -func (u *UUID5) DeepCopyInto(out *UUID5) { +func (u *UUID7) DeepCopyInto(out *UUID7) { *out = *u } -// DeepCopy copies the receiver into a new UUID5. -func (u *UUID5) DeepCopy() *UUID5 { +// DeepCopy copies the receiver into a new UUID7. +func (u *UUID7) DeepCopy() *UUID7 { if u == nil { return nil } - out := new(UUID5) + out := new(UUID7) u.DeepCopyInto(out) return out } @@ -1545,7 +1409,7 @@ func (u *ISBN) UnmarshalText(data []byte) error { // validation is performed lat } // Scan read a value from a database driver -func (u *ISBN) Scan(raw interface{}) error { +func (u *ISBN) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = ISBN(string(v)) @@ -1585,25 +1449,6 @@ func (u *ISBN) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u ISBN) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *ISBN) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = ISBN(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as ISBN: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *ISBN) DeepCopyInto(out *ISBN) { *out = *u @@ -1636,7 +1481,7 @@ func (u *ISBN10) UnmarshalText(data []byte) error { // validation is performed l } // Scan read a value from a database driver -func (u *ISBN10) Scan(raw interface{}) error { +func (u *ISBN10) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = ISBN10(string(v)) @@ -1676,25 +1521,6 @@ func (u *ISBN10) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u ISBN10) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *ISBN10) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = ISBN10(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as ISBN10: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *ISBN10) DeepCopyInto(out *ISBN10) { *out = *u @@ -1727,7 +1553,7 @@ func (u *ISBN13) UnmarshalText(data []byte) error { // validation is performed l } // Scan read a value from a database driver -func (u *ISBN13) Scan(raw interface{}) error { +func (u *ISBN13) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = ISBN13(string(v)) @@ -1767,25 +1593,6 @@ func (u *ISBN13) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u ISBN13) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *ISBN13) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = ISBN13(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as ISBN13: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *ISBN13) DeepCopyInto(out *ISBN13) { *out = *u @@ -1818,7 +1625,7 @@ func (u *CreditCard) UnmarshalText(data []byte) error { // validation is perform } // Scan read a value from a database driver -func (u *CreditCard) Scan(raw interface{}) error { +func (u *CreditCard) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = CreditCard(string(v)) @@ -1858,25 +1665,6 @@ func (u *CreditCard) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u CreditCard) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *CreditCard) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = CreditCard(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as CreditCard: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *CreditCard) DeepCopyInto(out *CreditCard) { *out = *u @@ -1909,7 +1697,7 @@ func (u *SSN) UnmarshalText(data []byte) error { // validation is performed late } // Scan read a value from a database driver -func (u *SSN) Scan(raw interface{}) error { +func (u *SSN) Scan(raw any) error { switch v := raw.(type) { case []byte: *u = SSN(string(v)) @@ -1949,25 +1737,6 @@ func (u *SSN) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u SSN) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *SSN) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *u = SSN(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as SSN: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *SSN) DeepCopyInto(out *SSN) { *out = *u @@ -2000,7 +1769,7 @@ func (h *HexColor) UnmarshalText(data []byte) error { // validation is performed } // Scan read a value from a database driver -func (h *HexColor) Scan(raw interface{}) error { +func (h *HexColor) Scan(raw any) error { switch v := raw.(type) { case []byte: *h = HexColor(string(v)) @@ -2040,25 +1809,6 @@ func (h *HexColor) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (h HexColor) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": h.String()}) -} - -// UnmarshalBSON document into this value -func (h *HexColor) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *h = HexColor(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as HexColor: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (h *HexColor) DeepCopyInto(out *HexColor) { *out = *h @@ -2091,7 +1841,7 @@ func (r *RGBColor) UnmarshalText(data []byte) error { // validation is performed } // Scan read a value from a database driver -func (r *RGBColor) Scan(raw interface{}) error { +func (r *RGBColor) Scan(raw any) error { switch v := raw.(type) { case []byte: *r = RGBColor(string(v)) @@ -2131,25 +1881,6 @@ func (r *RGBColor) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (r RGBColor) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": r.String()}) -} - -// UnmarshalBSON document into this value -func (r *RGBColor) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *r = RGBColor(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as RGBColor: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (r *RGBColor) DeepCopyInto(out *RGBColor) { *out = *r @@ -2183,7 +1914,7 @@ func (r *Password) UnmarshalText(data []byte) error { // validation is performed } // Scan read a value from a database driver -func (r *Password) Scan(raw interface{}) error { +func (r *Password) Scan(raw any) error { switch v := raw.(type) { case []byte: *r = Password(string(v)) @@ -2223,25 +1954,6 @@ func (r *Password) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (r Password) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": r.String()}) -} - -// UnmarshalBSON document into this value -func (r *Password) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - *r = Password(ud) - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as Password: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (r *Password) DeepCopyInto(out *Password) { *out = *r @@ -2256,3 +1968,143 @@ func (r *Password) DeepCopy() *Password { r.DeepCopyInto(out) return out } + +func isRequestURI(rawurl string) bool { + _, err := url.ParseRequestURI(rawurl) + return err == nil +} + +// isIPv4 checks if the string is an IP version 4. +func isIPv4(str string) bool { + ip := net.ParseIP(str) + return ip != nil && strings.Contains(str, ".") +} + +// isIPv6 checks if the string is an IP version 6. +func isIPv6(str string) bool { + ip := net.ParseIP(str) + return ip != nil && strings.Contains(str, ":") +} + +// isCIDR checks if the string is an valid CIDR notiation (IPV4 & IPV6) +func isCIDR(str string) bool { + _, _, err := net.ParseCIDR(str) + return err == nil +} + +// isMAC checks if a string is valid MAC address. +// Possible MAC formats: +// 01:23:45:67:89:ab +// 01:23:45:67:89:ab:cd:ef +// 01-23-45-67-89-ab +// 01-23-45-67-89-ab-cd-ef +// 0123.4567.89ab +// 0123.4567.89ab.cdef +func isMAC(str string) bool { + _, err := net.ParseMAC(str) + return err == nil +} + +// isISBN checks if the string is an ISBN (version 10 or 13). +// If version value is not equal to 10 or 13, it will be checks both variants. +func isISBN(str string, version int) bool { + sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") + var checksum int32 + var i int32 + + switch version { + case isbnVersion10: + if !rxISBN10.MatchString(sanitized) { + return false + } + for i = range isbnVersion10 - 1 { + checksum += (i + 1) * int32(sanitized[i]-'0') + } + if sanitized[isbnVersion10-1] == 'X' { + checksum += isbnVersion10 * isbnVersion10 + } else { + checksum += isbnVersion10 * int32(sanitized[isbnVersion10-1]-'0') + } + if checksum%(isbnVersion10+1) == 0 { + return true + } + return false + case isbnVersion13: + if !rxISBN13.MatchString(sanitized) { + return false + } + factor := []int32{1, 3} + for i = range isbnVersion13 - 1 { + checksum += factor[i%2] * int32(sanitized[i]-'0') + } + return (int32(sanitized[isbnVersion13-1]-'0'))-((decimalBase-(checksum%decimalBase))%decimalBase) == 0 + default: + return isISBN(str, isbnVersion10) || isISBN(str, isbnVersion13) + } +} + +// isISBN10 checks if the string is an ISBN version 10. +func isISBN10(str string) bool { + return isISBN(str, isbnVersion10) +} + +// isISBN13 checks if the string is an ISBN version 13. +func isISBN13(str string) bool { + return isISBN(str, isbnVersion13) +} + +// isCreditCard checks if the string is a credit card. +func isCreditCard(str string) bool { + sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") + if !rxCreditCard.MatchString(sanitized) { + return false + } + + number, err := strconv.ParseInt(sanitized, 0, 64) + if err != nil { + return false + } + number, lastDigit := number/decimalBase, number%decimalBase + + var sum int64 + for i := 0; number > 0; i++ { + digit := number % decimalBase + + if i%2 == 0 { + digit *= 2 + if digit > decimalBase-1 { + digit -= decimalBase - 1 + } + } + + sum += digit + number /= decimalBase + } + + return (sum+lastDigit)%decimalBase == 0 +} + +// isSSN will validate the given string as a U.S. Social Security Number +func isSSN(str string) bool { + if str == "" || len(str) != 11 { + return false + } + return rxSSN.MatchString(str) +} + +// isHexcolor checks if the string is a hexadecimal color. +func isHexcolor(str string) bool { + return rxHexcolor.MatchString(str) +} + +// isRGBcolor checks if the string is a valid RGB color in form rgb(RRR, GGG, BBB). +func isRGBcolor(str string) bool { + return rxRGBcolor.MatchString(str) +} + +// isBase64 checks if a string is base64 encoded. +func isBase64(str string) bool { + _, err := base64.StdEncoding.DecodeString(str) + + return err == nil +} diff --git a/vendor/github.com/go-openapi/strfmt/doc.go b/vendor/github.com/go-openapi/strfmt/doc.go index 41aebe6d51a..5825b72108e 100644 --- a/vendor/github.com/go-openapi/strfmt/doc.go +++ b/vendor/github.com/go-openapi/strfmt/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package strfmt contains custom string formats // diff --git a/vendor/github.com/go-openapi/strfmt/duration.go b/vendor/github.com/go-openapi/strfmt/duration.go index 749c4b561c2..908c1b02f3c 100644 --- a/vendor/github.com/go-openapi/strfmt/duration.go +++ b/vendor/github.com/go-openapi/strfmt/duration.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -23,8 +12,6 @@ import ( "strconv" "strings" "time" - - "go.mongodb.org/mongo-driver/bson" ) func init() { @@ -154,7 +141,7 @@ func ParseDuration(cand string) (time.Duration, error) { } // Scan reads a Duration value from database driver type. -func (d *Duration) Scan(raw interface{}) error { +func (d *Duration) Scan(raw any) error { switch v := raw.(type) { // TODO: case []byte: // ? case int64: @@ -203,28 +190,6 @@ func (d *Duration) UnmarshalJSON(data []byte) error { return nil } -func (d Duration) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": d.String()}) -} - -func (d *Duration) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if data, ok := m["data"].(string); ok { - rd, err := ParseDuration(data) - if err != nil { - return err - } - *d = Duration(rd) - return nil - } - - return fmt.Errorf("couldn't unmarshal bson bytes value as Date: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (d *Duration) DeepCopyInto(out *Duration) { *out = *d diff --git a/vendor/github.com/go-openapi/strfmt/errors.go b/vendor/github.com/go-openapi/strfmt/errors.go index 9a9240363de..9faa37cf2e5 100644 --- a/vendor/github.com/go-openapi/strfmt/errors.go +++ b/vendor/github.com/go-openapi/strfmt/errors.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package strfmt type strfmtError string diff --git a/vendor/github.com/go-openapi/strfmt/format.go b/vendor/github.com/go-openapi/strfmt/format.go index 73f83af9c92..d9d9e04c208 100644 --- a/vendor/github.com/go-openapi/strfmt/format.go +++ b/vendor/github.com/go-openapi/strfmt/format.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -18,6 +7,7 @@ import ( "encoding" "fmt" "reflect" + "slices" "strings" "sync" "time" @@ -32,27 +22,6 @@ var Default = NewSeededFormats(nil, nil) // Validator represents a validator for a string format. type Validator func(string) bool -// Format represents a string format. -// -// All implementations of Format provide a string representation and text -// marshaling/unmarshaling interface to be used by encoders (e.g. encoding/json). -type Format interface { - String() string - encoding.TextMarshaler - encoding.TextUnmarshaler -} - -// Registry is a registry of string formats, with a validation method. -type Registry interface { - Add(string, Format, Validator) bool - DelByName(string) bool - GetType(string) (reflect.Type, bool) - ContainsName(string) bool - Validates(string, string) bool - Parse(string, string) (any, error) - MapStructureHookFunc() mapstructure.DecodeHookFunc -} - // NewFormats creates a new formats registry seeded with the values from the default func NewFormats() Registry { //nolint:forcetypeassert @@ -64,10 +33,9 @@ func NewSeededFormats(seeds []knownFormat, normalizer NameNormalizer) Registry { if normalizer == nil { normalizer = DefaultNameNormalizer } - // copy here, don't modify original - d := append([]knownFormat(nil), seeds...) + // copy here, don't modify the original return &defaultFormats{ - data: d, + data: slices.Clone(seeds), normalizeName: normalizer, } } @@ -139,6 +107,8 @@ func (f *defaultFormats) MapStructureHookFunc() mapstructure.DecodeHookFunc { return UUID4(data), nil case "uuid5": return UUID5(data), nil + case "uuid7": + return UUID7(data), nil case "hostname": return Hostname(data), nil case "ipv4": diff --git a/vendor/github.com/go-openapi/strfmt/ifaces.go b/vendor/github.com/go-openapi/strfmt/ifaces.go new file mode 100644 index 00000000000..1b9e72c64eb --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/ifaces.go @@ -0,0 +1,32 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +package strfmt + +import ( + "encoding" + "reflect" + + "github.com/go-viper/mapstructure/v2" +) + +// Format represents a string format. +// +// All implementations of Format provide a string representation and text +// marshaling/unmarshaling interface to be used by encoders (e.g. encoding/json). +type Format interface { + String() string + encoding.TextMarshaler + encoding.TextUnmarshaler +} + +// Registry is a registry of string formats, with a validation method. +type Registry interface { + Add(string, Format, Validator) bool + DelByName(string) bool + GetType(string) (reflect.Type, bool) + ContainsName(string) bool + Validates(string, string) bool + Parse(string, string) (any, error) + MapStructureHookFunc() mapstructure.DecodeHookFunc +} diff --git a/vendor/github.com/go-openapi/strfmt/mongo.go b/vendor/github.com/go-openapi/strfmt/mongo.go new file mode 100644 index 00000000000..641fed9b1a6 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/mongo.go @@ -0,0 +1,646 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +package strfmt + +import ( + "encoding/base64" + "encoding/binary" + "fmt" + "time" + + "github.com/oklog/ulid" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/bsontype" + bsonprim "go.mongodb.org/mongo-driver/bson/primitive" +) + +var ( + _ bson.Marshaler = Date{} + _ bson.Unmarshaler = &Date{} + _ bson.Marshaler = Base64{} + _ bson.Unmarshaler = &Base64{} + _ bson.Marshaler = Duration(0) + _ bson.Unmarshaler = (*Duration)(nil) + _ bson.Marshaler = DateTime{} + _ bson.Unmarshaler = &DateTime{} + _ bson.Marshaler = ULID{} + _ bson.Unmarshaler = &ULID{} + _ bson.Marshaler = URI("") + _ bson.Unmarshaler = (*URI)(nil) + _ bson.Marshaler = Email("") + _ bson.Unmarshaler = (*Email)(nil) + _ bson.Marshaler = Hostname("") + _ bson.Unmarshaler = (*Hostname)(nil) + _ bson.Marshaler = IPv4("") + _ bson.Unmarshaler = (*IPv4)(nil) + _ bson.Marshaler = IPv6("") + _ bson.Unmarshaler = (*IPv6)(nil) + _ bson.Marshaler = CIDR("") + _ bson.Unmarshaler = (*CIDR)(nil) + _ bson.Marshaler = MAC("") + _ bson.Unmarshaler = (*MAC)(nil) + _ bson.Marshaler = Password("") + _ bson.Unmarshaler = (*Password)(nil) + _ bson.Marshaler = UUID("") + _ bson.Unmarshaler = (*UUID)(nil) + _ bson.Marshaler = UUID3("") + _ bson.Unmarshaler = (*UUID3)(nil) + _ bson.Marshaler = UUID4("") + _ bson.Unmarshaler = (*UUID4)(nil) + _ bson.Marshaler = UUID5("") + _ bson.Unmarshaler = (*UUID5)(nil) + _ bson.Marshaler = UUID7("") + _ bson.Unmarshaler = (*UUID7)(nil) + _ bson.Marshaler = ISBN("") + _ bson.Unmarshaler = (*ISBN)(nil) + _ bson.Marshaler = ISBN10("") + _ bson.Unmarshaler = (*ISBN10)(nil) + _ bson.Marshaler = ISBN13("") + _ bson.Unmarshaler = (*ISBN13)(nil) + _ bson.Marshaler = CreditCard("") + _ bson.Unmarshaler = (*CreditCard)(nil) + _ bson.Marshaler = SSN("") + _ bson.Unmarshaler = (*SSN)(nil) + _ bson.Marshaler = HexColor("") + _ bson.Unmarshaler = (*HexColor)(nil) + _ bson.Marshaler = RGBColor("") + _ bson.Unmarshaler = (*RGBColor)(nil) + _ bson.Marshaler = ObjectId{} + _ bson.Unmarshaler = &ObjectId{} + + _ bson.ValueMarshaler = DateTime{} + _ bson.ValueUnmarshaler = &DateTime{} + _ bson.ValueMarshaler = ObjectId{} + _ bson.ValueUnmarshaler = &ObjectId{} +) + +const ( + millisec = 1000 + microsec = 1_000_000 + bsonDateTimeSize = 8 +) + +func (d Date) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": d.String()}) +} + +func (d *Date) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if data, ok := m["data"].(string); ok { + rd, err := time.ParseInLocation(RFC3339FullDate, data, DefaultTimeLocation) + if err != nil { + return err + } + *d = Date(rd) + return nil + } + + return fmt.Errorf("couldn't unmarshal bson bytes value as Date: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (b Base64) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": b.String()}) +} + +// UnmarshalBSON document into this value +func (b *Base64) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if bd, ok := m["data"].(string); ok { + vb, err := base64.StdEncoding.DecodeString(bd) + if err != nil { + return err + } + *b = Base64(vb) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as base64: %w", ErrFormat) +} + +func (d Duration) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": d.String()}) +} + +func (d *Duration) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if data, ok := m["data"].(string); ok { + rd, err := ParseDuration(data) + if err != nil { + return err + } + *d = Duration(rd) + return nil + } + + return fmt.Errorf("couldn't unmarshal bson bytes value as Date: %w", ErrFormat) +} + +// MarshalBSON renders the DateTime as a BSON document +func (t DateTime) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": t}) +} + +// UnmarshalBSON reads the DateTime from a BSON document +func (t *DateTime) UnmarshalBSON(data []byte) error { + var obj struct { + Data DateTime + } + + if err := bson.Unmarshal(data, &obj); err != nil { + return err + } + + *t = obj.Data + + return nil +} + +// MarshalBSONValue is an interface implemented by types that can marshal themselves +// into a BSON document represented as bytes. The bytes returned must be a valid +// BSON document if the error is nil. +// +// Marshals a DateTime as a bson.TypeDateTime, an int64 representing +// milliseconds since epoch. +func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) { + // UnixNano cannot be used directly, the result of calling UnixNano on the zero + // Time is undefined. Thats why we use time.Nanosecond() instead. + + tNorm := NormalizeTimeForMarshal(time.Time(t)) + i64 := tNorm.Unix()*millisec + int64(tNorm.Nanosecond())/microsec + buf := make([]byte, bsonDateTimeSize) + binary.LittleEndian.PutUint64(buf, uint64(i64)) //nolint:gosec // it's okay to handle negative int64 this way + + return bson.TypeDateTime, buf, nil +} + +// UnmarshalBSONValue is an interface implemented by types that can unmarshal a +// BSON value representation of themselves. The BSON bytes and type can be +// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it +// wishes to retain the data after returning. +func (t *DateTime) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error { + if tpe == bson.TypeNull { + *t = DateTime{} + return nil + } + + if len(data) != bsonDateTimeSize { + return fmt.Errorf("bson date field length not exactly %d bytes: %w", bsonDateTimeSize, ErrFormat) + } + + i64 := int64(binary.LittleEndian.Uint64(data)) //nolint:gosec // it's okay if we overflow and get a negative datetime + *t = DateTime(time.Unix(i64/millisec, i64%millisec*microsec)) + + return nil +} + +// MarshalBSON document from this value +func (u ULID) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *ULID) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + id, err := ulid.ParseStrict(ud) + if err != nil { + return fmt.Errorf("couldn't parse bson bytes as ULID: %w: %w", err, ErrFormat) + } + u.ULID = id + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as ULID: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u URI) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *URI) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = URI(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as uri: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (e Email) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": e.String()}) +} + +// UnmarshalBSON document into this value +func (e *Email) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *e = Email(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as email: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (h Hostname) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": h.String()}) +} + +// UnmarshalBSON document into this value +func (h *Hostname) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *h = Hostname(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as hostname: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u IPv4) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *IPv4) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = IPv4(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as ipv4: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u IPv6) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *IPv6) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = IPv6(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as ipv6: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u CIDR) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *CIDR) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = CIDR(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as CIDR: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u MAC) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *MAC) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = MAC(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as MAC: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (r Password) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": r.String()}) +} + +// UnmarshalBSON document into this value +func (r *Password) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *r = Password(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as Password: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u UUID) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *UUID) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = UUID(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as UUID: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u UUID3) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *UUID3) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = UUID3(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as UUID3: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u UUID4) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *UUID4) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = UUID4(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as UUID4: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u UUID5) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *UUID5) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = UUID5(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as UUID5: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u UUID7) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *UUID7) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = UUID7(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as UUID7: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u ISBN) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *ISBN) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = ISBN(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as ISBN: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u ISBN10) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *ISBN10) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = ISBN10(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as ISBN10: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u ISBN13) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *ISBN13) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = ISBN13(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as ISBN13: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u CreditCard) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *CreditCard) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = CreditCard(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as CreditCard: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (u SSN) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *SSN) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *u = SSN(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as SSN: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (h HexColor) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": h.String()}) +} + +// UnmarshalBSON document into this value +func (h *HexColor) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *h = HexColor(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as HexColor: %w", ErrFormat) +} + +// MarshalBSON document from this value +func (r RGBColor) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": r.String()}) +} + +// UnmarshalBSON document into this value +func (r *RGBColor) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + *r = RGBColor(ud) + return nil + } + return fmt.Errorf("couldn't unmarshal bson bytes as RGBColor: %w", ErrFormat) +} + +// MarshalBSON renders the object id as a BSON document +func (id ObjectId) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": bsonprim.ObjectID(id)}) +} + +// UnmarshalBSON reads the objectId from a BSON document +func (id *ObjectId) UnmarshalBSON(data []byte) error { + var obj struct { + Data bsonprim.ObjectID + } + if err := bson.Unmarshal(data, &obj); err != nil { + return err + } + *id = ObjectId(obj.Data) + return nil +} + +// MarshalBSONValue is an interface implemented by types that can marshal themselves +// into a BSON document represented as bytes. The bytes returned must be a valid +// BSON document if the error is nil. +func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) { + oid := bsonprim.ObjectID(id) + return bson.TypeObjectID, oid[:], nil +} + +// UnmarshalBSONValue is an interface implemented by types that can unmarshal a +// BSON value representation of themselves. The BSON bytes and type can be +// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it +// wishes to retain the data after returning. +func (id *ObjectId) UnmarshalBSONValue(_ bsontype.Type, data []byte) error { + var oid bsonprim.ObjectID + copy(oid[:], data) + *id = ObjectId(oid) + return nil +} diff --git a/vendor/github.com/go-openapi/strfmt/time.go b/vendor/github.com/go-openapi/strfmt/time.go index 84e2412b937..8085aaf6965 100644 --- a/vendor/github.com/go-openapi/strfmt/time.go +++ b/vendor/github.com/go-openapi/strfmt/time.go @@ -1,31 +1,15 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt import ( "database/sql/driver" - "encoding/binary" "encoding/json" "fmt" "regexp" "strings" "time" - - "go.mongodb.org/mongo-driver/bson" - - "go.mongodb.org/mongo-driver/bson/bsontype" ) var ( @@ -178,7 +162,7 @@ func (t *DateTime) UnmarshalText(text []byte) error { } // Scan scans a DateTime value from database driver type. -func (t *DateTime) Scan(raw interface{}) error { +func (t *DateTime) Scan(raw any) error { // TODO: case int64: and case float64: ? switch v := raw.(type) { case []byte: @@ -224,69 +208,6 @@ func (t *DateTime) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON renders the DateTime as a BSON document -func (t DateTime) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": t}) -} - -// UnmarshalBSON reads the DateTime from a BSON document -func (t *DateTime) UnmarshalBSON(data []byte) error { - var obj struct { - Data DateTime - } - - if err := bson.Unmarshal(data, &obj); err != nil { - return err - } - - *t = obj.Data - - return nil -} - -const bsonDateLength = 8 - -// MarshalBSONValue is an interface implemented by types that can marshal themselves -// into a BSON document represented as bytes. The bytes returned must be a valid -// BSON document if the error is nil. -// -// Marshals a DateTime as a bsontype.DateTime, an int64 representing -// milliseconds since epoch. -func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) { - // UnixNano cannot be used directly, the result of calling UnixNano on the zero - // Time is undefined. That's why we use time.Nanosecond() instead. - tNorm := NormalizeTimeForMarshal(time.Time(t)) - i64 := tNorm.UnixMilli() - - buf := make([]byte, bsonDateLength) - // int64 -> uint64 conversion is safe here - binary.LittleEndian.PutUint64(buf, uint64(i64)) //nolint:gosec - - return bson.TypeDateTime, buf, nil -} - -// UnmarshalBSONValue is an interface implemented by types that can unmarshal a -// BSON value representation of themselves. The BSON bytes and type can be -// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it -// wishes to retain the data after returning. -func (t *DateTime) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error { - if tpe == bson.TypeNull { - *t = DateTime{} - return nil - } - - if len(data) != bsonDateLength { - return fmt.Errorf("bson date field length not exactly 8 bytes: %w", ErrFormat) - } - - // it's ok to get negative values after conversion - i64 := int64(binary.LittleEndian.Uint64(data)) //nolint:gosec - // TODO: Use bsonprim.DateTime.Time() method - *t = DateTime(time.UnixMilli(i64)) - - return nil -} - // DeepCopyInto copies the receiver and writes its value into out. func (t *DateTime) DeepCopyInto(out *DateTime) { *out = *t diff --git a/vendor/github.com/go-openapi/strfmt/ulid.go b/vendor/github.com/go-openapi/strfmt/ulid.go index 434eb01baa5..85c5b53e6c7 100644 --- a/vendor/github.com/go-openapi/strfmt/ulid.go +++ b/vendor/github.com/go-openapi/strfmt/ulid.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package strfmt import ( @@ -9,7 +12,6 @@ import ( "sync" "github.com/oklog/ulid" - "go.mongodb.org/mongo-driver/bson" ) // ULID represents a ulid string format @@ -28,12 +30,12 @@ type ULID struct { var ( ulidEntropyPool = sync.Pool{ - New: func() interface{} { + New: func() any { return cryptorand.Reader }, } - ULIDScanDefaultFunc = func(raw interface{}) (ULID, error) { + ULIDScanDefaultFunc = func(raw any) (ULID, error) { u := NewULIDZero() switch x := raw.(type) { case nil: @@ -111,7 +113,7 @@ func NewULID() (ULID, error) { } // GetULID returns underlying instance of ULID -func (u *ULID) GetULID() interface{} { +func (u *ULID) GetULID() any { return u.ULID } @@ -126,7 +128,7 @@ func (u *ULID) UnmarshalText(data []byte) error { // validation is performed lat } // Scan reads a value from a database driver -func (u *ULID) Scan(raw interface{}) error { +func (u *ULID) Scan(raw any) error { ul, err := ULIDScanOverrideFunc(raw) if err == nil { *u = ul @@ -165,29 +167,6 @@ func (u *ULID) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON document from this value -func (u ULID) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": u.String()}) -} - -// UnmarshalBSON document into this value -func (u *ULID) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if ud, ok := m["data"].(string); ok { - id, err := ulid.ParseStrict(ud) - if err != nil { - return fmt.Errorf("couldn't parse bson bytes as ULID: %w: %w", err, ErrFormat) - } - u.ULID = id - return nil - } - return fmt.Errorf("couldn't unmarshal bson bytes as ULID: %w", ErrFormat) -} - // DeepCopyInto copies the receiver and writes its value into out. func (u *ULID) DeepCopyInto(out *ULID) { *out = *u diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml index 4129e7e57ee..126264a6b89 100644 --- a/vendor/github.com/go-openapi/swag/.golangci.yml +++ b/vendor/github.com/go-openapi/swag/.golangci.yml @@ -21,6 +21,7 @@ linters: - ireturn - lll - musttag + - modernize - nestif - nlreturn - nonamedreturns diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md index 786b92fd3a2..371fd55fdc3 100644 --- a/vendor/github.com/go-openapi/swag/README.md +++ b/vendor/github.com/go-openapi/swag/README.md @@ -18,6 +18,7 @@ You may also use it standalone for your projects. * [Contents](#contents) * [Dependencies](#dependencies) * [Release Notes](#release-notes) +* [Licensing](#licensing) * [Note to contributors](#note-to-contributors) * [TODOs, suggestions and plans](#todos-suggestions-and-plans) @@ -62,6 +63,42 @@ dependencies outside of the standard library. ## Release notes +### v0.25.4 + +** mangling** + +Bug fix + +* [x] mangler may panic with pluralized overlapping initialisms + +Tests + +* [x] introduced fuzz tests + +### v0.25.3 + +** mangling** + +Bug fix + +* [x] mangler may panic with pluralized initialisms + +### v0.25.2 + +Minor changes due to internal maintenance that don't affect the behavior of the library. + +* [x] removed indirect test dependencies by switching all tests to `go-openapi/testify`, + a fork of `stretch/testify` with zero-dependencies. +* [x] improvements to CI to catch test reports. +* [x] modernized licensing annotations in source code, using the more compact SPDX annotations + rather than the full license terms. +* [x] simplified a bit JSON & YAML testing by using newly available assertions +* started the journey to an OpenSSF score card badge: + * [x] explicited permissions in CI workflows + * [x] published security policy + * pinned dependencies to github actions + * introduced fuzzing in tests + ### v0.25.1 * fixes a data race that could occur when using the standard library implementation of a JSON ordered map @@ -74,7 +111,7 @@ dependencies outside of the standard library. * removes the dependency to `mailru/easyjson` by default (#68) * functionality remains the same, but performance may somewhat degrade for applications that relied on `easyjson` - * users of the JSON or YAML utilities who want to use `easyjson` as their prefered JSON serializer library + * users of the JSON or YAML utilities who want to use `easyjson` as their preferred JSON serializer library will be able to do so by registering this the corresponding JSON adapter at runtime. See below. * ordered keys in JSON and YAML objects: this feature used to rely solely on `easyjson`. With this release, an implementation relying on the standard `encoding/json` is provided. @@ -96,10 +133,13 @@ Moving forward, we want to : The following would maintain how JSON utilities proposed by `swag` used work, up to `v0.24.1`. ```go - import "github.com/go-openapi/swag/jsonutils/adapters/easyjson/json" + import ( + "github.com/go-openapi/swag/jsonutils/adapters" + easyjson "github.com/go-openapi/swag/jsonutils/adapters/easyjson/json" + ) func init() { - json.Register() + easyjson.Register(adapters.Registry) } ``` @@ -107,6 +147,9 @@ Subsequent calls to `jsonutils.ReadJSON()` or `jsonutils.WriteJSON()` will switc whenever the passed data structures implement the `easyjson.Unmarshaler` or `easyjson.Marshaler` respectively, or fallback to the standard library. +For more details, you may also look at our +[integration tests](jsonutils/adapters/testintegration/integration_suite_test.go#29). + ### v0.24.0 With this release, we have largely modernized the API of `swag`: @@ -133,6 +176,10 @@ With this release, we have largely modernized the API of `swag`: --- +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + ## Note to contributors A mono-repo structure comes with some unavoidable extra pains... diff --git a/vendor/github.com/go-openapi/swag/SECURITY.md b/vendor/github.com/go-openapi/swag/SECURITY.md new file mode 100644 index 00000000000..72296a83135 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This policy outlines the commitment and practices of the go-openapi maintainers regarding security. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.25.x | :white_check_mark: | + +## Reporting a vulnerability + +If you become aware of a security vulnerability that affects the current repository, +please report it privately to the maintainers. + +Please follow the instructions provided by github to +[Privately report a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). + +TL;DR: on Github, navigate to the project's "Security" tab then click on "Report a vulnerability". diff --git a/vendor/github.com/go-openapi/swag/TODO.md b/vendor/github.com/go-openapi/swag/TODO.md deleted file mode 100644 index 129888038b2..00000000000 --- a/vendor/github.com/go-openapi/swag/TODO.md +++ /dev/null @@ -1 +0,0 @@ -fix data race https://github.com/go-openapi/swag/actions/runs/17989156861/job/51174860188 diff --git a/vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go b/vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go index bc01ec2bb94..6c7bbb26f03 100644 --- a/vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go +++ b/vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package cmdutils @@ -20,5 +9,5 @@ package cmdutils type CommandLineOptionsGroup struct { ShortDescription string LongDescription string - Options interface{} + Options any } diff --git a/vendor/github.com/go-openapi/swag/cmdutils/doc.go b/vendor/github.com/go-openapi/swag/cmdutils/doc.go index 63ac1d17eef..31f2c37538a 100644 --- a/vendor/github.com/go-openapi/swag/cmdutils/doc.go +++ b/vendor/github.com/go-openapi/swag/cmdutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package cmdutils brings helpers for CLIs produced by go-openapi package cmdutils diff --git a/vendor/github.com/go-openapi/swag/cmdutils_iface.go b/vendor/github.com/go-openapi/swag/cmdutils_iface.go index 1eaf36f157b..bd0c1fc1280 100644 --- a/vendor/github.com/go-openapi/swag/cmdutils_iface.go +++ b/vendor/github.com/go-openapi/swag/cmdutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/conv/convert.go b/vendor/github.com/go-openapi/swag/conv/convert.go index b9b8698543a..f205c391345 100644 --- a/vendor/github.com/go-openapi/swag/conv/convert.go +++ b/vendor/github.com/go-openapi/swag/conv/convert.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package conv diff --git a/vendor/github.com/go-openapi/swag/conv/convert_types.go b/vendor/github.com/go-openapi/swag/conv/convert_types.go index 423e8663f8e..cf4c6495ebc 100644 --- a/vendor/github.com/go-openapi/swag/conv/convert_types.go +++ b/vendor/github.com/go-openapi/swag/conv/convert_types.go @@ -1,20 +1,13 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package conv -// The original version of this file, eons ago, was taken from the aws go sdk +// Unlicensed credits (idea, concept) +// +// The idea to convert values to pointers and the other way around, was inspired, eons ago, by the aws go sdk. +// +// Nowadays, all sensible API sdk's expose a similar functionality. // Pointer returns a pointer to the value passed in. func Pointer[T any](v T) *T { diff --git a/vendor/github.com/go-openapi/swag/conv/doc.go b/vendor/github.com/go-openapi/swag/conv/doc.go index b02711f422c..1bd6ead6e2d 100644 --- a/vendor/github.com/go-openapi/swag/conv/doc.go +++ b/vendor/github.com/go-openapi/swag/conv/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package conv exposes utilities to convert types. // diff --git a/vendor/github.com/go-openapi/swag/conv/format.go b/vendor/github.com/go-openapi/swag/conv/format.go index db7562a4a34..5b87b8e146b 100644 --- a/vendor/github.com/go-openapi/swag/conv/format.go +++ b/vendor/github.com/go-openapi/swag/conv/format.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package conv diff --git a/vendor/github.com/go-openapi/swag/conv/sizeof.go b/vendor/github.com/go-openapi/swag/conv/sizeof.go index 646f8be9aa3..49434655738 100644 --- a/vendor/github.com/go-openapi/swag/conv/sizeof.go +++ b/vendor/github.com/go-openapi/swag/conv/sizeof.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package conv import "unsafe" diff --git a/vendor/github.com/go-openapi/swag/conv/type_constraints.go b/vendor/github.com/go-openapi/swag/conv/type_constraints.go index 3c61498361c..81135e827e5 100644 --- a/vendor/github.com/go-openapi/swag/conv/type_constraints.go +++ b/vendor/github.com/go-openapi/swag/conv/type_constraints.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package conv diff --git a/vendor/github.com/go-openapi/swag/conv_iface.go b/vendor/github.com/go-openapi/swag/conv_iface.go index 9991acb6510..eea7b2e56e3 100644 --- a/vendor/github.com/go-openapi/swag/conv_iface.go +++ b/vendor/github.com/go-openapi/swag/conv_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/doc.go b/vendor/github.com/go-openapi/swag/doc.go index a079fe81066..b54b57478af 100644 --- a/vendor/github.com/go-openapi/swag/doc.go +++ b/vendor/github.com/go-openapi/swag/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package swag contains a bunch of helper functions for go-openapi and go-swagger projects. // diff --git a/vendor/github.com/go-openapi/swag/fileutils/doc.go b/vendor/github.com/go-openapi/swag/fileutils/doc.go index 4b48e71960e..859a200d841 100644 --- a/vendor/github.com/go-openapi/swag/fileutils/doc.go +++ b/vendor/github.com/go-openapi/swag/fileutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package fileutils exposes utilities to deal with files and paths. // diff --git a/vendor/github.com/go-openapi/swag/fileutils/file.go b/vendor/github.com/go-openapi/swag/fileutils/file.go index b17eaba58fb..5ad4cfaeafa 100644 --- a/vendor/github.com/go-openapi/swag/fileutils/file.go +++ b/vendor/github.com/go-openapi/swag/fileutils/file.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package fileutils diff --git a/vendor/github.com/go-openapi/swag/fileutils/path.go b/vendor/github.com/go-openapi/swag/fileutils/path.go index 0de77e12d48..dd09f690bf8 100644 --- a/vendor/github.com/go-openapi/swag/fileutils/path.go +++ b/vendor/github.com/go-openapi/swag/fileutils/path.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package fileutils diff --git a/vendor/github.com/go-openapi/swag/fileutils_iface.go b/vendor/github.com/go-openapi/swag/fileutils_iface.go index 0c639e8c16a..f3e79a0e4bc 100644 --- a/vendor/github.com/go-openapi/swag/fileutils_iface.go +++ b/vendor/github.com/go-openapi/swag/fileutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/go.work.sum b/vendor/github.com/go-openapi/swag/go.work.sum index bee4481a708..c1308cafa67 100644 --- a/vendor/github.com/go-openapi/swag/go.work.sum +++ b/vendor/github.com/go-openapi/swag/go.work.sum @@ -1,4 +1,7 @@ -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= -go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +github.com/go-openapi/testify/v2 v2.0.1/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= diff --git a/vendor/github.com/go-openapi/swag/jsonname/doc.go b/vendor/github.com/go-openapi/swag/jsonname/doc.go index b2e0c80fc3a..79232eaca47 100644 --- a/vendor/github.com/go-openapi/swag/jsonname/doc.go +++ b/vendor/github.com/go-openapi/swag/jsonname/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package jsonname is a provider of json property names from go properties. package jsonname diff --git a/vendor/github.com/go-openapi/swag/jsonname/name_provider.go b/vendor/github.com/go-openapi/swag/jsonname/name_provider.go index e87aac2f78b..8eaf1bece8d 100644 --- a/vendor/github.com/go-openapi/swag/jsonname/name_provider.go +++ b/vendor/github.com/go-openapi/swag/jsonname/name_provider.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package jsonname @@ -90,7 +79,7 @@ func newNameIndex(tpe reflect.Type) nameIndex { } // GetJSONNames gets all the json property names for a type -func (n *NameProvider) GetJSONNames(subject interface{}) []string { +func (n *NameProvider) GetJSONNames(subject any) []string { n.lock.Lock() defer n.lock.Unlock() tpe := reflect.Indirect(reflect.ValueOf(subject)).Type() @@ -107,7 +96,7 @@ func (n *NameProvider) GetJSONNames(subject interface{}) []string { } // GetJSONName gets the json name for a go property name -func (n *NameProvider) GetJSONName(subject interface{}, name string) (string, bool) { +func (n *NameProvider) GetJSONName(subject any, name string) (string, bool) { tpe := reflect.Indirect(reflect.ValueOf(subject)).Type() return n.GetJSONNameForType(tpe, name) } @@ -125,7 +114,7 @@ func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string } // GetGoName gets the go name for a json property name -func (n *NameProvider) GetGoName(subject interface{}, name string) (string, bool) { +func (n *NameProvider) GetGoName(subject any, name string) (string, bool) { tpe := reflect.Indirect(reflect.ValueOf(subject)).Type() return n.GetGoNameForType(tpe, name) } diff --git a/vendor/github.com/go-openapi/swag/jsonname_iface.go b/vendor/github.com/go-openapi/swag/jsonname_iface.go index 555369d75a0..303a007f6f4 100644 --- a/vendor/github.com/go-openapi/swag/jsonname_iface.go +++ b/vendor/github.com/go-openapi/swag/jsonname_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/jsonutils/README.md b/vendor/github.com/go-openapi/swag/jsonutils/README.md index c8d0cab67b6..d745cdb466e 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/README.md +++ b/vendor/github.com/go-openapi/swag/jsonutils/README.md @@ -78,7 +78,7 @@ Each adapter is an independent go module. Hence you'll pick its dependencies onl At this moment we provide: * `stdlib`: JSON adapter based on the standard library -* `easyjson`: JSON adapter based on the `github.com/mailru/easyyjson` +* `easyjson`: JSON adapter based on the `github.com/mailru/easyjson` The adapters provide the basic `Marshal` and `Unmarshal` capabilities, plus an implementation of the `MapSlice` pattern. diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/doc.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/doc.go index dbb38c2f0cf..76d3898fca5 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/doc.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package adapters exposes a registry of adapters to multiple // JSON serialization libraries. diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/doc.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/doc.go index 49649859af6..1fd43a1fad5 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/doc.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/doc.go @@ -1,2 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + // Package ifaces exposes all interfaces to work with adapters. package ifaces diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/ifaces.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/ifaces.go index 4927d872dab..7805e5e5e39 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/ifaces.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/ifaces.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package ifaces import ( diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/registry_iface.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/registry_iface.go index d1fe6a0adb6..2d6c69f4e60 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/registry_iface.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/ifaces/registry_iface.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package ifaces import ( diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/registry.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/registry.go index b34a2305181..3062acaff26 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/registry.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/registry.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/adapter.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/adapter.go index 4df831b62dd..0213ff5c29f 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/adapter.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/adapter.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/doc.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/doc.go index 2ff6b212fc8..5ea1b440425 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/doc.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package json implements an [ifaces.Adapter] using the standard library. package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/lexer.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/lexer.go index 6d919199d03..b5aa1c7972e 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/lexer.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/lexer.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/ordered_map.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/ordered_map.go index 18e6294e50e..54deef406f3 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/ordered_map.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/ordered_map.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/pool.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/pool.go index 0f51d3a20cd..709b97c3046 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/pool.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/pool.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/register.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/register.go index 18bbc377450..fc8818694ea 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/register.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/register.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/writer.go b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/writer.go index 38e9b6e034a..dc2325c1a30 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/writer.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/adapters/stdlib/json/writer.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/go-openapi/swag/jsonutils/concat.go b/vendor/github.com/go-openapi/swag/jsonutils/concat.go index 049d4698bf8..2068503af05 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/concat.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/concat.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package jsonutils @@ -34,7 +23,7 @@ func init() { // ConcatJSON concatenates multiple json objects or arrays efficiently. // -// Note that [ConcatJSON] performs a very simmple (and fast) concatenation +// Note that [ConcatJSON] performs a very simple (and fast) concatenation // operation: it does not attempt to merge objects. func ConcatJSON(blobs ...[]byte) []byte { if len(blobs) == 0 { diff --git a/vendor/github.com/go-openapi/swag/jsonutils/doc.go b/vendor/github.com/go-openapi/swag/jsonutils/doc.go index 495ef834134..3926cc58d1b 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/doc.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package jsonutils provides helpers to work with JSON. // diff --git a/vendor/github.com/go-openapi/swag/jsonutils/json.go b/vendor/github.com/go-openapi/swag/jsonutils/json.go index a33b89bd4d9..40753ce03fd 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/json.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/json.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package jsonutils diff --git a/vendor/github.com/go-openapi/swag/jsonutils/ordered_map.go b/vendor/github.com/go-openapi/swag/jsonutils/ordered_map.go index 931ce2559d8..38dd3e24442 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils/ordered_map.go +++ b/vendor/github.com/go-openapi/swag/jsonutils/ordered_map.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package jsonutils diff --git a/vendor/github.com/go-openapi/swag/jsonutils_iface.go b/vendor/github.com/go-openapi/swag/jsonutils_iface.go index 63e23f0b69d..7bd4105fa51 100644 --- a/vendor/github.com/go-openapi/swag/jsonutils_iface.go +++ b/vendor/github.com/go-openapi/swag/jsonutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag @@ -33,17 +22,17 @@ type JSONMapItem = jsonutils.JSONMapItem // WriteJSON writes json data. // // Deprecated: use [jsonutils.WriteJSON] instead. -func WriteJSON(data interface{}) ([]byte, error) { return jsonutils.WriteJSON(data) } +func WriteJSON(data any) ([]byte, error) { return jsonutils.WriteJSON(data) } // ReadJSON reads json data. // // Deprecated: use [jsonutils.ReadJSON] instead. -func ReadJSON(data []byte, value interface{}) error { return jsonutils.ReadJSON(data, value) } +func ReadJSON(data []byte, value any) error { return jsonutils.ReadJSON(data, value) } // DynamicJSONToStruct converts an untyped JSON structure into a target data type. // // Deprecated: use [jsonutils.FromDynamicJSON] instead. -func DynamicJSONToStruct(data interface{}, target interface{}) error { +func DynamicJSONToStruct(data any, target any) error { return jsonutils.FromDynamicJSON(data, target) } @@ -57,8 +46,8 @@ func ConcatJSON(blobs ...[]byte) []byte { return jsonutils.ConcatJSON(blobs...) // It is the same as [FromDynamicJSON], but doesn't check for errors. // // Deprecated: this function is a misnomer and is unsafe. Use [jsonutils.FromDynamicJSON] instead. -func ToDynamicJSON(value interface{}) interface{} { - var res interface{} +func ToDynamicJSON(value any) any { + var res any if err := FromDynamicJSON(value, &res); err != nil { log.Println(err) } @@ -68,9 +57,9 @@ func ToDynamicJSON(value interface{}) interface{} { // FromDynamicJSON turns a go value into a properly JSON typed structure. // -// "Dynamic JSON" refers to what you get when unmarshaling JSON into an untyped interface{}, -// i.e. objects are represented by map[string]interface{}, arrays by []interface{}, and all -// scalar values are interface{}. +// "Dynamic JSON" refers to what you get when unmarshaling JSON into an untyped any, +// i.e. objects are represented by map[string]any, arrays by []any, and all +// scalar values are any. // // Deprecated: use [jsonutils.FromDynamicJSON] instead. -func FromDynamicJSON(data, target interface{}) error { return jsonutils.FromDynamicJSON(data, target) } +func FromDynamicJSON(data, target any) error { return jsonutils.FromDynamicJSON(data, target) } diff --git a/vendor/github.com/go-openapi/swag/loading/doc.go b/vendor/github.com/go-openapi/swag/loading/doc.go index 62585615e1e..8cf7bcb8b9d 100644 --- a/vendor/github.com/go-openapi/swag/loading/doc.go +++ b/vendor/github.com/go-openapi/swag/loading/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package loading provides tools to load a file from http or from a local file system. package loading diff --git a/vendor/github.com/go-openapi/swag/loading/errors.go b/vendor/github.com/go-openapi/swag/loading/errors.go index ca45732a7a6..b3964289c74 100644 --- a/vendor/github.com/go-openapi/swag/loading/errors.go +++ b/vendor/github.com/go-openapi/swag/loading/errors.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package loading diff --git a/vendor/github.com/go-openapi/swag/loading/json.go b/vendor/github.com/go-openapi/swag/loading/json.go index aadf9991357..59db12f5cfd 100644 --- a/vendor/github.com/go-openapi/swag/loading/json.go +++ b/vendor/github.com/go-openapi/swag/loading/json.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package loading import ( diff --git a/vendor/github.com/go-openapi/swag/loading/loading.go b/vendor/github.com/go-openapi/swag/loading/loading.go index bd955535f71..269fb74d167 100644 --- a/vendor/github.com/go-openapi/swag/loading/loading.go +++ b/vendor/github.com/go-openapi/swag/loading/loading.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package loading diff --git a/vendor/github.com/go-openapi/swag/loading/options.go b/vendor/github.com/go-openapi/swag/loading/options.go index a51329e938b..6674ac69e62 100644 --- a/vendor/github.com/go-openapi/swag/loading/options.go +++ b/vendor/github.com/go-openapi/swag/loading/options.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package loading @@ -81,7 +70,7 @@ func WithCustomHeaders(headers map[string]string) Option { } } -// WithHTTClient overrides the default HTTP client used to fetch a remote file. +// WithHTTPClient overrides the default HTTP client used to fetch a remote file. // // By default, [http.DefaultClient] is used. func WithHTTPClient(client *http.Client) Option { @@ -90,7 +79,7 @@ func WithHTTPClient(client *http.Client) Option { } } -// WithFileFS sets a file system for the local file loader. +// WithFS sets a file system for the local file loader. // // If the provided file system is a [fs.ReadFileFS], the ReadFile function is used. // Otherwise, ReadFile is wrapped using [fs.ReadFile]. diff --git a/vendor/github.com/go-openapi/swag/loading/yaml.go b/vendor/github.com/go-openapi/swag/loading/yaml.go index 40bd2a769f9..3ebb53668c4 100644 --- a/vendor/github.com/go-openapi/swag/loading/yaml.go +++ b/vendor/github.com/go-openapi/swag/loading/yaml.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package loading @@ -38,7 +27,7 @@ func YAMLDoc(path string, opts ...Option) (json.RawMessage, error) { } // YAMLData loads a yaml document from either http or a file. -func YAMLData(path string, opts ...Option) (interface{}, error) { +func YAMLData(path string, opts ...Option) (any, error) { data, err := LoadFromFileOrHTTP(path, opts...) if err != nil { return nil, err diff --git a/vendor/github.com/go-openapi/swag/loading_iface.go b/vendor/github.com/go-openapi/swag/loading_iface.go index 38d825bc5ea..27ec3fb8c37 100644 --- a/vendor/github.com/go-openapi/swag/loading_iface.go +++ b/vendor/github.com/go-openapi/swag/loading_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag @@ -84,7 +73,7 @@ func YAMLDoc(path string) (json.RawMessage, error) { // YAMLData loads a yaml document from either http or a file. // // Deprecated: use [loading.YAMLData] instead. -func YAMLData(path string) (interface{}, error) { +func YAMLData(path string) (any, error) { return loading.YAMLData(path) } diff --git a/vendor/github.com/go-openapi/swag/mangling/doc.go b/vendor/github.com/go-openapi/swag/mangling/doc.go index dbe806828c3..ce0d8904857 100644 --- a/vendor/github.com/go-openapi/swag/mangling/doc.go +++ b/vendor/github.com/go-openapi/swag/mangling/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package mangling provides name mangling capabilities. // diff --git a/vendor/github.com/go-openapi/swag/mangling/initialism_index.go b/vendor/github.com/go-openapi/swag/mangling/initialism_index.go index cf0786f812c..e5b70c14938 100644 --- a/vendor/github.com/go-openapi/swag/mangling/initialism_index.go +++ b/vendor/github.com/go-openapi/swag/mangling/initialism_index.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling @@ -190,6 +179,19 @@ const ( simplePlural ) +func (f pluralForm) String() string { + switch f { + case notPlural: + return "notPlural" + case invariantPlural: + return "invariantPlural" + case simplePlural: + return "simplePlural" + default: + return "" + } +} + // pluralForm indicates how we want to pluralize a given initialism. // // Besides configured invariant forms (like HTTP and HTTPS), diff --git a/vendor/github.com/go-openapi/swag/mangling/name_lexem.go b/vendor/github.com/go-openapi/swag/mangling/name_lexem.go index 02004b4f3ab..bc837e3b9f5 100644 --- a/vendor/github.com/go-openapi/swag/mangling/name_lexem.go +++ b/vendor/github.com/go-openapi/swag/mangling/name_lexem.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling/name_mangler.go b/vendor/github.com/go-openapi/swag/mangling/name_mangler.go index 94ae555a7b6..da685681d08 100644 --- a/vendor/github.com/go-openapi/swag/mangling/name_mangler.go +++ b/vendor/github.com/go-openapi/swag/mangling/name_mangler.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling/options.go b/vendor/github.com/go-openapi/swag/mangling/options.go index 66ad2e46c78..3c92b2f18bf 100644 --- a/vendor/github.com/go-openapi/swag/mangling/options.go +++ b/vendor/github.com/go-openapi/swag/mangling/options.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling/pools.go b/vendor/github.com/go-openapi/swag/mangling/pools.go index d85b4038776..f8104351445 100644 --- a/vendor/github.com/go-openapi/swag/mangling/pools.go +++ b/vendor/github.com/go-openapi/swag/mangling/pools.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling/split.go b/vendor/github.com/go-openapi/swag/mangling/split.go index 40e4a2e0e1d..ed12ea25674 100644 --- a/vendor/github.com/go-openapi/swag/mangling/split.go +++ b/vendor/github.com/go-openapi/swag/mangling/split.go @@ -1,20 +1,10 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling import ( + "fmt" "unicode" ) @@ -47,6 +37,13 @@ type ( initialismMatches []initialismMatch ) +// String representation of a match, e.g. for debugging. +func (m initialismMatch) String() string { + return fmt.Sprintf("{body: %s (%d), start: %d, end; %d, complete: %t, hasPlural: %v}", + string(m.body), len(m.body), m.start, m.end, m.complete, m.hasPlural, + ) +} + func (m initialismMatch) isZero() bool { return m.start == 0 && m.end == 0 } @@ -83,116 +80,148 @@ func (s splitter) split(name string) *[]nameLexem { } func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { - var matches *initialismMatches + matches := poolOfMatches.BorrowMatches() + const minLenInitialism = 1 + if len(nameRunes) < minLenInitialism+1 { + // can't match initialism with 0 or 1 rune + return matches + } + + // first iteration + s.findMatches(matches, nameRunes, nameRunes[0], 0) - for currentRunePosition, currentRune := range nameRunes { - // recycle these allocations as we loop over runes + for i, currentRune := range nameRunes[1:] { + currentRunePosition := i + 1 + // recycle allocations as we loop over runes // with such recycling, only 2 slices should be allocated per call // instead of o(n). + // + // BorrowMatches always yields slices with zero length (with some capacity) newMatches := poolOfMatches.BorrowMatches() // check current initialism matches - if matches != nil { // skip first iteration - for _, match := range *matches { - if keepCompleteMatch := match.complete; keepCompleteMatch { - *newMatches = append(*newMatches, match) - - // the match is complete: keep it then move on to next rune - continue - } + for _, match := range *matches { + if keepCompleteMatch := match.complete; keepCompleteMatch { + // the match is already complete: keep it then move on to the next match + *newMatches = append(*newMatches, match) + continue + } - currentMatchRune := match.body[currentRunePosition-match.start] - if currentMatchRune != currentRune { - // failed match, move on to next rune - continue - } + if currentRunePosition-match.start == len(match.body) { + // unmatched: skip + continue + } - // try to complete ongoing match - if currentRunePosition-match.start == len(match.body)-1 { - // we are close; the next step is to check the symbol ahead - // if it is a lowercase letter, then it is not the end of match - // but the beginning of the next word. - // - // NOTE(fredbi): this heuristic sometimes leads to counterintuitive splits and - // perhaps (not sure yet) we should check against case _alternance_. - // - // Example: - // - // In the current version, in the sentence "IDS initialism", "ID" is recognized as an initialism, - // leading to a split like "id_s_initialism" (or IDSInitialism), - // whereas in the sentence "IDx initialism", it is not and produces something like - // "i_d_x_initialism" (or IDxInitialism). The generated file name is not great. - // - // Both go identifiers are tolerated by linters. - // - // Notice that the slightly different input "IDs initialism" is correctly detected - // as a pluralized initialism and produces something like "ids_initialism" (or IDsInitialism). - - if currentRunePosition < len(nameRunes)-1 { - nextRune := nameRunes[currentRunePosition+1] - - // recognize a plural form for this initialism (only simple pluralization is supported) - if nextRune == 's' && match.hasPlural == simplePlural { - // detected a pluralized initialism - match.body = append(match.body, nextRune) - currentRunePosition++ - if currentRunePosition < len(nameRunes)-1 { - nextRune = nameRunes[currentRunePosition+1] - if newWord := unicode.IsLower(nextRune); newWord { - // it is the start of a new word. - // Match is only partial and the initialism is not recognized : move on - continue - } - } + // 1. by construction of the matches, we can't have currentRunePosition - match.start < 0 + // because matches have been computed with their start <= currentRunePosition in the previous + // iterations. + // 2. by construction of the matches, we can't have currentRunePosition - match.start >= len(match.body) - // this is a pluralized match: keep it - match.complete = true - match.hasPlural = simplePlural - match.end = currentRunePosition - *newMatches = append(*newMatches, match) + currentMatchRune := match.body[currentRunePosition-match.start] + if currentMatchRune != currentRune { + // failed match, discard it then move on to the next match + continue + } - // match is complete: keep it then move on to next rune - continue + // try to complete the current match + if currentRunePosition-match.start == len(match.body)-1 { + // we are close: the next step is to check the symbol ahead + // if it is a lowercase letter, then it is not the end of match + // but the beginning of the next word. + // + // NOTE(fredbi): this heuristic sometimes leads to counterintuitive splits and + // perhaps (not sure yet) we should check against case _alternance_. + // + // Example: + // + // In the current version, in the sentence "IDS initialism", "ID" is recognized as an initialism, + // leading to a split like "id_s_initialism" (or IDSInitialism), + // whereas in the sentence "IDx initialism", it is not and produces something like + // "i_d_x_initialism" (or IDxInitialism). The generated file name is not great. + // + // Both go identifiers are tolerated by linters. + // + // Notice that the slightly different input "IDs initialism" is correctly detected + // as a pluralized initialism and produces something like "ids_initialism" (or IDsInitialism). + + if currentRunePosition < len(nameRunes)-1 { // when before the last rune + nextRune := nameRunes[currentRunePosition+1] + + // recognize a plural form for this initialism (only simple english pluralization is supported). + if nextRune == 's' && match.hasPlural == simplePlural { + // detected a pluralized initialism + match.body = append(match.body, nextRune) + lookAhead := currentRunePosition + 1 + if lookAhead < len(nameRunes)-1 { + nextRune = nameRunes[lookAhead+1] + if newWord := unicode.IsLower(nextRune); newWord { + // it is the start of a new word. + // Match is only partial and the initialism is not recognized: + // move on to the next match, but do not advance the rune position + continue + } } - if newWord := unicode.IsLower(nextRune); newWord { - // it is the start of a new word - // Match is only partial and the initialism is not recognized : move on - continue - } + // this is a pluralized match: keep it + currentRunePosition++ + match.complete = true + match.hasPlural = simplePlural + match.end = currentRunePosition + *newMatches = append(*newMatches, match) + + // match is complete: keep it then move on to the next match + continue } - match.complete = true - match.end = currentRunePosition + // other cases + // example: invariant plural such as "TLS" + if newWord := unicode.IsLower(nextRune); newWord { + // it is the start of a new word + // Match is only partial and the initialism is not recognized : move on + continue + } } - // append the ongoing matching attempt (not necessarily complete) - *newMatches = append(*newMatches, match) + match.complete = true + match.end = currentRunePosition } - } - // check for new initialism matches - for i, r := range s.initialismsRunes { - if r[0] == currentRune { - *newMatches = append(*newMatches, initialismMatch{ - start: currentRunePosition, - body: r, - complete: false, - hasPlural: s.initialismsPluralForm[i], - }) - } + // append the ongoing matching attempt: it is not necessarily complete, but was successful so far. + // Let's see if it still matches on the next rune. + *newMatches = append(*newMatches, match) } - if matches != nil { - poolOfMatches.RedeemMatches(matches) - } + s.findMatches(newMatches, nameRunes, currentRune, currentRunePosition) + + poolOfMatches.RedeemMatches(matches) matches = newMatches } - // up to the caller to redeem this last slice + // it is up to the caller to redeem this last slice return matches } +func (s splitter) findMatches(newMatches *initialismMatches, nameRunes []rune, currentRune rune, currentRunePosition int) { + // check for new initialism matches, based on the first character + for i, r := range s.initialismsRunes { + if r[0] != currentRune { + continue + } + + if currentRunePosition+len(r) > len(nameRunes) { + continue // not eligible: would spilll over the initial string + } + + // possible matches: all initialisms starting with the current rune and that can fit the given string (nameRunes) + *newMatches = append(*newMatches, initialismMatch{ + start: currentRunePosition, + body: r, + complete: false, + hasPlural: s.initialismsPluralForm[i], + }) + } +} + func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { nameLexems := poolOfLexems.BorrowLexems() diff --git a/vendor/github.com/go-openapi/swag/mangling/string_bytes.go b/vendor/github.com/go-openapi/swag/mangling/string_bytes.go index 06351434d38..28daaf72b1a 100644 --- a/vendor/github.com/go-openapi/swag/mangling/string_bytes.go +++ b/vendor/github.com/go-openapi/swag/mangling/string_bytes.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling/util.go b/vendor/github.com/go-openapi/swag/mangling/util.go index c289dc6bddb..0636417e360 100644 --- a/vendor/github.com/go-openapi/swag/mangling/util.go +++ b/vendor/github.com/go-openapi/swag/mangling/util.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling_iface.go b/vendor/github.com/go-openapi/swag/mangling_iface.go index 2d0d07ddb62..98b9a999293 100644 --- a/vendor/github.com/go-openapi/swag/mangling_iface.go +++ b/vendor/github.com/go-openapi/swag/mangling_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/netutils/doc.go b/vendor/github.com/go-openapi/swag/netutils/doc.go index ed6d8a022b8..74282f8e51c 100644 --- a/vendor/github.com/go-openapi/swag/netutils/doc.go +++ b/vendor/github.com/go-openapi/swag/netutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package netutils provides helpers for network-related tasks. package netutils diff --git a/vendor/github.com/go-openapi/swag/netutils/net.go b/vendor/github.com/go-openapi/swag/netutils/net.go index 3d0182fc5a1..82a1544af7b 100644 --- a/vendor/github.com/go-openapi/swag/netutils/net.go +++ b/vendor/github.com/go-openapi/swag/netutils/net.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package netutils diff --git a/vendor/github.com/go-openapi/swag/netutils_iface.go b/vendor/github.com/go-openapi/swag/netutils_iface.go index 537314e3645..d658de25b3f 100644 --- a/vendor/github.com/go-openapi/swag/netutils_iface.go +++ b/vendor/github.com/go-openapi/swag/netutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/stringutils/collection_formats.go b/vendor/github.com/go-openapi/swag/stringutils/collection_formats.go index 1ff96dcbd81..28056ad25c3 100644 --- a/vendor/github.com/go-openapi/swag/stringutils/collection_formats.go +++ b/vendor/github.com/go-openapi/swag/stringutils/collection_formats.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package stringutils diff --git a/vendor/github.com/go-openapi/swag/stringutils/doc.go b/vendor/github.com/go-openapi/swag/stringutils/doc.go index b5d18e517d2..c6d17a1160b 100644 --- a/vendor/github.com/go-openapi/swag/stringutils/doc.go +++ b/vendor/github.com/go-openapi/swag/stringutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package stringutils exposes helpers to search and process strings. package stringutils diff --git a/vendor/github.com/go-openapi/swag/stringutils/strings.go b/vendor/github.com/go-openapi/swag/stringutils/strings.go index 086592317f8..cd792b7d083 100644 --- a/vendor/github.com/go-openapi/swag/stringutils/strings.go +++ b/vendor/github.com/go-openapi/swag/stringutils/strings.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package stringutils diff --git a/vendor/github.com/go-openapi/swag/stringutils_iface.go b/vendor/github.com/go-openapi/swag/stringutils_iface.go index 00d7e021251..dbfa4848430 100644 --- a/vendor/github.com/go-openapi/swag/stringutils_iface.go +++ b/vendor/github.com/go-openapi/swag/stringutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag diff --git a/vendor/github.com/go-openapi/swag/typeutils/doc.go b/vendor/github.com/go-openapi/swag/typeutils/doc.go index 67e49d12ec5..66bed20dff0 100644 --- a/vendor/github.com/go-openapi/swag/typeutils/doc.go +++ b/vendor/github.com/go-openapi/swag/typeutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package typeutils exposes utilities to inspect generic types. package typeutils diff --git a/vendor/github.com/go-openapi/swag/typeutils/types.go b/vendor/github.com/go-openapi/swag/typeutils/types.go index f0ddd3cd3df..55487a673c4 100644 --- a/vendor/github.com/go-openapi/swag/typeutils/types.go +++ b/vendor/github.com/go-openapi/swag/typeutils/types.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package typeutils diff --git a/vendor/github.com/go-openapi/swag/typeutils_iface.go b/vendor/github.com/go-openapi/swag/typeutils_iface.go index b104a8040aa..b63813ea408 100644 --- a/vendor/github.com/go-openapi/swag/typeutils_iface.go +++ b/vendor/github.com/go-openapi/swag/typeutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag @@ -20,4 +9,4 @@ import "github.com/go-openapi/swag/typeutils" // This allows for safer checking of interface values. // // Deprecated: use [typeutils.IsZero] instead. -func IsZero(data interface{}) bool { return typeutils.IsZero(data) } +func IsZero(data any) bool { return typeutils.IsZero(data) } diff --git a/vendor/github.com/go-openapi/swag/yamlutils/doc.go b/vendor/github.com/go-openapi/swag/yamlutils/doc.go index 4aeadc22480..7bb92a82f1b 100644 --- a/vendor/github.com/go-openapi/swag/yamlutils/doc.go +++ b/vendor/github.com/go-openapi/swag/yamlutils/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 // Package yamlutils provides utilities to work with YAML documents. // diff --git a/vendor/github.com/go-openapi/swag/yamlutils/errors.go b/vendor/github.com/go-openapi/swag/yamlutils/errors.go index 014f227d965..e87bc5e8beb 100644 --- a/vendor/github.com/go-openapi/swag/yamlutils/errors.go +++ b/vendor/github.com/go-openapi/swag/yamlutils/errors.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package yamlutils diff --git a/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go b/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go index af1d7bb518a..3daf68dbba0 100644 --- a/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go +++ b/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package yamlutils import ( diff --git a/vendor/github.com/go-openapi/swag/yamlutils/yaml.go b/vendor/github.com/go-openapi/swag/yamlutils/yaml.go index 67fba8fd7c8..e3aff3c2fde 100644 --- a/vendor/github.com/go-openapi/swag/yamlutils/yaml.go +++ b/vendor/github.com/go-openapi/swag/yamlutils/yaml.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package yamlutils diff --git a/vendor/github.com/go-openapi/swag/yamlutils_iface.go b/vendor/github.com/go-openapi/swag/yamlutils_iface.go index 49e646486e3..57767efc567 100644 --- a/vendor/github.com/go-openapi/swag/yamlutils_iface.go +++ b/vendor/github.com/go-openapi/swag/yamlutils_iface.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package swag @@ -23,9 +12,9 @@ import ( // YAMLToJSON converts YAML unmarshaled data into json compatible data // // Deprecated: use [yamlutils.YAMLToJSON] instead. -func YAMLToJSON(data interface{}) (json.RawMessage, error) { return yamlutils.YAMLToJSON(data) } +func YAMLToJSON(data any) (json.RawMessage, error) { return yamlutils.YAMLToJSON(data) } // BytesToYAMLDoc converts a byte slice into a YAML document // // Deprecated: use [yamlutils.BytesToYAMLDoc] instead. -func BytesToYAMLDoc(data []byte) (interface{}, error) { return yamlutils.BytesToYAMLDoc(data) } +func BytesToYAMLDoc(data []byte) (any, error) { return yamlutils.BytesToYAMLDoc(data) } diff --git a/vendor/github.com/go-openapi/validate/.golangci.yml b/vendor/github.com/go-openapi/validate/.golangci.yml index 43e2576479a..10c513342fc 100644 --- a/vendor/github.com/go-openapi/validate/.golangci.yml +++ b/vendor/github.com/go-openapi/validate/.golangci.yml @@ -17,7 +17,7 @@ linters: - gomoddirectives - gosmopolitan - inamedparam - #- intrange # disabled while < go1.22 + - intrange - ireturn - lll - musttag diff --git a/vendor/github.com/go-openapi/validate/README.md b/vendor/github.com/go-openapi/validate/README.md index e8e1bb218d9..73d87ce4f01 100644 --- a/vendor/github.com/go-openapi/validate/README.md +++ b/vendor/github.com/go-openapi/validate/README.md @@ -24,6 +24,10 @@ Reference can be found here: https://github.com/OAI/OpenAPI-Specification/blob/m [Documentation](https://pkg.go.dev/github.com/go-openapi/validate) +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + ## FAQ * Does this library support OpenAPI 3? diff --git a/vendor/github.com/go-openapi/validate/context.go b/vendor/github.com/go-openapi/validate/context.go index d54791c9d05..b4587dcd560 100644 --- a/vendor/github.com/go-openapi/validate/context.go +++ b/vendor/github.com/go-openapi/validate/context.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package validate import ( diff --git a/vendor/github.com/go-openapi/validate/debug.go b/vendor/github.com/go-openapi/validate/debug.go index 8815fd93597..79145a4495d 100644 --- a/vendor/github.com/go-openapi/validate/debug.go +++ b/vendor/github.com/go-openapi/validate/debug.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -38,7 +27,7 @@ func debugOptions() { validateLogger = log.New(os.Stdout, "validate:", log.LstdFlags) } -func debugLog(msg string, args ...interface{}) { +func debugLog(msg string, args ...any) { // A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog() if Debug { _, file1, pos1, _ := runtime.Caller(1) diff --git a/vendor/github.com/go-openapi/validate/default_validator.go b/vendor/github.com/go-openapi/validate/default_validator.go index e82bb30178e..79a431677e4 100644 --- a/vendor/github.com/go-openapi/validate/default_validator.go +++ b/vendor/github.com/go-openapi/validate/default_validator.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/doc.go b/vendor/github.com/go-openapi/validate/doc.go index d2b901eab9a..a99893e1a38 100644 --- a/vendor/github.com/go-openapi/validate/doc.go +++ b/vendor/github.com/go-openapi/validate/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 /* Package validate provides methods to validate a swagger specification, diff --git a/vendor/github.com/go-openapi/validate/example_validator.go b/vendor/github.com/go-openapi/validate/example_validator.go index 0663b21dc5e..e4ef52c6dc1 100644 --- a/vendor/github.com/go-openapi/validate/example_validator.go +++ b/vendor/github.com/go-openapi/validate/example_validator.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/formats.go b/vendor/github.com/go-openapi/validate/formats.go index f4e35521306..85ee6349418 100644 --- a/vendor/github.com/go-openapi/validate/formats.go +++ b/vendor/github.com/go-openapi/validate/formats.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -54,7 +43,7 @@ func (f *formatValidator) SetPath(path string) { f.Path = path } -func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool { +func (f *formatValidator) Applies(source any, kind reflect.Kind) bool { if source == nil || f.KnownFormats == nil { return false } @@ -73,7 +62,7 @@ func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool { } } -func (f *formatValidator) Validate(val interface{}) *Result { +func (f *formatValidator) Validate(val any) *Result { if f.Options.recycleValidators { defer func() { f.redeem() diff --git a/vendor/github.com/go-openapi/validate/helpers.go b/vendor/github.com/go-openapi/validate/helpers.go index 16840da6331..49b130473a9 100644 --- a/vendor/github.com/go-openapi/validate/helpers.go +++ b/vendor/github.com/go-openapi/validate/helpers.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -139,7 +128,7 @@ func (h *pathHelper) stripParametersInPath(path string) string { rexParsePathParam := mustCompileRegexp(`{[^{}]+?}`) strippedSegments := []string{} - for _, segment := range strings.Split(path, "/") { + for segment := range strings.SplitSeq(path, "/") { strippedSegments = append(strippedSegments, rexParsePathParam.ReplaceAllString(segment, "X")) } return strings.Join(strippedSegments, "/") @@ -149,7 +138,7 @@ func (h *pathHelper) extractPathParams(path string) (params []string) { // Extracts all params from a path, with surrounding "{}" rexParsePathParam := mustCompileRegexp(`{[^{}]+?}`) - for _, segment := range strings.Split(path, "/") { + for segment := range strings.SplitSeq(path, "/") { for _, v := range rexParsePathParam.FindAllStringSubmatch(segment, -1) { params = append(params, v...) } @@ -161,7 +150,7 @@ type valueHelper struct { // A collection of unexported helpers for value validation } -func (h *valueHelper) asInt64(val interface{}) int64 { +func (h *valueHelper) asInt64(val any) int64 { // Number conversion function for int64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) @@ -178,7 +167,7 @@ func (h *valueHelper) asInt64(val interface{}) int64 { } } -func (h *valueHelper) asUint64(val interface{}) uint64 { +func (h *valueHelper) asUint64(val any) uint64 { // Number conversion function for uint64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) @@ -196,7 +185,7 @@ func (h *valueHelper) asUint64(val interface{}) uint64 { } // Same for unsigned floats -func (h *valueHelper) asFloat64(val interface{}) float64 { +func (h *valueHelper) asFloat64(val any) float64 { // Number conversion function for float64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) diff --git a/vendor/github.com/go-openapi/validate/object_validator.go b/vendor/github.com/go-openapi/validate/object_validator.go index 76301d0e887..cf98ed377d5 100644 --- a/vendor/github.com/go-openapi/validate/object_validator.go +++ b/vendor/github.com/go-openapi/validate/object_validator.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/options.go b/vendor/github.com/go-openapi/validate/options.go index cfe9b0660f6..f5e7f7131c7 100644 --- a/vendor/github.com/go-openapi/validate/options.go +++ b/vendor/github.com/go-openapi/validate/options.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/pools.go b/vendor/github.com/go-openapi/validate/pools.go index 3ddce4dcc2b..1e734be493b 100644 --- a/vendor/github.com/go-openapi/validate/pools.go +++ b/vendor/github.com/go-openapi/validate/pools.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + //go:build !validatedebug package validate diff --git a/vendor/github.com/go-openapi/validate/pools_debug.go b/vendor/github.com/go-openapi/validate/pools_debug.go index 12949f02a7e..d123ed4093f 100644 --- a/vendor/github.com/go-openapi/validate/pools_debug.go +++ b/vendor/github.com/go-openapi/validate/pools_debug.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + //go:build validatedebug package validate diff --git a/vendor/github.com/go-openapi/validate/result.go b/vendor/github.com/go-openapi/validate/result.go index 1955cff7837..69219e99823 100644 --- a/vendor/github.com/go-openapi/validate/result.go +++ b/vendor/github.com/go-openapi/validate/result.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/rexp.go b/vendor/github.com/go-openapi/validate/rexp.go index 76de03e1f41..795f148d0cf 100644 --- a/vendor/github.com/go-openapi/validate/rexp.go +++ b/vendor/github.com/go-openapi/validate/rexp.go @@ -1,20 +1,10 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate import ( + "maps" re "regexp" "sync" "sync/atomic" @@ -62,9 +52,7 @@ func cacheRegexp(r *re.Regexp) { r.String(): r, } - for k, v := range cache { - newCache[k] = v - } + maps.Copy(newCache, cache) reDict.Store(newCache) } diff --git a/vendor/github.com/go-openapi/validate/schema.go b/vendor/github.com/go-openapi/validate/schema.go index 8c48899b0b1..375a98765d7 100644 --- a/vendor/github.com/go-openapi/validate/schema.go +++ b/vendor/github.com/go-openapi/validate/schema.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -30,7 +19,7 @@ type SchemaValidator struct { in string Schema *spec.Schema validators [8]valueValidator - Root interface{} + Root any KnownFormats strfmt.Registry Options *SchemaValidatorOptions } @@ -38,7 +27,7 @@ type SchemaValidator struct { // AgainstSchema validates the specified data against the provided schema, using a registry of supported formats. // // When no pre-parsed *spec.Schema structure is provided, it uses a JSON schema as default. See example. -func AgainstSchema(schema *spec.Schema, data interface{}, formats strfmt.Registry, options ...Option) error { +func AgainstSchema(schema *spec.Schema, data any, formats strfmt.Registry, options ...Option) error { res := NewSchemaValidator(schema, nil, "", formats, append(options, WithRecycleValidators(true), withRecycleResults(true))..., ).Validate(data) @@ -56,7 +45,7 @@ func AgainstSchema(schema *spec.Schema, data interface{}, formats strfmt.Registr // NewSchemaValidator creates a new schema validator. // // Panics if the provided schema is invalid. -func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, options ...Option) *SchemaValidator { +func NewSchemaValidator(schema *spec.Schema, rootSchema any, root string, formats strfmt.Registry, options ...Option) *SchemaValidator { opts := new(SchemaValidatorOptions) for _, o := range options { o(opts) @@ -65,7 +54,7 @@ func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string return newSchemaValidator(schema, rootSchema, root, formats, opts) } -func newSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, opts *SchemaValidatorOptions) *SchemaValidator { +func newSchemaValidator(schema *spec.Schema, rootSchema any, root string, formats strfmt.Registry, opts *SchemaValidatorOptions) *SchemaValidator { if schema == nil { return nil } @@ -120,13 +109,13 @@ func (s *SchemaValidator) SetPath(path string) { } // Applies returns true when this schema validator applies -func (s *SchemaValidator) Applies(source interface{}, _ reflect.Kind) bool { +func (s *SchemaValidator) Applies(source any, _ reflect.Kind) bool { _, ok := source.(*spec.Schema) return ok } // Validate validates the data against the schema -func (s *SchemaValidator) Validate(data interface{}) *Result { +func (s *SchemaValidator) Validate(data any) *Result { if s == nil { return emptyResult } diff --git a/vendor/github.com/go-openapi/validate/schema_messages.go b/vendor/github.com/go-openapi/validate/schema_messages.go index 786e2e3554e..e8c7c48ad7f 100644 --- a/vendor/github.com/go-openapi/validate/schema_messages.go +++ b/vendor/github.com/go-openapi/validate/schema_messages.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/schema_option.go b/vendor/github.com/go-openapi/validate/schema_option.go index 65eeebeaab3..d9fd21a75a1 100644 --- a/vendor/github.com/go-openapi/validate/schema_option.go +++ b/vendor/github.com/go-openapi/validate/schema_option.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/go-openapi/validate/schema_props.go b/vendor/github.com/go-openapi/validate/schema_props.go index b8bdee82c58..485f536adc3 100644 --- a/vendor/github.com/go-openapi/validate/schema_props.go +++ b/vendor/github.com/go-openapi/validate/schema_props.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -34,7 +23,7 @@ type schemaPropsValidator struct { allOfValidators []*SchemaValidator oneOfValidators []*SchemaValidator notValidator *SchemaValidator - Root interface{} + Root any KnownFormats strfmt.Registry Options *SchemaValidatorOptions } @@ -44,7 +33,7 @@ func (s *schemaPropsValidator) SetPath(path string) { } func newSchemaPropsValidator( - path string, in string, allOf, oneOf, anyOf []spec.Schema, not *spec.Schema, deps spec.Dependencies, root interface{}, formats strfmt.Registry, + path string, in string, allOf, oneOf, anyOf []spec.Schema, not *spec.Schema, deps spec.Dependencies, root any, formats strfmt.Registry, opts *SchemaValidatorOptions) *schemaPropsValidator { if opts == nil { opts = new(SchemaValidatorOptions) @@ -93,12 +82,12 @@ func newSchemaPropsValidator( return s } -func (s *schemaPropsValidator) Applies(source interface{}, _ reflect.Kind) bool { +func (s *schemaPropsValidator) Applies(source any, _ reflect.Kind) bool { _, isSchema := source.(*spec.Schema) return isSchema } -func (s *schemaPropsValidator) Validate(data interface{}) *Result { +func (s *schemaPropsValidator) Validate(data any) *Result { var mainResult *Result if s.Options.recycleResult { mainResult = pools.poolOfResults.BorrowResult() @@ -150,7 +139,7 @@ func (s *schemaPropsValidator) Validate(data interface{}) *Result { return mainResult.Merge(keepResultAllOf, keepResultOneOf, keepResultAnyOf) } -func (s *schemaPropsValidator) validateAnyOf(data interface{}, mainResult, keepResultAnyOf *Result) { +func (s *schemaPropsValidator) validateAnyOf(data any, mainResult, keepResultAnyOf *Result) { // Validates at least one in anyOf schemas var bestFailures *Result @@ -192,7 +181,7 @@ func (s *schemaPropsValidator) validateAnyOf(data interface{}, mainResult, keepR mainResult.Merge(bestFailures) } -func (s *schemaPropsValidator) validateOneOf(data interface{}, mainResult, keepResultOneOf *Result) { +func (s *schemaPropsValidator) validateOneOf(data any, mainResult, keepResultOneOf *Result) { // Validates exactly one in oneOf schemas var ( firstSuccess, bestFailures *Result @@ -251,7 +240,7 @@ func (s *schemaPropsValidator) validateOneOf(data interface{}, mainResult, keepR } } -func (s *schemaPropsValidator) validateAllOf(data interface{}, mainResult, keepResultAllOf *Result) { +func (s *schemaPropsValidator) validateAllOf(data any, mainResult, keepResultAllOf *Result) { // Validates all of allOf schemas var validated int @@ -277,7 +266,7 @@ func (s *schemaPropsValidator) validateAllOf(data interface{}, mainResult, keepR } } -func (s *schemaPropsValidator) validateNot(data interface{}, mainResult *Result) { +func (s *schemaPropsValidator) validateNot(data any, mainResult *Result) { result := s.notValidator.Validate(data) if s.Options.recycleValidators { s.notValidator = nil @@ -291,8 +280,8 @@ func (s *schemaPropsValidator) validateNot(data interface{}, mainResult *Result) } } -func (s *schemaPropsValidator) validateDependencies(data interface{}, mainResult *Result) { - val := data.(map[string]interface{}) +func (s *schemaPropsValidator) validateDependencies(data any, mainResult *Result) { + val := data.(map[string]any) for key := range val { dep, ok := s.Dependencies[key] if !ok { diff --git a/vendor/github.com/go-openapi/validate/slice_validator.go b/vendor/github.com/go-openapi/validate/slice_validator.go index 7b0dede290d..4a5a2089687 100644 --- a/vendor/github.com/go-openapi/validate/slice_validator.go +++ b/vendor/github.com/go-openapi/validate/slice_validator.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -30,7 +19,7 @@ type schemaSliceValidator struct { UniqueItems bool AdditionalItems *spec.SchemaOrBool Items *spec.SchemaOrArray - Root interface{} + Root any KnownFormats strfmt.Registry Options *SchemaValidatorOptions } @@ -38,7 +27,7 @@ type schemaSliceValidator struct { func newSliceValidator(path, in string, maxItems, minItems *int64, uniqueItems bool, additionalItems *spec.SchemaOrBool, items *spec.SchemaOrArray, - root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *schemaSliceValidator { + root any, formats strfmt.Registry, opts *SchemaValidatorOptions) *schemaSliceValidator { if opts == nil { opts = new(SchemaValidatorOptions) } @@ -68,13 +57,13 @@ func (s *schemaSliceValidator) SetPath(path string) { s.Path = path } -func (s *schemaSliceValidator) Applies(source interface{}, kind reflect.Kind) bool { +func (s *schemaSliceValidator) Applies(source any, kind reflect.Kind) bool { _, ok := source.(*spec.Schema) r := ok && kind == reflect.Slice return r } -func (s *schemaSliceValidator) Validate(data interface{}) *Result { +func (s *schemaSliceValidator) Validate(data any) *Result { if s.Options.recycleValidators { defer func() { s.redeem() diff --git a/vendor/github.com/go-openapi/validate/spec.go b/vendor/github.com/go-openapi/validate/spec.go index aef0cc36eca..8616a861f28 100644 --- a/vendor/github.com/go-openapi/validate/spec.go +++ b/vendor/github.com/go-openapi/validate/spec.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -19,6 +8,7 @@ import ( "encoding/gob" "encoding/json" "fmt" + "slices" "sort" "strings" @@ -458,11 +448,8 @@ func (s *SpecValidator) validatePathParamPresence(path string, fromPath, fromOpe for _, p := range fromOperation { var matched bool - for _, r := range fromPath { - if "{"+p+"}" == r { - matched = true - break - } + if slices.Contains(fromPath, "{"+p+"}") { + matched = true } if !matched { res.AddErrors(pathParamNotInPathMsg(path, p)) diff --git a/vendor/github.com/go-openapi/validate/spec_messages.go b/vendor/github.com/go-openapi/validate/spec_messages.go index 8da22cfb853..9b079af647a 100644 --- a/vendor/github.com/go-openapi/validate/spec_messages.go +++ b/vendor/github.com/go-openapi/validate/spec_messages.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -217,10 +206,10 @@ func emptyPathParameterMsg(path string) errors.Error { func nonUniqueOperationIDMsg(path string, i int) errors.Error { return errors.New(errors.CompositeErrorCode, NonUniqueOperationIDError, path, i) } -func circularAncestryDefinitionMsg(path string, args interface{}) errors.Error { +func circularAncestryDefinitionMsg(path string, args any) errors.Error { return errors.New(errors.CompositeErrorCode, CircularAncestryDefinitionError, path, args) } -func duplicatePropertiesMsg(path string, args interface{}) errors.Error { +func duplicatePropertiesMsg(path string, args any) errors.Error { return errors.New(errors.CompositeErrorCode, DuplicatePropertiesError, path, args) } func pathParamNotInPathMsg(path, param string) errors.Error { @@ -262,7 +251,7 @@ func pathParamRequiredMsg(operation, param string) errors.Error { func bothFormDataAndBodyMsg(operation string) errors.Error { return errors.New(errors.CompositeErrorCode, BothFormDataAndBodyError, operation) } -func multipleBodyParamMsg(operation string, args interface{}) errors.Error { +func multipleBodyParamMsg(operation string, args any) errors.Error { return errors.New(errors.CompositeErrorCode, MultipleBodyParamError, operation, args) } func pathParamNotUniqueMsg(path, param, arg string) errors.Error { @@ -304,7 +293,7 @@ func defaultValueHeaderDoesNotValidateMsg(operation, header, path string) errors func defaultValueHeaderItemsDoesNotValidateMsg(operation, header, path string) errors.Error { return errors.New(errors.CompositeErrorCode, DefaultValueHeaderItemsDoesNotValidateError, operation, header, path) } -func invalidPatternInHeaderMsg(operation, header, path, pattern string, args interface{}) errors.Error { +func invalidPatternInHeaderMsg(operation, header, path, pattern string, args any) errors.Error { return errors.New(errors.CompositeErrorCode, InvalidPatternInHeaderError, operation, header, path, pattern, args) } func invalidPatternInMsg(path, in, pattern string) errors.Error { diff --git a/vendor/github.com/go-openapi/validate/type.go b/vendor/github.com/go-openapi/validate/type.go index 91ae3413cd0..9b9ab8d917d 100644 --- a/vendor/github.com/go-openapi/validate/type.go +++ b/vendor/github.com/go-openapi/validate/type.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -60,7 +49,7 @@ func (t *typeValidator) SetPath(path string) { t.Path = path } -func (t *typeValidator) Applies(source interface{}, _ reflect.Kind) bool { +func (t *typeValidator) Applies(source any, _ reflect.Kind) bool { // typeValidator applies to Schema, Parameter and Header objects switch source.(type) { case *spec.Schema: @@ -73,7 +62,7 @@ func (t *typeValidator) Applies(source interface{}, _ reflect.Kind) bool { return (len(t.Type) > 0 || t.Format != "") } -func (t *typeValidator) Validate(data interface{}) *Result { +func (t *typeValidator) Validate(data any) *Result { if t.Options.recycleValidators { defer func() { t.redeem() @@ -120,7 +109,7 @@ func (t *typeValidator) Validate(data interface{}) *Result { return emptyResult } -func (t *typeValidator) schemaInfoForType(data interface{}) (string, string) { +func (t *typeValidator) schemaInfoForType(data any) (string, string) { // internal type to JSON type with swagger 2.0 format (with go-openapi/strfmt extensions), // see https://github.com/go-openapi/strfmt/blob/master/README.md // TODO: this switch really is some sort of reverse lookup for formats. It should be provided by strfmt. diff --git a/vendor/github.com/go-openapi/validate/validator.go b/vendor/github.com/go-openapi/validate/validator.go index b76b8636141..289a847fc7b 100644 --- a/vendor/github.com/go-openapi/validate/validator.go +++ b/vendor/github.com/go-openapi/validate/validator.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate @@ -25,18 +14,18 @@ import ( // An EntityValidator is an interface for things that can validate entities type EntityValidator interface { - Validate(interface{}) *Result + Validate(any) *Result } type valueValidator interface { SetPath(path string) - Applies(interface{}, reflect.Kind) bool - Validate(interface{}) *Result + Applies(any, reflect.Kind) bool + Validate(any) *Result } type itemsValidator struct { items *spec.Items - root interface{} + root any path string in string validators [6]valueValidator @@ -44,7 +33,7 @@ type itemsValidator struct { Options *SchemaValidatorOptions } -func newItemsValidator(path, in string, items *spec.Items, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *itemsValidator { +func newItemsValidator(path, in string, items *spec.Items, root any, formats strfmt.Registry, opts *SchemaValidatorOptions) *itemsValidator { if opts == nil { opts = new(SchemaValidatorOptions) } @@ -73,7 +62,7 @@ func newItemsValidator(path, in string, items *spec.Items, root interface{}, for return iv } -func (i *itemsValidator) Validate(index int, data interface{}) *Result { +func (i *itemsValidator) Validate(index int, data any) *Result { if i.Options.recycleValidators { defer func() { i.redeemChildren() @@ -226,12 +215,12 @@ func (i *itemsValidator) redeemChildren() { type basicCommonValidator struct { Path string In string - Default interface{} - Enum []interface{} + Default any + Enum []any Options *SchemaValidatorOptions } -func newBasicCommonValidator(path, in string, def interface{}, enum []interface{}, opts *SchemaValidatorOptions) *basicCommonValidator { +func newBasicCommonValidator(path, in string, def any, enum []any, opts *SchemaValidatorOptions) *basicCommonValidator { if opts == nil { opts = new(SchemaValidatorOptions) } @@ -256,7 +245,7 @@ func (b *basicCommonValidator) SetPath(path string) { b.Path = path } -func (b *basicCommonValidator) Applies(source interface{}, _ reflect.Kind) bool { +func (b *basicCommonValidator) Applies(source any, _ reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Header: return true @@ -265,7 +254,7 @@ func (b *basicCommonValidator) Applies(source interface{}, _ reflect.Kind) bool } } -func (b *basicCommonValidator) Validate(data interface{}) (res *Result) { +func (b *basicCommonValidator) Validate(data any) (res *Result) { if b.Options.recycleValidators { defer func() { b.redeem() @@ -352,7 +341,7 @@ func newHeaderValidator(name string, header *spec.Header, formats strfmt.Registr } // Validate the value of the header against its schema -func (p *HeaderValidator) Validate(data interface{}) *Result { +func (p *HeaderValidator) Validate(data any) *Result { if p.Options.recycleValidators { defer func() { p.redeemChildren() @@ -543,7 +532,7 @@ func newParamValidator(param *spec.Parameter, formats strfmt.Registry, opts *Sch } // Validate the data against the description of the parameter -func (p *ParamValidator) Validate(data interface{}) *Result { +func (p *ParamValidator) Validate(data any) *Result { if data == nil { return nil } @@ -685,20 +674,20 @@ func (p *ParamValidator) redeemChildren() { type basicSliceValidator struct { Path string In string - Default interface{} + Default any MaxItems *int64 MinItems *int64 UniqueItems bool Items *spec.Items - Source interface{} + Source any KnownFormats strfmt.Registry Options *SchemaValidatorOptions } func newBasicSliceValidator( path, in string, - def interface{}, maxItems, minItems *int64, uniqueItems bool, items *spec.Items, - source interface{}, formats strfmt.Registry, + def any, maxItems, minItems *int64, uniqueItems bool, items *spec.Items, + source any, formats strfmt.Registry, opts *SchemaValidatorOptions) *basicSliceValidator { if opts == nil { opts = new(SchemaValidatorOptions) @@ -729,7 +718,7 @@ func (s *basicSliceValidator) SetPath(path string) { s.Path = path } -func (s *basicSliceValidator) Applies(source interface{}, kind reflect.Kind) bool { +func (s *basicSliceValidator) Applies(source any, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Items, *spec.Header: return kind == reflect.Slice @@ -738,7 +727,7 @@ func (s *basicSliceValidator) Applies(source interface{}, kind reflect.Kind) boo } } -func (s *basicSliceValidator) Validate(data interface{}) *Result { +func (s *basicSliceValidator) Validate(data any) *Result { if s.Options.recycleValidators { defer func() { s.redeem() @@ -792,7 +781,7 @@ func (s *basicSliceValidator) redeem() { type numberValidator struct { Path string In string - Default interface{} + Default any MultipleOf *float64 Maximum *float64 ExclusiveMaximum bool @@ -805,7 +794,7 @@ type numberValidator struct { } func newNumberValidator( - path, in string, def interface{}, + path, in string, def any, multipleOf, maximum *float64, exclusiveMaximum bool, minimum *float64, exclusiveMinimum bool, typ, format string, opts *SchemaValidatorOptions) *numberValidator { @@ -839,7 +828,7 @@ func (n *numberValidator) SetPath(path string) { n.Path = path } -func (n *numberValidator) Applies(source interface{}, kind reflect.Kind) bool { +func (n *numberValidator) Applies(source any, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: isInt := kind >= reflect.Int && kind <= reflect.Uint64 @@ -871,7 +860,7 @@ func (n *numberValidator) Applies(source interface{}, kind reflect.Kind) bool { // TODO: consider replacing boundary check errors by simple warnings. // // TODO: default boundaries with MAX_SAFE_INTEGER are not checked (specific to json.Number?) -func (n *numberValidator) Validate(val interface{}) *Result { +func (n *numberValidator) Validate(val any) *Result { if n.Options.recycleValidators { defer func() { n.redeem() @@ -958,7 +947,7 @@ func (n *numberValidator) redeem() { type stringValidator struct { Path string In string - Default interface{} + Default any Required bool AllowEmptyValue bool MaxLength *int64 @@ -969,7 +958,7 @@ type stringValidator struct { func newStringValidator( path, in string, - def interface{}, required, allowEmpty bool, maxLength, minLength *int64, pattern string, + def any, required, allowEmpty bool, maxLength, minLength *int64, pattern string, opts *SchemaValidatorOptions) *stringValidator { if opts == nil { opts = new(SchemaValidatorOptions) @@ -999,7 +988,7 @@ func (s *stringValidator) SetPath(path string) { s.Path = path } -func (s *stringValidator) Applies(source interface{}, kind reflect.Kind) bool { +func (s *stringValidator) Applies(source any, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: return kind == reflect.String @@ -1008,7 +997,7 @@ func (s *stringValidator) Applies(source interface{}, kind reflect.Kind) bool { } } -func (s *stringValidator) Validate(val interface{}) *Result { +func (s *stringValidator) Validate(val any) *Result { if s.Options.recycleValidators { defer func() { s.redeem() diff --git a/vendor/github.com/go-openapi/validate/values.go b/vendor/github.com/go-openapi/validate/values.go index 1bfa6f3c8cf..e7dd5c8d3ab 100644 --- a/vendor/github.com/go-openapi/validate/values.go +++ b/vendor/github.com/go-openapi/validate/values.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// 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. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package validate diff --git a/vendor/github.com/gofrs/uuid/.gitignore b/vendor/github.com/gofrs/uuid/.gitignore deleted file mode 100644 index 666dbbb5bcd..00000000000 --- a/vendor/github.com/gofrs/uuid/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# binary bundle generated by go-fuzz -uuid-fuzz.zip diff --git a/vendor/github.com/gofrs/uuid/LICENSE b/vendor/github.com/gofrs/uuid/LICENSE deleted file mode 100644 index 926d5498702..00000000000 --- a/vendor/github.com/gofrs/uuid/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (C) 2013-2018 by Maxim Bublis - -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/gofrs/uuid/README.md b/vendor/github.com/gofrs/uuid/README.md deleted file mode 100644 index 4f73bec82c0..00000000000 --- a/vendor/github.com/gofrs/uuid/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# UUID - -[![License](https://img.shields.io/github/license/gofrs/uuid.svg)](https://github.com/gofrs/uuid/blob/master/LICENSE) -[![Build Status](https://travis-ci.org/gofrs/uuid.svg?branch=master)](https://travis-ci.org/gofrs/uuid) -[![GoDoc](http://godoc.org/github.com/gofrs/uuid?status.svg)](http://godoc.org/github.com/gofrs/uuid) -[![Coverage Status](https://codecov.io/gh/gofrs/uuid/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/gofrs/uuid/) -[![Go Report Card](https://goreportcard.com/badge/github.com/gofrs/uuid)](https://goreportcard.com/report/github.com/gofrs/uuid) - -Package uuid provides a pure Go implementation of Universally Unique Identifiers -(UUID) variant as defined in RFC-4122. This package supports both the creation -and parsing of UUIDs in different formats. - -This package supports the following UUID versions: -* Version 1, based on timestamp and MAC address (RFC-4122) -* Version 3, based on MD5 hashing of a named value (RFC-4122) -* Version 4, based on random numbers (RFC-4122) -* Version 5, based on SHA-1 hashing of a named value (RFC-4122) - -This package also supports experimental Universally Unique Identifier implementations based on a -[draft RFC](https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html) that updates RFC-4122 -* Version 6, a k-sortable id based on timestamp, and field-compatible with v1 (draft-peabody-dispatch-new-uuid-format, RFC-4122) -* Version 7, a k-sortable id based on timestamp (draft-peabody-dispatch-new-uuid-format, RFC-4122) - -The v6 and v7 IDs are **not** considered a part of the stable API, and may be subject to behavior or API changes as part of minor releases -to this package. They will be updated as the draft RFC changes, and will become stable if and when the draft RFC is accepted. - -## Project History - -This project was originally forked from the -[github.com/satori/go.uuid](https://github.com/satori/go.uuid) repository after -it appeared to be no longer maintained, while exhibiting [critical -flaws](https://github.com/satori/go.uuid/issues/73). We have decided to take -over this project to ensure it receives regular maintenance for the benefit of -the larger Go community. - -We'd like to thank Maxim Bublis for his hard work on the original iteration of -the package. - -## License - -This source code of this package is released under the MIT License. Please see -the [LICENSE](https://github.com/gofrs/uuid/blob/master/LICENSE) for the full -content of the license. - -## Recommended Package Version - -We recommend using v2.0.0+ of this package, as versions prior to 2.0.0 were -created before our fork of the original package and have some known -deficiencies. - -## Installation - -It is recommended to use a package manager like `dep` that understands tagged -releases of a package, as well as semantic versioning. - -If you are unable to make use of a dependency manager with your project, you can -use the `go get` command to download it directly: - -```Shell -$ go get github.com/gofrs/uuid -``` - -## Requirements - -Due to subtests not being supported in older versions of Go, this package is -only regularly tested against Go 1.7+. This package may work perfectly fine with -Go 1.2+, but support for these older versions is not actively maintained. - -## Go 1.11 Modules - -As of v3.2.0, this repository no longer adopts Go modules, and v3.2.0 no longer has a `go.mod` file. As a result, v3.2.0 also drops support for the `github.com/gofrs/uuid/v3` import path. Only module-based consumers are impacted. With the v3.2.0 release, _all_ gofrs/uuid consumers should use the `github.com/gofrs/uuid` import path. - -An existing module-based consumer will continue to be able to build using the `github.com/gofrs/uuid/v3` import path using any valid consumer `go.mod` that worked prior to the publishing of v3.2.0, but any module-based consumer should start using the `github.com/gofrs/uuid` import path when possible and _must_ use the `github.com/gofrs/uuid` import path prior to upgrading to v3.2.0. - -Please refer to [Issue #61](https://github.com/gofrs/uuid/issues/61) and [Issue #66](https://github.com/gofrs/uuid/issues/66) for more details. - -## Usage - -Here is a quick overview of how to use this package. For more detailed -documentation, please see the [GoDoc Page](http://godoc.org/github.com/gofrs/uuid). - -```go -package main - -import ( - "log" - - "github.com/gofrs/uuid" -) - -// Create a Version 4 UUID, panicking on error. -// Use this form to initialize package-level variables. -var u1 = uuid.Must(uuid.NewV4()) - -func main() { - // Create a Version 4 UUID. - u2, err := uuid.NewV4() - if err != nil { - log.Fatalf("failed to generate UUID: %v", err) - } - log.Printf("generated Version 4 UUID %v", u2) - - // Parse a UUID from a string. - s := "6ba7b810-9dad-11d1-80b4-00c04fd430c8" - u3, err := uuid.FromString(s) - if err != nil { - log.Fatalf("failed to parse UUID %q: %v", s, err) - } - log.Printf("successfully parsed UUID %v", u3) -} -``` - -## References - -* [RFC-4122](https://tools.ietf.org/html/rfc4122) -* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01) -* [New UUID Formats RFC Draft (Peabody) Rev 04](https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#) diff --git a/vendor/github.com/gofrs/uuid/codec.go b/vendor/github.com/gofrs/uuid/codec.go deleted file mode 100644 index 665026414c3..00000000000 --- a/vendor/github.com/gofrs/uuid/codec.go +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// 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. - -package uuid - -import ( - "errors" - "fmt" -) - -// FromBytes returns a UUID generated from the raw byte slice input. -// It will return an error if the slice isn't 16 bytes long. -func FromBytes(input []byte) (UUID, error) { - u := UUID{} - err := u.UnmarshalBinary(input) - return u, err -} - -// FromBytesOrNil returns a UUID generated from the raw byte slice input. -// Same behavior as FromBytes(), but returns uuid.Nil instead of an error. -func FromBytesOrNil(input []byte) UUID { - uuid, err := FromBytes(input) - if err != nil { - return Nil - } - return uuid -} - -var errInvalidFormat = errors.New("uuid: invalid UUID format") - -func fromHexChar(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 255 -} - -// Parse parses the UUID stored in the string text. Parsing and supported -// formats are the same as UnmarshalText. -func (u *UUID) Parse(s string) error { - switch len(s) { - case 32: // hash - case 36: // canonical - case 34, 38: - if s[0] != '{' || s[len(s)-1] != '}' { - return fmt.Errorf("uuid: incorrect UUID format in string %q", s) - } - s = s[1 : len(s)-1] - case 41, 45: - if s[:9] != "urn:uuid:" { - return fmt.Errorf("uuid: incorrect UUID format in string %q", s[:9]) - } - s = s[9:] - default: - return fmt.Errorf("uuid: incorrect UUID length %d in string %q", len(s), s) - } - // canonical - if len(s) == 36 { - if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { - return fmt.Errorf("uuid: incorrect UUID format in string %q", s) - } - for i, x := range [16]byte{ - 0, 2, 4, 6, - 9, 11, - 14, 16, - 19, 21, - 24, 26, 28, 30, 32, 34, - } { - v1 := fromHexChar(s[x]) - v2 := fromHexChar(s[x+1]) - if v1|v2 == 255 { - return errInvalidFormat - } - u[i] = (v1 << 4) | v2 - } - return nil - } - // hash like - for i := 0; i < 32; i += 2 { - v1 := fromHexChar(s[i]) - v2 := fromHexChar(s[i+1]) - if v1|v2 == 255 { - return errInvalidFormat - } - u[i/2] = (v1 << 4) | v2 - } - return nil -} - -// FromString returns a UUID parsed from the input string. -// Input is expected in a form accepted by UnmarshalText. -func FromString(text string) (UUID, error) { - var u UUID - err := u.Parse(text) - return u, err -} - -// FromStringOrNil returns a UUID parsed from the input string. -// Same behavior as FromString(), but returns uuid.Nil instead of an error. -func FromStringOrNil(input string) UUID { - uuid, err := FromString(input) - if err != nil { - return Nil - } - return uuid -} - -// MarshalText implements the encoding.TextMarshaler interface. -// The encoding is the same as returned by the String() method. -func (u UUID) MarshalText() ([]byte, error) { - var buf [36]byte - encodeCanonical(buf[:], u) - return buf[:], nil -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -// Following formats are supported: -// -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8", -// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}", -// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" -// "6ba7b8109dad11d180b400c04fd430c8" -// "{6ba7b8109dad11d180b400c04fd430c8}", -// "urn:uuid:6ba7b8109dad11d180b400c04fd430c8" -// -// ABNF for supported UUID text representation follows: -// -// URN := 'urn' -// UUID-NID := 'uuid' -// -// hexdig := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | -// 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | -// 'A' | 'B' | 'C' | 'D' | 'E' | 'F' -// -// hexoct := hexdig hexdig -// 2hexoct := hexoct hexoct -// 4hexoct := 2hexoct 2hexoct -// 6hexoct := 4hexoct 2hexoct -// 12hexoct := 6hexoct 6hexoct -// -// hashlike := 12hexoct -// canonical := 4hexoct '-' 2hexoct '-' 2hexoct '-' 6hexoct -// -// plain := canonical | hashlike -// uuid := canonical | hashlike | braced | urn -// -// braced := '{' plain '}' | '{' hashlike '}' -// urn := URN ':' UUID-NID ':' plain -func (u *UUID) UnmarshalText(b []byte) error { - switch len(b) { - case 32: // hash - case 36: // canonical - case 34, 38: - if b[0] != '{' || b[len(b)-1] != '}' { - return fmt.Errorf("uuid: incorrect UUID format in string %q", b) - } - b = b[1 : len(b)-1] - case 41, 45: - if string(b[:9]) != "urn:uuid:" { - return fmt.Errorf("uuid: incorrect UUID format in string %q", b[:9]) - } - b = b[9:] - default: - return fmt.Errorf("uuid: incorrect UUID length %d in string %q", len(b), b) - } - if len(b) == 36 { - if b[8] != '-' || b[13] != '-' || b[18] != '-' || b[23] != '-' { - return fmt.Errorf("uuid: incorrect UUID format in string %q", b) - } - for i, x := range [16]byte{ - 0, 2, 4, 6, - 9, 11, - 14, 16, - 19, 21, - 24, 26, 28, 30, 32, 34, - } { - v1 := fromHexChar(b[x]) - v2 := fromHexChar(b[x+1]) - if v1|v2 == 255 { - return errInvalidFormat - } - u[i] = (v1 << 4) | v2 - } - return nil - } - for i := 0; i < 32; i += 2 { - v1 := fromHexChar(b[i]) - v2 := fromHexChar(b[i+1]) - if v1|v2 == 255 { - return errInvalidFormat - } - u[i/2] = (v1 << 4) | v2 - } - return nil -} - -// MarshalBinary implements the encoding.BinaryMarshaler interface. -func (u UUID) MarshalBinary() ([]byte, error) { - return u.Bytes(), nil -} - -// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. -// It will return an error if the slice isn't 16 bytes long. -func (u *UUID) UnmarshalBinary(data []byte) error { - if len(data) != Size { - return fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data)) - } - copy(u[:], data) - - return nil -} diff --git a/vendor/github.com/gofrs/uuid/fuzz.go b/vendor/github.com/gofrs/uuid/fuzz.go deleted file mode 100644 index ccf8d4ca296..00000000000 --- a/vendor/github.com/gofrs/uuid/fuzz.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018 Andrei Tudor Călin -// -// 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. - -//go:build gofuzz -// +build gofuzz - -package uuid - -// Fuzz implements a simple fuzz test for FromString / UnmarshalText. -// -// To run: -// -// $ go get github.com/dvyukov/go-fuzz/... -// $ cd $GOPATH/src/github.com/gofrs/uuid -// $ go-fuzz-build github.com/gofrs/uuid -// $ go-fuzz -bin=uuid-fuzz.zip -workdir=./testdata -// -// If you make significant changes to FromString / UnmarshalText and add -// new cases to fromStringTests (in codec_test.go), please run -// -// $ go test -seed_fuzz_corpus -// -// to seed the corpus with the new interesting inputs, then run the fuzzer. -func Fuzz(data []byte) int { - _, err := FromString(string(data)) - if err != nil { - return 0 - } - return 1 -} diff --git a/vendor/github.com/gofrs/uuid/generator.go b/vendor/github.com/gofrs/uuid/generator.go deleted file mode 100644 index 44be9e15854..00000000000 --- a/vendor/github.com/gofrs/uuid/generator.go +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// 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. - -package uuid - -import ( - "crypto/md5" - "crypto/rand" - "crypto/sha1" - "encoding/binary" - "fmt" - "hash" - "io" - "net" - "sync" - "time" -) - -// Difference in 100-nanosecond intervals between -// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970). -const epochStart = 122192928000000000 - -// EpochFunc is the function type used to provide the current time. -type EpochFunc func() time.Time - -// HWAddrFunc is the function type used to provide hardware (MAC) addresses. -type HWAddrFunc func() (net.HardwareAddr, error) - -// DefaultGenerator is the default UUID Generator used by this package. -var DefaultGenerator Generator = NewGen() - -// NewV1 returns a UUID based on the current timestamp and MAC address. -func NewV1() (UUID, error) { - return DefaultGenerator.NewV1() -} - -// NewV3 returns a UUID based on the MD5 hash of the namespace UUID and name. -func NewV3(ns UUID, name string) UUID { - return DefaultGenerator.NewV3(ns, name) -} - -// NewV4 returns a randomly generated UUID. -func NewV4() (UUID, error) { - return DefaultGenerator.NewV4() -} - -// NewV5 returns a UUID based on SHA-1 hash of the namespace UUID and name. -func NewV5(ns UUID, name string) UUID { - return DefaultGenerator.NewV5(ns, name) -} - -// NewV6 returns a k-sortable UUID based on a timestamp and 48 bits of -// pseudorandom data. The timestamp in a V6 UUID is the same as V1, with the bit -// order being adjusted to allow the UUID to be k-sortable. -// -// This is implemented based on revision 03 of the Peabody UUID draft, and may -// be subject to change pending further revisions. Until the final specification -// revision is finished, changes required to implement updates to the spec will -// not be considered a breaking change. They will happen as a minor version -// releases until the spec is final. -func NewV6() (UUID, error) { - return DefaultGenerator.NewV6() -} - -// NewV7 returns a k-sortable UUID based on the current millisecond precision -// UNIX epoch and 74 bits of pseudorandom data. It supports single-node batch generation (multiple UUIDs in the same timestamp) with a Monotonic Random counter. -// -// This is implemented based on revision 04 of the Peabody UUID draft, and may -// be subject to change pending further revisions. Until the final specification -// revision is finished, changes required to implement updates to the spec will -// not be considered a breaking change. They will happen as a minor version -// releases until the spec is final. -func NewV7() (UUID, error) { - return DefaultGenerator.NewV7() -} - -// Generator provides an interface for generating UUIDs. -type Generator interface { - NewV1() (UUID, error) - NewV3(ns UUID, name string) UUID - NewV4() (UUID, error) - NewV5(ns UUID, name string) UUID - NewV6() (UUID, error) - NewV7() (UUID, error) -} - -// Gen is a reference UUID generator based on the specifications laid out in -// RFC-4122 and DCE 1.1: Authentication and Security Services. This type -// satisfies the Generator interface as defined in this package. -// -// For consumers who are generating V1 UUIDs, but don't want to expose the MAC -// address of the node generating the UUIDs, the NewGenWithHWAF() function has been -// provided as a convenience. See the function's documentation for more info. -// -// The authors of this package do not feel that the majority of users will need -// to obfuscate their MAC address, and so we recommend using NewGen() to create -// a new generator. -type Gen struct { - clockSequenceOnce sync.Once - hardwareAddrOnce sync.Once - storageMutex sync.Mutex - - rand io.Reader - - epochFunc EpochFunc - hwAddrFunc HWAddrFunc - lastTime uint64 - clockSequence uint16 - hardwareAddr [6]byte -} - -// GenOption is a function type that can be used to configure a Gen generator. -type GenOption func(*Gen) - -// interface check -- build will fail if *Gen doesn't satisfy Generator -var _ Generator = (*Gen)(nil) - -// NewGen returns a new instance of Gen with some default values set. Most -// people should use this. -func NewGen() *Gen { - return NewGenWithHWAF(defaultHWAddrFunc) -} - -// NewGenWithHWAF builds a new UUID generator with the HWAddrFunc provided. Most -// consumers should use NewGen() instead. -// -// This is used so that consumers can generate their own MAC addresses, for use -// in the generated UUIDs, if there is some concern about exposing the physical -// address of the machine generating the UUID. -// -// The Gen generator will only invoke the HWAddrFunc once, and cache that MAC -// address for all the future UUIDs generated by it. If you'd like to switch the -// MAC address being used, you'll need to create a new generator using this -// function. -func NewGenWithHWAF(hwaf HWAddrFunc) *Gen { - return NewGenWithOptions(WithHWAddrFunc(hwaf)) -} - -// NewGenWithOptions returns a new instance of Gen with the options provided. -// Most people should use NewGen() or NewGenWithHWAF() instead. -// -// To customize the generator, you can pass in one or more GenOption functions. -// For example: -// -// gen := NewGenWithOptions( -// WithHWAddrFunc(myHWAddrFunc), -// WithEpochFunc(myEpochFunc), -// WithRandomReader(myRandomReader), -// ) -// -// NewGenWithOptions(WithHWAddrFunc(myHWAddrFunc)) is equivalent to calling -// NewGenWithHWAF(myHWAddrFunc) -// NewGenWithOptions() is equivalent to calling NewGen() -func NewGenWithOptions(opts ...GenOption) *Gen { - gen := &Gen{ - epochFunc: time.Now, - hwAddrFunc: defaultHWAddrFunc, - rand: rand.Reader, - } - - for _, opt := range opts { - opt(gen) - } - - return gen -} - -// WithHWAddrFunc is a GenOption that allows you to provide your own HWAddrFunc -// function. -// When this option is nil, the defaultHWAddrFunc is used. -func WithHWAddrFunc(hwaf HWAddrFunc) GenOption { - return func(gen *Gen) { - if hwaf == nil { - hwaf = defaultHWAddrFunc - } - - gen.hwAddrFunc = hwaf - } -} - -// WithEpochFunc is a GenOption that allows you to provide your own EpochFunc -// function. -// When this option is nil, time.Now is used. -func WithEpochFunc(epochf EpochFunc) GenOption { - return func(gen *Gen) { - if epochf == nil { - epochf = time.Now - } - - gen.epochFunc = epochf - } -} - -// WithRandomReader is a GenOption that allows you to provide your own random -// reader. -// When this option is nil, the default rand.Reader is used. -func WithRandomReader(reader io.Reader) GenOption { - return func(gen *Gen) { - if reader == nil { - reader = rand.Reader - } - - gen.rand = reader - } -} - -// NewV1 returns a UUID based on the current timestamp and MAC address. -func (g *Gen) NewV1() (UUID, error) { - u := UUID{} - - timeNow, clockSeq, err := g.getClockSequence(false) - if err != nil { - return Nil, err - } - binary.BigEndian.PutUint32(u[0:], uint32(timeNow)) - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32)) - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48)) - binary.BigEndian.PutUint16(u[8:], clockSeq) - - hardwareAddr, err := g.getHardwareAddr() - if err != nil { - return Nil, err - } - copy(u[10:], hardwareAddr) - - u.SetVersion(V1) - u.SetVariant(VariantRFC4122) - - return u, nil -} - -// NewV3 returns a UUID based on the MD5 hash of the namespace UUID and name. -func (g *Gen) NewV3(ns UUID, name string) UUID { - u := newFromHash(md5.New(), ns, name) - u.SetVersion(V3) - u.SetVariant(VariantRFC4122) - - return u -} - -// NewV4 returns a randomly generated UUID. -func (g *Gen) NewV4() (UUID, error) { - u := UUID{} - if _, err := io.ReadFull(g.rand, u[:]); err != nil { - return Nil, err - } - u.SetVersion(V4) - u.SetVariant(VariantRFC4122) - - return u, nil -} - -// NewV5 returns a UUID based on SHA-1 hash of the namespace UUID and name. -func (g *Gen) NewV5(ns UUID, name string) UUID { - u := newFromHash(sha1.New(), ns, name) - u.SetVersion(V5) - u.SetVariant(VariantRFC4122) - - return u -} - -// NewV6 returns a k-sortable UUID based on a timestamp and 48 bits of -// pseudorandom data. The timestamp in a V6 UUID is the same as V1, with the bit -// order being adjusted to allow the UUID to be k-sortable. -// -// This is implemented based on revision 03 of the Peabody UUID draft, and may -// be subject to change pending further revisions. Until the final specification -// revision is finished, changes required to implement updates to the spec will -// not be considered a breaking change. They will happen as a minor version -// releases until the spec is final. -func (g *Gen) NewV6() (UUID, error) { - var u UUID - - if _, err := io.ReadFull(g.rand, u[10:]); err != nil { - return Nil, err - } - - timeNow, clockSeq, err := g.getClockSequence(false) - if err != nil { - return Nil, err - } - - binary.BigEndian.PutUint32(u[0:], uint32(timeNow>>28)) // set time_high - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>12)) // set time_mid - binary.BigEndian.PutUint16(u[6:], uint16(timeNow&0xfff)) // set time_low (minus four version bits) - binary.BigEndian.PutUint16(u[8:], clockSeq&0x3fff) // set clk_seq_hi_res (minus two variant bits) - - u.SetVersion(V6) - u.SetVariant(VariantRFC4122) - - return u, nil -} - -// getClockSequence returns the epoch and clock sequence for V1,V6 and V7 UUIDs. -// -// When useUnixTSMs is false, it uses the Coordinated Universal Time (UTC) as a count of 100- -// -// nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of Gregorian reform to the Christian calendar). -func (g *Gen) getClockSequence(useUnixTSMs bool) (uint64, uint16, error) { - var err error - g.clockSequenceOnce.Do(func() { - buf := make([]byte, 2) - if _, err = io.ReadFull(g.rand, buf); err != nil { - return - } - g.clockSequence = binary.BigEndian.Uint16(buf) - }) - if err != nil { - return 0, 0, err - } - - g.storageMutex.Lock() - defer g.storageMutex.Unlock() - - var timeNow uint64 - if useUnixTSMs { - timeNow = uint64(g.epochFunc().UnixMilli()) - } else { - timeNow = g.getEpoch() - } - // Clock didn't change since last UUID generation. - // Should increase clock sequence. - if timeNow <= g.lastTime { - g.clockSequence++ - } - g.lastTime = timeNow - - return timeNow, g.clockSequence, nil -} - -// NewV7 returns a k-sortable UUID based on the current millisecond precision -// UNIX epoch and 74 bits of pseudorandom data. -// -// This is implemented based on revision 04 of the Peabody UUID draft, and may -// be subject to change pending further revisions. Until the final specification -// revision is finished, changes required to implement updates to the spec will -// not be considered a breaking change. They will happen as a minor version -// releases until the spec is final. -func (g *Gen) NewV7() (UUID, error) { - var u UUID - /* https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#name-uuid-version-7 - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | unix_ts_ms | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | unix_ts_ms | ver | rand_a | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - |var| rand_b | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | rand_b | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ - - ms, clockSeq, err := g.getClockSequence(true) - if err != nil { - return Nil, err - } - //UUIDv7 features a 48 bit timestamp. First 32bit (4bytes) represents seconds since 1970, followed by 2 bytes for the ms granularity. - u[0] = byte(ms >> 40) //1-6 bytes: big-endian unsigned number of Unix epoch timestamp - u[1] = byte(ms >> 32) - u[2] = byte(ms >> 24) - u[3] = byte(ms >> 16) - u[4] = byte(ms >> 8) - u[5] = byte(ms) - - //support batching by using a monotonic pseudo-random sequence - //The 6th byte contains the version and partially rand_a data. - //We will lose the most significant bites from the clockSeq (with SetVersion), but it is ok, we need the least significant that contains the counter to ensure the monotonic property - binary.BigEndian.PutUint16(u[6:8], clockSeq) // set rand_a with clock seq which is random and monotonic - - //override first 4bits of u[6]. - u.SetVersion(V7) - - //set rand_b 64bits of pseudo-random bits (first 2 will be overridden) - if _, err = io.ReadFull(g.rand, u[8:16]); err != nil { - return Nil, err - } - //override first 2 bits of byte[8] for the variant - u.SetVariant(VariantRFC4122) - - return u, nil -} - -// Returns the hardware address. -func (g *Gen) getHardwareAddr() ([]byte, error) { - var err error - g.hardwareAddrOnce.Do(func() { - var hwAddr net.HardwareAddr - if hwAddr, err = g.hwAddrFunc(); err == nil { - copy(g.hardwareAddr[:], hwAddr) - return - } - - // Initialize hardwareAddr randomly in case - // of real network interfaces absence. - if _, err = io.ReadFull(g.rand, g.hardwareAddr[:]); err != nil { - return - } - // Set multicast bit as recommended by RFC-4122 - g.hardwareAddr[0] |= 0x01 - }) - if err != nil { - return []byte{}, err - } - return g.hardwareAddr[:], nil -} - -// Returns the difference between UUID epoch (October 15, 1582) -// and current time in 100-nanosecond intervals. -func (g *Gen) getEpoch() uint64 { - return epochStart + uint64(g.epochFunc().UnixNano()/100) -} - -// Returns the UUID based on the hashing of the namespace UUID and name. -func newFromHash(h hash.Hash, ns UUID, name string) UUID { - u := UUID{} - h.Write(ns[:]) - h.Write([]byte(name)) - copy(u[:], h.Sum(nil)) - - return u -} - -var netInterfaces = net.Interfaces - -// Returns the hardware address. -func defaultHWAddrFunc() (net.HardwareAddr, error) { - ifaces, err := netInterfaces() - if err != nil { - return []byte{}, err - } - for _, iface := range ifaces { - if len(iface.HardwareAddr) >= 6 { - return iface.HardwareAddr, nil - } - } - return []byte{}, fmt.Errorf("uuid: no HW address found") -} diff --git a/vendor/github.com/gofrs/uuid/sql.go b/vendor/github.com/gofrs/uuid/sql.go deleted file mode 100644 index 01d5d88496c..00000000000 --- a/vendor/github.com/gofrs/uuid/sql.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// 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. - -package uuid - -import ( - "database/sql" - "database/sql/driver" - "fmt" -) - -var _ driver.Valuer = UUID{} -var _ sql.Scanner = (*UUID)(nil) - -// Value implements the driver.Valuer interface. -func (u UUID) Value() (driver.Value, error) { - return u.String(), nil -} - -// Scan implements the sql.Scanner interface. -// A 16-byte slice will be handled by UnmarshalBinary, while -// a longer byte slice or a string will be handled by UnmarshalText. -func (u *UUID) Scan(src interface{}) error { - switch src := src.(type) { - case UUID: // support gorm convert from UUID to NullUUID - *u = src - return nil - - case []byte: - if len(src) == Size { - return u.UnmarshalBinary(src) - } - return u.UnmarshalText(src) - - case string: - uu, err := FromString(src) - *u = uu - return err - } - - return fmt.Errorf("uuid: cannot convert %T to UUID", src) -} - -// NullUUID can be used with the standard sql package to represent a -// UUID value that can be NULL in the database. -type NullUUID struct { - UUID UUID - Valid bool -} - -// Value implements the driver.Valuer interface. -func (u NullUUID) Value() (driver.Value, error) { - if !u.Valid { - return nil, nil - } - // Delegate to UUID Value function - return u.UUID.Value() -} - -// Scan implements the sql.Scanner interface. -func (u *NullUUID) Scan(src interface{}) error { - if src == nil { - u.UUID, u.Valid = Nil, false - return nil - } - - // Delegate to UUID Scan function - u.Valid = true - return u.UUID.Scan(src) -} - -var nullJSON = []byte("null") - -// MarshalJSON marshals the NullUUID as null or the nested UUID -func (u NullUUID) MarshalJSON() ([]byte, error) { - if !u.Valid { - return nullJSON, nil - } - var buf [38]byte - buf[0] = '"' - encodeCanonical(buf[1:37], u.UUID) - buf[37] = '"' - return buf[:], nil -} - -// UnmarshalJSON unmarshals a NullUUID -func (u *NullUUID) UnmarshalJSON(b []byte) error { - if string(b) == "null" { - u.UUID, u.Valid = Nil, false - return nil - } - if n := len(b); n >= 2 && b[0] == '"' { - b = b[1 : n-1] - } - err := u.UUID.UnmarshalText(b) - u.Valid = (err == nil) - return err -} diff --git a/vendor/github.com/gofrs/uuid/uuid.go b/vendor/github.com/gofrs/uuid/uuid.go deleted file mode 100644 index 5320fb53894..00000000000 --- a/vendor/github.com/gofrs/uuid/uuid.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (C) 2013-2018 by Maxim Bublis -// -// 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. - -// Package uuid provides implementations of the Universally Unique Identifier -// (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03). -// -// RFC-4122[1] provides the specification for versions 1, 3, 4, and 5. The -// Peabody UUID RFC Draft[2] provides the specification for the new k-sortable -// UUIDs, versions 6 and 7. -// -// DCE 1.1[3] provides the specification for version 2, but version 2 support -// was removed from this package in v4 due to some concerns with the -// specification itself. Reading the spec, it seems that it would result in -// generating UUIDs that aren't very unique. In having read the spec it seemed -// that our implementation did not meet the spec. It also seems to be at-odds -// with RFC 4122, meaning we would need quite a bit of special code to support -// it. Lastly, there were no Version 2 implementations that we could find to -// ensure we were understanding the specification correctly. -// -// [1] https://tools.ietf.org/html/rfc4122 -// [2] https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03 -// [3] http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01 -package uuid - -import ( - "encoding/binary" - "encoding/hex" - "fmt" - "time" -) - -// Size of a UUID in bytes. -const Size = 16 - -// UUID is an array type to represent the value of a UUID, as defined in RFC-4122. -type UUID [Size]byte - -// UUID versions. -const ( - _ byte = iota - V1 // Version 1 (date-time and MAC address) - _ // Version 2 (date-time and MAC address, DCE security version) [removed] - V3 // Version 3 (namespace name-based) - V4 // Version 4 (random) - V5 // Version 5 (namespace name-based) - V6 // Version 6 (k-sortable timestamp and random data, field-compatible with v1) [peabody draft] - V7 // Version 7 (k-sortable timestamp and random data) [peabody draft] - _ // Version 8 (k-sortable timestamp, meant for custom implementations) [peabody draft] [not implemented] -) - -// UUID layout variants. -const ( - VariantNCS byte = iota - VariantRFC4122 - VariantMicrosoft - VariantFuture -) - -// UUID DCE domains. -const ( - DomainPerson = iota - DomainGroup - DomainOrg -) - -// Timestamp is the count of 100-nanosecond intervals since 00:00:00.00, -// 15 October 1582 within a V1 UUID. This type has no meaning for other -// UUID versions since they don't have an embedded timestamp. -type Timestamp uint64 - -const _100nsPerSecond = 10000000 - -// Time returns the UTC time.Time representation of a Timestamp -func (t Timestamp) Time() (time.Time, error) { - secs := uint64(t) / _100nsPerSecond - nsecs := 100 * (uint64(t) % _100nsPerSecond) - - return time.Unix(int64(secs)-(epochStart/_100nsPerSecond), int64(nsecs)), nil -} - -// TimestampFromV1 returns the Timestamp embedded within a V1 UUID. -// Returns an error if the UUID is any version other than 1. -func TimestampFromV1(u UUID) (Timestamp, error) { - if u.Version() != 1 { - err := fmt.Errorf("uuid: %s is version %d, not version 1", u, u.Version()) - return 0, err - } - - low := binary.BigEndian.Uint32(u[0:4]) - mid := binary.BigEndian.Uint16(u[4:6]) - hi := binary.BigEndian.Uint16(u[6:8]) & 0xfff - - return Timestamp(uint64(low) + (uint64(mid) << 32) + (uint64(hi) << 48)), nil -} - -// TimestampFromV6 returns the Timestamp embedded within a V6 UUID. This -// function returns an error if the UUID is any version other than 6. -// -// This is implemented based on revision 03 of the Peabody UUID draft, and may -// be subject to change pending further revisions. Until the final specification -// revision is finished, changes required to implement updates to the spec will -// not be considered a breaking change. They will happen as a minor version -// releases until the spec is final. -func TimestampFromV6(u UUID) (Timestamp, error) { - if u.Version() != 6 { - return 0, fmt.Errorf("uuid: %s is version %d, not version 6", u, u.Version()) - } - - hi := binary.BigEndian.Uint32(u[0:4]) - mid := binary.BigEndian.Uint16(u[4:6]) - low := binary.BigEndian.Uint16(u[6:8]) & 0xfff - - return Timestamp(uint64(low) + (uint64(mid) << 12) + (uint64(hi) << 28)), nil -} - -// Nil is the nil UUID, as specified in RFC-4122, that has all 128 bits set to -// zero. -var Nil = UUID{} - -// Predefined namespace UUIDs. -var ( - NamespaceDNS = Must(FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) - NamespaceURL = Must(FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8")) - NamespaceOID = Must(FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) - NamespaceX500 = Must(FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) -) - -// IsNil returns if the UUID is equal to the nil UUID -func (u UUID) IsNil() bool { - return u == Nil -} - -// Version returns the algorithm version used to generate the UUID. -func (u UUID) Version() byte { - return u[6] >> 4 -} - -// Variant returns the UUID layout variant. -func (u UUID) Variant() byte { - switch { - case (u[8] >> 7) == 0x00: - return VariantNCS - case (u[8] >> 6) == 0x02: - return VariantRFC4122 - case (u[8] >> 5) == 0x06: - return VariantMicrosoft - case (u[8] >> 5) == 0x07: - fallthrough - default: - return VariantFuture - } -} - -// Bytes returns a byte slice representation of the UUID. -func (u UUID) Bytes() []byte { - return u[:] -} - -// encodeCanonical encodes the canonical RFC-4122 form of UUID u into the -// first 36 bytes dst. -func encodeCanonical(dst []byte, u UUID) { - const hextable = "0123456789abcdef" - dst[8] = '-' - dst[13] = '-' - dst[18] = '-' - dst[23] = '-' - for i, x := range [16]byte{ - 0, 2, 4, 6, - 9, 11, - 14, 16, - 19, 21, - 24, 26, 28, 30, 32, 34, - } { - c := u[i] - dst[x] = hextable[c>>4] - dst[x+1] = hextable[c&0x0f] - } -} - -// String returns a canonical RFC-4122 string representation of the UUID: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. -func (u UUID) String() string { - var buf [36]byte - encodeCanonical(buf[:], u) - return string(buf[:]) -} - -// Format implements fmt.Formatter for UUID values. -// -// The behavior is as follows: -// The 'x' and 'X' verbs output only the hex digits of the UUID, using a-f for 'x' and A-F for 'X'. -// The 'v', '+v', 's' and 'q' verbs return the canonical RFC-4122 string representation. -// The 'S' verb returns the RFC-4122 format, but with capital hex digits. -// The '#v' verb returns the "Go syntax" representation, which is a 16 byte array initializer. -// All other verbs not handled directly by the fmt package (like '%p') are unsupported and will return -// "%!verb(uuid.UUID=value)" as recommended by the fmt package. -func (u UUID) Format(f fmt.State, c rune) { - if c == 'v' && f.Flag('#') { - fmt.Fprintf(f, "%#v", [Size]byte(u)) - return - } - switch c { - case 'x', 'X': - b := make([]byte, 32) - hex.Encode(b, u[:]) - if c == 'X' { - toUpperHex(b) - } - _, _ = f.Write(b) - case 'v', 's', 'S': - b, _ := u.MarshalText() - if c == 'S' { - toUpperHex(b) - } - _, _ = f.Write(b) - case 'q': - b := make([]byte, 38) - b[0] = '"' - encodeCanonical(b[1:], u) - b[37] = '"' - _, _ = f.Write(b) - default: - // invalid/unsupported format verb - fmt.Fprintf(f, "%%!%c(uuid.UUID=%s)", c, u.String()) - } -} - -func toUpperHex(b []byte) { - for i, c := range b { - if 'a' <= c && c <= 'f' { - b[i] = c - ('a' - 'A') - } - } -} - -// SetVersion sets the version bits. -func (u *UUID) SetVersion(v byte) { - u[6] = (u[6] & 0x0f) | (v << 4) -} - -// SetVariant sets the variant bits. -func (u *UUID) SetVariant(v byte) { - switch v { - case VariantNCS: - u[8] = (u[8]&(0xff>>1) | (0x00 << 7)) - case VariantRFC4122: - u[8] = (u[8]&(0xff>>2) | (0x02 << 6)) - case VariantMicrosoft: - u[8] = (u[8]&(0xff>>3) | (0x06 << 5)) - case VariantFuture: - fallthrough - default: - u[8] = (u[8]&(0xff>>3) | (0x07 << 5)) - } -} - -// Must is a helper that wraps a call to a function returning (UUID, error) -// and panics if the error is non-nil. It is intended for use in variable -// initializations such as -// -// var packageUUID = uuid.Must(uuid.FromString("123e4567-e89b-12d3-a456-426655440000")) -func Must(u UUID, err error) UUID { - if err != nil { - panic(err) - } - return u -} diff --git a/vendor/github.com/golang-jwt/jwt/v5/MIGRATION_GUIDE.md b/vendor/github.com/golang-jwt/jwt/v5/MIGRATION_GUIDE.md index ff9c57e1d84..b3178e7519b 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/MIGRATION_GUIDE.md +++ b/vendor/github.com/golang-jwt/jwt/v5/MIGRATION_GUIDE.md @@ -155,7 +155,7 @@ stored in base64 encoded form, which was redundant with the information in the type Token struct { Raw string // Raw contains the raw token Method SigningMethod // Method is the signing method used or to be used - Header map[string]interface{} // Header is the first segment of the token in decoded form + Header map[string]any // Header is the first segment of the token in decoded form Claims Claims // Claims is the second segment of the token in decoded form Signature []byte // Signature is the third segment of the token in decoded form Valid bool // Valid specifies if the token is valid diff --git a/vendor/github.com/golang-jwt/jwt/v5/ecdsa.go b/vendor/github.com/golang-jwt/jwt/v5/ecdsa.go index c929e4a02fc..06cd94d2329 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/ecdsa.go +++ b/vendor/github.com/golang-jwt/jwt/v5/ecdsa.go @@ -55,7 +55,7 @@ func (m *SigningMethodECDSA) Alg() string { // Verify implements token verification for the SigningMethod. // For this verify method, key must be an ecdsa.PublicKey struct -func (m *SigningMethodECDSA) Verify(signingString string, sig []byte, key interface{}) error { +func (m *SigningMethodECDSA) Verify(signingString string, sig []byte, key any) error { // Get the key var ecdsaKey *ecdsa.PublicKey switch k := key.(type) { @@ -89,7 +89,7 @@ func (m *SigningMethodECDSA) Verify(signingString string, sig []byte, key interf // Sign implements token signing for the SigningMethod. // For this signing method, key must be an ecdsa.PrivateKey struct -func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) ([]byte, error) { +func (m *SigningMethodECDSA) Sign(signingString string, key any) ([]byte, error) { // Get the key var ecdsaKey *ecdsa.PrivateKey switch k := key.(type) { diff --git a/vendor/github.com/golang-jwt/jwt/v5/ecdsa_utils.go b/vendor/github.com/golang-jwt/jwt/v5/ecdsa_utils.go index 5700636d35b..44a3b7a1c23 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/ecdsa_utils.go +++ b/vendor/github.com/golang-jwt/jwt/v5/ecdsa_utils.go @@ -23,7 +23,7 @@ func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) { } // Parse the key - var parsedKey interface{} + var parsedKey any if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil { if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { return nil, err @@ -50,7 +50,7 @@ func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error) { } // Parse the key - var parsedKey interface{} + var parsedKey any if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { if cert, err := x509.ParseCertificate(block.Bytes); err == nil { parsedKey = cert.PublicKey diff --git a/vendor/github.com/golang-jwt/jwt/v5/ed25519.go b/vendor/github.com/golang-jwt/jwt/v5/ed25519.go index c2138119e51..4159e57bfef 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/ed25519.go +++ b/vendor/github.com/golang-jwt/jwt/v5/ed25519.go @@ -33,7 +33,7 @@ func (m *SigningMethodEd25519) Alg() string { // Verify implements token verification for the SigningMethod. // For this verify method, key must be an ed25519.PublicKey -func (m *SigningMethodEd25519) Verify(signingString string, sig []byte, key interface{}) error { +func (m *SigningMethodEd25519) Verify(signingString string, sig []byte, key any) error { var ed25519Key ed25519.PublicKey var ok bool @@ -55,7 +55,7 @@ func (m *SigningMethodEd25519) Verify(signingString string, sig []byte, key inte // Sign implements token signing for the SigningMethod. // For this signing method, key must be an ed25519.PrivateKey -func (m *SigningMethodEd25519) Sign(signingString string, key interface{}) ([]byte, error) { +func (m *SigningMethodEd25519) Sign(signingString string, key any) ([]byte, error) { var ed25519Key crypto.Signer var ok bool diff --git a/vendor/github.com/golang-jwt/jwt/v5/ed25519_utils.go b/vendor/github.com/golang-jwt/jwt/v5/ed25519_utils.go index cdb5e68e876..6f46e88605f 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/ed25519_utils.go +++ b/vendor/github.com/golang-jwt/jwt/v5/ed25519_utils.go @@ -24,7 +24,7 @@ func ParseEdPrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error) { } // Parse the key - var parsedKey interface{} + var parsedKey any if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { return nil, err } @@ -49,7 +49,7 @@ func ParseEdPublicKeyFromPEM(key []byte) (crypto.PublicKey, error) { } // Parse the key - var parsedKey interface{} + var parsedKey any if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { return nil, err } diff --git a/vendor/github.com/golang-jwt/jwt/v5/errors.go b/vendor/github.com/golang-jwt/jwt/v5/errors.go index 23bb616ddde..14e007516a0 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/errors.go +++ b/vendor/github.com/golang-jwt/jwt/v5/errors.go @@ -2,6 +2,7 @@ package jwt import ( "errors" + "fmt" "strings" ) @@ -47,3 +48,42 @@ func joinErrors(errs ...error) error { errs: errs, } } + +// Unwrap implements the multiple error unwrapping for this error type, which is +// possible in Go 1.20. +func (je joinedError) Unwrap() []error { + return je.errs +} + +// newError creates a new error message with a detailed error message. The +// message will be prefixed with the contents of the supplied error type. +// Additionally, more errors, that provide more context can be supplied which +// will be appended to the message. This makes use of Go 1.20's possibility to +// include more than one %w formatting directive in [fmt.Errorf]. +// +// For example, +// +// newError("no keyfunc was provided", ErrTokenUnverifiable) +// +// will produce the error string +// +// "token is unverifiable: no keyfunc was provided" +func newError(message string, err error, more ...error) error { + var format string + var args []any + if message != "" { + format = "%w: %s" + args = []any{err, message} + } else { + format = "%w" + args = []any{err} + } + + for _, e := range more { + format += ": %w" + args = append(args, e) + } + + err = fmt.Errorf(format, args...) + return err +} diff --git a/vendor/github.com/golang-jwt/jwt/v5/errors_go1_20.go b/vendor/github.com/golang-jwt/jwt/v5/errors_go1_20.go deleted file mode 100644 index a893d355e1a..00000000000 --- a/vendor/github.com/golang-jwt/jwt/v5/errors_go1_20.go +++ /dev/null @@ -1,47 +0,0 @@ -//go:build go1.20 -// +build go1.20 - -package jwt - -import ( - "fmt" -) - -// Unwrap implements the multiple error unwrapping for this error type, which is -// possible in Go 1.20. -func (je joinedError) Unwrap() []error { - return je.errs -} - -// newError creates a new error message with a detailed error message. The -// message will be prefixed with the contents of the supplied error type. -// Additionally, more errors, that provide more context can be supplied which -// will be appended to the message. This makes use of Go 1.20's possibility to -// include more than one %w formatting directive in [fmt.Errorf]. -// -// For example, -// -// newError("no keyfunc was provided", ErrTokenUnverifiable) -// -// will produce the error string -// -// "token is unverifiable: no keyfunc was provided" -func newError(message string, err error, more ...error) error { - var format string - var args []any - if message != "" { - format = "%w: %s" - args = []any{err, message} - } else { - format = "%w" - args = []any{err} - } - - for _, e := range more { - format += ": %w" - args = append(args, e) - } - - err = fmt.Errorf(format, args...) - return err -} diff --git a/vendor/github.com/golang-jwt/jwt/v5/errors_go_other.go b/vendor/github.com/golang-jwt/jwt/v5/errors_go_other.go deleted file mode 100644 index 2ad542f00ca..00000000000 --- a/vendor/github.com/golang-jwt/jwt/v5/errors_go_other.go +++ /dev/null @@ -1,78 +0,0 @@ -//go:build !go1.20 -// +build !go1.20 - -package jwt - -import ( - "errors" - "fmt" -) - -// Is implements checking for multiple errors using [errors.Is], since multiple -// error unwrapping is not possible in versions less than Go 1.20. -func (je joinedError) Is(err error) bool { - for _, e := range je.errs { - if errors.Is(e, err) { - return true - } - } - - return false -} - -// wrappedErrors is a workaround for wrapping multiple errors in environments -// where Go 1.20 is not available. It basically uses the already implemented -// functionality of joinedError to handle multiple errors with supplies a -// custom error message that is identical to the one we produce in Go 1.20 using -// multiple %w directives. -type wrappedErrors struct { - msg string - joinedError -} - -// Error returns the stored error string -func (we wrappedErrors) Error() string { - return we.msg -} - -// newError creates a new error message with a detailed error message. The -// message will be prefixed with the contents of the supplied error type. -// Additionally, more errors, that provide more context can be supplied which -// will be appended to the message. Since we cannot use of Go 1.20's possibility -// to include more than one %w formatting directive in [fmt.Errorf], we have to -// emulate that. -// -// For example, -// -// newError("no keyfunc was provided", ErrTokenUnverifiable) -// -// will produce the error string -// -// "token is unverifiable: no keyfunc was provided" -func newError(message string, err error, more ...error) error { - // We cannot wrap multiple errors here with %w, so we have to be a little - // bit creative. Basically, we are using %s instead of %w to produce the - // same error message and then throw the result into a custom error struct. - var format string - var args []any - if message != "" { - format = "%s: %s" - args = []any{err, message} - } else { - format = "%s" - args = []any{err} - } - errs := []error{err} - - for _, e := range more { - format += ": %s" - args = append(args, e) - errs = append(errs, e) - } - - err = &wrappedErrors{ - msg: fmt.Sprintf(format, args...), - joinedError: joinedError{errs: errs}, - } - return err -} diff --git a/vendor/github.com/golang-jwt/jwt/v5/hmac.go b/vendor/github.com/golang-jwt/jwt/v5/hmac.go index aca600ce1b0..1bef138c38e 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/hmac.go +++ b/vendor/github.com/golang-jwt/jwt/v5/hmac.go @@ -55,7 +55,7 @@ func (m *SigningMethodHMAC) Alg() string { // about this, and why we intentionally are not supporting string as a key can // be found on our usage guide // https://golang-jwt.github.io/jwt/usage/signing_methods/#signing-methods-and-key-types. -func (m *SigningMethodHMAC) Verify(signingString string, sig []byte, key interface{}) error { +func (m *SigningMethodHMAC) Verify(signingString string, sig []byte, key any) error { // Verify the key is the right type keyBytes, ok := key.([]byte) if !ok { @@ -88,7 +88,7 @@ func (m *SigningMethodHMAC) Verify(signingString string, sig []byte, key interfa // cryptographically random source, e.g. crypto/rand. Additional information // about this, and why we intentionally are not supporting string as a key can // be found on our usage guide https://golang-jwt.github.io/jwt/usage/signing_methods/. -func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) ([]byte, error) { +func (m *SigningMethodHMAC) Sign(signingString string, key any) ([]byte, error) { if keyBytes, ok := key.([]byte); ok { if !m.Hash.Available() { return nil, ErrHashUnavailable diff --git a/vendor/github.com/golang-jwt/jwt/v5/map_claims.go b/vendor/github.com/golang-jwt/jwt/v5/map_claims.go index b2b51a1f806..3b9205272f0 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/map_claims.go +++ b/vendor/github.com/golang-jwt/jwt/v5/map_claims.go @@ -5,9 +5,9 @@ import ( "fmt" ) -// MapClaims is a claims type that uses the map[string]interface{} for JSON +// MapClaims is a claims type that uses the map[string]any for JSON // decoding. This is the default claims type if you don't supply one -type MapClaims map[string]interface{} +type MapClaims map[string]any // GetExpirationTime implements the Claims interface. func (m MapClaims) GetExpirationTime() (*NumericDate, error) { @@ -73,7 +73,7 @@ func (m MapClaims) parseClaimsString(key string) (ClaimStrings, error) { cs = append(cs, v) case []string: cs = v - case []interface{}: + case []any: for _, a := range v { vs, ok := a.(string) if !ok { @@ -92,7 +92,7 @@ func (m MapClaims) parseClaimsString(key string) (ClaimStrings, error) { func (m MapClaims) parseString(key string) (string, error) { var ( ok bool - raw interface{} + raw any iss string ) raw, ok = m[key] diff --git a/vendor/github.com/golang-jwt/jwt/v5/none.go b/vendor/github.com/golang-jwt/jwt/v5/none.go index 685c2ea3065..624ad55e878 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/none.go +++ b/vendor/github.com/golang-jwt/jwt/v5/none.go @@ -25,7 +25,7 @@ func (m *signingMethodNone) Alg() string { } // Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key -func (m *signingMethodNone) Verify(signingString string, sig []byte, key interface{}) (err error) { +func (m *signingMethodNone) Verify(signingString string, sig []byte, key any) (err error) { // Key must be UnsafeAllowNoneSignatureType to prevent accidentally // accepting 'none' signing method if _, ok := key.(unsafeNoneMagicConstant); !ok { @@ -41,7 +41,7 @@ func (m *signingMethodNone) Verify(signingString string, sig []byte, key interfa } // Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key -func (m *signingMethodNone) Sign(signingString string, key interface{}) ([]byte, error) { +func (m *signingMethodNone) Sign(signingString string, key any) ([]byte, error) { if _, ok := key.(unsafeNoneMagicConstant); ok { return []byte{}, nil } diff --git a/vendor/github.com/golang-jwt/jwt/v5/parser_option.go b/vendor/github.com/golang-jwt/jwt/v5/parser_option.go index 88a780fbd4a..431573557b1 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/parser_option.go +++ b/vendor/github.com/golang-jwt/jwt/v5/parser_option.go @@ -66,20 +66,37 @@ func WithExpirationRequired() ParserOption { } } -// WithAudience configures the validator to require the specified audience in -// the `aud` claim. Validation will fail if the audience is not listed in the -// token or the `aud` claim is missing. +// WithAudience configures the validator to require any of the specified +// audiences in the `aud` claim. Validation will fail if the audience is not +// listed in the token or the `aud` claim is missing. // // NOTE: While the `aud` claim is OPTIONAL in a JWT, the handling of it is // application-specific. Since this validation API is helping developers in // writing secure application, we decided to REQUIRE the existence of the claim, // if an audience is expected. -func WithAudience(aud string) ParserOption { +func WithAudience(aud ...string) ParserOption { return func(p *Parser) { p.validator.expectedAud = aud } } +// WithAllAudiences configures the validator to require all the specified +// audiences in the `aud` claim. Validation will fail if the specified audiences +// are not listed in the token or the `aud` claim is missing. Duplicates within +// the list are de-duplicated since internally, we use a map to look up the +// audiences. +// +// NOTE: While the `aud` claim is OPTIONAL in a JWT, the handling of it is +// application-specific. Since this validation API is helping developers in +// writing secure application, we decided to REQUIRE the existence of the claim, +// if an audience is expected. +func WithAllAudiences(aud ...string) ParserOption { + return func(p *Parser) { + p.validator.expectedAud = aud + p.validator.expectAllAud = true + } +} + // WithIssuer configures the validator to require the specified issuer in the // `iss` claim. Validation will fail if a different issuer is specified in the // token or the `iss` claim is missing. diff --git a/vendor/github.com/golang-jwt/jwt/v5/rsa.go b/vendor/github.com/golang-jwt/jwt/v5/rsa.go index 83cbee6ae2b..98b960a783b 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/rsa.go +++ b/vendor/github.com/golang-jwt/jwt/v5/rsa.go @@ -46,7 +46,7 @@ func (m *SigningMethodRSA) Alg() string { // Verify implements token verification for the SigningMethod // For this signing method, must be an *rsa.PublicKey structure. -func (m *SigningMethodRSA) Verify(signingString string, sig []byte, key interface{}) error { +func (m *SigningMethodRSA) Verify(signingString string, sig []byte, key any) error { var rsaKey *rsa.PublicKey var ok bool @@ -67,7 +67,7 @@ func (m *SigningMethodRSA) Verify(signingString string, sig []byte, key interfac // Sign implements token signing for the SigningMethod // For this signing method, must be an *rsa.PrivateKey structure. -func (m *SigningMethodRSA) Sign(signingString string, key interface{}) ([]byte, error) { +func (m *SigningMethodRSA) Sign(signingString string, key any) ([]byte, error) { var rsaKey *rsa.PrivateKey var ok bool diff --git a/vendor/github.com/golang-jwt/jwt/v5/rsa_pss.go b/vendor/github.com/golang-jwt/jwt/v5/rsa_pss.go index 28c386ec43a..f17590cc4a1 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/rsa_pss.go +++ b/vendor/github.com/golang-jwt/jwt/v5/rsa_pss.go @@ -1,6 +1,3 @@ -//go:build go1.4 -// +build go1.4 - package jwt import ( @@ -82,7 +79,7 @@ func init() { // Verify implements token verification for the SigningMethod. // For this verify method, key must be an rsa.PublicKey struct -func (m *SigningMethodRSAPSS) Verify(signingString string, sig []byte, key interface{}) error { +func (m *SigningMethodRSAPSS) Verify(signingString string, sig []byte, key any) error { var rsaKey *rsa.PublicKey switch k := key.(type) { case *rsa.PublicKey: @@ -108,7 +105,7 @@ func (m *SigningMethodRSAPSS) Verify(signingString string, sig []byte, key inter // Sign implements token signing for the SigningMethod. // For this signing method, key must be an rsa.PrivateKey struct -func (m *SigningMethodRSAPSS) Sign(signingString string, key interface{}) ([]byte, error) { +func (m *SigningMethodRSAPSS) Sign(signingString string, key any) ([]byte, error) { var rsaKey *rsa.PrivateKey switch k := key.(type) { diff --git a/vendor/github.com/golang-jwt/jwt/v5/rsa_utils.go b/vendor/github.com/golang-jwt/jwt/v5/rsa_utils.go index b3aeebbe110..f22c3d0685f 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/rsa_utils.go +++ b/vendor/github.com/golang-jwt/jwt/v5/rsa_utils.go @@ -23,7 +23,7 @@ func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) { return nil, ErrKeyMustBePEMEncoded } - var parsedKey interface{} + var parsedKey any if parsedKey, err = x509.ParsePKCS1PrivateKey(block.Bytes); err != nil { if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { return nil, err @@ -53,7 +53,7 @@ func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.Pr return nil, ErrKeyMustBePEMEncoded } - var parsedKey interface{} + var parsedKey any var blockDecrypted []byte if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil { @@ -86,7 +86,7 @@ func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) { } // Parse the key - var parsedKey interface{} + var parsedKey any if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { if cert, err := x509.ParseCertificate(block.Bytes); err == nil { parsedKey = cert.PublicKey diff --git a/vendor/github.com/golang-jwt/jwt/v5/signing_method.go b/vendor/github.com/golang-jwt/jwt/v5/signing_method.go index 0d73631c1bf..096d0ed4ca6 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/signing_method.go +++ b/vendor/github.com/golang-jwt/jwt/v5/signing_method.go @@ -12,9 +12,9 @@ var signingMethodLock = new(sync.RWMutex) // signature in Sign. The signature is then usually base64 encoded as part of a // JWT. type SigningMethod interface { - Verify(signingString string, sig []byte, key interface{}) error // Returns nil if signature is valid - Sign(signingString string, key interface{}) ([]byte, error) // Returns signature or error - Alg() string // returns the alg identifier for this method (example: 'HS256') + Verify(signingString string, sig []byte, key any) error // Returns nil if signature is valid + Sign(signingString string, key any) ([]byte, error) // Returns signature or error + Alg() string // returns the alg identifier for this method (example: 'HS256') } // RegisterSigningMethod registers the "alg" name and a factory function for signing method. diff --git a/vendor/github.com/golang-jwt/jwt/v5/token.go b/vendor/github.com/golang-jwt/jwt/v5/token.go index 9c7f4ab010c..3f71558888a 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/token.go +++ b/vendor/github.com/golang-jwt/jwt/v5/token.go @@ -11,9 +11,9 @@ import ( // Token. This allows you to use properties in the Header of the token (such as // `kid`) to identify which key to use. // -// The returned interface{} may be a single key or a VerificationKeySet containing +// The returned any may be a single key or a VerificationKeySet containing // multiple keys. -type Keyfunc func(*Token) (interface{}, error) +type Keyfunc func(*Token) (any, error) // VerificationKey represents a public or secret key for verifying a token's signature. type VerificationKey interface { @@ -28,12 +28,12 @@ type VerificationKeySet struct { // Token represents a JWT Token. Different fields will be used depending on // whether you're creating or parsing/verifying a token. type Token struct { - Raw string // Raw contains the raw token. Populated when you [Parse] a token - Method SigningMethod // Method is the signing method used or to be used - Header map[string]interface{} // Header is the first segment of the token in decoded form - Claims Claims // Claims is the second segment of the token in decoded form - Signature []byte // Signature is the third segment of the token in decoded form. Populated when you Parse a token - Valid bool // Valid specifies if the token is valid. Populated when you Parse/Verify a token + Raw string // Raw contains the raw token. Populated when you [Parse] a token + Method SigningMethod // Method is the signing method used or to be used + Header map[string]any // Header is the first segment of the token in decoded form + Claims Claims // Claims is the second segment of the token in decoded form + Signature []byte // Signature is the third segment of the token in decoded form. Populated when you Parse a token + Valid bool // Valid specifies if the token is valid. Populated when you Parse/Verify a token } // New creates a new [Token] with the specified signing method and an empty map @@ -46,7 +46,7 @@ func New(method SigningMethod, opts ...TokenOption) *Token { // claims. Additional options can be specified, but are currently unused. func NewWithClaims(method SigningMethod, claims Claims, opts ...TokenOption) *Token { return &Token{ - Header: map[string]interface{}{ + Header: map[string]any{ "typ": "JWT", "alg": method.Alg(), }, @@ -60,7 +60,7 @@ func NewWithClaims(method SigningMethod, claims Claims, opts ...TokenOption) *To // https://golang-jwt.github.io/jwt/usage/signing_methods/#signing-methods-and-key-types // for an overview of the different signing methods and their respective key // types. -func (t *Token) SignedString(key interface{}) (string, error) { +func (t *Token) SignedString(key any) (string, error) { sstr, err := t.SigningString() if err != nil { return "", err diff --git a/vendor/github.com/golang-jwt/jwt/v5/types.go b/vendor/github.com/golang-jwt/jwt/v5/types.go index b2655a9e6d2..a3e0ef12122 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/types.go +++ b/vendor/github.com/golang-jwt/jwt/v5/types.go @@ -103,7 +103,7 @@ func (date *NumericDate) UnmarshalJSON(b []byte) (err error) { type ClaimStrings []string func (s *ClaimStrings) UnmarshalJSON(data []byte) (err error) { - var value interface{} + var value any if err = json.Unmarshal(data, &value); err != nil { return err @@ -116,7 +116,7 @@ func (s *ClaimStrings) UnmarshalJSON(data []byte) (err error) { aud = append(aud, v) case []string: aud = ClaimStrings(v) - case []interface{}: + case []any: for _, vv := range v { vs, ok := vv.(string) if !ok { diff --git a/vendor/github.com/golang-jwt/jwt/v5/validator.go b/vendor/github.com/golang-jwt/jwt/v5/validator.go index 008ecd8712e..92b5c057cd2 100644 --- a/vendor/github.com/golang-jwt/jwt/v5/validator.go +++ b/vendor/github.com/golang-jwt/jwt/v5/validator.go @@ -1,8 +1,8 @@ package jwt import ( - "crypto/subtle" "fmt" + "slices" "time" ) @@ -52,8 +52,12 @@ type Validator struct { verifyIat bool // expectedAud contains the audience this token expects. Supplying an empty - // string will disable aud checking. - expectedAud string + // slice will disable aud checking. + expectedAud []string + + // expectAllAud specifies whether all expected audiences must be present in + // the token. If false, only one of the expected audiences must be present. + expectAllAud bool // expectedIss contains the issuer this token expects. Supplying an empty // string will disable iss checking. @@ -88,7 +92,7 @@ func NewValidator(opts ...ParserOption) *Validator { func (v *Validator) Validate(claims Claims) error { var ( now time.Time - errs []error = make([]error, 0, 6) + errs = make([]error, 0, 6) err error ) @@ -120,8 +124,8 @@ func (v *Validator) Validate(claims Claims) error { } // If we have an expected audience, we also require the audience claim - if v.expectedAud != "" { - if err = v.verifyAudience(claims, v.expectedAud, true); err != nil { + if len(v.expectedAud) > 0 { + if err = v.verifyAudience(claims, v.expectedAud, v.expectAllAud); err != nil { errs = append(errs, err) } } @@ -226,33 +230,39 @@ func (v *Validator) verifyNotBefore(claims Claims, cmp time.Time, required bool) // // Additionally, if any error occurs while retrieving the claim, e.g., when its // the wrong type, an ErrTokenUnverifiable error will be returned. -func (v *Validator) verifyAudience(claims Claims, cmp string, required bool) error { +func (v *Validator) verifyAudience(claims Claims, cmp []string, expectAllAud bool) error { aud, err := claims.GetAudience() if err != nil { return err } - if len(aud) == 0 { + // Check that aud exists and is not empty. We only require the aud claim + // if we expect at least one audience to be present. + if len(aud) == 0 || len(aud) == 1 && aud[0] == "" { + required := len(v.expectedAud) > 0 return errorIfRequired(required, "aud") } - // use a var here to keep constant time compare when looping over a number of claims - result := false - - var stringClaims string - for _, a := range aud { - if subtle.ConstantTimeCompare([]byte(a), []byte(cmp)) != 0 { - result = true + if !expectAllAud { + for _, a := range aud { + // If we only expect one match, we can stop early if we find a match + if slices.Contains(cmp, a) { + return nil + } } - stringClaims = stringClaims + a + + return ErrTokenInvalidAudience } - // case where "" is sent in one or many aud claims - if stringClaims == "" { - return errorIfRequired(required, "aud") + // Note that we are looping cmp here to ensure that all expected audiences + // are present in the aud claim. + for _, a := range cmp { + if !slices.Contains(aud, a) { + return ErrTokenInvalidAudience + } } - return errorIfFalse(result, ErrTokenInvalidAudience) + return nil } // verifyIssuer compares the iss claim in claims against cmp. diff --git a/vendor/github.com/golang-migrate/migrate/v4/.golangci.yml b/vendor/github.com/golang-migrate/migrate/v4/.golangci.yml index 55401a171e9..68a8e953ba0 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/.golangci.yml +++ b/vendor/github.com/golang-migrate/migrate/v4/.golangci.yml @@ -13,10 +13,14 @@ linters: - unparam - nakedret - prealloc + - revive #- gosec linters-settings: misspell: locale: US + revive: + rules: + - name: redundant-build-tag issues: max-same-issues: 0 max-issues-per-linter: 0 diff --git a/vendor/github.com/golang-migrate/migrate/v4/Dockerfile b/vendor/github.com/golang-migrate/migrate/v4/Dockerfile index 6246a122aa6..eef2a47824c 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/Dockerfile +++ b/vendor/github.com/golang-migrate/migrate/v4/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23-alpine3.20 AS builder +FROM golang:1.25-alpine3.21 AS builder ARG VERSION RUN apk add --no-cache git gcc musl-dev make @@ -15,7 +15,7 @@ COPY . ./ RUN make build-docker -FROM alpine:3.20 +FROM alpine:3.21 RUN apk add --no-cache ca-certificates diff --git a/vendor/github.com/golang-migrate/migrate/v4/FAQ.md b/vendor/github.com/golang-migrate/migrate/v4/FAQ.md index b4261ee8e9f..88f31300ae8 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/FAQ.md +++ b/vendor/github.com/golang-migrate/migrate/v4/FAQ.md @@ -65,7 +65,7 @@ and then "force" the expected version. #### What happens if two programs try and update the database at the same time? -Database-specific locking features are used by *some* database drivers to prevent multiple instances of migrate from running migrations at the same time + Database-specific locking features are used by *some* database drivers to prevent multiple instances of migrate from running migrations on the same database at the same time. For example, the MySQL driver uses the `GET_LOCK` function, while the Postgres driver uses the `pg_advisory_lock` function. diff --git a/vendor/github.com/golang-migrate/migrate/v4/README.md b/vendor/github.com/golang-migrate/migrate/v4/README.md index a79cc7b76e3..9b5b4b69efa 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/README.md +++ b/vendor/github.com/golang-migrate/migrate/v4/README.md @@ -3,7 +3,7 @@ [![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master) [![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs) [![Docker Pulls](https://img.shields.io/docker/pulls/migrate/migrate.svg)](https://hub.docker.com/r/migrate/migrate/) -![Supported Go Versions](https://img.shields.io/badge/Go-1.22%2C%201.23-lightgrey.svg) +![Supported Go Versions](https://img.shields.io/badge/Go-1.24%2C%201.25-lightgrey.svg) [![GitHub Release](https://img.shields.io/github/release/golang-migrate/migrate.svg)](https://github.com/golang-migrate/migrate/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/golang-migrate/migrate/v4)](https://goreportcard.com/report/github.com/golang-migrate/migrate/v4) @@ -87,7 +87,7 @@ Source drivers read migrations from local or remote sources. [Add a new source?] * Handles ctrl+c (SIGINT) gracefully. * No config search paths, no config files, no magic ENV var injections. -__[CLI Documentation](cmd/migrate)__ +[CLI Documentation](cmd/migrate) (includes CLI install instructions) ### Basic usage diff --git a/vendor/github.com/golang-migrate/migrate/v4/database/postgres/postgres.go b/vendor/github.com/golang-migrate/migrate/v4/database/postgres/postgres.go index 9e6d6277fc1..7a0f546dde9 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/database/postgres/postgres.go +++ b/vendor/github.com/golang-migrate/migrate/v4/database/postgres/postgres.go @@ -1,25 +1,23 @@ //go:build go1.9 -// +build go1.9 package postgres import ( "context" "database/sql" + "errors" "fmt" "io" nurl "net/url" "regexp" "strconv" "strings" + "sync/atomic" "time" - "go.uber.org/atomic" - "github.com/golang-migrate/migrate/v4" "github.com/golang-migrate/migrate/v4/database" "github.com/golang-migrate/migrate/v4/database/multistmt" - "github.com/hashicorp/go-multierror" "github.com/lib/pq" ) @@ -363,7 +361,7 @@ func (p *Postgres) SetVersion(version int, dirty bool) error { query := `TRUNCATE ` + pq.QuoteIdentifier(p.config.migrationsSchemaName) + `.` + pq.QuoteIdentifier(p.config.migrationsTableName) if _, err := tx.Exec(query); err != nil { if errRollback := tx.Rollback(); errRollback != nil { - err = multierror.Append(err, errRollback) + err = errors.Join(err, errRollback) } return &database.Error{OrigErr: err, Query: []byte(query)} } @@ -375,7 +373,7 @@ func (p *Postgres) SetVersion(version int, dirty bool) error { query = `INSERT INTO ` + pq.QuoteIdentifier(p.config.migrationsSchemaName) + `.` + pq.QuoteIdentifier(p.config.migrationsTableName) + ` (version, dirty) VALUES ($1, $2)` if _, err := tx.Exec(query, version, dirty); err != nil { if errRollback := tx.Rollback(); errRollback != nil { - err = multierror.Append(err, errRollback) + err = errors.Join(err, errRollback) } return &database.Error{OrigErr: err, Query: []byte(query)} } @@ -417,7 +415,7 @@ func (p *Postgres) Drop() (err error) { } defer func() { if errClose := tables.Close(); errClose != nil { - err = multierror.Append(err, errClose) + err = errors.Join(err, errClose) } }() @@ -459,11 +457,7 @@ func (p *Postgres) ensureVersionTable() (err error) { defer func() { if e := p.Unlock(); e != nil { - if err == nil { - err = e - } else { - err = multierror.Append(err, e) - } + err = errors.Join(err, e) } }() diff --git a/vendor/github.com/golang-migrate/migrate/v4/database/util.go b/vendor/github.com/golang-migrate/migrate/v4/database/util.go index de66d5b8021..c60fafb7cb7 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/database/util.go +++ b/vendor/github.com/golang-migrate/migrate/v4/database/util.go @@ -2,9 +2,9 @@ package database import ( "fmt" - "go.uber.org/atomic" "hash/crc32" "strings" + "sync/atomic" ) const advisoryLockIDSalt uint = 1486364155 @@ -21,7 +21,7 @@ func GenerateAdvisoryLockId(databaseName string, additionalNames ...string) (str // CasRestoreOnErr CAS wrapper to automatically restore the lock state on error func CasRestoreOnErr(lock *atomic.Bool, o, n bool, casErr error, f func() error) error { - if !lock.CAS(o, n) { + if !lock.CompareAndSwap(o, n) { return casErr } if err := f(); err != nil { diff --git a/vendor/github.com/golang-migrate/migrate/v4/migrate.go b/vendor/github.com/golang-migrate/migrate/v4/migrate.go index 7763782a0cb..7cac0ba1b74 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/migrate.go +++ b/vendor/github.com/golang-migrate/migrate/v4/migrate.go @@ -11,8 +11,6 @@ import ( "sync" "time" - "github.com/hashicorp/go-multierror" - "github.com/golang-migrate/migrate/v4/database" iurl "github.com/golang-migrate/migrate/v4/internal/url" "github.com/golang-migrate/migrate/v4/source" @@ -56,10 +54,10 @@ func (e ErrDirty) Error() string { } type Migrate struct { - sourceName string - sourceDrv source.Driver - databaseName string - databaseDrv database.Driver + sourceName string + sourceDrv source.Driver + databaseDriverName string + databaseDrv database.Driver // Log accepts a Logger interface Log Logger @@ -93,11 +91,11 @@ func New(sourceURL, databaseURL string) (*Migrate, error) { } m.sourceName = sourceName - databaseName, err := iurl.SchemeFromURL(databaseURL) + databaseDriverName, err := iurl.SchemeFromURL(databaseURL) if err != nil { return nil, fmt.Errorf("failed to parse scheme from database URL: %w", err) } - m.databaseName = databaseName + m.databaseDriverName = databaseDriverName sourceDrv, err := source.Open(sourceURL) if err != nil { @@ -107,7 +105,7 @@ func New(sourceURL, databaseURL string) (*Migrate, error) { databaseDrv, err := database.Open(databaseURL) if err != nil { - return nil, fmt.Errorf("failed to open database, %q: %w", databaseURL, err) + return nil, fmt.Errorf("failed to open database: %w", err) } m.databaseDrv = databaseDrv @@ -116,9 +114,9 @@ func New(sourceURL, databaseURL string) (*Migrate, error) { // NewWithDatabaseInstance returns a new Migrate instance from a source URL // and an existing database instance. The source URL scheme is defined by each driver. -// Use any string that can serve as an identifier during logging as databaseName. +// Use any string that can serve as an identifier during logging as databaseDriverName. // You are responsible for closing the underlying database client if necessary. -func NewWithDatabaseInstance(sourceURL string, databaseName string, databaseInstance database.Driver) (*Migrate, error) { +func NewWithDatabaseInstance(sourceURL string, databaseDriverName string, databaseInstance database.Driver) (*Migrate, error) { m := newCommon() sourceName, err := iurl.SchemeFromURL(sourceURL) @@ -127,7 +125,7 @@ func NewWithDatabaseInstance(sourceURL string, databaseName string, databaseInst } m.sourceName = sourceName - m.databaseName = databaseName + m.databaseDriverName = databaseDriverName sourceDrv, err := source.Open(sourceURL) if err != nil { @@ -147,17 +145,17 @@ func NewWithDatabaseInstance(sourceURL string, databaseName string, databaseInst func NewWithSourceInstance(sourceName string, sourceInstance source.Driver, databaseURL string) (*Migrate, error) { m := newCommon() - databaseName, err := iurl.SchemeFromURL(databaseURL) + databaseDriverName, err := iurl.SchemeFromURL(databaseURL) if err != nil { return nil, fmt.Errorf("failed to parse scheme from database URL: %w", err) } - m.databaseName = databaseName + m.databaseDriverName = databaseDriverName m.sourceName = sourceName databaseDrv, err := database.Open(databaseURL) if err != nil { - return nil, fmt.Errorf("failed to open database, %q: %w", databaseURL, err) + return nil, fmt.Errorf("failed to open database: %w", err) } m.databaseDrv = databaseDrv @@ -168,13 +166,13 @@ func NewWithSourceInstance(sourceName string, sourceInstance source.Driver, data // NewWithInstance returns a new Migrate instance from an existing source and // database instance. Use any string that can serve as an identifier during logging -// as sourceName and databaseName. You are responsible for closing down +// as sourceName and databaseDriverName. You are responsible for closing down // the underlying source and database client if necessary. -func NewWithInstance(sourceName string, sourceInstance source.Driver, databaseName string, databaseInstance database.Driver) (*Migrate, error) { +func NewWithInstance(sourceName string, sourceInstance source.Driver, databaseDriverName string, databaseInstance database.Driver) (*Migrate, error) { m := newCommon() m.sourceName = sourceName - m.databaseName = databaseName + m.databaseDriverName = databaseDriverName m.sourceDrv = sourceInstance m.databaseDrv = databaseInstance @@ -526,7 +524,7 @@ func (m *Migrate) read(from int, to int, ret chan<- interface{}) { } } -// readUp reads up migrations from `from` limitted by `limit`. +// readUp reads up migrations from `from` limited by `limit`. // limit can be -1, implying no limit and reading until there are no more migrations. // Each migration is then written to the ret channel. // If an error occurs during reading, that error is written to the ret channel, too. @@ -626,7 +624,7 @@ func (m *Migrate) readUp(from int, limit int, ret chan<- interface{}) { } } -// readDown reads down migrations from `from` limitted by `limit`. +// readDown reads down migrations from `from` limited by `limit`. // limit can be -1, implying no limit and reading until there are no more migrations. // Each migration is then written to the ret channel. // If an error occurs during reading, that error is written to the ret channel, too. @@ -781,7 +779,7 @@ func (m *Migrate) versionExists(version uint) (result error) { if err == nil { defer func() { if errClose := up.Close(); errClose != nil { - result = multierror.Append(result, errClose) + result = errors.Join(result, errClose) } }() } @@ -796,7 +794,7 @@ func (m *Migrate) versionExists(version uint) (result error) { if err == nil { defer func() { if errClose := down.Close(); errClose != nil { - result = multierror.Append(result, errClose) + result = errors.Join(result, errClose) } }() } @@ -954,7 +952,7 @@ func (m *Migrate) unlock() error { // if a prevErr is not nil. func (m *Migrate) unlockErr(prevErr error) error { if err := m.unlock(); err != nil { - return multierror.Append(prevErr, err) + prevErr = errors.Join(prevErr, err) } return prevErr } diff --git a/vendor/github.com/golang-migrate/migrate/v4/migration.go b/vendor/github.com/golang-migrate/migrate/v4/migration.go index 704fef49ee2..0e733c639dc 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/migration.go +++ b/vendor/github.com/golang-migrate/migrate/v4/migration.go @@ -2,6 +2,7 @@ package migrate import ( "bufio" + "errors" "fmt" "io" "time" @@ -118,7 +119,7 @@ func (m *Migration) LogString() string { // Buffer buffers Body up to BufferSize. // Calling this function blocks. Call with goroutine. -func (m *Migration) Buffer() error { +func (m *Migration) Buffer() (berr error) { if m.Body == nil { return nil } @@ -127,6 +128,21 @@ func (m *Migration) Buffer() error { b := bufio.NewReaderSize(m.Body, int(m.BufferSize)) + // defer closing buffer writer and body. + defer func() { + // close bufferWriter so Buffer knows that there is no + // more data coming. + if err := m.bufferWriter.Close(); err != nil { + berr = errors.Join(berr, err) + } + + // it's safe to close the Body too. + if err := m.Body.Close(); err != nil { + berr = errors.Join(berr, err) + } + + }() + // start reading from body, peek won't move the read pointer though // poor man's solution? if _, err := b.Peek(int(m.BufferSize)); err != nil && err != io.EOF { @@ -145,16 +161,5 @@ func (m *Migration) Buffer() error { m.FinishedReading = time.Now() m.BytesRead = n - // close bufferWriter so Buffer knows that there is no - // more data coming - if err := m.bufferWriter.Close(); err != nil { - return err - } - - // it's safe to close the Body too - if err := m.Body.Close(); err != nil { - return err - } - return nil } diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/iofs.go b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/iofs.go index dc934a5fe25..a9dc7c4b192 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/iofs.go +++ b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/iofs.go @@ -1,5 +1,4 @@ //go:build go1.16 -// +build go1.16 package iofs diff --git a/vendor/github.com/golang-migrate/migrate/v4/util.go b/vendor/github.com/golang-migrate/migrate/v4/util.go index 663d68f1697..c8b6ab70edb 100644 --- a/vendor/github.com/golang-migrate/migrate/v4/util.go +++ b/vendor/github.com/golang-migrate/migrate/v4/util.go @@ -8,14 +8,16 @@ import ( // MultiError holds multiple errors. // -// Deprecated: Use github.com/hashicorp/go-multierror instead +// Deprecated: Use stdlib's [errors.Join] et al. instead +// This will be removed in the v5 release. type MultiError struct { Errs []error } // NewMultiError returns an error type holding multiple errors. // -// Deprecated: Use github.com/hashicorp/go-multierror instead +// Deprecated: Use stdlib's [errors.Join] et al. instead +// This will be removed in the v5 release. func NewMultiError(errs ...error) MultiError { compactErrs := make([]error, 0) for _, e := range errs { diff --git a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json index 846e3ece818..2fcff6e2731 100644 --- a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json +++ b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json @@ -1,3 +1,3 @@ { - "v2": "2.14.2" + "v2": "2.15.0" } diff --git a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md index a7fe145a433..fec6b1da9ed 100644 --- a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md +++ b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md @@ -1,5 +1,12 @@ # Changelog +## [2.15.0](https://github.com/googleapis/gax-go/compare/v2.14.2...v2.15.0) (2025-07-09) + + +### Features + +* **apierror:** improve gRPC status code mapping for HTTP errors ([#431](https://github.com/googleapis/gax-go/issues/431)) ([c207f2a](https://github.com/googleapis/gax-go/commit/c207f2a19ab91d3baee458b57d4aa992519025c7)) + ## [2.14.2](https://github.com/googleapis/gax-go/compare/v2.14.1...v2.14.2) (2025-05-12) diff --git a/vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go b/vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go index 7de60773d63..90a40d29c15 100644 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go +++ b/vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go @@ -38,6 +38,7 @@ package apierror import ( "errors" "fmt" + "net/http" "strings" jsonerror "github.com/googleapis/gax-go/v2/apierror/internal/proto" @@ -49,6 +50,39 @@ import ( "google.golang.org/protobuf/proto" ) +// canonicalMap maps HTTP codes to gRPC status code equivalents. +var canonicalMap = map[int]codes.Code{ + http.StatusOK: codes.OK, + http.StatusBadRequest: codes.InvalidArgument, + http.StatusForbidden: codes.PermissionDenied, + http.StatusNotFound: codes.NotFound, + http.StatusConflict: codes.Aborted, + http.StatusRequestedRangeNotSatisfiable: codes.OutOfRange, + http.StatusTooManyRequests: codes.ResourceExhausted, + http.StatusGatewayTimeout: codes.DeadlineExceeded, + http.StatusNotImplemented: codes.Unimplemented, + http.StatusServiceUnavailable: codes.Unavailable, + http.StatusUnauthorized: codes.Unauthenticated, +} + +// toCode maps an http code to the most correct equivalent. +func toCode(httpCode int) codes.Code { + if sCode, ok := canonicalMap[httpCode]; ok { + return sCode + } + switch { + case httpCode >= 200 && httpCode < 300: + return codes.OK + + case httpCode >= 400 && httpCode < 500: + return codes.FailedPrecondition + + case httpCode >= 500 && httpCode < 600: + return codes.Internal + } + return codes.Unknown +} + // ErrDetails holds the google/rpc/error_details.proto messages. type ErrDetails struct { ErrorInfo *errdetails.ErrorInfo @@ -217,6 +251,11 @@ func (a *APIError) Error() string { // GRPCStatus extracts the underlying gRPC Status error. // This method is necessary to fulfill the interface // described in https://pkg.go.dev/google.golang.org/grpc/status#FromError. +// +// For errors that originated as an HTTP-based googleapi.Error, GRPCStatus() +// returns a status that attempts to map from the original HTTP code to an +// equivalent gRPC status code. For use cases where you want to avoid this +// behavior, error unwrapping can be used. func (a *APIError) GRPCStatus() *status.Status { return a.status } @@ -243,9 +282,9 @@ func (a *APIError) Metadata() map[string]string { // setDetailsFromError parses a Status error or a googleapi.Error // and sets status and details or httpErr and details, respectively. // It returns false if neither Status nor googleapi.Error can be parsed. -// When err is a googleapi.Error, the status of the returned error will -// be set to an Unknown error, rather than nil, since a nil code is -// interpreted as OK in the gRPC status package. +// +// When err is a googleapi.Error, the status of the returned error will be +// mapped to the closest equivalent gGRPC status code. func (a *APIError) setDetailsFromError(err error) bool { st, isStatus := status.FromError(err) var herr *googleapi.Error @@ -258,7 +297,7 @@ func (a *APIError) setDetailsFromError(err error) bool { case isHTTPErr: a.httpErr = herr a.details = parseHTTPDetails(herr) - a.status = status.New(codes.Unknown, herr.Message) + a.status = status.New(toCode(a.httpErr.Code), herr.Message) default: return false } diff --git a/vendor/github.com/googleapis/gax-go/v2/internal/version.go b/vendor/github.com/googleapis/gax-go/v2/internal/version.go index e272d4d720c..0ab1bce59cc 100644 --- a/vendor/github.com/googleapis/gax-go/v2/internal/version.go +++ b/vendor/github.com/googleapis/gax-go/v2/internal/version.go @@ -30,4 +30,4 @@ package internal // Version is the current tagged release of the library. -const Version = "2.14.2" +const Version = "2.15.0" diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel new file mode 100644 index 00000000000..d71991e6e8d --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel @@ -0,0 +1,44 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") + +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "options_proto_files", + srcs = [ + "annotations.proto", + "openapiv2.proto", + ], +) + +go_library( + name = "options", + embed = [":options_go_proto"], + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", +) + +proto_library( + name = "options_proto", + srcs = [ + "annotations.proto", + "openapiv2.proto", + ], + deps = [ + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +go_proto_library( + name = "options_go_proto", + compilers = ["//:go_apiv2"], + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", + proto = ":options_proto", +) + +alias( + name = "go_default_library", + actual = ":options", + visibility = ["//visibility:public"], +) diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations.pb.go new file mode 100644 index 00000000000..738c9754a61 --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations.pb.go @@ -0,0 +1,269 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/annotations.proto + +//go:build !protoopaque + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +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) +) + +var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*Swagger)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", + Tag: "bytes,1042,opt,name=openapiv2_swagger", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*Operation)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", + Tag: "bytes,1042,opt,name=openapiv2_operation", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*Schema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", + Tag: "bytes,1042,opt,name=openapiv2_schema", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*EnumSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum", + Tag: "bytes,1042,opt,name=openapiv2_enum", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*Tag)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", + Tag: "bytes,1042,opt,name=openapiv2_tag", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*JSONSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", + Tag: "bytes,1042,opt,name=openapiv2_field", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; + E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; + E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; + E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] +) + +// Extension fields to descriptorpb.EnumOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.EnumSchema openapiv2_enum = 1042; + E_Openapiv2Enum = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; + E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; + E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[5] +) + +var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 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, 0x1a, 0x2c, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x7b, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x45, 0x6e, 0x75, + 0x6d, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x74, + 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, + 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []any{ + (*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions + (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions + (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions + (*descriptorpb.EnumOptions)(nil), // 3: google.protobuf.EnumOptions + (*descriptorpb.ServiceOptions)(nil), // 4: google.protobuf.ServiceOptions + (*descriptorpb.FieldOptions)(nil), // 5: google.protobuf.FieldOptions + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Schema)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*EnumSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + (*Tag)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*JSONSchema)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema +} +var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ + 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions + 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions + 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions + 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum:extendee -> google.protobuf.EnumOptions + 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions + 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions + 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger + 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation + 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum:type_name -> grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + 10, // 10: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 11, // 11: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 6, // [6:12] is the sub-list for extension type_name + 0, // [0:6] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } +func file_protoc_gen_openapiv2_options_annotations_proto_init() { + if File_protoc_gen_openapiv2_options_annotations_proto != nil { + return + } + file_protoc_gen_openapiv2_options_openapiv2_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 6, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, + ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, + }.Build() + File_protoc_gen_openapiv2_options_annotations_proto = out.File + file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil + file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil +} diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations.proto b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations.proto new file mode 100644 index 00000000000..aecc5e709c3 --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/openapiv2.proto"; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +extend google.protobuf.FileOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Swagger openapiv2_swagger = 1042; +} +extend google.protobuf.MethodOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Operation openapiv2_operation = 1042; +} +extend google.protobuf.MessageOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Schema openapiv2_schema = 1042; +} +extend google.protobuf.EnumOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + EnumSchema openapiv2_enum = 1042; +} +extend google.protobuf.ServiceOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Tag openapiv2_tag = 1042; +} +extend google.protobuf.FieldOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + JSONSchema openapiv2_field = 1042; +} diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations_protoopaque.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations_protoopaque.pb.go new file mode 100644 index 00000000000..b570167836d --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/annotations_protoopaque.pb.go @@ -0,0 +1,269 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/annotations.proto + +//go:build protoopaque + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +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) +) + +var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*Swagger)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", + Tag: "bytes,1042,opt,name=openapiv2_swagger", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*Operation)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", + Tag: "bytes,1042,opt,name=openapiv2_operation", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*Schema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", + Tag: "bytes,1042,opt,name=openapiv2_schema", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*EnumSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum", + Tag: "bytes,1042,opt,name=openapiv2_enum", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*Tag)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", + Tag: "bytes,1042,opt,name=openapiv2_tag", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*JSONSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", + Tag: "bytes,1042,opt,name=openapiv2_field", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; + E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; + E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; + E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] +) + +// Extension fields to descriptorpb.EnumOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.EnumSchema openapiv2_enum = 1042; + E_Openapiv2Enum = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; + E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; + E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[5] +) + +var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 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, 0x1a, 0x2c, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x7b, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x45, 0x6e, 0x75, + 0x6d, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x74, + 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, + 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []any{ + (*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions + (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions + (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions + (*descriptorpb.EnumOptions)(nil), // 3: google.protobuf.EnumOptions + (*descriptorpb.ServiceOptions)(nil), // 4: google.protobuf.ServiceOptions + (*descriptorpb.FieldOptions)(nil), // 5: google.protobuf.FieldOptions + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Schema)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*EnumSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + (*Tag)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*JSONSchema)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema +} +var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ + 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions + 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions + 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions + 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum:extendee -> google.protobuf.EnumOptions + 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions + 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions + 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger + 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation + 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum:type_name -> grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + 10, // 10: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 11, // 11: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 6, // [6:12] is the sub-list for extension type_name + 0, // [0:6] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } +func file_protoc_gen_openapiv2_options_annotations_proto_init() { + if File_protoc_gen_openapiv2_options_annotations_proto != nil { + return + } + file_protoc_gen_openapiv2_options_openapiv2_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 6, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, + ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, + }.Build() + File_protoc_gen_openapiv2_options_annotations_proto = out.File + file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil + file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil +} diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/buf.gen.yaml b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/buf.gen.yaml new file mode 100644 index 00000000000..07dfb958f1e --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/buf.gen.yaml @@ -0,0 +1,7 @@ +version: v2 +plugins: + - remote: buf.build/protocolbuffers/go:v1.36.0 + out: . + opt: + - paths=source_relative + - default_api_level=API_HYBRID diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.pb.go new file mode 100644 index 00000000000..3a34e664e0a --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.pb.go @@ -0,0 +1,4263 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/openapiv2.proto + +//go:build !protoopaque + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" +) + +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) +) + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +type Scheme int32 + +const ( + Scheme_UNKNOWN Scheme = 0 + Scheme_HTTP Scheme = 1 + Scheme_HTTPS Scheme = 2 + Scheme_WS Scheme = 3 + Scheme_WSS Scheme = 4 +) + +// Enum value maps for Scheme. +var ( + Scheme_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP", + 2: "HTTPS", + 3: "WS", + 4: "WSS", + } + Scheme_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP": 1, + "HTTPS": 2, + "WS": 3, + "WSS": 4, + } +) + +func (x Scheme) Enum() *Scheme { + p := new(Scheme) + *p = x + return p +} + +func (x Scheme) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scheme) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() +} + +func (Scheme) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] +} + +func (x Scheme) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// `Type` is a supported HTTP header type. +// See https://swagger.io/specification/v2/#parameterType. +type HeaderParameter_Type int32 + +const ( + HeaderParameter_UNKNOWN HeaderParameter_Type = 0 + HeaderParameter_STRING HeaderParameter_Type = 1 + HeaderParameter_NUMBER HeaderParameter_Type = 2 + HeaderParameter_INTEGER HeaderParameter_Type = 3 + HeaderParameter_BOOLEAN HeaderParameter_Type = 4 +) + +// Enum value maps for HeaderParameter_Type. +var ( + HeaderParameter_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "STRING", + 2: "NUMBER", + 3: "INTEGER", + 4: "BOOLEAN", + } + HeaderParameter_Type_value = map[string]int32{ + "UNKNOWN": 0, + "STRING": 1, + "NUMBER": 2, + "INTEGER": 3, + "BOOLEAN": 4, + } +) + +func (x HeaderParameter_Type) Enum() *HeaderParameter_Type { + p := new(HeaderParameter_Type) + *p = x + return p +} + +func (x HeaderParameter_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderParameter_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() +} + +func (HeaderParameter_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] +} + +func (x HeaderParameter_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +type JSONSchema_JSONSchemaSimpleTypes int32 + +const ( + JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 + JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 + JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 + JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 + JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 + JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 + JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 + JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 +) + +// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. +var ( + JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARRAY", + 2: "BOOLEAN", + 3: "INTEGER", + 4: "NULL", + 5: "NUMBER", + 6: "OBJECT", + 7: "STRING", + } + JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ + "UNKNOWN": 0, + "ARRAY": 1, + "BOOLEAN": 2, + "INTEGER": 3, + "NULL": 4, + "NUMBER": 5, + "OBJECT": 6, + "STRING": 7, + } +) + +func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { + p := new(JSONSchema_JSONSchemaSimpleTypes) + *p = x + return p +} + +func (x JSONSchema_JSONSchemaSimpleTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() +} + +func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] +} + +func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// The type of the security scheme. Valid values are "basic", +// "apiKey" or "oauth2". +type SecurityScheme_Type int32 + +const ( + SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 + SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 + SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 + SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 +) + +// Enum value maps for SecurityScheme_Type. +var ( + SecurityScheme_Type_name = map[int32]string{ + 0: "TYPE_INVALID", + 1: "TYPE_BASIC", + 2: "TYPE_API_KEY", + 3: "TYPE_OAUTH2", + } + SecurityScheme_Type_value = map[string]int32{ + "TYPE_INVALID": 0, + "TYPE_BASIC": 1, + "TYPE_API_KEY": 2, + "TYPE_OAUTH2": 3, + } +) + +func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { + p := new(SecurityScheme_Type) + *p = x + return p +} + +func (x SecurityScheme_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() +} + +func (SecurityScheme_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] +} + +func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// The location of the API key. Valid values are "query" or "header". +type SecurityScheme_In int32 + +const ( + SecurityScheme_IN_INVALID SecurityScheme_In = 0 + SecurityScheme_IN_QUERY SecurityScheme_In = 1 + SecurityScheme_IN_HEADER SecurityScheme_In = 2 +) + +// Enum value maps for SecurityScheme_In. +var ( + SecurityScheme_In_name = map[int32]string{ + 0: "IN_INVALID", + 1: "IN_QUERY", + 2: "IN_HEADER", + } + SecurityScheme_In_value = map[string]int32{ + "IN_INVALID": 0, + "IN_QUERY": 1, + "IN_HEADER": 2, + } +) + +func (x SecurityScheme_In) Enum() *SecurityScheme_In { + p := new(SecurityScheme_In) + *p = x + return p +} + +func (x SecurityScheme_In) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() +} + +func (SecurityScheme_In) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] +} + +func (x SecurityScheme_In) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// The flow used by the OAuth2 security scheme. Valid values are +// "implicit", "password", "application" or "accessCode". +type SecurityScheme_Flow int32 + +const ( + SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 + SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 + SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 + SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 + SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 +) + +// Enum value maps for SecurityScheme_Flow. +var ( + SecurityScheme_Flow_name = map[int32]string{ + 0: "FLOW_INVALID", + 1: "FLOW_IMPLICIT", + 2: "FLOW_PASSWORD", + 3: "FLOW_APPLICATION", + 4: "FLOW_ACCESS_CODE", + } + SecurityScheme_Flow_value = map[string]int32{ + "FLOW_INVALID": 0, + "FLOW_IMPLICIT": 1, + "FLOW_PASSWORD": 2, + "FLOW_APPLICATION": 3, + "FLOW_ACCESS_CODE": 4, + } +) + +func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { + p := new(SecurityScheme_Flow) + *p = x + return p +} + +func (x SecurityScheme_Flow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5].Descriptor() +} + +func (SecurityScheme_Flow) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5] +} + +func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +type Swagger struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Security scheme definitions that can be used across the specification. + SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []*Tag `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"` + // Additional external documentation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Swagger) Reset() { + *x = Swagger{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Swagger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Swagger) ProtoMessage() {} + +func (x *Swagger) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Swagger) GetSwagger() string { + if x != nil { + return x.Swagger + } + return "" +} + +func (x *Swagger) GetInfo() *Info { + if x != nil { + return x.Info + } + return nil +} + +func (x *Swagger) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Swagger) GetBasePath() string { + if x != nil { + return x.BasePath + } + return "" +} + +func (x *Swagger) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Swagger) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Swagger) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Swagger) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { + if x != nil { + return x.SecurityDefinitions + } + return nil +} + +func (x *Swagger) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Swagger) GetTags() []*Tag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Swagger) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Swagger) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Swagger) SetSwagger(v string) { + x.Swagger = v +} + +func (x *Swagger) SetInfo(v *Info) { + x.Info = v +} + +func (x *Swagger) SetHost(v string) { + x.Host = v +} + +func (x *Swagger) SetBasePath(v string) { + x.BasePath = v +} + +func (x *Swagger) SetSchemes(v []Scheme) { + x.Schemes = v +} + +func (x *Swagger) SetConsumes(v []string) { + x.Consumes = v +} + +func (x *Swagger) SetProduces(v []string) { + x.Produces = v +} + +func (x *Swagger) SetResponses(v map[string]*Response) { + x.Responses = v +} + +func (x *Swagger) SetSecurityDefinitions(v *SecurityDefinitions) { + x.SecurityDefinitions = v +} + +func (x *Swagger) SetSecurity(v []*SecurityRequirement) { + x.Security = v +} + +func (x *Swagger) SetTags(v []*Tag) { + x.Tags = v +} + +func (x *Swagger) SetExternalDocs(v *ExternalDocumentation) { + x.ExternalDocs = v +} + +func (x *Swagger) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *Swagger) HasInfo() bool { + if x == nil { + return false + } + return x.Info != nil +} + +func (x *Swagger) HasSecurityDefinitions() bool { + if x == nil { + return false + } + return x.SecurityDefinitions != nil +} + +func (x *Swagger) HasExternalDocs() bool { + if x == nil { + return false + } + return x.ExternalDocs != nil +} + +func (x *Swagger) ClearInfo() { + x.Info = nil +} + +func (x *Swagger) ClearSecurityDefinitions() { + x.SecurityDefinitions = nil +} + +func (x *Swagger) ClearExternalDocs() { + x.ExternalDocs = nil +} + +type Swagger_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + Swagger string + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info *Info + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + Host string + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + BasePath string + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + Schemes []Scheme + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Consumes []string + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Produces []string + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + Responses map[string]*Response + // Security scheme definitions that can be used across the specification. + SecurityDefinitions *SecurityDefinitions + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + Security []*SecurityRequirement + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []*Tag + // Additional external documentation. + ExternalDocs *ExternalDocumentation + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Swagger_builder) Build() *Swagger { + m0 := &Swagger{} + b, x := &b0, m0 + _, _ = b, x + x.Swagger = b.Swagger + x.Info = b.Info + x.Host = b.Host + x.BasePath = b.BasePath + x.Schemes = b.Schemes + x.Consumes = b.Consumes + x.Produces = b.Produces + x.Responses = b.Responses + x.SecurityDefinitions = b.SecurityDefinitions + x.Security = b.Security + x.Tags = b.Tags + x.ExternalDocs = b.ExternalDocs + x.Extensions = b.Extensions + return m0 +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +type Operation struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this operation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // The list of possible responses as they are returned from executing this + // operation. + Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters *Parameters `protobuf:"bytes,14,opt,name=parameters,proto3" json:"parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Operation) Reset() { + *x = Operation{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Operation) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Operation) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Operation) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Operation) GetOperationId() string { + if x != nil { + return x.OperationId + } + return "" +} + +func (x *Operation) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Operation) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Operation) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Operation) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Operation) GetDeprecated() bool { + if x != nil { + return x.Deprecated + } + return false +} + +func (x *Operation) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Operation) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Operation) GetParameters() *Parameters { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *Operation) SetTags(v []string) { + x.Tags = v +} + +func (x *Operation) SetSummary(v string) { + x.Summary = v +} + +func (x *Operation) SetDescription(v string) { + x.Description = v +} + +func (x *Operation) SetExternalDocs(v *ExternalDocumentation) { + x.ExternalDocs = v +} + +func (x *Operation) SetOperationId(v string) { + x.OperationId = v +} + +func (x *Operation) SetConsumes(v []string) { + x.Consumes = v +} + +func (x *Operation) SetProduces(v []string) { + x.Produces = v +} + +func (x *Operation) SetResponses(v map[string]*Response) { + x.Responses = v +} + +func (x *Operation) SetSchemes(v []Scheme) { + x.Schemes = v +} + +func (x *Operation) SetDeprecated(v bool) { + x.Deprecated = v +} + +func (x *Operation) SetSecurity(v []*SecurityRequirement) { + x.Security = v +} + +func (x *Operation) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *Operation) SetParameters(v *Parameters) { + x.Parameters = v +} + +func (x *Operation) HasExternalDocs() bool { + if x == nil { + return false + } + return x.ExternalDocs != nil +} + +func (x *Operation) HasParameters() bool { + if x == nil { + return false + } + return x.Parameters != nil +} + +func (x *Operation) ClearExternalDocs() { + x.ExternalDocs = nil +} + +func (x *Operation) ClearParameters() { + x.Parameters = nil +} + +type Operation_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []string + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + Summary string + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + Description string + // Additional external documentation for this operation. + ExternalDocs *ExternalDocumentation + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + OperationId string + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Consumes []string + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Produces []string + // The list of possible responses as they are returned from executing this + // operation. + Responses map[string]*Response + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + Schemes []Scheme + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + Deprecated bool + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + Security []*SecurityRequirement + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters *Parameters +} + +func (b0 Operation_builder) Build() *Operation { + m0 := &Operation{} + b, x := &b0, m0 + _, _ = b, x + x.Tags = b.Tags + x.Summary = b.Summary + x.Description = b.Description + x.ExternalDocs = b.ExternalDocs + x.OperationId = b.OperationId + x.Consumes = b.Consumes + x.Produces = b.Produces + x.Responses = b.Responses + x.Schemes = b.Schemes + x.Deprecated = b.Deprecated + x.Security = b.Security + x.Extensions = b.Extensions + x.Parameters = b.Parameters + return m0 +} + +// `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +// allow header parameters to be set here since we do not want users specifying custom non-header +// parameters beyond those inferred from the Protobuf schema. +// See: https://swagger.io/specification/v2/#parameter-object +type Parameters struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + Headers []*HeaderParameter `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Parameters) Reset() { + *x = Parameters{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Parameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameters) ProtoMessage() {} + +func (x *Parameters) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Parameters) GetHeaders() []*HeaderParameter { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Parameters) SetHeaders(v []*HeaderParameter) { + x.Headers = v +} + +type Parameters_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + Headers []*HeaderParameter +} + +func (b0 Parameters_builder) Build() *Parameters { + m0 := &Parameters{} + b, x := &b0, m0 + _, _ = b, x + x.Headers = b.Headers + return m0 +} + +// `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object +type HeaderParameter struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // `Name` is the header name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // `Description` is a short description of the header. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type HeaderParameter_Type `protobuf:"varint,3,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter_Type" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"` + // `Required` indicates if the header is optional + Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HeaderParameter) Reset() { + *x = HeaderParameter{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HeaderParameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderParameter) ProtoMessage() {} + +func (x *HeaderParameter) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *HeaderParameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *HeaderParameter) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *HeaderParameter) GetType() HeaderParameter_Type { + if x != nil { + return x.Type + } + return HeaderParameter_UNKNOWN +} + +func (x *HeaderParameter) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *HeaderParameter) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *HeaderParameter) SetName(v string) { + x.Name = v +} + +func (x *HeaderParameter) SetDescription(v string) { + x.Description = v +} + +func (x *HeaderParameter) SetType(v HeaderParameter_Type) { + x.Type = v +} + +func (x *HeaderParameter) SetFormat(v string) { + x.Format = v +} + +func (x *HeaderParameter) SetRequired(v bool) { + x.Required = v +} + +type HeaderParameter_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Name` is the header name. + Name string + // `Description` is a short description of the header. + Description string + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type HeaderParameter_Type + // `Format` The extending format for the previously mentioned type. + Format string + // `Required` indicates if the header is optional + Required bool +} + +func (b0 HeaderParameter_builder) Build() *HeaderParameter { + m0 := &HeaderParameter{} + b, x := &b0, m0 + _, _ = b, x + x.Name = b.Name + x.Description = b.Description + x.Type = b.Type + x.Format = b.Format + x.Required = b.Required + return m0 +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +type Header struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // `Description` is a short description of the header. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Header) Reset() { + *x = Header{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Header) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Header) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Header) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *Header) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *Header) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *Header) SetDescription(v string) { + x.Description = v +} + +func (x *Header) SetType(v string) { + x.Type = v +} + +func (x *Header) SetFormat(v string) { + x.Format = v +} + +func (x *Header) SetDefault(v string) { + x.Default = v +} + +func (x *Header) SetPattern(v string) { + x.Pattern = v +} + +type Header_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Description` is a short description of the header. + Description string + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + Type string + // `Format` The extending format for the previously mentioned type. + Format string + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + Default string + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + Pattern string +} + +func (b0 Header_builder) Build() *Header { + m0 := &Header{} + b, x := &b0, m0 + _, _ = b, x + x.Description = b.Description + x.Type = b.Type + x.Format = b.Format + x.Default = b.Default + x.Pattern = b.Pattern + return m0 +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +type Response struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + 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_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Response) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Response) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Response) GetExamples() map[string]string { + if x != nil { + return x.Examples + } + return nil +} + +func (x *Response) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Response) SetDescription(v string) { + x.Description = v +} + +func (x *Response) SetSchema(v *Schema) { + x.Schema = v +} + +func (x *Response) SetHeaders(v map[string]*Header) { + x.Headers = v +} + +func (x *Response) SetExamples(v map[string]string) { + x.Examples = v +} + +func (x *Response) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *Response) HasSchema() bool { + if x == nil { + return false + } + return x.Schema != nil +} + +func (x *Response) ClearSchema() { + x.Schema = nil +} + +type Response_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + Description string + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema *Schema + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + Headers map[string]*Header + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + Examples map[string]string + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Response_builder) Build() *Response { + m0 := &Response{} + b, x := &b0, m0 + _, _ = b, x + x.Description = b.Description + x.Schema = b.Schema + x.Headers = b.Headers + x.Examples = b.Examples + x.Extensions = b.Extensions + return m0 +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// ... +// }; +type Info struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // The title of the application. + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the application. GFM syntax can be used for rich + // text representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The Terms of Service for the API. + TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + // The contact information for the exposed API. + Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` + // The license information for the exposed API. + License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` + // Provides the version of the application API (not to be confused + // with the specification version). + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Info) Reset() { + *x = Info{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Info) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Info) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Info) GetTermsOfService() string { + if x != nil { + return x.TermsOfService + } + return "" +} + +func (x *Info) GetContact() *Contact { + if x != nil { + return x.Contact + } + return nil +} + +func (x *Info) GetLicense() *License { + if x != nil { + return x.License + } + return nil +} + +func (x *Info) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Info) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Info) SetTitle(v string) { + x.Title = v +} + +func (x *Info) SetDescription(v string) { + x.Description = v +} + +func (x *Info) SetTermsOfService(v string) { + x.TermsOfService = v +} + +func (x *Info) SetContact(v *Contact) { + x.Contact = v +} + +func (x *Info) SetLicense(v *License) { + x.License = v +} + +func (x *Info) SetVersion(v string) { + x.Version = v +} + +func (x *Info) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *Info) HasContact() bool { + if x == nil { + return false + } + return x.Contact != nil +} + +func (x *Info) HasLicense() bool { + if x == nil { + return false + } + return x.License != nil +} + +func (x *Info) ClearContact() { + x.Contact = nil +} + +func (x *Info) ClearLicense() { + x.License = nil +} + +type Info_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The title of the application. + Title string + // A short description of the application. GFM syntax can be used for rich + // text representation. + Description string + // The Terms of Service for the API. + TermsOfService string + // The contact information for the exposed API. + Contact *Contact + // The license information for the exposed API. + License *License + // Provides the version of the application API (not to be confused + // with the specification version). + Version string + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Info_builder) Build() *Info { + m0 := &Info{} + b, x := &b0, m0 + _, _ = b, x + x.Title = b.Title + x.Description = b.Description + x.TermsOfService = b.TermsOfService + x.Contact = b.Contact + x.License = b.License + x.Version = b.Version + x.Extensions = b.Extensions + return m0 +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +type Contact struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // The identifying name of the contact person/organization. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The URL pointing to the contact information. MUST be in the format of a + // URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // The email address of the contact person/organization. MUST be in the format + // of an email address. + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Contact) Reset() { + *x = Contact{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Contact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Contact) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Contact) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Contact) SetName(v string) { + x.Name = v +} + +func (x *Contact) SetUrl(v string) { + x.Url = v +} + +func (x *Contact) SetEmail(v string) { + x.Email = v +} + +type Contact_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The identifying name of the contact person/organization. + Name string + // The URL pointing to the contact information. MUST be in the format of a + // URL. + Url string + // The email address of the contact person/organization. MUST be in the format + // of an email address. + Email string +} + +func (b0 Contact_builder) Build() *Contact { + m0 := &Contact{} + b, x := &b0, m0 + _, _ = b, x + x.Name = b.Name + x.Url = b.Url + x.Email = b.Email + return m0 +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// ... +// }; +// ... +// }; +type License struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // The license name used for the API. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL to the license used for the API. MUST be in the format of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *License) Reset() { + *x = License{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *License) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*License) ProtoMessage() {} + +func (x *License) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *License) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *License) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *License) SetName(v string) { + x.Name = v +} + +func (x *License) SetUrl(v string) { + x.Url = v +} + +type License_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The license name used for the API. + Name string + // A URL to the license used for the API. MUST be in the format of a URL. + Url string +} + +func (b0 License_builder) Build() *License { + m0 := &License{} + b, x := &b0, m0 + _, _ = b, x + x.Name = b.Name + x.Url = b.Url + return m0 +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +type ExternalDocumentation struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The URL for the target documentation. Value MUST be in the format + // of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalDocumentation) Reset() { + *x = ExternalDocumentation{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalDocumentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *ExternalDocumentation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ExternalDocumentation) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *ExternalDocumentation) SetDescription(v string) { + x.Description = v +} + +func (x *ExternalDocumentation) SetUrl(v string) { + x.Url = v +} + +type ExternalDocumentation_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + Description string + // The URL for the target documentation. Value MUST be in the format + // of a URL. + Url string +} + +func (b0 ExternalDocumentation_builder) Build() *ExternalDocumentation { + m0 := &ExternalDocumentation{} + b, x := &b0, m0 + _, _ = b, x + x.Description = b.Description + x.Url = b.Url + return m0 +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +type Schema struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Schema) Reset() { + *x = Schema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Schema) GetJsonSchema() *JSONSchema { + if x != nil { + return x.JsonSchema + } + return nil +} + +func (x *Schema) GetDiscriminator() string { + if x != nil { + return x.Discriminator + } + return "" +} + +func (x *Schema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *Schema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Schema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *Schema) SetJsonSchema(v *JSONSchema) { + x.JsonSchema = v +} + +func (x *Schema) SetDiscriminator(v string) { + x.Discriminator = v +} + +func (x *Schema) SetReadOnly(v bool) { + x.ReadOnly = v +} + +func (x *Schema) SetExternalDocs(v *ExternalDocumentation) { + x.ExternalDocs = v +} + +func (x *Schema) SetExample(v string) { + x.Example = v +} + +func (x *Schema) HasJsonSchema() bool { + if x == nil { + return false + } + return x.JsonSchema != nil +} + +func (x *Schema) HasExternalDocs() bool { + if x == nil { + return false + } + return x.ExternalDocs != nil +} + +func (x *Schema) ClearJsonSchema() { + x.JsonSchema = nil +} + +func (x *Schema) ClearExternalDocs() { + x.ExternalDocs = nil +} + +type Schema_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + JsonSchema *JSONSchema + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + Discriminator string + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + ReadOnly bool + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + Example string +} + +func (b0 Schema_builder) Build() *Schema { + m0 := &Schema{} + b, x := &b0, m0 + _, _ = b, x + x.JsonSchema = b.JsonSchema + x.Discriminator = b.Discriminator + x.ReadOnly = b.ReadOnly + x.ExternalDocs = b.ExternalDocs + x.Example = b.Example + return m0 +} + +// `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. +// Only fields that are applicable to Enums are included +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = { +// ... +// title: "MyEnum"; +// description:"This is my nice enum"; +// example: "ZERO"; +// required: true; +// ... +// }; +type EnumSchema struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // A short description of the schema. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"` + // The title of the schema. + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + ReadOnly bool `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,6,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + Example string `protobuf:"bytes,7,opt,name=example,proto3" json:"example,omitempty"` + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string `protobuf:"bytes,8,opt,name=ref,proto3" json:"ref,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumSchema) Reset() { + *x = EnumSchema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumSchema) ProtoMessage() {} + +func (x *EnumSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *EnumSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *EnumSchema) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *EnumSchema) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *EnumSchema) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *EnumSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *EnumSchema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *EnumSchema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *EnumSchema) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *EnumSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *EnumSchema) SetDescription(v string) { + x.Description = v +} + +func (x *EnumSchema) SetDefault(v string) { + x.Default = v +} + +func (x *EnumSchema) SetTitle(v string) { + x.Title = v +} + +func (x *EnumSchema) SetRequired(v bool) { + x.Required = v +} + +func (x *EnumSchema) SetReadOnly(v bool) { + x.ReadOnly = v +} + +func (x *EnumSchema) SetExternalDocs(v *ExternalDocumentation) { + x.ExternalDocs = v +} + +func (x *EnumSchema) SetExample(v string) { + x.Example = v +} + +func (x *EnumSchema) SetRef(v string) { + x.Ref = v +} + +func (x *EnumSchema) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *EnumSchema) HasExternalDocs() bool { + if x == nil { + return false + } + return x.ExternalDocs != nil +} + +func (x *EnumSchema) ClearExternalDocs() { + x.ExternalDocs = nil +} + +type EnumSchema_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A short description of the schema. + Description string + Default string + // The title of the schema. + Title string + Required bool + ReadOnly bool + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation + Example string + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 EnumSchema_builder) Build() *EnumSchema { + m0 := &EnumSchema{} + b, x := &b0, m0 + _, _ = b, x + x.Description = b.Description + x.Default = b.Default + x.Title = b.Title + x.Required = b.Required + x.ReadOnly = b.ReadOnly + x.ExternalDocs = b.ExternalDocs + x.Example = b.Example + x.Ref = b.Ref + x.Extensions = b.Extensions + return m0 +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// description: "The unique identifier of the simple message." +// }]; +// } +type JSONSchema struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + // The title of the schema. + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the schema. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` + ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` + MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` + MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` + Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` + // Items in 'array' must be unique. + Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` + Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` + // `Format` + Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration *JSONSchema_FieldConfiguration `protobuf:"bytes,1001,opt,name=field_configuration,json=fieldConfiguration,proto3" json:"field_configuration,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,48,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JSONSchema) Reset() { + *x = JSONSchema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JSONSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema) ProtoMessage() {} + +func (x *JSONSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *JSONSchema) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *JSONSchema) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *JSONSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *JSONSchema) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *JSONSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *JSONSchema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *JSONSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf + } + return 0 +} + +func (x *JSONSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum + } + return false +} + +func (x *JSONSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum + } + return false +} + +func (x *JSONSchema) GetMaxLength() uint64 { + if x != nil { + return x.MaxLength + } + return 0 +} + +func (x *JSONSchema) GetMinLength() uint64 { + if x != nil { + return x.MinLength + } + return 0 +} + +func (x *JSONSchema) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *JSONSchema) GetMaxItems() uint64 { + if x != nil { + return x.MaxItems + } + return 0 +} + +func (x *JSONSchema) GetMinItems() uint64 { + if x != nil { + return x.MinItems + } + return 0 +} + +func (x *JSONSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems + } + return false +} + +func (x *JSONSchema) GetMaxProperties() uint64 { + if x != nil { + return x.MaxProperties + } + return 0 +} + +func (x *JSONSchema) GetMinProperties() uint64 { + if x != nil { + return x.MinProperties + } + return 0 +} + +func (x *JSONSchema) GetRequired() []string { + if x != nil { + return x.Required + } + return nil +} + +func (x *JSONSchema) GetArray() []string { + if x != nil { + return x.Array + } + return nil +} + +func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { + if x != nil { + return x.Type + } + return nil +} + +func (x *JSONSchema) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *JSONSchema) GetEnum() []string { + if x != nil { + return x.Enum + } + return nil +} + +func (x *JSONSchema) GetFieldConfiguration() *JSONSchema_FieldConfiguration { + if x != nil { + return x.FieldConfiguration + } + return nil +} + +func (x *JSONSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *JSONSchema) SetRef(v string) { + x.Ref = v +} + +func (x *JSONSchema) SetTitle(v string) { + x.Title = v +} + +func (x *JSONSchema) SetDescription(v string) { + x.Description = v +} + +func (x *JSONSchema) SetDefault(v string) { + x.Default = v +} + +func (x *JSONSchema) SetReadOnly(v bool) { + x.ReadOnly = v +} + +func (x *JSONSchema) SetExample(v string) { + x.Example = v +} + +func (x *JSONSchema) SetMultipleOf(v float64) { + x.MultipleOf = v +} + +func (x *JSONSchema) SetMaximum(v float64) { + x.Maximum = v +} + +func (x *JSONSchema) SetExclusiveMaximum(v bool) { + x.ExclusiveMaximum = v +} + +func (x *JSONSchema) SetMinimum(v float64) { + x.Minimum = v +} + +func (x *JSONSchema) SetExclusiveMinimum(v bool) { + x.ExclusiveMinimum = v +} + +func (x *JSONSchema) SetMaxLength(v uint64) { + x.MaxLength = v +} + +func (x *JSONSchema) SetMinLength(v uint64) { + x.MinLength = v +} + +func (x *JSONSchema) SetPattern(v string) { + x.Pattern = v +} + +func (x *JSONSchema) SetMaxItems(v uint64) { + x.MaxItems = v +} + +func (x *JSONSchema) SetMinItems(v uint64) { + x.MinItems = v +} + +func (x *JSONSchema) SetUniqueItems(v bool) { + x.UniqueItems = v +} + +func (x *JSONSchema) SetMaxProperties(v uint64) { + x.MaxProperties = v +} + +func (x *JSONSchema) SetMinProperties(v uint64) { + x.MinProperties = v +} + +func (x *JSONSchema) SetRequired(v []string) { + x.Required = v +} + +func (x *JSONSchema) SetArray(v []string) { + x.Array = v +} + +func (x *JSONSchema) SetType(v []JSONSchema_JSONSchemaSimpleTypes) { + x.Type = v +} + +func (x *JSONSchema) SetFormat(v string) { + x.Format = v +} + +func (x *JSONSchema) SetEnum(v []string) { + x.Enum = v +} + +func (x *JSONSchema) SetFieldConfiguration(v *JSONSchema_FieldConfiguration) { + x.FieldConfiguration = v +} + +func (x *JSONSchema) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *JSONSchema) HasFieldConfiguration() bool { + if x == nil { + return false + } + return x.FieldConfiguration != nil +} + +func (x *JSONSchema) ClearFieldConfiguration() { + x.FieldConfiguration = nil +} + +type JSONSchema_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string + // The title of the schema. + Title string + // A short description of the schema. + Description string + Default string + ReadOnly bool + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + Example string + MultipleOf float64 + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + Maximum float64 + ExclusiveMaximum bool + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + Minimum float64 + ExclusiveMinimum bool + MaxLength uint64 + MinLength uint64 + Pattern string + MaxItems uint64 + MinItems uint64 + UniqueItems bool + MaxProperties uint64 + MinProperties uint64 + Required []string + // Items in 'array' must be unique. + Array []string + Type []JSONSchema_JSONSchemaSimpleTypes + // `Format` + Format string + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + Enum []string + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration *JSONSchema_FieldConfiguration + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 JSONSchema_builder) Build() *JSONSchema { + m0 := &JSONSchema{} + b, x := &b0, m0 + _, _ = b, x + x.Ref = b.Ref + x.Title = b.Title + x.Description = b.Description + x.Default = b.Default + x.ReadOnly = b.ReadOnly + x.Example = b.Example + x.MultipleOf = b.MultipleOf + x.Maximum = b.Maximum + x.ExclusiveMaximum = b.ExclusiveMaximum + x.Minimum = b.Minimum + x.ExclusiveMinimum = b.ExclusiveMinimum + x.MaxLength = b.MaxLength + x.MinLength = b.MinLength + x.Pattern = b.Pattern + x.MaxItems = b.MaxItems + x.MinItems = b.MinItems + x.UniqueItems = b.UniqueItems + x.MaxProperties = b.MaxProperties + x.MinProperties = b.MinProperties + x.Required = b.Required + x.Array = b.Array + x.Type = b.Type + x.Format = b.Format + x.Enum = b.Enum + x.FieldConfiguration = b.FieldConfiguration + x.Extensions = b.Extensions + return m0 +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +type Tag struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A short description for the tag. GFM syntax can be used for rich text + // representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this tag. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Tag) Reset() { + *x = Tag{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Tag) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Tag) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Tag) SetName(v string) { + x.Name = v +} + +func (x *Tag) SetDescription(v string) { + x.Description = v +} + +func (x *Tag) SetExternalDocs(v *ExternalDocumentation) { + x.ExternalDocs = v +} + +func (x *Tag) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *Tag) HasExternalDocs() bool { + if x == nil { + return false + } + return x.ExternalDocs != nil +} + +func (x *Tag) ClearExternalDocs() { + x.ExternalDocs = nil +} + +type Tag_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + Name string + // A short description for the tag. GFM syntax can be used for rich text + // representation. + Description string + // Additional external documentation for this tag. + ExternalDocs *ExternalDocumentation + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Tag_builder) Build() *Tag { + m0 := &Tag{} + b, x := &b0, m0 + _, _ = b, x + x.Name = b.Name + x.Description = b.Description + x.ExternalDocs = b.ExternalDocs + x.Extensions = b.Extensions + return m0 +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +type SecurityDefinitions struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityDefinitions) Reset() { + *x = SecurityDefinitions{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityDefinitions) ProtoMessage() {} + +func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { + if x != nil { + return x.Security + } + return nil +} + +func (x *SecurityDefinitions) SetSecurity(v map[string]*SecurityScheme) { + x.Security = v +} + +type SecurityDefinitions_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + Security map[string]*SecurityScheme +} + +func (b0 SecurityDefinitions_builder) Build() *SecurityDefinitions { + m0 := &SecurityDefinitions{} + b, x := &b0, m0 + _, _ = b, x + x.Security = b.Security + return m0 +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +type SecurityScheme struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` + // A short description for security scheme. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The name of the header or query parameter to be used. + // Valid for apiKey. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityScheme) Reset() { + *x = SecurityScheme{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityScheme) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityScheme) ProtoMessage() {} + +func (x *SecurityScheme) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityScheme) GetType() SecurityScheme_Type { + if x != nil { + return x.Type + } + return SecurityScheme_TYPE_INVALID +} + +func (x *SecurityScheme) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SecurityScheme) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecurityScheme) GetIn() SecurityScheme_In { + if x != nil { + return x.In + } + return SecurityScheme_IN_INVALID +} + +func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { + if x != nil { + return x.Flow + } + return SecurityScheme_FLOW_INVALID +} + +func (x *SecurityScheme) GetAuthorizationUrl() string { + if x != nil { + return x.AuthorizationUrl + } + return "" +} + +func (x *SecurityScheme) GetTokenUrl() string { + if x != nil { + return x.TokenUrl + } + return "" +} + +func (x *SecurityScheme) GetScopes() *Scopes { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *SecurityScheme) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *SecurityScheme) SetType(v SecurityScheme_Type) { + x.Type = v +} + +func (x *SecurityScheme) SetDescription(v string) { + x.Description = v +} + +func (x *SecurityScheme) SetName(v string) { + x.Name = v +} + +func (x *SecurityScheme) SetIn(v SecurityScheme_In) { + x.In = v +} + +func (x *SecurityScheme) SetFlow(v SecurityScheme_Flow) { + x.Flow = v +} + +func (x *SecurityScheme) SetAuthorizationUrl(v string) { + x.AuthorizationUrl = v +} + +func (x *SecurityScheme) SetTokenUrl(v string) { + x.TokenUrl = v +} + +func (x *SecurityScheme) SetScopes(v *Scopes) { + x.Scopes = v +} + +func (x *SecurityScheme) SetExtensions(v map[string]*structpb.Value) { + x.Extensions = v +} + +func (x *SecurityScheme) HasScopes() bool { + if x == nil { + return false + } + return x.Scopes != nil +} + +func (x *SecurityScheme) ClearScopes() { + x.Scopes = nil +} + +type SecurityScheme_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type SecurityScheme_Type + // A short description for security scheme. + Description string + // The name of the header or query parameter to be used. + // Valid for apiKey. + Name string + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In SecurityScheme_In + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow SecurityScheme_Flow + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + AuthorizationUrl string + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + TokenUrl string + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes *Scopes + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 SecurityScheme_builder) Build() *SecurityScheme { + m0 := &SecurityScheme{} + b, x := &b0, m0 + _, _ = b, x + x.Type = b.Type + x.Description = b.Description + x.Name = b.Name + x.In = b.In + x.Flow = b.Flow + x.AuthorizationUrl = b.AuthorizationUrl + x.TokenUrl = b.TokenUrl + x.Scopes = b.Scopes + x.Extensions = b.Extensions + return m0 +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +type SecurityRequirement struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityRequirement) Reset() { + *x = SecurityRequirement{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityRequirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement) ProtoMessage() {} + +func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { + if x != nil { + return x.SecurityRequirement + } + return nil +} + +func (x *SecurityRequirement) SetSecurityRequirement(v map[string]*SecurityRequirement_SecurityRequirementValue) { + x.SecurityRequirement = v +} + +type SecurityRequirement_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue +} + +func (b0 SecurityRequirement_builder) Build() *SecurityRequirement { + m0 := &SecurityRequirement{} + b, x := &b0, m0 + _, _ = b, x + x.SecurityRequirement = b.SecurityRequirement + return m0 +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +type Scopes struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Maps between a name of a scope to a short description of it (as the value + // of the property). + Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Scopes) Reset() { + *x = Scopes{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Scopes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scopes) ProtoMessage() {} + +func (x *Scopes) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Scopes) GetScope() map[string]string { + if x != nil { + return x.Scope + } + return nil +} + +func (x *Scopes) SetScope(v map[string]string) { + x.Scope = v +} + +type Scopes_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Maps between a name of a scope to a short description of it (as the value + // of the property). + Scope map[string]string +} + +func (b0 Scopes_builder) Build() *Scopes { + m0 := &Scopes{} + b, x := &b0, m0 + _, _ = b, x + x.Scope = b.Scope + return m0 +} + +// 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. +// These properties are not defined by OpenAPIv2, but they are used to control the generation. +type JSONSchema_FieldConfiguration struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + PathParamName string `protobuf:"bytes,47,opt,name=path_param_name,json=pathParamName,proto3" json:"path_param_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JSONSchema_FieldConfiguration) Reset() { + *x = JSONSchema_FieldConfiguration{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JSONSchema_FieldConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema_FieldConfiguration) ProtoMessage() {} + +func (x *JSONSchema_FieldConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *JSONSchema_FieldConfiguration) GetPathParamName() string { + if x != nil { + return x.PathParamName + } + return "" +} + +func (x *JSONSchema_FieldConfiguration) SetPathParamName(v string) { + x.PathParamName = v +} + +type JSONSchema_FieldConfiguration_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + PathParamName string +} + +func (b0 JSONSchema_FieldConfiguration_builder) Build() *JSONSchema_FieldConfiguration { + m0 := &JSONSchema_FieldConfiguration{} + b, x := &b0, m0 + _, _ = b, x + x.PathParamName = b.PathParamName + return m0 +} + +// If the security scheme is of type "oauth2", then the value is a list of +// scope names required for the execution. For other security scheme types, +// the array MUST be empty. +type SecurityRequirement_SecurityRequirementValue struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityRequirement_SecurityRequirementValue) Reset() { + *x = SecurityRequirement_SecurityRequirementValue{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityRequirement_SecurityRequirementValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} + +func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +func (x *SecurityRequirement_SecurityRequirementValue) SetScope(v []string) { + x.Scope = v +} + +type SecurityRequirement_SecurityRequirementValue_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Scope []string +} + +func (b0 SecurityRequirement_SecurityRequirementValue_builder) Build() *SecurityRequirement_SecurityRequirementValue { + m0 := &SecurityRequirement_SecurityRequirementValue{} + b, x := &b0, m0 + _, _ = b, x + x.Scope = b.Scope + return m0 +} + +var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0xb3, 0x08, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xd6, 0x07, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x65, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, + 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x61, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x62, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x0f, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x53, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x45, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, + 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, + 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, + 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, + 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, + 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, + 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x49, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 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, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 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, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72, + 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 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, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x6a, + 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x22, 0xe8, 0x03, 0x0a, 0x0a, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 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, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, + 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd7, + 0x0a, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, + 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x69, 0x74, 0x6c, 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, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, + 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x7a, 0x0a, 0x13, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x12, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, + 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, + 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, + 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, + 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, + 0x4a, 0x04, 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, + 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0xd9, 0x02, 0x0a, 0x03, 0x54, 0x61, 0x67, + 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, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x5e, 0x0a, + 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, + 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, + 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, + 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, + 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, + 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, + 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, + 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, + 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, + 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, + 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, + 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, + 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, + 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, + 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, 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, 0x2a, 0x3b, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, + 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, + 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, + 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []any{ + (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme + (HeaderParameter_Type)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + (JSONSchema_JSONSchemaSimpleTypes)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + (SecurityScheme_Type)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + (SecurityScheme_In)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + (SecurityScheme_Flow)(0), // 5: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Parameters)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Parameters + (*HeaderParameter)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + (*Header)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Header + (*Response)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.Response + (*Info)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.Info + (*Contact)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Contact + (*License)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.License + (*ExternalDocumentation)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + (*Schema)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*EnumSchema)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + (*JSONSchema)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + (*Tag)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*SecurityDefinitions)(nil), // 20: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + (*SecurityScheme)(nil), // 21: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + (*SecurityRequirement)(nil), // 22: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + (*Scopes)(nil), // 23: grpc.gateway.protoc_gen_openapiv2.options.Scopes + nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + nil, // 30: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry + (*JSONSchema_FieldConfiguration)(nil), // 33: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + nil, // 34: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + nil, // 35: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + nil, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + nil, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + (*SecurityRequirement_SecurityRequirementValue)(nil), // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + nil, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + nil, // 40: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + (*structpb.Value)(nil), // 41: google.protobuf.Value +} +var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ + 12, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info + 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 24, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + 20, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + 22, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 19, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.tags:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 15, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 25, // 7: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + 15, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 26, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + 0, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 22, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 27, // 12: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + 8, // 13: grpc.gateway.protoc_gen_openapiv2.options.Operation.parameters:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Parameters + 9, // 14: grpc.gateway.protoc_gen_openapiv2.options.Parameters.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + 1, // 15: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + 16, // 16: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 28, // 17: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + 29, // 18: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + 30, // 19: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + 13, // 20: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact + 14, // 21: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License + 31, // 22: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + 18, // 23: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 15, // 24: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 15, // 25: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 32, // 26: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry + 2, // 27: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + 33, // 28: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.field_configuration:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + 34, // 29: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + 15, // 30: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 35, // 31: grpc.gateway.protoc_gen_openapiv2.options.Tag.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + 36, // 32: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + 3, // 33: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + 4, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + 5, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + 23, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes + 37, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + 39, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + 40, // 39: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + 11, // 40: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 41, // 41: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value + 11, // 42: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 41, // 43: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value + 10, // 44: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header + 41, // 45: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 46: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 47: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 48: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 49: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry.value:type_name -> google.protobuf.Value + 21, // 50: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + 41, // 51: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value + 38, // 52: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + 53, // [53:53] is the sub-list for method output_type + 53, // [53:53] is the sub-list for method input_type + 53, // [53:53] is the sub-list for extension type_name + 53, // [53:53] is the sub-list for extension extendee + 0, // [0:53] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } +func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { + if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, + NumEnums: 6, + NumMessages: 35, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, + EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, + MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, + }.Build() + File_protoc_gen_openapiv2_options_openapiv2_proto = out.File + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil +} diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.proto b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.proto new file mode 100644 index 00000000000..5313f0818ae --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.proto @@ -0,0 +1,759 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +import "google/protobuf/struct.proto"; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +enum Scheme { + UNKNOWN = 0; + HTTP = 1; + HTTPS = 2; + WS = 3; + WSS = 4; +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +// +message Swagger { + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + string swagger = 1; + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info info = 2; + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + string host = 3; + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + string base_path = 4; + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + repeated Scheme schemes = 5; + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string consumes = 6; + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'paths'. + reserved 8; + // field 9 is reserved for 'definitions', which at this time are already + // exposed as and customizable as proto messages. + reserved 9; + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + map responses = 10; + // Security scheme definitions that can be used across the specification. + SecurityDefinitions security_definitions = 11; + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + repeated SecurityRequirement security = 12; + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + repeated Tag tags = 13; + // Additional external documentation. + ExternalDocumentation external_docs = 14; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 15; +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +message Operation { + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + repeated string tags = 1; + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + string summary = 2; + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + string description = 3; + // Additional external documentation for this operation. + ExternalDocumentation external_docs = 4; + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + string operation_id = 5; + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string consumes = 6; + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'parameters'. + reserved 8; + // The list of possible responses as they are returned from executing this + // operation. + map responses = 9; + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + repeated Scheme schemes = 10; + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + bool deprecated = 11; + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + repeated SecurityRequirement security = 12; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 13; + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters parameters = 14; +} + +// `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +// allow header parameters to be set here since we do not want users specifying custom non-header +// parameters beyond those inferred from the Protobuf schema. +// See: https://swagger.io/specification/v2/#parameter-object +message Parameters { + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + repeated HeaderParameter headers = 1; +} + +// `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object +message HeaderParameter { + // `Type` is a supported HTTP header type. + // See https://swagger.io/specification/v2/#parameterType. + enum Type { + UNKNOWN = 0; + STRING = 1; + NUMBER = 2; + INTEGER = 3; + BOOLEAN = 4; + } + + // `Name` is the header name. + string name = 1; + // `Description` is a short description of the header. + string description = 2; + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type type = 3; + // `Format` The extending format for the previously mentioned type. + string format = 4; + // `Required` indicates if the header is optional + bool required = 5; + // field 6 is reserved for 'items', but in OpenAPI-specific way. + reserved 6; + // field 7 is reserved `Collection Format`. Determines the format of the array if type array is used. + reserved 7; +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +// +message Header { + // `Description` is a short description of the header. + string description = 1; + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + string type = 2; + // `Format` The extending format for the previously mentioned type. + string format = 3; + // field 4 is reserved for 'items', but in OpenAPI-specific way. + reserved 4; + // field 5 is reserved `Collection Format` Determines the format of the array if type array is used. + reserved 5; + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + string default = 6; + // field 7 is reserved for 'maximum'. + reserved 7; + // field 8 is reserved for 'exclusiveMaximum'. + reserved 8; + // field 9 is reserved for 'minimum'. + reserved 9; + // field 10 is reserved for 'exclusiveMinimum'. + reserved 10; + // field 11 is reserved for 'maxLength'. + reserved 11; + // field 12 is reserved for 'minLength'. + reserved 12; + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + string pattern = 13; + // field 14 is reserved for 'maxItems'. + reserved 14; + // field 15 is reserved for 'minItems'. + reserved 15; + // field 16 is reserved for 'uniqueItems'. + reserved 16; + // field 17 is reserved for 'enum'. + reserved 17; + // field 18 is reserved for 'multipleOf'. + reserved 18; +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +// +message Response { + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + string description = 1; + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema schema = 2; + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + map headers = 3; + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + map examples = 4; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 5; +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// ... +// }; +// +message Info { + // The title of the application. + string title = 1; + // A short description of the application. GFM syntax can be used for rich + // text representation. + string description = 2; + // The Terms of Service for the API. + string terms_of_service = 3; + // The contact information for the exposed API. + Contact contact = 4; + // The license information for the exposed API. + License license = 5; + // Provides the version of the application API (not to be confused + // with the specification version). + string version = 6; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 7; +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +// +message Contact { + // The identifying name of the contact person/organization. + string name = 1; + // The URL pointing to the contact information. MUST be in the format of a + // URL. + string url = 2; + // The email address of the contact person/organization. MUST be in the format + // of an email address. + string email = 3; +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// ... +// }; +// ... +// }; +// +message License { + // The license name used for the API. + string name = 1; + // A URL to the license used for the API. MUST be in the format of a URL. + string url = 2; +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +// +message ExternalDocumentation { + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + string description = 1; + // The URL for the target documentation. Value MUST be in the format + // of a URL. + string url = 2; +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +message Schema { + JSONSchema json_schema = 1; + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + string discriminator = 2; + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + bool read_only = 3; + // field 4 is reserved for 'xml'. + reserved 4; + // Additional external documentation for this schema. + ExternalDocumentation external_docs = 5; + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + string example = 6; +} + +// `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. +// Only fields that are applicable to Enums are included +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = { +// ... +// title: "MyEnum"; +// description:"This is my nice enum"; +// example: "ZERO"; +// required: true; +// ... +// }; +// +message EnumSchema { + // A short description of the schema. + string description = 1; + string default = 2; + // The title of the schema. + string title = 3; + bool required = 4; + bool read_only = 5; + // Additional external documentation for this schema. + ExternalDocumentation external_docs = 6; + string example = 7; + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // `ref: ".google.protobuf.Timestamp"`. + string ref = 8; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 9; +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// description: "The unique identifier of the simple message." +// }]; +// } +// +message JSONSchema { + // field 1 is reserved for '$id', omitted from OpenAPI v2. + reserved 1; + // field 2 is reserved for '$schema', omitted from OpenAPI v2. + reserved 2; + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // `ref: ".google.protobuf.Timestamp"`. + string ref = 3; + // field 4 is reserved for '$comment', omitted from OpenAPI v2. + reserved 4; + // The title of the schema. + string title = 5; + // A short description of the schema. + string description = 6; + string default = 7; + bool read_only = 8; + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + string example = 9; + double multiple_of = 10; + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + double maximum = 11; + bool exclusive_maximum = 12; + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + double minimum = 13; + bool exclusive_minimum = 14; + uint64 max_length = 15; + uint64 min_length = 16; + string pattern = 17; + // field 18 is reserved for 'additionalItems', omitted from OpenAPI v2. + reserved 18; + // field 19 is reserved for 'items', but in OpenAPI-specific way. + // TODO(ivucica): add 'items'? + reserved 19; + uint64 max_items = 20; + uint64 min_items = 21; + bool unique_items = 22; + // field 23 is reserved for 'contains', omitted from OpenAPI v2. + reserved 23; + uint64 max_properties = 24; + uint64 min_properties = 25; + repeated string required = 26; + // field 27 is reserved for 'additionalProperties', but in OpenAPI-specific + // way. TODO(ivucica): add 'additionalProperties'? + reserved 27; + // field 28 is reserved for 'definitions', omitted from OpenAPI v2. + reserved 28; + // field 29 is reserved for 'properties', but in OpenAPI-specific way. + // TODO(ivucica): add 'additionalProperties'? + reserved 29; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // patternProperties, dependencies, propertyNames, const + reserved 30 to 33; + // Items in 'array' must be unique. + repeated string array = 34; + + enum JSONSchemaSimpleTypes { + UNKNOWN = 0; + ARRAY = 1; + BOOLEAN = 2; + INTEGER = 3; + NULL = 4; + NUMBER = 5; + OBJECT = 6; + STRING = 7; + } + + repeated JSONSchemaSimpleTypes type = 35; + // `Format` + string format = 36; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: contentMediaType, contentEncoding, if, then, else + reserved 37 to 41; + // field 42 is reserved for 'allOf', but in OpenAPI-specific way. + // TODO(ivucica): add 'allOf'? + reserved 42; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // anyOf, oneOf, not + reserved 43 to 45; + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + repeated string enum = 46; + + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration field_configuration = 1001; + + // 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. + // These properties are not defined by OpenAPIv2, but they are used to control the generation. + message FieldConfiguration { + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + string path_param_name = 47; + } + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 48; +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +// +message Tag { + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + string name = 1; + // A short description for the tag. GFM syntax can be used for rich text + // representation. + string description = 2; + // Additional external documentation for this tag. + ExternalDocumentation external_docs = 3; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 4; +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +message SecurityDefinitions { + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + map security = 1; +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +message SecurityScheme { + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + enum Type { + TYPE_INVALID = 0; + TYPE_BASIC = 1; + TYPE_API_KEY = 2; + TYPE_OAUTH2 = 3; + } + + // The location of the API key. Valid values are "query" or "header". + enum In { + IN_INVALID = 0; + IN_QUERY = 1; + IN_HEADER = 2; + } + + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + enum Flow { + FLOW_INVALID = 0; + FLOW_IMPLICIT = 1; + FLOW_PASSWORD = 2; + FLOW_APPLICATION = 3; + FLOW_ACCESS_CODE = 4; + } + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type type = 1; + // A short description for security scheme. + string description = 2; + // The name of the header or query parameter to be used. + // Valid for apiKey. + string name = 3; + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In in = 4; + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow flow = 5; + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + string authorization_url = 6; + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + string token_url = 7; + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes scopes = 8; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 9; +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +message SecurityRequirement { + // If the security scheme is of type "oauth2", then the value is a list of + // scope names required for the execution. For other security scheme types, + // the array MUST be empty. + message SecurityRequirementValue { + repeated string scope = 1; + } + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + map security_requirement = 1; +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +message Scopes { + // Maps between a name of a scope to a short description of it (as the value + // of the property). + map scope = 1; +} diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2_protoopaque.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2_protoopaque.pb.go new file mode 100644 index 00000000000..1f0e0c26916 --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2_protoopaque.pb.go @@ -0,0 +1,4055 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/openapiv2.proto + +//go:build protoopaque + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" +) + +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) +) + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +type Scheme int32 + +const ( + Scheme_UNKNOWN Scheme = 0 + Scheme_HTTP Scheme = 1 + Scheme_HTTPS Scheme = 2 + Scheme_WS Scheme = 3 + Scheme_WSS Scheme = 4 +) + +// Enum value maps for Scheme. +var ( + Scheme_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP", + 2: "HTTPS", + 3: "WS", + 4: "WSS", + } + Scheme_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP": 1, + "HTTPS": 2, + "WS": 3, + "WSS": 4, + } +) + +func (x Scheme) Enum() *Scheme { + p := new(Scheme) + *p = x + return p +} + +func (x Scheme) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scheme) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() +} + +func (Scheme) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] +} + +func (x Scheme) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// `Type` is a supported HTTP header type. +// See https://swagger.io/specification/v2/#parameterType. +type HeaderParameter_Type int32 + +const ( + HeaderParameter_UNKNOWN HeaderParameter_Type = 0 + HeaderParameter_STRING HeaderParameter_Type = 1 + HeaderParameter_NUMBER HeaderParameter_Type = 2 + HeaderParameter_INTEGER HeaderParameter_Type = 3 + HeaderParameter_BOOLEAN HeaderParameter_Type = 4 +) + +// Enum value maps for HeaderParameter_Type. +var ( + HeaderParameter_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "STRING", + 2: "NUMBER", + 3: "INTEGER", + 4: "BOOLEAN", + } + HeaderParameter_Type_value = map[string]int32{ + "UNKNOWN": 0, + "STRING": 1, + "NUMBER": 2, + "INTEGER": 3, + "BOOLEAN": 4, + } +) + +func (x HeaderParameter_Type) Enum() *HeaderParameter_Type { + p := new(HeaderParameter_Type) + *p = x + return p +} + +func (x HeaderParameter_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderParameter_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() +} + +func (HeaderParameter_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] +} + +func (x HeaderParameter_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +type JSONSchema_JSONSchemaSimpleTypes int32 + +const ( + JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 + JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 + JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 + JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 + JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 + JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 + JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 + JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 +) + +// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. +var ( + JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARRAY", + 2: "BOOLEAN", + 3: "INTEGER", + 4: "NULL", + 5: "NUMBER", + 6: "OBJECT", + 7: "STRING", + } + JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ + "UNKNOWN": 0, + "ARRAY": 1, + "BOOLEAN": 2, + "INTEGER": 3, + "NULL": 4, + "NUMBER": 5, + "OBJECT": 6, + "STRING": 7, + } +) + +func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { + p := new(JSONSchema_JSONSchemaSimpleTypes) + *p = x + return p +} + +func (x JSONSchema_JSONSchemaSimpleTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() +} + +func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] +} + +func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// The type of the security scheme. Valid values are "basic", +// "apiKey" or "oauth2". +type SecurityScheme_Type int32 + +const ( + SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 + SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 + SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 + SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 +) + +// Enum value maps for SecurityScheme_Type. +var ( + SecurityScheme_Type_name = map[int32]string{ + 0: "TYPE_INVALID", + 1: "TYPE_BASIC", + 2: "TYPE_API_KEY", + 3: "TYPE_OAUTH2", + } + SecurityScheme_Type_value = map[string]int32{ + "TYPE_INVALID": 0, + "TYPE_BASIC": 1, + "TYPE_API_KEY": 2, + "TYPE_OAUTH2": 3, + } +) + +func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { + p := new(SecurityScheme_Type) + *p = x + return p +} + +func (x SecurityScheme_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() +} + +func (SecurityScheme_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] +} + +func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// The location of the API key. Valid values are "query" or "header". +type SecurityScheme_In int32 + +const ( + SecurityScheme_IN_INVALID SecurityScheme_In = 0 + SecurityScheme_IN_QUERY SecurityScheme_In = 1 + SecurityScheme_IN_HEADER SecurityScheme_In = 2 +) + +// Enum value maps for SecurityScheme_In. +var ( + SecurityScheme_In_name = map[int32]string{ + 0: "IN_INVALID", + 1: "IN_QUERY", + 2: "IN_HEADER", + } + SecurityScheme_In_value = map[string]int32{ + "IN_INVALID": 0, + "IN_QUERY": 1, + "IN_HEADER": 2, + } +) + +func (x SecurityScheme_In) Enum() *SecurityScheme_In { + p := new(SecurityScheme_In) + *p = x + return p +} + +func (x SecurityScheme_In) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() +} + +func (SecurityScheme_In) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] +} + +func (x SecurityScheme_In) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// The flow used by the OAuth2 security scheme. Valid values are +// "implicit", "password", "application" or "accessCode". +type SecurityScheme_Flow int32 + +const ( + SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 + SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 + SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 + SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 + SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 +) + +// Enum value maps for SecurityScheme_Flow. +var ( + SecurityScheme_Flow_name = map[int32]string{ + 0: "FLOW_INVALID", + 1: "FLOW_IMPLICIT", + 2: "FLOW_PASSWORD", + 3: "FLOW_APPLICATION", + 4: "FLOW_ACCESS_CODE", + } + SecurityScheme_Flow_value = map[string]int32{ + "FLOW_INVALID": 0, + "FLOW_IMPLICIT": 1, + "FLOW_PASSWORD": 2, + "FLOW_APPLICATION": 3, + "FLOW_ACCESS_CODE": 4, + } +) + +func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { + p := new(SecurityScheme_Flow) + *p = x + return p +} + +func (x SecurityScheme_Flow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5].Descriptor() +} + +func (SecurityScheme_Flow) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5] +} + +func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +type Swagger struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` + xxx_hidden_Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + xxx_hidden_Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` + xxx_hidden_BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` + xxx_hidden_Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + xxx_hidden_Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + xxx_hidden_Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + xxx_hidden_Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` + xxx_hidden_Security *[]*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + xxx_hidden_Tags *[]*Tag `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"` + xxx_hidden_ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Swagger) Reset() { + *x = Swagger{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Swagger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Swagger) ProtoMessage() {} + +func (x *Swagger) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Swagger) GetSwagger() string { + if x != nil { + return x.xxx_hidden_Swagger + } + return "" +} + +func (x *Swagger) GetInfo() *Info { + if x != nil { + return x.xxx_hidden_Info + } + return nil +} + +func (x *Swagger) GetHost() string { + if x != nil { + return x.xxx_hidden_Host + } + return "" +} + +func (x *Swagger) GetBasePath() string { + if x != nil { + return x.xxx_hidden_BasePath + } + return "" +} + +func (x *Swagger) GetSchemes() []Scheme { + if x != nil { + return x.xxx_hidden_Schemes + } + return nil +} + +func (x *Swagger) GetConsumes() []string { + if x != nil { + return x.xxx_hidden_Consumes + } + return nil +} + +func (x *Swagger) GetProduces() []string { + if x != nil { + return x.xxx_hidden_Produces + } + return nil +} + +func (x *Swagger) GetResponses() map[string]*Response { + if x != nil { + return x.xxx_hidden_Responses + } + return nil +} + +func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { + if x != nil { + return x.xxx_hidden_SecurityDefinitions + } + return nil +} + +func (x *Swagger) GetSecurity() []*SecurityRequirement { + if x != nil { + if x.xxx_hidden_Security != nil { + return *x.xxx_hidden_Security + } + } + return nil +} + +func (x *Swagger) GetTags() []*Tag { + if x != nil { + if x.xxx_hidden_Tags != nil { + return *x.xxx_hidden_Tags + } + } + return nil +} + +func (x *Swagger) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.xxx_hidden_ExternalDocs + } + return nil +} + +func (x *Swagger) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *Swagger) SetSwagger(v string) { + x.xxx_hidden_Swagger = v +} + +func (x *Swagger) SetInfo(v *Info) { + x.xxx_hidden_Info = v +} + +func (x *Swagger) SetHost(v string) { + x.xxx_hidden_Host = v +} + +func (x *Swagger) SetBasePath(v string) { + x.xxx_hidden_BasePath = v +} + +func (x *Swagger) SetSchemes(v []Scheme) { + x.xxx_hidden_Schemes = v +} + +func (x *Swagger) SetConsumes(v []string) { + x.xxx_hidden_Consumes = v +} + +func (x *Swagger) SetProduces(v []string) { + x.xxx_hidden_Produces = v +} + +func (x *Swagger) SetResponses(v map[string]*Response) { + x.xxx_hidden_Responses = v +} + +func (x *Swagger) SetSecurityDefinitions(v *SecurityDefinitions) { + x.xxx_hidden_SecurityDefinitions = v +} + +func (x *Swagger) SetSecurity(v []*SecurityRequirement) { + x.xxx_hidden_Security = &v +} + +func (x *Swagger) SetTags(v []*Tag) { + x.xxx_hidden_Tags = &v +} + +func (x *Swagger) SetExternalDocs(v *ExternalDocumentation) { + x.xxx_hidden_ExternalDocs = v +} + +func (x *Swagger) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *Swagger) HasInfo() bool { + if x == nil { + return false + } + return x.xxx_hidden_Info != nil +} + +func (x *Swagger) HasSecurityDefinitions() bool { + if x == nil { + return false + } + return x.xxx_hidden_SecurityDefinitions != nil +} + +func (x *Swagger) HasExternalDocs() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExternalDocs != nil +} + +func (x *Swagger) ClearInfo() { + x.xxx_hidden_Info = nil +} + +func (x *Swagger) ClearSecurityDefinitions() { + x.xxx_hidden_SecurityDefinitions = nil +} + +func (x *Swagger) ClearExternalDocs() { + x.xxx_hidden_ExternalDocs = nil +} + +type Swagger_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + Swagger string + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info *Info + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + Host string + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + BasePath string + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + Schemes []Scheme + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Consumes []string + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Produces []string + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + Responses map[string]*Response + // Security scheme definitions that can be used across the specification. + SecurityDefinitions *SecurityDefinitions + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + Security []*SecurityRequirement + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []*Tag + // Additional external documentation. + ExternalDocs *ExternalDocumentation + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Swagger_builder) Build() *Swagger { + m0 := &Swagger{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Swagger = b.Swagger + x.xxx_hidden_Info = b.Info + x.xxx_hidden_Host = b.Host + x.xxx_hidden_BasePath = b.BasePath + x.xxx_hidden_Schemes = b.Schemes + x.xxx_hidden_Consumes = b.Consumes + x.xxx_hidden_Produces = b.Produces + x.xxx_hidden_Responses = b.Responses + x.xxx_hidden_SecurityDefinitions = b.SecurityDefinitions + x.xxx_hidden_Security = &b.Security + x.xxx_hidden_Tags = &b.Tags + x.xxx_hidden_ExternalDocs = b.ExternalDocs + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +type Operation struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + xxx_hidden_Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + xxx_hidden_Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + xxx_hidden_OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + xxx_hidden_Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + xxx_hidden_Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + xxx_hidden_Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + xxx_hidden_Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + xxx_hidden_Security *[]*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Parameters *Parameters `protobuf:"bytes,14,opt,name=parameters,proto3" json:"parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Operation) Reset() { + *x = Operation{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Operation) GetTags() []string { + if x != nil { + return x.xxx_hidden_Tags + } + return nil +} + +func (x *Operation) GetSummary() string { + if x != nil { + return x.xxx_hidden_Summary + } + return "" +} + +func (x *Operation) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *Operation) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.xxx_hidden_ExternalDocs + } + return nil +} + +func (x *Operation) GetOperationId() string { + if x != nil { + return x.xxx_hidden_OperationId + } + return "" +} + +func (x *Operation) GetConsumes() []string { + if x != nil { + return x.xxx_hidden_Consumes + } + return nil +} + +func (x *Operation) GetProduces() []string { + if x != nil { + return x.xxx_hidden_Produces + } + return nil +} + +func (x *Operation) GetResponses() map[string]*Response { + if x != nil { + return x.xxx_hidden_Responses + } + return nil +} + +func (x *Operation) GetSchemes() []Scheme { + if x != nil { + return x.xxx_hidden_Schemes + } + return nil +} + +func (x *Operation) GetDeprecated() bool { + if x != nil { + return x.xxx_hidden_Deprecated + } + return false +} + +func (x *Operation) GetSecurity() []*SecurityRequirement { + if x != nil { + if x.xxx_hidden_Security != nil { + return *x.xxx_hidden_Security + } + } + return nil +} + +func (x *Operation) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *Operation) GetParameters() *Parameters { + if x != nil { + return x.xxx_hidden_Parameters + } + return nil +} + +func (x *Operation) SetTags(v []string) { + x.xxx_hidden_Tags = v +} + +func (x *Operation) SetSummary(v string) { + x.xxx_hidden_Summary = v +} + +func (x *Operation) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *Operation) SetExternalDocs(v *ExternalDocumentation) { + x.xxx_hidden_ExternalDocs = v +} + +func (x *Operation) SetOperationId(v string) { + x.xxx_hidden_OperationId = v +} + +func (x *Operation) SetConsumes(v []string) { + x.xxx_hidden_Consumes = v +} + +func (x *Operation) SetProduces(v []string) { + x.xxx_hidden_Produces = v +} + +func (x *Operation) SetResponses(v map[string]*Response) { + x.xxx_hidden_Responses = v +} + +func (x *Operation) SetSchemes(v []Scheme) { + x.xxx_hidden_Schemes = v +} + +func (x *Operation) SetDeprecated(v bool) { + x.xxx_hidden_Deprecated = v +} + +func (x *Operation) SetSecurity(v []*SecurityRequirement) { + x.xxx_hidden_Security = &v +} + +func (x *Operation) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *Operation) SetParameters(v *Parameters) { + x.xxx_hidden_Parameters = v +} + +func (x *Operation) HasExternalDocs() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExternalDocs != nil +} + +func (x *Operation) HasParameters() bool { + if x == nil { + return false + } + return x.xxx_hidden_Parameters != nil +} + +func (x *Operation) ClearExternalDocs() { + x.xxx_hidden_ExternalDocs = nil +} + +func (x *Operation) ClearParameters() { + x.xxx_hidden_Parameters = nil +} + +type Operation_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []string + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + Summary string + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + Description string + // Additional external documentation for this operation. + ExternalDocs *ExternalDocumentation + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + OperationId string + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Consumes []string + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Produces []string + // The list of possible responses as they are returned from executing this + // operation. + Responses map[string]*Response + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + Schemes []Scheme + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + Deprecated bool + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + Security []*SecurityRequirement + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters *Parameters +} + +func (b0 Operation_builder) Build() *Operation { + m0 := &Operation{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Tags = b.Tags + x.xxx_hidden_Summary = b.Summary + x.xxx_hidden_Description = b.Description + x.xxx_hidden_ExternalDocs = b.ExternalDocs + x.xxx_hidden_OperationId = b.OperationId + x.xxx_hidden_Consumes = b.Consumes + x.xxx_hidden_Produces = b.Produces + x.xxx_hidden_Responses = b.Responses + x.xxx_hidden_Schemes = b.Schemes + x.xxx_hidden_Deprecated = b.Deprecated + x.xxx_hidden_Security = &b.Security + x.xxx_hidden_Extensions = b.Extensions + x.xxx_hidden_Parameters = b.Parameters + return m0 +} + +// `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +// allow header parameters to be set here since we do not want users specifying custom non-header +// parameters beyond those inferred from the Protobuf schema. +// See: https://swagger.io/specification/v2/#parameter-object +type Parameters struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Headers *[]*HeaderParameter `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Parameters) Reset() { + *x = Parameters{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Parameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameters) ProtoMessage() {} + +func (x *Parameters) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Parameters) GetHeaders() []*HeaderParameter { + if x != nil { + if x.xxx_hidden_Headers != nil { + return *x.xxx_hidden_Headers + } + } + return nil +} + +func (x *Parameters) SetHeaders(v []*HeaderParameter) { + x.xxx_hidden_Headers = &v +} + +type Parameters_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + Headers []*HeaderParameter +} + +func (b0 Parameters_builder) Build() *Parameters { + m0 := &Parameters{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Headers = &b.Headers + return m0 +} + +// `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object +type HeaderParameter struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + xxx_hidden_Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Type HeaderParameter_Type `protobuf:"varint,3,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter_Type" json:"type,omitempty"` + xxx_hidden_Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"` + xxx_hidden_Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HeaderParameter) Reset() { + *x = HeaderParameter{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HeaderParameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderParameter) ProtoMessage() {} + +func (x *HeaderParameter) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *HeaderParameter) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *HeaderParameter) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *HeaderParameter) GetType() HeaderParameter_Type { + if x != nil { + return x.xxx_hidden_Type + } + return HeaderParameter_UNKNOWN +} + +func (x *HeaderParameter) GetFormat() string { + if x != nil { + return x.xxx_hidden_Format + } + return "" +} + +func (x *HeaderParameter) GetRequired() bool { + if x != nil { + return x.xxx_hidden_Required + } + return false +} + +func (x *HeaderParameter) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *HeaderParameter) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *HeaderParameter) SetType(v HeaderParameter_Type) { + x.xxx_hidden_Type = v +} + +func (x *HeaderParameter) SetFormat(v string) { + x.xxx_hidden_Format = v +} + +func (x *HeaderParameter) SetRequired(v bool) { + x.xxx_hidden_Required = v +} + +type HeaderParameter_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Name` is the header name. + Name string + // `Description` is a short description of the header. + Description string + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type HeaderParameter_Type + // `Format` The extending format for the previously mentioned type. + Format string + // `Required` indicates if the header is optional + Required bool +} + +func (b0 HeaderParameter_builder) Build() *HeaderParameter { + m0 := &HeaderParameter{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Type = b.Type + x.xxx_hidden_Format = b.Format + x.xxx_hidden_Required = b.Required + return m0 +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +type Header struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + xxx_hidden_Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` + xxx_hidden_Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` + xxx_hidden_Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Header) Reset() { + *x = Header{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Header) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *Header) GetType() string { + if x != nil { + return x.xxx_hidden_Type + } + return "" +} + +func (x *Header) GetFormat() string { + if x != nil { + return x.xxx_hidden_Format + } + return "" +} + +func (x *Header) GetDefault() string { + if x != nil { + return x.xxx_hidden_Default + } + return "" +} + +func (x *Header) GetPattern() string { + if x != nil { + return x.xxx_hidden_Pattern + } + return "" +} + +func (x *Header) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *Header) SetType(v string) { + x.xxx_hidden_Type = v +} + +func (x *Header) SetFormat(v string) { + x.xxx_hidden_Format = v +} + +func (x *Header) SetDefault(v string) { + x.xxx_hidden_Default = v +} + +func (x *Header) SetPattern(v string) { + x.xxx_hidden_Pattern = v +} + +type Header_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Description` is a short description of the header. + Description string + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + Type string + // `Format` The extending format for the previously mentioned type. + Format string + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + Default string + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + Pattern string +} + +func (b0 Header_builder) Build() *Header { + m0 := &Header{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Type = b.Type + x.xxx_hidden_Format = b.Format + x.xxx_hidden_Default = b.Default + x.xxx_hidden_Pattern = b.Pattern + return m0 +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +type Response struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + xxx_hidden_Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + 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_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Response) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *Response) GetSchema() *Schema { + if x != nil { + return x.xxx_hidden_Schema + } + return nil +} + +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.xxx_hidden_Headers + } + return nil +} + +func (x *Response) GetExamples() map[string]string { + if x != nil { + return x.xxx_hidden_Examples + } + return nil +} + +func (x *Response) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *Response) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *Response) SetSchema(v *Schema) { + x.xxx_hidden_Schema = v +} + +func (x *Response) SetHeaders(v map[string]*Header) { + x.xxx_hidden_Headers = v +} + +func (x *Response) SetExamples(v map[string]string) { + x.xxx_hidden_Examples = v +} + +func (x *Response) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *Response) HasSchema() bool { + if x == nil { + return false + } + return x.xxx_hidden_Schema != nil +} + +func (x *Response) ClearSchema() { + x.xxx_hidden_Schema = nil +} + +type Response_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + Description string + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema *Schema + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + Headers map[string]*Header + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + Examples map[string]string + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Response_builder) Build() *Response { + m0 := &Response{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Schema = b.Schema + x.xxx_hidden_Headers = b.Headers + x.xxx_hidden_Examples = b.Examples + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// ... +// }; +type Info struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + xxx_hidden_Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + xxx_hidden_Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` + xxx_hidden_License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` + xxx_hidden_Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Info) Reset() { + *x = Info{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Info) GetTitle() string { + if x != nil { + return x.xxx_hidden_Title + } + return "" +} + +func (x *Info) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *Info) GetTermsOfService() string { + if x != nil { + return x.xxx_hidden_TermsOfService + } + return "" +} + +func (x *Info) GetContact() *Contact { + if x != nil { + return x.xxx_hidden_Contact + } + return nil +} + +func (x *Info) GetLicense() *License { + if x != nil { + return x.xxx_hidden_License + } + return nil +} + +func (x *Info) GetVersion() string { + if x != nil { + return x.xxx_hidden_Version + } + return "" +} + +func (x *Info) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *Info) SetTitle(v string) { + x.xxx_hidden_Title = v +} + +func (x *Info) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *Info) SetTermsOfService(v string) { + x.xxx_hidden_TermsOfService = v +} + +func (x *Info) SetContact(v *Contact) { + x.xxx_hidden_Contact = v +} + +func (x *Info) SetLicense(v *License) { + x.xxx_hidden_License = v +} + +func (x *Info) SetVersion(v string) { + x.xxx_hidden_Version = v +} + +func (x *Info) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *Info) HasContact() bool { + if x == nil { + return false + } + return x.xxx_hidden_Contact != nil +} + +func (x *Info) HasLicense() bool { + if x == nil { + return false + } + return x.xxx_hidden_License != nil +} + +func (x *Info) ClearContact() { + x.xxx_hidden_Contact = nil +} + +func (x *Info) ClearLicense() { + x.xxx_hidden_License = nil +} + +type Info_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The title of the application. + Title string + // A short description of the application. GFM syntax can be used for rich + // text representation. + Description string + // The Terms of Service for the API. + TermsOfService string + // The contact information for the exposed API. + Contact *Contact + // The license information for the exposed API. + License *License + // Provides the version of the application API (not to be confused + // with the specification version). + Version string + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Info_builder) Build() *Info { + m0 := &Info{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Title = b.Title + x.xxx_hidden_Description = b.Description + x.xxx_hidden_TermsOfService = b.TermsOfService + x.xxx_hidden_Contact = b.Contact + x.xxx_hidden_License = b.License + x.xxx_hidden_Version = b.Version + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +type Contact struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + xxx_hidden_Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + xxx_hidden_Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Contact) Reset() { + *x = Contact{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *Contact) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *Contact) GetUrl() string { + if x != nil { + return x.xxx_hidden_Url + } + return "" +} + +func (x *Contact) GetEmail() string { + if x != nil { + return x.xxx_hidden_Email + } + return "" +} + +func (x *Contact) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *Contact) SetUrl(v string) { + x.xxx_hidden_Url = v +} + +func (x *Contact) SetEmail(v string) { + x.xxx_hidden_Email = v +} + +type Contact_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The identifying name of the contact person/organization. + Name string + // The URL pointing to the contact information. MUST be in the format of a + // URL. + Url string + // The email address of the contact person/organization. MUST be in the format + // of an email address. + Email string +} + +func (b0 Contact_builder) Build() *Contact { + m0 := &Contact{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Url = b.Url + x.xxx_hidden_Email = b.Email + return m0 +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// ... +// }; +// ... +// }; +type License struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + xxx_hidden_Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *License) Reset() { + *x = License{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *License) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*License) ProtoMessage() {} + +func (x *License) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *License) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *License) GetUrl() string { + if x != nil { + return x.xxx_hidden_Url + } + return "" +} + +func (x *License) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *License) SetUrl(v string) { + x.xxx_hidden_Url = v +} + +type License_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The license name used for the API. + Name string + // A URL to the license used for the API. MUST be in the format of a URL. + Url string +} + +func (b0 License_builder) Build() *License { + m0 := &License{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Url = b.Url + return m0 +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +type ExternalDocumentation struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalDocumentation) Reset() { + *x = ExternalDocumentation{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalDocumentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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) +} + +func (x *ExternalDocumentation) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *ExternalDocumentation) GetUrl() string { + if x != nil { + return x.xxx_hidden_Url + } + return "" +} + +func (x *ExternalDocumentation) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *ExternalDocumentation) SetUrl(v string) { + x.xxx_hidden_Url = v +} + +type ExternalDocumentation_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + Description string + // The URL for the target documentation. Value MUST be in the format + // of a URL. + Url string +} + +func (b0 ExternalDocumentation_builder) Build() *ExternalDocumentation { + m0 := &ExternalDocumentation{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Url = b.Url + return m0 +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +type Schema struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` + xxx_hidden_Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` + xxx_hidden_ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + xxx_hidden_ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + xxx_hidden_Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Schema) Reset() { + *x = Schema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Schema) GetJsonSchema() *JSONSchema { + if x != nil { + return x.xxx_hidden_JsonSchema + } + return nil +} + +func (x *Schema) GetDiscriminator() string { + if x != nil { + return x.xxx_hidden_Discriminator + } + return "" +} + +func (x *Schema) GetReadOnly() bool { + if x != nil { + return x.xxx_hidden_ReadOnly + } + return false +} + +func (x *Schema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.xxx_hidden_ExternalDocs + } + return nil +} + +func (x *Schema) GetExample() string { + if x != nil { + return x.xxx_hidden_Example + } + return "" +} + +func (x *Schema) SetJsonSchema(v *JSONSchema) { + x.xxx_hidden_JsonSchema = v +} + +func (x *Schema) SetDiscriminator(v string) { + x.xxx_hidden_Discriminator = v +} + +func (x *Schema) SetReadOnly(v bool) { + x.xxx_hidden_ReadOnly = v +} + +func (x *Schema) SetExternalDocs(v *ExternalDocumentation) { + x.xxx_hidden_ExternalDocs = v +} + +func (x *Schema) SetExample(v string) { + x.xxx_hidden_Example = v +} + +func (x *Schema) HasJsonSchema() bool { + if x == nil { + return false + } + return x.xxx_hidden_JsonSchema != nil +} + +func (x *Schema) HasExternalDocs() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExternalDocs != nil +} + +func (x *Schema) ClearJsonSchema() { + x.xxx_hidden_JsonSchema = nil +} + +func (x *Schema) ClearExternalDocs() { + x.xxx_hidden_ExternalDocs = nil +} + +type Schema_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + JsonSchema *JSONSchema + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + Discriminator string + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + ReadOnly bool + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + Example string +} + +func (b0 Schema_builder) Build() *Schema { + m0 := &Schema{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_JsonSchema = b.JsonSchema + x.xxx_hidden_Discriminator = b.Discriminator + x.xxx_hidden_ReadOnly = b.ReadOnly + x.xxx_hidden_ExternalDocs = b.ExternalDocs + x.xxx_hidden_Example = b.Example + return m0 +} + +// `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. +// Only fields that are applicable to Enums are included +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = { +// ... +// title: "MyEnum"; +// description:"This is my nice enum"; +// example: "ZERO"; +// required: true; +// ... +// }; +type EnumSchema struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"` + xxx_hidden_Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + xxx_hidden_Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + xxx_hidden_ReadOnly bool `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + xxx_hidden_ExternalDocs *ExternalDocumentation `protobuf:"bytes,6,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + xxx_hidden_Example string `protobuf:"bytes,7,opt,name=example,proto3" json:"example,omitempty"` + xxx_hidden_Ref string `protobuf:"bytes,8,opt,name=ref,proto3" json:"ref,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumSchema) Reset() { + *x = EnumSchema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumSchema) ProtoMessage() {} + +func (x *EnumSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *EnumSchema) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *EnumSchema) GetDefault() string { + if x != nil { + return x.xxx_hidden_Default + } + return "" +} + +func (x *EnumSchema) GetTitle() string { + if x != nil { + return x.xxx_hidden_Title + } + return "" +} + +func (x *EnumSchema) GetRequired() bool { + if x != nil { + return x.xxx_hidden_Required + } + return false +} + +func (x *EnumSchema) GetReadOnly() bool { + if x != nil { + return x.xxx_hidden_ReadOnly + } + return false +} + +func (x *EnumSchema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.xxx_hidden_ExternalDocs + } + return nil +} + +func (x *EnumSchema) GetExample() string { + if x != nil { + return x.xxx_hidden_Example + } + return "" +} + +func (x *EnumSchema) GetRef() string { + if x != nil { + return x.xxx_hidden_Ref + } + return "" +} + +func (x *EnumSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *EnumSchema) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *EnumSchema) SetDefault(v string) { + x.xxx_hidden_Default = v +} + +func (x *EnumSchema) SetTitle(v string) { + x.xxx_hidden_Title = v +} + +func (x *EnumSchema) SetRequired(v bool) { + x.xxx_hidden_Required = v +} + +func (x *EnumSchema) SetReadOnly(v bool) { + x.xxx_hidden_ReadOnly = v +} + +func (x *EnumSchema) SetExternalDocs(v *ExternalDocumentation) { + x.xxx_hidden_ExternalDocs = v +} + +func (x *EnumSchema) SetExample(v string) { + x.xxx_hidden_Example = v +} + +func (x *EnumSchema) SetRef(v string) { + x.xxx_hidden_Ref = v +} + +func (x *EnumSchema) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *EnumSchema) HasExternalDocs() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExternalDocs != nil +} + +func (x *EnumSchema) ClearExternalDocs() { + x.xxx_hidden_ExternalDocs = nil +} + +type EnumSchema_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A short description of the schema. + Description string + Default string + // The title of the schema. + Title string + Required bool + ReadOnly bool + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation + Example string + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 EnumSchema_builder) Build() *EnumSchema { + m0 := &EnumSchema{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Default = b.Default + x.xxx_hidden_Title = b.Title + x.xxx_hidden_Required = b.Required + x.xxx_hidden_ReadOnly = b.ReadOnly + x.xxx_hidden_ExternalDocs = b.ExternalDocs + x.xxx_hidden_Example = b.Example + x.xxx_hidden_Ref = b.Ref + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// description: "The unique identifier of the simple message." +// }]; +// } +type JSONSchema struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + xxx_hidden_Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + xxx_hidden_Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` + xxx_hidden_ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + xxx_hidden_Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` + xxx_hidden_MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + xxx_hidden_Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + xxx_hidden_ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + xxx_hidden_Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + xxx_hidden_ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + xxx_hidden_MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + xxx_hidden_MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + xxx_hidden_Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + xxx_hidden_MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + xxx_hidden_MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + xxx_hidden_UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + xxx_hidden_MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` + xxx_hidden_MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` + xxx_hidden_Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` + xxx_hidden_Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` + xxx_hidden_Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` + xxx_hidden_Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` + xxx_hidden_Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` + xxx_hidden_FieldConfiguration *JSONSchema_FieldConfiguration `protobuf:"bytes,1001,opt,name=field_configuration,json=fieldConfiguration,proto3" json:"field_configuration,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,48,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JSONSchema) Reset() { + *x = JSONSchema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JSONSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema) ProtoMessage() {} + +func (x *JSONSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *JSONSchema) GetRef() string { + if x != nil { + return x.xxx_hidden_Ref + } + return "" +} + +func (x *JSONSchema) GetTitle() string { + if x != nil { + return x.xxx_hidden_Title + } + return "" +} + +func (x *JSONSchema) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *JSONSchema) GetDefault() string { + if x != nil { + return x.xxx_hidden_Default + } + return "" +} + +func (x *JSONSchema) GetReadOnly() bool { + if x != nil { + return x.xxx_hidden_ReadOnly + } + return false +} + +func (x *JSONSchema) GetExample() string { + if x != nil { + return x.xxx_hidden_Example + } + return "" +} + +func (x *JSONSchema) GetMultipleOf() float64 { + if x != nil { + return x.xxx_hidden_MultipleOf + } + return 0 +} + +func (x *JSONSchema) GetMaximum() float64 { + if x != nil { + return x.xxx_hidden_Maximum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.xxx_hidden_ExclusiveMaximum + } + return false +} + +func (x *JSONSchema) GetMinimum() float64 { + if x != nil { + return x.xxx_hidden_Minimum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.xxx_hidden_ExclusiveMinimum + } + return false +} + +func (x *JSONSchema) GetMaxLength() uint64 { + if x != nil { + return x.xxx_hidden_MaxLength + } + return 0 +} + +func (x *JSONSchema) GetMinLength() uint64 { + if x != nil { + return x.xxx_hidden_MinLength + } + return 0 +} + +func (x *JSONSchema) GetPattern() string { + if x != nil { + return x.xxx_hidden_Pattern + } + return "" +} + +func (x *JSONSchema) GetMaxItems() uint64 { + if x != nil { + return x.xxx_hidden_MaxItems + } + return 0 +} + +func (x *JSONSchema) GetMinItems() uint64 { + if x != nil { + return x.xxx_hidden_MinItems + } + return 0 +} + +func (x *JSONSchema) GetUniqueItems() bool { + if x != nil { + return x.xxx_hidden_UniqueItems + } + return false +} + +func (x *JSONSchema) GetMaxProperties() uint64 { + if x != nil { + return x.xxx_hidden_MaxProperties + } + return 0 +} + +func (x *JSONSchema) GetMinProperties() uint64 { + if x != nil { + return x.xxx_hidden_MinProperties + } + return 0 +} + +func (x *JSONSchema) GetRequired() []string { + if x != nil { + return x.xxx_hidden_Required + } + return nil +} + +func (x *JSONSchema) GetArray() []string { + if x != nil { + return x.xxx_hidden_Array + } + return nil +} + +func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { + if x != nil { + return x.xxx_hidden_Type + } + return nil +} + +func (x *JSONSchema) GetFormat() string { + if x != nil { + return x.xxx_hidden_Format + } + return "" +} + +func (x *JSONSchema) GetEnum() []string { + if x != nil { + return x.xxx_hidden_Enum + } + return nil +} + +func (x *JSONSchema) GetFieldConfiguration() *JSONSchema_FieldConfiguration { + if x != nil { + return x.xxx_hidden_FieldConfiguration + } + return nil +} + +func (x *JSONSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *JSONSchema) SetRef(v string) { + x.xxx_hidden_Ref = v +} + +func (x *JSONSchema) SetTitle(v string) { + x.xxx_hidden_Title = v +} + +func (x *JSONSchema) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *JSONSchema) SetDefault(v string) { + x.xxx_hidden_Default = v +} + +func (x *JSONSchema) SetReadOnly(v bool) { + x.xxx_hidden_ReadOnly = v +} + +func (x *JSONSchema) SetExample(v string) { + x.xxx_hidden_Example = v +} + +func (x *JSONSchema) SetMultipleOf(v float64) { + x.xxx_hidden_MultipleOf = v +} + +func (x *JSONSchema) SetMaximum(v float64) { + x.xxx_hidden_Maximum = v +} + +func (x *JSONSchema) SetExclusiveMaximum(v bool) { + x.xxx_hidden_ExclusiveMaximum = v +} + +func (x *JSONSchema) SetMinimum(v float64) { + x.xxx_hidden_Minimum = v +} + +func (x *JSONSchema) SetExclusiveMinimum(v bool) { + x.xxx_hidden_ExclusiveMinimum = v +} + +func (x *JSONSchema) SetMaxLength(v uint64) { + x.xxx_hidden_MaxLength = v +} + +func (x *JSONSchema) SetMinLength(v uint64) { + x.xxx_hidden_MinLength = v +} + +func (x *JSONSchema) SetPattern(v string) { + x.xxx_hidden_Pattern = v +} + +func (x *JSONSchema) SetMaxItems(v uint64) { + x.xxx_hidden_MaxItems = v +} + +func (x *JSONSchema) SetMinItems(v uint64) { + x.xxx_hidden_MinItems = v +} + +func (x *JSONSchema) SetUniqueItems(v bool) { + x.xxx_hidden_UniqueItems = v +} + +func (x *JSONSchema) SetMaxProperties(v uint64) { + x.xxx_hidden_MaxProperties = v +} + +func (x *JSONSchema) SetMinProperties(v uint64) { + x.xxx_hidden_MinProperties = v +} + +func (x *JSONSchema) SetRequired(v []string) { + x.xxx_hidden_Required = v +} + +func (x *JSONSchema) SetArray(v []string) { + x.xxx_hidden_Array = v +} + +func (x *JSONSchema) SetType(v []JSONSchema_JSONSchemaSimpleTypes) { + x.xxx_hidden_Type = v +} + +func (x *JSONSchema) SetFormat(v string) { + x.xxx_hidden_Format = v +} + +func (x *JSONSchema) SetEnum(v []string) { + x.xxx_hidden_Enum = v +} + +func (x *JSONSchema) SetFieldConfiguration(v *JSONSchema_FieldConfiguration) { + x.xxx_hidden_FieldConfiguration = v +} + +func (x *JSONSchema) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *JSONSchema) HasFieldConfiguration() bool { + if x == nil { + return false + } + return x.xxx_hidden_FieldConfiguration != nil +} + +func (x *JSONSchema) ClearFieldConfiguration() { + x.xxx_hidden_FieldConfiguration = nil +} + +type JSONSchema_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string + // The title of the schema. + Title string + // A short description of the schema. + Description string + Default string + ReadOnly bool + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + Example string + MultipleOf float64 + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + Maximum float64 + ExclusiveMaximum bool + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + Minimum float64 + ExclusiveMinimum bool + MaxLength uint64 + MinLength uint64 + Pattern string + MaxItems uint64 + MinItems uint64 + UniqueItems bool + MaxProperties uint64 + MinProperties uint64 + Required []string + // Items in 'array' must be unique. + Array []string + Type []JSONSchema_JSONSchemaSimpleTypes + // `Format` + Format string + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + Enum []string + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration *JSONSchema_FieldConfiguration + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 JSONSchema_builder) Build() *JSONSchema { + m0 := &JSONSchema{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Ref = b.Ref + x.xxx_hidden_Title = b.Title + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Default = b.Default + x.xxx_hidden_ReadOnly = b.ReadOnly + x.xxx_hidden_Example = b.Example + x.xxx_hidden_MultipleOf = b.MultipleOf + x.xxx_hidden_Maximum = b.Maximum + x.xxx_hidden_ExclusiveMaximum = b.ExclusiveMaximum + x.xxx_hidden_Minimum = b.Minimum + x.xxx_hidden_ExclusiveMinimum = b.ExclusiveMinimum + x.xxx_hidden_MaxLength = b.MaxLength + x.xxx_hidden_MinLength = b.MinLength + x.xxx_hidden_Pattern = b.Pattern + x.xxx_hidden_MaxItems = b.MaxItems + x.xxx_hidden_MinItems = b.MinItems + x.xxx_hidden_UniqueItems = b.UniqueItems + x.xxx_hidden_MaxProperties = b.MaxProperties + x.xxx_hidden_MinProperties = b.MinProperties + x.xxx_hidden_Required = b.Required + x.xxx_hidden_Array = b.Array + x.xxx_hidden_Type = b.Type + x.xxx_hidden_Format = b.Format + x.xxx_hidden_Enum = b.Enum + x.xxx_hidden_FieldConfiguration = b.FieldConfiguration + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +type Tag struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + xxx_hidden_Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Tag) Reset() { + *x = Tag{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Tag) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *Tag) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *Tag) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.xxx_hidden_ExternalDocs + } + return nil +} + +func (x *Tag) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *Tag) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *Tag) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *Tag) SetExternalDocs(v *ExternalDocumentation) { + x.xxx_hidden_ExternalDocs = v +} + +func (x *Tag) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *Tag) HasExternalDocs() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExternalDocs != nil +} + +func (x *Tag) ClearExternalDocs() { + x.xxx_hidden_ExternalDocs = nil +} + +type Tag_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + Name string + // A short description for the tag. GFM syntax can be used for rich text + // representation. + Description string + // Additional external documentation for this tag. + ExternalDocs *ExternalDocumentation + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 Tag_builder) Build() *Tag { + m0 := &Tag{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Description = b.Description + x.xxx_hidden_ExternalDocs = b.ExternalDocs + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +type SecurityDefinitions struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityDefinitions) Reset() { + *x = SecurityDefinitions{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityDefinitions) ProtoMessage() {} + +func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { + if x != nil { + return x.xxx_hidden_Security + } + return nil +} + +func (x *SecurityDefinitions) SetSecurity(v map[string]*SecurityScheme) { + x.xxx_hidden_Security = v +} + +type SecurityDefinitions_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + Security map[string]*SecurityScheme +} + +func (b0 SecurityDefinitions_builder) Build() *SecurityDefinitions { + m0 := &SecurityDefinitions{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Security = b.Security + return m0 +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +type SecurityScheme struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` + xxx_hidden_Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + xxx_hidden_Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + xxx_hidden_In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` + xxx_hidden_Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` + xxx_hidden_AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + xxx_hidden_TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + xxx_hidden_Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` + xxx_hidden_Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityScheme) Reset() { + *x = SecurityScheme{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityScheme) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityScheme) ProtoMessage() {} + +func (x *SecurityScheme) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityScheme) GetType() SecurityScheme_Type { + if x != nil { + return x.xxx_hidden_Type + } + return SecurityScheme_TYPE_INVALID +} + +func (x *SecurityScheme) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *SecurityScheme) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *SecurityScheme) GetIn() SecurityScheme_In { + if x != nil { + return x.xxx_hidden_In + } + return SecurityScheme_IN_INVALID +} + +func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { + if x != nil { + return x.xxx_hidden_Flow + } + return SecurityScheme_FLOW_INVALID +} + +func (x *SecurityScheme) GetAuthorizationUrl() string { + if x != nil { + return x.xxx_hidden_AuthorizationUrl + } + return "" +} + +func (x *SecurityScheme) GetTokenUrl() string { + if x != nil { + return x.xxx_hidden_TokenUrl + } + return "" +} + +func (x *SecurityScheme) GetScopes() *Scopes { + if x != nil { + return x.xxx_hidden_Scopes + } + return nil +} + +func (x *SecurityScheme) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.xxx_hidden_Extensions + } + return nil +} + +func (x *SecurityScheme) SetType(v SecurityScheme_Type) { + x.xxx_hidden_Type = v +} + +func (x *SecurityScheme) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *SecurityScheme) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *SecurityScheme) SetIn(v SecurityScheme_In) { + x.xxx_hidden_In = v +} + +func (x *SecurityScheme) SetFlow(v SecurityScheme_Flow) { + x.xxx_hidden_Flow = v +} + +func (x *SecurityScheme) SetAuthorizationUrl(v string) { + x.xxx_hidden_AuthorizationUrl = v +} + +func (x *SecurityScheme) SetTokenUrl(v string) { + x.xxx_hidden_TokenUrl = v +} + +func (x *SecurityScheme) SetScopes(v *Scopes) { + x.xxx_hidden_Scopes = v +} + +func (x *SecurityScheme) SetExtensions(v map[string]*structpb.Value) { + x.xxx_hidden_Extensions = v +} + +func (x *SecurityScheme) HasScopes() bool { + if x == nil { + return false + } + return x.xxx_hidden_Scopes != nil +} + +func (x *SecurityScheme) ClearScopes() { + x.xxx_hidden_Scopes = nil +} + +type SecurityScheme_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type SecurityScheme_Type + // A short description for security scheme. + Description string + // The name of the header or query parameter to be used. + // Valid for apiKey. + Name string + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In SecurityScheme_In + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow SecurityScheme_Flow + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + AuthorizationUrl string + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + TokenUrl string + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes *Scopes + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value +} + +func (b0 SecurityScheme_builder) Build() *SecurityScheme { + m0 := &SecurityScheme{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Type = b.Type + x.xxx_hidden_Description = b.Description + x.xxx_hidden_Name = b.Name + x.xxx_hidden_In = b.In + x.xxx_hidden_Flow = b.Flow + x.xxx_hidden_AuthorizationUrl = b.AuthorizationUrl + x.xxx_hidden_TokenUrl = b.TokenUrl + x.xxx_hidden_Scopes = b.Scopes + x.xxx_hidden_Extensions = b.Extensions + return m0 +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +type SecurityRequirement struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityRequirement) Reset() { + *x = SecurityRequirement{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityRequirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement) ProtoMessage() {} + +func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { + if x != nil { + return x.xxx_hidden_SecurityRequirement + } + return nil +} + +func (x *SecurityRequirement) SetSecurityRequirement(v map[string]*SecurityRequirement_SecurityRequirementValue) { + x.xxx_hidden_SecurityRequirement = v +} + +type SecurityRequirement_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue +} + +func (b0 SecurityRequirement_builder) Build() *SecurityRequirement { + m0 := &SecurityRequirement{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_SecurityRequirement = b.SecurityRequirement + return m0 +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +type Scopes struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Scopes) Reset() { + *x = Scopes{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Scopes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scopes) ProtoMessage() {} + +func (x *Scopes) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Scopes) GetScope() map[string]string { + if x != nil { + return x.xxx_hidden_Scope + } + return nil +} + +func (x *Scopes) SetScope(v map[string]string) { + x.xxx_hidden_Scope = v +} + +type Scopes_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Maps between a name of a scope to a short description of it (as the value + // of the property). + Scope map[string]string +} + +func (b0 Scopes_builder) Build() *Scopes { + m0 := &Scopes{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Scope = b.Scope + return m0 +} + +// 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. +// These properties are not defined by OpenAPIv2, but they are used to control the generation. +type JSONSchema_FieldConfiguration struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_PathParamName string `protobuf:"bytes,47,opt,name=path_param_name,json=pathParamName,proto3" json:"path_param_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JSONSchema_FieldConfiguration) Reset() { + *x = JSONSchema_FieldConfiguration{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JSONSchema_FieldConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema_FieldConfiguration) ProtoMessage() {} + +func (x *JSONSchema_FieldConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *JSONSchema_FieldConfiguration) GetPathParamName() string { + if x != nil { + return x.xxx_hidden_PathParamName + } + return "" +} + +func (x *JSONSchema_FieldConfiguration) SetPathParamName(v string) { + x.xxx_hidden_PathParamName = v +} + +type JSONSchema_FieldConfiguration_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + PathParamName string +} + +func (b0 JSONSchema_FieldConfiguration_builder) Build() *JSONSchema_FieldConfiguration { + m0 := &JSONSchema_FieldConfiguration{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_PathParamName = b.PathParamName + return m0 +} + +// If the security scheme is of type "oauth2", then the value is a list of +// scope names required for the execution. For other security scheme types, +// the array MUST be empty. +type SecurityRequirement_SecurityRequirementValue struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityRequirement_SecurityRequirementValue) Reset() { + *x = SecurityRequirement_SecurityRequirementValue{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityRequirement_SecurityRequirementValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} + +func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { + if x != nil { + return x.xxx_hidden_Scope + } + return nil +} + +func (x *SecurityRequirement_SecurityRequirementValue) SetScope(v []string) { + x.xxx_hidden_Scope = v +} + +type SecurityRequirement_SecurityRequirementValue_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Scope []string +} + +func (b0 SecurityRequirement_SecurityRequirementValue_builder) Build() *SecurityRequirement_SecurityRequirementValue { + m0 := &SecurityRequirement_SecurityRequirementValue{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Scope = b.Scope + return m0 +} + +var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0xb3, 0x08, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xd6, 0x07, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x65, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, + 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x61, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x62, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x0f, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x53, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x45, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, + 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, + 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, + 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, + 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, + 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, + 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x49, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 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, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 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, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72, + 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 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, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x6a, + 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x22, 0xe8, 0x03, 0x0a, 0x0a, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 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, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, + 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd7, + 0x0a, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, + 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x69, 0x74, 0x6c, 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, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, + 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x7a, 0x0a, 0x13, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x12, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, + 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, + 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, + 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, + 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, + 0x4a, 0x04, 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, + 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0xd9, 0x02, 0x0a, 0x03, 0x54, 0x61, 0x67, + 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, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x5e, 0x0a, + 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, + 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, + 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, + 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, + 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, + 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, + 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, + 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, + 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, + 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, + 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, + 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, + 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, + 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, + 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, 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, 0x2a, 0x3b, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, + 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, + 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, + 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []any{ + (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme + (HeaderParameter_Type)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + (JSONSchema_JSONSchemaSimpleTypes)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + (SecurityScheme_Type)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + (SecurityScheme_In)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + (SecurityScheme_Flow)(0), // 5: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Parameters)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Parameters + (*HeaderParameter)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + (*Header)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Header + (*Response)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.Response + (*Info)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.Info + (*Contact)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Contact + (*License)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.License + (*ExternalDocumentation)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + (*Schema)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*EnumSchema)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + (*JSONSchema)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + (*Tag)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*SecurityDefinitions)(nil), // 20: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + (*SecurityScheme)(nil), // 21: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + (*SecurityRequirement)(nil), // 22: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + (*Scopes)(nil), // 23: grpc.gateway.protoc_gen_openapiv2.options.Scopes + nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + nil, // 30: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry + (*JSONSchema_FieldConfiguration)(nil), // 33: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + nil, // 34: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + nil, // 35: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + nil, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + nil, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + (*SecurityRequirement_SecurityRequirementValue)(nil), // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + nil, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + nil, // 40: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + (*structpb.Value)(nil), // 41: google.protobuf.Value +} +var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ + 12, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info + 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 24, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + 20, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + 22, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 19, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.tags:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 15, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 25, // 7: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + 15, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 26, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + 0, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 22, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 27, // 12: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + 8, // 13: grpc.gateway.protoc_gen_openapiv2.options.Operation.parameters:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Parameters + 9, // 14: grpc.gateway.protoc_gen_openapiv2.options.Parameters.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + 1, // 15: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + 16, // 16: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 28, // 17: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + 29, // 18: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + 30, // 19: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + 13, // 20: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact + 14, // 21: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License + 31, // 22: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + 18, // 23: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 15, // 24: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 15, // 25: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 32, // 26: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry + 2, // 27: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + 33, // 28: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.field_configuration:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + 34, // 29: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + 15, // 30: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 35, // 31: grpc.gateway.protoc_gen_openapiv2.options.Tag.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + 36, // 32: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + 3, // 33: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + 4, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + 5, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + 23, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes + 37, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + 39, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + 40, // 39: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + 11, // 40: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 41, // 41: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value + 11, // 42: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 41, // 43: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value + 10, // 44: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header + 41, // 45: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 46: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 47: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 48: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 49: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry.value:type_name -> google.protobuf.Value + 21, // 50: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + 41, // 51: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value + 38, // 52: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + 53, // [53:53] is the sub-list for method output_type + 53, // [53:53] is the sub-list for method input_type + 53, // [53:53] is the sub-list for extension type_name + 53, // [53:53] is the sub-list for extension extendee + 0, // [0:53] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } +func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { + if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, + NumEnums: 6, + NumMessages: 35, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, + EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, + MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, + }.Build() + File_protoc_gen_openapiv2_options_openapiv2_proto = out.File + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil +} 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 index a65d88eb865..04b4bebf3d5 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel @@ -27,6 +27,7 @@ go_library( "//internal/httprule", "//utilities", "@org_golang_google_genproto_googleapis_api//httpbody", + "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//codes", "@org_golang_google_grpc//grpclog", "@org_golang_google_grpc//health/grpc_health_v1", 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 index 2f2b342431d..00b2228a1de 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go @@ -201,13 +201,13 @@ func annotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcM 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)) } + if len(md) == 0 { + return ctx, nil, nil + } return ctx, md, nil } 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 index 8376d1e0efd..3d07063007d 100644 --- 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 @@ -66,7 +66,7 @@ func (j *JSONPb) marshalTo(w io.Writer, v interface{}) error { var ( // protoMessageType is stored to prevent constant lookup of the same type at runtime. - protoMessageType = reflect.TypeOf((*proto.Message)(nil)).Elem() + protoMessageType = reflect.TypeFor[proto.Message]() ) // marshalNonProto marshals a non-message field of a protobuf message. @@ -325,9 +325,9 @@ type protoEnum interface { EnumDescriptor() ([]byte, []int) } -var typeProtoEnum = reflect.TypeOf((*protoEnum)(nil)).Elem() +var typeProtoEnum = reflect.TypeFor[protoEnum]() -var typeProtoMessage = reflect.TypeOf((*proto.Message)(nil)).Elem() +var typeProtoMessage = reflect.TypeFor[proto.Message]() // Delimiter for newline encoded JSON streams. func (j *JSONPb) Delimiter() []byte { 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 index 19255ec441e..3eb16167173 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" + "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/health/grpc_health_v1" @@ -281,12 +282,19 @@ func WithHealthEndpointAt(healthCheckClient grpc_health_v1.HealthClient, endpoin http.MethodGet, endpointPath, func(w http.ResponseWriter, r *http.Request, _ map[string]string, ) { _, outboundMarshaler := MarshalerForRequest(s, r) + annotatedContext, err := AnnotateContext(r.Context(), s, r, grpc_health_v1.Health_Check_FullMethodName, WithHTTPPathPattern(endpointPath)) + if err != nil { + s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err) + return + } - resp, err := healthCheckClient.Check(r.Context(), &grpc_health_v1.HealthCheckRequest{ + var md ServerMetadata + resp, err := healthCheckClient.Check(annotatedContext, &grpc_health_v1.HealthCheckRequest{ Service: r.URL.Query().Get("service"), - }) + }, grpc.Header(&md.HeaderMD), grpc.Trailer(&md.TrailerMD)) + annotatedContext = NewServerMetadataContext(annotatedContext, md) if err != nil { - s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err) + s.errorHandler(annotatedContext, s, outboundMarshaler, w, r, err) return } @@ -300,7 +308,7 @@ func WithHealthEndpointAt(healthCheckClient grpc_health_v1.HealthClient, endpoin err = status.Error(codes.NotFound, resp.String()) } - s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err) + s.errorHandler(annotatedContext, s, outboundMarshaler, w, r, err) return } diff --git a/vendor/github.com/hashicorp/consul/api/acl.go b/vendor/github.com/hashicorp/consul/api/acl.go index b0ec6f2f47b..8961b12ec16 100644 --- a/vendor/github.com/hashicorp/consul/api/acl.go +++ b/vendor/github.com/hashicorp/consul/api/acl.go @@ -10,7 +10,7 @@ import ( "net/url" "time" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) const ( @@ -483,12 +483,14 @@ type OIDCAuthMethodConfig struct { OIDCDiscoveryURL string `json:",omitempty"` OIDCDiscoveryCACert string `json:",omitempty"` // just for type=oidc - OIDCClientID string `json:",omitempty"` - OIDCClientSecret string `json:",omitempty"` - OIDCScopes []string `json:",omitempty"` - OIDCACRValues []string `json:",omitempty"` - AllowedRedirectURIs []string `json:",omitempty"` - VerboseOIDCLogging bool `json:",omitempty"` + OIDCClientID string `json:",omitempty"` + OIDCClientSecret string `json:",omitempty"` + OIDCClientAssertion *OIDCClientAssertion `json:",omitempty"` + OIDCClientUsePKCE *bool `json:",omitempty"` + OIDCScopes []string `json:",omitempty"` + OIDCACRValues []string `json:",omitempty"` + AllowedRedirectURIs []string `json:",omitempty"` + VerboseOIDCLogging bool `json:",omitempty"` // just for type=jwt JWKSURL string `json:",omitempty"` JWKSCACert string `json:",omitempty"` @@ -513,6 +515,8 @@ func (c *OIDCAuthMethodConfig) RenderToConfig() map[string]interface{} { // just for type=oidc "OIDCClientID": c.OIDCClientID, "OIDCClientSecret": c.OIDCClientSecret, + "OIDCClientAssertion": c.OIDCClientAssertion, + "OIDCClientUsePKCE": c.OIDCClientUsePKCE, "OIDCScopes": c.OIDCScopes, "OIDCACRValues": c.OIDCACRValues, "AllowedRedirectURIs": c.AllowedRedirectURIs, @@ -528,6 +532,16 @@ func (c *OIDCAuthMethodConfig) RenderToConfig() map[string]interface{} { } } +type OIDCClientAssertion struct { + Audience []string + PrivateKey *OIDCClientAssertionKey + KeyAlgorithm string +} + +type OIDCClientAssertionKey struct { + PemKey string +} + type ACLLoginParams struct { AuthMethod string BearerToken string diff --git a/vendor/github.com/hashicorp/consul/api/agent.go b/vendor/github.com/hashicorp/consul/api/agent.go index 24e2c50d649..6027200967e 100644 --- a/vendor/github.com/hashicorp/consul/api/agent.go +++ b/vendor/github.com/hashicorp/consul/api/agent.go @@ -10,6 +10,7 @@ import ( "fmt" "io" "net/http" + "strings" ) // ServiceKind is the kind of service being registered. @@ -82,6 +83,62 @@ type AgentWeights struct { Warning int } +type ServicePort struct { + Name string + Port int + Default bool +} + +type ServicePorts []ServicePort + +func (sp ServicePorts) Validate() error { + if len(sp) == 0 { + return nil + } + + seenName := make(map[string]struct{}, len(sp)) + seenDefault := false + for _, p := range sp { + if strings.TrimSpace(p.Name) == "" { + return errors.New("Ports.Name cannot be empty") + } + + if p.Port <= 0 { + return errors.New("Ports.Port must be non-zero") + } + + _, ok := seenName[p.Name] + if ok { + return fmt.Errorf("Ports.Name %q has to be unique", p.Name) + } + + seenName[p.Name] = struct{}{} + + if p.Default && seenDefault { + return errors.New("only one port can be marked as default") + } + + if p.Default { + seenDefault = true + } + } + + if !seenDefault { + return fmt.Errorf("one of the Ports must be marked as Default") + } + + return nil +} + +func (sp ServicePorts) HasDefault() bool { + for _, p := range sp { + if p.Default { + return true + } + } + return false +} + // AgentService represents a service known to the agent type AgentService struct { Kind ServiceKind `json:",omitempty"` @@ -90,6 +147,7 @@ type AgentService struct { Tags []string Meta map[string]string Port int + Ports ServicePorts `json:",omitempty" bexpr:"-"` Address string SocketPath string `json:",omitempty"` TaggedAddresses map[string]ServiceAddress `json:",omitempty"` @@ -111,6 +169,16 @@ type AgentService struct { Locality *Locality `json:",omitempty" bexpr:"-" hash:"ignore"` } +func (a AgentService) DefaultPort() int { + for _, p := range a.Ports { + if p.Default { + return p.Port + } + } + + return a.Port +} + // AgentServiceChecksInfo returns information about a Service and its checks type AgentServiceChecksInfo struct { AggregatedStatus string @@ -285,6 +353,7 @@ type AgentServiceRegistration struct { Name string `json:",omitempty"` Tags []string `json:",omitempty"` Port int `json:",omitempty"` + Ports ServicePorts `json:",omitempty"` Address string `json:",omitempty"` SocketPath string `json:",omitempty"` TaggedAddresses map[string]ServiceAddress `json:",omitempty"` @@ -300,6 +369,10 @@ type AgentServiceRegistration struct { Locality *Locality `json:",omitempty" bexpr:"-" hash:"ignore"` } +func (a *AgentServiceRegistration) IsConnectEnabled() bool { + return a.Connect != nil && (a.Connect.Native || a.Connect.SidecarService != nil) +} + // ServiceRegisterOpts is used to pass extra options to the service register. type ServiceRegisterOpts struct { // Missing healthchecks will be deleted from the agent. diff --git a/vendor/github.com/hashicorp/consul/api/api.go b/vendor/github.com/hashicorp/consul/api/api.go index 27af1ea5697..eb26f8905cc 100644 --- a/vendor/github.com/hashicorp/consul/api/api.go +++ b/vendor/github.com/hashicorp/consul/api/api.go @@ -142,7 +142,7 @@ type QueryOptions struct { RequireConsistent bool // UseCache requests that the agent cache results locally. See - // https://www.consul.io/api/features/caching.html for more details on the + // https://developer.hashicorp.com/api/features/caching.html for more details on the // semantics. UseCache bool @@ -152,14 +152,14 @@ type QueryOptions struct { // returned. Clients that wish to allow for stale results on error can set // StaleIfError to a longer duration to change this behavior. It is ignored // if the endpoint supports background refresh caching. See - // https://www.consul.io/api/features/caching.html for more details. + // https://developer.hashicorp.com/api/features/caching.html for more details. MaxAge time.Duration // StaleIfError specifies how stale the client will accept a cached response // if the servers are unavailable to fetch a fresh one. Only makes sense when // UseCache is true and MaxAge is set to a lower, non-zero value. It is // ignored if the endpoint supports background refresh caching. See - // https://www.consul.io/api/features/caching.html for more details. + // https://developer.hashicorp.com/api/features/caching.html for more details. StaleIfError time.Duration // WaitIndex is used to enable a blocking query. Waits @@ -332,6 +332,9 @@ type QueryMeta struct { type WriteMeta struct { // How long did the request take RequestTime time.Duration + + // Warnings contains any warning messages from the server + Warnings []string } // HttpBasicAuth is used to authenticate http client with HTTP Basic Authentication @@ -468,7 +471,7 @@ func defaultConfig(logger hclog.Logger, transportFn func() *http.Transport) *Con } config := &Config{ - Address: "127.0.0.1:8500", + Address: "localhost:8500", Scheme: "http", Transport: transportFn(), } @@ -646,9 +649,7 @@ func (c *Client) Headers() http.Header { ret := make(http.Header) for k, v := range c.headers { - for _, val := range v { - ret[k] = append(ret[k], val) - } + ret[k] = append(ret[k], v...) } return ret @@ -1033,12 +1034,11 @@ func (r *request) toHTTP() (*http.Request, error) { req.Header = r.header // Content-Type must always be set when a body is present - // See https://github.com/hashicorp/consul/issues/10011 if req.Body != nil && req.Header.Get("Content-Type") == "" { - req.Header.Set("Content-Type", "application/json") + req.Header.Set("Content-Type", "application/json; charset=utf-8") } - // Setup auth + // Check for a token if r.config.HttpAuth != nil { req.SetBasicAuth(r.config.HttpAuth.Username, r.config.HttpAuth.Password) } @@ -1148,6 +1148,12 @@ func (c *Client) write(endpoint string, in, out interface{}, q *WriteOptions) (* } wm := &WriteMeta{RequestTime: rtt} + + // Check for warning headers + if warning := resp.Header.Get("X-Consul-KV-Warning"); warning != "" { + wm.Warnings = append(wm.Warnings, warning) + } + if out != nil { if err := decodeBody(resp, &out); err != nil { return nil, err @@ -1172,6 +1178,12 @@ func (c *Client) delete(endpoint string, q *QueryOptions) (*WriteMeta, error) { } wm := &WriteMeta{RequestTime: rtt} + + // Check for warning headers + if warning := resp.Header.Get("X-Consul-KV-Warning"); warning != "" { + wm.Warnings = append(wm.Warnings, warning) + } + return wm, nil } @@ -1313,7 +1325,7 @@ func generateUnexpectedResponseCodeError(resp *http.Response) error { io.Copy(&buf, resp.Body) closeResponseBody(resp) - trimmed := strings.TrimSpace(string(buf.Bytes())) + trimmed := strings.TrimSpace(buf.String()) return StatusError{Code: resp.StatusCode, Body: trimmed} } diff --git a/vendor/github.com/hashicorp/consul/api/config_entry.go b/vendor/github.com/hashicorp/consul/api/config_entry.go index 8c3a080f70b..3dde8d901b1 100644 --- a/vendor/github.com/hashicorp/consul/api/config_entry.go +++ b/vendor/github.com/hashicorp/consul/api/config_entry.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) const ( @@ -381,6 +381,7 @@ type ServiceConfigEntry struct { Meta map[string]string `json:",omitempty"` CreateIndex uint64 ModifyIndex uint64 + MaxRequestHeadersKB *uint32 `json:",omitempty"` } func (s *ServiceConfigEntry) GetKind() string { return s.Kind } diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go b/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go index ba2bac19efe..76acfbf7a75 100644 --- a/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go +++ b/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go @@ -291,6 +291,10 @@ type APIGatewayListener struct { Override *APIGatewayPolicy `json:",omitempty"` // Default is the policy that is the default for the listener and route, routes can override this behavior Default *APIGatewayPolicy `json:",omitempty"` + + // MaxRequestHeadersKB configures the maximum size in kilobytes for request headers + // sent from downstream clients to upstream services. If not set, uses Envoy's default. + MaxRequestHeadersKB *uint32 `json:",omitempty"` } // APIGatewayTLSConfiguration specifies the configuration of a listener’s diff --git a/vendor/github.com/hashicorp/consul/api/connect_ca.go b/vendor/github.com/hashicorp/consul/api/connect_ca.go index 8a5c9f870e9..d2d276cafaf 100644 --- a/vendor/github.com/hashicorp/consul/api/connect_ca.go +++ b/vendor/github.com/hashicorp/consul/api/connect_ca.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) // CAConfig is the structure for the Connect CA configuration. diff --git a/vendor/github.com/hashicorp/consul/api/content_type.go b/vendor/github.com/hashicorp/consul/api/content_type.go index 37c8cf60aaf..7aef2c30e95 100644 --- a/vendor/github.com/hashicorp/consul/api/content_type.go +++ b/vendor/github.com/hashicorp/consul/api/content_type.go @@ -12,7 +12,7 @@ const ( contentTypeHeader = "Content-Type" plainContentType = "text/plain; charset=utf-8" octetStream = "application/octet-stream" - jsonContentType = "application/json" // Default content type + jsonContentType = "application/json; charset=utf-8" // Default content type ) // ContentTypeRule defines a rule for determining the content type of an HTTP request. diff --git a/vendor/github.com/hashicorp/consul/api/imported_services.go b/vendor/github.com/hashicorp/consul/api/imported_services.go new file mode 100644 index 00000000000..7fa22eaa714 --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/imported_services.go @@ -0,0 +1,71 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package api + +import ( + "encoding/json" + "io" +) + +type ImportedService struct { + // Service is the name of the service which is imported. + Service string + + // Partition of the service + Partition string `json:",omitempty"` + + // Namespace of the service + Namespace string `json:",omitempty"` + + // SourcePeer is the peer from which the service is imported. + SourcePeer string `json:",omitempty"` + + // SourcePartition is the partition from which the service is imported. + SourcePartition string `json:",omitempty"` +} + +type importedServicesResponse struct { + Partition string `json:"Partition"` + ImportedServices []ImportedService `json:"ImportedServices"` +} + +func (c *Client) ImportedServices(q *QueryOptions) ([]ImportedService, *QueryMeta, error) { + + r := c.newRequest("GET", "/v1/imported-services") + r.setQueryOptions(q) + rtt, resp, err := c.doRequest(r) + if err != nil { + return nil, nil, err + } + defer closeResponseBody(resp) + if err := requireOK(resp); err != nil { + return nil, nil, err + } + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + // Read the body so we can try different decode formats + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, err + } + + // Try to decode as wrapped response (ENT format) + // ENT returns: {Partition: "...", ImportedServices: [...]} + var result importedServicesResponse + if err := json.Unmarshal(body, &result); err == nil && result.Partition != "" { + return result.ImportedServices, qm, nil + } + + // If that fails, try to decode as raw array (CE format) + // CE returns: [...] + var services []ImportedService + if err := json.Unmarshal(body, &services); err != nil { + return nil, nil, err + } + + return services, qm, nil +} diff --git a/vendor/github.com/hashicorp/consul/api/kv.go b/vendor/github.com/hashicorp/consul/api/kv.go index b9d330a6fd3..5a9354458f6 100644 --- a/vendor/github.com/hashicorp/consul/api/kv.go +++ b/vendor/github.com/hashicorp/consul/api/kv.go @@ -228,6 +228,11 @@ func (k *KV) put(key string, params map[string]string, body []byte, q *WriteOpti qm := &WriteMeta{} qm.RequestTime = rtt + // Check for warning headers + if warning := resp.Header.Get("X-Consul-KV-Warning"); warning != "" { + qm.Warnings = append(qm.Warnings, warning) + } + var buf bytes.Buffer if _, err := io.Copy(&buf, resp.Body); err != nil { return false, nil, fmt.Errorf("Failed to read response: %v", err) diff --git a/vendor/github.com/hashicorp/consul/api/lock.go b/vendor/github.com/hashicorp/consul/api/lock.go index e9529f7bde6..a3885a76d51 100644 --- a/vendor/github.com/hashicorp/consul/api/lock.go +++ b/vendor/github.com/hashicorp/consul/api/lock.go @@ -59,7 +59,7 @@ var ( ) // Lock is used to implement client-side leader election. It is follows the -// algorithm as described here: https://www.consul.io/docs/guides/leader-election.html. +// algorithm as described here: https://developer.hashicorp.com/docs/guides/leader-election.html. type Lock struct { c *Client opts *LockOptions diff --git a/vendor/github.com/hashicorp/consul/api/namespace.go b/vendor/github.com/hashicorp/consul/api/namespace.go index 98afd229989..ac189a8fa84 100644 --- a/vendor/github.com/hashicorp/consul/api/namespace.go +++ b/vendor/github.com/hashicorp/consul/api/namespace.go @@ -85,14 +85,10 @@ func (n *NamespaceACLConfig) UnmarshalJSON(data []byte) error { } if n.PolicyDefaults == nil { - for _, pd := range aux.PolicyDefaultsSnake { - n.PolicyDefaults = append(n.PolicyDefaults, pd) - } + n.PolicyDefaults = append(n.PolicyDefaults, aux.PolicyDefaultsSnake...) } if n.RoleDefaults == nil { - for _, pd := range aux.RoleDefaultsSnake { - n.RoleDefaults = append(n.RoleDefaults, pd) - } + n.RoleDefaults = append(n.RoleDefaults, aux.RoleDefaultsSnake...) } return nil } diff --git a/vendor/github.com/hashicorp/consul/api/operator_autopilot.go b/vendor/github.com/hashicorp/consul/api/operator_autopilot.go index 7628bf6f2ff..20fc9344801 100644 --- a/vendor/github.com/hashicorp/consul/api/operator_autopilot.go +++ b/vendor/github.com/hashicorp/consul/api/operator_autopilot.go @@ -62,7 +62,7 @@ type AutopilotConfiguration struct { } // Defines default values for the AutopilotConfiguration type, consistent with -// https://www.consul.io/api-docs/operator/autopilot#parameters-1 +// https://developer.hashicorp.com/api-docs/operator/autopilot#parameters-1 func NewAutopilotConfiguration() AutopilotConfiguration { cfg := AutopilotConfiguration{ CleanupDeadServers: true, diff --git a/vendor/github.com/hashicorp/consul/api/operator_utilization.go b/vendor/github.com/hashicorp/consul/api/operator_utilization.go new file mode 100644 index 00000000000..d1dd4bbd174 --- /dev/null +++ b/vendor/github.com/hashicorp/consul/api/operator_utilization.go @@ -0,0 +1,64 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package api + +import ( + "io" + "strconv" +) + +type Census struct { + client *Client +} + +// UtilizationBundleRequest configures generation of a census utilization bundle. +type UtilizationBundleRequest struct { + Message string + TodayOnly bool + SendReport bool +} + +func (c *Client) Census() *Census { + return &Census{c} +} + +// Utilization generates a census utilization bundle by calling the +// /v1/operator/utilization endpoint. The returned byte slice contains the bundle +// JSON payload suitable for saving to disk or further processing. +func (c *Census) Utilization(req *UtilizationBundleRequest, q *QueryOptions) ([]byte, *QueryMeta, error) { + r := c.client.newRequest("GET", "/v1/operator/utilization") + if q != nil { + r.setQueryOptions(q) + } + if req != nil { + if req.Message != "" { + r.params.Set("message", req.Message) + } + if req.TodayOnly { + r.params.Set("today_only", strconv.FormatBool(true)) + } + if req.SendReport { + r.params.Set("send_report", strconv.FormatBool(true)) + } + } + + rtt, resp, err := c.client.doRequest(r) + if err != nil { + return nil, nil, err + } + defer closeResponseBody(resp) + if err := requireOK(resp); err != nil { + return nil, nil, err + } + + qm := &QueryMeta{} + parseQueryMeta(resp, qm) + qm.RequestTime = rtt + + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, err + } + return body, qm, nil +} diff --git a/vendor/github.com/hashicorp/consul/api/peering.go b/vendor/github.com/hashicorp/consul/api/peering.go index dd7780f630a..32ed28edbcd 100644 --- a/vendor/github.com/hashicorp/consul/api/peering.go +++ b/vendor/github.com/hashicorp/consul/api/peering.go @@ -218,7 +218,7 @@ func (p *Peerings) GenerateToken(ctx context.Context, g PeeringGenerateTokenRequ return nil, nil, fmt.Errorf("peer name cannot be empty") } - req := p.c.newRequest("POST", fmt.Sprint("/v1/peering/token")) + req := p.c.newRequest("POST", "/v1/peering/token") req.setWriteOptions(wq) req.ctx = ctx req.obj = g @@ -244,7 +244,7 @@ func (p *Peerings) GenerateToken(ctx context.Context, g PeeringGenerateTokenRequ // TODO(peering): verify this is the ultimate signature we want func (p *Peerings) Establish(ctx context.Context, i PeeringEstablishRequest, wq *WriteOptions) (*PeeringEstablishResponse, *WriteMeta, error) { - req := p.c.newRequest("POST", fmt.Sprint("/v1/peering/establish")) + req := p.c.newRequest("POST", "/v1/peering/establish") req.setWriteOptions(wq) req.ctx = ctx req.obj = i diff --git a/vendor/github.com/hashicorp/consul/api/txn.go b/vendor/github.com/hashicorp/consul/api/txn.go index 59adafdac3d..01861c29429 100644 --- a/vendor/github.com/hashicorp/consul/api/txn.go +++ b/vendor/github.com/hashicorp/consul/api/txn.go @@ -36,7 +36,7 @@ type TxnOps []*TxnOp type TxnResult struct { KV *KVPair Node *Node - Service *CatalogService + Service *AgentService Check *HealthCheck } @@ -164,6 +164,13 @@ type CheckTxnOp struct { Check HealthCheck } +type CensusOp string + +const ( + CensusPut CensusOp = "put" + CensusPrune CensusOp = "prune" +) + // Txn is used to apply multiple Consul operations in a single, atomic transaction. // // Note that Go will perform the required base64 encoding on the values diff --git a/vendor/github.com/hashicorp/go-version/LICENSE b/vendor/github.com/hashicorp/go-version/LICENSE index 1409d6ab92f..bb1e9a486af 100644 --- a/vendor/github.com/hashicorp/go-version/LICENSE +++ b/vendor/github.com/hashicorp/go-version/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 HashiCorp, Inc. +Copyright IBM Corp. 2014, 2025 Mozilla Public License, version 2.0 diff --git a/vendor/github.com/hashicorp/go-version/README.md b/vendor/github.com/hashicorp/go-version/README.md index 4b7806cd964..83a8249f72c 100644 --- a/vendor/github.com/hashicorp/go-version/README.md +++ b/vendor/github.com/hashicorp/go-version/README.md @@ -1,6 +1,7 @@ # Versioning Library for Go + ![Build Status](https://github.com/hashicorp/go-version/actions/workflows/go-tests.yml/badge.svg) -[![GoDoc](https://godoc.org/github.com/hashicorp/go-version?status.svg)](https://godoc.org/github.com/hashicorp/go-version) +[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-version.svg)](https://pkg.go.dev/github.com/hashicorp/go-version) go-version is a library for parsing versions and version constraints, and verifying versions against a set of constraints. go-version @@ -12,7 +13,7 @@ Versions used with go-version must follow [SemVer](http://semver.org/). ## Installation and Usage Package documentation can be found on -[GoDoc](http://godoc.org/github.com/hashicorp/go-version). +[Go Reference](https://pkg.go.dev/github.com/hashicorp/go-version). Installation can be done with a normal `go get`: diff --git a/vendor/github.com/hashicorp/go-version/constraint.go b/vendor/github.com/hashicorp/go-version/constraint.go index 29bdc4d2b5d..3964da070d6 100644 --- a/vendor/github.com/hashicorp/go-version/constraint.go +++ b/vendor/github.com/hashicorp/go-version/constraint.go @@ -1,4 +1,4 @@ -// Copyright (c) HashiCorp, Inc. +// Copyright IBM Corp. 2014, 2025 // SPDX-License-Identifier: MPL-2.0 package version @@ -8,8 +8,26 @@ import ( "regexp" "sort" "strings" + "sync" ) +var ( + constraintRegexp *regexp.Regexp + constraintRegexpOnce sync.Once +) + +func getConstraintRegexp() *regexp.Regexp { + constraintRegexpOnce.Do(func() { + // This heavy lifting only happens the first time this function is called + constraintRegexp = regexp.MustCompile(fmt.Sprintf( + `^\s*(%s)\s*(%s)\s*$`, + `<=|>=|!=|~>|<|>|=|`, + VersionRegexpRaw, + )) + }) + return constraintRegexp +} + // Constraint represents a single constraint for a version, such as // ">= 1.0". type Constraint struct { @@ -29,38 +47,11 @@ type Constraints []*Constraint type constraintFunc func(v, c *Version) bool -var constraintOperators map[string]constraintOperation - type constraintOperation struct { op operator f constraintFunc } -var constraintRegexp *regexp.Regexp - -func init() { - constraintOperators = map[string]constraintOperation{ - "": {op: equal, f: constraintEqual}, - "=": {op: equal, f: constraintEqual}, - "!=": {op: notEqual, f: constraintNotEqual}, - ">": {op: greaterThan, f: constraintGreaterThan}, - "<": {op: lessThan, f: constraintLessThan}, - ">=": {op: greaterThanEqual, f: constraintGreaterThanEqual}, - "<=": {op: lessThanEqual, f: constraintLessThanEqual}, - "~>": {op: pessimistic, f: constraintPessimistic}, - } - - ops := make([]string, 0, len(constraintOperators)) - for k := range constraintOperators { - ops = append(ops, regexp.QuoteMeta(k)) - } - - constraintRegexp = regexp.MustCompile(fmt.Sprintf( - `^\s*(%s)\s*(%s)\s*$`, - strings.Join(ops, "|"), - VersionRegexpRaw)) -} - // NewConstraint will parse one or more constraints from the given // constraint string. The string must be a comma-separated list of // constraints. @@ -107,7 +98,7 @@ func (cs Constraints) Check(v *Version) bool { // to '>0.2' it is *NOT* treated as equal. // // Missing operator is treated as equal to '=', whitespaces -// are ignored and constraints are sorted before comaparison. +// are ignored and constraints are sorted before comparison. func (cs Constraints) Equals(c Constraints) bool { if len(cs) != len(c) { return false @@ -176,9 +167,9 @@ func (c *Constraint) String() string { } func parseSingle(v string) (*Constraint, error) { - matches := constraintRegexp.FindStringSubmatch(v) + matches := getConstraintRegexp().FindStringSubmatch(v) if matches == nil { - return nil, fmt.Errorf("Malformed constraint: %s", v) + return nil, fmt.Errorf("malformed constraint: %s", v) } check, err := NewVersion(matches[2]) @@ -186,7 +177,25 @@ func parseSingle(v string) (*Constraint, error) { return nil, err } - cop := constraintOperators[matches[1]] + var cop constraintOperation + switch matches[1] { + case "=": + cop = constraintOperation{op: equal, f: constraintEqual} + case "!=": + cop = constraintOperation{op: notEqual, f: constraintNotEqual} + case ">": + cop = constraintOperation{op: greaterThan, f: constraintGreaterThan} + case "<": + cop = constraintOperation{op: lessThan, f: constraintLessThan} + case ">=": + cop = constraintOperation{op: greaterThanEqual, f: constraintGreaterThanEqual} + case "<=": + cop = constraintOperation{op: lessThanEqual, f: constraintLessThanEqual} + case "~>": + cop = constraintOperation{op: pessimistic, f: constraintPessimistic} + default: + cop = constraintOperation{op: equal, f: constraintEqual} + } return &Constraint{ f: cop.f, diff --git a/vendor/github.com/hashicorp/go-version/version.go b/vendor/github.com/hashicorp/go-version/version.go index 7c683c2813a..17b29732ee1 100644 --- a/vendor/github.com/hashicorp/go-version/version.go +++ b/vendor/github.com/hashicorp/go-version/version.go @@ -1,23 +1,39 @@ -// Copyright (c) HashiCorp, Inc. +// Copyright IBM Corp. 2014, 2025 // SPDX-License-Identifier: MPL-2.0 package version import ( - "bytes" "database/sql/driver" "fmt" "regexp" "strconv" "strings" + "sync" ) // The compiled regular expression used to test the validity of a version. var ( - versionRegexp *regexp.Regexp - semverRegexp *regexp.Regexp + versionRegexp *regexp.Regexp + versionRegexpOnce sync.Once + semverRegexp *regexp.Regexp + semverRegexpOnce sync.Once ) +func getVersionRegexp() *regexp.Regexp { + versionRegexpOnce.Do(func() { + versionRegexp = regexp.MustCompile("^" + VersionRegexpRaw + "$") + }) + return versionRegexp +} + +func getSemverRegexp() *regexp.Regexp { + semverRegexpOnce.Do(func() { + semverRegexp = regexp.MustCompile("^" + SemverRegexpRaw + "$") + }) + return semverRegexp +} + // The raw regular expression string used for testing the validity // of a version. const ( @@ -42,28 +58,23 @@ type Version struct { original string } -func init() { - versionRegexp = regexp.MustCompile("^" + VersionRegexpRaw + "$") - semverRegexp = regexp.MustCompile("^" + SemverRegexpRaw + "$") -} - // NewVersion parses the given version and returns a new // Version. func NewVersion(v string) (*Version, error) { - return newVersion(v, versionRegexp) + return newVersion(v, getVersionRegexp()) } // NewSemver parses the given version and returns a new // Version that adheres strictly to SemVer specs // https://semver.org/ func NewSemver(v string) (*Version, error) { - return newVersion(v, semverRegexp) + return newVersion(v, getSemverRegexp()) } func newVersion(v string, pattern *regexp.Regexp) (*Version, error) { matches := pattern.FindStringSubmatch(v) if matches == nil { - return nil, fmt.Errorf("Malformed version: %s", v) + return nil, fmt.Errorf("malformed version: %s", v) } segmentsStr := strings.Split(matches[1], ".") segments := make([]int64, len(segmentsStr)) @@ -71,7 +82,7 @@ func newVersion(v string, pattern *regexp.Regexp) (*Version, error) { val, err := strconv.ParseInt(str, 10, 64) if err != nil { return nil, fmt.Errorf( - "Error parsing version: %s", err) + "error parsing version: %s", err) } segments[i] = val @@ -174,7 +185,7 @@ func (v *Version) Compare(other *Version) int { } else if lhs < rhs { return -1 } - // Otherwis, rhs was > lhs, they're not equal + // Otherwise, rhs was > lhs, they're not equal return 1 } @@ -382,22 +393,29 @@ func (v *Version) Segments64() []int64 { // missing parts (1.0 => 1.0.0) will be made into a canonicalized form // as shown in the parenthesized examples. func (v *Version) String() string { - var buf bytes.Buffer - fmtParts := make([]string, len(v.segments)) + return string(v.bytes()) +} + +func (v *Version) bytes() []byte { + var buf []byte for i, s := range v.segments { - // We can ignore err here since we've pre-parsed the values in segments - str := strconv.FormatInt(s, 10) - fmtParts[i] = str + if i > 0 { + buf = append(buf, '.') + } + buf = strconv.AppendInt(buf, s, 10) } - fmt.Fprintf(&buf, strings.Join(fmtParts, ".")) + if v.pre != "" { - fmt.Fprintf(&buf, "-%s", v.pre) + buf = append(buf, '-') + buf = append(buf, v.pre...) } + if v.metadata != "" { - fmt.Fprintf(&buf, "+%s", v.metadata) + buf = append(buf, '+') + buf = append(buf, v.metadata...) } - return buf.String() + return buf } // Original returns the original parsed version as-is, including any diff --git a/vendor/github.com/hashicorp/go-version/version_collection.go b/vendor/github.com/hashicorp/go-version/version_collection.go index 83547fe13d6..11bc8b1c56c 100644 --- a/vendor/github.com/hashicorp/go-version/version_collection.go +++ b/vendor/github.com/hashicorp/go-version/version_collection.go @@ -1,4 +1,4 @@ -// Copyright (c) HashiCorp, Inc. +// Copyright IBM Corp. 2014, 2025 // SPDX-License-Identifier: MPL-2.0 package version diff --git a/vendor/github.com/lib/pq/.gitattributes b/vendor/github.com/lib/pq/.gitattributes new file mode 100644 index 00000000000..dfdb8b771ce --- /dev/null +++ b/vendor/github.com/lib/pq/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/vendor/github.com/lib/pq/CHANGELOG.md b/vendor/github.com/lib/pq/CHANGELOG.md new file mode 100644 index 00000000000..338b128bc44 --- /dev/null +++ b/vendor/github.com/lib/pq/CHANGELOG.md @@ -0,0 +1,143 @@ +v1.11.1 (2025-01-29) +-------------------- +This fixes two regressions present in the v1.11.0 release: + +- Fix build on 32bit systems, Windows, and Plan 9 ([#1253]). + +- Named []byte types and pointers to []byte (e.g. `*[]byte`, `json.RawMessage`) + would be treated as an array instead of bytea ([#1252]). + +[#1252]: https://github.com/lib/pq/pull/1252 +[#1253]: https://github.com/lib/pq/pull/1253 + +v1.11.0 (2025-01-28) +-------------------- +This version of pq requires Go 1.21 or newer. + +pq now supports only maintained PostgreSQL releases, which is PostgreSQL 14 and +newer. Previously PostgreSQL 8.4 and newer were supported. + +### Features + +- The `pq.Error.Error()` text includes the position of the error (if reported + by PostgreSQL) and SQLSTATE code ([#1219], [#1224]): + + pq: column "columndoesntexist" does not exist at column 8 (42703) + pq: syntax error at or near ")" at position 2:71 (42601) + +- The `pq.Error.ErrorWithDetail()` method prints a more detailed multiline + message, with the Detail, Hint, and error position (if any) ([#1219]): + + ERROR: syntax error at or near ")" (42601) + CONTEXT: line 12, column 1: + + 10 | name varchar, + 11 | version varchar, + 12 | ); + ^ + +- Add `Config`, `NewConfig()`, and `NewConnectorConfig()` to supply connection + details in a more structured way ([#1240]). + +- Support `hostaddr` and `$PGHOSTADDR` ([#1243]). + +- Support multiple values in `host`, `port`, and `hostaddr`, which are each + tried in order, or randomly if `load_balance_hosts=random` is set ([#1246]). + +- Support `target_session_attrs` connection parameter ([#1246]). + +- Support [`sslnegotiation`] to use SSL without negotiation ([#1180]). + +- Allow using a custom `tls.Config`, for example for encrypted keys ([#1228]). + +- Add `PQGO_DEBUG=1` print the communication with PostgreSQL to stderr, to aid + in debugging, testing, and bug reports ([#1223]). + +- Add support for NamedValueChecker interface ([#1125], [#1238]). + + +### Fixes + +- Match HOME directory lookup logic with libpq: prefer $HOME over /etc/passwd, + ignore ENOTDIR errors, and use APPDATA on Windows ([#1214]). + +- Fix `sslmode=verify-ca` verifying the hostname anyway when connecting to a DNS + name (rather than IP) ([#1226]). + +- Correctly detect pre-protocol errors such as the server not being able to fork + or running out of memory ([#1248]). + +- Fix build with wasm ([#1184]), appengine ([#745]), and Plan 9 ([#1133]). + +- Deprecate and type alias `pq.NullTime` to `sql.NullTime` ([#1211]). + +- Enforce integer limits of the Postgres wire protocol ([#1161]). + +- Accept the `passfile` connection parameter to override `PGPASSFILE` ([#1129]). + +- Fix connecting to socket on Windows systems ([#1179]). + +- Don't perform a permission check on the .pgpass file on Windows ([#595]). + +- Warn about incorrect .pgpass permissions ([#595]). + +- Don't set extra_float_digits ([#1212]). + +- Decode bpchar into a string ([#949]). + +- Fix panic in Ping() by not requiring CommandComplete or EmptyQueryResponse in + simpleQuery() ([#1234]) + +- Recognize bit/varbit ([#743]) and float types ([#1166]) in ColumnTypeScanType(). + +- Accept `PGGSSLIB` and `PGKRBSRVNAME` environment variables ([#1143]). + +- Handle ErrorResponse in readReadyForQuery and return proper error ([#1136]). + +- CopyIn() and CopyInSchema() now work if the list of columns is empty, in which + case it will copy all columns ([#1239]). + +- Treat nil []byte in query parameters as nil/NULL rather than `""` ([#838]). + +- Accept multiple authentication methods before checking AuthOk, which improves + compatibility with PgPool-II ([#1188]). + +[`sslnegotiation`]: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLNEGOTIATION +[#595]: https://github.com/lib/pq/pull/595 +[#745]: https://github.com/lib/pq/pull/745 +[#743]: https://github.com/lib/pq/pull/743 +[#838]: https://github.com/lib/pq/pull/838 +[#949]: https://github.com/lib/pq/pull/949 +[#1125]: https://github.com/lib/pq/pull/1125 +[#1129]: https://github.com/lib/pq/pull/1129 +[#1133]: https://github.com/lib/pq/pull/1133 +[#1136]: https://github.com/lib/pq/pull/1136 +[#1143]: https://github.com/lib/pq/pull/1143 +[#1161]: https://github.com/lib/pq/pull/1161 +[#1166]: https://github.com/lib/pq/pull/1166 +[#1179]: https://github.com/lib/pq/pull/1179 +[#1180]: https://github.com/lib/pq/pull/1180 +[#1184]: https://github.com/lib/pq/pull/1184 +[#1188]: https://github.com/lib/pq/pull/1188 +[#1211]: https://github.com/lib/pq/pull/1211 +[#1212]: https://github.com/lib/pq/pull/1212 +[#1214]: https://github.com/lib/pq/pull/1214 +[#1219]: https://github.com/lib/pq/pull/1219 +[#1223]: https://github.com/lib/pq/pull/1223 +[#1224]: https://github.com/lib/pq/pull/1224 +[#1226]: https://github.com/lib/pq/pull/1226 +[#1228]: https://github.com/lib/pq/pull/1228 +[#1234]: https://github.com/lib/pq/pull/1234 +[#1238]: https://github.com/lib/pq/pull/1238 +[#1239]: https://github.com/lib/pq/pull/1239 +[#1240]: https://github.com/lib/pq/pull/1240 +[#1243]: https://github.com/lib/pq/pull/1243 +[#1246]: https://github.com/lib/pq/pull/1246 +[#1248]: https://github.com/lib/pq/pull/1248 + + +v1.10.9 (2023-04-26) +-------------------- +- Fixes backwards incompat bug with 1.13. + +- Fixes pgpass issue diff --git a/vendor/github.com/asaskevich/govalidator/LICENSE b/vendor/github.com/lib/pq/LICENSE similarity index 90% rename from vendor/github.com/asaskevich/govalidator/LICENSE rename to vendor/github.com/lib/pq/LICENSE index cacba910240..6a77dc4fb3b 100644 --- a/vendor/github.com/asaskevich/govalidator/LICENSE +++ b/vendor/github.com/lib/pq/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2014-2020 Alex Saskevich +Copyright (c) 2011-2013, 'pq' Contributors. Portions Copyright (c) 2011 Blake Mizerany Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ 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. \ No newline at end of file +SOFTWARE. diff --git a/vendor/github.com/lib/pq/LICENSE.md b/vendor/github.com/lib/pq/LICENSE.md deleted file mode 100644 index 5773904a30e..00000000000 --- a/vendor/github.com/lib/pq/LICENSE.md +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2011-2013, 'pq' Contributors -Portions Copyright (C) 2011 Blake Mizerany - -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/lib/pq/README.md b/vendor/github.com/lib/pq/README.md index 126ee5d35d1..7abcf724192 100644 --- a/vendor/github.com/lib/pq/README.md +++ b/vendor/github.com/lib/pq/README.md @@ -1,13 +1,18 @@ -# pq - A pure Go postgres driver for Go's database/sql package +pq is a Go PostgreSQL driver for database/sql. -[![GoDoc](https://godoc.org/github.com/lib/pq?status.svg)](https://pkg.go.dev/github.com/lib/pq?tab=doc) +All [maintained versions of PostgreSQL] are supported. Older versions may work, +but this is not tested. -## Install +API docs: https://pkg.go.dev/github.com/lib/pq - go get github.com/lib/pq +Install with: -## Features + go get github.com/lib/pq@latest +[maintained versions of PostgreSQL]: https://www.postgresql.org/support/versioning + +Features +-------- * SSL * Handles bad connections for `database/sql` * Scan `time.Time` correctly (i.e. `timestamp[tz]`, `time[tz]`, `date`) @@ -21,16 +26,67 @@ * pgpass support * GSS (Kerberos) auth -## Tests +Running Tests +------------- +Tests need to be run against a PostgreSQL database; you can use Docker compose +to start one: + + docker compose up -d + +This starts the latest PostgreSQL; use `docker compose up -d pg«v»` to start a +different version. + +In addition, your `/etc/hosts` currently needs an entry: + + 127.0.0.1 postgres postgres-invalid + +Or you can use any other PostgreSQL instance; see +`testdata/init/docker-entrypoint-initdb.d` for the required setup. You can use +the standard `PG*` environment variables to control the connection details; it +uses the following defaults: + + PGHOST=localhost + PGDATABASE=pqgo + PGUSER=pqgo + PGSSLMODE=disable + PGCONNECT_TIMEOUT=20 + +`PQTEST_BINARY_PARAMETERS` can be used to add `binary_parameters=yes` to all +connection strings: + + PQTEST_BINARY_PARAMETERS=1 go test + +Tests can be run against pgbouncer with: + + docker compose up -d pgbouncer pg18 + PGPORT=6432 go test ./... + +and pgpool with: -`go test` is used for testing. See [TESTS.md](TESTS.md) for more details. + docker compose up -d pgpool pg18 + PGPORT=7432 go test ./... -## Status +You can use PQGO_DEBUG=1 to make the driver print the communication with +PostgreSQL to stderr; this works anywhere (test or applications) and can be +useful to debug protocol problems. -This package is currently in maintenance mode, which means: -1. It generally does not accept new features. -2. It does accept bug fixes and version compatability changes provided by the community. -3. Maintainers usually do not resolve reported issues. -4. Community members are encouraged to help each other with reported issues. +For example: -For users that require new features or reliable resolution of reported bugs, we recommend using [pgx](https://github.com/jackc/pgx) which is under active development. + % PQGO_DEBUG=1 go test -run TestSimpleQuery + CLIENT → Startup 69 "\x00\x03\x00\x00database\x00pqgo\x00user [..]" + SERVER ← (R) AuthRequest 4 "\x00\x00\x00\x00" + SERVER ← (S) ParamStatus 19 "in_hot_standby\x00off\x00" + [..] + SERVER ← (Z) ReadyForQuery 1 "I" + START conn.query + START conn.simpleQuery + CLIENT → (Q) Query 9 "select 1\x00" + SERVER ← (T) RowDescription 29 "\x00\x01?column?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x04\xff\xff\xff\xff\x00\x00" + SERVER ← (D) DataRow 7 "\x00\x01\x00\x00\x00\x011" + END conn.simpleQuery + END conn.query + SERVER ← (C) CommandComplete 9 "SELECT 1\x00" + SERVER ← (Z) ReadyForQuery 1 "I" + CLIENT → (X) Terminate 0 "" + PASS + ok github.com/lib/pq 0.010s diff --git a/vendor/github.com/lib/pq/TESTS.md b/vendor/github.com/lib/pq/TESTS.md deleted file mode 100644 index f05021115be..00000000000 --- a/vendor/github.com/lib/pq/TESTS.md +++ /dev/null @@ -1,33 +0,0 @@ -# Tests - -## Running Tests - -`go test` is used for testing. A running PostgreSQL -server is required, with the ability to log in. The -database to connect to test with is "pqgotest," on -"localhost" but these can be overridden using [environment -variables](https://www.postgresql.org/docs/9.3/static/libpq-envars.html). - -Example: - - PGHOST=/run/postgresql go test - -## Benchmarks - -A benchmark suite can be run as part of the tests: - - go test -bench . - -## Example setup (Docker) - -Run a postgres container: - -``` -docker run --expose 5432:5432 postgres -``` - -Run tests: - -``` -PGHOST=localhost PGPORT=5432 PGUSER=postgres PGSSLMODE=disable PGDATABASE=postgres go test -``` diff --git a/vendor/github.com/lib/pq/array.go b/vendor/github.com/lib/pq/array.go index 39c8f7e2e03..910f335e14f 100644 --- a/vendor/github.com/lib/pq/array.go +++ b/vendor/github.com/lib/pq/array.go @@ -19,14 +19,15 @@ var typeSQLScanner = reflect.TypeOf((*sql.Scanner)(nil)).Elem() // slice of any dimension. // // For example: -// db.Query(`SELECT * FROM t WHERE id = ANY($1)`, pq.Array([]int{235, 401})) // -// var x []sql.NullInt64 -// db.QueryRow(`SELECT ARRAY[235, 401]`).Scan(pq.Array(&x)) +// db.Query(`SELECT * FROM t WHERE id = ANY($1)`, pq.Array([]int{235, 401})) +// +// var x []sql.NullInt64 +// db.QueryRow(`SELECT ARRAY[235, 401]`).Scan(pq.Array(&x)) // // Scanning multi-dimensional arrays is not supported. Arrays where the lower // bound is not one (such as `[0:0]={1}') are not supported. -func Array(a interface{}) interface { +func Array(a any) interface { driver.Valuer sql.Scanner } { @@ -76,7 +77,7 @@ type ArrayDelimiter interface { type BoolArray []bool // Scan implements the sql.Scanner interface. -func (a *BoolArray) Scan(src interface{}) error { +func (a *BoolArray) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -150,7 +151,7 @@ func (a BoolArray) Value() (driver.Value, error) { type ByteaArray [][]byte // Scan implements the sql.Scanner interface. -func (a *ByteaArray) Scan(src interface{}) error { +func (a *ByteaArray) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -176,7 +177,7 @@ func (a *ByteaArray) scanBytes(src []byte) error { for i, v := range elems { b[i], err = parseBytea(v) if err != nil { - return fmt.Errorf("could not parse bytea array index %d: %s", i, err.Error()) + return fmt.Errorf("could not parse bytea array index %d: %w", i, err) } } *a = b @@ -222,7 +223,7 @@ func (a ByteaArray) Value() (driver.Value, error) { type Float64Array []float64 // Scan implements the sql.Scanner interface. -func (a *Float64Array) Scan(src interface{}) error { +func (a *Float64Array) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -246,8 +247,9 @@ func (a *Float64Array) scanBytes(src []byte) error { } else { b := make(Float64Array, len(elems)) for i, v := range elems { - if b[i], err = strconv.ParseFloat(string(v), 64); err != nil { - return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + b[i], err = strconv.ParseFloat(string(v), 64) + if err != nil { + return fmt.Errorf("pq: parsing array element index %d: %w", i, err) } } *a = b @@ -284,7 +286,7 @@ func (a Float64Array) Value() (driver.Value, error) { type Float32Array []float32 // Scan implements the sql.Scanner interface. -func (a *Float32Array) Scan(src interface{}) error { +func (a *Float32Array) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -308,9 +310,9 @@ func (a *Float32Array) scanBytes(src []byte) error { } else { b := make(Float32Array, len(elems)) for i, v := range elems { - var x float64 - if x, err = strconv.ParseFloat(string(v), 32); err != nil { - return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + x, err := strconv.ParseFloat(string(v), 32) + if err != nil { + return fmt.Errorf("pq: parsing array element index %d: %w", i, err) } b[i] = float32(x) } @@ -345,7 +347,7 @@ func (a Float32Array) Value() (driver.Value, error) { // GenericArray implements the driver.Valuer and sql.Scanner interfaces for // an array or slice of any dimension. -type GenericArray struct{ A interface{} } +type GenericArray struct{ A any } func (GenericArray) evaluateDestination(rt reflect.Type) (reflect.Type, func([]byte, reflect.Value) error, string) { var assign func([]byte, reflect.Value) error @@ -354,7 +356,7 @@ func (GenericArray) evaluateDestination(rt reflect.Type) (reflect.Type, func([]b // TODO calculate the assign function for other types // TODO repeat this section on the element type of arrays or slices (multidimensional) { - if reflect.PtrTo(rt).Implements(typeSQLScanner) { + if reflect.PointerTo(rt).Implements(typeSQLScanner) { // dest is always addressable because it is an element of a slice. assign = func(src []byte, dest reflect.Value) (err error) { ss := dest.Addr().Interface().(sql.Scanner) @@ -383,7 +385,7 @@ FoundType: } // Scan implements the sql.Scanner interface. -func (a GenericArray) Scan(src interface{}) error { +func (a GenericArray) Scan(src any) error { dpv := reflect.ValueOf(a.A) switch { case dpv.Kind() != reflect.Ptr: @@ -449,8 +451,9 @@ func (a GenericArray) scanBytes(src []byte, dv reflect.Value) error { values := reflect.MakeSlice(reflect.SliceOf(dtype), len(elems), len(elems)) for i, e := range elems { - if err := assign(e, values.Index(i)); err != nil { - return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + err := assign(e, values.Index(i)) + if err != nil { + return fmt.Errorf("pq: parsing array element index %d: %w", i, err) } } @@ -502,7 +505,7 @@ func (a GenericArray) Value() (driver.Value, error) { type Int64Array []int64 // Scan implements the sql.Scanner interface. -func (a *Int64Array) Scan(src interface{}) error { +func (a *Int64Array) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -526,8 +529,9 @@ func (a *Int64Array) scanBytes(src []byte) error { } else { b := make(Int64Array, len(elems)) for i, v := range elems { - if b[i], err = strconv.ParseInt(string(v), 10, 64); err != nil { - return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + b[i], err = strconv.ParseInt(string(v), 10, 64) + if err != nil { + return fmt.Errorf("pq: parsing array element index %d: %w", i, err) } } *a = b @@ -563,7 +567,7 @@ func (a Int64Array) Value() (driver.Value, error) { type Int32Array []int32 // Scan implements the sql.Scanner interface. -func (a *Int32Array) Scan(src interface{}) error { +func (a *Int32Array) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -589,7 +593,7 @@ func (a *Int32Array) scanBytes(src []byte) error { for i, v := range elems { x, err := strconv.ParseInt(string(v), 10, 32) if err != nil { - return fmt.Errorf("pq: parsing array element index %d: %v", i, err) + return fmt.Errorf("pq: parsing array element index %d: %w", i, err) } b[i] = int32(x) } @@ -626,7 +630,7 @@ func (a Int32Array) Value() (driver.Value, error) { type StringArray []string // Scan implements the sql.Scanner interface. -func (a *StringArray) Scan(src interface{}) error { +func (a *StringArray) Scan(src any) error { switch src := src.(type) { case []byte: return a.scanBytes(src) @@ -683,10 +687,10 @@ func (a StringArray) Value() (driver.Value, error) { return "{}", nil } -// appendArray appends rv to the buffer, returning the extended buffer and -// the delimiter used between elements. +// appendArray appends rv to the buffer, returning the extended buffer and the +// delimiter used between elements. // -// It panics when n <= 0 or rv's Kind is not reflect.Array nor reflect.Slice. +// Returns an error when n <= 0 or rv is not a reflect.Array or reflect.Slice. func appendArray(b []byte, rv reflect.Value, n int) ([]byte, string, error) { var del string var err error @@ -728,7 +732,7 @@ func appendArrayElement(b []byte, rv reflect.Value) ([]byte, string, error) { var del = "," var err error - var iv interface{} = rv.Interface() + var iv any = rv.Interface() if ad, ok := iv.(ArrayDelimiter); ok { del = ad.ArrayDelimiter() @@ -769,7 +773,11 @@ func appendArrayQuotedBytes(b, v []byte) []byte { } func appendValue(b []byte, v driver.Value) ([]byte, error) { - return append(b, encode(nil, v, 0)...), nil + enc, err := encode(v, 0) + if err != nil { + return nil, err + } + return append(b, enc...), nil } // parseArray extracts the dimensions and elements of an array represented in diff --git a/vendor/github.com/lib/pq/buf.go b/vendor/github.com/lib/pq/buf.go index 4b0a0a8f7e9..67ca60cc618 100644 --- a/vendor/github.com/lib/pq/buf.go +++ b/vendor/github.com/lib/pq/buf.go @@ -3,7 +3,10 @@ package pq import ( "bytes" "encoding/binary" + "errors" + "fmt" + "github.com/lib/pq/internal/proto" "github.com/lib/pq/oid" ) @@ -31,7 +34,7 @@ func (b *readBuf) int16() (n int) { func (b *readBuf) string() string { i := bytes.IndexByte(*b, 0) if i < 0 { - errorf("invalid message format; expected string terminator") + panic(errors.New("pq: invalid message format; expected string terminator")) } s := (*b)[:i] *b = (*b)[i+1:] @@ -69,8 +72,8 @@ func (b *writeBuf) string(s string) { b.buf = append(append(b.buf, s...), '\000') } -func (b *writeBuf) byte(c byte) { - b.buf = append(b.buf, c) +func (b *writeBuf) byte(c proto.RequestCode) { + b.buf = append(b.buf, byte(c)) } func (b *writeBuf) bytes(v []byte) { @@ -79,13 +82,19 @@ func (b *writeBuf) bytes(v []byte) { func (b *writeBuf) wrap() []byte { p := b.buf[b.pos:] + if len(p) > proto.MaxUint32 { + panic(fmt.Errorf("pq: message too large (%d > math.MaxUint32)", len(p))) + } binary.BigEndian.PutUint32(p, uint32(len(p))) return b.buf } -func (b *writeBuf) next(c byte) { +func (b *writeBuf) next(c proto.RequestCode) { p := b.buf[b.pos:] + if len(p) > proto.MaxUint32 { + panic(fmt.Errorf("pq: message too large (%d > math.MaxUint32)", len(p))) + } binary.BigEndian.PutUint32(p, uint32(len(p))) b.pos = len(b.buf) + 1 - b.buf = append(b.buf, c, 0, 0, 0, 0) + b.buf = append(b.buf, byte(c), 0, 0, 0, 0) } diff --git a/vendor/github.com/lib/pq/compose.yaml b/vendor/github.com/lib/pq/compose.yaml new file mode 100644 index 00000000000..1027d4def34 --- /dev/null +++ b/vendor/github.com/lib/pq/compose.yaml @@ -0,0 +1,77 @@ +name: 'pqgo' + +services: + pgbouncer: + profiles: ['pgbouncer'] + image: 'cleanstart/pgbouncer:1.24' + ports: ['127.0.0.1:6432:6432'] + command: ['/init/pgbouncer.ini'] + volumes: ['./testdata/init:/init'] + environment: + 'PGBOUNCER_DATABASE': 'pqgo' + + pgpool: + profiles: ['pgpool'] + image: 'pgpool/pgpool:4.4.3' + ports: ['127.0.0.1:7432:7432'] + volumes: ['./testdata/init:/init'] + entrypoint: '/init/entry-pgpool.sh' + environment: + 'PGPOOL_PARAMS_PORT': '7432' + 'PGPOOL_PARAMS_BACKEND_HOSTNAME0': 'pg18' + + pg18: + image: 'postgres:18' + ports: ['127.0.0.1:5432:5432'] + entrypoint: '/init/entry.sh' + volumes: ['./testdata/init:/init'] + shm_size: '128mb' + environment: + 'POSTGRES_DATABASE': 'pqgo' + 'POSTGRES_USER': 'pqgo' + 'POSTGRES_PASSWORD': 'unused' + pg17: + profiles: ['pg17'] + image: 'postgres:17' + ports: ['127.0.0.1:5432:5432'] + entrypoint: '/init/entry.sh' + volumes: ['./testdata/init:/init'] + shm_size: '128mb' + user: 'root' + environment: + 'POSTGRES_DATABASE': 'pqgo' + 'POSTGRES_USER': 'pqgo' + 'POSTGRES_PASSWORD': 'unused' + pg16: + profiles: ['pg16'] + image: 'postgres:16' + ports: ['127.0.0.1:5432:5432'] + entrypoint: '/init/entry.sh' + volumes: ['./testdata/init:/init'] + shm_size: '128mb' + environment: + 'POSTGRES_DATABASE': 'pqgo' + 'POSTGRES_USER': 'pqgo' + 'POSTGRES_PASSWORD': 'unused' + pg15: + profiles: ['pg15'] + image: 'postgres:15' + ports: ['127.0.0.1:5432:5432'] + entrypoint: '/init/entry.sh' + volumes: ['./testdata/init:/init'] + shm_size: '128mb' + environment: + 'POSTGRES_DATABASE': 'pqgo' + 'POSTGRES_USER': 'pqgo' + 'POSTGRES_PASSWORD': 'unused' + pg14: + profiles: ['pg14'] + image: 'postgres:14' + ports: ['127.0.0.1:5432:5432'] + entrypoint: '/init/entry.sh' + volumes: ['./testdata/init:/init'] + shm_size: '128mb' + environment: + 'POSTGRES_DATABASE': 'pqgo' + 'POSTGRES_USER': 'pqgo' + 'POSTGRES_PASSWORD': 'unused' diff --git a/vendor/github.com/lib/pq/conn.go b/vendor/github.com/lib/pq/conn.go index da4ff9de603..5e7ce20da3a 100644 --- a/vendor/github.com/lib/pq/conn.go +++ b/vendor/github.com/lib/pq/conn.go @@ -2,7 +2,6 @@ package pq import ( "bufio" - "bytes" "context" "crypto/md5" "crypto/sha256" @@ -12,30 +11,31 @@ import ( "errors" "fmt" "io" + "math" "net" "os" - "os/user" - "path" - "path/filepath" + "reflect" "strconv" "strings" "sync" "time" - "unicode" + "github.com/lib/pq/internal/pgpass" + "github.com/lib/pq/internal/pqsql" + "github.com/lib/pq/internal/pqutil" + "github.com/lib/pq/internal/proto" "github.com/lib/pq/oid" "github.com/lib/pq/scram" ) // Common error types var ( - ErrNotSupported = errors.New("pq: Unsupported command") - ErrInFailedTransaction = errors.New("pq: Could not complete operation in a failed transaction") + ErrNotSupported = errors.New("pq: unsupported command") + ErrInFailedTransaction = errors.New("pq: could not complete operation in a failed transaction") ErrSSLNotSupported = errors.New("pq: SSL is not enabled on the server") - ErrSSLKeyUnknownOwnership = errors.New("pq: Could not get owner information for private key, may not be properly protected") - ErrSSLKeyHasWorldPermissions = errors.New("pq: Private key has world access. Permissions should be u=rw,g=r (0640) if owned by root, or u=rw (0600), or less") - - ErrCouldNotDetectUsername = errors.New("pq: Could not detect default username. Please provide one explicitly") + ErrCouldNotDetectUsername = errors.New("pq: could not detect default username; please provide one explicitly") + ErrSSLKeyUnknownOwnership = pqutil.ErrSSLKeyUnknownOwnership + ErrSSLKeyHasWorldPermissions = pqutil.ErrSSLKeyHasWorldPermissions errUnexpectedReady = errors.New("unexpected ReadyForQuery") errNoRowsAffected = errors.New("no RowsAffected available after the empty statement") @@ -44,9 +44,32 @@ var ( // Compile time validation that our types implement the expected interfaces var ( - _ driver.Driver = Driver{} + _ driver.Driver = Driver{} + _ driver.ConnBeginTx = (*conn)(nil) + _ driver.ConnPrepareContext = (*conn)(nil) + _ driver.Execer = (*conn)(nil) //lint:ignore SA1019 x + _ driver.ExecerContext = (*conn)(nil) + _ driver.NamedValueChecker = (*conn)(nil) + _ driver.Pinger = (*conn)(nil) + _ driver.Queryer = (*conn)(nil) //lint:ignore SA1019 x + _ driver.QueryerContext = (*conn)(nil) + _ driver.SessionResetter = (*conn)(nil) + _ driver.Validator = (*conn)(nil) + _ driver.StmtExecContext = (*stmt)(nil) + _ driver.StmtQueryContext = (*stmt)(nil) ) +func init() { + sql.Register("postgres", &Driver{}) +} + +var debugProto = func() bool { + // Check for exactly "1" (rather than mere existence) so we can add + // options/flags in the future. I don't know if we ever want that, but it's + // nice to leave the option open. + return os.Getenv("PQGO_DEBUG") == "1" +}() + // Driver is the Postgres database driver. type Driver struct{} @@ -57,19 +80,27 @@ func (d Driver) Open(name string) (driver.Conn, error) { return Open(name) } -func init() { - sql.Register("postgres", &Driver{}) +// Parameters sent by PostgreSQL on startup. +type parameterStatus struct { + serverVersion int + currentLocation *time.Location + inHotStandby, defaultTransactionReadOnly sql.NullBool } -type parameterStatus struct { - // server version in the same format as server_version_num, or 0 if - // unavailable - serverVersion int +type format int - // the current location based on the TimeZone value of the session, if - // available - currentLocation *time.Location -} +const ( + formatText format = 0 + formatBinary format = 1 +) + +var ( + // One result-column format code with the value 1 (i.e. all binary). + colFmtDataAllBinary = []byte{0, 1, 0, 1} + + // No result-column format codes (i.e. all text). + colFmtDataAllText = []byte{0, 0} +) type transactionStatus byte @@ -88,10 +119,8 @@ func (s transactionStatus) String() string { case txnStatusInFailedTransaction: return "in a failed transaction" default: - errorf("unknown transactionStatus %d", s) + panic(fmt.Sprintf("pq: unknown transactionStatus %d", s)) } - - panic("not reached") } // Dialer is the dialer interface. It can be used to obtain more control over @@ -113,13 +142,13 @@ type defaultDialer struct { func (d defaultDialer) Dial(network, address string) (net.Conn, error) { return d.d.Dial(network, address) } -func (d defaultDialer) DialTimeout( - network, address string, timeout time.Duration, -) (net.Conn, error) { + +func (d defaultDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) { ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() return d.DialContext(ctx, network, address) } + func (d defaultDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) { return d.d.DialContext(ctx, network, address) } @@ -133,16 +162,11 @@ type conn struct { txnFinish func() // Save connection arguments to use during CancelRequest. - dialer Dialer - opts values - - // Cancellation key data for use with CancelRequest messages. - processID int - secretKey int - + dialer Dialer + cfg Config parameterStatus parameterStatus - saveMessageType byte + saveMessageType proto.ResponseCode saveMessageBuffer []byte // If an error is set, this connection is bad and all public-facing @@ -150,26 +174,11 @@ type conn struct { // (ErrBadConn) or getForNext(). err syncErr - // If set, this connection should never use the binary format when - // receiving query results from prepared statements. Only provided for - // debugging. - disablePreparedBinaryResult bool - - // Whether to always send []byte parameters over as binary. Enables single - // round-trip mode for non-prepared Query calls. - binaryParameters bool - - // If true this connection is in the middle of a COPY - inCopy bool - - // If not nil, notices will be synchronously sent here - noticeHandler func(*Error) - - // If not nil, notifications will be synchronously sent here - notificationHandler func(*Notification) - - // GSSAPI context - gss GSS + processID, secretKey int // Cancellation key data for use with CancelRequest messages. + inCopy bool // If true this connection is in the middle of a COPY + noticeHandler func(*Error) // If not nil, notices will be synchronously sent here + notificationHandler func(*Notification) // If not nil, notifications will be synchronously sent here + gss GSS // GSSAPI context } type syncErr struct { @@ -206,125 +215,16 @@ func (e *syncErr) set(err error) { } } -// Handle driver-side settings in parsed connection string. -func (cn *conn) handleDriverSettings(o values) (err error) { - boolSetting := func(key string, val *bool) error { - if value, ok := o[key]; ok { - if value == "yes" { - *val = true - } else if value == "no" { - *val = false - } else { - return fmt.Errorf("unrecognized value %q for %s", value, key) - } - } - return nil - } - - err = boolSetting("disable_prepared_binary_result", &cn.disablePreparedBinaryResult) - if err != nil { - return err - } - return boolSetting("binary_parameters", &cn.binaryParameters) -} - -func (cn *conn) handlePgpass(o values) { - // if a password was supplied, do not process .pgpass - if _, ok := o["password"]; ok { - return - } - filename := os.Getenv("PGPASSFILE") - if filename == "" { - // XXX this code doesn't work on Windows where the default filename is - // XXX %APPDATA%\postgresql\pgpass.conf - // Prefer $HOME over user.Current due to glibc bug: golang.org/issue/13470 - userHome := os.Getenv("HOME") - if userHome == "" { - user, err := user.Current() - if err != nil { - return - } - userHome = user.HomeDir - } - filename = filepath.Join(userHome, ".pgpass") - } - fileinfo, err := os.Stat(filename) - if err != nil { - return - } - mode := fileinfo.Mode() - if mode&(0x77) != 0 { - // XXX should warn about incorrect .pgpass permissions as psql does - return - } - file, err := os.Open(filename) - if err != nil { - return - } - defer file.Close() - scanner := bufio.NewScanner(io.Reader(file)) - // From: https://github.com/tg/pgpass/blob/master/reader.go - for scanner.Scan() { - if scanText(scanner.Text(), o) { - break - } - } -} - -// GetFields is a helper function for scanText. -func getFields(s string) []string { - fs := make([]string, 0, 5) - f := make([]rune, 0, len(s)) - - var esc bool - for _, c := range s { - switch { - case esc: - f = append(f, c) - esc = false - case c == '\\': - esc = true - case c == ':': - fs = append(fs, string(f)) - f = f[:0] - default: - f = append(f, c) - } - } - return append(fs, string(f)) -} - -// ScanText assists HandlePgpass in it's objective. -func scanText(line string, o values) bool { - hostname := o["host"] - ntw, _ := network(o) - port := o["port"] - db := o["dbname"] - username := o["user"] - if len(line) == 0 || line[0] == '#' { - return false - } - split := getFields(line) - if len(split) != 5 { - return false - } - if (split[0] == "*" || split[0] == hostname || (split[0] == "localhost" && (hostname == "" || ntw == "unix"))) && (split[1] == "*" || split[1] == port) && (split[2] == "*" || split[2] == db) && (split[3] == "*" || split[3] == username) { - o["password"] = split[4] - return true - } - return false -} - -func (cn *conn) writeBuf(b byte) *writeBuf { - cn.scratch[0] = b +func (cn *conn) writeBuf(b proto.RequestCode) *writeBuf { + cn.scratch[0] = byte(b) return &writeBuf{ buf: cn.scratch[:5], pos: 1, } } -// Open opens a new connection to the database. dsn is a connection string. -// Most users should only use it through database/sql package from the standard +// Open opens a new connection to the database. dsn is a connection string. Most +// users should only use it through database/sql package from the standard // library. func Open(dsn string) (_ driver.Conn, err error) { return DialOpen(defaultDialer{}, dsn) @@ -340,86 +240,200 @@ func DialOpen(d Dialer, dsn string) (_ driver.Conn, err error) { return c.open(context.Background()) } -func (c *Connector) open(ctx context.Context) (cn *conn, err error) { - // Handle any panics during connection initialization. Note that we - // specifically do *not* want to use errRecover(), as that would turn any - // connection errors into ErrBadConns, hiding the real error message from - // the user. - defer errRecoverNoErrBadConn(&err) +func (c *Connector) open(ctx context.Context) (*conn, error) { + tsa := c.cfg.TargetSessionAttrs +restart: + var ( + errs []error + app = func(err error, cfg Config) bool { + if err != nil { + if debugProto { + fmt.Println("CONNECT (error)", err) + } + errs = append(errs, fmt.Errorf("connecting to %s:%d: %w", cfg.Host, cfg.Port, err)) + } + return err != nil + } + ) + for _, cfg := range c.cfg.hosts() { + if debugProto { + fmt.Println("CONNECT ", cfg.string()) + } + + cn := &conn{cfg: cfg, dialer: c.dialer} + cn.cfg.Password = pgpass.PasswordFromPgpass(cn.cfg.Passfile, cn.cfg.User, cn.cfg.Password, + cn.cfg.Host, strconv.Itoa(int(cn.cfg.Port)), cn.cfg.Database, cn.cfg.isset("password")) + + var err error + cn.c, err = dial(ctx, c.dialer, cn.cfg) + if app(err, cfg) { + continue + } + + err = cn.ssl(cn.cfg) + if app(err, cfg) { + if cn.c != nil { + _ = cn.c.Close() + } + continue + } + + cn.buf = bufio.NewReader(cn.c) + err = cn.startup(cn.cfg) + if app(err, cfg) { + _ = cn.c.Close() + continue + } + + // Reset the deadline, in case one was set (see dial) + if cn.cfg.ConnectTimeout > 0 { + err := cn.c.SetDeadline(time.Time{}) + if app(err, cfg) { + _ = cn.c.Close() + continue + } + } + + err = cn.checkTSA(tsa) + if app(err, cfg) { + _ = cn.c.Close() + continue + } - // Create a new values map (copy). This makes it so maps in different - // connections do not reference the same underlying data structure, so it - // is safe for multiple connections to concurrently write to their opts. - o := make(values) - for k, v := range c.opts { - o[k] = v + return cn, nil } - cn = &conn{ - opts: o, - dialer: c.dialer, + // target_session_attrs=prefer-standby is treated as standby in checkTSA; we + // ran out of hosts so none are on standby. Clear the setting and try again. + if c.cfg.TargetSessionAttrs == TargetSessionAttrsPreferStandby { + tsa = TargetSessionAttrsAny + goto restart } - err = cn.handleDriverSettings(o) - if err != nil { - return nil, err + + if len(c.cfg.Multi) == 0 { + // Remove the "connecting to [..]" when we have just one host, so the + // error is identical to what we had before. + return nil, errors.Unwrap(errs[0]) } - cn.handlePgpass(o) + return nil, fmt.Errorf("pq: could not connect to any of the hosts:\n%w", errors.Join(errs...)) +} - cn.c, err = dial(ctx, c.dialer, o) +func (cn *conn) getBool(query string) (bool, error) { + res, err := cn.simpleQuery(query) if err != nil { - return nil, err + return false, err } + defer res.Close() - err = cn.ssl(o) + v := make([]driver.Value, 1) + err = res.Next(v) if err != nil { - if cn.c != nil { - cn.c.Close() - } - return nil, err + return false, err } - // cn.startup panics on error. Make sure we don't leak cn.c. - panicking := true - defer func() { - if panicking { - cn.c.Close() + switch vv := v[0].(type) { + default: + return false, fmt.Errorf("parseBool: unknown type %T: %[1]v", v[0]) + case bool: + return vv, nil + case string: + vv, ok := v[0].(string) + if !ok { + return false, err } - }() - - cn.buf = bufio.NewReader(cn.c) - cn.startup(o) - - // reset the deadline, in case one was set (see dial) - if timeout, ok := o["connect_timeout"]; ok && timeout != "0" { - err = cn.c.SetDeadline(time.Time{}) + return vv == "on", nil } - panicking = false - return cn, err } -func dial(ctx context.Context, d Dialer, o values) (net.Conn, error) { - network, address := network(o) +func (cn *conn) checkTSA(tsa TargetSessionAttrs) error { + var ( + geths = func() (hs bool, err error) { + hs = cn.parameterStatus.inHotStandby.Bool + if !cn.parameterStatus.inHotStandby.Valid { + hs, err = cn.getBool("select pg_catalog.pg_is_in_recovery()") + } + return hs, err + } + getro = func() (ro bool, err error) { + ro = cn.parameterStatus.defaultTransactionReadOnly.Bool + if !cn.parameterStatus.defaultTransactionReadOnly.Valid { + ro, err = cn.getBool("show transaction_read_only") + } + return ro, err + } + ) - // Zero or not specified means wait indefinitely. - if timeout, ok := o["connect_timeout"]; ok && timeout != "0" { - seconds, err := strconv.ParseInt(timeout, 10, 0) + switch tsa { + default: + panic("unreachable") + case "", TargetSessionAttrsAny: + return nil + case TargetSessionAttrsReadWrite, TargetSessionAttrsReadOnly: + readonly, err := getro() if err != nil { - return nil, fmt.Errorf("invalid value for parameter connect_timeout: %s", err) + return err } - duration := time.Duration(seconds) * time.Second + if !cn.parameterStatus.defaultTransactionReadOnly.Valid { + var err error + readonly, err = cn.getBool("show transaction_read_only") + if err != nil { + return err + } + } + switch { + case tsa == TargetSessionAttrsReadOnly && !readonly: + return errors.New("session is not read-only") + case tsa == TargetSessionAttrsReadWrite: + if readonly { + return errors.New("session is read-only") + } + hs, err := geths() + if err != nil { + return err + } + if hs { + return errors.New("server is in hot standby mode") + } + return nil + default: + return nil + } + case TargetSessionAttrsPrimary, TargetSessionAttrsStandby, TargetSessionAttrsPreferStandby: + hs, err := geths() + if err != nil { + return err + } + switch { + case (tsa == TargetSessionAttrsStandby || tsa == TargetSessionAttrsPreferStandby) && !hs: + return errors.New("server is not in hot standby mode") + case tsa == TargetSessionAttrsPrimary && hs: + return errors.New("server is in hot standby mode") + default: + return nil + } + } +} + +func dial(ctx context.Context, d Dialer, cfg Config) (net.Conn, error) { + network, address := cfg.network() + // Zero or not specified means wait indefinitely. + if cfg.ConnectTimeout > 0 { // connect_timeout should apply to the entire connection establishment // procedure, so we both use a timeout for the TCP connection - // establishment and set a deadline for doing the initial handshake. - // The deadline is then reset after startup() is done. - deadline := time.Now().Add(duration) - var conn net.Conn + // establishment and set a deadline for doing the initial handshake. The + // deadline is then reset after startup() is done. + var ( + deadline = time.Now().Add(cfg.ConnectTimeout) + conn net.Conn + err error + ) if dctx, ok := d.(DialerContext); ok { - ctx, cancel := context.WithTimeout(ctx, duration) + ctx, cancel := context.WithTimeout(ctx, cfg.ConnectTimeout) defer cancel() conn, err = dctx.DialContext(ctx, network, address) } else { - conn, err = d.DialTimeout(network, address, duration) + conn, err = d.DialTimeout(network, address, cfg.ConnectTimeout) } if err != nil { return nil, err @@ -433,140 +447,17 @@ func dial(ctx context.Context, d Dialer, o values) (net.Conn, error) { return d.Dial(network, address) } -func network(o values) (string, string) { - host := o["host"] - - if strings.HasPrefix(host, "/") { - sockPath := path.Join(host, ".s.PGSQL."+o["port"]) - return "unix", sockPath - } - - return "tcp", net.JoinHostPort(host, o["port"]) -} - -type values map[string]string - -// scanner implements a tokenizer for libpq-style option strings. -type scanner struct { - s []rune - i int -} - -// newScanner returns a new scanner initialized with the option string s. -func newScanner(s string) *scanner { - return &scanner{[]rune(s), 0} -} - -// Next returns the next rune. -// It returns 0, false if the end of the text has been reached. -func (s *scanner) Next() (rune, bool) { - if s.i >= len(s.s) { - return 0, false - } - r := s.s[s.i] - s.i++ - return r, true -} - -// SkipSpaces returns the next non-whitespace rune. -// It returns 0, false if the end of the text has been reached. -func (s *scanner) SkipSpaces() (rune, bool) { - r, ok := s.Next() - for unicode.IsSpace(r) && ok { - r, ok = s.Next() - } - return r, ok -} - -// parseOpts parses the options from name and adds them to the values. -// -// The parsing code is based on conninfo_parse from libpq's fe-connect.c -func parseOpts(name string, o values) error { - s := newScanner(name) - - for { - var ( - keyRunes, valRunes []rune - r rune - ok bool - ) - - if r, ok = s.SkipSpaces(); !ok { - break - } - - // Scan the key - for !unicode.IsSpace(r) && r != '=' { - keyRunes = append(keyRunes, r) - if r, ok = s.Next(); !ok { - break - } - } - - // Skip any whitespace if we're not at the = yet - if r != '=' { - r, ok = s.SkipSpaces() - } - - // The current character should be = - if r != '=' || !ok { - return fmt.Errorf(`missing "=" after %q in connection info string"`, string(keyRunes)) - } - - // Skip any whitespace after the = - if r, ok = s.SkipSpaces(); !ok { - // If we reach the end here, the last value is just an empty string as per libpq. - o[string(keyRunes)] = "" - break - } - - if r != '\'' { - for !unicode.IsSpace(r) { - if r == '\\' { - if r, ok = s.Next(); !ok { - return fmt.Errorf(`missing character after backslash`) - } - } - valRunes = append(valRunes, r) - - if r, ok = s.Next(); !ok { - break - } - } - } else { - quote: - for { - if r, ok = s.Next(); !ok { - return fmt.Errorf(`unterminated quoted string literal in connection string`) - } - switch r { - case '\'': - break quote - case '\\': - r, _ = s.Next() - fallthrough - default: - valRunes = append(valRunes, r) - } - } - } - - o[string(keyRunes)] = string(valRunes) - } - - return nil -} - func (cn *conn) isInTransaction() bool { return cn.txnStatus == txnStatusIdleInTransaction || cn.txnStatus == txnStatusInFailedTransaction } -func (cn *conn) checkIsInTransaction(intxn bool) { +func (cn *conn) checkIsInTransaction(intxn bool) error { if cn.isInTransaction() != intxn { cn.err.set(driver.ErrBadConn) - errorf("unexpected transaction status %v", cn.txnStatus) + return fmt.Errorf("pq: unexpected transaction status %v", cn.txnStatus) } + return nil } func (cn *conn) Begin() (_ driver.Tx, err error) { @@ -577,12 +468,13 @@ func (cn *conn) begin(mode string) (_ driver.Tx, err error) { if err := cn.err.get(); err != nil { return nil, err } - defer cn.errRecover(&err) + if err := cn.checkIsInTransaction(false); err != nil { + return nil, err + } - cn.checkIsInTransaction(false) _, commandTag, err := cn.simpleExec("BEGIN" + mode) if err != nil { - return nil, err + return nil, cn.handleError(err) } if commandTag != "BEGIN" { cn.err.set(driver.ErrBadConn) @@ -601,14 +493,15 @@ func (cn *conn) closeTxn() { } } -func (cn *conn) Commit() (err error) { +func (cn *conn) Commit() error { defer cn.closeTxn() if err := cn.err.get(); err != nil { return err } - defer cn.errRecover(&err) + if err := cn.checkIsInTransaction(true); err != nil { + return err + } - cn.checkIsInTransaction(true) // We don't want the client to think that everything is okay if it tries // to commit a failed transaction. However, no matter what we return, // database/sql will release this connection back into the free connection @@ -627,27 +520,33 @@ func (cn *conn) Commit() (err error) { if cn.isInTransaction() { cn.err.set(driver.ErrBadConn) } - return err + return cn.handleError(err) } if commandTag != "COMMIT" { cn.err.set(driver.ErrBadConn) return fmt.Errorf("unexpected command tag %s", commandTag) } - cn.checkIsInTransaction(false) - return nil + return cn.checkIsInTransaction(false) } -func (cn *conn) Rollback() (err error) { +func (cn *conn) Rollback() error { defer cn.closeTxn() if err := cn.err.get(); err != nil { return err } - defer cn.errRecover(&err) - return cn.rollback() + + err := cn.rollback() + if err != nil { + return cn.handleError(err) + } + return nil } func (cn *conn) rollback() (err error) { - cn.checkIsInTransaction(true) + if err := cn.checkIsInTransaction(true); err != nil { + return err + } + _, commandTag, err := cn.simpleExec("ROLLBACK") if err != nil { if cn.isInTransaction() { @@ -658,8 +557,7 @@ func (cn *conn) rollback() (err error) { if commandTag != "ROLLBACK" { return fmt.Errorf("unexpected command tag %s", commandTag) } - cn.checkIsInTransaction(false) - return nil + return cn.checkIsInTransaction(false) } func (cn *conn) gname() string { @@ -667,126 +565,136 @@ func (cn *conn) gname() string { return strconv.FormatInt(int64(cn.namei), 10) } -func (cn *conn) simpleExec(q string) (res driver.Result, commandTag string, err error) { - b := cn.writeBuf('Q') +func (cn *conn) simpleExec(q string) (res driver.Result, commandTag string, resErr error) { + if debugProto { + fmt.Fprintf(os.Stderr, " START conn.simpleExec\n") + defer fmt.Fprintf(os.Stderr, " END conn.simpleExec\n") + } + + b := cn.writeBuf(proto.Query) b.string(q) - cn.send(b) + err := cn.send(b) + if err != nil { + return nil, "", err + } for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return nil, "", err + } switch t { - case 'C': - res, commandTag = cn.parseComplete(r.string()) - case 'Z': + case proto.CommandComplete: + res, commandTag, err = cn.parseComplete(r.string()) + if err != nil { + return nil, "", err + } + case proto.ReadyForQuery: cn.processReadyForQuery(r) - if res == nil && err == nil { - err = errUnexpectedReady + if res == nil && resErr == nil { + resErr = errUnexpectedReady } - // done - return - case 'E': - err = parseError(r) - case 'I': + return res, commandTag, resErr + case proto.ErrorResponse: + resErr = parseError(r, q) + case proto.EmptyQueryResponse: res = emptyRows - case 'T', 'D': + case proto.RowDescription, proto.DataRow: // ignore any results default: cn.err.set(driver.ErrBadConn) - errorf("unknown response for simple query: %q", t) + return nil, "", fmt.Errorf("pq: unknown response for simple query: %q", t) } } } -func (cn *conn) simpleQuery(q string) (res *rows, err error) { - defer cn.errRecover(&err) +func (cn *conn) simpleQuery(q string) (*rows, error) { + if debugProto { + fmt.Fprintf(os.Stderr, " START conn.simpleQuery\n") + defer fmt.Fprintf(os.Stderr, " END conn.simpleQuery\n") + } - b := cn.writeBuf('Q') + b := cn.writeBuf(proto.Query) b.string(q) - cn.send(b) + err := cn.send(b) + if err != nil { + return nil, cn.handleError(err, q) + } + var ( + res *rows + resErr error + ) for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return nil, cn.handleError(err, q) + } switch t { - case 'C', 'I': + case proto.CommandComplete, proto.EmptyQueryResponse: // We allow queries which don't return any results through Query as - // well as Exec. We still have to give database/sql a rows object + // well as Exec. We still have to give database/sql a rows object // the user can close, though, to avoid connections from being - // leaked. A "rows" with done=true works fine for that purpose. - if err != nil { + // leaked. A "rows" with done=true works fine for that purpose. + if resErr != nil { cn.err.set(driver.ErrBadConn) - errorf("unexpected message %q in simple query execution", t) + return nil, fmt.Errorf("pq: unexpected message %q in simple query execution", t) } if res == nil { - res = &rows{ - cn: cn, - } + res = &rows{cn: cn} } // Set the result and tag to the last command complete if there wasn't a // query already run. Although queries usually return from here and cede // control to Next, a query with zero results does not. - if t == 'C' { - res.result, res.tag = cn.parseComplete(r.string()) + if t == proto.CommandComplete { + res.result, res.tag, err = cn.parseComplete(r.string()) + if err != nil { + return nil, cn.handleError(err, q) + } if res.colNames != nil { - return + return res, cn.handleError(resErr, q) } } res.done = true - case 'Z': + case proto.ReadyForQuery: cn.processReadyForQuery(r) - // done - return - case 'E': + if err == nil && res == nil { + res = &rows{done: true} + } + return res, cn.handleError(resErr, q) // done + case proto.ErrorResponse: res = nil - err = parseError(r) - case 'D': + resErr = parseError(r, q) + case proto.DataRow: if res == nil { cn.err.set(driver.ErrBadConn) - errorf("unexpected DataRow in simple query execution") + return nil, fmt.Errorf("pq: unexpected DataRow in simple query execution") } - // the query didn't fail; kick off to Next - cn.saveMessage(t, r) - return - case 'T': + return res, cn.saveMessage(t, r) // The query didn't fail; kick off to Next + case proto.RowDescription: // res might be non-nil here if we received a previous - // CommandComplete, but that's fine; just overwrite it - res = &rows{cn: cn} - res.rowsHeader = parsePortalRowDescribe(r) + // CommandComplete, but that's fine and just overwrite it. + res = &rows{cn: cn, rowsHeader: parsePortalRowDescribe(r)} // To work around a bug in QueryRow in Go 1.2 and earlier, wait // until the first DataRow has been received. default: cn.err.set(driver.ErrBadConn) - errorf("unknown response for simple query: %q", t) + return nil, fmt.Errorf("pq: unknown response for simple query: %q", t) } } } -type noRows struct{} - -var emptyRows noRows - -var _ driver.Result = noRows{} - -func (noRows) LastInsertId() (int64, error) { - return 0, errNoLastInsertID -} - -func (noRows) RowsAffected() (int64, error) { - return 0, errNoRowsAffected -} - // Decides which column formats to use for a prepared statement. The input is // an array of type oids, one element per result column. -func decideColumnFormats( - colTyps []fieldDesc, forceText bool, -) (colFmts []format, colFmtData []byte) { +func decideColumnFormats(colTyps []fieldDesc, forceText bool) (colFmts []format, colFmtData []byte, _ error) { if len(colTyps) == 0 { - return nil, colFmtDataAllText + return nil, colFmtDataAllText, nil } colFmts = make([]format, len(colTyps)) if forceText { - return colFmts, colFmtDataAllText + return colFmts, colFmtDataAllText, nil } allBinary := true @@ -807,95 +715,164 @@ func decideColumnFormats( case oid.T_uuid: colFmts[i] = formatBinary allText = false - default: allBinary = false } } if allBinary { - return colFmts, colFmtDataAllBinary + return colFmts, colFmtDataAllBinary, nil } else if allText { - return colFmts, colFmtDataAllText + return colFmts, colFmtDataAllText, nil } else { colFmtData = make([]byte, 2+len(colFmts)*2) + if len(colFmts) > math.MaxUint16 { + return nil, nil, fmt.Errorf("pq: too many columns (%d > math.MaxUint16)", len(colFmts)) + } binary.BigEndian.PutUint16(colFmtData, uint16(len(colFmts))) for i, v := range colFmts { binary.BigEndian.PutUint16(colFmtData[2+i*2:], uint16(v)) } - return colFmts, colFmtData + return colFmts, colFmtData, nil } } -func (cn *conn) prepareTo(q, stmtName string) *stmt { +func (cn *conn) prepareTo(q, stmtName string) (*stmt, error) { + if debugProto { + fmt.Fprintf(os.Stderr, " START conn.prepareTo\n") + defer fmt.Fprintf(os.Stderr, " END conn.prepareTo\n") + } + st := &stmt{cn: cn, name: stmtName} - b := cn.writeBuf('P') + b := cn.writeBuf(proto.Parse) b.string(st.name) b.string(q) b.int16(0) - b.next('D') - b.byte('S') + b.next(proto.Describe) + b.byte(proto.Sync) b.string(st.name) - b.next('S') - cn.send(b) + b.next(proto.Sync) + err := cn.send(b) + if err != nil { + return nil, err + } - cn.readParseResponse() - st.paramTyps, st.colNames, st.colTyps = cn.readStatementDescribeResponse() - st.colFmts, st.colFmtData = decideColumnFormats(st.colTyps, cn.disablePreparedBinaryResult) - cn.readReadyForQuery() - return st + err = cn.readParseResponse() + if err != nil { + return nil, err + } + st.paramTyps, st.colNames, st.colTyps, err = cn.readStatementDescribeResponse() + if err != nil { + return nil, err + } + st.colFmts, st.colFmtData, err = decideColumnFormats(st.colTyps, cn.cfg.DisablePreparedBinaryResult) + if err != nil { + return nil, err + } + + err = cn.readReadyForQuery() + if err != nil { + return nil, err + } + return st, nil } -func (cn *conn) Prepare(q string) (_ driver.Stmt, err error) { +func (cn *conn) Prepare(q string) (driver.Stmt, error) { if err := cn.err.get(); err != nil { return nil, err } - defer cn.errRecover(&err) - if len(q) >= 4 && strings.EqualFold(q[:4], "COPY") { + if pqsql.StartsWithCopy(q) { s, err := cn.prepareCopyIn(q) if err == nil { cn.inCopy = true } - return s, err + return s, cn.handleError(err, q) } - return cn.prepareTo(q, cn.gname()), nil + s, err := cn.prepareTo(q, cn.gname()) + if err != nil { + return nil, cn.handleError(err, q) + } + return s, nil } -func (cn *conn) Close() (err error) { - // Skip cn.bad return here because we always want to close a connection. - defer cn.errRecover(&err) - - // Ensure that cn.c.Close is always run. Since error handling is done with - // panics and cn.errRecover, the Close must be in a defer. - defer func() { - cerr := cn.c.Close() - if err == nil { - err = cerr - } - }() - +func (cn *conn) Close() error { // Don't go through send(); ListenerConn relies on us not scribbling on the // scratch buffer of this connection. - return cn.sendSimpleMessage('X') + err := cn.sendSimpleMessage(proto.Terminate) + if err != nil { + _ = cn.c.Close() // Ensure that cn.c.Close is always run. + return cn.handleError(err) + } + return cn.c.Close() +} + +func toNamedValue(v []driver.Value) []driver.NamedValue { + v2 := make([]driver.NamedValue, len(v)) + for i := range v { + v2[i] = driver.NamedValue{Ordinal: i + 1, Value: v[i]} + } + return v2 +} + +// CheckNamedValue implements [driver.NamedValueChecker]. +func (cn *conn) CheckNamedValue(nv *driver.NamedValue) error { + // Ignore Valuer, for backward compatibility with pq.Array(). + if _, ok := nv.Value.(driver.Valuer); ok { + return driver.ErrSkip + } + + v := reflect.ValueOf(nv.Value) + if !v.IsValid() { + return driver.ErrSkip + } + t := v.Type() + for t.Kind() == reflect.Ptr { + t, v = t.Elem(), v.Elem() + } + + // Ignore []byte and related types: *[]byte, json.RawMessage, etc. + if t.Kind() == reflect.Slice && t.Elem().Kind() == reflect.Uint8 { + return driver.ErrSkip + } + + switch v.Kind() { + default: + return driver.ErrSkip + case reflect.Slice: + var err error + nv.Value, err = Array(v.Interface()).Value() + return err + case reflect.Uint64: + value := v.Uint() + if value >= math.MaxInt64 { + nv.Value = strconv.FormatUint(value, 10) + } else { + nv.Value = int64(value) + } + return nil + } } // Implement the "Queryer" interface func (cn *conn) Query(query string, args []driver.Value) (driver.Rows, error) { - return cn.query(query, args) + return cn.query(query, toNamedValue(args)) } -func (cn *conn) query(query string, args []driver.Value) (_ *rows, err error) { +func (cn *conn) query(query string, args []driver.NamedValue) (*rows, error) { + if debugProto { + fmt.Fprintf(os.Stderr, " START conn.query\n") + defer fmt.Fprintf(os.Stderr, " END conn.query\n") + } if err := cn.err.get(); err != nil { return nil, err } if cn.inCopy { return nil, errCopyInProgress } - defer cn.errRecover(&err) // Check to see if we can use the "simpleQuery" interface, which is // *much* faster than going through prepare/exec @@ -903,18 +880,40 @@ func (cn *conn) query(query string, args []driver.Value) (_ *rows, err error) { return cn.simpleQuery(query) } - if cn.binaryParameters { - cn.sendBinaryModeQuery(query, args) - - cn.readParseResponse() - cn.readBindResponse() - rows := &rows{cn: cn} - rows.rowsHeader = cn.readPortalDescribeResponse() - cn.postExecuteWorkaround() - return rows, nil + if cn.cfg.BinaryParameters { + err := cn.sendBinaryModeQuery(query, args) + if err != nil { + return nil, cn.handleError(err, query) + } + err = cn.readParseResponse() + if err != nil { + return nil, cn.handleError(err, query) + } + err = cn.readBindResponse() + if err != nil { + return nil, cn.handleError(err, query) + } + + rows := &rows{cn: cn} + rows.rowsHeader, err = cn.readPortalDescribeResponse() + if err != nil { + return nil, cn.handleError(err, query) + } + err = cn.postExecuteWorkaround() + if err != nil { + return nil, cn.handleError(err, query) + } + return rows, nil + } + + st, err := cn.prepareTo(query, "") + if err != nil { + return nil, cn.handleError(err, query) + } + err = st.exec(args) + if err != nil { + return nil, cn.handleError(err, query) } - st := cn.prepareTo(query, "") - st.exec(args) return &rows{ cn: cn, rowsHeader: st.rowsHeader, @@ -922,69 +921,100 @@ func (cn *conn) query(query string, args []driver.Value) (_ *rows, err error) { } // Implement the optional "Execer" interface for one-shot queries -func (cn *conn) Exec(query string, args []driver.Value) (res driver.Result, err error) { +func (cn *conn) Exec(query string, args []driver.Value) (driver.Result, error) { if err := cn.err.get(); err != nil { return nil, err } - defer cn.errRecover(&err) - // Check to see if we can use the "simpleExec" interface, which is - // *much* faster than going through prepare/exec + // Check to see if we can use the "simpleExec" interface, which is *much* + // faster than going through prepare/exec if len(args) == 0 { // ignore commandTag, our caller doesn't care r, _, err := cn.simpleExec(query) - return r, err + return r, cn.handleError(err, query) } - if cn.binaryParameters { - cn.sendBinaryModeQuery(query, args) + if cn.cfg.BinaryParameters { + err := cn.sendBinaryModeQuery(query, toNamedValue(args)) + if err != nil { + return nil, cn.handleError(err, query) + } + err = cn.readParseResponse() + if err != nil { + return nil, cn.handleError(err, query) + } + err = cn.readBindResponse() + if err != nil { + return nil, cn.handleError(err, query) + } + + _, err = cn.readPortalDescribeResponse() + if err != nil { + return nil, cn.handleError(err, query) + } + err = cn.postExecuteWorkaround() + if err != nil { + return nil, cn.handleError(err, query) + } + res, _, err := cn.readExecuteResponse("Execute") + return res, cn.handleError(err, query) + } - cn.readParseResponse() - cn.readBindResponse() - cn.readPortalDescribeResponse() - cn.postExecuteWorkaround() - res, _, err = cn.readExecuteResponse("Execute") - return res, err + // Use the unnamed statement to defer planning until bind time, or else + // value-based selectivity estimates cannot be used. + st, err := cn.prepareTo(query, "") + if err != nil { + return nil, cn.handleError(err, query) } - // Use the unnamed statement to defer planning until bind - // time, or else value-based selectivity estimates cannot be - // used. - st := cn.prepareTo(query, "") r, err := st.Exec(args) if err != nil { - panic(err) + return nil, cn.handleError(err, query) } - return r, err + return r, nil } -type safeRetryError struct { - Err error -} +type safeRetryError struct{ Err error } -func (se *safeRetryError) Error() string { - return se.Err.Error() -} +func (se *safeRetryError) Error() string { return se.Err.Error() } -func (cn *conn) send(m *writeBuf) { - n, err := cn.c.Write(m.wrap()) - if err != nil { - if n == 0 { - err = &safeRetryError{Err: err} +func (cn *conn) send(m *writeBuf) error { + if debugProto { + w := m.wrap() + for len(w) > 0 { // Can contain multiple messages. + c := proto.RequestCode(w[0]) + l := int(binary.BigEndian.Uint32(w[1:5])) - 4 + fmt.Fprintf(os.Stderr, "CLIENT → %-20s %5d %q\n", c, l, w[5:l+5]) + w = w[l+5:] } - panic(err) } + + n, err := cn.c.Write(m.wrap()) + if err != nil && n == 0 { + err = &safeRetryError{Err: err} + } + return err } func (cn *conn) sendStartupPacket(m *writeBuf) error { + if debugProto { + w := m.wrap() + fmt.Fprintf(os.Stderr, "CLIENT → %-20s %5d %q\n", + "Startup", + int(binary.BigEndian.Uint32(w[1:5]))-4, + w[5:]) + } _, err := cn.c.Write((m.wrap())[1:]) return err } -// Send a message of type typ to the server on the other end of cn. The -// message should have no payload. This method does not use the scratch -// buffer. -func (cn *conn) sendSimpleMessage(typ byte) (err error) { - _, err = cn.c.Write([]byte{typ, '\x00', '\x00', '\x00', '\x04'}) +// Send a message of type typ to the server on the other end of cn. The message +// should have no payload. This method does not use the scratch buffer. +func (cn *conn) sendSimpleMessage(typ proto.RequestCode) error { + if debugProto { + fmt.Fprintf(os.Stderr, "CLIENT → %-20s %5d %q\n", + proto.RequestCode(typ), 0, []byte{}) + } + _, err := cn.c.Write([]byte{byte(typ), '\x00', '\x00', '\x00', '\x04'}) return err } @@ -993,18 +1023,19 @@ func (cn *conn) sendSimpleMessage(typ byte) (err error) { // method is useful in cases where you have to see what the next message is // going to be (e.g. to see whether it's an error or not) but you can't handle // the message yourself. -func (cn *conn) saveMessage(typ byte, buf *readBuf) { +func (cn *conn) saveMessage(typ proto.ResponseCode, buf *readBuf) error { if cn.saveMessageType != 0 { cn.err.set(driver.ErrBadConn) - errorf("unexpected saveMessageType %d", cn.saveMessageType) + return fmt.Errorf("unexpected saveMessageType %d", cn.saveMessageType) } cn.saveMessageType = typ cn.saveMessageBuffer = *buf + return nil } // recvMessage receives any message from the backend, or returns an error if // a problem occurred while reading the message. -func (cn *conn) recvMessage(r *readBuf) (byte, error) { +func (cn *conn) recvMessage(r *readBuf) (proto.ResponseCode, error) { // workaround for a QueryRow bug, see exec if cn.saveMessageType != 0 { t := cn.saveMessageType @@ -1020,9 +1051,21 @@ func (cn *conn) recvMessage(r *readBuf) (byte, error) { return 0, err } - // read the type and length of the message that follows - t := x[0] + // Read the type and length of the message that follows. + t := proto.ResponseCode(x[0]) n := int(binary.BigEndian.Uint32(x[1:])) - 4 + + // When PostgreSQL cannot start a backend (e.g., an external process limit), + // it sends plain text like "Ecould not fork new process [..]", which + // doesn't use the standard encoding for the Error message. + // + // libpq checks "if ErrorResponse && (msgLength < 8 || msgLength > MAX_ERRLEN)", + // but check < 4 since n represents bytes remaining to be read after length. + if t == proto.ErrorResponse && (n < 4 || n > proto.MaxErrlen) { + msg, _ := cn.buf.ReadString('\x00') + return 0, fmt.Errorf("pq: server error: %s%s", string(x[1:]), strings.TrimSuffix(msg, "\x00")) + } + var y []byte if n <= len(cn.scratch) { y = cn.scratch[:n] @@ -1034,75 +1077,80 @@ func (cn *conn) recvMessage(r *readBuf) (byte, error) { return 0, err } *r = y + if debugProto { + fmt.Fprintf(os.Stderr, "SERVER ← %-20s %5d %q\n", t, n, y) + } return t, nil } -// recv receives a message from the backend, but if an error happened while -// reading the message or the received message was an ErrorResponse, it panics. -// NoticeResponses are ignored. This function should generally be used only +// recv receives a message from the backend, returning an error if an error +// happened while reading the message or the received message an ErrorResponse. +// NoticeResponses are ignored. This function should generally be used only // during the startup sequence. -func (cn *conn) recv() (t byte, r *readBuf) { +func (cn *conn) recv() (proto.ResponseCode, *readBuf, error) { for { - var err error - r = &readBuf{} - t, err = cn.recvMessage(r) + r := new(readBuf) + t, err := cn.recvMessage(r) if err != nil { - panic(err) + return 0, nil, err } switch t { - case 'E': - panic(parseError(r)) - case 'N': + case proto.ErrorResponse: + return 0, nil, parseError(r, "") + case proto.NoticeResponse: if n := cn.noticeHandler; n != nil { - n(parseError(r)) + n(parseError(r, "")) } - case 'A': + case proto.NotificationResponse: if n := cn.notificationHandler; n != nil { n(recvNotification(r)) } default: - return + return t, r, nil } } } // recv1Buf is exactly equivalent to recv1, except it uses a buffer supplied by // the caller to avoid an allocation. -func (cn *conn) recv1Buf(r *readBuf) byte { +func (cn *conn) recv1Buf(r *readBuf) (proto.ResponseCode, error) { for { t, err := cn.recvMessage(r) if err != nil { - panic(err) + return 0, err } switch t { - case 'A': + case proto.NotificationResponse: if n := cn.notificationHandler; n != nil { n(recvNotification(r)) } - case 'N': + case proto.NoticeResponse: if n := cn.noticeHandler; n != nil { - n(parseError(r)) + n(parseError(r, "")) } - case 'S': + case proto.ParameterStatus: cn.processParameterStatus(r) default: - return t + return t, nil } } } -// recv1 receives a message from the backend, panicking if an error occurs -// while attempting to read it. All asynchronous messages are ignored, with -// the exception of ErrorResponse. -func (cn *conn) recv1() (t byte, r *readBuf) { - r = &readBuf{} - t = cn.recv1Buf(r) - return t, r +// recv1 receives a message from the backend, returning an error if an error +// happened while reading the message or the received message an ErrorResponse. +// All asynchronous messages are ignored, with the exception of ErrorResponse. +func (cn *conn) recv1() (proto.ResponseCode, *readBuf, error) { + r := new(readBuf) + t, err := cn.recv1Buf(r) + if err != nil { + return 0, nil, err + } + return t, r, nil } -func (cn *conn) ssl(o values) error { - upgrade, err := ssl(o) +func (cn *conn) ssl(cfg Config) error { + upgrade, err := ssl(cfg) if err != nil { return err } @@ -1112,367 +1160,230 @@ func (cn *conn) ssl(o values) error { return nil } - w := cn.writeBuf(0) - w.int32(80877103) - if err = cn.sendStartupPacket(w); err != nil { - return err - } + // Only negotiate the ssl handshake if requested (which is the default). + // sllnegotiation=direct is supported by pg17 and above. + if cfg.SSLNegotiation != SSLNegotiationDirect { + w := cn.writeBuf(0) + w.int32(proto.NegotiateSSLCode) + if err = cn.sendStartupPacket(w); err != nil { + return err + } - b := cn.scratch[:1] - _, err = io.ReadFull(cn.c, b) - if err != nil { - return err - } + b := cn.scratch[:1] + _, err = io.ReadFull(cn.c, b) + if err != nil { + return err + } - if b[0] != 'S' { - return ErrSSLNotSupported + if b[0] != 'S' { + return ErrSSLNotSupported + } } cn.c, err = upgrade(cn.c) return err } -// isDriverSetting returns true iff a setting is purely for configuring the -// driver's options and should not be sent to the server in the connection -// startup packet. -func isDriverSetting(key string) bool { - switch key { - case "host", "port": - return true - case "password": - return true - case "sslmode", "sslcert", "sslkey", "sslrootcert", "sslinline", "sslsni": - return true - case "fallback_application_name": - return true - case "connect_timeout": - return true - case "disable_prepared_binary_result": - return true - case "binary_parameters": - return true - case "krbsrvname": - return true - case "krbspn": - return true - default: - return false - } -} - -func (cn *conn) startup(o values) { +func (cn *conn) startup(cfg Config) error { w := cn.writeBuf(0) - w.int32(196608) - // Send the backend the name of the database we want to connect to, and the - // user we want to connect as. Additionally, we send over any run-time - // parameters potentially included in the connection string. If the server - // doesn't recognize any of them, it will reply with an error. - for k, v := range o { - if isDriverSetting(k) { - // skip options which can't be run-time parameters - continue - } - // The protocol requires us to supply the database name as "database" - // instead of "dbname". - if k == "dbname" { - k = "database" - } + w.int32(proto.ProtocolVersion30) + + w.string("user") + w.string(cfg.User) + w.string("database") + w.string(cfg.Database) + // w.string("replication") // Sent by libpq, but we don't support that. + w.string("options") + w.string(cfg.Options) + if cfg.ApplicationName != "" { + w.string("application_name") + w.string(cfg.ApplicationName) + } + w.string("client_encoding") + w.string(cfg.ClientEncoding) + + for k, v := range cfg.Runtime { w.string(k) w.string(v) } + w.string("") if err := cn.sendStartupPacket(w); err != nil { - panic(err) + return err } for { - t, r := cn.recv() + t, r, err := cn.recv() + if err != nil { + return err + } switch t { - case 'K': + case proto.BackendKeyData: cn.processBackendKeyData(r) - case 'S': + case proto.ParameterStatus: cn.processParameterStatus(r) - case 'R': - cn.auth(r, o) - case 'Z': + case proto.AuthenticationRequest: + err := cn.auth(r, cfg) + if err != nil { + return err + } + case proto.ReadyForQuery: cn.processReadyForQuery(r) - return + return nil default: - errorf("unknown response for startup: %q", t) + return fmt.Errorf("pq: unknown response for startup: %q", t) } } } -func (cn *conn) auth(r *readBuf, o values) { - switch code := r.int32(); code { - case 0: - // OK - case 3: - w := cn.writeBuf('p') - w.string(o["password"]) - cn.send(w) +func (cn *conn) auth(r *readBuf, cfg Config) error { + switch code := proto.AuthCode(r.int32()); code { + default: + return fmt.Errorf("pq: unknown authentication response: %s", code) + case proto.AuthReqKrb4, proto.AuthReqKrb5, proto.AuthReqCrypt, proto.AuthReqSSPI: + return fmt.Errorf("pq: unsupported authentication method: %s", code) + case proto.AuthReqOk: + return nil - t, r := cn.recv() - if t != 'R' { - errorf("unexpected password response: %q", t) - } + case proto.AuthReqPassword: + w := cn.writeBuf(proto.PasswordMessage) + w.string(cfg.Password) + // Don't need to check AuthOk response here; auth() is called in a loop, + // which catches the errors and AuthReqOk responses. + return cn.send(w) - if r.int32() != 0 { - errorf("unexpected authentication response: %q", t) - } - case 5: + case proto.AuthReqMD5: s := string(r.next(4)) - w := cn.writeBuf('p') - w.string("md5" + md5s(md5s(o["password"]+o["user"])+s)) - cn.send(w) - - t, r := cn.recv() - if t != 'R' { - errorf("unexpected password response: %q", t) - } + w := cn.writeBuf(proto.PasswordMessage) + w.string("md5" + md5s(md5s(cfg.Password+cfg.User)+s)) + // Same here. + return cn.send(w) - if r.int32() != 0 { - errorf("unexpected authentication response: %q", t) - } - case 7: // GSSAPI, startup + case proto.AuthReqGSS: // GSSAPI, startup if newGss == nil { - errorf("kerberos error: no GSSAPI provider registered (import github.com/lib/pq/auth/kerberos if you need Kerberos support)") + return fmt.Errorf("pq: kerberos error: no GSSAPI provider registered (import github.com/lib/pq/auth/kerberos)") } cli, err := newGss() if err != nil { - errorf("kerberos error: %s", err.Error()) + return fmt.Errorf("pq: kerberos error: %w", err) } var token []byte - - if spn, ok := o["krbspn"]; ok { + if cfg.isset("krbspn") { // Use the supplied SPN if provided.. - token, err = cli.GetInitTokenFromSpn(spn) + token, err = cli.GetInitTokenFromSpn(cfg.KrbSpn) } else { // Allow the kerberos service name to be overridden service := "postgres" - if val, ok := o["krbsrvname"]; ok { - service = val + if cfg.isset("krbsrvname") { + service = cfg.KrbSrvname } - - token, err = cli.GetInitToken(o["host"], service) + token, err = cli.GetInitToken(cfg.Host, service) } - if err != nil { - errorf("failed to get Kerberos ticket: %q", err) + return fmt.Errorf("pq: failed to get Kerberos ticket: %w", err) } - w := cn.writeBuf('p') + w := cn.writeBuf(proto.GSSResponse) w.bytes(token) - cn.send(w) + err = cn.send(w) + if err != nil { + return err + } // Store for GSSAPI continue message cn.gss = cli + return nil - case 8: // GSSAPI continue - + case proto.AuthReqGSSCont: // GSSAPI continue if cn.gss == nil { - errorf("GSSAPI protocol error") + return errors.New("pq: GSSAPI protocol error") } - b := []byte(*r) - - done, tokOut, err := cn.gss.Continue(b) + done, tokOut, err := cn.gss.Continue([]byte(*r)) if err == nil && !done { - w := cn.writeBuf('p') + w := cn.writeBuf(proto.SASLInitialResponse) w.bytes(tokOut) - cn.send(w) + err = cn.send(w) + if err != nil { + return err + } } - // Errors fall through and read the more detailed message - // from the server.. + // Errors fall through and read the more detailed message from the + // server. + return nil - case 10: - sc := scram.NewClient(sha256.New, o["user"], o["password"]) + case proto.AuthReqSASL: + sc := scram.NewClient(sha256.New, cfg.User, cfg.Password) sc.Step(nil) if sc.Err() != nil { - errorf("SCRAM-SHA-256 error: %s", sc.Err().Error()) + return fmt.Errorf("pq: SCRAM-SHA-256 error: %w", sc.Err()) } scOut := sc.Out() - w := cn.writeBuf('p') + w := cn.writeBuf(proto.SASLResponse) w.string("SCRAM-SHA-256") w.int32(len(scOut)) w.bytes(scOut) - cn.send(w) + err := cn.send(w) + if err != nil { + return err + } - t, r := cn.recv() - if t != 'R' { - errorf("unexpected password response: %q", t) + t, r, err := cn.recv() + if err != nil { + return err + } + if t != proto.AuthenticationRequest { + return fmt.Errorf("pq: unexpected password response: %q", t) } - if r.int32() != 11 { - errorf("unexpected authentication response: %q", t) + if r.int32() != int(proto.AuthReqSASLCont) { + return fmt.Errorf("pq: unexpected authentication response: %q", t) } nextStep := r.next(len(*r)) sc.Step(nextStep) if sc.Err() != nil { - errorf("SCRAM-SHA-256 error: %s", sc.Err().Error()) + return fmt.Errorf("pq: SCRAM-SHA-256 error: %w", sc.Err()) } scOut = sc.Out() - w = cn.writeBuf('p') + w = cn.writeBuf(proto.SASLResponse) w.bytes(scOut) - cn.send(w) + err = cn.send(w) + if err != nil { + return err + } - t, r = cn.recv() - if t != 'R' { - errorf("unexpected password response: %q", t) + t, r, err = cn.recv() + if err != nil { + return err + } + if t != proto.AuthenticationRequest { + return fmt.Errorf("pq: unexpected password response: %q", t) } - if r.int32() != 12 { - errorf("unexpected authentication response: %q", t) + if r.int32() != int(proto.AuthReqSASLFin) { + return fmt.Errorf("pq: unexpected authentication response: %q", t) } nextStep = r.next(len(*r)) sc.Step(nextStep) if sc.Err() != nil { - errorf("SCRAM-SHA-256 error: %s", sc.Err().Error()) + return fmt.Errorf("pq: SCRAM-SHA-256 error: %w", sc.Err()) } - default: - errorf("unknown authentication response: %d", code) - } -} - -type format int - -const formatText format = 0 -const formatBinary format = 1 - -// One result-column format code with the value 1 (i.e. all binary). -var colFmtDataAllBinary = []byte{0, 1, 0, 1} - -// No result-column format codes (i.e. all text). -var colFmtDataAllText = []byte{0, 0} - -type stmt struct { - cn *conn - name string - rowsHeader - colFmtData []byte - paramTyps []oid.Oid - closed bool -} - -func (st *stmt) Close() (err error) { - if st.closed { return nil } - if err := st.cn.err.get(); err != nil { - return err - } - defer st.cn.errRecover(&err) - - w := st.cn.writeBuf('C') - w.byte('S') - w.string(st.name) - st.cn.send(w) - - st.cn.send(st.cn.writeBuf('S')) - - t, _ := st.cn.recv1() - if t != '3' { - st.cn.err.set(driver.ErrBadConn) - errorf("unexpected close response: %q", t) - } - st.closed = true - - t, r := st.cn.recv1() - if t != 'Z' { - st.cn.err.set(driver.ErrBadConn) - errorf("expected ready for query, but got: %q", t) - } - st.cn.processReadyForQuery(r) - - return nil -} - -func (st *stmt) Query(v []driver.Value) (r driver.Rows, err error) { - return st.query(v) -} - -func (st *stmt) query(v []driver.Value) (r *rows, err error) { - if err := st.cn.err.get(); err != nil { - return nil, err - } - defer st.cn.errRecover(&err) - - st.exec(v) - return &rows{ - cn: st.cn, - rowsHeader: st.rowsHeader, - }, nil -} - -func (st *stmt) Exec(v []driver.Value) (res driver.Result, err error) { - if err := st.cn.err.get(); err != nil { - return nil, err - } - defer st.cn.errRecover(&err) - - st.exec(v) - res, _, err = st.cn.readExecuteResponse("simple query") - return res, err -} - -func (st *stmt) exec(v []driver.Value) { - if len(v) >= 65536 { - errorf("got %d parameters but PostgreSQL only supports 65535 parameters", len(v)) - } - if len(v) != len(st.paramTyps) { - errorf("got %d parameters but the statement requires %d", len(v), len(st.paramTyps)) - } - - cn := st.cn - w := cn.writeBuf('B') - w.byte(0) // unnamed portal - w.string(st.name) - - if cn.binaryParameters { - cn.sendBinaryParameters(w, v) - } else { - w.int16(0) - w.int16(len(v)) - for i, x := range v { - if x == nil { - w.int32(-1) - } else { - b := encode(&cn.parameterStatus, x, st.paramTyps[i]) - w.int32(len(b)) - w.bytes(b) - } - } - } - w.bytes(st.colFmtData) - - w.next('E') - w.byte(0) - w.int32(0) - - w.next('S') - cn.send(w) - - cn.readBindResponse() - cn.postExecuteWorkaround() - -} - -func (st *stmt) NumInput() int { - return len(st.paramTyps) } // parseComplete parses the "command tag" from a CommandComplete message, and -// returns the number of rows affected (if applicable) and a string -// identifying only the command that was executed, e.g. "ALTER TABLE". If the -// command tag could not be parsed, parseComplete panics. -func (cn *conn) parseComplete(commandTag string) (driver.Result, string) { +// returns the number of rows affected (if applicable) and a string identifying +// only the command that was executed, e.g. "ALTER TABLE". Returns an error if +// the command can cannot be parsed. +func (cn *conn) parseComplete(commandTag string) (driver.Result, string, error) { commandsWithAffectedRows := []string{ "SELECT ", // INSERT is handled below @@ -1492,218 +1403,29 @@ func (cn *conn) parseComplete(commandTag string) (driver.Result, string) { break } } - // INSERT also includes the oid of the inserted row in its command tag. - // Oids in user tables are deprecated, and the oid is only returned when - // exactly one row is inserted, so it's unlikely to be of value to any - // real-world application and we can ignore it. + // INSERT also includes the oid of the inserted row in its command tag. Oids + // in user tables are deprecated, and the oid is only returned when exactly + // one row is inserted, so it's unlikely to be of value to any real-world + // application and we can ignore it. if affectedRows == nil && strings.HasPrefix(commandTag, "INSERT ") { parts := strings.Split(commandTag, " ") if len(parts) != 3 { cn.err.set(driver.ErrBadConn) - errorf("unexpected INSERT command tag %s", commandTag) + return nil, "", fmt.Errorf("pq: unexpected INSERT command tag %s", commandTag) } affectedRows = &parts[len(parts)-1] commandTag = "INSERT" } // There should be no affected rows attached to the tag, just return it if affectedRows == nil { - return driver.RowsAffected(0), commandTag + return driver.RowsAffected(0), commandTag, nil } n, err := strconv.ParseInt(*affectedRows, 10, 64) if err != nil { cn.err.set(driver.ErrBadConn) - errorf("could not parse commandTag: %s", err) - } - return driver.RowsAffected(n), commandTag -} - -type rowsHeader struct { - colNames []string - colTyps []fieldDesc - colFmts []format -} - -type rows struct { - cn *conn - finish func() - rowsHeader - done bool - rb readBuf - result driver.Result - tag string - - next *rowsHeader -} - -func (rs *rows) Close() error { - if finish := rs.finish; finish != nil { - defer finish() - } - // no need to look at cn.bad as Next() will - for { - err := rs.Next(nil) - switch err { - case nil: - case io.EOF: - // rs.Next can return io.EOF on both 'Z' (ready for query) and 'T' (row - // description, used with HasNextResultSet). We need to fetch messages until - // we hit a 'Z', which is done by waiting for done to be set. - if rs.done { - return nil - } - default: - return err - } - } -} - -func (rs *rows) Columns() []string { - return rs.colNames -} - -func (rs *rows) Result() driver.Result { - if rs.result == nil { - return emptyRows - } - return rs.result -} - -func (rs *rows) Tag() string { - return rs.tag -} - -func (rs *rows) Next(dest []driver.Value) (err error) { - if rs.done { - return io.EOF - } - - conn := rs.cn - if err := conn.err.getForNext(); err != nil { - return err - } - defer conn.errRecover(&err) - - for { - t := conn.recv1Buf(&rs.rb) - switch t { - case 'E': - err = parseError(&rs.rb) - case 'C', 'I': - if t == 'C' { - rs.result, rs.tag = conn.parseComplete(rs.rb.string()) - } - continue - case 'Z': - conn.processReadyForQuery(&rs.rb) - rs.done = true - if err != nil { - return err - } - return io.EOF - case 'D': - n := rs.rb.int16() - if err != nil { - conn.err.set(driver.ErrBadConn) - errorf("unexpected DataRow after error %s", err) - } - if n < len(dest) { - dest = dest[:n] - } - for i := range dest { - l := rs.rb.int32() - if l == -1 { - dest[i] = nil - continue - } - dest[i] = decode(&conn.parameterStatus, rs.rb.next(l), rs.colTyps[i].OID, rs.colFmts[i]) - } - return - case 'T': - next := parsePortalRowDescribe(&rs.rb) - rs.next = &next - return io.EOF - default: - errorf("unexpected message after execute: %q", t) - } - } -} - -func (rs *rows) HasNextResultSet() bool { - hasNext := rs.next != nil && !rs.done - return hasNext -} - -func (rs *rows) NextResultSet() error { - if rs.next == nil { - return io.EOF - } - rs.rowsHeader = *rs.next - rs.next = nil - return nil -} - -// QuoteIdentifier quotes an "identifier" (e.g. a table or a column name) to be -// used as part of an SQL statement. For example: -// -// tblname := "my_table" -// data := "my_data" -// quoted := pq.QuoteIdentifier(tblname) -// err := db.Exec(fmt.Sprintf("INSERT INTO %s VALUES ($1)", quoted), data) -// -// Any double quotes in name will be escaped. The quoted identifier will be -// case sensitive when used in a query. If the input string contains a zero -// byte, the result will be truncated immediately before it. -func QuoteIdentifier(name string) string { - end := strings.IndexRune(name, 0) - if end > -1 { - name = name[:end] - } - return `"` + strings.Replace(name, `"`, `""`, -1) + `"` -} - -// BufferQuoteIdentifier satisfies the same purpose as QuoteIdentifier, but backed by a -// byte buffer. -func BufferQuoteIdentifier(name string, buffer *bytes.Buffer) { - end := strings.IndexRune(name, 0) - if end > -1 { - name = name[:end] - } - buffer.WriteRune('"') - buffer.WriteString(strings.Replace(name, `"`, `""`, -1)) - buffer.WriteRune('"') -} - -// QuoteLiteral quotes a 'literal' (e.g. a parameter, often used to pass literal -// to DDL and other statements that do not accept parameters) to be used as part -// of an SQL statement. For example: -// -// exp_date := pq.QuoteLiteral("2023-01-05 15:00:00Z") -// err := db.Exec(fmt.Sprintf("CREATE ROLE my_user VALID UNTIL %s", exp_date)) -// -// Any single quotes in name will be escaped. Any backslashes (i.e. "\") will be -// replaced by two backslashes (i.e. "\\") and the C-style escape identifier -// that PostgreSQL provides ('E') will be prepended to the string. -func QuoteLiteral(literal string) string { - // This follows the PostgreSQL internal algorithm for handling quoted literals - // from libpq, which can be found in the "PQEscapeStringInternal" function, - // which is found in the libpq/fe-exec.c source file: - // https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/libpq/fe-exec.c - // - // substitute any single-quotes (') with two single-quotes ('') - literal = strings.Replace(literal, `'`, `''`, -1) - // determine if the string has any backslashes (\) in it. - // if it does, replace any backslashes (\) with two backslashes (\\) - // then, we need to wrap the entire string with a PostgreSQL - // C-style escape. Per how "PQEscapeStringInternal" handles this case, we - // also add a space before the "E" - if strings.Contains(literal, `\`) { - literal = strings.Replace(literal, `\`, `\\`, -1) - literal = ` E'` + literal + `'` - } else { - // otherwise, we can just wrap the literal with a pair of single quotes - literal = `'` + literal + `'` + return nil, "", fmt.Errorf("pq: could not parse commandTag: %w", err) } - return literal + return driver.RowsAffected(n), commandTag, nil } func md5s(s string) string { @@ -1712,13 +1434,12 @@ func md5s(s string) string { return fmt.Sprintf("%x", h.Sum(nil)) } -func (cn *conn) sendBinaryParameters(b *writeBuf, args []driver.Value) { - // Do one pass over the parameters to see if we're going to send any of - // them over in binary. If we are, create a paramFormats array at the - // same time. +func (cn *conn) sendBinaryParameters(b *writeBuf, args []driver.NamedValue) error { + // Do one pass over the parameters to see if we're going to send any of them + // over in binary. If we are, create a paramFormats array at the same time. var paramFormats []int for i, x := range args { - _, ok := x.([]byte) + _, ok := x.Value.([]byte) if ok { if paramFormats == nil { paramFormats = make([]int, len(args)) @@ -1737,64 +1458,81 @@ func (cn *conn) sendBinaryParameters(b *writeBuf, args []driver.Value) { b.int16(len(args)) for _, x := range args { - if x == nil { + if x.Value == nil { + b.int32(-1) + } else if xx, ok := x.Value.([]byte); ok && xx == nil { b.int32(-1) } else { - datum := binaryEncode(&cn.parameterStatus, x) + datum, err := binaryEncode(x.Value) + if err != nil { + return err + } b.int32(len(datum)) b.bytes(datum) } } + return nil } -func (cn *conn) sendBinaryModeQuery(query string, args []driver.Value) { +func (cn *conn) sendBinaryModeQuery(query string, args []driver.NamedValue) error { if len(args) >= 65536 { - errorf("got %d parameters but PostgreSQL only supports 65535 parameters", len(args)) + return fmt.Errorf("pq: got %d parameters but PostgreSQL only supports 65535 parameters", len(args)) } - b := cn.writeBuf('P') + b := cn.writeBuf(proto.Parse) b.byte(0) // unnamed statement b.string(query) b.int16(0) - b.next('B') + b.next(proto.Bind) b.int16(0) // unnamed portal and statement - cn.sendBinaryParameters(b, args) + err := cn.sendBinaryParameters(b, args) + if err != nil { + return err + } b.bytes(colFmtDataAllText) - b.next('D') - b.byte('P') + b.next(proto.Describe) + b.byte(proto.Parse) b.byte(0) // unnamed portal - b.next('E') + b.next(proto.Execute) b.byte(0) b.int32(0) - b.next('S') - cn.send(b) + b.next(proto.Sync) + return cn.send(b) } func (cn *conn) processParameterStatus(r *readBuf) { - var err error - - param := r.string() - switch param { + switch r.string() { + default: + // ignore case "server_version": - var major1 int - var major2 int - _, err = fmt.Sscanf(r.string(), "%d.%d", &major1, &major2) + var major1, major2 int + _, err := fmt.Sscanf(r.string(), "%d.%d", &major1, &major2) if err == nil { cn.parameterStatus.serverVersion = major1*10000 + major2*100 } - case "TimeZone": + var err error cn.parameterStatus.currentLocation, err = time.LoadLocation(r.string()) if err != nil { cn.parameterStatus.currentLocation = nil } - - default: - // ignore + // Use sql.NullBool so we can distinguish between false and not sent. If + // it's not sent we use a query to get the value – I don't know when these + // parameters are not sent, but this is what libpq does. + case "in_hot_standby": + b, err := pqutil.ParseBool(r.string()) + if err == nil { + cn.parameterStatus.inHotStandby = sql.NullBool{Valid: true, Bool: b} + } + case "default_transaction_read_only": + b, err := pqutil.ParseBool(r.string()) + if err == nil { + cn.parameterStatus.defaultTransactionReadOnly = sql.NullBool{Valid: true, Bool: b} + } } } @@ -1802,15 +1540,22 @@ func (cn *conn) processReadyForQuery(r *readBuf) { cn.txnStatus = transactionStatus(r.byte()) } -func (cn *conn) readReadyForQuery() { - t, r := cn.recv1() +func (cn *conn) readReadyForQuery() error { + t, r, err := cn.recv1() + if err != nil { + return err + } switch t { - case 'Z': + case proto.ReadyForQuery: cn.processReadyForQuery(r) - return + return nil + case proto.ErrorResponse: + err := parseError(r, "") + cn.err.set(driver.ErrBadConn) + return err default: cn.err.set(driver.ErrBadConn) - errorf("unexpected message %q; expected ReadyForQuery", t) + return fmt.Errorf("pq: unexpected message %q; expected ReadyForQuery", t) } } @@ -1819,85 +1564,92 @@ func (cn *conn) processBackendKeyData(r *readBuf) { cn.secretKey = r.int32() } -func (cn *conn) readParseResponse() { - t, r := cn.recv1() +func (cn *conn) readParseResponse() error { + t, r, err := cn.recv1() + if err != nil { + return err + } switch t { - case '1': - return - case 'E': - err := parseError(r) - cn.readReadyForQuery() - panic(err) + case proto.ParseComplete: + return nil + case proto.ErrorResponse: + err := parseError(r, "") + _ = cn.readReadyForQuery() + return err default: cn.err.set(driver.ErrBadConn) - errorf("unexpected Parse response %q", t) + return fmt.Errorf("pq: unexpected Parse response %q", t) } } -func (cn *conn) readStatementDescribeResponse() ( - paramTyps []oid.Oid, - colNames []string, - colTyps []fieldDesc, -) { +func (cn *conn) readStatementDescribeResponse() (paramTyps []oid.Oid, colNames []string, colTyps []fieldDesc, _ error) { for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return nil, nil, nil, err + } switch t { - case 't': + case proto.ParameterDescription: nparams := r.int16() paramTyps = make([]oid.Oid, nparams) for i := range paramTyps { paramTyps[i] = r.oid() } - case 'n': - return paramTyps, nil, nil - case 'T': + case proto.NoData: + return paramTyps, nil, nil, nil + case proto.RowDescription: colNames, colTyps = parseStatementRowDescribe(r) - return paramTyps, colNames, colTyps - case 'E': - err := parseError(r) - cn.readReadyForQuery() - panic(err) + return paramTyps, colNames, colTyps, nil + case proto.ErrorResponse: + err := parseError(r, "") + _ = cn.readReadyForQuery() + return nil, nil, nil, err default: cn.err.set(driver.ErrBadConn) - errorf("unexpected Describe statement response %q", t) + return nil, nil, nil, fmt.Errorf("pq: unexpected Describe statement response %q", t) } } } -func (cn *conn) readPortalDescribeResponse() rowsHeader { - t, r := cn.recv1() +func (cn *conn) readPortalDescribeResponse() (rowsHeader, error) { + t, r, err := cn.recv1() + if err != nil { + return rowsHeader{}, err + } switch t { - case 'T': - return parsePortalRowDescribe(r) - case 'n': - return rowsHeader{} - case 'E': - err := parseError(r) - cn.readReadyForQuery() - panic(err) + case proto.RowDescription: + return parsePortalRowDescribe(r), nil + case proto.NoData: + return rowsHeader{}, nil + case proto.ErrorResponse: + err := parseError(r, "") + _ = cn.readReadyForQuery() + return rowsHeader{}, err default: cn.err.set(driver.ErrBadConn) - errorf("unexpected Describe response %q", t) + return rowsHeader{}, fmt.Errorf("pq: unexpected Describe response %q", t) } - panic("not reached") } -func (cn *conn) readBindResponse() { - t, r := cn.recv1() +func (cn *conn) readBindResponse() error { + t, r, err := cn.recv1() + if err != nil { + return err + } switch t { - case '2': - return - case 'E': - err := parseError(r) - cn.readReadyForQuery() - panic(err) + case proto.BindComplete: + return nil + case proto.ErrorResponse: + err := parseError(r, "") + _ = cn.readReadyForQuery() + return err default: cn.err.set(driver.ErrBadConn) - errorf("unexpected Bind response %q", t) + return fmt.Errorf("pq: unexpected Bind response %q", t) } } -func (cn *conn) postExecuteWorkaround() { +func (cn *conn) postExecuteWorkaround() error { // Work around a bug in sql.DB.QueryRow: in Go 1.2 and earlier it ignores // any errors from rows.Next, which masks errors that happened during the // execution of the query. To avoid the problem in common cases, we wait @@ -1908,56 +1660,62 @@ func (cn *conn) postExecuteWorkaround() { // However, if it's an error, we wait until ReadyForQuery and then return // the error to our caller. for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return err + } switch t { - case 'E': - err := parseError(r) - cn.readReadyForQuery() - panic(err) - case 'C', 'D', 'I': + case proto.ErrorResponse: + err := parseError(r, "") + _ = cn.readReadyForQuery() + return err + case proto.CommandComplete, proto.DataRow, proto.EmptyQueryResponse: // the query didn't fail, but we can't process this message - cn.saveMessage(t, r) - return + return cn.saveMessage(t, r) default: cn.err.set(driver.ErrBadConn) - errorf("unexpected message during extended query execution: %q", t) + return fmt.Errorf("pq: unexpected message during extended query execution: %q", t) } } } // Only for Exec(), since we ignore the returned data -func (cn *conn) readExecuteResponse( - protocolState string, -) (res driver.Result, commandTag string, err error) { +func (cn *conn) readExecuteResponse(protocolState string) (res driver.Result, commandTag string, resErr error) { for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return nil, "", err + } switch t { - case 'C': - if err != nil { + case proto.CommandComplete: + if resErr != nil { cn.err.set(driver.ErrBadConn) - errorf("unexpected CommandComplete after error %s", err) + return nil, "", fmt.Errorf("pq: unexpected CommandComplete after error %s", resErr) } - res, commandTag = cn.parseComplete(r.string()) - case 'Z': + res, commandTag, err = cn.parseComplete(r.string()) + if err != nil { + return nil, "", err + } + case proto.ReadyForQuery: cn.processReadyForQuery(r) - if res == nil && err == nil { - err = errUnexpectedReady + if res == nil && resErr == nil { + resErr = errUnexpectedReady } - return res, commandTag, err - case 'E': - err = parseError(r) - case 'T', 'D', 'I': - if err != nil { + return res, commandTag, resErr + case proto.ErrorResponse: + resErr = parseError(r, "") + case proto.RowDescription, proto.DataRow, proto.EmptyQueryResponse: + if resErr != nil { cn.err.set(driver.ErrBadConn) - errorf("unexpected %q after error %s", t, err) + return nil, "", fmt.Errorf("pq: unexpected %q after error %s", t, resErr) } - if t == 'I' { + if t == proto.EmptyQueryResponse { res = emptyRows } // ignore any results default: cn.err.set(driver.ErrBadConn) - errorf("unknown %s response: %q", protocolState, t) + return nil, "", fmt.Errorf("pq: unknown %s response: %q", protocolState, t) } } } @@ -1998,108 +1756,6 @@ func parsePortalRowDescribe(r *readBuf) rowsHeader { } } -// parseEnviron tries to mimic some of libpq's environment handling -// -// To ease testing, it does not directly reference os.Environ, but is -// designed to accept its output. -// -// Environment-set connection information is intended to have a higher -// precedence than a library default but lower than any explicitly -// passed information (such as in the URL or connection string). -func parseEnviron(env []string) (out map[string]string) { - out = make(map[string]string) - - for _, v := range env { - parts := strings.SplitN(v, "=", 2) - - accrue := func(keyname string) { - out[keyname] = parts[1] - } - unsupported := func() { - panic(fmt.Sprintf("setting %v not supported", parts[0])) - } - - // The order of these is the same as is seen in the - // PostgreSQL 9.1 manual. Unsupported but well-defined - // keys cause a panic; these should be unset prior to - // execution. Options which pq expects to be set to a - // certain value are allowed, but must be set to that - // value if present (they can, of course, be absent). - switch parts[0] { - case "PGHOST": - accrue("host") - case "PGHOSTADDR": - unsupported() - case "PGPORT": - accrue("port") - case "PGDATABASE": - accrue("dbname") - case "PGUSER": - accrue("user") - case "PGPASSWORD": - accrue("password") - case "PGSERVICE", "PGSERVICEFILE", "PGREALM": - unsupported() - case "PGOPTIONS": - accrue("options") - case "PGAPPNAME": - accrue("application_name") - case "PGSSLMODE": - accrue("sslmode") - case "PGSSLCERT": - accrue("sslcert") - case "PGSSLKEY": - accrue("sslkey") - case "PGSSLROOTCERT": - accrue("sslrootcert") - case "PGSSLSNI": - accrue("sslsni") - case "PGREQUIRESSL", "PGSSLCRL": - unsupported() - case "PGREQUIREPEER": - unsupported() - case "PGKRBSRVNAME", "PGGSSLIB": - unsupported() - case "PGCONNECT_TIMEOUT": - accrue("connect_timeout") - case "PGCLIENTENCODING": - accrue("client_encoding") - case "PGDATESTYLE": - accrue("datestyle") - case "PGTZ": - accrue("timezone") - case "PGGEQO": - accrue("geqo") - case "PGSYSCONFDIR", "PGLOCALEDIR": - unsupported() - } - } - - return out -} - -// isUTF8 returns whether name is a fuzzy variation of the string "UTF-8". -func isUTF8(name string) bool { - // Recognize all sorts of silly things as "UTF-8", like Postgres does - s := strings.Map(alnumLowerASCII, name) - return s == "utf8" || s == "unicode" -} - -func alnumLowerASCII(ch rune) rune { - if 'A' <= ch && ch <= 'Z' { - return ch + ('a' - 'A') - } - if 'a' <= ch && ch <= 'z' || '0' <= ch && ch <= '9' { - return ch - } - return -1 // discard -} - -// The database/sql/driver package says: -// All Conn implementations should implement the following interfaces: Pinger, SessionResetter, and Validator. -var _ driver.Pinger = &conn{} -var _ driver.SessionResetter = &conn{} - func (cn *conn) ResetSession(ctx context.Context) error { // Ensure bad connections are reported: From database/sql/driver: // If a connection is never returned to the connection pool but immediately reused, then diff --git a/vendor/github.com/lib/pq/conn_go115.go b/vendor/github.com/lib/pq/conn_go115.go deleted file mode 100644 index f4ef030f990..00000000000 --- a/vendor/github.com/lib/pq/conn_go115.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build go1.15 -// +build go1.15 - -package pq - -import "database/sql/driver" - -var _ driver.Validator = &conn{} diff --git a/vendor/github.com/lib/pq/conn_go18.go b/vendor/github.com/lib/pq/conn_go18.go index 63d4ca6aaa0..23a10aeec25 100644 --- a/vendor/github.com/lib/pq/conn_go18.go +++ b/vendor/github.com/lib/pq/conn_go18.go @@ -6,22 +6,17 @@ import ( "database/sql/driver" "fmt" "io" - "io/ioutil" "time" -) -const ( - watchCancelDialContextTimeout = time.Second * 10 + "github.com/lib/pq/internal/proto" ) +const watchCancelDialContextTimeout = 10 * time.Second + // Implement the "QueryerContext" interface func (cn *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { - list := make([]driver.Value, len(args)) - for i, nv := range args { - list[i] = nv.Value - } finish := cn.watchCancel(ctx) - r, err := cn.query(query, list) + r, err := cn.query(query, args) if err != nil { if finish != nil { finish() @@ -57,7 +52,6 @@ func (cn *conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, // Implement the "ConnBeginTx" interface func (cn *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) { var mode string - switch sql.IsolationLevel(opts.Isolation) { case sql.LevelDefault: // Don't touch mode: use the server's default @@ -72,7 +66,6 @@ func (cn *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, default: return nil, fmt.Errorf("pq: isolation level not supported: %d", opts.Isolation) } - if opts.ReadOnly { mode += " READ ONLY" } else { @@ -95,7 +88,7 @@ func (cn *conn) Ping(ctx context.Context) error { if err != nil { return driver.ErrBadConn // https://golang.org/pkg/database/sql/driver/#Pinger } - rows.Close() + _ = rows.Close() return nil } @@ -131,7 +124,7 @@ func (cn *conn) watchCancel(ctx context.Context) func() { select { case <-finished: cn.err.set(ctx.Err()) - cn.Close() + _ = cn.Close() case finished <- struct{}{}: } } @@ -140,55 +133,39 @@ func (cn *conn) watchCancel(ctx context.Context) func() { } func (cn *conn) cancel(ctx context.Context) error { - // Create a new values map (copy). This makes sure the connection created - // in this method cannot write to the same underlying data, which could - // cause a concurrent map write panic. This is necessary because cancel - // is called from a goroutine in watchCancel. - o := make(values) - for k, v := range cn.opts { - o[k] = v - } + // Use a copy since a new connection is created here. This is necessary + // because cancel is called from a goroutine in watchCancel. + cfg := cn.cfg.Clone() - c, err := dial(ctx, cn.dialer, o) + c, err := dial(ctx, cn.dialer, cfg) if err != nil { return err } - defer c.Close() + defer func() { _ = c.Close() }() - { - can := conn{ - c: c, - } - err = can.ssl(o) - if err != nil { - return err - } - - w := can.writeBuf(0) - w.int32(80877102) // cancel request code - w.int32(cn.processID) - w.int32(cn.secretKey) - - if err := can.sendStartupPacket(w); err != nil { - return err - } + cn2 := conn{c: c} + err = cn2.ssl(cfg) + if err != nil { + return err } - // Read until EOF to ensure that the server received the cancel. - { - _, err := io.Copy(ioutil.Discard, c) + w := cn2.writeBuf(0) + w.int32(proto.CancelRequestCode) + w.int32(cn.processID) + w.int32(cn.secretKey) + if err := cn2.sendStartupPacket(w); err != nil { return err } + + // Read until EOF to ensure that the server received the cancel. + _, err = io.Copy(io.Discard, c) + return err } // Implement the "StmtQueryContext" interface func (st *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) { - list := make([]driver.Value, len(args)) - for i, nv := range args { - list[i] = nv.Value - } finish := st.watchCancel(ctx) - r, err := st.query(list) + r, err := st.query(args) if err != nil { if finish != nil { finish() @@ -201,16 +178,19 @@ func (st *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (dri // Implement the "StmtExecContext" interface func (st *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) { - list := make([]driver.Value, len(args)) - for i, nv := range args { - list[i] = nv.Value - } - if finish := st.watchCancel(ctx); finish != nil { defer finish() } + if err := st.cn.err.get(); err != nil { + return nil, err + } - return st.Exec(list) + err := st.exec(args) + if err != nil { + return nil, st.cn.handleError(err) + } + res, _, err := st.cn.readExecuteResponse("simple query") + return res, st.cn.handleError(err) } // watchCancel is implemented on stmt in order to not mark the parent conn as bad @@ -220,10 +200,9 @@ func (st *stmt) watchCancel(ctx context.Context) func() { go func() { select { case <-done: - // At this point the function level context is canceled, - // so it must not be used for the additional network - // request to cancel the query. - // Create a new context to pass into the dial. + // At this point the function level context is canceled, so it + // must not be used for the additional network request to cancel + // the query. Create a new context to pass into the dial. ctxCancel, cancel := context.WithTimeout(context.Background(), watchCancelDialContextTimeout) defer cancel() diff --git a/vendor/github.com/lib/pq/connector.go b/vendor/github.com/lib/pq/connector.go index 1145e12257a..4c318662a49 100644 --- a/vendor/github.com/lib/pq/connector.go +++ b/vendor/github.com/lib/pq/connector.go @@ -3,81 +3,458 @@ package pq import ( "context" "database/sql/driver" - "errors" "fmt" + "math/rand" + "net" + "net/netip" + neturl "net/url" "os" + "path/filepath" + "reflect" + "slices" + "sort" + "strconv" "strings" + "time" + "unicode" + + "github.com/lib/pq/internal/pqutil" +) + +type ( + // SSLMode is a sslmode setting. + SSLMode string + + // SSLNegotiation is a sslnegotiation setting. + SSLNegotiation string + + // TargetSessionAttrs is a target_session_attrs setting. + TargetSessionAttrs string + + // LoadBalanceHosts is a load_balance_hosts setting. + LoadBalanceHosts string +) + +// Values for [SSLMode] that pq supports. +const ( + // disable: No SSL + SSLModeDisable = SSLMode("disable") + + // require: require SSL, but skip verification. + SSLModeRequire = SSLMode("require") + + // verify-ca: require SSL and verify that the certificate was signed by a + // trusted CA. + SSLModeVerifyCA = SSLMode("verify-ca") + + // verify-full: require SSK and verify that the certificate was signed by a + // trusted CA and the server host name matches the one in the certificate. + SSLModeVerifyFull = SSLMode("verify-full") +) + +var sslModes = []SSLMode{SSLModeDisable, SSLModeRequire, SSLModeVerifyFull, SSLModeVerifyCA} + +// Values for [SSLNegotiation] that pq supports. +const ( + // Negotiate whether SSL should be used. This is the default. + SSLNegotiationPostgres = SSLNegotiation("postgres") + + // Always use SSL, don't try to negotiate. + SSLNegotiationDirect = SSLNegotiation("direct") +) + +var sslNegotiations = []SSLNegotiation{SSLNegotiationPostgres, SSLNegotiationDirect} + +// Values for [TargetSessionAttrs] that pq supports. +const ( + // Any successful connection is acceptable. This is the default. + TargetSessionAttrsAny = TargetSessionAttrs("any") + + // Session must accept read-write transactions by default: the server must + // not be in hot standby mode and default_transaction_read_only must be + // off. + TargetSessionAttrsReadWrite = TargetSessionAttrs("read-write") + + // Session must not accept read-write transactions by default. + TargetSessionAttrsReadOnly = TargetSessionAttrs("read-only") + + // Server must not be in hot standby mode. + TargetSessionAttrsPrimary = TargetSessionAttrs("primary") + + // Server must be in hot standby mode. + TargetSessionAttrsStandby = TargetSessionAttrs("standby") + + // First try to find a standby server, but if none of the listed hosts is a + // standby server, try again in any mode. + TargetSessionAttrsPreferStandby = TargetSessionAttrs("prefer-standby") +) + +var targetSessionAttrs = []TargetSessionAttrs{TargetSessionAttrsAny, + TargetSessionAttrsReadWrite, TargetSessionAttrsReadOnly, TargetSessionAttrsPrimary, + TargetSessionAttrsStandby, TargetSessionAttrsPreferStandby} + +// Values for [LoadBalanceHosts] that pq supports. +const ( + // Don't load balance; try hosts in the order in which they're provided. + // This is the default. + LoadBalanceHostsDisable = LoadBalanceHosts("disable") + + // Hosts are tried in random order to balance connections across multiple + // PostgreSQL servers. + // + // When using this value it's recommended to also configure a reasonable + // value for connect_timeout. Because then, if one of the nodes that are + // used for load balancing is not responding, a new node will be tried. + LoadBalanceHostsRandom = LoadBalanceHosts("random") ) +var loadBalanceHosts = []LoadBalanceHosts{LoadBalanceHostsDisable, LoadBalanceHostsRandom} + // Connector represents a fixed configuration for the pq driver with a given -// name. Connector satisfies the database/sql/driver Connector interface and -// can be used to create any number of DB Conn's via the database/sql OpenDB -// function. -// -// See https://golang.org/pkg/database/sql/driver/#Connector. -// See https://golang.org/pkg/database/sql/#OpenDB. +// dsn. Connector satisfies the [database/sql/driver.Connector] interface and +// can be used to create any number of DB Conn's via [sql.OpenDB]. type Connector struct { - opts values + cfg Config dialer Dialer } -// Connect returns a connection to the database using the fixed configuration -// of this Connector. Context is not used. -func (c *Connector) Connect(ctx context.Context) (driver.Conn, error) { - return c.open(ctx) +// NewConnector returns a connector for the pq driver in a fixed configuration +// with the given dsn. The returned connector can be used to create any number +// of equivalent Conn's. The returned connector is intended to be used with +// [sql.OpenDB]. +func NewConnector(dsn string) (*Connector, error) { + cfg, err := NewConfig(dsn) + if err != nil { + return nil, err + } + return NewConnectorConfig(cfg) +} + +// NewConnectorConfig returns a connector for the pq driver in a fixed +// configuration with the given [Config]. The returned connector can be used to +// create any number of equivalent Conn's. The returned connector is intended to +// be used with [sql.OpenDB]. +func NewConnectorConfig(cfg Config) (*Connector, error) { + return &Connector{cfg: cfg, dialer: defaultDialer{}}, nil } +// Connect returns a connection to the database using the fixed configuration of +// this Connector. Context is not used. +func (c *Connector) Connect(ctx context.Context) (driver.Conn, error) { return c.open(ctx) } + // Dialer allows change the dialer used to open connections. -func (c *Connector) Dialer(dialer Dialer) { - c.dialer = dialer -} +func (c *Connector) Dialer(dialer Dialer) { c.dialer = dialer } // Driver returns the underlying driver of this Connector. -func (c *Connector) Driver() driver.Driver { - return &Driver{} -} +func (c *Connector) Driver() driver.Driver { return &Driver{} } -// NewConnector returns a connector for the pq driver in a fixed configuration -// with the given dsn. The returned connector can be used to create any number -// of equivalent Conn's. The returned connector is intended to be used with -// database/sql.OpenDB. +// Config holds options pq supports when connecting to PostgreSQL. // -// See https://golang.org/pkg/database/sql/driver/#Connector. -// See https://golang.org/pkg/database/sql/#OpenDB. -func NewConnector(dsn string) (*Connector, error) { - var err error - o := make(values) +// The postgres struct tag is used for the value from the DSN (e.g. +// "dbname=abc"), and the env struct tag is used for the environment variable +// (e.g. "PGDATABASE=abc") +type Config struct { + // The host to connect to. Absolute paths and values that start with @ are + // for unix domain sockets. Defaults to localhost. + // + // A comma-separated list of host names is also accepted, in which case each + // host name in the list is tried in order or randomly if load_balance_hosts + // is set. An empty item selects the default of localhost. The + // target_session_attrs option controls properties the host must have to be + // considered acceptable. + Host string `postgres:"host" env:"PGHOST"` - // A number of defaults are applied here, in this order: + // IPv4 or IPv6 address to connect to. Using hostaddr allows the application + // to avoid a host name lookup, which might be important in applications + // with time constraints. A hostname is required for sslmode=verify-full and + // the GSSAPI or SSPI authentication methods. // - // * Very low precedence defaults applied in every situation - // * Environment variables - // * Explicitly passed connection information - o["host"] = "localhost" - o["port"] = "5432" - // N.B.: Extra float digits should be set to 3, but that breaks - // Postgres 8.4 and older, where the max is 2. - o["extra_float_digits"] = "2" - for k, v := range parseEnviron(os.Environ()) { - o[k] = v + // The following rules are used: + // + // - If host is given without hostaddr, a host name lookup occurs. + // + // - If hostaddr is given without host, the value for hostaddr gives the + // server network address. The connection attempt will fail if the + // authentication method requires a host name. + // + // - If both host and hostaddr are given, the value for hostaddr gives the + // server network address. The value for host is ignored unless the + // authentication method requires it, in which case it will be used as the + // host name. + // + // A comma-separated list of hostaddr values is also accepted, in which case + // each host in the list is tried in order or randonly if load_balance_hosts + // is set. An empty item causes the corresponding host name to be used, or + // the default host name if that is empty as well. The target_session_attrs + // option controls properties the host must have to be considered + // acceptable. + Hostaddr netip.Addr `postgres:"hostaddr" env:"PGHOSTADDR"` + + // The port to connect to. Defaults to 5432. + // + // If multiple hosts were given in the host or hostaddr parameters, this + // parameter may specify a comma-separated list of ports of the same length + // as the host list, or it may specify a single port number to be used for + // all hosts. An empty string, or an empty item in a comma-separated list, + // specifies the default of 5432. + Port uint16 `postgres:"port" env:"PGPORT"` + + // The name of the database to connect to. + Database string `postgres:"dbname" env:"PGDATABASE"` + + // The user to sign in as. Defaults to the current user. + User string `postgres:"user" env:"PGUSER"` + + // The user's password. + Password string `postgres:"password" env:"PGPASSWORD"` + + // Path to [pgpass] file to store passwords; overrides Password. + // + // [pgpass]: http://www.postgresql.org/docs/current/static/libpq-pgpass.html + Passfile string `postgres:"passfile" env:"PGPASSFILE"` + + // Commandline options to send to the server at connection start. + Options string `postgres:"options" env:"PGOPTIONS"` + + // Application name, displayed in pg_stat_activity and log entries. + ApplicationName string `postgres:"application_name" env:"PGAPPNAME"` + + // Used if application_name is not given. Specifying a fallback name is + // useful in generic utility programs that wish to set a default application + // name but allow it to be overridden by the user. + FallbackApplicationName string `postgres:"fallback_application_name" env:"-"` + + // Whether to use SSL. Defaults to "require" (different from libpq's default + // of "prefer"). + // + // [RegisterTLSConfig] can be used to registers a custom [tls.Config], which + // can be used by setting sslmode=pqgo-«key» in the connection string. + SSLMode SSLMode `postgres:"sslmode" env:"PGSSLMODE"` + + // When set to "direct" it will use SSL without negotiation (PostgreSQL ≥17 only). + SSLNegotiation SSLNegotiation `postgres:"sslnegotiation" env:"PGSSLNEGOTIATION"` + + // Cert file location. The file must contain PEM encoded data. + SSLCert string `postgres:"sslcert" env:"PGSSLCERT"` + + // Key file location. The file must contain PEM encoded data. + SSLKey string `postgres:"sslkey" env:"PGSSLKEY"` + + // The location of the root certificate file. The file must contain PEM encoded data. + SSLRootCert string `postgres:"sslrootcert" env:"PGSSLROOTCERT"` + + // By default SNI is on, any value which is not starting with "1" disables + // SNI. + SSLSNI bool `postgres:"sslsni" env:"PGSSLSNI"` + + // Interpert sslcert and sslkey as PEM encoded data, rather than a path to a + // PEM file. This is a pq extension, not supported in libpq. + SSLInline bool `postgres:"sslinline" env:"-"` + + // GSS (Kerberos) service name when constructing the SPN (default is + // postgres). This will be combined with the host to form the full SPN: + // krbsrvname/host. + KrbSrvname string `postgres:"krbsrvname" env:"PGKRBSRVNAME"` + + // GSS (Kerberos) SPN. This takes priority over krbsrvname if present. This + // is a pq extension, not supported in libpq. + KrbSpn string `postgres:"krbspn" env:"-"` + + // Maximum time to wait while connecting, in seconds. Zero, negative, or not + // specified means wait indefinitely + ConnectTimeout time.Duration `postgres:"connect_timeout" env:"PGCONNECT_TIMEOUT"` + + // Whether to always send []byte parameters over as binary. Enables single + // round-trip mode for non-prepared Query calls. This is a pq extension, not + // supported in libpq. + BinaryParameters bool `postgres:"binary_parameters" env:"-"` + + // This connection should never use the binary format when receiving query + // results from prepared statements. Only provided for debugging. This is a + // pq extension, not supported in libpq. + DisablePreparedBinaryResult bool `postgres:"disable_prepared_binary_result" env:"-"` + + // Client encoding; pq only supports UTF8 and this must be blank or "UTF8". + ClientEncoding string `postgres:"client_encoding" env:"PGCLIENTENCODING"` + + // Date/time representation to use; pq only supports "ISO, MDY" and this + // must be blank or "ISO, MDY". + Datestyle string `postgres:"datestyle" env:"PGDATESTYLE"` + + // Default time zone. + TZ string `postgres:"tz" env:"PGTZ"` + + // Default mode for the genetic query optimizer. + Geqo string `postgres:"geqo" env:"PGGEQO"` + + // Determine whether the session must have certain properties to be + // acceptable. It's typically used in combination with multiple host names + // to select the first acceptable alternative among several hosts. + TargetSessionAttrs TargetSessionAttrs `postgres:"target_session_attrs" env:"PGTARGETSESSIONATTRS"` + + // Controls the order in which the client tries to connect to the available + // hosts. Once a connection attempt is successful no other hosts will be + // tried. This parameter is typically used in combination with multiple host + // names. + // + // This parameter can be used in combination with target_session_attrs to, + // for example, load balance over standby servers only. Once successfully + // connected, subsequent queries on the returned connection will all be sent + // to the same server. + LoadBalanceHosts LoadBalanceHosts `postgres:"load_balance_hosts" env:"PGLOADBALANCEHOSTS"` + + // Runtime parameters: any unrecognized parameter in the DSN will be added + // to this and sent to PostgreSQL during startup. + Runtime map[string]string `postgres:"-" env:"-"` + + // Multi contains additional connection details. The first value is + // available in [Config.Host], [Config.Hostaddr], and [Config.Port], and + // additional ones (if any) are available here. + Multi []ConfigMultihost + + // Record which parameters were given, so we can distinguish between an + // empty string "not given at all". + // + // The alternative is to use pointers or sql.Null[..], but that's more + // awkward to use. + set []string `env:"set"` + + multiHost []string + multiHostaddr []netip.Addr + multiPort []uint16 +} + +// ConfigMultihost specifies an additional server to try to connect to. +type ConfigMultihost struct { + Host string + Hostaddr netip.Addr + Port uint16 +} + +// NewConfig creates a new [Config] from the current environment and given DSN. +// +// A subset of the connection parameters supported by PostgreSQL are supported +// by pq; see the [Config] struct fields for supported parameters. pq also lets +// you specify any [run-time parameter] (such as search_path or work_mem) +// directly in the connection string. This is different from libpq, which does +// not allow run-time parameters in the connection string, instead requiring you +// to supply them in the options parameter. +// +// # key=value connection strings +// +// For key=value strings, use single quotes for values that contain whitespace +// or empty values. A backslash will escape the next character: +// +// "user=pqgo password='with spaces'" +// "user=''" +// "user=space\ man password='it\'s valid'" +// +// # URL connection strings +// +// pq supports URL-style postgres:// or postgresql:// connection strings in the +// form: +// +// postgres[ql]://[user[:pwd]@][net-location][:port][/dbname][?param1=value1&...] +// +// Go's [net/url.Parse] is more strict than PostgreSQL's URL parser and will +// (correctly) reject %2F in the host part. This means that unix-socket URLs: +// +// postgres://[user[:pwd]@][unix-socket][:port[/dbname]][?param1=value1&...] +// postgres://%2Ftmp%2Fpostgres/db +// +// will not work. You will need to use "host=/tmp/postgres dbname=db". +// +// Similarly, multiple ports also won't work, but ?port= will: +// +// postgres://host1,host2:5432,6543/dbname Doesn't work +// postgres://host1,host2/dbname?port=5432,6543 Works +// +// # Environment +// +// Most [PostgreSQL environment variables] are supported by pq. Environment +// variables have a lower precedence than explicitly provided connection +// parameters. pq will return an error if environment variables it does not +// support are set. Environment variables have a lower precedence than +// explicitly provided connection parameters. +// +// [run-time parameter]: http://www.postgresql.org/docs/current/static/runtime-config.html +// [PostgreSQL environment variables]: http://www.postgresql.org/docs/current/static/libpq-envars.html +func NewConfig(dsn string) (Config, error) { + return newConfig(dsn, os.Environ()) +} + +// Clone returns a copy of the [Config]. +func (cfg Config) Clone() Config { + rt := make(map[string]string) + for k, v := range cfg.Runtime { + rt[k] = v } + c := cfg + c.Runtime = rt + c.set = append([]string{}, cfg.set...) + return c +} - if strings.HasPrefix(dsn, "postgres://") || strings.HasPrefix(dsn, "postgresql://") { - dsn, err = ParseURL(dsn) - if err != nil { - return nil, err - } +// hosts returns a slice of copies of this config, one for each host. +func (cfg Config) hosts() []Config { + cfgs := make([]Config, 1, len(cfg.Multi)+1) + cfgs[0] = cfg.Clone() + for _, m := range cfg.Multi { + c := cfg.Clone() + c.Host, c.Hostaddr, c.Port = m.Host, m.Hostaddr, m.Port + cfgs = append(cfgs, c) } - if err := parseOpts(dsn, o); err != nil { - return nil, err + if cfg.LoadBalanceHosts == LoadBalanceHostsRandom { + rand.Shuffle(len(cfgs), func(i, j int) { cfgs[i], cfgs[j] = cfgs[j], cfgs[i] }) } - // Use the "fallback" application name if necessary - if fallback, ok := o["fallback_application_name"]; ok { - if _, ok := o["application_name"]; !ok { - o["application_name"] = fallback + return cfgs +} + +func newConfig(dsn string, env []string) (Config, error) { + cfg := Config{Host: "localhost", Port: 5432, SSLSNI: true} + if err := cfg.fromEnv(env); err != nil { + return Config{}, err + } + if err := cfg.fromDSN(dsn); err != nil { + return Config{}, err + } + + // Need to have exactly the same number of host and hostaddr, or only specify one. + if cfg.isset("host") && cfg.Host != "" && cfg.Hostaddr != (netip.Addr{}) && len(cfg.multiHost) != len(cfg.multiHostaddr) { + return Config{}, fmt.Errorf("pq: could not match %d host names to %d hostaddr values", + len(cfg.multiHost)+1, len(cfg.multiHostaddr)+1) + } + // Need one port that applies to all or exactly the same number of ports as hosts. + l, ll := max(len(cfg.multiHost), len(cfg.multiHostaddr)), len(cfg.multiPort) + if l > 0 && ll > 0 && l != ll { + return Config{}, fmt.Errorf("pq: could not match %d port numbers to %d hosts", ll+1, l+1) + } + + // Populate Multi + if len(cfg.multiHostaddr) > len(cfg.multiHost) { + cfg.multiHost = make([]string, len(cfg.multiHostaddr)) + } + for i, h := range cfg.multiHost { + p := cfg.Port + if len(cfg.multiPort) > 0 { + p = cfg.multiPort[i] + } + var addr netip.Addr + if len(cfg.multiHostaddr) > 0 { + addr = cfg.multiHostaddr[i] } + cfg.Multi = append(cfg.Multi, ConfigMultihost{ + Host: h, + Port: p, + Hostaddr: addr, + }) + } + + // Use the "fallback" application name if necessary + if cfg.isset("fallback_application_name") && !cfg.isset("application_name") { + cfg.ApplicationName = cfg.FallbackApplicationName } // We can't work with any client_encoding other than UTF-8 currently. @@ -87,34 +464,488 @@ func NewConnector(dsn string) (*Connector, error) { // parsing its value is not worth it. Instead, we always explicitly send // client_encoding as a separate run-time parameter, which should override // anything set in options. - if enc, ok := o["client_encoding"]; ok && !isUTF8(enc) { - return nil, errors.New("client_encoding must be absent or 'UTF8'") + if cfg.isset("client_encoding") && !isUTF8(cfg.ClientEncoding) { + return Config{}, fmt.Errorf(`pq: unsupported client_encoding %q: must be absent or "UTF8"`, cfg.ClientEncoding) } - o["client_encoding"] = "UTF8" // DateStyle needs a similar treatment. - if datestyle, ok := o["datestyle"]; ok { - if datestyle != "ISO, MDY" { - return nil, fmt.Errorf("setting datestyle must be absent or %v; got %v", "ISO, MDY", datestyle) + if cfg.isset("datestyle") && cfg.Datestyle != "ISO, MDY" { + return Config{}, fmt.Errorf(`pq: unsupported datestyle %q: must be absent or "ISO, MDY"`, cfg.Datestyle) + } + cfg.ClientEncoding, cfg.Datestyle = "UTF8", "ISO, MDY" + + // Set default user if not explicitly provided. + if !cfg.isset("user") { + u, err := pqutil.User() + if err != nil { + return Config{}, err } - } else { - o["datestyle"] = "ISO, MDY" + cfg.User = u + } + + // SSL is not necessary or supported over UNIX domain sockets. + if nw, _ := cfg.network(); nw == "unix" { + cfg.SSLMode = SSLModeDisable + } + + return cfg, nil +} + +func (cfg Config) network() (string, string) { + if cfg.Hostaddr != (netip.Addr{}) { + return "tcp", net.JoinHostPort(cfg.Hostaddr.String(), strconv.Itoa(int(cfg.Port))) } + // UNIX domain sockets are either represented by an (absolute) file system + // path or they live in the abstract name space (starting with an @). + if filepath.IsAbs(cfg.Host) || strings.HasPrefix(cfg.Host, "@") { + sockPath := filepath.Join(cfg.Host, ".s.PGSQL."+strconv.Itoa(int(cfg.Port))) + return "unix", sockPath + } + return "tcp", net.JoinHostPort(cfg.Host, strconv.Itoa(int(cfg.Port))) +} + +func (cfg *Config) fromEnv(env []string) error { + e := make(map[string]string) + for _, v := range env { + k, v, ok := strings.Cut(v, "=") + if !ok { + continue + } + switch k { + case "PGREQUIREAUTH", "PGCHANNELBINDING", "PGSERVICE", "PGSERVICEFILE", "PGREALM", + "PGSSLCERTMODE", "PGSSLCOMPRESSION", "PGREQUIRESSL", "PGSSLCRL", "PGREQUIREPEER", + "PGSYSCONFDIR", "PGLOCALEDIR", "PGSSLCRLDIR", "PGSSLMINPROTOCOLVERSION", "PGSSLMAXPROTOCOLVERSION", + "PGGSSENCMODE", "PGGSSDELEGATION", "PGMINPROTOCOLVERSION", "PGMAXPROTOCOLVERSION", "PGGSSLIB": + return fmt.Errorf("pq: environment variable $%s is not supported", k) + case "PGKRBSRVNAME": + if newGss == nil { + return fmt.Errorf("pq: environment variable $%s is not supported as Kerberos is not enabled", k) + } + } + e[k] = v + } + return cfg.setFromTag(e, "env") +} - // If a user is not provided by any other means, the last - // resort is to use the current operating system provided user - // name. - if _, ok := o["user"]; !ok { - u, err := userCurrent() +// parseOpts parses the options from name and adds them to the values. +// +// The parsing code is based on conninfo_parse from libpq's fe-connect.c +func (cfg *Config) fromDSN(dsn string) error { + if strings.HasPrefix(dsn, "postgres://") || strings.HasPrefix(dsn, "postgresql://") { + var err error + dsn, err = convertURL(dsn) if err != nil { - return nil, err + return err + } + } + + var ( + opt = make(map[string]string) + s = []rune(dsn) + i int + next = func() (rune, bool) { + if i >= len(s) { + return 0, false + } + r := s[i] + i++ + return r, true + } + skipSpaces = func() (rune, bool) { + r, ok := next() + for unicode.IsSpace(r) && ok { + r, ok = next() + } + return r, ok + } + ) + + for { + var ( + keyRunes, valRunes []rune + r rune + ok bool + ) + + if r, ok = skipSpaces(); !ok { + break + } + + // Scan the key + for !unicode.IsSpace(r) && r != '=' { + keyRunes = append(keyRunes, r) + if r, ok = next(); !ok { + break + } + } + + // Skip any whitespace if we're not at the = yet + if r != '=' { + r, ok = skipSpaces() + } + + // The current character should be = + if r != '=' || !ok { + return fmt.Errorf(`missing "=" after %q in connection info string"`, string(keyRunes)) + } + + // Skip any whitespace after the = + if r, ok = skipSpaces(); !ok { + // If we reach the end here, the last value is just an empty string as per libpq. + opt[string(keyRunes)] = "" + break + } + + if r != '\'' { + for !unicode.IsSpace(r) { + if r == '\\' { + if r, ok = next(); !ok { + return fmt.Errorf(`missing character after backslash`) + } + } + valRunes = append(valRunes, r) + + if r, ok = next(); !ok { + break + } + } + } else { + quote: + for { + if r, ok = next(); !ok { + return fmt.Errorf(`unterminated quoted string literal in connection string`) + } + switch r { + case '\'': + break quote + case '\\': + r, _ = next() + fallthrough + default: + valRunes = append(valRunes, r) + } + } } - o["user"] = u + + opt[string(keyRunes)] = string(valRunes) + } + + return cfg.setFromTag(opt, "postgres") +} + +func (cfg *Config) setFromTag(o map[string]string, tag string) error { + f := "pq: wrong value for %q: " + if tag == "env" { + f = "pq: wrong value for $%s: " + } + var ( + types = reflect.TypeOf(cfg).Elem() + values = reflect.ValueOf(cfg).Elem() + ) + for i := 0; i < types.NumField(); i++ { + var ( + rt = types.Field(i) + rv = values.Field(i) + k = rt.Tag.Get(tag) + connectTimeout = (tag == "postgres" && k == "connect_timeout") || (tag == "env" && k == "PGCONNECT_TIMEOUT") + host = (tag == "postgres" && k == "host") || (tag == "env" && k == "PGHOST") + hostaddr = (tag == "postgres" && k == "hostaddr") || (tag == "env" && k == "PGHOSTADDR") + port = (tag == "postgres" && k == "port") || (tag == "env" && k == "PGPORT") + sslmode = (tag == "postgres" && k == "sslmode") || (tag == "env" && k == "PGSSLMODE") + sslnegotiation = (tag == "postgres" && k == "sslnegotiation") || (tag == "env" && k == "PGSSLNEGOTIATION") + targetsessionattrs = (tag == "postgres" && k == "target_session_attrs") || (tag == "env" && k == "PGTARGETSESSIONATTRS") + loadbalancehosts = (tag == "postgres" && k == "load_balance_hosts") || (tag == "env" && k == "PGLOADBALANCEHOSTS") + ) + if k == "" || k == "-" { + continue + } + + v, ok := o[k] + delete(o, k) + if ok { + if t, ok := rt.Tag.Lookup("postgres"); ok && t != "" && t != "-" { + cfg.set = append(cfg.set, t) + } + switch rt.Type.Kind() { + default: + return fmt.Errorf("don't know how to set %s: unknown type %s", rt.Name, rt.Type.Kind()) + case reflect.Struct: + if rt.Type == reflect.TypeOf(netip.Addr{}) { + if hostaddr { + vv := strings.Split(v, ",") + v = vv[0] + for _, vvv := range vv[1:] { + if vvv == "" { + cfg.multiHostaddr = append(cfg.multiHostaddr, netip.Addr{}) + } else { + ip, err := netip.ParseAddr(vvv) + if err != nil { + return fmt.Errorf(f+"%w", k, err) + } + cfg.multiHostaddr = append(cfg.multiHostaddr, ip) + } + } + } + ip, err := netip.ParseAddr(v) + if err != nil { + return fmt.Errorf(f+"%w", k, err) + } + rv.Set(reflect.ValueOf(ip)) + } else { + return fmt.Errorf("don't know how to set %s: unknown type %s", rt.Name, rt.Type) + } + case reflect.String: + if sslmode && !slices.Contains(sslModes, SSLMode(v)) && !(strings.HasPrefix(v, "pqgo-") && hasTLSConfig(v[5:])) { + return fmt.Errorf(f+`%q is not supported; supported values are %s`, k, v, pqutil.Join(sslModes)) + } + if sslnegotiation && !slices.Contains(sslNegotiations, SSLNegotiation(v)) { + return fmt.Errorf(f+`%q is not supported; supported values are %s`, k, v, pqutil.Join(sslNegotiations)) + } + if targetsessionattrs && !slices.Contains(targetSessionAttrs, TargetSessionAttrs(v)) { + return fmt.Errorf(f+`%q is not supported; supported values are %s`, k, v, pqutil.Join(targetSessionAttrs)) + } + if loadbalancehosts && !slices.Contains(loadBalanceHosts, LoadBalanceHosts(v)) { + return fmt.Errorf(f+`%q is not supported; supported values are %s`, k, v, pqutil.Join(loadBalanceHosts)) + } + if host { + vv := strings.Split(v, ",") + v = vv[0] + for i, vvv := range vv[1:] { + if vvv == "" { + vv[i+1] = "localhost" + } + } + cfg.multiHost = append(cfg.multiHost, vv[1:]...) + } + rv.SetString(v) + case reflect.Int64: + n, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf(f+"%w", k, err) + } + if connectTimeout { + n = int64(time.Duration(n) * time.Second) + } + rv.SetInt(n) + case reflect.Uint16: + if port { + vv := strings.Split(v, ",") + v = vv[0] + for _, vvv := range vv[1:] { + if vvv == "" { + vvv = "5432" + } + n, err := strconv.ParseUint(vvv, 10, 16) + if err != nil { + return fmt.Errorf(f+"%w", k, err) + } + cfg.multiPort = append(cfg.multiPort, uint16(n)) + } + } + n, err := strconv.ParseUint(v, 10, 16) + if err != nil { + return fmt.Errorf(f+"%w", k, err) + } + rv.SetUint(n) + case reflect.Bool: + b, err := pqutil.ParseBool(v) + if err != nil { + return fmt.Errorf(f+"%w", k, err) + } + rv.SetBool(b) + } + } + } + + // Set run-time; we delete map keys as they're set in the struct. + if tag == "postgres" { + // Make sure database= sets dbname=; in startup() we send database for + // dbname, and if we have both set it's inconsistent as the loop order + // is a map. + if d, ok := o["database"]; ok { + delete(o, "database") + if o["dbname"] == "" { + o["dbname"] = d + } + } + cfg.Runtime = o + } + + return nil +} + +func (cfg Config) isset(name string) bool { + return slices.Contains(cfg.set, name) +} + +// Convert to a map; used only in tests. +func (cfg Config) tomap() map[string]string { + var ( + o = make(map[string]string) + values = reflect.ValueOf(cfg) + types = reflect.TypeOf(cfg) + ) + for i := 0; i < types.NumField(); i++ { + var ( + rt = types.Field(i) + rv = values.Field(i) + k = rt.Tag.Get("postgres") + ) + if k == "" || k == "-" { + continue + } + if !rv.IsZero() || slices.Contains(cfg.set, k) { + switch rt.Type.Kind() { + default: + if s, ok := rv.Interface().(fmt.Stringer); ok { + o[k] = s.String() + } else { + o[k] = rv.String() + } + case reflect.Uint16: + n := rv.Uint() + o[k] = strconv.FormatUint(n, 10) + case reflect.Int64: + n := rv.Int() + if k == "connect_timeout" { + n = int64(time.Duration(n) / time.Second) + } + o[k] = strconv.FormatInt(n, 10) + case reflect.Bool: + if rv.Bool() { + o[k] = "yes" + } else { + o[k] = "no" + } + } + } + } + for k, v := range cfg.Runtime { + o[k] = v + } + return o +} + +// Create DSN for this config; used only in tests. +func (cfg Config) string() string { + var ( + m = cfg.tomap() + keys = make([]string, 0, len(m)) + ) + for k := range m { + switch k { + case "datestyle", "client_encoding": + continue + case "host", "port", "user", "sslsni": + if !cfg.isset(k) { + continue + } + } + if k == "host" && len(cfg.multiHost) > 0 { + m[k] += "," + strings.Join(cfg.multiHost, ",") + } + if k == "hostaddr" && len(cfg.multiHostaddr) > 0 { + for _, ha := range cfg.multiHostaddr { + m[k] += "," + if ha != (netip.Addr{}) { + m[k] += ha.String() + } + } + } + if k == "port" && len(cfg.multiPort) > 0 { + for _, p := range cfg.multiPort { + m[k] += "," + strconv.Itoa(int(p)) + } + } + keys = append(keys, k) + } + sort.Strings(keys) + + var b strings.Builder + for i, k := range keys { + if i > 0 { + b.WriteByte(' ') + } + b.WriteString(k) + b.WriteByte('=') + var ( + v = m[k] + nv = make([]rune, 0, len(v)+2) + quote = v == "" + ) + for _, c := range v { + if c == ' ' { + quote = true + } + if c == '\'' { + nv = append(nv, '\\') + } + nv = append(nv, c) + } + if quote { + b.WriteByte('\'') + } + b.WriteString(string(nv)) + if quote { + b.WriteByte('\'') + } + } + return b.String() +} + +// Recognize all sorts of silly things as "UTF-8", like Postgres does +func isUTF8(name string) bool { + s := strings.Map(func(c rune) rune { + if 'A' <= c && c <= 'Z' { + return c + ('a' - 'A') + } + if 'a' <= c && c <= 'z' || '0' <= c && c <= '9' { + return c + } + return -1 // discard + }, name) + return s == "utf8" || s == "unicode" +} + +func convertURL(url string) (string, error) { + u, err := neturl.Parse(url) + if err != nil { + return "", err + } + + if u.Scheme != "postgres" && u.Scheme != "postgresql" { + return "", fmt.Errorf("invalid connection protocol: %s", u.Scheme) + } + + var kvs []string + escaper := strings.NewReplacer(`'`, `\'`, `\`, `\\`) + accrue := func(k, v string) { + if v != "" { + kvs = append(kvs, k+"='"+escaper.Replace(v)+"'") + } + } + + if u.User != nil { + pw, _ := u.User.Password() + accrue("user", u.User.Username()) + accrue("password", pw) + } + + if host, port, err := net.SplitHostPort(u.Host); err != nil { + accrue("host", u.Host) + } else { + accrue("host", host) + accrue("port", port) + } + + if u.Path != "" { + accrue("dbname", u.Path[1:]) } - // SSL is not necessary or supported over UNIX domain sockets - if network, _ := network(o); network == "unix" { - o["sslmode"] = "disable" + q := u.Query() + for k := range q { + accrue(k, q.Get(k)) } - return &Connector{opts: o, dialer: defaultDialer{}}, nil + sort.Strings(kvs) // Makes testing easier (not a performance concern) + return strings.Join(kvs, " "), nil } diff --git a/vendor/github.com/lib/pq/copy.go b/vendor/github.com/lib/pq/copy.go index a8f16b2b26b..c72f6ceb7ce 100644 --- a/vendor/github.com/lib/pq/copy.go +++ b/vendor/github.com/lib/pq/copy.go @@ -8,6 +8,8 @@ import ( "errors" "fmt" "sync" + + "github.com/lib/pq/internal/proto" ) var ( @@ -18,38 +20,41 @@ var ( errCopyInProgress = errors.New("pq: COPY in progress") ) -// CopyIn creates a COPY FROM statement which can be prepared with -// Tx.Prepare(). The target table should be visible in search_path. +// CopyIn creates a COPY FROM statement which can be prepared with Tx.Prepare(). +// The target table should be visible in search_path. +// +// It copies all columns if the list of columns is empty. func CopyIn(table string, columns ...string) string { - buffer := bytes.NewBufferString("COPY ") - BufferQuoteIdentifier(table, buffer) - buffer.WriteString(" (") - makeStmt(buffer, columns...) - return buffer.String() + b := bytes.NewBufferString("COPY ") + BufferQuoteIdentifier(table, b) + makeStmt(b, columns...) + return b.String() +} + +// CopyInSchema creates a COPY FROM statement which can be prepared with +// Tx.Prepare(). +func CopyInSchema(schema, table string, columns ...string) string { + b := bytes.NewBufferString("COPY ") + BufferQuoteIdentifier(schema, b) + b.WriteRune('.') + BufferQuoteIdentifier(table, b) + makeStmt(b, columns...) + return b.String() } -// MakeStmt makes the stmt string for CopyIn and CopyInSchema. -func makeStmt(buffer *bytes.Buffer, columns ...string) { - //s := bytes.NewBufferString() +func makeStmt(b *bytes.Buffer, columns ...string) { + if len(columns) == 0 { + b.WriteString(" FROM STDIN") + return + } + b.WriteString(" (") for i, col := range columns { if i != 0 { - buffer.WriteString(", ") + b.WriteString(", ") } - BufferQuoteIdentifier(col, buffer) + BufferQuoteIdentifier(col, b) } - buffer.WriteString(") FROM STDIN") -} - -// CopyInSchema creates a COPY FROM statement which can be prepared with -// Tx.Prepare(). -func CopyInSchema(schema, table string, columns ...string) string { - buffer := bytes.NewBufferString("COPY ") - BufferQuoteIdentifier(schema, buffer) - buffer.WriteRune('.') - BufferQuoteIdentifier(table, buffer) - buffer.WriteString(" (") - makeStmt(buffer, columns...) - return buffer.String() + b.WriteString(") FROM STDIN") } type copyin struct { @@ -72,7 +77,7 @@ const ciBufferSize = 64 * 1024 // flush buffer before the buffer is filled up and needs reallocation const ciBufferFlushSize = 63 * 1024 -func (cn *conn) prepareCopyIn(q string) (_ driver.Stmt, err error) { +func (cn *conn) prepareCopyIn(q string) (_ driver.Stmt, resErr error) { if !cn.isInTransaction() { return nil, errCopyNotSupportedOutsideTxn } @@ -84,69 +89,83 @@ func (cn *conn) prepareCopyIn(q string) (_ driver.Stmt, err error) { done: make(chan bool, 1), } // add CopyData identifier + 4 bytes for message length - ci.buffer = append(ci.buffer, 'd', 0, 0, 0, 0) + ci.buffer = append(ci.buffer, byte(proto.CopyDataRequest), 0, 0, 0, 0) - b := cn.writeBuf('Q') + b := cn.writeBuf(proto.Query) b.string(q) - cn.send(b) + err := cn.send(b) + if err != nil { + return nil, err + } awaitCopyInResponse: for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return nil, err + } switch t { - case 'G': + case proto.CopyInResponse: if r.byte() != 0 { - err = errBinaryCopyNotSupported + resErr = errBinaryCopyNotSupported break awaitCopyInResponse } go ci.resploop() return ci, nil - case 'H': - err = errCopyToNotSupported + case proto.CopyOutResponse: + resErr = errCopyToNotSupported break awaitCopyInResponse - case 'E': - err = parseError(r) - case 'Z': - if err == nil { + case proto.ErrorResponse: + resErr = parseError(r, q) + case proto.ReadyForQuery: + if resErr == nil { ci.setBad(driver.ErrBadConn) - errorf("unexpected ReadyForQuery in response to COPY") + return nil, fmt.Errorf("pq: unexpected ReadyForQuery in response to COPY") } cn.processReadyForQuery(r) - return nil, err + return nil, resErr default: ci.setBad(driver.ErrBadConn) - errorf("unknown response for copy query: %q", t) + return nil, fmt.Errorf("pq: unknown response for copy query: %q", t) } } // something went wrong, abort COPY before we return - b = cn.writeBuf('f') - b.string(err.Error()) - cn.send(b) + b = cn.writeBuf(proto.CopyFail) + b.string(resErr.Error()) + err = cn.send(b) + if err != nil { + return nil, err + } for { - t, r := cn.recv1() + t, r, err := cn.recv1() + if err != nil { + return nil, err + } + switch t { - case 'c', 'C', 'E': - case 'Z': + case proto.CopyDoneResponse, proto.CommandComplete, proto.ErrorResponse: + case proto.ReadyForQuery: // correctly aborted, we're done cn.processReadyForQuery(r) - return nil, err + return nil, resErr default: ci.setBad(driver.ErrBadConn) - errorf("unknown response for CopyFail: %q", t) + return nil, fmt.Errorf("pq: unknown response for CopyFail: %q", t) } } } -func (ci *copyin) flush(buf []byte) { +func (ci *copyin) flush(buf []byte) error { + if len(buf)-1 > proto.MaxUint32 { + return errors.New("pq: too many columns") + } // set message length (without message identifier) binary.BigEndian.PutUint32(buf[1:], uint32(len(buf)-1)) _, err := ci.cn.c.Write(buf) - if err != nil { - panic(err) - } + return err } func (ci *copyin) resploop() { @@ -160,20 +179,23 @@ func (ci *copyin) resploop() { return } switch t { - case 'C': + case proto.CommandComplete: // complete - res, _ := ci.cn.parseComplete(r.string()) + res, _, err := ci.cn.parseComplete(r.string()) + if err != nil { + panic(err) + } ci.setResult(res) - case 'N': + case proto.NoticeResponse: if n := ci.cn.noticeHandler; n != nil { - n(parseError(&r)) + n(parseError(&r, "")) } - case 'Z': + case proto.ReadyForQuery: ci.cn.processReadyForQuery(&r) ci.done <- true return - case 'E': - err := parseError(&r) + case proto.ErrorResponse: + err := parseError(&r, "") ci.setError(err) default: ci.setBad(driver.ErrBadConn) @@ -240,16 +262,13 @@ func (ci *copyin) Query(v []driver.Value) (r driver.Rows, err error) { // You need to call Exec(nil) to sync the COPY stream and to get any // errors from pending data, since Stmt.Close() doesn't return errors // to the user. -func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) { +func (ci *copyin) Exec(v []driver.Value) (driver.Result, error) { if ci.closed { return nil, errCopyInClosed } - if err := ci.getBad(); err != nil { return nil, err } - defer ci.cn.errRecover(&err) - if err := ci.err(); err != nil { return nil, err } @@ -258,13 +277,18 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) { if err := ci.Close(); err != nil { return driver.RowsAffected(0), err } - return ci.getResult(), nil } - numValues := len(v) + var ( + numValues = len(v) + err error + ) for i, value := range v { - ci.buffer = appendEncodedText(&ci.cn.parameterStatus, ci.buffer, value) + ci.buffer, err = appendEncodedText(ci.buffer, value) + if err != nil { + return nil, ci.cn.handleError(err) + } if i < numValues-1 { ci.buffer = append(ci.buffer, '\t') } @@ -273,7 +297,10 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) { ci.buffer = append(ci.buffer, '\n') if len(ci.buffer) > ciBufferFlushSize { - ci.flush(ci.buffer) + err := ci.flush(ci.buffer) + if err != nil { + return nil, ci.cn.handleError(err) + } // reset buffer, keep bytes for message identifier and length ci.buffer = ci.buffer[:5] } @@ -288,20 +315,16 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) { // You need to call Exec(nil) to sync the COPY stream and to get any // errors from pending data, since Stmt.Close() doesn't return errors // to the user. -func (ci *copyin) CopyData(ctx context.Context, line string) (r driver.Result, err error) { +func (ci *copyin) CopyData(ctx context.Context, line string) (driver.Result, error) { if ci.closed { return nil, errCopyInClosed } - if finish := ci.cn.watchCancel(ctx); finish != nil { defer finish() } - if err := ci.getBad(); err != nil { return nil, err } - defer ci.cn.errRecover(&err) - if err := ci.err(); err != nil { return nil, err } @@ -310,7 +333,11 @@ func (ci *copyin) CopyData(ctx context.Context, line string) (r driver.Result, e ci.buffer = append(ci.buffer, '\n') if len(ci.buffer) > ciBufferFlushSize { - ci.flush(ci.buffer) + err := ci.flush(ci.buffer) + if err != nil { + return nil, ci.cn.handleError(err) + } + // reset buffer, keep bytes for message identifier and length ci.buffer = ci.buffer[:5] } @@ -318,7 +345,7 @@ func (ci *copyin) CopyData(ctx context.Context, line string) (r driver.Result, e return driver.RowsAffected(0), nil } -func (ci *copyin) Close() (err error) { +func (ci *copyin) Close() error { if ci.closed { // Don't do anything, we're already closed return nil } @@ -327,15 +354,17 @@ func (ci *copyin) Close() (err error) { if err := ci.getBad(); err != nil { return err } - defer ci.cn.errRecover(&err) if len(ci.buffer) > 0 { - ci.flush(ci.buffer) + err := ci.flush(ci.buffer) + if err != nil { + return ci.cn.handleError(err) + } } // Avoid touching the scratch buffer as resploop could be using it. - err = ci.cn.sendSimpleMessage('c') + err := ci.cn.sendSimpleMessage(proto.CopyDoneRequest) if err != nil { - return err + return ci.cn.handleError(err) } <-ci.done diff --git a/vendor/github.com/lib/pq/deprecated.go b/vendor/github.com/lib/pq/deprecated.go new file mode 100644 index 00000000000..0def49de9b7 --- /dev/null +++ b/vendor/github.com/lib/pq/deprecated.go @@ -0,0 +1,59 @@ +package pq + +// PGError is an interface used by previous versions of pq. +// +// Deprecated: use the Error type. This is never used. +type PGError interface { + Error() string + Fatal() bool + Get(k byte) (v string) +} + +// Get implements the legacy PGError interface. +// +// Deprecated: new code should use the fields of the Error struct directly. +func (e *Error) Get(k byte) (v string) { + switch k { + case 'S': + return e.Severity + case 'C': + return string(e.Code) + case 'M': + return e.Message + case 'D': + return e.Detail + case 'H': + return e.Hint + case 'P': + return e.Position + case 'p': + return e.InternalPosition + case 'q': + return e.InternalQuery + case 'W': + return e.Where + case 's': + return e.Schema + case 't': + return e.Table + case 'c': + return e.Column + case 'd': + return e.DataTypeName + case 'n': + return e.Constraint + case 'F': + return e.File + case 'L': + return e.Line + case 'R': + return e.Routine + } + return "" +} + +// ParseURL converts a url to a connection string for driver.Open. +// +// Deprecated: directly passing an URL to sql.Open("postgres", "postgres://...") +// now works, and calling this manually is no longer required. +func ParseURL(url string) (string, error) { return convertURL(url) } diff --git a/vendor/github.com/lib/pq/doc.go b/vendor/github.com/lib/pq/doc.go index b57184801ba..10394073329 100644 --- a/vendor/github.com/lib/pq/doc.go +++ b/vendor/github.com/lib/pq/doc.go @@ -1,8 +1,8 @@ /* -Package pq is a pure Go Postgres driver for the database/sql package. +Package pq is a Go PostgreSQL driver for database/sql. -In most cases clients will use the database/sql package instead of -using this package directly. For example: +Most clients will use the database/sql package instead of using this package +directly. For example: import ( "database/sql" @@ -11,157 +11,75 @@ using this package directly. For example: ) func main() { - connStr := "user=pqgotest dbname=pqgotest sslmode=verify-full" - db, err := sql.Open("postgres", connStr) + dsn := "user=pqgo dbname=pqgo sslmode=verify-full" + db, err := sql.Open("postgres", dsn) if err != nil { log.Fatal(err) } age := 21 - rows, err := db.Query("SELECT name FROM users WHERE age = $1", age) - … + rows, err := db.Query("select name from users where age = $1", age) + // … } -You can also connect to a database using a URL. For example: +You can also connect with an URL: - connStr := "postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full" - db, err := sql.Open("postgres", connStr) + dsn := "postgres://pqgo:password@localhost/pqgo?sslmode=verify-full" + db, err := sql.Open("postgres", dsn) +# Connection String Parameters -Connection String Parameters +See [NewConfig]. +# Queries -Similarly to libpq, when establishing a connection using pq you are expected to -supply a connection string containing zero or more parameters. -A subset of the connection parameters supported by libpq are also supported by pq. -Additionally, pq also lets you specify run-time parameters (such as search_path or work_mem) -directly in the connection string. This is different from libpq, which does not allow -run-time parameters in the connection string, instead requiring you to supply -them in the options parameter. +database/sql does not dictate any specific format for parameter placeholders, +and pq uses the PostgreSQL-native ordinal markers ($1, $2, etc.). The same +placeholder can be used more than once: -For compatibility with libpq, the following special connection parameters are -supported: + rows, err := db.Query( + `select * from users where name = $1 or age between $2 and $2 + 3`, + "Duck", 64) - * dbname - The name of the database to connect to - * user - The user to sign in as - * password - The user's password - * host - The host to connect to. Values that start with / are for unix - domain sockets. (default is localhost) - * port - The port to bind to. (default is 5432) - * sslmode - Whether or not to use SSL (default is require, this is not - the default for libpq) - * fallback_application_name - An application_name to fall back to if one isn't provided. - * connect_timeout - Maximum wait for connection, in seconds. Zero or - not specified means wait indefinitely. - * sslcert - Cert file location. The file must contain PEM encoded data. - * sslkey - Key file location. The file must contain PEM encoded data. - * sslrootcert - The location of the root certificate file. The file - must contain PEM encoded data. +pq does not support [sql.Result.LastInsertId]. Use the RETURNING clause with a +Query or QueryRow call instead to return the identifier: -Valid values for sslmode are: - - * disable - No SSL - * require - Always SSL (skip verification) - * verify-ca - Always SSL (verify that the certificate presented by the - server was signed by a trusted CA) - * verify-full - Always SSL (verify that the certification presented by - the server was signed by a trusted CA and the server host name - matches the one in the certificate) - -See http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING -for more information about connection string parameters. - -Use single quotes for values that contain whitespace: - - "user=pqgotest password='with spaces'" - -A backslash will escape the next character in values: - - "user=space\ man password='it\'s valid'" - -Note that the connection parameter client_encoding (which sets the -text encoding for the connection) may be set but must be "UTF8", -matching with the same rules as Postgres. It is an error to provide -any other value. - -In addition to the parameters listed above, any run-time parameter that can be -set at backend start time can be set in the connection string. For more -information, see -http://www.postgresql.org/docs/current/static/runtime-config.html. - -Most environment variables as specified at http://www.postgresql.org/docs/current/static/libpq-envars.html -supported by libpq are also supported by pq. If any of the environment -variables not supported by pq are set, pq will panic during connection -establishment. Environment variables have a lower precedence than explicitly -provided connection parameters. - -The pgpass mechanism as described in http://www.postgresql.org/docs/current/static/libpq-pgpass.html -is supported, but on Windows PGPASSFILE must be specified explicitly. - - -Queries - - -database/sql does not dictate any specific format for parameter -markers in query strings, and pq uses the Postgres-native ordinal markers, -as shown above. The same marker can be reused for the same parameter: - - rows, err := db.Query(`SELECT name FROM users WHERE favorite_fruit = $1 - OR age BETWEEN $2 AND $2 + 3`, "orange", 64) - -pq does not support the LastInsertId() method of the Result type in database/sql. -To return the identifier of an INSERT (or UPDATE or DELETE), use the Postgres -RETURNING clause with a standard Query or QueryRow call: + row := db.QueryRow(`insert into users(name, age) values('Scrooge McDuck', 93) returning id`) var userid int - err := db.QueryRow(`INSERT INTO users(name, favorite_fruit, age) - VALUES('beatrice', 'starfruit', 93) RETURNING id`).Scan(&userid) - -For more details on RETURNING, see the Postgres documentation: - - http://www.postgresql.org/docs/current/static/sql-insert.html - http://www.postgresql.org/docs/current/static/sql-update.html - http://www.postgresql.org/docs/current/static/sql-delete.html + err := row.Scan(&userid) -For additional instructions on querying see the documentation for the database/sql package. +# Data Types - -Data Types - - -Parameters pass through driver.DefaultParameterConverter before they are handled -by this package. When the binary_parameters connection option is enabled, -[]byte values are sent directly to the backend as data in binary format. +Parameters pass through [driver.DefaultParameterConverter] before they are handled +by this package. When the binary_parameters connection option is enabled, []byte +values are sent directly to the backend as data in binary format. This package returns the following types for values from the PostgreSQL backend: - - integer types smallint, integer, and bigint are returned as int64 - - floating-point types real and double precision are returned as float64 - - character types char, varchar, and text are returned as string - - temporal types date, time, timetz, timestamp, and timestamptz are - returned as time.Time - - the boolean type is returned as bool - - the bytea type is returned as []byte + - integer types smallint, integer, and bigint are returned as int64 + - floating-point types real and double precision are returned as float64 + - character types char, varchar, and text are returned as string + - temporal types date, time, timetz, timestamp, and timestamptz are + returned as time.Time + - the boolean type is returned as bool + - the bytea type is returned as []byte All other types are returned directly from the backend as []byte values in text format. +# Errors -Errors - - -pq may return errors of type *pq.Error which can be interrogated for error details: - - if err, ok := err.(*pq.Error); ok { - fmt.Println("pq error:", err.Code.Name()) - } - -See the pq.Error type for details. +pq may return errors of type [*pq.Error] which contain error details: + pqErr := new(pq.Error) + if errors.As(err, &pqErr) { + fmt.Println("pq error:", pqErr.Code.Name()) + } -Bulk imports +# Bulk imports -You can perform bulk imports by preparing a statement returned by pq.CopyIn (or -pq.CopyInSchema) in an explicit transaction (sql.Tx). The returned statement +You can perform bulk imports by preparing a statement returned by [CopyIn] (or +[CopyInSchema]) in an explicit transaction ([sql.Tx]). The returned statement handle can then be repeatedly "executed" to copy data into the target table. After all data has been processed you should call Exec() once with no arguments to flush all buffered data. Any call to Exec() might return an error which @@ -172,78 +90,35 @@ failed. CopyIn uses COPY FROM internally. It is not possible to COPY outside of an explicit transaction in pq. -Usage example: - - txn, err := db.Begin() - if err != nil { - log.Fatal(err) - } - - stmt, err := txn.Prepare(pq.CopyIn("users", "name", "age")) - if err != nil { - log.Fatal(err) - } - - for _, user := range users { - _, err = stmt.Exec(user.Name, int64(user.Age)) - if err != nil { - log.Fatal(err) - } - } +# Notifications - _, err = stmt.Exec() - if err != nil { - log.Fatal(err) - } +PostgreSQL supports a simple publish/subscribe model using PostgreSQL's [NOTIFY] mechanism. - err = stmt.Close() - if err != nil { - log.Fatal(err) - } - - err = txn.Commit() - if err != nil { - log.Fatal(err) - } - - -Notifications - - -PostgreSQL supports a simple publish/subscribe model over database -connections. See http://www.postgresql.org/docs/current/static/sql-notify.html -for more information about the general mechanism. - -To start listening for notifications, you first have to open a new connection -to the database by calling NewListener. This connection can not be used for -anything other than LISTEN / NOTIFY. Calling Listen will open a "notification +To start listening for notifications, you first have to open a new connection to +the database by calling [NewListener]. This connection can not be used for +anything other than LISTEN / NOTIFY. Calling Listen will open a "notification channel"; once a notification channel is open, a notification generated on that -channel will effect a send on the Listener.Notify channel. A notification +channel will effect a send on the Listener.Notify channel. A notification channel will remain open until Unlisten is called, though connection loss might -result in some notifications being lost. To solve this problem, Listener sends -a nil pointer over the Notify channel any time the connection is re-established -following a connection loss. The application can get information about the -state of the underlying connection by setting an event callback in the call to +result in some notifications being lost. To solve this problem, Listener sends a +nil pointer over the Notify channel any time the connection is re-established +following a connection loss. The application can get information about the state +of the underlying connection by setting an event callback in the call to NewListener. -A single Listener can safely be used from concurrent goroutines, which means +A single [Listener] can safely be used from concurrent goroutines, which means that there is often no need to create more than one Listener in your -application. However, a Listener is always connected to a single database, so +application. However, a Listener is always connected to a single database, so you will need to create a new Listener instance for every database you want to receive notifications in. The channel name in both Listen and Unlisten is case sensitive, and can contain -any characters legal in an identifier (see -http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS -for more information). Note that the channel name will be truncated to 63 -bytes by the PostgreSQL server. - -You can find a complete, working example of Listener usage at -https://godoc.org/github.com/lib/pq/example/listen. +any characters legal in an [identifier]. Note that the channel name will be +truncated to 63 bytes by the PostgreSQL server. +You can find a complete, working example of Listener usage at [cmd/pqlisten]. -Kerberos Support - +# Kerberos Support If you need support for Kerberos authentication, add the following to your main package: @@ -254,15 +129,11 @@ package: pq.RegisterGSSProvider(func() (pq.Gss, error) { return kerberos.NewGSS() }) } -This package is in a separate module so that users who don't need Kerberos -don't have to download unnecessary dependencies. - -When imported, additional connection string parameters are supported: +This package is in a separate module so that users who don't need Kerberos don't +have to add unnecessary dependencies. - * krbsrvname - GSS (Kerberos) service name when constructing the - SPN (default is `postgres`). This will be combined with the host - to form the full SPN: `krbsrvname/host`. - * krbspn - GSS (Kerberos) SPN. This takes priority over - `krbsrvname` if present. +[cmd/pqlisten]: https://github.com/lib/pq/tree/master/cmd/pqlisten +[identifier]: http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS +[NOTIFY]: http://www.postgresql.org/docs/current/static/sql-notify.html */ package pq diff --git a/vendor/github.com/lib/pq/encode.go b/vendor/github.com/lib/pq/encode.go index bffe6096aff..e43fc93d6d5 100644 --- a/vendor/github.com/lib/pq/encode.go +++ b/vendor/github.com/lib/pq/encode.go @@ -2,7 +2,7 @@ package pq import ( "bytes" - "database/sql/driver" + "database/sql" "encoding/binary" "encoding/hex" "errors" @@ -19,144 +19,154 @@ import ( var time2400Regex = regexp.MustCompile(`^(24:00(?::00(?:\.0+)?)?)(?:[Z+-].*)?$`) -func binaryEncode(parameterStatus *parameterStatus, x interface{}) []byte { +func binaryEncode(x any) ([]byte, error) { switch v := x.(type) { case []byte: - return v + return v, nil default: - return encode(parameterStatus, x, oid.T_unknown) + return encode(x, oid.T_unknown) } } -func encode(parameterStatus *parameterStatus, x interface{}, pgtypOid oid.Oid) []byte { +func encode(x any, pgtypOid oid.Oid) ([]byte, error) { switch v := x.(type) { case int64: - return strconv.AppendInt(nil, v, 10) + return strconv.AppendInt(nil, v, 10), nil case float64: - return strconv.AppendFloat(nil, v, 'f', -1, 64) + return strconv.AppendFloat(nil, v, 'f', -1, 64), nil case []byte: + if v == nil { + return nil, nil + } if pgtypOid == oid.T_bytea { - return encodeBytea(parameterStatus.serverVersion, v) + return encodeBytea(v), nil } - - return v + return v, nil case string: if pgtypOid == oid.T_bytea { - return encodeBytea(parameterStatus.serverVersion, []byte(v)) + return encodeBytea([]byte(v)), nil } - - return []byte(v) + return []byte(v), nil case bool: - return strconv.AppendBool(nil, v) + return strconv.AppendBool(nil, v), nil case time.Time: - return formatTs(v) - + return formatTS(v), nil default: - errorf("encode: unknown type for %T", v) + return nil, fmt.Errorf("pq: encode: unknown type for %T", v) } - - panic("not reached") } -func decode(parameterStatus *parameterStatus, s []byte, typ oid.Oid, f format) interface{} { +func decode(ps *parameterStatus, s []byte, typ oid.Oid, f format) (any, error) { switch f { case formatBinary: - return binaryDecode(parameterStatus, s, typ) + return binaryDecode(s, typ) case formatText: - return textDecode(parameterStatus, s, typ) + return textDecode(ps, s, typ) default: - panic("not reached") + panic("unreachable") } } -func binaryDecode(parameterStatus *parameterStatus, s []byte, typ oid.Oid) interface{} { +func binaryDecode(s []byte, typ oid.Oid) (any, error) { switch typ { case oid.T_bytea: - return s + return s, nil case oid.T_int8: - return int64(binary.BigEndian.Uint64(s)) + return int64(binary.BigEndian.Uint64(s)), nil case oid.T_int4: - return int64(int32(binary.BigEndian.Uint32(s))) + return int64(int32(binary.BigEndian.Uint32(s))), nil case oid.T_int2: - return int64(int16(binary.BigEndian.Uint16(s))) + return int64(int16(binary.BigEndian.Uint16(s))), nil case oid.T_uuid: b, err := decodeUUIDBinary(s) if err != nil { - panic(err) + err = errors.New("pq: " + err.Error()) } - return b - + return b, err default: - errorf("don't know how to decode binary parameter of type %d", uint32(typ)) + return nil, fmt.Errorf("pq: don't know how to decode binary parameter of type %d", uint32(typ)) + } + +} + +// decodeUUIDBinary interprets the binary format of a uuid, returning it in text format. +func decodeUUIDBinary(src []byte) ([]byte, error) { + if len(src) != 16 { + return nil, fmt.Errorf("pq: unable to decode uuid; bad length: %d", len(src)) } - panic("not reached") + dst := make([]byte, 36) + dst[8], dst[13], dst[18], dst[23] = '-', '-', '-', '-' + hex.Encode(dst[0:], src[0:4]) + hex.Encode(dst[9:], src[4:6]) + hex.Encode(dst[14:], src[6:8]) + hex.Encode(dst[19:], src[8:10]) + hex.Encode(dst[24:], src[10:16]) + + return dst, nil } -func textDecode(parameterStatus *parameterStatus, s []byte, typ oid.Oid) interface{} { +func textDecode(ps *parameterStatus, s []byte, typ oid.Oid) (any, error) { switch typ { - case oid.T_char, oid.T_varchar, oid.T_text: - return string(s) + case oid.T_char, oid.T_bpchar, oid.T_varchar, oid.T_text: + return string(s), nil case oid.T_bytea: b, err := parseBytea(s) if err != nil { - errorf("%s", err) + err = errors.New("pq: " + err.Error()) } - return b + return b, err case oid.T_timestamptz: - return parseTs(parameterStatus.currentLocation, string(s)) + return parseTS(ps.currentLocation, string(s)) case oid.T_timestamp, oid.T_date: - return parseTs(nil, string(s)) + return parseTS(nil, string(s)) case oid.T_time: - return mustParse("15:04:05", typ, s) + return parseTime("15:04:05", typ, s) case oid.T_timetz: - return mustParse("15:04:05-07", typ, s) + return parseTime("15:04:05-07", typ, s) case oid.T_bool: - return s[0] == 't' + return s[0] == 't', nil case oid.T_int8, oid.T_int4, oid.T_int2: i, err := strconv.ParseInt(string(s), 10, 64) if err != nil { - errorf("%s", err) + err = errors.New("pq: " + err.Error()) } - return i + return i, err case oid.T_float4, oid.T_float8: // We always use 64 bit parsing, regardless of whether the input text is for // a float4 or float8, because clients expect float64s for all float datatypes // and returning a 32-bit parsed float64 produces lossy results. f, err := strconv.ParseFloat(string(s), 64) if err != nil { - errorf("%s", err) + err = errors.New("pq: " + err.Error()) } - return f + return f, err } - - return s + return s, nil } // appendEncodedText encodes item in text format as required by COPY // and appends to buf -func appendEncodedText(parameterStatus *parameterStatus, buf []byte, x interface{}) []byte { +func appendEncodedText(buf []byte, x any) ([]byte, error) { switch v := x.(type) { case int64: - return strconv.AppendInt(buf, v, 10) + return strconv.AppendInt(buf, v, 10), nil case float64: - return strconv.AppendFloat(buf, v, 'f', -1, 64) + return strconv.AppendFloat(buf, v, 'f', -1, 64), nil case []byte: - encodedBytea := encodeBytea(parameterStatus.serverVersion, v) - return appendEscapedText(buf, string(encodedBytea)) + encodedBytea := encodeBytea(v) + return appendEscapedText(buf, string(encodedBytea)), nil case string: - return appendEscapedText(buf, v) + return appendEscapedText(buf, v), nil case bool: - return strconv.AppendBool(buf, v) + return strconv.AppendBool(buf, v), nil case time.Time: - return append(buf, formatTs(v)...) + return append(buf, formatTS(v)...), nil case nil: - return append(buf, "\\N"...) + return append(buf, "\\N"...), nil default: - errorf("encode: unknown type for %T", v) + return nil, fmt.Errorf("pq: encode: unknown type for %T", v) } - - panic("not reached") } func appendEscapedText(buf []byte, text string) []byte { @@ -197,7 +207,7 @@ func appendEscapedText(buf []byte, text string) []byte { return result } -func mustParse(f string, typ oid.Oid, s []byte) time.Time { +func parseTime(f string, typ oid.Oid, s []byte) (time.Time, error) { str := string(s) // Check for a minute and second offset in the timezone. @@ -227,12 +237,12 @@ func mustParse(f string, typ oid.Oid, s []byte) time.Time { } t, err := time.Parse(f, str) if err != nil { - errorf("decode: %s", err) + return time.Time{}, errors.New("pq: " + err.Error()) } if is2400Time { t = t.Add(24 * time.Hour) } - return t + return t, nil } var errInvalidTimestamp = errors.New("invalid timestamp") @@ -303,13 +313,15 @@ func (c *locationCache) getLocation(offset int) *time.Location { return location } -var infinityTsEnabled = false -var infinityTsNegative time.Time -var infinityTsPositive time.Time +var ( + infinityTSEnabled = false + infinityTSNegative time.Time + infinityTSPositive time.Time +) const ( - infinityTsEnabledAlready = "pq: infinity timestamp enabled already" - infinityTsNegativeMustBeSmaller = "pq: infinity timestamp: negative value must be smaller (before) than positive" + infinityTSEnabledAlready = "pq: infinity timestamp enabled already" + infinityTSNegativeMustBeSmaller = "pq: infinity timestamp: negative value must be smaller (before) than positive" ) // EnableInfinityTs controls the handling of Postgres' "-infinity" and @@ -333,46 +345,44 @@ const ( // undefined behavior. If EnableInfinityTs is called more than once, it will // panic. func EnableInfinityTs(negative time.Time, positive time.Time) { - if infinityTsEnabled { - panic(infinityTsEnabledAlready) + if infinityTSEnabled { + panic(infinityTSEnabledAlready) } if !negative.Before(positive) { - panic(infinityTsNegativeMustBeSmaller) + panic(infinityTSNegativeMustBeSmaller) } - infinityTsEnabled = true - infinityTsNegative = negative - infinityTsPositive = positive + infinityTSEnabled = true + infinityTSNegative = negative + infinityTSPositive = positive } -/* - * Testing might want to toggle infinityTsEnabled - */ -func disableInfinityTs() { - infinityTsEnabled = false +// Testing might want to toggle infinityTSEnabled +func disableInfinityTS() { + infinityTSEnabled = false } // This is a time function specific to the Postgres default DateStyle // setting ("ISO, MDY"), the only one we currently support. This // accounts for the discrepancies between the parsing available with // time.Parse and the Postgres date formatting quirks. -func parseTs(currentLocation *time.Location, str string) interface{} { +func parseTS(currentLocation *time.Location, str string) (any, error) { switch str { case "-infinity": - if infinityTsEnabled { - return infinityTsNegative + if infinityTSEnabled { + return infinityTSNegative, nil } - return []byte(str) + return []byte(str), nil case "infinity": - if infinityTsEnabled { - return infinityTsPositive + if infinityTSEnabled { + return infinityTSPositive, nil } - return []byte(str) + return []byte(str), nil } t, err := ParseTimestamp(currentLocation, str) if err != nil { - panic(err) + err = errors.New("pq: " + err.Error()) } - return t + return t, err } // ParseTimestamp parses Postgres' text format. It returns a time.Time in @@ -488,15 +498,15 @@ func ParseTimestamp(currentLocation *time.Location, str string) (time.Time, erro return t, p.err } -// formatTs formats t into a format postgres understands. -func formatTs(t time.Time) []byte { - if infinityTsEnabled { +// formatTS formats t into a format postgres understands. +func formatTS(t time.Time) []byte { + if infinityTSEnabled { // t <= -infinity : ! (t > -infinity) - if !t.After(infinityTsNegative) { + if !t.After(infinityTSNegative) { return []byte("-infinity") } // t >= infinity : ! (!t < infinity) - if !t.Before(infinityTsPositive) { + if !t.Before(infinityTSPositive) { return []byte("infinity") } } @@ -565,7 +575,7 @@ func parseBytea(s []byte) (result []byte, err error) { } r, err := strconv.ParseUint(string(s[1:4]), 8, 8) if err != nil { - return nil, fmt.Errorf("could not parse bytea value: %s", err.Error()) + return nil, fmt.Errorf("could not parse bytea value: %w", err) } result = append(result, byte(r)) s = s[4:] @@ -586,47 +596,17 @@ func parseBytea(s []byte) (result []byte, err error) { return result, nil } -func encodeBytea(serverVersion int, v []byte) (result []byte) { - if serverVersion >= 90000 { - // Use the hex format if we know that the server supports it - result = make([]byte, 2+hex.EncodedLen(len(v))) - result[0] = '\\' - result[1] = 'x' - hex.Encode(result[2:], v) - } else { - // .. or resort to "escape" - for _, b := range v { - if b == '\\' { - result = append(result, '\\', '\\') - } else if b < 0x20 || b > 0x7e { - result = append(result, []byte(fmt.Sprintf("\\%03o", b))...) - } else { - result = append(result, b) - } - } - } - +func encodeBytea(v []byte) (result []byte) { + result = make([]byte, 2+hex.EncodedLen(len(v))) + result[0] = '\\' + result[1] = 'x' + hex.Encode(result[2:], v) return result } -// NullTime represents a time.Time that may be null. NullTime implements the -// sql.Scanner interface so it can be used as a scan destination, similar to -// sql.NullString. -type NullTime struct { - Time time.Time - Valid bool // Valid is true if Time is not NULL -} - -// Scan implements the Scanner interface. -func (nt *NullTime) Scan(value interface{}) error { - nt.Time, nt.Valid = value.(time.Time) - return nil -} - -// Value implements the driver Valuer interface. -func (nt NullTime) Value() (driver.Value, error) { - if !nt.Valid { - return nil, nil - } - return nt.Time, nil -} +// NullTime represents a [time.Time] that may be null. +// NullTime implements the [sql.Scanner] interface so +// it can be used as a scan destination, similar to [sql.NullString]. +// +// Deprecated: this is an alias for [sql.NullTime]. +type NullTime = sql.NullTime diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go index f67c5a5fa64..234d39e2c53 100644 --- a/vendor/github.com/lib/pq/error.go +++ b/vendor/github.com/lib/pq/error.go @@ -6,9 +6,12 @@ import ( "io" "net" "runtime" + "strconv" + "strings" + "unicode/utf8" ) -// Error severities +// [pq.Error.Severity] values. const ( Efatal = "FATAL" Epanic = "PANIC" @@ -21,25 +24,99 @@ const ( // Error represents an error communicating with the server. // +// The [Error] method only returns the error message and error code: +// +// pq: invalid input syntax for type json (22P02) +// +// The [ErrorWithDetail] method also includes the error Detail, Hint, and +// location context (if any): +// +// ERROR: invalid input syntax for type json (22P02) +// DETAIL: Token "asd" is invalid. +// CONTEXT: line 5, column 8: +// +// 3 | 'def', +// 4 | 123, +// 5 | 'foo', 'asd'::jsonb +// ^ +// // See http://www.postgresql.org/docs/current/static/protocol-error-fields.html for details of the fields type Error struct { - Severity string - Code ErrorCode - Message string - Detail string - Hint string - Position string + // [Efatal], [Epanic], [Ewarning], [Enotice], [Edebug], [Einfo], or [Elog]. + // Always present. + Severity string + + // SQLSTATE code. Always present. + Code ErrorCode + + // Primary human-readable error message. This should be accurate but terse + // (typically one line). Always present. + Message string + + // Optional secondary error message carrying more detail about the problem. + // Might run to multiple lines. + Detail string + + // Optional suggestion what to do about the problem. This is intended to + // differ from Detail in that it offers advice (potentially inappropriate) + // rather than hard facts. Might run to multiple lines. + Hint string + + // error position as an index into the original query string, as decimal + // ASCII integer. The first character has index 1, and positions are + // measured in characters not bytes. + Position string + + // This is defined the same as the Position field, but it is used when the + // cursor position refers to an internally generated command rather than the + // one submitted by the client. The InternalQuery field will always appear + // when this field appears. InternalPosition string - InternalQuery string - Where string - Schema string - Table string - Column string - DataTypeName string - Constraint string - File string - Line string - Routine string + + // Text of a failed internally-generated command. This could be, for + // example, an SQL query issued by a PL/pgSQL function. + InternalQuery string + + // An indication of the context in which the error occurred. Presently this + // includes a call stack traceback of active procedural language functions + // and internally-generated queries. The trace is one entry per line, most + // recent first. + Where string + + // If the error was associated with a specific database object, the name of + // the schema containing that object, if any. + Schema string + + // If the error was associated with a specific table, the name of the table. + // (Refer to the schema name field for the name of the table's schema.) + Table string + + // If the error was associated with a specific table column, the name of the + // column. (Refer to the schema and table name fields to identify the + // table.) + Column string + + // If the error was associated with a specific data type, the name of the + // data type. (Refer to the schema name field for the name of the data + // type's schema.) + DataTypeName string + + // If the error was associated with a specific constraint, the name of the + // constraint. Refer to fields listed above for the associated table or + // domain. (For this purpose, indexes are treated as constraints, even if + // they weren't created with constraint syntax.) + Constraint string + + // File name of the source-code location where the error was reported. + File string + + // Line number of the source-code location where the error was reported. + Line string + + // Name of the source-code routine reporting the error. + Routine string + + query string } // ErrorCode is a five-character error code. @@ -353,8 +430,8 @@ var errorCodeNames = map[ErrorCode]string{ "XX002": "index_corrupted", } -func parseError(r *readBuf) *Error { - err := new(Error) +func parseError(r *readBuf, q string) *Error { + err := &Error{query: q} for t := r.byte(); t != 0; t = r.byte() { msg := r.string() switch t { @@ -398,126 +475,163 @@ func parseError(r *readBuf) *Error { } // Fatal returns true if the Error Severity is fatal. -func (err *Error) Fatal() bool { - return err.Severity == Efatal +func (e *Error) Fatal() bool { + return e.Severity == Efatal } // SQLState returns the SQLState of the error. -func (err *Error) SQLState() string { - return string(err.Code) +func (e *Error) SQLState() string { + return string(e.Code) } -// Get implements the legacy PGError interface. New code should use the fields -// of the Error struct directly. -func (err *Error) Get(k byte) (v string) { - switch k { - case 'S': - return err.Severity - case 'C': - return string(err.Code) - case 'M': - return err.Message - case 'D': - return err.Detail - case 'H': - return err.Hint - case 'P': - return err.Position - case 'p': - return err.InternalPosition - case 'q': - return err.InternalQuery - case 'W': - return err.Where - case 's': - return err.Schema - case 't': - return err.Table - case 'c': - return err.Column - case 'd': - return err.DataTypeName - case 'n': - return err.Constraint - case 'F': - return err.File - case 'L': - return err.Line - case 'R': - return err.Routine +func (e *Error) Error() string { + msg := e.Message + if e.query != "" && e.Position != "" { + pos, err := strconv.Atoi(e.Position) + if err == nil { + lines := strings.Split(e.query, "\n") + line, col := posToLine(pos, lines) + if len(lines) == 1 { + msg += " at column " + strconv.Itoa(col) + } else { + msg += " at position " + strconv.Itoa(line) + ":" + strconv.Itoa(col) + } + } } - return "" -} -func (err *Error) Error() string { - return "pq: " + err.Message + if e.Code != "" { + return "pq: " + msg + " (" + string(e.Code) + ")" + } + return "pq: " + msg } -// PGError is an interface used by previous versions of pq. It is provided -// only to support legacy code. New code should use the Error type. -type PGError interface { - Error() string - Fatal() bool - Get(k byte) (v string) -} +// ErrorWithDetail returns the error message with detailed information and +// location context (if any). +// +// See the documentation on [Error]. +func (e *Error) ErrorWithDetail() string { + b := new(strings.Builder) + b.Grow(len(e.Message) + len(e.Detail) + len(e.Hint) + 30) + b.WriteString("ERROR: ") + b.WriteString(e.Message) + if e.Code != "" { + b.WriteString(" (") + b.WriteString(string(e.Code)) + b.WriteByte(')') + } + if e.Detail != "" { + b.WriteString("\nDETAIL: ") + b.WriteString(e.Detail) + } + if e.Hint != "" { + b.WriteString("\nHINT: ") + b.WriteString(e.Hint) + } -func errorf(s string, args ...interface{}) { - panic(fmt.Errorf("pq: %s", fmt.Sprintf(s, args...))) -} + if e.query != "" && e.Position != "" { + b.Grow(512) + pos, err := strconv.Atoi(e.Position) + if err != nil { + return b.String() + } + lines := strings.Split(e.query, "\n") + line, col := posToLine(pos, lines) + + fmt.Fprintf(b, "\nCONTEXT: line %d, column %d:\n\n", line, col) + if line > 2 { + fmt.Fprintf(b, "% 7d | %s\n", line-2, expandTab(lines[line-3])) + } + if line > 1 { + fmt.Fprintf(b, "% 7d | %s\n", line-1, expandTab(lines[line-2])) + } + /// Expand tabs, so that the ^ is at at the correct position, but leave + /// "column 10-13" intact. Adjusting this to the visual column would be + /// better, but we don't know the tabsize of the user in their editor, + /// which can be 8, 4, 2, or something else. We can't know. So leaving + /// it as the character index is probably the "most correct". + expanded := expandTab(lines[line-1]) + diff := len(expanded) - len(lines[line-1]) + fmt.Fprintf(b, "% 7d | %s\n", line, expanded) + fmt.Fprintf(b, "% 10s%s%s\n", "", strings.Repeat(" ", col-1+diff), "^") + } -// TODO(ainar-g) Rename to errorf after removing panics. -func fmterrorf(s string, args ...interface{}) error { - return fmt.Errorf("pq: %s", fmt.Sprintf(s, args...)) + return b.String() } -func errRecoverNoErrBadConn(err *error) { - e := recover() - if e == nil { - // Do nothing - return +func posToLine(pos int, lines []string) (line, col int) { + read := 0 + for i := range lines { + line++ + ll := utf8.RuneCountInString(lines[i]) + 1 // +1 for the removed newline + if read+ll >= pos { + col = pos - read + if col < 1 { // Should never happen, but just in case. + col = 1 + } + break + } + read += ll } - var ok bool - *err, ok = e.(error) - if !ok { - *err = fmt.Errorf("pq: unexpected error: %#v", e) + return line, col +} + +func expandTab(s string) string { + var ( + b strings.Builder + l int + fill = func(n int) string { + b := make([]byte, n) + for i := range b { + b[i] = ' ' + } + return string(b) + } + ) + b.Grow(len(s)) + for _, r := range s { + switch r { + case '\t': + tw := 8 - l%8 + b.WriteString(fill(tw)) + l += tw + default: + b.WriteRune(r) + l += 1 + } } + return b.String() } -func (cn *conn) errRecover(err *error) { - e := recover() - switch v := e.(type) { +func (cn *conn) handleError(reported error, query ...string) error { + switch err := reported.(type) { case nil: - // Do nothing - case runtime.Error: - cn.err.set(driver.ErrBadConn) - panic(v) - case *Error: - if v.Fatal() { - *err = driver.ErrBadConn - } else { - *err = v - } - case *net.OpError: + return nil + case runtime.Error, *net.OpError: cn.err.set(driver.ErrBadConn) - *err = v case *safeRetryError: cn.err.set(driver.ErrBadConn) - *err = driver.ErrBadConn + reported = driver.ErrBadConn + case *Error: + if len(query) > 0 && query[0] != "" { + err.query = query[0] + reported = err + } + if err.Fatal() { + reported = driver.ErrBadConn + } case error: - if v == io.EOF || v.Error() == "remote error: handshake failure" { - *err = driver.ErrBadConn - } else { - *err = v + if err == io.EOF || err.Error() == "remote error: handshake failure" { + reported = driver.ErrBadConn } - default: cn.err.set(driver.ErrBadConn) - panic(fmt.Sprintf("unknown error: %#v", e)) + reported = fmt.Errorf("pq: unknown error %T: %[1]s", err) } // Any time we return ErrBadConn, we need to remember it since *Tx doesn't // mark the connection bad in database/sql. - if *err == driver.ErrBadConn { + if reported == driver.ErrBadConn { cn.err.set(driver.ErrBadConn) } + return reported } diff --git a/vendor/github.com/lib/pq/internal/pgpass/pgpass.go b/vendor/github.com/lib/pq/internal/pgpass/pgpass.go new file mode 100644 index 00000000000..002631da70f --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pgpass/pgpass.go @@ -0,0 +1,71 @@ +package pgpass + +import ( + "bufio" + "os" + "path/filepath" + "strings" + + "github.com/lib/pq/internal/pqutil" +) + +func PasswordFromPgpass(passfile, user, password, host, port, dbname string, passwordSet bool) string { + // Do not process .pgpass if a password was supplied. + if passwordSet { + return password + } + + filename := pqutil.Pgpass(passfile) + if filename == "" { + return "" + } + + fp, err := os.Open(filename) + if err != nil { + return "" + } + defer fp.Close() + + scan := bufio.NewScanner(fp) + for scan.Scan() { + line := scan.Text() + if len(line) == 0 || line[0] == '#' { + continue + } + split := splitFields(line) + if len(split) != 5 { + continue + } + + socket := host == "" || filepath.IsAbs(host) || strings.HasPrefix(host, "@") + if (split[0] == "*" || split[0] == host || (split[0] == "localhost" && socket)) && + (split[1] == "*" || split[1] == port) && + (split[2] == "*" || split[2] == dbname) && + (split[3] == "*" || split[3] == user) { + return split[4] + } + } + + return "" +} + +func splitFields(s string) []string { + var ( + fs = make([]string, 0, 5) + f = make([]rune, 0, len(s)) + esc bool + ) + for _, c := range s { + switch { + case esc: + f, esc = append(f, c), false + case c == '\\': + esc = true + case c == ':': + fs, f = append(fs, string(f)), f[:0] + default: + f = append(f, c) + } + } + return append(fs, string(f)) +} diff --git a/vendor/github.com/lib/pq/internal/pqsql/copy.go b/vendor/github.com/lib/pq/internal/pqsql/copy.go new file mode 100644 index 00000000000..ccb688f6335 --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqsql/copy.go @@ -0,0 +1,37 @@ +package pqsql + +// StartsWithCopy reports if the SQL strings start with "copy", ignoring +// whitespace, comments, and casing. +func StartsWithCopy(query string) bool { + if len(query) < 4 { + return false + } + var linecmt, blockcmt bool + for i := 0; i < len(query); i++ { + c := query[i] + if linecmt { + linecmt = c != '\n' + continue + } + if blockcmt { + blockcmt = !(c == '/' && query[i-1] == '*') + continue + } + if c == '-' && len(query) > i+1 && query[i+1] == '-' { + linecmt = true + continue + } + if c == '/' && len(query) > i+1 && query[i+1] == '*' { + blockcmt = true + continue + } + if c == ' ' || c == '\t' || c == '\r' || c == '\n' { + continue + } + + // First non-comment and non-whitespace. + return len(query) > i+3 && c|0x20 == 'c' && query[i+1]|0x20 == 'o' && + query[i+2]|0x20 == 'p' && query[i+3]|0x20 == 'y' + } + return false +} diff --git a/vendor/github.com/lib/pq/internal/pqutil/path.go b/vendor/github.com/lib/pq/internal/pqutil/path.go new file mode 100644 index 00000000000..e6827a96ffd --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/path.go @@ -0,0 +1,65 @@ +package pqutil + +import ( + "fmt" + "os" + "os/user" + "path/filepath" + "runtime" +) + +// Home gets the user's home directory. Matches pqGetHomeDirectory() from +// PostgreSQL +// +// https://github.com/postgres/postgres/blob/2b117bb/src/interfaces/libpq/fe-connect.c#L8214 +func Home() string { + if runtime.GOOS == "windows" { + // pq uses SHGetFolderPath(), which is deprecated but x/sys/windows has + // KnownFolderPath(). We don't really want to pull that in though, so + // use APPDATA env. This is also what PostgreSQL uses in some other + // codepaths (get_home_path() for example). + ad := os.Getenv("APPDATA") + if ad == "" { + return "" + } + return filepath.Join(ad, "postgresql") + } + + home, _ := os.UserHomeDir() + if home == "" { + u, err := user.Current() + if err != nil { + return "" + } + home = u.HomeDir + } + return home +} + +// Pgpass gets the filepath to the pgpass file to use, returning "" if a pgpass +// file shouldn't be used. +func Pgpass(passfile string) string { + // Get passfile from the options. + if passfile == "" { + home := Home() + if home == "" { + return "" + } + passfile = filepath.Join(home, ".pgpass") + } + + // On Win32, the directory is protected, so we don't have to check the file. + if runtime.GOOS != "windows" { + fi, err := os.Stat(passfile) + if err != nil { + return "" + } + if fi.Mode().Perm()&(0x77) != 0 { + fmt.Fprintf(os.Stderr, + "WARNING: password file %q has group or world access; permissions should be u=rw (0600) or less\n", + passfile) + return "" + } + } + return passfile +} diff --git a/vendor/github.com/lib/pq/internal/pqutil/perm.go b/vendor/github.com/lib/pq/internal/pqutil/perm.go new file mode 100644 index 00000000000..fdfa94a07fd --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/perm.go @@ -0,0 +1,64 @@ +//go:build !windows && !plan9 + +package pqutil + +import ( + "errors" + "os" + "syscall" +) + +var ( + ErrSSLKeyUnknownOwnership = errors.New("pq: could not get owner information for private key, may not be properly protected") + ErrSSLKeyHasWorldPermissions = errors.New("pq: private key has world access; permissions should be u=rw,g=r (0640) if owned by root, or u=rw (0600), or less") +) + +// SSLKeyPermissions checks the permissions on user-supplied SSL key files, +// which should have very little access. libpq does not check key file +// permissions on Windows. +// +// If the file is owned by the same user the process is running as, the file +// should only have 0600. If the file is owned by root, and the group matches +// the group that the process is running in, the permissions cannot be more than +// 0640. The file should never have world permissions. +// +// Returns an error when the permission check fails. +func SSLKeyPermissions(sslkey string) error { + fi, err := os.Stat(sslkey) + if err != nil { + return err + } + + return checkPermissions(fi) +} + +func checkPermissions(fi os.FileInfo) error { + // The maximum permissions that a private key file owned by a regular user + // is allowed to have. This translates to u=rw. Regardless of if we're + // running as root or not, 0600 is acceptable, so we return if we match the + // regular user permission mask. + if fi.Mode().Perm()&os.FileMode(0777)^0600 == 0 { + return nil + } + + // We need to pull the Unix file information to get the file's owner. + // If we can't access it, there's some sort of operating system level error + // and we should fail rather than attempting to use faulty information. + sys, ok := fi.Sys().(*syscall.Stat_t) + if !ok { + return ErrSSLKeyUnknownOwnership + } + + // if the file is owned by root, we allow 0640 (u=rw,g=r) to match what + // Postgres does. + if sys.Uid == 0 { + // The maximum permissions that a private key file owned by root is + // allowed to have. This translates to u=rw,g=r. + if fi.Mode().Perm()&os.FileMode(0777)^0640 != 0 { + return ErrSSLKeyHasWorldPermissions + } + return nil + } + + return ErrSSLKeyHasWorldPermissions +} diff --git a/vendor/github.com/lib/pq/internal/pqutil/perm_unsupported.go b/vendor/github.com/lib/pq/internal/pqutil/perm_unsupported.go new file mode 100644 index 00000000000..3ce759576da --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/perm_unsupported.go @@ -0,0 +1,12 @@ +//go:build windows || plan9 + +package pqutil + +import "errors" + +var ( + ErrSSLKeyUnknownOwnership = errors.New("unused") + ErrSSLKeyHasWorldPermissions = errors.New("unused") +) + +func SSLKeyPermissions(sslkey string) error { return nil } diff --git a/vendor/github.com/lib/pq/internal/pqutil/pqutil.go b/vendor/github.com/lib/pq/internal/pqutil/pqutil.go new file mode 100644 index 00000000000..ca869e9cc2a --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/pqutil.go @@ -0,0 +1,32 @@ +package pqutil + +import ( + "strconv" + "strings" +) + +// ParseBool is like strconv.ParseBool, but also accepts "yes"/"no" and +// "on"/"off". +func ParseBool(str string) (bool, error) { + switch str { + case "1", "t", "T", "true", "TRUE", "True", "yes", "on": + return true, nil + case "0", "f", "F", "false", "FALSE", "False", "no", "off": + return false, nil + } + return false, &strconv.NumError{Func: "ParseBool", Num: str, Err: strconv.ErrSyntax} +} + +func Join[S ~[]E, E ~string](s S) string { + var b strings.Builder + for i := range s { + if i > 0 { + b.WriteString(", ") + } + if i == len(s)-1 { + b.WriteString("or ") + } + b.WriteString(string(s[i])) + } + return b.String() +} diff --git a/vendor/github.com/lib/pq/internal/pqutil/user_other.go b/vendor/github.com/lib/pq/internal/pqutil/user_other.go new file mode 100644 index 00000000000..09e4f8dff61 --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/user_other.go @@ -0,0 +1,9 @@ +//go:build js || android || hurd || zos || wasip1 || appengine + +package pqutil + +import "errors" + +func User() (string, error) { + return "", errors.New("pqutil.User: not supported on current platform") +} diff --git a/vendor/github.com/lib/pq/internal/pqutil/user_posix.go b/vendor/github.com/lib/pq/internal/pqutil/user_posix.go new file mode 100644 index 00000000000..bd0ece6da1a --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/user_posix.go @@ -0,0 +1,25 @@ +//go:build !windows && !js && !android && !hurd && !zos && !wasip1 && !appengine + +package pqutil + +import ( + "os" + "os/user" + "runtime" +) + +func User() (string, error) { + env := "USER" + if runtime.GOOS == "plan9" { + env = "user" + } + if n := os.Getenv(env); n != "" { + return n, nil + } + + u, err := user.Current() + if err != nil { + return "", err + } + return u.Username, nil +} diff --git a/vendor/github.com/lib/pq/internal/pqutil/user_windows.go b/vendor/github.com/lib/pq/internal/pqutil/user_windows.go new file mode 100644 index 00000000000..960cb8055cf --- /dev/null +++ b/vendor/github.com/lib/pq/internal/pqutil/user_windows.go @@ -0,0 +1,28 @@ +//go:build windows && !appengine + +package pqutil + +import ( + "path/filepath" + "syscall" +) + +func User() (string, error) { + // Perform Windows user name lookup identically to libpq. + // + // The PostgreSQL code makes use of the legacy Win32 function GetUserName, + // and that function has not been imported into stock Go. GetUserNameEx is + // available though, the difference being that a wider range of names are + // available. To get the output to be the same as GetUserName, only the + // base (or last) component of the result is returned. + var ( + name = make([]uint16, 128) + pwnameSz = uint32(len(name)) - 1 + ) + err := syscall.GetUserNameEx(syscall.NameSamCompatible, &name[0], &pwnameSz) + if err != nil { + return "", err + } + s := syscall.UTF16ToString(name) + return filepath.Base(s), nil +} diff --git a/vendor/github.com/lib/pq/internal/proto/proto.go b/vendor/github.com/lib/pq/internal/proto/proto.go new file mode 100644 index 00000000000..318d180a628 --- /dev/null +++ b/vendor/github.com/lib/pq/internal/proto/proto.go @@ -0,0 +1,186 @@ +// From src/include/libpq/protocol.h and src/include/libpq/pqcomm.h – PostgreSQL 18.1 + +package proto + +import ( + "fmt" + "strconv" +) + +// Constants from pqcomm.h +const ( + ProtocolVersion30 = (3 << 16) | 0 //lint:ignore SA4016 x + ProtocolVersion32 = (3 << 16) | 2 // PostgreSQL ≥18; not yet supported. + CancelRequestCode = (1234 << 16) | 5678 + NegotiateSSLCode = (1234 << 16) | 5679 + NegotiateGSSCode = (1234 << 16) | 5680 +) + +// Constants from fe-connect.c +const ( + MaxErrlen = 30_000 // https://github.com/postgres/postgres/blob/c6a10a89f/src/interfaces/libpq/fe-connect.c#L4067 +) + +// RequestCode is a request codes sent by the frontend. +type RequestCode byte + +// These are the request codes sent by the frontend. +const ( + Bind = RequestCode('B') + Close = RequestCode('C') + Describe = RequestCode('D') + Execute = RequestCode('E') + FunctionCall = RequestCode('F') + Flush = RequestCode('H') + Parse = RequestCode('P') + Query = RequestCode('Q') + Sync = RequestCode('S') + Terminate = RequestCode('X') + CopyFail = RequestCode('f') + GSSResponse = RequestCode('p') + PasswordMessage = RequestCode('p') + SASLInitialResponse = RequestCode('p') + SASLResponse = RequestCode('p') + CopyDoneRequest = RequestCode('c') + CopyDataRequest = RequestCode('d') +) + +func (r RequestCode) String() string { + s, ok := map[RequestCode]string{ + Bind: "Bind", + Close: "Close", + Describe: "Describe", + Execute: "Execute", + FunctionCall: "FunctionCall", + Flush: "Flush", + Parse: "Parse", + Query: "Query", + Sync: "Sync", + Terminate: "Terminate", + CopyFail: "CopyFail", + // These are all the same :-/ + //GSSResponse: "GSSResponse", + PasswordMessage: "PasswordMessage", + //SASLInitialResponse: "SASLInitialResponse", + //SASLResponse: "SASLResponse", + CopyDoneRequest: "CopyDone", + CopyDataRequest: "CopyData", + }[r] + if !ok { + s = "" + } + c := string(r) + if r <= 0x1f || r == 0x7f { + c = fmt.Sprintf("0x%x", string(r)) + } + return "(" + c + ") " + s +} + +// ResponseCode is a response codes sent by the backend. +type ResponseCode byte + +// These are the response codes sent by the backend. +const ( + ParseComplete = ResponseCode('1') + BindComplete = ResponseCode('2') + CloseComplete = ResponseCode('3') + NotificationResponse = ResponseCode('A') + CommandComplete = ResponseCode('C') + DataRow = ResponseCode('D') + ErrorResponse = ResponseCode('E') + CopyInResponse = ResponseCode('G') + CopyOutResponse = ResponseCode('H') + EmptyQueryResponse = ResponseCode('I') + BackendKeyData = ResponseCode('K') + NoticeResponse = ResponseCode('N') + AuthenticationRequest = ResponseCode('R') + ParameterStatus = ResponseCode('S') + RowDescription = ResponseCode('T') + FunctionCallResponse = ResponseCode('V') + CopyBothResponse = ResponseCode('W') + ReadyForQuery = ResponseCode('Z') + NoData = ResponseCode('n') + PortalSuspended = ResponseCode('s') + ParameterDescription = ResponseCode('t') + NegotiateProtocolVersion = ResponseCode('v') + CopyDoneResponse = ResponseCode('c') + CopyDataResponse = ResponseCode('d') +) + +func (r ResponseCode) String() string { + s, ok := map[ResponseCode]string{ + ParseComplete: "ParseComplete", + BindComplete: "BindComplete", + CloseComplete: "CloseComplete", + NotificationResponse: "NotificationResponse", + CommandComplete: "CommandComplete", + DataRow: "DataRow", + ErrorResponse: "ErrorResponse", + CopyInResponse: "CopyInResponse", + CopyOutResponse: "CopyOutResponse", + EmptyQueryResponse: "EmptyQueryResponse", + BackendKeyData: "BackendKeyData", + NoticeResponse: "NoticeResponse", + AuthenticationRequest: "AuthRequest", + ParameterStatus: "ParamStatus", + RowDescription: "RowDescription", + FunctionCallResponse: "FunctionCallResponse", + CopyBothResponse: "CopyBothResponse", + ReadyForQuery: "ReadyForQuery", + NoData: "NoData", + PortalSuspended: "PortalSuspended", + ParameterDescription: "ParamDescription", + NegotiateProtocolVersion: "NegotiateProtocolVersion", + CopyDoneResponse: "CopyDone", + CopyDataResponse: "CopyData", + }[r] + if !ok { + s = "" + } + c := string(r) + if r <= 0x1f || r == 0x7f { + c = fmt.Sprintf("0x%x", string(r)) + } + return "(" + c + ") " + s +} + +// AuthCode are authentication request codes sent by the backend. +type AuthCode int32 + +// These are the authentication request codes sent by the backend. +const ( + AuthReqOk = AuthCode(0) // User is authenticated + AuthReqKrb4 = AuthCode(1) // Kerberos V4. Not supported any more. + AuthReqKrb5 = AuthCode(2) // Kerberos V5. Not supported any more. + AuthReqPassword = AuthCode(3) // Password + AuthReqCrypt = AuthCode(4) // crypt password. Not supported any more. + AuthReqMD5 = AuthCode(5) // md5 password + _ = AuthCode(6) // 6 is available. It was used for SCM creds, not supported any more. + AuthReqGSS = AuthCode(7) // GSSAPI without wrap() + AuthReqGSSCont = AuthCode(8) // Continue GSS exchanges + AuthReqSSPI = AuthCode(9) // SSPI negotiate without wrap() + AuthReqSASL = AuthCode(10) // Begin SASL authentication + AuthReqSASLCont = AuthCode(11) // Continue SASL authentication + AuthReqSASLFin = AuthCode(12) // Final SASL message +) + +func (a AuthCode) String() string { + s, ok := map[AuthCode]string{ + AuthReqOk: "ok", + AuthReqKrb4: "krb4", + AuthReqKrb5: "krb5", + AuthReqPassword: "password", + AuthReqCrypt: "crypt", + AuthReqMD5: "md5", + AuthReqGSS: "GDD", + AuthReqGSSCont: "GSSCont", + AuthReqSSPI: "SSPI", + AuthReqSASL: "SASL", + AuthReqSASLCont: "SASLCont", + AuthReqSASLFin: "SASLFin", + }[a] + if !ok { + s = "" + } + return s + " (" + strconv.Itoa(int(a)) + ")" +} diff --git a/vendor/github.com/lib/pq/internal/proto/sz_32.go b/vendor/github.com/lib/pq/internal/proto/sz_32.go new file mode 100644 index 00000000000..68065591b4c --- /dev/null +++ b/vendor/github.com/lib/pq/internal/proto/sz_32.go @@ -0,0 +1,7 @@ +//go:build 386 || arm || mips || mipsle + +package proto + +import "math" + +const MaxUint32 = math.MaxInt diff --git a/vendor/github.com/lib/pq/internal/proto/sz_64.go b/vendor/github.com/lib/pq/internal/proto/sz_64.go new file mode 100644 index 00000000000..2b8ad897507 --- /dev/null +++ b/vendor/github.com/lib/pq/internal/proto/sz_64.go @@ -0,0 +1,7 @@ +//go:build !386 && !arm && !mips && !mipsle + +package proto + +import "math" + +const MaxUint32 = math.MaxUint32 diff --git a/vendor/github.com/lib/pq/notice.go b/vendor/github.com/lib/pq/notice.go index 70ad122a7d6..61b90f81e17 100644 --- a/vendor/github.com/lib/pq/notice.go +++ b/vendor/github.com/lib/pq/notice.go @@ -1,6 +1,3 @@ -//go:build go1.10 -// +build go1.10 - package pq import ( diff --git a/vendor/github.com/lib/pq/notify.go b/vendor/github.com/lib/pq/notify.go index 5c421fdb8b5..920f0486d73 100644 --- a/vendor/github.com/lib/pq/notify.go +++ b/vendor/github.com/lib/pq/notify.go @@ -1,16 +1,16 @@ package pq -// Package pq is a pure Go Postgres driver for the database/sql package. -// This module contains support for Postgres LISTEN/NOTIFY. - import ( "context" "database/sql/driver" "errors" "fmt" + "net" "sync" "sync/atomic" "time" + + "github.com/lib/pq/internal/proto" ) // Notification represents a single notification from the database. @@ -93,7 +93,7 @@ const ( ) type message struct { - typ byte + typ proto.ResponseCode err error } @@ -102,19 +102,13 @@ var errListenerConnClosed = errors.New("pq: ListenerConn has been closed") // ListenerConn is a low-level interface for waiting for notifications. You // should use Listener instead. type ListenerConn struct { - // guards cn and err - connectionLock sync.Mutex - cn *conn - err error - - connState int32 - - // the sending goroutine will be holding this lock - senderLock sync.Mutex - + connectionLock sync.Mutex // guards cn and err + senderLock sync.Mutex // the sending goroutine will be holding this lock + cn *conn + err error + connState int32 notificationChan chan<- *Notification - - replyChan chan message + replyChan chan message } // NewListenerConn creates a new ListenerConn. Use NewListener instead. @@ -189,8 +183,6 @@ func (l *ListenerConn) setState(newState int32) bool { // away or should be discarded because we couldn't agree on the state with the // server backend. func (l *ListenerConn) listenerConnLoop() (err error) { - defer errRecoverNoErrBadConn(&err) - r := &readBuf{} for { t, err := l.cn.recvMessage(r) @@ -199,43 +191,43 @@ func (l *ListenerConn) listenerConnLoop() (err error) { } switch t { - case 'A': + case proto.NotificationResponse: // recvNotification copies all the data so we don't need to worry // about the scratch buffer being overwritten. l.notificationChan <- recvNotification(r) - case 'T', 'D': + case proto.RowDescription, proto.DataRow: // only used by tests; ignore - case 'E': + case proto.ErrorResponse: // We might receive an ErrorResponse even when not in a query; it // is expected that the server will close the connection after // that, but we should make sure that the error we display is the // one from the stray ErrorResponse, not io.ErrUnexpectedEOF. if !l.setState(connStateExpectReadyForQuery) { - return parseError(r) + return parseError(r, "") } - l.replyChan <- message{t, parseError(r)} + l.replyChan <- message{t, parseError(r, "")} - case 'C', 'I': + case proto.CommandComplete, proto.EmptyQueryResponse: if !l.setState(connStateExpectReadyForQuery) { // protocol out of sync return fmt.Errorf("unexpected CommandComplete") } // ExecSimpleQuery doesn't need to know about this message - case 'Z': + case proto.ReadyForQuery: if !l.setState(connStateIdle) { // protocol out of sync return fmt.Errorf("unexpected ReadyForQuery") } l.replyChan <- message{t, nil} - case 'S': + case proto.ParameterStatus: // ignore - case 'N': + case proto.NoticeResponse: if n := l.cn.noticeHandler; n != nil { - n(parseError(r)) + n(parseError(r, "")) } default: return fmt.Errorf("unexpected message %q from server in listenerConnLoop", t) @@ -262,7 +254,7 @@ func (l *ListenerConn) listenerConnMain() { if l.err == nil { l.err = err } - l.cn.Close() + _ = l.cn.Close() l.connectionLock.Unlock() // There might be a query in-flight; make sure nobody's waiting for a @@ -290,15 +282,14 @@ func (l *ListenerConn) UnlistenAll() (bool, error) { return l.ExecSimpleQuery("UNLISTEN *") } -// Ping the remote server to make sure it's alive. Non-nil error means the +// Ping the remote server to make sure it's alive. Non-nil error means the // connection has failed and should be abandoned. func (l *ListenerConn) Ping() error { sent, err := l.ExecSimpleQuery("") if !sent { return err } - if err != nil { - // shouldn't happen + if err != nil { // shouldn't happen panic(err) } return nil @@ -309,11 +300,9 @@ func (l *ListenerConn) Ping() error { // The caller must be holding senderLock (see acquireSenderLock and // releaseSenderLock). func (l *ListenerConn) sendSimpleQuery(q string) (err error) { - defer errRecoverNoErrBadConn(&err) - - // must set connection state before sending the query + // Must set connection state before sending the query if !l.setState(connStateExpectResponse) { - panic("two queries running at the same time") + return errors.New("pq: two queries running at the same time") } // Can't use l.cn.writeBuf here because it uses the scratch buffer which @@ -323,18 +312,16 @@ func (l *ListenerConn) sendSimpleQuery(q string) (err error) { pos: 1, } b.string(q) - l.cn.send(b) - - return nil + return l.cn.send(b) } // ExecSimpleQuery executes a "simple query" (i.e. one with no bindable // parameters) on the connection. The possible return values are: -// 1) "executed" is true; the query was executed to completion on the -// database server. If the query failed, err will be set to the error -// returned by the database, otherwise err will be nil. -// 2) If "executed" is false, the query could not be executed on the remote -// server. err will be non-nil. +// 1. "executed" is true; the query was executed to completion on the +// database server. If the query failed, err will be set to the error +// returned by the database, otherwise err will be nil. +// 2. If "executed" is false, the query could not be executed on the remote +// server. err will be non-nil. // // After a call to ExecSimpleQuery has returned an executed=false value, the // connection has either been closed or will be closed shortly thereafter, and @@ -356,7 +343,7 @@ func (l *ListenerConn) ExecSimpleQuery(q string) (executed bool, err error) { l.err = err } l.connectionLock.Unlock() - l.cn.c.Close() + _ = l.cn.c.Close() return false, err } @@ -372,7 +359,7 @@ func (l *ListenerConn) ExecSimpleQuery(q string) (executed bool, err error) { return false, err } switch m.typ { - case 'Z': + case proto.ReadyForQuery: // sanity check if m.err != nil { panic("m.err != nil") @@ -380,7 +367,7 @@ func (l *ListenerConn) ExecSimpleQuery(q string) (executed bool, err error) { // done; err might or might not be set return true, err - case 'E': + case proto.ErrorResponse: // sanity check if m.err == nil { panic("m.err == nil") @@ -414,8 +401,6 @@ func (l *ListenerConn) Err() error { return l.err } -var errListenerClosed = errors.New("pq: Listener has been closed") - // ErrChannelAlreadyOpen is returned from Listen when a channel is already // open. var ErrChannelAlreadyOpen = errors.New("pq: channel is already open") @@ -541,12 +526,12 @@ func (l *Listener) NotificationChannel() <-chan *Notification { // connection can not be re-established. // // Listen will only fail in three conditions: -// 1) The channel is already open. The returned error will be -// ErrChannelAlreadyOpen. -// 2) The query was executed on the remote server, but PostgreSQL returned an -// error message in response to the query. The returned error will be a -// pq.Error containing the information the server supplied. -// 3) Close is called on the Listener before the request could be completed. +// 1. The channel is already open. The returned error will be +// ErrChannelAlreadyOpen. +// 2. The query was executed on the remote server, but PostgreSQL returned an +// error message in response to the query. The returned error will be a +// pq.Error containing the information the server supplied. +// 3. Close is called on the Listener before the request could be completed. // // The channel name is case-sensitive. func (l *Listener) Listen(channel string) error { @@ -554,7 +539,7 @@ func (l *Listener) Listen(channel string) error { defer l.lock.Unlock() if l.isClosed { - return errListenerClosed + return net.ErrClosed } // The server allows you to issue a LISTEN on a channel which is already @@ -585,7 +570,7 @@ func (l *Listener) Listen(channel string) error { l.reconnectCond.Wait() // we let go of the mutex for a while if l.isClosed { - return errListenerClosed + return net.ErrClosed } } @@ -604,7 +589,7 @@ func (l *Listener) Unlisten(channel string) error { defer l.lock.Unlock() if l.isClosed { - return errListenerClosed + return net.ErrClosed } // Similarly to LISTEN, this is not an error in Postgres, but it seems @@ -638,7 +623,7 @@ func (l *Listener) UnlistenAll() error { defer l.lock.Unlock() if l.isClosed { - return errListenerClosed + return net.ErrClosed } if l.cn != nil { @@ -663,7 +648,7 @@ func (l *Listener) Ping() error { defer l.lock.Unlock() if l.isClosed { - return errListenerClosed + return net.ErrClosed } if l.cn == nil { return errors.New("no connection") @@ -689,7 +674,7 @@ func (l *Listener) disconnectCleanup() error { } err := l.cn.Err() - l.cn.Close() + _ = l.cn.Close() l.cn = nil return err } @@ -748,25 +733,28 @@ func (l *Listener) closed() bool { } func (l *Listener) connect() error { + l.lock.Lock() + defer l.lock.Unlock() + if l.isClosed { + return net.ErrClosed + } + notificationChan := make(chan *Notification, 32) - cn, err := newDialListenerConn(l.dialer, l.name, notificationChan) + + var err error + l.cn, err = newDialListenerConn(l.dialer, l.name, notificationChan) if err != nil { return err } - l.lock.Lock() - defer l.lock.Unlock() - - err = l.resync(cn, notificationChan) + err = l.resync(l.cn, notificationChan) if err != nil { - cn.Close() + _ = l.cn.Close() return err } - l.cn = cn l.connNotificationChan = notificationChan l.reconnectCond.Broadcast() - return nil } @@ -778,11 +766,11 @@ func (l *Listener) Close() error { defer l.lock.Unlock() if l.isClosed { - return errListenerClosed + return net.ErrClosed } if l.cn != nil { - l.cn.Close() + _ = l.cn.Close() } l.isClosed = true diff --git a/vendor/github.com/lib/pq/oid/doc.go b/vendor/github.com/lib/pq/oid/doc.go index caaede2489d..a486506637e 100644 --- a/vendor/github.com/lib/pq/oid/doc.go +++ b/vendor/github.com/lib/pq/oid/doc.go @@ -1,5 +1,6 @@ -// Package oid contains OID constants -// as defined by the Postgres server. +//go:generate go run ./gen.go + +// Package oid contains OID constants as defined by the Postgres server. package oid // Oid is a Postgres Object ID. diff --git a/vendor/github.com/lib/pq/quote.go b/vendor/github.com/lib/pq/quote.go new file mode 100644 index 00000000000..909e41ecb2e --- /dev/null +++ b/vendor/github.com/lib/pq/quote.go @@ -0,0 +1,71 @@ +package pq + +import ( + "bytes" + "strings" +) + +// QuoteIdentifier quotes an "identifier" (e.g. a table or a column name) to be +// used as part of an SQL statement. For example: +// +// tblname := "my_table" +// data := "my_data" +// quoted := pq.QuoteIdentifier(tblname) +// err := db.Exec(fmt.Sprintf("INSERT INTO %s VALUES ($1)", quoted), data) +// +// Any double quotes in name will be escaped. The quoted identifier will be case +// sensitive when used in a query. If the input string contains a zero byte, the +// result will be truncated immediately before it. +func QuoteIdentifier(name string) string { + end := strings.IndexRune(name, 0) + if end > -1 { + name = name[:end] + } + return `"` + strings.Replace(name, `"`, `""`, -1) + `"` +} + +// BufferQuoteIdentifier satisfies the same purpose as QuoteIdentifier, but backed by a +// byte buffer. +func BufferQuoteIdentifier(name string, buffer *bytes.Buffer) { + // TODO(v2): this should have accepted an io.Writer, not *bytes.Buffer. + end := strings.IndexRune(name, 0) + if end > -1 { + name = name[:end] + } + buffer.WriteRune('"') + buffer.WriteString(strings.Replace(name, `"`, `""`, -1)) + buffer.WriteRune('"') +} + +// QuoteLiteral quotes a 'literal' (e.g. a parameter, often used to pass literal +// to DDL and other statements that do not accept parameters) to be used as part +// of an SQL statement. For example: +// +// exp_date := pq.QuoteLiteral("2023-01-05 15:00:00Z") +// err := db.Exec(fmt.Sprintf("CREATE ROLE my_user VALID UNTIL %s", exp_date)) +// +// Any single quotes in name will be escaped. Any backslashes (i.e. "\") will be +// replaced by two backslashes (i.e. "\\") and the C-style escape identifier +// that PostgreSQL provides ('E') will be prepended to the string. +func QuoteLiteral(literal string) string { + // This follows the PostgreSQL internal algorithm for handling quoted literals + // from libpq, which can be found in the "PQEscapeStringInternal" function, + // which is found in the libpq/fe-exec.c source file: + // https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/libpq/fe-exec.c + // + // substitute any single-quotes (') with two single-quotes ('') + literal = strings.Replace(literal, `'`, `''`, -1) + // determine if the string has any backslashes (\) in it. + // if it does, replace any backslashes (\) with two backslashes (\\) + // then, we need to wrap the entire string with a PostgreSQL + // C-style escape. Per how "PQEscapeStringInternal" handles this case, we + // also add a space before the "E" + if strings.Contains(literal, `\`) { + literal = strings.Replace(literal, `\`, `\\`, -1) + literal = ` E'` + literal + `'` + } else { + // otherwise, we can just wrap the literal with a pair of single quotes + literal = `'` + literal + `'` + } + return literal +} diff --git a/vendor/github.com/lib/pq/rows.go b/vendor/github.com/lib/pq/rows.go index c6aa5b9a36a..2029bfed25b 100644 --- a/vendor/github.com/lib/pq/rows.go +++ b/vendor/github.com/lib/pq/rows.go @@ -1,13 +1,182 @@ package pq import ( + "database/sql/driver" + "fmt" + "io" "math" "reflect" "time" + "github.com/lib/pq/internal/proto" "github.com/lib/pq/oid" ) +type noRows struct{} + +var emptyRows noRows + +var _ driver.Result = noRows{} + +func (noRows) LastInsertId() (int64, error) { return 0, errNoLastInsertID } +func (noRows) RowsAffected() (int64, error) { return 0, errNoRowsAffected } + +type ( + rowsHeader struct { + colNames []string + colTyps []fieldDesc + colFmts []format + } + rows struct { + cn *conn + finish func() + rowsHeader + done bool + rb readBuf + result driver.Result + tag string + + next *rowsHeader + } +) + +func (rs *rows) Close() error { + if finish := rs.finish; finish != nil { + defer finish() + } + // no need to look at cn.bad as Next() will + for { + err := rs.Next(nil) + switch err { + case nil: + case io.EOF: + // rs.Next can return io.EOF on both ReadyForQuery and + // RowDescription (used with HasNextResultSet). We need to fetch + // messages until we hit a ReadyForQuery, which is done by waiting + // for done to be set. + if rs.done { + return nil + } + default: + return err + } + } +} + +func (rs *rows) Columns() []string { + return rs.colNames +} + +func (rs *rows) Result() driver.Result { + if rs.result == nil { + return emptyRows + } + return rs.result +} + +func (rs *rows) Tag() string { + return rs.tag +} + +func (rs *rows) Next(dest []driver.Value) (resErr error) { + if rs.done { + return io.EOF + } + if err := rs.cn.err.getForNext(); err != nil { + return err + } + + for { + t, err := rs.cn.recv1Buf(&rs.rb) + if err != nil { + return rs.cn.handleError(err) + } + switch t { + case proto.ErrorResponse: + resErr = parseError(&rs.rb, "") + case proto.CommandComplete, proto.EmptyQueryResponse: + if t == proto.CommandComplete { + rs.result, rs.tag, err = rs.cn.parseComplete(rs.rb.string()) + if err != nil { + return rs.cn.handleError(err) + } + } + continue + case proto.ReadyForQuery: + rs.cn.processReadyForQuery(&rs.rb) + rs.done = true + if resErr != nil { + return rs.cn.handleError(resErr) + } + return io.EOF + case proto.DataRow: + n := rs.rb.int16() + if resErr != nil { + rs.cn.err.set(driver.ErrBadConn) + return fmt.Errorf("pq: unexpected DataRow after error %s", resErr) + } + if n < len(dest) { + dest = dest[:n] + } + for i := range dest { + l := rs.rb.int32() + if l == -1 { + dest[i] = nil + continue + } + dest[i], err = decode(&rs.cn.parameterStatus, rs.rb.next(l), rs.colTyps[i].OID, rs.colFmts[i]) + if err != nil { + return rs.cn.handleError(err) + } + } + return rs.cn.handleError(resErr) + case proto.RowDescription: + next := parsePortalRowDescribe(&rs.rb) + rs.next = &next + return io.EOF + default: + return fmt.Errorf("pq: unexpected message after execute: %q", t) + } + } +} + +func (rs *rows) HasNextResultSet() bool { + hasNext := rs.next != nil && !rs.done + return hasNext +} + +func (rs *rows) NextResultSet() error { + if rs.next == nil { + return io.EOF + } + rs.rowsHeader = *rs.next + rs.next = nil + return nil +} + +// ColumnTypeScanType returns the value type that can be used to scan types into. +func (rs *rows) ColumnTypeScanType(index int) reflect.Type { + return rs.colTyps[index].Type() +} + +// ColumnTypeDatabaseTypeName return the database system type name. +func (rs *rows) ColumnTypeDatabaseTypeName(index int) string { + return rs.colTyps[index].Name() +} + +// ColumnTypeLength returns the length of the column type if the column is a +// variable length type. If the column is not a variable length type ok +// should return false. +func (rs *rows) ColumnTypeLength(index int) (length int64, ok bool) { + return rs.colTyps[index].Length() +} + +// ColumnTypePrecisionScale should return the precision and scale for decimal +// types. If not applicable, ok should be false. +func (rs *rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) { + return rs.colTyps[index].PrecisionScale() +} + const headerSize = 4 type fieldDesc struct { @@ -29,7 +198,11 @@ func (fd fieldDesc) Type() reflect.Type { return reflect.TypeOf(int32(0)) case oid.T_int2: return reflect.TypeOf(int16(0)) - case oid.T_varchar, oid.T_text: + case oid.T_float8: + return reflect.TypeOf(float64(0)) + case oid.T_float4: + return reflect.TypeOf(float32(0)) + case oid.T_varchar, oid.T_text, oid.T_varbit, oid.T_bit: return reflect.TypeOf("") case oid.T_bool: return reflect.TypeOf(false) @@ -38,7 +211,7 @@ func (fd fieldDesc) Type() reflect.Type { case oid.T_bytea: return reflect.TypeOf([]byte(nil)) default: - return reflect.TypeOf(new(interface{})).Elem() + return reflect.TypeOf(new(any)).Elem() } } @@ -52,6 +225,8 @@ func (fd fieldDesc) Length() (length int64, ok bool) { return math.MaxInt64, true case oid.T_varchar, oid.T_bpchar: return int64(fd.Mod - headerSize), true + case oid.T_varbit, oid.T_bit: + return int64(fd.Mod), true default: return 0, false } @@ -68,26 +243,3 @@ func (fd fieldDesc) PrecisionScale() (precision, scale int64, ok bool) { return 0, 0, false } } - -// ColumnTypeScanType returns the value type that can be used to scan types into. -func (rs *rows) ColumnTypeScanType(index int) reflect.Type { - return rs.colTyps[index].Type() -} - -// ColumnTypeDatabaseTypeName return the database system type name. -func (rs *rows) ColumnTypeDatabaseTypeName(index int) string { - return rs.colTyps[index].Name() -} - -// ColumnTypeLength returns the length of the column type if the column is a -// variable length type. If the column is not a variable length type ok -// should return false. -func (rs *rows) ColumnTypeLength(index int) (length int64, ok bool) { - return rs.colTyps[index].Length() -} - -// ColumnTypePrecisionScale should return the precision and scale for decimal -// types. If not applicable, ok should be false. -func (rs *rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) { - return rs.colTyps[index].PrecisionScale() -} diff --git a/vendor/github.com/lib/pq/scram/scram.go b/vendor/github.com/lib/pq/scram/scram.go index 477216b6008..7ed7a9939a3 100644 --- a/vendor/github.com/lib/pq/scram/scram.go +++ b/vendor/github.com/lib/pq/scram/scram.go @@ -25,7 +25,6 @@ // Package scram implements a SCRAM-{SHA-1,etc} client per RFC5802. // // http://tools.ietf.org/html/rfc5802 -// package scram import ( @@ -43,17 +42,16 @@ import ( // // A Client may be used within a SASL conversation with logic resembling: // -// var in []byte -// var client = scram.NewClient(sha1.New, user, pass) -// for client.Step(in) { -// out := client.Out() -// // send out to server -// in := serverOut -// } -// if client.Err() != nil { -// // auth failed -// } -// +// var in []byte +// var client = scram.NewClient(sha1.New, user, pass) +// for client.Step(in) { +// out := client.Out() +// // send out to server +// in := serverOut +// } +// if client.Err() != nil { +// // auth failed +// } type Client struct { newHash func() hash.Hash @@ -73,8 +71,7 @@ type Client struct { // // For SCRAM-SHA-256, for example, use: // -// client := scram.NewClient(sha256.New, user, pass) -// +// client := scram.NewClient(sha256.New, user, pass) func NewClient(newHash func() hash.Hash, user, pass string) *Client { c := &Client{ newHash: newHash, @@ -133,7 +130,7 @@ func (c *Client) step1(in []byte) error { const nonceLen = 16 buf := make([]byte, nonceLen+b64.EncodedLen(nonceLen)) if _, err := rand.Read(buf[:nonceLen]); err != nil { - return fmt.Errorf("cannot read random SCRAM-SHA-256 nonce from operating system: %v", err) + return fmt.Errorf("cannot read random SCRAM-SHA-256 nonce from operating system: %w", err) } c.clientNonce = buf[nonceLen:] b64.Encode(c.clientNonce, buf[:nonceLen]) diff --git a/vendor/github.com/lib/pq/ssl.go b/vendor/github.com/lib/pq/ssl.go index 36b61ba45be..3aea110ebe1 100644 --- a/vendor/github.com/lib/pq/ssl.go +++ b/vendor/github.com/lib/pq/ssl.go @@ -3,22 +3,71 @@ package pq import ( "crypto/tls" "crypto/x509" - "io/ioutil" + "errors" + "fmt" "net" "os" - "os/user" "path/filepath" + "runtime" "strings" + "sync" + "syscall" + + "github.com/lib/pq/internal/pqutil" +) + +// Registry for custom tls.Configs +var ( + tlsConfs = make(map[string]*tls.Config) + tlsConfsMu sync.RWMutex ) +// RegisterTLSConfig registers a custom [tls.Config]. They are used by using +// sslmode=pqgo-«key» in the connection string. +// +// Set the config to nil to remove a configuration. +func RegisterTLSConfig(key string, config *tls.Config) error { + key = strings.TrimPrefix(key, "pqgo-") + if config == nil { + tlsConfsMu.Lock() + delete(tlsConfs, key) + tlsConfsMu.Unlock() + return nil + } + + tlsConfsMu.Lock() + tlsConfs[key] = config + tlsConfsMu.Unlock() + return nil +} + +func hasTLSConfig(key string) bool { + tlsConfsMu.RLock() + defer tlsConfsMu.RUnlock() + _, ok := tlsConfs[key] + return ok +} + +func getTLSConfigClone(key string) *tls.Config { + tlsConfsMu.RLock() + defer tlsConfsMu.RUnlock() + if v, ok := tlsConfs[key]; ok { + return v.Clone() + } + return nil +} + // ssl generates a function to upgrade a net.Conn based on the "sslmode" and // related settings. The function is nil when no upgrade should take place. -func ssl(o values) (func(net.Conn) (net.Conn, error), error) { - verifyCaOnly := false - tlsConf := tls.Config{} - switch mode := o["sslmode"]; mode { +func ssl(cfg Config) (func(net.Conn) (net.Conn, error), error) { + var ( + verifyCaOnly = false + tlsConf = &tls.Config{} + mode = cfg.SSLMode + ) + switch { // "require" is the default. - case "", "require": + case mode == "" || mode == SSLModeRequire: // We must skip TLS's own verification since it requires full // verification since Go 1.3. tlsConf.InsecureSkipVerify = true @@ -31,41 +80,46 @@ func ssl(o values) (func(net.Conn) (net.Conn, error), error) { // server certificate is validated against the CA. Relying on this // behavior is discouraged, and applications that need certificate // validation should always use verify-ca or verify-full. - if sslrootcert, ok := o["sslrootcert"]; ok { - if _, err := os.Stat(sslrootcert); err == nil { + if cfg.SSLRootCert != "" { + if _, err := os.Stat(cfg.SSLRootCert); err == nil { verifyCaOnly = true } else { - delete(o, "sslrootcert") + cfg.SSLRootCert = "" } } - case "verify-ca": + case mode == SSLModeVerifyCA: // We must skip TLS's own verification since it requires full // verification since Go 1.3. tlsConf.InsecureSkipVerify = true verifyCaOnly = true - case "verify-full": - tlsConf.ServerName = o["host"] - case "disable": + case mode == SSLModeVerifyFull: + tlsConf.ServerName = cfg.Host + case mode == SSLModeDisable: return nil, nil + case strings.HasPrefix(string(mode), "pqgo-"): + tlsConf = getTLSConfigClone(string(mode[5:])) + if tlsConf == nil { + return nil, fmt.Errorf(`pq: unknown custom sslmode %q`, mode) + } default: - return nil, fmterrorf(`unsupported sslmode %q; only "require" (default), "verify-full", "verify-ca", and "disable" supported`, mode) + return nil, fmt.Errorf( + `pq: unsupported sslmode %q; only "require" (default), "verify-full", "verify-ca", and "disable" supported`, + mode) } // Set Server Name Indication (SNI), if enabled by connection parameters. - // By default SNI is on, any value which is not starting with "1" disables - // SNI -- that is the same check vanilla libpq uses. - if sslsni := o["sslsni"]; sslsni == "" || strings.HasPrefix(sslsni, "1") { + if cfg.SSLSNI { // RFC 6066 asks to not set SNI if the host is a literal IP address (IPv4 // or IPv6). This check is coded already crypto.tls.hostnameInSNI, so // just always set ServerName here and let crypto/tls do the filtering. - tlsConf.ServerName = o["host"] + tlsConf.ServerName = cfg.Host } - err := sslClientCertificates(&tlsConf, o) + err := sslClientCertificates(tlsConf, cfg) if err != nil { return nil, err } - err = sslCertificateAuthority(&tlsConf, o) + err = sslCertificateAuthority(tlsConf, cfg) if err != nil { return nil, err } @@ -78,25 +132,34 @@ func ssl(o values) (func(net.Conn) (net.Conn, error), error) { tlsConf.Renegotiation = tls.RenegotiateFreelyAsClient return func(conn net.Conn) (net.Conn, error) { - client := tls.Client(conn, &tlsConf) + client := tls.Client(conn, tlsConf) if verifyCaOnly { - err := sslVerifyCertificateAuthority(client, &tlsConf) + err := client.Handshake() if err != nil { - return nil, err + return client, err + } + var ( + certs = client.ConnectionState().PeerCertificates + opts = x509.VerifyOptions{Intermediates: x509.NewCertPool(), Roots: tlsConf.RootCAs} + ) + for _, cert := range certs[1:] { + opts.Intermediates.AddCert(cert) } + _, err = certs[0].Verify(opts) + return client, err } return client, nil }, nil } // sslClientCertificates adds the certificate specified in the "sslcert" and +// // "sslkey" settings, or if they aren't set, from the .postgresql directory // in the user's home directory. The configured files must exist and have // the correct permissions. -func sslClientCertificates(tlsConf *tls.Config, o values) error { - sslinline := o["sslinline"] - if sslinline == "true" { - cert, err := tls.X509KeyPair([]byte(o["sslcert"]), []byte(o["sslkey"])) +func sslClientCertificates(tlsConf *tls.Config, cfg Config) error { + if cfg.SSLInline { + cert, err := tls.X509KeyPair([]byte(cfg.SSLCert), []byte(cfg.SSLKey)) if err != nil { return err } @@ -104,39 +167,48 @@ func sslClientCertificates(tlsConf *tls.Config, o values) error { return nil } - // user.Current() might fail when cross-compiling. We have to ignore the - // error and continue without home directory defaults, since we wouldn't - // know from where to load them. - user, _ := user.Current() + home := pqutil.Home() // In libpq, the client certificate is only loaded if the setting is not blank. // // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1036-L1037 - sslcert := o["sslcert"] - if len(sslcert) == 0 && user != nil { - sslcert = filepath.Join(user.HomeDir, ".postgresql", "postgresql.crt") + sslcert := cfg.SSLCert + if len(sslcert) == 0 && home != "" { + if runtime.GOOS == "windows" { + sslcert = filepath.Join(sslcert, "postgresql.crt") + } else { + sslcert = filepath.Join(home, ".postgresql/postgresql.crt") + } } // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1045 if len(sslcert) == 0 { return nil } // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1050:L1054 - if _, err := os.Stat(sslcert); os.IsNotExist(err) { - return nil - } else if err != nil { + _, err := os.Stat(sslcert) + if err != nil { + perr := new(os.PathError) + if errors.As(err, &perr) && (perr.Err == syscall.ENOENT || perr.Err == syscall.ENOTDIR) { + return nil + } return err } // In libpq, the ssl key is only loaded if the setting is not blank. // // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L1123-L1222 - sslkey := o["sslkey"] - if len(sslkey) == 0 && user != nil { - sslkey = filepath.Join(user.HomeDir, ".postgresql", "postgresql.key") + sslkey := cfg.SSLKey + if len(sslkey) == 0 && home != "" { + if runtime.GOOS == "windows" { + sslkey = filepath.Join(home, "postgresql.key") + } else { + sslkey = filepath.Join(home, ".postgresql/postgresql.key") + } } if len(sslkey) > 0 { - if err := sslKeyPermissions(sslkey); err != nil { + err := pqutil.SSLKeyPermissions(sslkey) + if err != nil { return err } } @@ -151,54 +223,28 @@ func sslClientCertificates(tlsConf *tls.Config, o values) error { } // sslCertificateAuthority adds the RootCA specified in the "sslrootcert" setting. -func sslCertificateAuthority(tlsConf *tls.Config, o values) error { +func sslCertificateAuthority(tlsConf *tls.Config, cfg Config) error { // In libpq, the root certificate is only loaded if the setting is not blank. // // https://github.com/postgres/postgres/blob/REL9_6_2/src/interfaces/libpq/fe-secure-openssl.c#L950-L951 - if sslrootcert := o["sslrootcert"]; len(sslrootcert) > 0 { + if sslrootcert := cfg.SSLRootCert; len(sslrootcert) > 0 { tlsConf.RootCAs = x509.NewCertPool() - sslinline := o["sslinline"] - var cert []byte - if sslinline == "true" { + if cfg.SSLInline { cert = []byte(sslrootcert) } else { var err error - cert, err = ioutil.ReadFile(sslrootcert) + cert, err = os.ReadFile(sslrootcert) if err != nil { return err } } if !tlsConf.RootCAs.AppendCertsFromPEM(cert) { - return fmterrorf("couldn't parse pem in sslrootcert") + return errors.New("pq: couldn't parse pem in sslrootcert") } } return nil } - -// sslVerifyCertificateAuthority carries out a TLS handshake to the server and -// verifies the presented certificate against the CA, i.e. the one specified in -// sslrootcert or the system CA if sslrootcert was not specified. -func sslVerifyCertificateAuthority(client *tls.Conn, tlsConf *tls.Config) error { - err := client.Handshake() - if err != nil { - return err - } - certs := client.ConnectionState().PeerCertificates - opts := x509.VerifyOptions{ - DNSName: client.ConnectionState().ServerName, - Intermediates: x509.NewCertPool(), - Roots: tlsConf.RootCAs, - } - for i, cert := range certs { - if i == 0 { - continue - } - opts.Intermediates.AddCert(cert) - } - _, err = certs[0].Verify(opts) - return err -} diff --git a/vendor/github.com/lib/pq/ssl_permissions.go b/vendor/github.com/lib/pq/ssl_permissions.go deleted file mode 100644 index d587f102edb..00000000000 --- a/vendor/github.com/lib/pq/ssl_permissions.go +++ /dev/null @@ -1,93 +0,0 @@ -//go:build !windows -// +build !windows - -package pq - -import ( - "errors" - "os" - "syscall" -) - -const ( - rootUserID = uint32(0) - - // The maximum permissions that a private key file owned by a regular user - // is allowed to have. This translates to u=rw. - maxUserOwnedKeyPermissions os.FileMode = 0600 - - // The maximum permissions that a private key file owned by root is allowed - // to have. This translates to u=rw,g=r. - maxRootOwnedKeyPermissions os.FileMode = 0640 -) - -var ( - errSSLKeyHasUnacceptableUserPermissions = errors.New("permissions for files not owned by root should be u=rw (0600) or less") - errSSLKeyHasUnacceptableRootPermissions = errors.New("permissions for root owned files should be u=rw,g=r (0640) or less") -) - -// sslKeyPermissions checks the permissions on user-supplied ssl key files. -// The key file should have very little access. -// -// libpq does not check key file permissions on Windows. -func sslKeyPermissions(sslkey string) error { - info, err := os.Stat(sslkey) - if err != nil { - return err - } - - err = hasCorrectPermissions(info) - - // return ErrSSLKeyHasWorldPermissions for backwards compatability with - // existing code. - if err == errSSLKeyHasUnacceptableUserPermissions || err == errSSLKeyHasUnacceptableRootPermissions { - err = ErrSSLKeyHasWorldPermissions - } - return err -} - -// hasCorrectPermissions checks the file info (and the unix-specific stat_t -// output) to verify that the permissions on the file are correct. -// -// If the file is owned by the same user the process is running as, -// the file should only have 0600 (u=rw). If the file is owned by root, -// and the group matches the group that the process is running in, the -// permissions cannot be more than 0640 (u=rw,g=r). The file should -// never have world permissions. -// -// Returns an error when the permission check fails. -func hasCorrectPermissions(info os.FileInfo) error { - // if file's permission matches 0600, allow access. - userPermissionMask := (os.FileMode(0777) ^ maxUserOwnedKeyPermissions) - - // regardless of if we're running as root or not, 0600 is acceptable, - // so we return if we match the regular user permission mask. - if info.Mode().Perm()&userPermissionMask == 0 { - return nil - } - - // We need to pull the Unix file information to get the file's owner. - // If we can't access it, there's some sort of operating system level error - // and we should fail rather than attempting to use faulty information. - sysInfo := info.Sys() - if sysInfo == nil { - return ErrSSLKeyUnknownOwnership - } - - unixStat, ok := sysInfo.(*syscall.Stat_t) - if !ok { - return ErrSSLKeyUnknownOwnership - } - - // if the file is owned by root, we allow 0640 (u=rw,g=r) to match what - // Postgres does. - if unixStat.Uid == rootUserID { - rootPermissionMask := (os.FileMode(0777) ^ maxRootOwnedKeyPermissions) - if info.Mode().Perm()&rootPermissionMask != 0 { - return errSSLKeyHasUnacceptableRootPermissions - } - return nil - } - - return errSSLKeyHasUnacceptableUserPermissions -} diff --git a/vendor/github.com/lib/pq/ssl_windows.go b/vendor/github.com/lib/pq/ssl_windows.go deleted file mode 100644 index 73663c8f157..00000000000 --- a/vendor/github.com/lib/pq/ssl_windows.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build windows -// +build windows - -package pq - -// sslKeyPermissions checks the permissions on user-supplied ssl key files. -// The key file should have very little access. -// -// libpq does not check key file permissions on Windows. -func sslKeyPermissions(string) error { return nil } diff --git a/vendor/github.com/lib/pq/staticcheck.conf b/vendor/github.com/lib/pq/staticcheck.conf new file mode 100644 index 00000000000..83abe48e53a --- /dev/null +++ b/vendor/github.com/lib/pq/staticcheck.conf @@ -0,0 +1,5 @@ +checks = [ + 'all', + '-ST1000', # "Must have at least one package comment" + '-ST1003', # "func EnableInfinityTs should be EnableInfinityTS" +] diff --git a/vendor/github.com/lib/pq/stmt.go b/vendor/github.com/lib/pq/stmt.go new file mode 100644 index 00000000000..ca6ecc89649 --- /dev/null +++ b/vendor/github.com/lib/pq/stmt.go @@ -0,0 +1,150 @@ +package pq + +import ( + "context" + "database/sql/driver" + "fmt" + "os" + + "github.com/lib/pq/internal/proto" + "github.com/lib/pq/oid" +) + +type stmt struct { + cn *conn + name string + rowsHeader + colFmtData []byte + paramTyps []oid.Oid + closed bool +} + +func (st *stmt) Close() error { + if st.closed { + return nil + } + if err := st.cn.err.get(); err != nil { + return err + } + + w := st.cn.writeBuf(proto.Close) + w.byte(proto.Sync) + w.string(st.name) + err := st.cn.send(w) + if err != nil { + return st.cn.handleError(err) + } + err = st.cn.send(st.cn.writeBuf(proto.Sync)) + if err != nil { + return st.cn.handleError(err) + } + + t, _, err := st.cn.recv1() + if err != nil { + return st.cn.handleError(err) + } + if t != proto.CloseComplete { + st.cn.err.set(driver.ErrBadConn) + return fmt.Errorf("pq: unexpected close response: %q", t) + } + st.closed = true + + t, r, err := st.cn.recv1() + if err != nil { + return st.cn.handleError(err) + } + if t != proto.ReadyForQuery { + st.cn.err.set(driver.ErrBadConn) + return fmt.Errorf("pq: expected ready for query, but got: %q", t) + } + st.cn.processReadyForQuery(r) + + return nil +} + +func (st *stmt) Query(v []driver.Value) (r driver.Rows, err error) { + return st.query(toNamedValue(v)) +} + +func (st *stmt) query(v []driver.NamedValue) (*rows, error) { + if err := st.cn.err.get(); err != nil { + return nil, err + } + + err := st.exec(v) + if err != nil { + return nil, st.cn.handleError(err) + } + return &rows{ + cn: st.cn, + rowsHeader: st.rowsHeader, + }, nil +} + +func (st *stmt) Exec(v []driver.Value) (driver.Result, error) { + return st.ExecContext(context.Background(), toNamedValue(v)) +} + +func (st *stmt) exec(v []driver.NamedValue) error { + if debugProto { + fmt.Fprintf(os.Stderr, " START stmt.exec\n") + defer fmt.Fprintf(os.Stderr, " END stmt.exec\n") + } + if len(v) >= 65536 { + return fmt.Errorf("pq: got %d parameters but PostgreSQL only supports 65535 parameters", len(v)) + } + if len(v) != len(st.paramTyps) { + return fmt.Errorf("pq: got %d parameters but the statement requires %d", len(v), len(st.paramTyps)) + } + + cn := st.cn + w := cn.writeBuf(proto.Bind) + w.byte(0) // unnamed portal + w.string(st.name) + + if cn.cfg.BinaryParameters { + err := cn.sendBinaryParameters(w, v) + if err != nil { + return err + } + } else { + w.int16(0) + w.int16(len(v)) + for i, x := range v { + if x.Value == nil { + w.int32(-1) + } else { + b, err := encode(x.Value, st.paramTyps[i]) + if err != nil { + return err + } + if b == nil { + w.int32(-1) + } else { + w.int32(len(b)) + w.bytes(b) + } + } + } + } + w.bytes(st.colFmtData) + + w.next(proto.Execute) + w.byte(0) + w.int32(0) + + w.next(proto.Sync) + err := cn.send(w) + if err != nil { + return err + } + err = cn.readBindResponse() + if err != nil { + return err + } + return cn.postExecuteWorkaround() +} + +func (st *stmt) NumInput() int { + return len(st.paramTyps) +} diff --git a/vendor/github.com/lib/pq/url.go b/vendor/github.com/lib/pq/url.go deleted file mode 100644 index aec6e95be8b..00000000000 --- a/vendor/github.com/lib/pq/url.go +++ /dev/null @@ -1,76 +0,0 @@ -package pq - -import ( - "fmt" - "net" - nurl "net/url" - "sort" - "strings" -) - -// ParseURL no longer needs to be used by clients of this library since supplying a URL as a -// connection string to sql.Open() is now supported: -// -// sql.Open("postgres", "postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full") -// -// It remains exported here for backwards-compatibility. -// -// ParseURL converts a url to a connection string for driver.Open. -// Example: -// -// "postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full" -// -// converts to: -// -// "user=bob password=secret host=1.2.3.4 port=5432 dbname=mydb sslmode=verify-full" -// -// A minimal example: -// -// "postgres://" -// -// This will be blank, causing driver.Open to use all of the defaults -func ParseURL(url string) (string, error) { - u, err := nurl.Parse(url) - if err != nil { - return "", err - } - - if u.Scheme != "postgres" && u.Scheme != "postgresql" { - return "", fmt.Errorf("invalid connection protocol: %s", u.Scheme) - } - - var kvs []string - escaper := strings.NewReplacer(`'`, `\'`, `\`, `\\`) - accrue := func(k, v string) { - if v != "" { - kvs = append(kvs, k+"='"+escaper.Replace(v)+"'") - } - } - - if u.User != nil { - v := u.User.Username() - accrue("user", v) - - v, _ = u.User.Password() - accrue("password", v) - } - - if host, port, err := net.SplitHostPort(u.Host); err != nil { - accrue("host", u.Host) - } else { - accrue("host", host) - accrue("port", port) - } - - if u.Path != "" { - accrue("dbname", u.Path[1:]) - } - - q := u.Query() - for k := range q { - accrue(k, q.Get(k)) - } - - sort.Strings(kvs) // Makes testing easier (not a performance concern) - return strings.Join(kvs, " "), nil -} diff --git a/vendor/github.com/lib/pq/user_other.go b/vendor/github.com/lib/pq/user_other.go deleted file mode 100644 index 3dae8f5572b..00000000000 --- a/vendor/github.com/lib/pq/user_other.go +++ /dev/null @@ -1,10 +0,0 @@ -// Package pq is a pure Go Postgres driver for the database/sql package. - -//go:build js || android || hurd || zos -// +build js android hurd zos - -package pq - -func userCurrent() (string, error) { - return "", ErrCouldNotDetectUsername -} diff --git a/vendor/github.com/lib/pq/user_posix.go b/vendor/github.com/lib/pq/user_posix.go deleted file mode 100644 index 5f2d439bc42..00000000000 --- a/vendor/github.com/lib/pq/user_posix.go +++ /dev/null @@ -1,25 +0,0 @@ -// Package pq is a pure Go Postgres driver for the database/sql package. - -//go:build aix || darwin || dragonfly || freebsd || (linux && !android) || nacl || netbsd || openbsd || plan9 || solaris || rumprun || illumos -// +build aix darwin dragonfly freebsd linux,!android nacl netbsd openbsd plan9 solaris rumprun illumos - -package pq - -import ( - "os" - "os/user" -) - -func userCurrent() (string, error) { - u, err := user.Current() - if err == nil { - return u.Username, nil - } - - name := os.Getenv("USER") - if name != "" { - return name, nil - } - - return "", ErrCouldNotDetectUsername -} diff --git a/vendor/github.com/lib/pq/user_windows.go b/vendor/github.com/lib/pq/user_windows.go deleted file mode 100644 index 2b691267b97..00000000000 --- a/vendor/github.com/lib/pq/user_windows.go +++ /dev/null @@ -1,27 +0,0 @@ -// Package pq is a pure Go Postgres driver for the database/sql package. -package pq - -import ( - "path/filepath" - "syscall" -) - -// Perform Windows user name lookup identically to libpq. -// -// The PostgreSQL code makes use of the legacy Win32 function -// GetUserName, and that function has not been imported into stock Go. -// GetUserNameEx is available though, the difference being that a -// wider range of names are available. To get the output to be the -// same as GetUserName, only the base (or last) component of the -// result is returned. -func userCurrent() (string, error) { - pw_name := make([]uint16, 128) - pwname_size := uint32(len(pw_name)) - 1 - err := syscall.GetUserNameEx(syscall.NameSamCompatible, &pw_name[0], &pwname_size) - if err != nil { - return "", ErrCouldNotDetectUsername - } - s := syscall.UTF16ToString(pw_name) - u := filepath.Base(s) - return u, nil -} diff --git a/vendor/github.com/lib/pq/uuid.go b/vendor/github.com/lib/pq/uuid.go deleted file mode 100644 index 9a1b9e0748e..00000000000 --- a/vendor/github.com/lib/pq/uuid.go +++ /dev/null @@ -1,23 +0,0 @@ -package pq - -import ( - "encoding/hex" - "fmt" -) - -// decodeUUIDBinary interprets the binary format of a uuid, returning it in text format. -func decodeUUIDBinary(src []byte) ([]byte, error) { - if len(src) != 16 { - return nil, fmt.Errorf("pq: unable to decode uuid; bad length: %d", len(src)) - } - - dst := make([]byte, 36) - dst[8], dst[13], dst[18], dst[23] = '-', '-', '-', '-' - hex.Encode(dst[0:], src[0:4]) - hex.Encode(dst[9:], src[4:6]) - hex.Encode(dst[14:], src[6:8]) - hex.Encode(dst[19:], src[8:10]) - hex.Encode(dst[24:], src[10:16]) - - return dst, nil -} diff --git a/vendor/github.com/miekg/dns/edns.go b/vendor/github.com/miekg/dns/edns.go index 91793b90696..5c970ca7ed8 100644 --- a/vendor/github.com/miekg/dns/edns.go +++ b/vendor/github.com/miekg/dns/edns.go @@ -317,30 +317,30 @@ func (e *EDNS0_SUBNET) pack() ([]byte, error) { // "dig" sets AddressFamily to 0 if SourceNetmask is also 0 // We might don't need to complain either if e.SourceNetmask != 0 { - return nil, errors.New("dns: bad address family") + return nil, errors.New("bad address family") } case 1: if e.SourceNetmask > net.IPv4len*8 { - return nil, errors.New("dns: bad netmask") + return nil, errors.New("bad netmask") } if len(e.Address.To4()) != net.IPv4len { - return nil, errors.New("dns: bad address") + return nil, errors.New("bad address") } ip := e.Address.To4().Mask(net.CIDRMask(int(e.SourceNetmask), net.IPv4len*8)) needLength := (e.SourceNetmask + 8 - 1) / 8 // division rounding up b = append(b, ip[:needLength]...) case 2: if e.SourceNetmask > net.IPv6len*8 { - return nil, errors.New("dns: bad netmask") + return nil, errors.New("bad netmask") } if len(e.Address) != net.IPv6len { - return nil, errors.New("dns: bad address") + return nil, errors.New("bad address") } ip := e.Address.Mask(net.CIDRMask(int(e.SourceNetmask), net.IPv6len*8)) needLength := (e.SourceNetmask + 8 - 1) / 8 // division rounding up b = append(b, ip[:needLength]...) default: - return nil, errors.New("dns: bad address family") + return nil, errors.New("bad address family") } return b, nil } @@ -357,25 +357,25 @@ func (e *EDNS0_SUBNET) unpack(b []byte) error { // "dig" sets AddressFamily to 0 if SourceNetmask is also 0 // It's okay to accept such a packet if e.SourceNetmask != 0 { - return errors.New("dns: bad address family") + return errors.New("bad address family") } e.Address = net.IPv4(0, 0, 0, 0) case 1: if e.SourceNetmask > net.IPv4len*8 || e.SourceScope > net.IPv4len*8 { - return errors.New("dns: bad netmask") + return errors.New("bad netmask") } addr := make(net.IP, net.IPv4len) copy(addr, b[4:]) e.Address = addr.To16() case 2: if e.SourceNetmask > net.IPv6len*8 || e.SourceScope > net.IPv6len*8 { - return errors.New("dns: bad netmask") + return errors.New("bad netmask") } addr := make(net.IP, net.IPv6len) copy(addr, b[4:]) e.Address = addr default: - return errors.New("dns: bad address family") + return errors.New("bad address family") } return nil } @@ -720,7 +720,7 @@ func (e *EDNS0_TCP_KEEPALIVE) unpack(b []byte) error { case 2: e.Timeout = binary.BigEndian.Uint16(b) default: - return fmt.Errorf("dns: length mismatch, want 0/2 but got %d", len(b)) + return fmt.Errorf("length mismatch, want 0/2 but got %d", len(b)) } return nil } diff --git a/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/miekg/dns/msg.go index d87b5323be0..edf18596199 100644 --- a/vendor/github.com/miekg/dns/msg.go +++ b/vendor/github.com/miekg/dns/msg.go @@ -872,7 +872,7 @@ func (dns *Msg) unpack(dh Header, msg []byte, off int) (err error) { // TODO(miek) make this an error? // use PackOpt to let people tell how detailed the error reporting should be? // if off != len(msg) { - // // println("dns: extra bytes in dns packet", off, "<", len(msg)) + // // println("dns: extra bytes in dns packet", off, "<", len(msg)) // } return err } @@ -1123,23 +1123,28 @@ func unpackQuestion(msg []byte, off int) (Question, int, error) { ) q.Name, off, err = UnpackDomainName(msg, off) if err != nil { - return q, off, err + return q, off, fmt.Errorf("bad question name: %w", err) } if off == len(msg) { return q, off, nil } q.Qtype, off, err = unpackUint16(msg, off) if err != nil { - return q, off, err + return q, off, fmt.Errorf("bad question qtype: %w", err) } if off == len(msg) { return q, off, nil } q.Qclass, off, err = unpackUint16(msg, off) + if err != nil { + return q, off, fmt.Errorf("bad question qclass: %w", err) + } + if off == len(msg) { return q, off, nil } - return q, off, err + + return q, off, nil } func (dh *Header) pack(msg []byte, off int, compression compressionMap, compress bool) (int, error) { @@ -1177,27 +1182,27 @@ func unpackMsgHdr(msg []byte, off int) (Header, int, error) { ) dh.Id, off, err = unpackUint16(msg, off) if err != nil { - return dh, off, err + return dh, off, fmt.Errorf("bad header id: %w", err) } dh.Bits, off, err = unpackUint16(msg, off) if err != nil { - return dh, off, err + return dh, off, fmt.Errorf("bad header bits: %w", err) } dh.Qdcount, off, err = unpackUint16(msg, off) if err != nil { - return dh, off, err + return dh, off, fmt.Errorf("bad header question count: %w", err) } dh.Ancount, off, err = unpackUint16(msg, off) if err != nil { - return dh, off, err + return dh, off, fmt.Errorf("bad header answer count: %w", err) } dh.Nscount, off, err = unpackUint16(msg, off) if err != nil { - return dh, off, err + return dh, off, fmt.Errorf("bad header ns count: %w", err) } dh.Arcount, off, err = unpackUint16(msg, off) if err != nil { - return dh, off, err + return dh, off, fmt.Errorf("bad header extra count: %w", err) } return dh, off, nil } diff --git a/vendor/github.com/miekg/dns/server.go b/vendor/github.com/miekg/dns/server.go index b04d370f682..364149cfcea 100644 --- a/vendor/github.com/miekg/dns/server.go +++ b/vendor/github.com/miekg/dns/server.go @@ -332,7 +332,7 @@ func (srv *Server) ListenAndServe() error { return srv.serveTCP(l) case "tcp-tls", "tcp4-tls", "tcp6-tls": if srv.TLSConfig == nil || (len(srv.TLSConfig.Certificates) == 0 && srv.TLSConfig.GetCertificate == nil) { - return errors.New("dns: neither Certificates nor GetCertificate set in Config") + return errors.New("neither Certificates nor GetCertificate set in config") } network := strings.TrimSuffix(srv.Net, "-tls") l, err := listenTCP(network, addr, srv.ReusePort, srv.ReuseAddr) diff --git a/vendor/github.com/miekg/dns/svcb.go b/vendor/github.com/miekg/dns/svcb.go index d1baeea992f..598103c10c5 100644 --- a/vendor/github.com/miekg/dns/svcb.go +++ b/vendor/github.com/miekg/dns/svcb.go @@ -298,7 +298,7 @@ func (s *SVCBMandatory) pack() ([]byte, error) { func (s *SVCBMandatory) unpack(b []byte) error { if len(b)%2 != 0 { - return errors.New("dns: svcbmandatory: value length is not a multiple of 2") + return errors.New("bad svcbmandatory: value length is not a multiple of 2") } codes := make([]SVCBKey, 0, len(b)/2) for i := 0; i < len(b); i += 2 { @@ -395,10 +395,10 @@ func (s *SVCBAlpn) pack() ([]byte, error) { b := make([]byte, 0, 10*len(s.Alpn)) for _, e := range s.Alpn { if e == "" { - return nil, errors.New("dns: svcbalpn: empty alpn-id") + return nil, errors.New("bad svcbalpn: empty alpn-id") } if len(e) > 255 { - return nil, errors.New("dns: svcbalpn: alpn-id too long") + return nil, errors.New("bad svcbalpn: alpn-id too long") } b = append(b, byte(len(e))) b = append(b, e...) @@ -413,7 +413,7 @@ func (s *SVCBAlpn) unpack(b []byte) error { length := int(b[i]) i++ if i+length > len(b) { - return errors.New("dns: svcbalpn: alpn array overflowing") + return errors.New("bad svcbalpn: alpn array overflowing") } alpn = append(alpn, string(b[i:i+length])) i += length @@ -433,13 +433,13 @@ func (s *SVCBAlpn) parse(b string) error { for p := 0; p < len(b); { c, q := nextByte(b, p) if q == 0 { - return errors.New("dns: svcbalpn: unterminated escape") + return errors.New("bad svcbalpn: unterminated escape") } p += q // If we find a comma, we have finished reading an alpn. if c == ',' { if len(a) == 0 { - return errors.New("dns: svcbalpn: empty protocol identifier") + return errors.New("bad svcbalpn: empty protocol identifier") } alpn = append(alpn, string(a)) a = []byte{} @@ -449,10 +449,10 @@ func (s *SVCBAlpn) parse(b string) error { if c == '\\' { dc, dq := nextByte(b, p) if dq == 0 { - return errors.New("dns: svcbalpn: unterminated escape decoding comma-separated list") + return errors.New("bad svcbalpn: unterminated escape decoding comma-separated list") } if dc != '\\' && dc != ',' { - return errors.New("dns: svcbalpn: bad escaped character decoding comma-separated list") + return errors.New("bad svcbalpn: bad escaped character decoding comma-separated list") } p += dq c = dc @@ -461,7 +461,7 @@ func (s *SVCBAlpn) parse(b string) error { } // Add the final alpn. if len(a) == 0 { - return errors.New("dns: svcbalpn: last protocol identifier empty") + return errors.New("bad svcbalpn: last protocol identifier empty") } s.Alpn = append(alpn, string(a)) return nil @@ -499,14 +499,14 @@ func (*SVCBNoDefaultAlpn) len() int { return 0 } func (*SVCBNoDefaultAlpn) unpack(b []byte) error { if len(b) != 0 { - return errors.New("dns: svcbnodefaultalpn: no-default-alpn must have no value") + return errors.New("bad svcbnodefaultalpn: no-default-alpn must have no value") } return nil } func (*SVCBNoDefaultAlpn) parse(b string) error { if b != "" { - return errors.New("dns: svcbnodefaultalpn: no-default-alpn must have no value") + return errors.New("bad svcbnodefaultalpn: no-default-alpn must have no value") } return nil } @@ -529,7 +529,7 @@ func (s *SVCBPort) copy() SVCBKeyValue { return &SVCBPort{s.Port} } func (s *SVCBPort) unpack(b []byte) error { if len(b) != 2 { - return errors.New("dns: svcbport: port length is not exactly 2 octets") + return errors.New("bad svcbport: port length is not exactly 2 octets") } s.Port = binary.BigEndian.Uint16(b) return nil @@ -544,7 +544,7 @@ func (s *SVCBPort) pack() ([]byte, error) { func (s *SVCBPort) parse(b string) error { port, err := strconv.ParseUint(b, 10, 16) if err != nil { - return errors.New("dns: svcbport: port out of range") + return errors.New("bad svcbport: port out of range") } s.Port = uint16(port) return nil @@ -577,7 +577,7 @@ func (s *SVCBIPv4Hint) pack() ([]byte, error) { for _, e := range s.Hint { x := e.To4() if x == nil { - return nil, errors.New("dns: svcbipv4hint: expected ipv4, hint is ipv6") + return nil, errors.New("bad svcbipv4hint: expected ipv4, hint is ipv6") } b = append(b, x...) } @@ -586,7 +586,7 @@ func (s *SVCBIPv4Hint) pack() ([]byte, error) { func (s *SVCBIPv4Hint) unpack(b []byte) error { if len(b) == 0 || len(b)%4 != 0 { - return errors.New("dns: svcbipv4hint: ipv4 address byte array length is not a multiple of 4") + return errors.New("bad svcbipv4hint: ipv4 address byte array length is not a multiple of 4") } b = cloneSlice(b) x := make([]net.IP, 0, len(b)/4) @@ -611,10 +611,10 @@ func (s *SVCBIPv4Hint) String() string { func (s *SVCBIPv4Hint) parse(b string) error { if b == "" { - return errors.New("dns: svcbipv4hint: empty hint") + return errors.New("bad svcbipv4hint: empty hint") } if strings.Contains(b, ":") { - return errors.New("dns: svcbipv4hint: expected ipv4, got ipv6") + return errors.New("bad svcbipv4hint: expected ipv4, got ipv6") } hint := make([]net.IP, 0, strings.Count(b, ",")+1) @@ -623,7 +623,7 @@ func (s *SVCBIPv4Hint) parse(b string) error { e, b, _ = strings.Cut(b, ",") ip := net.ParseIP(e).To4() if ip == nil { - return errors.New("dns: svcbipv4hint: bad ip") + return errors.New("bad svcbipv4hint: bad ip") } hint = append(hint, ip) } @@ -671,7 +671,7 @@ func (s *SVCBECHConfig) unpack(b []byte) error { func (s *SVCBECHConfig) parse(b string) error { x, err := fromBase64([]byte(b)) if err != nil { - return errors.New("dns: svcbech: bad base64 ech") + return errors.New("bad svcbech: bad base64 ech") } s.ECH = x return nil @@ -699,7 +699,7 @@ func (s *SVCBIPv6Hint) pack() ([]byte, error) { b := make([]byte, 0, 16*len(s.Hint)) for _, e := range s.Hint { if len(e) != net.IPv6len || e.To4() != nil { - return nil, errors.New("dns: svcbipv6hint: expected ipv6, hint is ipv4") + return nil, errors.New("bad svcbipv6hint: expected ipv6, hint is ipv4") } b = append(b, e...) } @@ -708,14 +708,14 @@ func (s *SVCBIPv6Hint) pack() ([]byte, error) { func (s *SVCBIPv6Hint) unpack(b []byte) error { if len(b) == 0 || len(b)%16 != 0 { - return errors.New("dns: svcbipv6hint: ipv6 address byte array length not a multiple of 16") + return errors.New("bas svcbipv6hint: ipv6 address byte array length not a multiple of 16") } b = cloneSlice(b) x := make([]net.IP, 0, len(b)/16) for i := 0; i < len(b); i += 16 { ip := net.IP(b[i : i+16]) if ip.To4() != nil { - return errors.New("dns: svcbipv6hint: expected ipv6, got ipv4") + return errors.New("bad svcbipv6hint: expected ipv6, got ipv4") } x = append(x, ip) } @@ -736,7 +736,7 @@ func (s *SVCBIPv6Hint) String() string { func (s *SVCBIPv6Hint) parse(b string) error { if b == "" { - return errors.New("dns: svcbipv6hint: empty hint") + return errors.New("bad svcbipv6hint: empty hint") } hint := make([]net.IP, 0, strings.Count(b, ",")+1) @@ -745,10 +745,10 @@ func (s *SVCBIPv6Hint) parse(b string) error { e, b, _ = strings.Cut(b, ",") ip := net.ParseIP(e) if ip == nil { - return errors.New("dns: svcbipv6hint: bad ip") + return errors.New("bad svcbipv6hint: bad ip") } if ip.To4() != nil { - return errors.New("dns: svcbipv6hint: expected ipv6, got ipv4-mapped-ipv6") + return errors.New("bad svcbipv6hint: expected ipv6, got ipv4-mapped-ipv6") } hint = append(hint, ip) } @@ -800,7 +800,7 @@ func (s *SVCBDoHPath) unpack(b []byte) error { func (s *SVCBDoHPath) parse(b string) error { template, err := svcbParseParam(b) if err != nil { - return fmt.Errorf("dns: svcbdohpath: %w", err) + return fmt.Errorf("bad svcbdohpath: %w", err) } s.Template = string(template) return nil @@ -838,14 +838,14 @@ func (*SVCBOhttp) len() int { return 0 } func (*SVCBOhttp) unpack(b []byte) error { if len(b) != 0 { - return errors.New("dns: svcbotthp: svcbotthp must have no value") + return errors.New("bad svcbotthp: svcbotthp must have no value") } return nil } func (*SVCBOhttp) parse(b string) error { if b != "" { - return errors.New("dns: svcbotthp: svcbotthp must have no value") + return errors.New("bad svcbotthp: svcbotthp must have no value") } return nil } @@ -878,7 +878,7 @@ func (s *SVCBLocal) unpack(b []byte) error { func (s *SVCBLocal) parse(b string) error { data, err := svcbParseParam(b) if err != nil { - return fmt.Errorf("dns: svcblocal: svcb private/experimental key %w", err) + return fmt.Errorf("bad svcblocal: svcb private/experimental key %w", err) } s.Data = data return nil diff --git a/vendor/github.com/miekg/dns/version.go b/vendor/github.com/miekg/dns/version.go index 936dc212457..4af7d286c7f 100644 --- a/vendor/github.com/miekg/dns/version.go +++ b/vendor/github.com/miekg/dns/version.go @@ -3,7 +3,7 @@ package dns import "fmt" // Version is current version of this library. -var Version = v{1, 1, 66} +var Version = v{1, 1, 68} // v holds the version of this library. type v struct { diff --git a/vendor/github.com/miekg/dns/zmsg.go b/vendor/github.com/miekg/dns/zmsg.go index cc09810fb12..8143ddc1b98 100644 --- a/vendor/github.com/miekg/dns/zmsg.go +++ b/vendor/github.com/miekg/dns/zmsg.go @@ -2,6 +2,8 @@ package dns +import "fmt" + // pack*() functions func (rr *A) pack(msg []byte, off int, compression compressionMap, compress bool) (off1 int, err error) { @@ -1222,7 +1224,7 @@ func (rr *A) unpack(msg []byte, off int) (off1 int, err error) { rr.A, off, err = unpackDataA(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("A: %w", err) } return off, nil } @@ -1233,7 +1235,7 @@ func (rr *AAAA) unpack(msg []byte, off int) (off1 int, err error) { rr.AAAA, off, err = unpackDataAAAA(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("AAAA: %w", err) } return off, nil } @@ -1244,14 +1246,14 @@ func (rr *AFSDB) unpack(msg []byte, off int) (off1 int, err error) { rr.Subtype, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("AFSDB.Subtype: %w", err) } if off == len(msg) { return off, nil } rr.Hostname, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("AFSDB.Hostname: %w", err) } return off, nil } @@ -1262,14 +1264,14 @@ func (rr *AMTRELAY) unpack(msg []byte, off int) (off1 int, err error) { rr.Precedence, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("AMTRELAY.Precedence: %w", err) } if off == len(msg) { return off, nil } rr.GatewayType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("AMTRELAY.GatewayType: %w", err) } if off == len(msg) { return off, nil @@ -1279,7 +1281,7 @@ func (rr *AMTRELAY) unpack(msg []byte, off int) (off1 int, err error) { } rr.GatewayAddr, rr.GatewayHost, off, err = unpackIPSECGateway(msg, off, rr.GatewayType) if err != nil { - return off, err + return off, fmt.Errorf("AMTRELAY.GatewayHost: %w", err) } return off, nil } @@ -1297,7 +1299,7 @@ func (rr *APL) unpack(msg []byte, off int) (off1 int, err error) { rr.Prefixes, off, err = unpackDataApl(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("APL.Prefixes: %w", err) } return off, nil } @@ -1308,7 +1310,7 @@ func (rr *AVC) unpack(msg []byte, off int) (off1 int, err error) { rr.Txt, off, err = unpackStringTxt(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("AVC.Txt: %w", err) } return off, nil } @@ -1319,21 +1321,21 @@ func (rr *CAA) unpack(msg []byte, off int) (off1 int, err error) { rr.Flag, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CAA.Flag: %w", err) } if off == len(msg) { return off, nil } rr.Tag, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CAA.Tag: %w", err) } if off == len(msg) { return off, nil } rr.Value, off, err = unpackStringOctet(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CAA.Value: %w", err) } return off, nil } @@ -1344,28 +1346,28 @@ func (rr *CDNSKEY) unpack(msg []byte, off int) (off1 int, err error) { rr.Flags, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CDNSKEY.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Protocol, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CDNSKEY.Protocol: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CDNSKEY.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("CDNSKEY.PublicKey: %w", err) } return off, nil } @@ -1376,28 +1378,28 @@ func (rr *CDS) unpack(msg []byte, off int) (off1 int, err error) { rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CDS.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CDS.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.DigestType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CDS.DigestType: %w", err) } if off == len(msg) { return off, nil } rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("CDS.Digest: %w", err) } return off, nil } @@ -1408,28 +1410,28 @@ func (rr *CERT) unpack(msg []byte, off int) (off1 int, err error) { rr.Type, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CERT.Type: %w", err) } if off == len(msg) { return off, nil } rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CERT.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CERT.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.Certificate, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("CERT.Certificate: %w", err) } return off, nil } @@ -1440,7 +1442,7 @@ func (rr *CNAME) unpack(msg []byte, off int) (off1 int, err error) { rr.Target, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CNAME.Target: %w", err) } return off, nil } @@ -1451,21 +1453,21 @@ func (rr *CSYNC) unpack(msg []byte, off int) (off1 int, err error) { rr.Serial, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CSYNC.Serial: %w", err) } if off == len(msg) { return off, nil } rr.Flags, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CSYNC.Flags: %w", err) } if off == len(msg) { return off, nil } rr.TypeBitMap, off, err = unpackDataNsec(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("CSYNC.TypeBitMap: %w", err) } return off, nil } @@ -1476,7 +1478,7 @@ func (rr *DHCID) unpack(msg []byte, off int) (off1 int, err error) { rr.Digest, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("DHCID.Digest: %w", err) } return off, nil } @@ -1487,28 +1489,28 @@ func (rr *DLV) unpack(msg []byte, off int) (off1 int, err error) { rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DLV.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DLV.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.DigestType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DLV.DigestType: %w", err) } if off == len(msg) { return off, nil } rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("DLV.Digest: %w", err) } return off, nil } @@ -1519,7 +1521,7 @@ func (rr *DNAME) unpack(msg []byte, off int) (off1 int, err error) { rr.Target, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DNAME.Target: %w", err) } return off, nil } @@ -1530,28 +1532,28 @@ func (rr *DNSKEY) unpack(msg []byte, off int) (off1 int, err error) { rr.Flags, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DNSKEY.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Protocol, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DNSKEY.Protocol: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DNSKEY.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("DNSKEY.PublicKey: %w", err) } return off, nil } @@ -1562,28 +1564,28 @@ func (rr *DS) unpack(msg []byte, off int) (off1 int, err error) { rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DS.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DS.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.DigestType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("DS.DigestType: %w", err) } if off == len(msg) { return off, nil } rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("DS.Digest: %w", err) } return off, nil } @@ -1594,7 +1596,7 @@ func (rr *EID) unpack(msg []byte, off int) (off1 int, err error) { rr.Endpoint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("EID.Endpoint: %w", err) } return off, nil } @@ -1605,7 +1607,7 @@ func (rr *EUI48) unpack(msg []byte, off int) (off1 int, err error) { rr.Address, off, err = unpackUint48(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("EUI48.Address: %w", err) } return off, nil } @@ -1616,7 +1618,7 @@ func (rr *EUI64) unpack(msg []byte, off int) (off1 int, err error) { rr.Address, off, err = unpackUint64(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("EUI64.Address: %w", err) } return off, nil } @@ -1627,7 +1629,7 @@ func (rr *GID) unpack(msg []byte, off int) (off1 int, err error) { rr.Gid, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("GID.Gid: %w", err) } return off, nil } @@ -1638,21 +1640,21 @@ func (rr *GPOS) unpack(msg []byte, off int) (off1 int, err error) { rr.Longitude, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("GPOS.Longitude: %w", err) } if off == len(msg) { return off, nil } rr.Latitude, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("GPOS.Latitude: %w", err) } if off == len(msg) { return off, nil } rr.Altitude, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("GPOS.Altitude: %w", err) } return off, nil } @@ -1663,14 +1665,14 @@ func (rr *HINFO) unpack(msg []byte, off int) (off1 int, err error) { rr.Cpu, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HINFO.Cpu: %w", err) } if off == len(msg) { return off, nil } rr.Os, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HINFO.Os: %w", err) } return off, nil } @@ -1681,21 +1683,21 @@ func (rr *HIP) unpack(msg []byte, off int) (off1 int, err error) { rr.HitLength, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HIP.HitLength: %w", err) } if off == len(msg) { return off, nil } rr.PublicKeyAlgorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HIP.PublicKeyAlgorithm: %w", err) } if off == len(msg) { return off, nil } rr.PublicKeyLength, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HIP.PublicKeyLength: %w", err) } if off == len(msg) { return off, nil @@ -1710,7 +1712,7 @@ func (rr *HIP) unpack(msg []byte, off int) (off1 int, err error) { } rr.RendezvousServers, off, err = unpackDataDomainNames(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("HIP.RendezvousServers: %w", err) } return off, nil } @@ -1721,21 +1723,21 @@ func (rr *HTTPS) unpack(msg []byte, off int) (off1 int, err error) { rr.Priority, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HTTPS.Priority: %w", err) } if off == len(msg) { return off, nil } rr.Target, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HTTPS.Target: %w", err) } if off == len(msg) { return off, nil } rr.Value, off, err = unpackDataSVCB(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("HTTPS.Value: %w", err) } return off, nil } @@ -1746,21 +1748,21 @@ func (rr *IPSECKEY) unpack(msg []byte, off int) (off1 int, err error) { rr.Precedence, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("IPSECKEY.Precedence: %w", err) } if off == len(msg) { return off, nil } rr.GatewayType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("IPSECKEY.GatewayType: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("IPSECKEY.Algorithm: %w", err) } if off == len(msg) { return off, nil @@ -1770,14 +1772,14 @@ func (rr *IPSECKEY) unpack(msg []byte, off int) (off1 int, err error) { } rr.GatewayAddr, rr.GatewayHost, off, err = unpackIPSECGateway(msg, off, rr.GatewayType) if err != nil { - return off, err + return off, fmt.Errorf("IPSECKEY.GatewayHost: %w", err) } if off == len(msg) { return off, nil } rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("IPSECKEY.PublicKey: %w", err) } return off, nil } @@ -1788,14 +1790,14 @@ func (rr *ISDN) unpack(msg []byte, off int) (off1 int, err error) { rr.Address, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("ISDN.Address: %w", err) } if off == len(msg) { return off, nil } rr.SubAddress, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("ISDN.SubAddress: %w", err) } return off, nil } @@ -1806,28 +1808,28 @@ func (rr *KEY) unpack(msg []byte, off int) (off1 int, err error) { rr.Flags, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("KEY.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Protocol, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("KEY.Protocol: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("KEY.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("KEY.PublicKey: %w", err) } return off, nil } @@ -1838,14 +1840,14 @@ func (rr *KX) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("KX.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Exchanger, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("KX.Exchanger: %w", err) } return off, nil } @@ -1856,14 +1858,14 @@ func (rr *L32) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("L32.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Locator32, off, err = unpackDataA(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("L32.Locator32: %w", err) } return off, nil } @@ -1874,14 +1876,14 @@ func (rr *L64) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("L64.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Locator64, off, err = unpackUint64(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("L64.Locator64: %w", err) } return off, nil } @@ -1892,49 +1894,49 @@ func (rr *LOC) unpack(msg []byte, off int) (off1 int, err error) { rr.Version, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.Version: %w", err) } if off == len(msg) { return off, nil } rr.Size, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.Size: %w", err) } if off == len(msg) { return off, nil } rr.HorizPre, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.HorizPre: %w", err) } if off == len(msg) { return off, nil } rr.VertPre, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.VertPre: %w", err) } if off == len(msg) { return off, nil } rr.Latitude, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.Latitude: %w", err) } if off == len(msg) { return off, nil } rr.Longitude, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.Longitude: %w", err) } if off == len(msg) { return off, nil } rr.Altitude, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LOC.Altitude: %w", err) } return off, nil } @@ -1945,14 +1947,14 @@ func (rr *LP) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LP.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Fqdn, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("LP.Fqdn: %w", err) } return off, nil } @@ -1963,7 +1965,7 @@ func (rr *MB) unpack(msg []byte, off int) (off1 int, err error) { rr.Mb, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MB.Mb: %w", err) } return off, nil } @@ -1974,7 +1976,7 @@ func (rr *MD) unpack(msg []byte, off int) (off1 int, err error) { rr.Md, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MD.Md: %w", err) } return off, nil } @@ -1985,7 +1987,7 @@ func (rr *MF) unpack(msg []byte, off int) (off1 int, err error) { rr.Mf, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MF.Mf: %w", err) } return off, nil } @@ -1996,7 +1998,7 @@ func (rr *MG) unpack(msg []byte, off int) (off1 int, err error) { rr.Mg, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MG.Mg: %w", err) } return off, nil } @@ -2007,14 +2009,14 @@ func (rr *MINFO) unpack(msg []byte, off int) (off1 int, err error) { rr.Rmail, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MINFO.Rmail: %w", err) } if off == len(msg) { return off, nil } rr.Email, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MINFO.Email: %w", err) } return off, nil } @@ -2025,7 +2027,7 @@ func (rr *MR) unpack(msg []byte, off int) (off1 int, err error) { rr.Mr, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MR.Mr: %w", err) } return off, nil } @@ -2036,14 +2038,14 @@ func (rr *MX) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MX.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Mx, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("MX.Mx: %w", err) } return off, nil } @@ -2054,42 +2056,42 @@ func (rr *NAPTR) unpack(msg []byte, off int) (off1 int, err error) { rr.Order, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NAPTR.Order: %w", err) } if off == len(msg) { return off, nil } rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NAPTR.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Flags, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NAPTR.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Service, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NAPTR.Service: %w", err) } if off == len(msg) { return off, nil } rr.Regexp, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NAPTR.Regexp: %w", err) } if off == len(msg) { return off, nil } rr.Replacement, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NAPTR.Replacement: %w", err) } return off, nil } @@ -2100,14 +2102,14 @@ func (rr *NID) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NID.Preference: %w", err) } if off == len(msg) { return off, nil } rr.NodeID, off, err = unpackUint64(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NID.NodeID: %w", err) } return off, nil } @@ -2118,7 +2120,7 @@ func (rr *NIMLOC) unpack(msg []byte, off int) (off1 int, err error) { rr.Locator, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("NIMLOC.Locator: %w", err) } return off, nil } @@ -2129,7 +2131,7 @@ func (rr *NINFO) unpack(msg []byte, off int) (off1 int, err error) { rr.ZSData, off, err = unpackStringTxt(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NINFO.ZSData: %w", err) } return off, nil } @@ -2140,7 +2142,7 @@ func (rr *NS) unpack(msg []byte, off int) (off1 int, err error) { rr.Ns, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NS.Ns: %w", err) } return off, nil } @@ -2151,7 +2153,7 @@ func (rr *NSAPPTR) unpack(msg []byte, off int) (off1 int, err error) { rr.Ptr, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSAPPTR.Ptr: %w", err) } return off, nil } @@ -2162,14 +2164,14 @@ func (rr *NSEC) unpack(msg []byte, off int) (off1 int, err error) { rr.NextDomain, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC.NextDomain: %w", err) } if off == len(msg) { return off, nil } rr.TypeBitMap, off, err = unpackDataNsec(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC.TypeBitMap: %w", err) } return off, nil } @@ -2180,28 +2182,28 @@ func (rr *NSEC3) unpack(msg []byte, off int) (off1 int, err error) { rr.Hash, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3.Hash: %w", err) } if off == len(msg) { return off, nil } rr.Flags, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Iterations, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3.Iterations: %w", err) } if off == len(msg) { return off, nil } rr.SaltLength, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3.SaltLength: %w", err) } if off == len(msg) { return off, nil @@ -2212,7 +2214,7 @@ func (rr *NSEC3) unpack(msg []byte, off int) (off1 int, err error) { } rr.HashLength, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3.HashLength: %w", err) } if off == len(msg) { return off, nil @@ -2223,7 +2225,7 @@ func (rr *NSEC3) unpack(msg []byte, off int) (off1 int, err error) { } rr.TypeBitMap, off, err = unpackDataNsec(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3.TypeBitMap: %w", err) } return off, nil } @@ -2234,28 +2236,28 @@ func (rr *NSEC3PARAM) unpack(msg []byte, off int) (off1 int, err error) { rr.Hash, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3PARAM.Hash: %w", err) } if off == len(msg) { return off, nil } rr.Flags, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3PARAM.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Iterations, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3PARAM.Iterations: %w", err) } if off == len(msg) { return off, nil } rr.SaltLength, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NSEC3PARAM.SaltLength: %w", err) } if off == len(msg) { return off, nil @@ -2273,7 +2275,7 @@ func (rr *NULL) unpack(msg []byte, off int) (off1 int, err error) { rr.Data, off, err = unpackStringAny(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("NULL.Data: %w", err) } return off, nil } @@ -2291,14 +2293,14 @@ func (rr *NXT) unpack(msg []byte, off int) (off1 int, err error) { rr.NextDomain, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NXT.NextDomain: %w", err) } if off == len(msg) { return off, nil } rr.TypeBitMap, off, err = unpackDataNsec(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("NXT.TypeBitMap: %w", err) } return off, nil } @@ -2309,7 +2311,7 @@ func (rr *OPENPGPKEY) unpack(msg []byte, off int) (off1 int, err error) { rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("OPENPGPKEY.PublicKey: %w", err) } return off, nil } @@ -2320,7 +2322,7 @@ func (rr *OPT) unpack(msg []byte, off int) (off1 int, err error) { rr.Option, off, err = unpackDataOpt(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("OPT.Option: %w", err) } return off, nil } @@ -2331,7 +2333,7 @@ func (rr *PTR) unpack(msg []byte, off int) (off1 int, err error) { rr.Ptr, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("PTR.Ptr: %w", err) } return off, nil } @@ -2342,21 +2344,21 @@ func (rr *PX) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("PX.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Map822, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("PX.Map822: %w", err) } if off == len(msg) { return off, nil } rr.Mapx400, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("PX.Mapx400: %w", err) } return off, nil } @@ -2378,7 +2380,7 @@ func (rr *RFC3597) unpack(msg []byte, off int) (off1 int, err error) { rr.Rdata, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("RFC3597.Rdata: %w", err) } return off, nil } @@ -2389,28 +2391,28 @@ func (rr *RKEY) unpack(msg []byte, off int) (off1 int, err error) { rr.Flags, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RKEY.Flags: %w", err) } if off == len(msg) { return off, nil } rr.Protocol, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RKEY.Protocol: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RKEY.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("RKEY.PublicKey: %w", err) } return off, nil } @@ -2421,14 +2423,14 @@ func (rr *RP) unpack(msg []byte, off int) (off1 int, err error) { rr.Mbox, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RP.Mbox: %w", err) } if off == len(msg) { return off, nil } rr.Txt, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RP.Txt: %w", err) } return off, nil } @@ -2439,63 +2441,63 @@ func (rr *RRSIG) unpack(msg []byte, off int) (off1 int, err error) { rr.TypeCovered, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.TypeCovered: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.Labels, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.Labels: %w", err) } if off == len(msg) { return off, nil } rr.OrigTtl, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.OrigTtl: %w", err) } if off == len(msg) { return off, nil } rr.Expiration, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.Expiration: %w", err) } if off == len(msg) { return off, nil } rr.Inception, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.Inception: %w", err) } if off == len(msg) { return off, nil } rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.SignerName, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.SignerName: %w", err) } if off == len(msg) { return off, nil } rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("RRSIG.Signature: %w", err) } return off, nil } @@ -2506,14 +2508,14 @@ func (rr *RT) unpack(msg []byte, off int) (off1 int, err error) { rr.Preference, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RT.Preference: %w", err) } if off == len(msg) { return off, nil } rr.Host, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("RT.Host: %w", err) } return off, nil } @@ -2524,63 +2526,63 @@ func (rr *SIG) unpack(msg []byte, off int) (off1 int, err error) { rr.TypeCovered, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.TypeCovered: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.Labels, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.Labels: %w", err) } if off == len(msg) { return off, nil } rr.OrigTtl, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.OrigTtl: %w", err) } if off == len(msg) { return off, nil } rr.Expiration, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.Expiration: %w", err) } if off == len(msg) { return off, nil } rr.Inception, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.Inception: %w", err) } if off == len(msg) { return off, nil } rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.SignerName, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SIG.SignerName: %w", err) } if off == len(msg) { return off, nil } rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("SIG.Signature: %w", err) } return off, nil } @@ -2591,28 +2593,28 @@ func (rr *SMIMEA) unpack(msg []byte, off int) (off1 int, err error) { rr.Usage, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SMIMEA.Usage: %w", err) } if off == len(msg) { return off, nil } rr.Selector, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SMIMEA.Selector: %w", err) } if off == len(msg) { return off, nil } rr.MatchingType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SMIMEA.MatchingType: %w", err) } if off == len(msg) { return off, nil } rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("SMIMEA.Certificate: %w", err) } return off, nil } @@ -2623,49 +2625,49 @@ func (rr *SOA) unpack(msg []byte, off int) (off1 int, err error) { rr.Ns, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Ns: %w", err) } if off == len(msg) { return off, nil } rr.Mbox, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Mbox: %w", err) } if off == len(msg) { return off, nil } rr.Serial, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Serial: %w", err) } if off == len(msg) { return off, nil } rr.Refresh, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Refresh: %w", err) } if off == len(msg) { return off, nil } rr.Retry, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Retry: %w", err) } if off == len(msg) { return off, nil } rr.Expire, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Expire: %w", err) } if off == len(msg) { return off, nil } rr.Minttl, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SOA.Minttl: %w", err) } return off, nil } @@ -2676,7 +2678,7 @@ func (rr *SPF) unpack(msg []byte, off int) (off1 int, err error) { rr.Txt, off, err = unpackStringTxt(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SPF.Txt: %w", err) } return off, nil } @@ -2687,28 +2689,28 @@ func (rr *SRV) unpack(msg []byte, off int) (off1 int, err error) { rr.Priority, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SRV.Priority: %w", err) } if off == len(msg) { return off, nil } rr.Weight, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SRV.Weight: %w", err) } if off == len(msg) { return off, nil } rr.Port, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SRV.Port: %w", err) } if off == len(msg) { return off, nil } rr.Target, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SRV.Target: %w", err) } return off, nil } @@ -2719,21 +2721,21 @@ func (rr *SSHFP) unpack(msg []byte, off int) (off1 int, err error) { rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SSHFP.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.Type, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SSHFP.Type: %w", err) } if off == len(msg) { return off, nil } rr.FingerPrint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("SSHFP.FingerPrint: %w", err) } return off, nil } @@ -2744,21 +2746,21 @@ func (rr *SVCB) unpack(msg []byte, off int) (off1 int, err error) { rr.Priority, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SVCB.Priority: %w", err) } if off == len(msg) { return off, nil } rr.Target, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SVCB.Target: %w", err) } if off == len(msg) { return off, nil } rr.Value, off, err = unpackDataSVCB(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("SVCB.Value: %w", err) } return off, nil } @@ -2769,28 +2771,28 @@ func (rr *TA) unpack(msg []byte, off int) (off1 int, err error) { rr.KeyTag, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TA.KeyTag: %w", err) } if off == len(msg) { return off, nil } rr.Algorithm, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TA.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.DigestType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TA.DigestType: %w", err) } if off == len(msg) { return off, nil } rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("TA.Digest: %w", err) } return off, nil } @@ -2801,14 +2803,14 @@ func (rr *TALINK) unpack(msg []byte, off int) (off1 int, err error) { rr.PreviousName, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TALINK.PreviousName: %w", err) } if off == len(msg) { return off, nil } rr.NextName, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TALINK.NextName: %w", err) } return off, nil } @@ -2819,42 +2821,42 @@ func (rr *TKEY) unpack(msg []byte, off int) (off1 int, err error) { rr.Algorithm, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.Inception, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.Inception: %w", err) } if off == len(msg) { return off, nil } rr.Expiration, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.Expiration: %w", err) } if off == len(msg) { return off, nil } rr.Mode, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.Mode: %w", err) } if off == len(msg) { return off, nil } rr.Error, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.Error: %w", err) } if off == len(msg) { return off, nil } rr.KeySize, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.KeySize: %w", err) } if off == len(msg) { return off, nil @@ -2865,7 +2867,7 @@ func (rr *TKEY) unpack(msg []byte, off int) (off1 int, err error) { } rr.OtherLen, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TKEY.OtherLen: %w", err) } if off == len(msg) { return off, nil @@ -2883,28 +2885,28 @@ func (rr *TLSA) unpack(msg []byte, off int) (off1 int, err error) { rr.Usage, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TLSA.Usage: %w", err) } if off == len(msg) { return off, nil } rr.Selector, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TLSA.Selector: %w", err) } if off == len(msg) { return off, nil } rr.MatchingType, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TLSA.MatchingType: %w", err) } if off == len(msg) { return off, nil } rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("TLSA.Certificate: %w", err) } return off, nil } @@ -2915,28 +2917,28 @@ func (rr *TSIG) unpack(msg []byte, off int) (off1 int, err error) { rr.Algorithm, off, err = UnpackDomainName(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.Algorithm: %w", err) } if off == len(msg) { return off, nil } rr.TimeSigned, off, err = unpackUint48(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.TimeSigned: %w", err) } if off == len(msg) { return off, nil } rr.Fudge, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.Fudge: %w", err) } if off == len(msg) { return off, nil } rr.MACSize, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.MACSize: %w", err) } if off == len(msg) { return off, nil @@ -2947,21 +2949,21 @@ func (rr *TSIG) unpack(msg []byte, off int) (off1 int, err error) { } rr.OrigId, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.OrigId: %w", err) } if off == len(msg) { return off, nil } rr.Error, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.Error: %w", err) } if off == len(msg) { return off, nil } rr.OtherLen, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TSIG.OtherLen: %w", err) } if off == len(msg) { return off, nil @@ -2979,7 +2981,7 @@ func (rr *TXT) unpack(msg []byte, off int) (off1 int, err error) { rr.Txt, off, err = unpackStringTxt(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("TXT.Txt: %w", err) } return off, nil } @@ -2990,7 +2992,7 @@ func (rr *UID) unpack(msg []byte, off int) (off1 int, err error) { rr.Uid, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("UID.Uid: %w", err) } return off, nil } @@ -3001,7 +3003,7 @@ func (rr *UINFO) unpack(msg []byte, off int) (off1 int, err error) { rr.Uinfo, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("UINFO.Uinfo: %w", err) } return off, nil } @@ -3012,21 +3014,21 @@ func (rr *URI) unpack(msg []byte, off int) (off1 int, err error) { rr.Priority, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("URI.Priority: %w", err) } if off == len(msg) { return off, nil } rr.Weight, off, err = unpackUint16(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("URI.Weight: %w", err) } if off == len(msg) { return off, nil } rr.Target, off, err = unpackStringOctet(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("URI.Target: %w", err) } return off, nil } @@ -3037,7 +3039,7 @@ func (rr *X25) unpack(msg []byte, off int) (off1 int, err error) { rr.PSDNAddress, off, err = unpackString(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("X25.PSDNAddress: %w", err) } return off, nil } @@ -3048,28 +3050,28 @@ func (rr *ZONEMD) unpack(msg []byte, off int) (off1 int, err error) { rr.Serial, off, err = unpackUint32(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("ZONEMD.Serial: %w", err) } if off == len(msg) { return off, nil } rr.Scheme, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("ZONEMD.Scheme: %w", err) } if off == len(msg) { return off, nil } rr.Hash, off, err = unpackUint8(msg, off) if err != nil { - return off, err + return off, fmt.Errorf("ZONEMD.Hash: %w", err) } if off == len(msg) { return off, nil } rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) if err != nil { - return off, err + return off, fmt.Errorf("ZONEMD.Digest: %w", err) } return off, nil } diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md deleted file mode 100644 index c758234904e..00000000000 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ /dev/null @@ -1,96 +0,0 @@ -## 1.5.0 - -* New option `IgnoreUntaggedFields` to ignore decoding to any fields - without `mapstructure` (or the configured tag name) set [GH-277] -* New option `ErrorUnset` which makes it an error if any fields - in a target struct are not set by the decoding process. [GH-225] -* New function `OrComposeDecodeHookFunc` to help compose decode hooks. [GH-240] -* Decoding to slice from array no longer crashes [GH-265] -* Decode nested struct pointers to map [GH-271] -* Fix issue where `,squash` was ignored if `Squash` option was set. [GH-280] -* Fix issue where fields with `,omitempty` would sometimes decode - into a map with an empty string key [GH-281] - -## 1.4.3 - -* Fix cases where `json.Number` didn't decode properly [GH-261] - -## 1.4.2 - -* Custom name matchers to support any sort of casing, formatting, etc. for - field names. [GH-250] -* Fix possible panic in ComposeDecodeHookFunc [GH-251] - -## 1.4.1 - -* Fix regression where `*time.Time` value would be set to empty and not be sent - to decode hooks properly [GH-232] - -## 1.4.0 - -* A new decode hook type `DecodeHookFuncValue` has been added that has - access to the full values. [GH-183] -* Squash is now supported with embedded fields that are struct pointers [GH-205] -* Empty strings will convert to 0 for all numeric types when weakly decoding [GH-206] - -## 1.3.3 - -* Decoding maps from maps creates a settable value for decode hooks [GH-203] - -## 1.3.2 - -* Decode into interface type with a struct value is supported [GH-187] - -## 1.3.1 - -* Squash should only squash embedded structs. [GH-194] - -## 1.3.0 - -* Added `",omitempty"` support. This will ignore zero values in the source - structure when encoding. [GH-145] - -## 1.2.3 - -* Fix duplicate entries in Keys list with pointer values. [GH-185] - -## 1.2.2 - -* Do not add unsettable (unexported) values to the unused metadata key - or "remain" value. [GH-150] - -## 1.2.1 - -* Go modules checksum mismatch fix - -## 1.2.0 - -* Added support to capture unused values in a field using the `",remain"` value - in the mapstructure tag. There is an example to showcase usage. -* Added `DecoderConfig` option to always squash embedded structs -* `json.Number` can decode into `uint` types -* Empty slices are preserved and not replaced with nil slices -* Fix panic that can occur in when decoding a map into a nil slice of structs -* Improved package documentation for godoc - -## 1.1.2 - -* Fix error when decode hook decodes interface implementation into interface - type. [GH-140] - -## 1.1.1 - -* Fix panic that can happen in `decodePtr` - -## 1.1.0 - -* Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] -* Support struct to struct decoding [GH-137] -* If source map value is nil, then destination map value is nil (instead of empty) -* If source slice value is nil, then destination slice value is nil (instead of empty) -* If source pointer is nil, then destination pointer is set to nil (instead of - allocated zero value of type) - -## 1.0.0 - -* Initial tagged stable release. diff --git a/vendor/github.com/mitchellh/mapstructure/LICENSE b/vendor/github.com/mitchellh/mapstructure/LICENSE deleted file mode 100644 index f9c841a51e0..00000000000 --- a/vendor/github.com/mitchellh/mapstructure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -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/mitchellh/mapstructure/README.md b/vendor/github.com/mitchellh/mapstructure/README.md deleted file mode 100644 index 0018dc7d9f9..00000000000 --- a/vendor/github.com/mitchellh/mapstructure/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# mapstructure [![Godoc](https://godoc.org/github.com/mitchellh/mapstructure?status.svg)](https://godoc.org/github.com/mitchellh/mapstructure) - -mapstructure is a Go library for decoding generic map values to structures -and vice versa, while providing helpful error handling. - -This library is most useful when decoding values from some data stream (JSON, -Gob, etc.) where you don't _quite_ know the structure of the underlying data -until you read a part of it. You can therefore read a `map[string]interface{}` -and use this library to decode it into the proper underlying native Go -structure. - -## Installation - -Standard `go get`: - -``` -$ go get github.com/mitchellh/mapstructure -``` - -## Usage & Example - -For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure). - -The `Decode` function has examples associated with it there. - -## But Why?! - -Go offers fantastic standard libraries for decoding formats such as JSON. -The standard method is to have a struct pre-created, and populate that struct -from the bytes of the encoded format. This is great, but the problem is if -you have configuration or an encoding that changes slightly depending on -specific fields. For example, consider this JSON: - -```json -{ - "type": "person", - "name": "Mitchell" -} -``` - -Perhaps we can't populate a specific structure without first reading -the "type" field from the JSON. We could always do two passes over the -decoding of the JSON (reading the "type" first, and the rest later). -However, it is much simpler to just decode this into a `map[string]interface{}` -structure, read the "type" key, then use something like this library -to decode it into the proper structure. diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go deleted file mode 100644 index 3a754ca7248..00000000000 --- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go +++ /dev/null @@ -1,279 +0,0 @@ -package mapstructure - -import ( - "encoding" - "errors" - "fmt" - "net" - "reflect" - "strconv" - "strings" - "time" -) - -// typedDecodeHook takes a raw DecodeHookFunc (an interface{}) and turns -// it into the proper DecodeHookFunc type, such as DecodeHookFuncType. -func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc { - // Create variables here so we can reference them with the reflect pkg - var f1 DecodeHookFuncType - var f2 DecodeHookFuncKind - var f3 DecodeHookFuncValue - - // Fill in the variables into this interface and the rest is done - // automatically using the reflect package. - potential := []interface{}{f1, f2, f3} - - v := reflect.ValueOf(h) - vt := v.Type() - for _, raw := range potential { - pt := reflect.ValueOf(raw).Type() - if vt.ConvertibleTo(pt) { - return v.Convert(pt).Interface() - } - } - - return nil -} - -// DecodeHookExec executes the given decode hook. This should be used -// since it'll naturally degrade to the older backwards compatible DecodeHookFunc -// that took reflect.Kind instead of reflect.Type. -func DecodeHookExec( - raw DecodeHookFunc, - from reflect.Value, to reflect.Value) (interface{}, error) { - - switch f := typedDecodeHook(raw).(type) { - case DecodeHookFuncType: - return f(from.Type(), to.Type(), from.Interface()) - case DecodeHookFuncKind: - return f(from.Kind(), to.Kind(), from.Interface()) - case DecodeHookFuncValue: - return f(from, to) - default: - return nil, errors.New("invalid decode hook signature") - } -} - -// ComposeDecodeHookFunc creates a single DecodeHookFunc that -// automatically composes multiple DecodeHookFuncs. -// -// The composed funcs are called in order, with the result of the -// previous transformation. -func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (interface{}, error) { - var err error - data := f.Interface() - - newFrom := f - for _, f1 := range fs { - data, err = DecodeHookExec(f1, newFrom, t) - if err != nil { - return nil, err - } - newFrom = reflect.ValueOf(data) - } - - return data, nil - } -} - -// OrComposeDecodeHookFunc executes all input hook functions until one of them returns no error. In that case its value is returned. -// If all hooks return an error, OrComposeDecodeHookFunc returns an error concatenating all error messages. -func OrComposeDecodeHookFunc(ff ...DecodeHookFunc) DecodeHookFunc { - return func(a, b reflect.Value) (interface{}, error) { - var allErrs string - var out interface{} - var err error - - for _, f := range ff { - out, err = DecodeHookExec(f, a, b) - if err != nil { - allErrs += err.Error() + "\n" - continue - } - - return out, nil - } - - return nil, errors.New(allErrs) - } -} - -// StringToSliceHookFunc returns a DecodeHookFunc that converts -// string to []string by splitting on the given sep. -func StringToSliceHookFunc(sep string) DecodeHookFunc { - return func( - f reflect.Kind, - t reflect.Kind, - data interface{}) (interface{}, error) { - if f != reflect.String || t != reflect.Slice { - return data, nil - } - - raw := data.(string) - if raw == "" { - return []string{}, nil - } - - return strings.Split(raw, sep), nil - } -} - -// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts -// strings to time.Duration. -func StringToTimeDurationHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Duration(5)) { - return data, nil - } - - // Convert it by parsing - return time.ParseDuration(data.(string)) - } -} - -// StringToIPHookFunc returns a DecodeHookFunc that converts -// strings to net.IP -func StringToIPHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IP{}) { - return data, nil - } - - // Convert it by parsing - ip := net.ParseIP(data.(string)) - if ip == nil { - return net.IP{}, fmt.Errorf("failed parsing ip %v", data) - } - - return ip, nil - } -} - -// StringToIPNetHookFunc returns a DecodeHookFunc that converts -// strings to net.IPNet -func StringToIPNetHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IPNet{}) { - return data, nil - } - - // Convert it by parsing - _, net, err := net.ParseCIDR(data.(string)) - return net, err - } -} - -// StringToTimeHookFunc returns a DecodeHookFunc that converts -// strings to time.Time. -func StringToTimeHookFunc(layout string) DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Time{}) { - return data, nil - } - - // Convert it by parsing - return time.Parse(layout, data.(string)) - } -} - -// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to -// the decoder. -// -// Note that this is significantly different from the WeaklyTypedInput option -// of the DecoderConfig. -func WeaklyTypedHook( - f reflect.Kind, - t reflect.Kind, - data interface{}) (interface{}, error) { - dataVal := reflect.ValueOf(data) - switch t { - case reflect.String: - switch f { - case reflect.Bool: - if dataVal.Bool() { - return "1", nil - } - return "0", nil - case reflect.Float32: - return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil - case reflect.Int: - return strconv.FormatInt(dataVal.Int(), 10), nil - case reflect.Slice: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - if elemKind == reflect.Uint8 { - return string(dataVal.Interface().([]uint8)), nil - } - case reflect.Uint: - return strconv.FormatUint(dataVal.Uint(), 10), nil - } - } - - return data, nil -} - -func RecursiveStructToMapHookFunc() DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (interface{}, error) { - if f.Kind() != reflect.Struct { - return f.Interface(), nil - } - - var i interface{} = struct{}{} - if t.Type() != reflect.TypeOf(&i).Elem() { - return f.Interface(), nil - } - - m := make(map[string]interface{}) - t.Set(reflect.ValueOf(m)) - - return f.Interface(), nil - } -} - -// TextUnmarshallerHookFunc returns a DecodeHookFunc that applies -// strings to the UnmarshalText function, when the target type -// implements the encoding.TextUnmarshaler interface -func TextUnmarshallerHookFunc() DecodeHookFuncType { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - result := reflect.New(t).Interface() - unmarshaller, ok := result.(encoding.TextUnmarshaler) - if !ok { - return data, nil - } - if err := unmarshaller.UnmarshalText([]byte(data.(string))); err != nil { - return nil, err - } - return result, nil - } -} diff --git a/vendor/github.com/mitchellh/mapstructure/error.go b/vendor/github.com/mitchellh/mapstructure/error.go deleted file mode 100644 index 47a99e5af3f..00000000000 --- a/vendor/github.com/mitchellh/mapstructure/error.go +++ /dev/null @@ -1,50 +0,0 @@ -package mapstructure - -import ( - "errors" - "fmt" - "sort" - "strings" -) - -// Error implements the error interface and can represents multiple -// errors that occur in the course of a single decode. -type Error struct { - Errors []string -} - -func (e *Error) Error() string { - points := make([]string, len(e.Errors)) - for i, err := range e.Errors { - points[i] = fmt.Sprintf("* %s", err) - } - - sort.Strings(points) - return fmt.Sprintf( - "%d error(s) decoding:\n\n%s", - len(e.Errors), strings.Join(points, "\n")) -} - -// WrappedErrors implements the errwrap.Wrapper interface to make this -// return value more useful with the errwrap and go-multierror libraries. -func (e *Error) WrappedErrors() []error { - if e == nil { - return nil - } - - result := make([]error, len(e.Errors)) - for i, e := range e.Errors { - result[i] = errors.New(e) - } - - return result -} - -func appendErrors(errors []string, err error) []string { - switch e := err.(type) { - case *Error: - return append(errors, e.Errors...) - default: - return append(errors, e.Error()) - } -} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go deleted file mode 100644 index 1efb22ac361..00000000000 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ /dev/null @@ -1,1540 +0,0 @@ -// Package mapstructure exposes functionality to convert one arbitrary -// Go type into another, typically to convert a map[string]interface{} -// into a native Go structure. -// -// The Go structure can be arbitrarily complex, containing slices, -// other structs, etc. and the decoder will properly decode nested -// maps and so on into the proper structures in the native Go struct. -// See the examples to see what the decoder is capable of. -// -// The simplest function to start with is Decode. -// -// Field Tags -// -// When decoding to a struct, mapstructure will use the field name by -// default to perform the mapping. For example, if a struct has a field -// "Username" then mapstructure will look for a key in the source value -// of "username" (case insensitive). -// -// type User struct { -// Username string -// } -// -// You can change the behavior of mapstructure by using struct tags. -// The default struct tag that mapstructure looks for is "mapstructure" -// but you can customize it using DecoderConfig. -// -// Renaming Fields -// -// To rename the key that mapstructure looks for, use the "mapstructure" -// tag and set a value directly. For example, to change the "username" example -// above to "user": -// -// type User struct { -// Username string `mapstructure:"user"` -// } -// -// Embedded Structs and Squashing -// -// Embedded structs are treated as if they're another field with that name. -// By default, the two structs below are equivalent when decoding with -// mapstructure: -// -// type Person struct { -// Name string -// } -// -// type Friend struct { -// Person -// } -// -// type Friend struct { -// Person Person -// } -// -// This would require an input that looks like below: -// -// map[string]interface{}{ -// "person": map[string]interface{}{"name": "alice"}, -// } -// -// If your "person" value is NOT nested, then you can append ",squash" to -// your tag value and mapstructure will treat it as if the embedded struct -// were part of the struct directly. Example: -// -// type Friend struct { -// Person `mapstructure:",squash"` -// } -// -// Now the following input would be accepted: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// When decoding from a struct to a map, the squash tag squashes the struct -// fields into a single map. Using the example structs from above: -// -// Friend{Person: Person{Name: "alice"}} -// -// Will be decoded into a map: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// DecoderConfig has a field that changes the behavior of mapstructure -// to always squash embedded structs. -// -// Remainder Values -// -// If there are any unmapped keys in the source value, mapstructure by -// default will silently ignore them. You can error by setting ErrorUnused -// in DecoderConfig. If you're using Metadata you can also maintain a slice -// of the unused keys. -// -// You can also use the ",remain" suffix on your tag to collect all unused -// values in a map. The field with this tag MUST be a map type and should -// probably be a "map[string]interface{}" or "map[interface{}]interface{}". -// See example below: -// -// type Friend struct { -// Name string -// Other map[string]interface{} `mapstructure:",remain"` -// } -// -// Given the input below, Other would be populated with the other -// values that weren't used (everything but "name"): -// -// map[string]interface{}{ -// "name": "bob", -// "address": "123 Maple St.", -// } -// -// Omit Empty Values -// -// When decoding from a struct to any other value, you may use the -// ",omitempty" suffix on your tag to omit that value if it equates to -// the zero value. The zero value of all types is specified in the Go -// specification. -// -// For example, the zero type of a numeric type is zero ("0"). If the struct -// field value is zero and a numeric type, the field is empty, and it won't -// be encoded into the destination type. -// -// type Source struct { -// Age int `mapstructure:",omitempty"` -// } -// -// Unexported fields -// -// Since unexported (private) struct fields cannot be set outside the package -// where they are defined, the decoder will simply skip them. -// -// For this output type definition: -// -// type Exported struct { -// private string // this unexported field will be skipped -// Public string -// } -// -// Using this map as input: -// -// map[string]interface{}{ -// "private": "I will be ignored", -// "Public": "I made it through!", -// } -// -// The following struct will be decoded: -// -// type Exported struct { -// private: "" // field is left with an empty string (zero value) -// Public: "I made it through!" -// } -// -// Other Configuration -// -// mapstructure is highly configurable. See the DecoderConfig struct -// for other features and options that are supported. -package mapstructure - -import ( - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" - "strconv" - "strings" -) - -// DecodeHookFunc is the callback function that can be used for -// data transformations. See "DecodeHook" in the DecoderConfig -// struct. -// -// The type must be one of DecodeHookFuncType, DecodeHookFuncKind, or -// DecodeHookFuncValue. -// Values are a superset of Types (Values can return types), and Types are a -// superset of Kinds (Types can return Kinds) and are generally a richer thing -// to use, but Kinds are simpler if you only need those. -// -// The reason DecodeHookFunc is multi-typed is for backwards compatibility: -// we started with Kinds and then realized Types were the better solution, -// but have a promise to not break backwards compat so we now support -// both. -type DecodeHookFunc interface{} - -// DecodeHookFuncType is a DecodeHookFunc which has complete information about -// the source and target types. -type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error) - -// DecodeHookFuncKind is a DecodeHookFunc which knows only the Kinds of the -// source and target types. -type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) - -// DecodeHookFuncValue is a DecodeHookFunc which has complete access to both the source and target -// values. -type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (interface{}, error) - -// DecoderConfig is the configuration that is used to create a new decoder -// and allows customization of various aspects of decoding. -type DecoderConfig struct { - // DecodeHook, if set, will be called before any decoding and any - // type conversion (if WeaklyTypedInput is on). This lets you modify - // the values before they're set down onto the resulting struct. The - // DecodeHook is called for every map and value in the input. This means - // that if a struct has embedded fields with squash tags the decode hook - // is called only once with all of the input data, not once for each - // embedded struct. - // - // If an error is returned, the entire decode will fail with that error. - DecodeHook DecodeHookFunc - - // If ErrorUnused is true, then it is an error for there to exist - // keys in the original map that were unused in the decoding process - // (extra keys). - ErrorUnused bool - - // If ErrorUnset is true, then it is an error for there to exist - // fields in the result that were not set in the decoding process - // (extra fields). This only applies to decoding to a struct. This - // will affect all nested structs as well. - ErrorUnset bool - - // ZeroFields, if set to true, will zero fields before writing them. - // For example, a map will be emptied before decoded values are put in - // it. If this is false, a map will be merged. - ZeroFields bool - - // If WeaklyTypedInput is true, the decoder will make the following - // "weak" conversions: - // - // - bools to string (true = "1", false = "0") - // - numbers to string (base 10) - // - bools to int/uint (true = 1, false = 0) - // - strings to int/uint (base implied by prefix) - // - int to bool (true if value != 0) - // - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F, - // FALSE, false, False. Anything else is an error) - // - empty array = empty map and vice versa - // - negative numbers to overflowed uint values (base 10) - // - slice of maps to a merged map - // - single values are converted to slices if required. Each - // element is weakly decoded. For example: "4" can become []int{4} - // if the target type is an int slice. - // - WeaklyTypedInput bool - - // Squash will squash embedded structs. A squash tag may also be - // added to an individual struct field using a tag. For example: - // - // type Parent struct { - // Child `mapstructure:",squash"` - // } - Squash bool - - // Metadata is the struct that will contain extra metadata about - // the decoding. If this is nil, then no metadata will be tracked. - Metadata *Metadata - - // Result is a pointer to the struct that will contain the decoded - // value. - Result interface{} - - // The tag name that mapstructure reads for field names. This - // defaults to "mapstructure" - TagName string - - // IgnoreUntaggedFields ignores all struct fields without explicit - // TagName, comparable to `mapstructure:"-"` as default behaviour. - IgnoreUntaggedFields bool - - // MatchName is the function used to match the map key to the struct - // field name or tag. Defaults to `strings.EqualFold`. This can be used - // to implement case-sensitive tag values, support snake casing, etc. - MatchName func(mapKey, fieldName string) bool -} - -// A Decoder takes a raw interface value and turns it into structured -// data, keeping track of rich error information along the way in case -// anything goes wrong. Unlike the basic top-level Decode method, you can -// more finely control how the Decoder behaves using the DecoderConfig -// structure. The top-level Decode method is just a convenience that sets -// up the most basic Decoder. -type Decoder struct { - config *DecoderConfig -} - -// Metadata contains information about decoding a structure that -// is tedious or difficult to get otherwise. -type Metadata struct { - // Keys are the keys of the structure which were successfully decoded - Keys []string - - // Unused is a slice of keys that were found in the raw value but - // weren't decoded since there was no matching field in the result interface - Unused []string - - // Unset is a slice of field names that were found in the result interface - // but weren't set in the decoding process since there was no matching value - // in the input - Unset []string -} - -// Decode takes an input structure and uses reflection to translate it to -// the output structure. output must be a pointer to a map or struct. -func Decode(input interface{}, output interface{}) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecode is the same as Decode but is shorthand to enable -// WeaklyTypedInput. See DecoderConfig for more info. -func WeakDecode(input, output interface{}) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// DecodeMetadata is the same as Decode, but is shorthand to -// enable metadata collection. See DecoderConfig for more info. -func DecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecodeMetadata is the same as Decode, but is shorthand to -// enable both WeaklyTypedInput and metadata collection. See -// DecoderConfig for more info. -func WeakDecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// NewDecoder returns a new decoder for the given configuration. Once -// a decoder has been returned, the same configuration must not be used -// again. -func NewDecoder(config *DecoderConfig) (*Decoder, error) { - val := reflect.ValueOf(config.Result) - if val.Kind() != reflect.Ptr { - return nil, errors.New("result must be a pointer") - } - - val = val.Elem() - if !val.CanAddr() { - return nil, errors.New("result must be addressable (a pointer)") - } - - if config.Metadata != nil { - if config.Metadata.Keys == nil { - config.Metadata.Keys = make([]string, 0) - } - - if config.Metadata.Unused == nil { - config.Metadata.Unused = make([]string, 0) - } - - if config.Metadata.Unset == nil { - config.Metadata.Unset = make([]string, 0) - } - } - - if config.TagName == "" { - config.TagName = "mapstructure" - } - - if config.MatchName == nil { - config.MatchName = strings.EqualFold - } - - result := &Decoder{ - config: config, - } - - return result, nil -} - -// Decode decodes the given raw interface to the target pointer specified -// by the configuration. -func (d *Decoder) Decode(input interface{}) error { - return d.decode("", input, reflect.ValueOf(d.config.Result).Elem()) -} - -// Decodes an unknown data type into a specific reflection value. -func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) error { - var inputVal reflect.Value - if input != nil { - inputVal = reflect.ValueOf(input) - - // We need to check here if input is a typed nil. Typed nils won't - // match the "input == nil" below so we check that here. - if inputVal.Kind() == reflect.Ptr && inputVal.IsNil() { - input = nil - } - } - - if input == nil { - // If the data is nil, then we don't set anything, unless ZeroFields is set - // to true. - if d.config.ZeroFields { - outVal.Set(reflect.Zero(outVal.Type())) - - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - } - return nil - } - - if !inputVal.IsValid() { - // If the input value is invalid, then we just set the value - // to be the zero value. - outVal.Set(reflect.Zero(outVal.Type())) - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - return nil - } - - if d.config.DecodeHook != nil { - // We have a DecodeHook, so let's pre-process the input. - var err error - input, err = DecodeHookExec(d.config.DecodeHook, inputVal, outVal) - if err != nil { - return fmt.Errorf("error decoding '%s': %s", name, err) - } - } - - var err error - outputKind := getKind(outVal) - addMetaKey := true - switch outputKind { - case reflect.Bool: - err = d.decodeBool(name, input, outVal) - case reflect.Interface: - err = d.decodeBasic(name, input, outVal) - case reflect.String: - err = d.decodeString(name, input, outVal) - case reflect.Int: - err = d.decodeInt(name, input, outVal) - case reflect.Uint: - err = d.decodeUint(name, input, outVal) - case reflect.Float32: - err = d.decodeFloat(name, input, outVal) - case reflect.Struct: - err = d.decodeStruct(name, input, outVal) - case reflect.Map: - err = d.decodeMap(name, input, outVal) - case reflect.Ptr: - addMetaKey, err = d.decodePtr(name, input, outVal) - case reflect.Slice: - err = d.decodeSlice(name, input, outVal) - case reflect.Array: - err = d.decodeArray(name, input, outVal) - case reflect.Func: - err = d.decodeFunc(name, input, outVal) - default: - // If we reached this point then we weren't able to decode it - return fmt.Errorf("%s: unsupported type: %s", name, outputKind) - } - - // If we reached here, then we successfully decoded SOMETHING, so - // mark the key as used if we're tracking metainput. - if addMetaKey && d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - - return err -} - -// This decodes a basic type (bool, int, string, etc.) and sets the -// value to "data" of that type. -func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error { - if val.IsValid() && val.Elem().IsValid() { - elem := val.Elem() - - // If we can't address this element, then its not writable. Instead, - // we make a copy of the value (which is a pointer and therefore - // writable), decode into that, and replace the whole value. - copied := false - if !elem.CanAddr() { - copied = true - - // Make *T - copy := reflect.New(elem.Type()) - - // *T = elem - copy.Elem().Set(elem) - - // Set elem so we decode into it - elem = copy - } - - // Decode. If we have an error then return. We also return right - // away if we're not a copy because that means we decoded directly. - if err := d.decode(name, data, elem); err != nil || !copied { - return err - } - - // If we're a copy, we need to set te final result - val.Set(elem.Elem()) - return nil - } - - dataVal := reflect.ValueOf(data) - - // If the input data is a pointer, and the assigned type is the dereference - // of that exact pointer, then indirect it so that we can assign it. - // Example: *string to string - if dataVal.Kind() == reflect.Ptr && dataVal.Type().Elem() == val.Type() { - dataVal = reflect.Indirect(dataVal) - } - - if !dataVal.IsValid() { - dataVal = reflect.Zero(val.Type()) - } - - dataValType := dataVal.Type() - if !dataValType.AssignableTo(val.Type()) { - return fmt.Errorf( - "'%s' expected type '%s', got '%s'", - name, val.Type(), dataValType) - } - - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - converted := true - switch { - case dataKind == reflect.String: - val.SetString(dataVal.String()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetString("1") - } else { - val.SetString("0") - } - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatInt(dataVal.Int(), 10)) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatUint(dataVal.Uint(), 10)) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64)) - case dataKind == reflect.Slice && d.config.WeaklyTypedInput, - dataKind == reflect.Array && d.config.WeaklyTypedInput: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - switch elemKind { - case reflect.Uint8: - var uints []uint8 - if dataKind == reflect.Array { - uints = make([]uint8, dataVal.Len(), dataVal.Len()) - for i := range uints { - uints[i] = dataVal.Index(i).Interface().(uint8) - } - } else { - uints = dataVal.Interface().([]uint8) - } - val.SetString(string(uints)) - default: - converted = false - } - default: - converted = false - } - - if !converted { - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetInt(dataVal.Int()) - case dataKind == reflect.Uint: - val.SetInt(int64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetInt(int64(dataVal.Float())) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetInt(1) - } else { - val.SetInt(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseInt(str, 0, val.Type().Bits()) - if err == nil { - val.SetInt(i) - } else { - return fmt.Errorf("cannot parse '%s' as int: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Int64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetInt(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - i := dataVal.Int() - if i < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %d overflows uint", - name, i) - } - val.SetUint(uint64(i)) - case dataKind == reflect.Uint: - val.SetUint(dataVal.Uint()) - case dataKind == reflect.Float32: - f := dataVal.Float() - if f < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %f overflows uint", - name, f) - } - val.SetUint(uint64(f)) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetUint(1) - } else { - val.SetUint(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseUint(str, 0, val.Type().Bits()) - if err == nil { - val.SetUint(i) - } else { - return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := strconv.ParseUint(string(jn), 0, 64) - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetUint(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - switch { - case dataKind == reflect.Bool: - val.SetBool(dataVal.Bool()) - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Int() != 0) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Uint() != 0) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Float() != 0) - case dataKind == reflect.String && d.config.WeaklyTypedInput: - b, err := strconv.ParseBool(dataVal.String()) - if err == nil { - val.SetBool(b) - } else if dataVal.String() == "" { - val.SetBool(false) - } else { - return fmt.Errorf("cannot parse '%s' as bool: %s", name, err) - } - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetFloat(float64(dataVal.Int())) - case dataKind == reflect.Uint: - val.SetFloat(float64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetFloat(dataVal.Float()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetFloat(1) - } else { - val.SetFloat(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - f, err := strconv.ParseFloat(str, val.Type().Bits()) - if err == nil { - val.SetFloat(f) - } else { - return fmt.Errorf("cannot parse '%s' as float: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Float64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetFloat(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeMap(name string, data interface{}, val reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // By default we overwrite keys in the current map - valMap := val - - // If the map is nil or we're purposely zeroing fields, make a new map - if valMap.IsNil() || d.config.ZeroFields { - // Make a new map to hold our result - mapType := reflect.MapOf(valKeyType, valElemType) - valMap = reflect.MakeMap(mapType) - } - - // Check input type and based on the input type jump to the proper func - dataVal := reflect.Indirect(reflect.ValueOf(data)) - switch dataVal.Kind() { - case reflect.Map: - return d.decodeMapFromMap(name, dataVal, val, valMap) - - case reflect.Struct: - return d.decodeMapFromStruct(name, dataVal, val, valMap) - - case reflect.Array, reflect.Slice: - if d.config.WeaklyTypedInput { - return d.decodeMapFromSlice(name, dataVal, val, valMap) - } - - fallthrough - - default: - return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind()) - } -} - -func (d *Decoder) decodeMapFromSlice(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - // Special case for BC reasons (covered by tests) - if dataVal.Len() == 0 { - val.Set(valMap) - return nil - } - - for i := 0; i < dataVal.Len(); i++ { - err := d.decode( - name+"["+strconv.Itoa(i)+"]", - dataVal.Index(i).Interface(), val) - if err != nil { - return err - } - } - - return nil -} - -func (d *Decoder) decodeMapFromMap(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // Accumulate errors - errors := make([]string, 0) - - // If the input data is empty, then we just match what the input data is. - if dataVal.Len() == 0 { - if dataVal.IsNil() { - if !val.IsNil() { - val.Set(dataVal) - } - } else { - // Set to empty allocated value - val.Set(valMap) - } - - return nil - } - - for _, k := range dataVal.MapKeys() { - fieldName := name + "[" + k.String() + "]" - - // First decode the key into the proper type - currentKey := reflect.Indirect(reflect.New(valKeyType)) - if err := d.decode(fieldName, k.Interface(), currentKey); err != nil { - errors = appendErrors(errors, err) - continue - } - - // Next decode the data into the proper type - v := dataVal.MapIndex(k).Interface() - currentVal := reflect.Indirect(reflect.New(valElemType)) - if err := d.decode(fieldName, v, currentVal); err != nil { - errors = appendErrors(errors, err) - continue - } - - valMap.SetMapIndex(currentKey, currentVal) - } - - // Set the built up map to the value - val.Set(valMap) - - // If we had errors, return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - typ := dataVal.Type() - for i := 0; i < typ.NumField(); i++ { - // Get the StructField first since this is a cheap operation. If the - // field is unexported, then ignore it. - f := typ.Field(i) - if f.PkgPath != "" { - continue - } - - // Next get the actual value of this field and verify it is assignable - // to the map value. - v := dataVal.Field(i) - if !v.Type().AssignableTo(valMap.Type().Elem()) { - return fmt.Errorf("cannot assign type '%s' to map value field of type '%s'", v.Type(), valMap.Type().Elem()) - } - - tagValue := f.Tag.Get(d.config.TagName) - keyName := f.Name - - if tagValue == "" && d.config.IgnoreUntaggedFields { - continue - } - - // If Squash is set in the config, we squash the field down. - squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous - - v = dereferencePtrToStructIfNeeded(v, d.config.TagName) - - // Determine the name of the key in the map - if index := strings.Index(tagValue, ","); index != -1 { - if tagValue[:index] == "-" { - continue - } - // If "omitempty" is specified in the tag, it ignores empty values. - if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { - continue - } - - // If "squash" is specified in the tag, we squash the field down. - squash = squash || strings.Index(tagValue[index+1:], "squash") != -1 - if squash { - // When squashing, the embedded type can be a pointer to a struct. - if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct { - v = v.Elem() - } - - // The final type must be a struct - if v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) - } - } - if keyNameTagValue := tagValue[:index]; keyNameTagValue != "" { - keyName = keyNameTagValue - } - } else if len(tagValue) > 0 { - if tagValue == "-" { - continue - } - keyName = tagValue - } - - switch v.Kind() { - // this is an embedded struct, so handle it differently - case reflect.Struct: - x := reflect.New(v.Type()) - x.Elem().Set(v) - - vType := valMap.Type() - vKeyType := vType.Key() - vElemType := vType.Elem() - mType := reflect.MapOf(vKeyType, vElemType) - vMap := reflect.MakeMap(mType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(vMap.Type()) - reflect.Indirect(addrVal).Set(vMap) - - err := d.decode(keyName, x.Interface(), reflect.Indirect(addrVal)) - if err != nil { - return err - } - - // the underlying map may have been completely overwritten so pull - // it indirectly out of the enclosing value. - vMap = reflect.Indirect(addrVal) - - if squash { - for _, k := range vMap.MapKeys() { - valMap.SetMapIndex(k, vMap.MapIndex(k)) - } - } else { - valMap.SetMapIndex(reflect.ValueOf(keyName), vMap) - } - - default: - valMap.SetMapIndex(reflect.ValueOf(keyName), v) - } - } - - if val.CanAddr() { - val.Set(valMap) - } - - return nil -} - -func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) (bool, error) { - // If the input data is nil, then we want to just set the output - // pointer to be nil as well. - isNil := data == nil - if !isNil { - switch v := reflect.Indirect(reflect.ValueOf(data)); v.Kind() { - case reflect.Chan, - reflect.Func, - reflect.Interface, - reflect.Map, - reflect.Ptr, - reflect.Slice: - isNil = v.IsNil() - } - } - if isNil { - if !val.IsNil() && val.CanSet() { - nilValue := reflect.New(val.Type()).Elem() - val.Set(nilValue) - } - - return true, nil - } - - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - valType := val.Type() - valElemType := valType.Elem() - if val.CanSet() { - realVal := val - if realVal.IsNil() || d.config.ZeroFields { - realVal = reflect.New(valElemType) - } - - if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil { - return false, err - } - - val.Set(realVal) - } else { - if err := d.decode(name, data, reflect.Indirect(val)); err != nil { - return false, err - } - } - return false, nil -} - -func (d *Decoder) decodeFunc(name string, data interface{}, val reflect.Value) error { - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - dataVal := reflect.Indirect(reflect.ValueOf(data)) - if val.Type() != dataVal.Type() { - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - sliceType := reflect.SliceOf(valElemType) - - // If we have a non array/slice type then we first attempt to convert. - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Slice and array we use the normal logic - case dataValKind == reflect.Slice, dataValKind == reflect.Array: - break - - // Empty maps turn into empty slices - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.MakeSlice(sliceType, 0, 0)) - return nil - } - // Create slice of maps of other sizes - return d.decodeSlice(name, []interface{}{data}, val) - - case dataValKind == reflect.String && valElemType.Kind() == reflect.Uint8: - return d.decodeSlice(name, []byte(dataVal.String()), val) - - // All other types we try to convert to the slice type - // and "lift" it into it. i.e. a string becomes a string slice. - default: - // Just re-try this function with data as a slice. - return d.decodeSlice(name, []interface{}{data}, val) - } - } - - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - } - - // If the input value is nil, then don't allocate since empty != nil - if dataValKind != reflect.Array && dataVal.IsNil() { - return nil - } - - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { - // Make a new slice to hold our result, same size as the original data. - valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) - } - - // Accumulate any errors - errors := make([]string, 0) - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - for valSlice.Len() <= i { - valSlice = reflect.Append(valSlice, reflect.Zero(valElemType)) - } - currentField := valSlice.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errors = appendErrors(errors, err) - } - } - - // Finally, set the value to the slice we built up - val.Set(valSlice) - - // If there were errors, we return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeArray(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - arrayType := reflect.ArrayOf(valType.Len(), valElemType) - - valArray := val - - if valArray.Interface() == reflect.Zero(valArray.Type()).Interface() || d.config.ZeroFields { - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Empty maps turn into empty arrays - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.Zero(arrayType)) - return nil - } - - // All other types we try to convert to the array type - // and "lift" it into it. i.e. a string becomes a string array. - default: - // Just re-try this function with data as a slice. - return d.decodeArray(name, []interface{}{data}, val) - } - } - - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - - } - if dataVal.Len() > arrayType.Len() { - return fmt.Errorf( - "'%s': expected source data to have length less or equal to %d, got %d", name, arrayType.Len(), dataVal.Len()) - - } - - // Make a new array to hold our result, same size as the original data. - valArray = reflect.New(arrayType).Elem() - } - - // Accumulate any errors - errors := make([]string, 0) - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - currentField := valArray.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errors = appendErrors(errors, err) - } - } - - // Finally, set the value to the array we built up - val.Set(valArray) - - // If there were errors, we return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeStruct(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - - // If the type of the value to write to and the data match directly, - // then we just set it directly instead of recursing into the structure. - if dataVal.Type() == val.Type() { - val.Set(dataVal) - return nil - } - - dataValKind := dataVal.Kind() - switch dataValKind { - case reflect.Map: - return d.decodeStructFromMap(name, dataVal, val) - - case reflect.Struct: - // Not the most efficient way to do this but we can optimize later if - // we want to. To convert from struct to struct we go to map first - // as an intermediary. - - // Make a new map to hold our result - mapType := reflect.TypeOf((map[string]interface{})(nil)) - mval := reflect.MakeMap(mapType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(mval.Type()) - - reflect.Indirect(addrVal).Set(mval) - if err := d.decodeMapFromStruct(name, dataVal, reflect.Indirect(addrVal), mval); err != nil { - return err - } - - result := d.decodeStructFromMap(name, reflect.Indirect(addrVal), val) - return result - - default: - return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind()) - } -} - -func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) error { - dataValType := dataVal.Type() - if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface { - return fmt.Errorf( - "'%s' needs a map with string keys, has '%s' keys", - name, dataValType.Key().Kind()) - } - - dataValKeys := make(map[reflect.Value]struct{}) - dataValKeysUnused := make(map[interface{}]struct{}) - for _, dataValKey := range dataVal.MapKeys() { - dataValKeys[dataValKey] = struct{}{} - dataValKeysUnused[dataValKey.Interface()] = struct{}{} - } - - targetValKeysUnused := make(map[interface{}]struct{}) - errors := make([]string, 0) - - // This slice will keep track of all the structs we'll be decoding. - // There can be more than one struct if there are embedded structs - // that are squashed. - structs := make([]reflect.Value, 1, 5) - structs[0] = val - - // Compile the list of all the fields that we're going to be decoding - // from all the structs. - type field struct { - field reflect.StructField - val reflect.Value - } - - // remainField is set to a valid field set with the "remain" tag if - // we are keeping track of remaining values. - var remainField *field - - fields := []field{} - for len(structs) > 0 { - structVal := structs[0] - structs = structs[1:] - - structType := structVal.Type() - - for i := 0; i < structType.NumField(); i++ { - fieldType := structType.Field(i) - fieldVal := structVal.Field(i) - if fieldVal.Kind() == reflect.Ptr && fieldVal.Elem().Kind() == reflect.Struct { - // Handle embedded struct pointers as embedded structs. - fieldVal = fieldVal.Elem() - } - - // If "squash" is specified in the tag, we squash the field down. - squash := d.config.Squash && fieldVal.Kind() == reflect.Struct && fieldType.Anonymous - remain := false - - // We always parse the tags cause we're looking for other tags too - tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break - } - - if tag == "remain" { - remain = true - break - } - } - - if squash { - if fieldVal.Kind() != reflect.Struct { - errors = appendErrors(errors, - fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldVal.Kind())) - } else { - structs = append(structs, fieldVal) - } - continue - } - - // Build our field - if remain { - remainField = &field{fieldType, fieldVal} - } else { - // Normal struct field, store it away - fields = append(fields, field{fieldType, fieldVal}) - } - } - } - - // for fieldType, field := range fields { - for _, f := range fields { - field, fieldValue := f.field, f.val - fieldName := field.Name - - tagValue := field.Tag.Get(d.config.TagName) - tagValue = strings.SplitN(tagValue, ",", 2)[0] - if tagValue != "" { - fieldName = tagValue - } - - rawMapKey := reflect.ValueOf(fieldName) - rawMapVal := dataVal.MapIndex(rawMapKey) - if !rawMapVal.IsValid() { - // Do a slower search by iterating over each key and - // doing case-insensitive search. - for dataValKey := range dataValKeys { - mK, ok := dataValKey.Interface().(string) - if !ok { - // Not a string key - continue - } - - if d.config.MatchName(mK, fieldName) { - rawMapKey = dataValKey - rawMapVal = dataVal.MapIndex(dataValKey) - break - } - } - - if !rawMapVal.IsValid() { - // There was no matching key in the map for the value in - // the struct. Remember it for potential errors and metadata. - targetValKeysUnused[fieldName] = struct{}{} - continue - } - } - - if !fieldValue.IsValid() { - // This should never happen - panic("field is not valid") - } - - // If we can't set the field, then it is unexported or something, - // and we just continue onwards. - if !fieldValue.CanSet() { - continue - } - - // Delete the key we're using from the unused map so we stop tracking - delete(dataValKeysUnused, rawMapKey.Interface()) - - // If the name is empty string, then we're at the root, and we - // don't dot-join the fields. - if name != "" { - fieldName = name + "." + fieldName - } - - if err := d.decode(fieldName, rawMapVal.Interface(), fieldValue); err != nil { - errors = appendErrors(errors, err) - } - } - - // If we have a "remain"-tagged field and we have unused keys then - // we put the unused keys directly into the remain field. - if remainField != nil && len(dataValKeysUnused) > 0 { - // Build a map of only the unused values - remain := map[interface{}]interface{}{} - for key := range dataValKeysUnused { - remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() - } - - // Decode it as-if we were just decoding this map onto our map. - if err := d.decodeMap(name, remain, remainField.val); err != nil { - errors = appendErrors(errors, err) - } - - // Set the map to nil so we have none so that the next check will - // not error (ErrorUnused) - dataValKeysUnused = nil - } - - if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { - keys := make([]string, 0, len(dataValKeysUnused)) - for rawKey := range dataValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - err := fmt.Errorf("'%s' has invalid keys: %s", name, strings.Join(keys, ", ")) - errors = appendErrors(errors, err) - } - - if d.config.ErrorUnset && len(targetValKeysUnused) > 0 { - keys := make([]string, 0, len(targetValKeysUnused)) - for rawKey := range targetValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - err := fmt.Errorf("'%s' has unset fields: %s", name, strings.Join(keys, ", ")) - errors = appendErrors(errors, err) - } - - if len(errors) > 0 { - return &Error{errors} - } - - // Add the unused keys to the list of unused keys if we're tracking metadata - if d.config.Metadata != nil { - for rawKey := range dataValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unused = append(d.config.Metadata.Unused, key) - } - for rawKey := range targetValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unset = append(d.config.Metadata.Unset, key) - } - } - - return nil -} - -func isEmptyValue(v reflect.Value) bool { - switch getKind(v) { - 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.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func getKind(val reflect.Value) reflect.Kind { - kind := val.Kind() - - switch { - case kind >= reflect.Int && kind <= reflect.Int64: - return reflect.Int - case kind >= reflect.Uint && kind <= reflect.Uint64: - return reflect.Uint - case kind >= reflect.Float32 && kind <= reflect.Float64: - return reflect.Float32 - default: - return kind - } -} - -func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, tagName string) bool { - for i := 0; i < typ.NumField(); i++ { - f := typ.Field(i) - if f.PkgPath == "" && !checkMapstructureTags { // check for unexported fields - return true - } - if checkMapstructureTags && f.Tag.Get(tagName) != "" { // check for mapstructure tags inside - return true - } - } - return false -} - -func dereferencePtrToStructIfNeeded(v reflect.Value, tagName string) reflect.Value { - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { - return v - } - deref := v.Elem() - derefT := deref.Type() - if isStructTypeConvertibleToMap(derefT, true, tagName) { - return deref - } - return v -} diff --git a/vendor/github.com/modern-go/reflect2/safe_type.go b/vendor/github.com/modern-go/reflect2/safe_type.go index ee4e7bb6edf..5646309e09c 100644 --- a/vendor/github.com/modern-go/reflect2/safe_type.go +++ b/vendor/github.com/modern-go/reflect2/safe_type.go @@ -6,10 +6,12 @@ import ( ) type safeType struct { - reflect.Type - cfg *frozenConfig + Type reflect.Type + cfg *frozenConfig } +var _ Type = &safeType{} + func (type2 *safeType) New() interface{} { return reflect.New(type2.Type).Interface() } @@ -18,6 +20,22 @@ func (type2 *safeType) UnsafeNew() unsafe.Pointer { panic("does not support unsafe operation") } +func (type2 *safeType) Kind() reflect.Kind { + return type2.Type.Kind() +} + +func (type2 *safeType) Len() int { + return type2.Type.Len() +} + +func (type2 *safeType) NumField() int { + return type2.Type.NumField() +} + +func (type2 *safeType) String() string { + return type2.Type.String() +} + func (type2 *safeType) Elem() Type { return type2.cfg.Type2(type2.Type.Elem()) } diff --git a/vendor/github.com/parquet-go/parquet-go/column.go b/vendor/github.com/parquet-go/parquet-go/column.go index 68d8807112f..fb819cebc34 100644 --- a/vendor/github.com/parquet-go/parquet-go/column.go +++ b/vendor/github.com/parquet-go/parquet-go/column.go @@ -452,6 +452,10 @@ func schemaElementTypeOf(s *format.SchemaElement) Type { return (*bsonType)(lt.Bson) case lt.UUID != nil: return (*uuidType)(lt.UUID) + case lt.Geometry != nil: + return (*geometryType)(lt.Geometry) + case lt.Geography != nil: + return (*geographyType)(lt.Geography) } } diff --git a/vendor/github.com/parquet-go/parquet-go/column_buffer_geometry.go b/vendor/github.com/parquet-go/parquet-go/column_buffer_geometry.go new file mode 100644 index 00000000000..50d83cd00b9 --- /dev/null +++ b/vendor/github.com/parquet-go/parquet-go/column_buffer_geometry.go @@ -0,0 +1,33 @@ +package parquet + +import ( + "fmt" + + "github.com/twpayne/go-geom" + "github.com/twpayne/go-geom/encoding/wkb" +) + +func writeGeometry(col ColumnBuffer, levels columnLevels, value geom.T, node Node) { + if value == nil { + col.writeNull(levels) + return + } + + if logicalType := node.Type().LogicalType(); logicalType != nil { + switch { + case logicalType.Geometry != nil: + case logicalType.Geography != nil: + // valid + default: + panic("invalid logical type for value of type geom.T, must be Geometry or Geography") + } + } else { + panic("missing logical type for value of type geom.T, must be Geometry or Geography") + } + + data, err := wkb.Marshal(value, wkb.NDR) + if err != nil { + panic(fmt.Errorf("failed to marshal geometry to WKB: %v", err)) + } + col.writeByteArray(levels, data) +} diff --git a/vendor/github.com/parquet-go/parquet-go/column_buffer_reflect.go b/vendor/github.com/parquet-go/parquet-go/column_buffer_reflect.go index 14c38ab412c..cfc630fd235 100644 --- a/vendor/github.com/parquet-go/parquet-go/column_buffer_reflect.go +++ b/vendor/github.com/parquet-go/parquet-go/column_buffer_reflect.go @@ -18,6 +18,7 @@ import ( "github.com/parquet-go/parquet-go/deprecated" "github.com/parquet-go/parquet-go/internal/memory" "github.com/parquet-go/parquet-go/sparse" + "github.com/twpayne/go-geom" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/known/anypb" @@ -752,6 +753,8 @@ func writeValueFuncOfLeaf(columnIndex int16, node Node) (int16, writeValueFunc) writeProtoList(col, levels, msg, node) case *anypb.Any: writeProtoAny(col, levels, msg, node) + case geom.T: + writeGeometry(col, levels, msg, node) default: value = value.Elem() goto writeValue diff --git a/vendor/github.com/parquet-go/parquet-go/convert.go b/vendor/github.com/parquet-go/parquet-go/convert.go index e1084fc0c68..8cbab51d255 100644 --- a/vendor/github.com/parquet-go/parquet-go/convert.go +++ b/vendor/github.com/parquet-go/parquet-go/convert.go @@ -334,6 +334,23 @@ func Convert(to, from Node) (conv Conversion, err error) { sourceMapping, sourceColumns := columnMappingOf(from) columns := make([]conversionColumn, len(targetColumns)) + targetFieldCache := make(map[Node]map[string]Field) + sourceFieldCache := make(map[Node]map[string]Field) + + // Helper function to get or build field map for a node + getFieldMap := func(cache map[Node]map[string]Field, node Node) map[string]Field { + if fieldMap, ok := cache[node]; ok { + return fieldMap + } + fields := node.Fields() + fieldMap := make(map[string]Field, len(fields)) + for _, f := range fields { + fieldMap[f.Name()] = f + } + cache[node] = fieldMap + return fieldMap + } + for i, path := range targetColumns { targetColumn := targetMapping.lookup(path) sourceColumn := sourceMapping.lookup(path) @@ -359,8 +376,8 @@ func Convert(to, from Node) (conv Conversion, err error) { sourceNode := from for j := range path { - targetNode = fieldByName(targetNode, path[j]) - sourceNode = fieldByName(sourceNode, path[j]) + targetNode = getFieldMap(targetFieldCache, targetNode)[path[j]] + sourceNode = getFieldMap(sourceFieldCache, sourceNode)[path[j]] targetRepetitionLevel, targetDefinitionLevel = applyFieldRepetitionType( fieldRepetitionTypeOf(targetNode), @@ -553,8 +570,11 @@ func ConvertRowGroup(rowGroup RowGroup, conv Conversion) RowGroup { isMissing := sourceColumn.node == nil if isMissing { - // Find adjacent column for mirroring levels - adjacentChunk := findAdjacentColumnChunk(schema, i, columns, sourceMapping) + var adjacentChunk ColumnChunk + if leaf.maxRepetitionLevel > 0 { + // Find adjacent column for mirroring levels + adjacentChunk = findAdjacentColumnChunk(schema, i, columns, sourceMapping) + } columns[i] = &missingColumnChunk{ typ: leaf.node.Type(), diff --git a/vendor/github.com/parquet-go/parquet-go/encoding/thrift/compact.go b/vendor/github.com/parquet-go/parquet-go/encoding/thrift/compact.go index 65d98c2b386..1fb22be24e0 100644 --- a/vendor/github.com/parquet-go/parquet-go/encoding/thrift/compact.go +++ b/vendor/github.com/parquet-go/parquet-go/encoding/thrift/compact.go @@ -64,7 +64,11 @@ func (r *compactReader) ReadInt64() (int64, error) { } func (r *compactReader) ReadFloat64() (float64, error) { - return r.binary.ReadFloat64() + b, err := r.binary.read(8) + if len(b) < 8 { + return 0, err + } + return math.Float64frombits(binary.LittleEndian.Uint64(b)), nil } func (r *compactReader) ReadBytes() ([]byte, error) { @@ -263,7 +267,8 @@ func (w *compactWriter) WriteInt64(v int64) error { } func (w *compactWriter) WriteFloat64(v float64) error { - return w.binary.WriteFloat64(v) + binary.LittleEndian.PutUint64(w.binary.b[:8], math.Float64bits(v)) + return w.binary.write(w.binary.b[:8]) } func (w *compactWriter) WriteBytes(v []byte) error { diff --git a/vendor/github.com/parquet-go/parquet-go/format/parquet.go b/vendor/github.com/parquet-go/parquet-go/format/parquet.go index 8731364ec11..90c135eca66 100644 --- a/vendor/github.com/parquet-go/parquet-go/format/parquet.go +++ b/vendor/github.com/parquet-go/parquet-go/format/parquet.go @@ -2,6 +2,7 @@ package format import ( "fmt" + "strings" "github.com/parquet-go/parquet-go/deprecated" ) @@ -300,23 +301,54 @@ const ( Karney EdgeInterpolationAlgorithm = 4 ) +const ( + SphericalName = "SPHERICAL" + VincentyName = "VINCENTY" + ThomasName = "THOMAS" + AndoyerName = "ANDOYER" + KarneyName = "KARNEY" +) + func (e EdgeInterpolationAlgorithm) String() string { switch e { case Spherical: - return "SPHERICAL" + return SphericalName case Vincenty: - return "VINCENTY" + return VincentyName case Thomas: - return "THOMAS" + return ThomasName case Andoyer: - return "ANDOYER" + return AndoyerName case Karney: - return "KARNEY" + return KarneyName default: return "EdgeInterpolationAlgorithm(?)" } } +func (e *EdgeInterpolationAlgorithm) FromString(s string) error { + switch strings.ToUpper(s) { + case SphericalName: + *e = Spherical + case VincentyName: + *e = Vincenty + case ThomasName: + *e = Thomas + case AndoyerName: + *e = Andoyer + case KarneyName: + *e = Karney + default: + return fmt.Errorf("invalid EdgeInterpolationAlgorithm: %q", s) + } + return nil +} + +const ( + defaultCRS = "OGC:CRS84" + GeometryDefaultCRS = defaultCRS +) + // Embedded Geometry logical type annotation // // Geospatial features in the Well-Known Binary (WKB) format and edges interpolation @@ -336,11 +368,13 @@ type GeometryType struct { func (t *GeometryType) String() string { crs := t.CRS if crs == "" { - crs = "OGC:CRS84" + crs = GeometryDefaultCRS } return fmt.Sprintf("GEOMETRY(%q)", crs) } +const GeographyDefaultCRS = defaultCRS + // Embedded Geography logical type annotation // // Geospatial features in the WKB format with an explicit (non-linear/non-planar) @@ -364,7 +398,7 @@ type GeographyType struct { func (t *GeographyType) String() string { crs := t.CRS if crs == "" { - crs = "OGC:CRS84" + crs = GeographyDefaultCRS } return fmt.Sprintf("GEOGRAPHY(%q, %s)", crs, t.Algorithm) } diff --git a/vendor/github.com/parquet-go/parquet-go/go.tools.mod b/vendor/github.com/parquet-go/parquet-go/go.tools.mod index 77c0913dd45..b4bf5c3fd0f 100644 --- a/vendor/github.com/parquet-go/parquet-go/go.tools.mod +++ b/vendor/github.com/parquet-go/parquet-go/go.tools.mod @@ -12,6 +12,7 @@ require ( github.com/parquet-go/bitpack v0.0.0-20251026130316-7709569977d0 github.com/parquet-go/jsonlite v0.1.0 github.com/pierrec/lz4/v4 v4.1.22 + github.com/twpayne/go-geom v1.6.1 golang.org/x/sys v0.37.0 google.golang.org/protobuf v1.36.5 ) diff --git a/vendor/github.com/parquet-go/parquet-go/go.tools.sum b/vendor/github.com/parquet-go/parquet-go/go.tools.sum index 008d66299a8..58a4cf2dfc7 100644 --- a/vendor/github.com/parquet-go/parquet-go/go.tools.sum +++ b/vendor/github.com/parquet-go/parquet-go/go.tools.sum @@ -1,3 +1,9 @@ +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY= +github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -14,6 +20,8 @@ github.com/parquet-go/jsonlite v0.1.0 h1:hVHIMaDBeKkruXcrP0K90vu528z7+tCCYpKWUrR github.com/parquet-go/jsonlite v0.1.0/go.mod h1:SPIV4YIXv+4eKxONWRe4mVJCw/D/7v0SJju8wCyDnOc= github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/twpayne/go-geom v1.6.1 h1:iLE+Opv0Ihm/ABIcvQFGIiFBXd76oBIar9drAwHFhR4= +github.com/twpayne/go-geom v1.6.1/go.mod h1:Kr+Nly6BswFsKM5sd31YaoWS5PeDDH2NftJTK7Gd028= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= diff --git a/vendor/github.com/parquet-go/parquet-go/merge.go b/vendor/github.com/parquet-go/parquet-go/merge.go index 0c37f1c6995..fc7b7cd20ff 100644 --- a/vendor/github.com/parquet-go/parquet-go/merge.go +++ b/vendor/github.com/parquet-go/parquet-go/merge.go @@ -743,6 +743,8 @@ func mergeTwoNodes(a, b Node) Node { merged = &listNode{group} case logicalType.Map != nil: merged = &mapNode{group} + case logicalType.Variant != nil: + merged = &variantNode{group} } } } diff --git a/vendor/github.com/parquet-go/parquet-go/reader.go b/vendor/github.com/parquet-go/parquet-go/reader.go index fd4dc31b40f..a5672667572 100644 --- a/vendor/github.com/parquet-go/parquet-go/reader.go +++ b/vendor/github.com/parquet-go/parquet-go/reader.go @@ -655,6 +655,12 @@ func makeLeafColumns(root *Column) []*Column { func makeFileRowGroups(file *File, columns []*Column) []FileRowGroup { rowGroups := file.metadata.RowGroups + + err := validateRowGroupOrdinals(rowGroups) + if err != nil { + return nil + } + fileRowGroups := make([]FileRowGroup, len(rowGroups)) for i := range fileRowGroups { fileRowGroups[i].init(file, columns, &rowGroups[i]) @@ -669,3 +675,29 @@ func makeRowGroups(fileRowGroups []FileRowGroup) []RowGroup { } return rowGroups } + +func validateRowGroupOrdinals(rowGroups []format.RowGroup) error { + allZero := true + seen := make(map[int16]struct{}) + for _, rg := range rowGroups { + if rg.Ordinal != 0 { + allZero = false + } + // If we've seen this non-zero ordinal before, it's a duplicate, which is an error. + if _, ok := seen[rg.Ordinal]; ok && rg.Ordinal != 0 { + return fmt.Errorf("duplicate row group ordinal %d", rg.Ordinal) + } + seen[rg.Ordinal] = struct{}{} + } + + // if all ordinals are zero, it's valid, but they need to be assigned + // sequential ordinals starting from zero for page offset calculations + if !allZero { + return nil + } + + for i := range rowGroups { + rowGroups[i].Ordinal = int16(i) + } + return nil +} diff --git a/vendor/github.com/parquet-go/parquet-go/schema.go b/vendor/github.com/parquet-go/parquet-go/schema.go index 6a7afd5ada4..248de8ad585 100644 --- a/vendor/github.com/parquet-go/parquet-go/schema.go +++ b/vendor/github.com/parquet-go/parquet-go/schema.go @@ -18,6 +18,7 @@ import ( "github.com/parquet-go/parquet-go/compress" "github.com/parquet-go/parquet-go/deprecated" "github.com/parquet-go/parquet-go/encoding" + "github.com/parquet-go/parquet-go/format" "github.com/parquet-go/parquet-go/internal/memory" ) @@ -512,6 +513,15 @@ func appendStructFields(path []string, t reflect.Type, fields []reflect.StructFi } } + // If no explicit parquet name was set, check for protobuf tag name. + // This allows protobuf-generated structs to use their proto field names + // (typically snake_case) as parquet column names. + if f.Name == t.Field(i).Name { // Name wasn't changed by parquet tag + if protoName := protoFieldNameFromTag(f.Tag); protoName != "" { + f.Name = protoName + } + } + fieldIndex := index[:len(index):len(index)] fieldIndex = append(fieldIndex, i) @@ -851,6 +861,47 @@ func parseUTCNormalization(arg string) (isUTCNormalized bool, err error) { } } +func parseGeometryArgs(args string) (crs string, err error) { + if !strings.HasPrefix(args, "(") || !strings.HasSuffix(args, ")") { + return "", fmt.Errorf("malformed geometry args: %s", args) + } + args = strings.TrimPrefix(args, "(") + args = strings.TrimSuffix(args, ")") + return args, nil +} + +func parseGeographyArgs(args string) (crs string, alg format.EdgeInterpolationAlgorithm, err error) { + if !strings.HasPrefix(args, "(") || !strings.HasSuffix(args, ")") { + return "", 0, fmt.Errorf("malformed geography args: %s", args) + } + args = strings.TrimPrefix(args, "(") + args = strings.TrimSuffix(args, ")") + + // geography has up to two arguments: the CRS and and the edge interpolation + // algorithm. + parts := strings.Split(args, ":") + + switch len(parts) { + case 1: + crs = parts[0] + return crs, alg, nil + case 2: + crs = parts[0] + err = alg.FromString(parts[1]) + if err != nil { + return "", 0, err + } + return crs, alg, nil + case 3: + // CRS very likely contains a colon, so we join all parts except the last one. + crs = strings.Join(parts[:2], ":") + default: + return "", 0, fmt.Errorf("malformed geography args: (%s)", args) + } + + return crs, alg, nil +} + type goNode struct { Node gotype reflect.Type @@ -1145,6 +1196,19 @@ func makeNodeOf(path []string, t reflect.Type, name string, tags parquetTags, ta throwInvalidNode(t, "struct field has field id that is not a valid int", name, tags) } fieldID = id + + case "geometry": + crs, err := parseGeometryArgs(args) + if err != nil { + throwInvalidTag(t, name, option+args) + } + setNode(Geometry(crs)) + case "geography": + crs, alg, err := parseGeographyArgs(args) + if err != nil { + throwInvalidTag(t, name, option+args) + } + setNode(Geography(crs, alg)) } }) } diff --git a/vendor/github.com/parquet-go/parquet-go/tags.go b/vendor/github.com/parquet-go/parquet-go/tags.go index 26f62a8d467..12a13714386 100644 --- a/vendor/github.com/parquet-go/parquet-go/tags.go +++ b/vendor/github.com/parquet-go/parquet-go/tags.go @@ -1,6 +1,9 @@ package parquet -import "reflect" +import ( + "reflect" + "strings" +) var noTags = parquetTags{} @@ -52,3 +55,19 @@ func (p parquetTags) getListElementNodeTags() parquetTags { parquet: p.parquetElement, } } + +// protoFieldNameFromTag extracts the field name from a protobuf struct tag. +// The protobuf tag format is: protobuf:"type,number,opt,name=field_name,json=jsonName,proto3" +// Returns empty string if no name is found. +func protoFieldNameFromTag(tag reflect.StructTag) string { + protoTag := tag.Get("protobuf") + if protoTag == "" { + return "" + } + for part := range strings.SplitSeq(protoTag, ",") { + if name, value, ok := strings.Cut(part, "="); ok && name == "name" { + return value + } + } + return "" +} diff --git a/vendor/github.com/parquet-go/parquet-go/type_geography.go b/vendor/github.com/parquet-go/parquet-go/type_geography.go new file mode 100644 index 00000000000..f39b0418e91 --- /dev/null +++ b/vendor/github.com/parquet-go/parquet-go/type_geography.go @@ -0,0 +1,137 @@ +package parquet + +import ( + "errors" + "reflect" + + "github.com/parquet-go/parquet-go/deprecated" + "github.com/parquet-go/parquet-go/encoding" + "github.com/parquet-go/parquet-go/format" + "github.com/twpayne/go-geom" + "github.com/twpayne/go-geom/encoding/wkb" +) + +func Geography(crs string, algorithm format.EdgeInterpolationAlgorithm) Node { + return Leaf(&geographyType{CRS: crs, Algorithm: algorithm}) +} + +type geographyType format.GeographyType + +func (t *geographyType) String() string { return (*format.GeographyType)(t).String() } + +func (t *geographyType) Kind() Kind { return byteArrayType{}.Kind() } + +func (t *geographyType) Length() int { return byteArrayType{}.Length() } + +func (t *geographyType) EstimateSize(n int) int { return byteArrayType{}.EstimateSize(n) } + +func (t *geographyType) EstimateNumValues(n int) int { return byteArrayType{}.EstimateNumValues(n) } + +func (t *geographyType) Compare(a, b Value) int { return byteArrayType{}.Compare(a, b) } + +func (t *geographyType) ColumnOrder() *format.ColumnOrder { return byteArrayType{}.ColumnOrder() } + +func (t *geographyType) PhysicalType() *format.Type { return byteArrayType{}.PhysicalType() } + +func (t *geographyType) LogicalType() *format.LogicalType { + f := &format.LogicalType{Geography: &format.GeographyType{ + CRS: t.CRS, + Algorithm: t.Algorithm, + }} + if t.CRS == "" { + f.Geography.CRS = format.GeometryDefaultCRS + } + if t.Algorithm != 0 { + f.Geography.Algorithm = t.Algorithm + } + + return f +} + +func (t *geographyType) ConvertedType() *deprecated.ConvertedType { + return nil +} + +func (t *geographyType) NewColumnIndexer(sizeLimit int) ColumnIndexer { + return byteArrayType{}.NewColumnIndexer(sizeLimit) +} + +func (t *geographyType) NewDictionary(columnIndex, numValues int, data encoding.Values) Dictionary { + return byteArrayType{}.NewDictionary(columnIndex, numValues, data) +} + +func (t *geographyType) NewColumnBuffer(columnIndex, numValues int) ColumnBuffer { + return byteArrayType{}.NewColumnBuffer(columnIndex, numValues) +} + +func (t *geographyType) NewPage(columnIndex, numValues int, data encoding.Values) Page { + return byteArrayType{}.NewPage(columnIndex, numValues, data) +} + +func (t *geographyType) NewValues(values []byte, offsets []uint32) encoding.Values { + return byteArrayType{}.NewValues(values, offsets) +} + +func (t *geographyType) Encode(dst []byte, src encoding.Values, enc encoding.Encoding) ([]byte, error) { + return byteArrayType{}.Encode(dst, src, enc) +} + +func (t *geographyType) Decode(dst encoding.Values, src []byte, enc encoding.Encoding) (encoding.Values, error) { + return byteArrayType{}.Decode(dst, src, enc) +} + +func (t *geographyType) EstimateDecodeSize(numValues int, src []byte, enc encoding.Encoding) int { + return byteArrayType{}.EstimateDecodeSize(numValues, src, enc) +} + +func (t *geographyType) AssignValue(dst reflect.Value, src Value) error { + switch dst.Type() { + case reflect.TypeOf(geom.T(nil)): + if src.IsNull() { + dst.Set(reflect.Zero(dst.Type())) + return nil + } + + data := src.Bytes() + g, err := wkb.Unmarshal(data) + if err != nil { + return err + } + dst.Set(reflect.ValueOf(g)) + return nil + case reflect.TypeOf((*geom.T)(nil)).Elem(): + if src.IsNull() { + dst.Set(reflect.Zero(dst.Type())) + return nil + } + + data := src.Bytes() + g, err := wkb.Unmarshal(data) + if err != nil { + return err + } + dst.Set(reflect.ValueOf(g)) + return nil + default: + return byteArrayType{}.AssignValue(dst, src) + } +} + +func (t *geographyType) ConvertValue(val Value, typ Type) (Value, error) { + switch src := typ.(type) { + case *geographyType: + if src.LogicalType().Geography.CRS != t.CRS { + return Value{}, errors.New("cannot convert between geography types with different CRS") + } + if src.LogicalType().Geography.Algorithm != t.LogicalType().Geography.Algorithm { + return Value{}, errors.New("cannot convert between geography types with different Algorithm") + } + return val, nil + case *geometryType: + if src.LogicalType().Geometry.CRS != t.CRS { + return Value{}, errors.New("cannot convert between geography and geometry types with different CRS") + } + return val, nil + } + return byteArrayType{}.ConvertValue(val, typ) +} diff --git a/vendor/github.com/parquet-go/parquet-go/type_geometry.go b/vendor/github.com/parquet-go/parquet-go/type_geometry.go new file mode 100644 index 00000000000..54f53ef4fcb --- /dev/null +++ b/vendor/github.com/parquet-go/parquet-go/type_geometry.go @@ -0,0 +1,128 @@ +package parquet + +import ( + "errors" + "reflect" + + "github.com/parquet-go/parquet-go/deprecated" + "github.com/parquet-go/parquet-go/encoding" + "github.com/parquet-go/parquet-go/format" + "github.com/twpayne/go-geom" + "github.com/twpayne/go-geom/encoding/wkb" +) + +func Geometry(crs string) Node { return Leaf(&geometryType{CRS: crs}) } + +type geometryType format.GeometryType + +var geometryDefaultCRSLogicType = format.GeometryType{ + CRS: format.GeometryDefaultCRS, +} + +func (t *geometryType) String() string { return (*format.GeometryType)(t).String() } + +func (t *geometryType) Kind() Kind { return byteArrayType{}.Kind() } + +func (t *geometryType) Length() int { return byteArrayType{}.Length() } + +func (t *geometryType) EstimateSize(n int) int { return byteArrayType{}.EstimateSize(n) } + +func (t *geometryType) EstimateNumValues(n int) int { return byteArrayType{}.EstimateNumValues(n) } + +func (t *geometryType) Compare(a, b Value) int { return byteArrayType{}.Compare(a, b) } + +func (t *geometryType) ColumnOrder() *format.ColumnOrder { return byteArrayType{}.ColumnOrder() } + +func (t *geometryType) PhysicalType() *format.Type { return byteArrayType{}.PhysicalType() } + +func (t *geometryType) LogicalType() *format.LogicalType { + if t.CRS == "" { + return &format.LogicalType{Geometry: &geometryDefaultCRSLogicType} + } + return &format.LogicalType{Geometry: (*format.GeometryType)(t)} +} + +func (t *geometryType) ConvertedType() *deprecated.ConvertedType { + return nil +} + +func (t *geometryType) NewColumnIndexer(sizeLimit int) ColumnIndexer { + return byteArrayType{}.NewColumnIndexer(sizeLimit) +} + +func (t *geometryType) NewDictionary(columnIndex, numValues int, data encoding.Values) Dictionary { + return byteArrayType{}.NewDictionary(columnIndex, numValues, data) +} + +func (t *geometryType) NewColumnBuffer(columnIndex, numValues int) ColumnBuffer { + return byteArrayType{}.NewColumnBuffer(columnIndex, numValues) +} + +func (t *geometryType) NewPage(columnIndex, numValues int, data encoding.Values) Page { + return byteArrayType{}.NewPage(columnIndex, numValues, data) +} + +func (t *geometryType) NewValues(values []byte, offsets []uint32) encoding.Values { + return byteArrayType{}.NewValues(values, offsets) +} + +func (t *geometryType) Encode(dst []byte, src encoding.Values, enc encoding.Encoding) ([]byte, error) { + return byteArrayType{}.Encode(dst, src, enc) +} + +func (t *geometryType) Decode(dst encoding.Values, src []byte, enc encoding.Encoding) (encoding.Values, error) { + return byteArrayType{}.Decode(dst, src, enc) +} + +func (t *geometryType) EstimateDecodeSize(numValues int, src []byte, enc encoding.Encoding) int { + return byteArrayType{}.EstimateDecodeSize(numValues, src, enc) +} + +func (t *geometryType) AssignValue(dst reflect.Value, src Value) error { + switch dst.Type() { + case reflect.TypeOf(geom.T(nil)): + if src.IsNull() { + dst.Set(reflect.Zero(dst.Type())) + return nil + } + + data := src.Bytes() + g, err := wkb.Unmarshal(data) + if err != nil { + return err + } + dst.Set(reflect.ValueOf(g)) + return nil + case reflect.TypeOf((*geom.T)(nil)).Elem(): + if src.IsNull() { + dst.Set(reflect.Zero(dst.Type())) + return nil + } + + data := src.Bytes() + g, err := wkb.Unmarshal(data) + if err != nil { + return err + } + dst.Set(reflect.ValueOf(g)) + return nil + default: + return byteArrayType{}.AssignValue(dst, src) + } +} + +func (t *geometryType) ConvertValue(val Value, typ Type) (Value, error) { + switch src := typ.(type) { + case *geometryType: + if src.LogicalType().Geometry.CRS != t.CRS { + return Value{}, errors.New("cannot convert between geometry types with different CRS") + } + return val, nil + case *geographyType: + if src.LogicalType().Geography.CRS != t.CRS { + return Value{}, errors.New("cannot convert between geography and geometry types with different CRS") + } + return val, nil + } + return byteArrayType{}.ConvertValue(val, typ) +} diff --git a/vendor/github.com/parquet-go/parquet-go/writer.go b/vendor/github.com/parquet-go/parquet-go/writer.go index 391e4915356..76b5002704b 100644 --- a/vendor/github.com/parquet-go/parquet-go/writer.go +++ b/vendor/github.com/parquet-go/parquet-go/writer.go @@ -214,15 +214,13 @@ func makeWriteFunc[T any](t reflect.Type, writeRows writeRowsFunc) writeFunc[T] } } +// Close must be called after all values were produced to the writer in order to +// flush all buffers and write the parquet footer. The writer can only be reused +// if Reset is called first. Failure to do so will result in defined behavior. func (w *GenericWriter[T]) Close() error { if err := w.base.Close(); err != nil { return err } - // Nil out the columns slice to allow the column buffers to be garbage - // collected and to ensure that any subsequent use of this writer after - // Close will result in a clear panic rather than operating on closed - // resources. - w.columns = nil return nil } @@ -230,6 +228,9 @@ func (w *GenericWriter[T]) Flush() error { return w.base.Flush() } +// Reset clears the state of the writer without flushing any of the buffers, +// and setting the output to the io.Writer passed as argument, allowing the +// writer to be reused to produce another parquet file. func (w *GenericWriter[T]) Reset(output io.Writer) { w.base.Reset(output) } @@ -313,27 +314,16 @@ func (w *GenericWriter[T]) File() FileView { // // While multiple row groups can be created concurrently, a single row group must be written // sequentially. -type ConcurrentRowGroupWriter interface { - RowWriterWithSchema - - // Flush flushes any buffered data in the row group's column writers. - // This could be called before Commit to ensure all data pages are flushed. - Flush() error - - // ColumnWriters returns the column writers for this row group, allowing - // direct access to write values to individual columns. - ColumnWriters() []*ColumnWriter - - // Commit commits the row group to the parent writer, returning the number - // of rows written and an error if any. This method must be called serially - // (not concurrently) to maintain row group order in the file. - // - // If the parent writer has any pending rows buffered, they will be flushed - // before this row group is written. - // - // After Commit returns successfully, the row group will be empty and can - // be reused. - Commit() (int64, error) +type ConcurrentRowGroupWriter struct { + writer *writer + config *WriterConfig + values [][]Value + numRows int64 + maxRows int64 + columns []*ColumnWriter + columnChunk []format.ColumnChunk + columnIndex []format.ColumnIndex + offsetIndex []format.OffsetIndex } // BeginRowGroup returns a new ConcurrentRowGroupWriter that can be written to in parallel with @@ -343,7 +333,7 @@ type ConcurrentRowGroupWriter interface { // Example usage could look something like: // // writer := parquet.NewGenericWriter[any](...) -// rgs := make([]parquet.ConcurrentRowGroupWriter, 5) +// rgs := make([]*parquet.ConcurrentRowGroupWriter, 5) // var wg sync.WaitGroup // for i := range rgs { // rg := writer.BeginRowGroup() @@ -361,8 +351,8 @@ type ConcurrentRowGroupWriter interface { // } // } // return writer.Close() -func (w *GenericWriter[T]) BeginRowGroup() ConcurrentRowGroupWriter { - return newWriterRowGroup(w.base.writer, w.base.config) +func (w *GenericWriter[T]) BeginRowGroup() *ConcurrentRowGroupWriter { + return newConcurrentRowGroupWriter(w.base.writer, w.base.config) } var ( @@ -377,8 +367,6 @@ var ( _ RowWriterWithSchema = (*GenericWriter[map[struct{}]struct{}])(nil) _ RowReaderFrom = (*GenericWriter[map[struct{}]struct{}])(nil) _ RowGroupWriter = (*GenericWriter[map[struct{}]struct{}])(nil) - - _ ConcurrentRowGroupWriter = (*writerRowGroup)(nil) ) // Deprecated: A Writer uses a parquet schema and sequence of Go values to @@ -617,8 +605,8 @@ func (w *Writer) ColumnWriters() []*ColumnWriter { return w.writer.currentRowGro // BeginRowGroup returns a new ConcurrentRowGroupWriter that can be written to in parallel with // other row groups. However these need to be committed back to the writer serially using the // Commit method on the row group. -func (w *Writer) BeginRowGroup() ConcurrentRowGroupWriter { - return newWriterRowGroup(w.writer, w.config) +func (w *Writer) BeginRowGroup() *ConcurrentRowGroupWriter { + return newConcurrentRowGroupWriter(w.writer, w.config) } type writerFileView struct { @@ -678,20 +666,8 @@ func (w *writerFileView) RowGroups() []RowGroup { return makeRowGroups(fileRowGroups) } -type writerRowGroup struct { - writer *writer - config *WriterConfig - values [][]Value - numRows int64 - maxRows int64 - columns []*ColumnWriter - columnChunk []format.ColumnChunk - columnIndex []format.ColumnIndex - offsetIndex []format.OffsetIndex -} - -func newWriterRowGroup(w *writer, config *WriterConfig) *writerRowGroup { - rg := &writerRowGroup{ +func newConcurrentRowGroupWriter(w *writer, config *WriterConfig) *ConcurrentRowGroupWriter { + rg := &ConcurrentRowGroupWriter{ writer: w, config: config, maxRows: config.MaxRowsPerRowGroup, @@ -821,14 +797,14 @@ func newWriterRowGroup(w *writer, config *WriterConfig) *writerRowGroup { return rg } -func (rg *writerRowGroup) reset() { +func (rg *ConcurrentRowGroupWriter) reset() { rg.numRows = 0 for _, c := range rg.columns { c.reset() } } -func (rg *writerRowGroup) configureBloomFilters(columnChunks []ColumnChunk) { +func (rg *ConcurrentRowGroupWriter) configureBloomFilters(columnChunks []ColumnChunk) { for i, c := range rg.columns { if c.columnFilter != nil { c.resizeBloomFilter(columnChunks[i].NumValues()) @@ -836,15 +812,20 @@ func (rg *writerRowGroup) configureBloomFilters(columnChunks []ColumnChunk) { } } -func (rg *writerRowGroup) Schema() *Schema { +// Schema returns the schema for this row group. +func (rg *ConcurrentRowGroupWriter) Schema() *Schema { return rg.config.Schema } -func (rg *writerRowGroup) ColumnWriters() []*ColumnWriter { +// ColumnWriters returns the column writers for this row group, allowing +// direct access to write values to individual columns. +func (rg *ConcurrentRowGroupWriter) ColumnWriters() []*ColumnWriter { return rg.columns } -func (rg *writerRowGroup) Flush() error { +// Flush flushes any buffered data in the row group's column writers. +// This could be called before Commit to ensure all data pages are flushed. +func (rg *ConcurrentRowGroupWriter) Flush() error { for _, c := range rg.columns { if err := c.Flush(); err != nil { return err @@ -853,14 +834,24 @@ func (rg *writerRowGroup) Flush() error { return nil } -func (rg *writerRowGroup) Commit() (int64, error) { +// Commit commits the row group to the parent writer, returning the number +// of rows written and an error if any. This method must be called serially +// (not concurrently) to maintain row group order in the file. +// +// If the parent writer has any pending rows buffered, they will be flushed +// before this row group is written. +// +// After Commit returns successfully, the row group will be empty and can +// be reused. +func (rg *ConcurrentRowGroupWriter) Commit() (int64, error) { if err := rg.writer.flush(); err != nil { return 0, err } return rg.writer.writeRowGroup(rg, nil, nil) } -func (rg *writerRowGroup) WriteRows(rows []Row) (int, error) { +// WriteRows writes rows to the row group. +func (rg *ConcurrentRowGroupWriter) WriteRows(rows []Row) (int, error) { return rg.writeRows(len(rows), func(start, end int) (int, error) { defer func() { for i, values := range rg.values { @@ -891,7 +882,7 @@ func (rg *writerRowGroup) WriteRows(rows []Row) (int, error) { }) } -func (rg *writerRowGroup) writeRows(numRows int, write func(i, j int) (int, error)) (int, error) { +func (rg *ConcurrentRowGroupWriter) writeRows(numRows int, write func(i, j int) (int, error)) (int, error) { written := 0 for written < numRows { @@ -929,7 +920,7 @@ func (rg *writerRowGroup) writeRows(numRows int, write func(i, j int) (int, erro type writer struct { buffer *bufio.Writer writer offsetTrackingWriter - currentRowGroup *writerRowGroup + currentRowGroup *ConcurrentRowGroupWriter createdBy string metadata []format.KeyValue @@ -1003,7 +994,7 @@ func newWriter(output io.Writer, config *WriterConfig) *writer { }) }) - w.currentRowGroup = newWriterRowGroup(w, config) + w.currentRowGroup = newConcurrentRowGroupWriter(w, config) if len(config.Sorting.SortingColumns) > 0 { forEachLeafColumnOf(config.Schema, func(leaf leafColumn) { @@ -1155,7 +1146,7 @@ func (w *writer) writeFileFooter() error { return err } -func (w *writer) writeRowGroup(rg *writerRowGroup, rowGroupSchema *Schema, rowGroupSortingColumns []SortingColumn) (int64, error) { +func (w *writer) writeRowGroup(rg *ConcurrentRowGroupWriter, rowGroupSchema *Schema, rowGroupSortingColumns []SortingColumn) (int64, error) { if len(rg.columns) == 0 { return 0, nil } @@ -1723,8 +1714,8 @@ func (c *ColumnWriter) WriteRowValues(rows []Value) (int, error) { return numRows, nil } -// Close closes the column writer and releases all dependent resources. -// New values should not be written after the ColumnWriter is closed. +// Close closes the column writer and resets all dependent resources. +// It can be reused after Close is called. func (c *ColumnWriter) Close() (err error) { if c.columnBuffer == nil { return nil @@ -1733,7 +1724,6 @@ func (c *ColumnWriter) Close() (err error) { return err } c.columnBuffer.Reset() - c.columnBuffer = nil return nil } diff --git a/vendor/github.com/prometheus/alertmanager/api/api.go b/vendor/github.com/prometheus/alertmanager/api/api.go index 6839d2d2829..2bb41095220 100644 --- a/vendor/github.com/prometheus/alertmanager/api/api.go +++ b/vendor/github.com/prometheus/alertmanager/api/api.go @@ -14,17 +14,21 @@ package api import ( + "context" "errors" "fmt" "log/slog" "net/http" "runtime" + "strings" "time" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/model" "github.com/prometheus/common/promslog" "github.com/prometheus/common/route" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" apiv2 "github.com/prometheus/alertmanager/api/v2" "github.com/prometheus/alertmanager/cluster" @@ -40,6 +44,7 @@ type API struct { v2 *apiv2.API deprecationRouter *V1DeprecationRouter + requestDuration *prometheus.HistogramVec requestsInFlight prometheus.Gauge concurrencyLimitExceeded prometheus.Counter timeout time.Duration @@ -75,10 +80,12 @@ type Options struct { // Registry is used to register Prometheus metrics. If nil, no metrics // registration will happen. Registry prometheus.Registerer + // RequestDuration is used to measure the duration of HTTP requests. + RequestDuration *prometheus.HistogramVec // GroupFunc returns a list of alert groups. The alerts are grouped // according to the current active configuration. Alerts returned are // filtered by the arguments provided to the function. - GroupFunc func(func(*dispatch.Route) bool, func(*types.Alert, time.Time) bool) (dispatch.AlertGroups, map[model.Fingerprint][]string) + GroupFunc func(context.Context, func(*dispatch.Route) bool, func(*types.Alert, time.Time) bool) (dispatch.AlertGroups, map[model.Fingerprint][]string, error) } func (o Options) validate() error { @@ -112,10 +119,7 @@ func New(opts Options) (*API, error) { } concurrency := opts.Concurrency if concurrency < 1 { - concurrency = runtime.GOMAXPROCS(0) - if concurrency < 8 { - concurrency = 8 - } + concurrency = max(runtime.GOMAXPROCS(0), 8) } v2, err := apiv2.NewAPI( @@ -132,8 +136,6 @@ func New(opts Options) (*API, error) { return nil, err } - // TODO(beorn7): For now, this hardcodes the method="get" label. Other - // methods should get the same instrumentation. requestsInFlight := prometheus.NewGauge(prometheus.GaugeOpts{ Name: "alertmanager_http_requests_in_flight", Help: "Current number of HTTP requests being processed.", @@ -156,6 +158,7 @@ func New(opts Options) (*API, error) { return &API{ deprecationRouter: NewV1DeprecationRouter(l.With("version", "v1")), v2: v2, + requestDuration: opts.RequestDuration, requestsInFlight: requestsInFlight, concurrencyLimitExceeded: concurrencyLimitExceeded, timeout: opts.Timeout, @@ -181,13 +184,17 @@ func (api *API) Register(r *route.Router, routePrefix string) *http.ServeMux { if routePrefix != "/" { apiPrefix = routePrefix } - // TODO(beorn7): HTTP instrumentation is only in place for Router. Since - // /api/v2 works on the Handler level, it is currently not instrumented - // at all (with the exception of requestsInFlight, which is handled in - // limitHandler below). mux.Handle( apiPrefix+"/api/v2/", - api.limitHandler(http.StripPrefix(apiPrefix, api.v2.Handler)), + api.instrumentHandler( + apiPrefix, + api.limitHandler( + http.StripPrefix( + apiPrefix, + api.v2.Handler, + ), + ), + ), ) return mux @@ -195,7 +202,7 @@ func (api *API) Register(r *route.Router, routePrefix string) *http.ServeMux { // Update config and resolve timeout of each API. APIv2 also needs // setAlertStatus to be updated. -func (api *API) Update(cfg *config.Config, setAlertStatus func(model.LabelSet)) { +func (api *API) Update(cfg *config.Config, setAlertStatus func(ctx context.Context, labels model.LabelSet)) { api.v2.Update(cfg, setAlertStatus) } @@ -226,3 +233,17 @@ func (api *API) limitHandler(h http.Handler) http.Handler { "Exceeded configured timeout of %v.\n", api.timeout, )) } + +func (api *API) instrumentHandler(prefix string, h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + path, _ := strings.CutPrefix(r.URL.Path, prefix) + // avoid high cardinality label values by replacing the actual silence IDs with a placeholder + if strings.HasPrefix(path, "/api/v2/silence/") { + path = "/api/v2/silence/{silenceID}" + } + promhttp.InstrumentHandlerDuration( + api.requestDuration.MustCurryWith(prometheus.Labels{"handler": path}), + otelhttp.NewHandler(h, path), + ).ServeHTTP(w, r) + }) +} diff --git a/vendor/github.com/prometheus/alertmanager/api/metrics/metrics.go b/vendor/github.com/prometheus/alertmanager/api/metrics/metrics.go index 439010166d0..6f212c3179d 100644 --- a/vendor/github.com/prometheus/alertmanager/api/metrics/metrics.go +++ b/vendor/github.com/prometheus/alertmanager/api/metrics/metrics.go @@ -13,7 +13,10 @@ package metrics -import "github.com/prometheus/client_golang/prometheus" +import ( + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" +) // Alerts stores metrics for alerts. type Alerts struct { @@ -25,19 +28,19 @@ type Alerts struct { // NewAlerts returns an *Alerts struct for the given API version. // Since v1 was deprecated in 0.27, v2 is now hardcoded. func NewAlerts(r prometheus.Registerer) *Alerts { - numReceivedAlerts := prometheus.NewCounterVec(prometheus.CounterOpts{ + if r == nil { + return nil + } + numReceivedAlerts := promauto.With(r).NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_alerts_received_total", Help: "The total number of received alerts.", ConstLabels: prometheus.Labels{"version": "v2"}, }, []string{"status"}) - numInvalidAlerts := prometheus.NewCounter(prometheus.CounterOpts{ + numInvalidAlerts := promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_alerts_invalid_total", Help: "The total number of received alerts that were invalid.", ConstLabels: prometheus.Labels{"version": "v2"}, }) - if r != nil { - r.MustRegister(numReceivedAlerts, numInvalidAlerts) - } return &Alerts{ firing: numReceivedAlerts.WithLabelValues("firing"), resolved: numReceivedAlerts.WithLabelValues("resolved"), diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/api.go b/vendor/github.com/prometheus/alertmanager/api/v2/api.go index dd0ffd6f608..dda91fea271 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/api.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/api.go @@ -14,11 +14,13 @@ package v2 import ( + "context" "errors" "fmt" "log/slog" "net/http" "regexp" + "slices" "sort" "sync" "time" @@ -31,6 +33,8 @@ import ( prometheus_model "github.com/prometheus/common/model" "github.com/prometheus/common/version" "github.com/rs/cors" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/codes" "github.com/prometheus/alertmanager/api/metrics" open_api_models "github.com/prometheus/alertmanager/api/v2/models" @@ -52,6 +56,8 @@ import ( "github.com/prometheus/alertmanager/types" ) +var tracer = otel.Tracer("github.com/prometheus/alertmanager/api/v2") + // API represents an Alertmanager API v2. type API struct { peer cluster.ClusterPeer @@ -77,10 +83,10 @@ type API struct { } type ( - groupsFn func(func(*dispatch.Route) bool, func(*types.Alert, time.Time) bool) (dispatch.AlertGroups, map[prometheus_model.Fingerprint][]string) + groupsFn func(context.Context, func(*dispatch.Route) bool, func(*types.Alert, time.Time) bool) (dispatch.AlertGroups, map[prometheus_model.Fingerprint][]string, error) groupMutedFunc func(routeID, groupKey string) ([]string, bool) getAlertStatusFn func(prometheus_model.Fingerprint) types.AlertStatus - setAlertStatusFn func(prometheus_model.LabelSet) + setAlertStatusFn func(ctx context.Context, labels prometheus_model.LabelSet) ) // NewAPI returns a new Alertmanager API v2. @@ -171,6 +177,9 @@ func (api *API) getStatusHandler(params general_ops.GetStatusParams) middleware. api.mtx.RLock() defer api.mtx.RUnlock() + _, span := tracer.Start(params.HTTPRequest.Context(), "api.getStatusHandler") + defer span.End() + original := api.alertmanagerConfig.String() uptime := strfmt.DateTime(api.uptime) @@ -227,6 +236,9 @@ func (api *API) getReceiversHandler(params receiver_ops.GetReceiversParams) midd api.mtx.RLock() defer api.mtx.RUnlock() + _, span := tracer.Start(params.HTTPRequest.Context(), "api.getReceiversHandler") + defer span.End() + receivers := make([]*open_api_models.Receiver, 0, len(api.alertmanagerConfig.Receivers)) for i := range api.alertmanagerConfig.Receivers { receivers = append(receivers, &open_api_models.Receiver{Name: &api.alertmanagerConfig.Receivers[i].Name}) @@ -241,11 +253,13 @@ func (api *API) getAlertsHandler(params alert_ops.GetAlertsParams) middleware.Re // Initialize result slice to prevent api returning `null` when there // are no alerts present res = open_api_models.GettableAlerts{} - ctx = params.HTTPRequest.Context() logger = api.requestLogger(params.HTTPRequest) ) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.getAlertsHandler") + defer span.End() + matchers, err := parseFilter(params.Filter) if err != nil { logger.Debug("Failed to parse matchers", "err", err) @@ -272,6 +286,7 @@ func (api *API) getAlertsHandler(params alert_ops.GetAlertsParams) middleware.Re api.mtx.RLock() for a := range alerts.Next() { + alert := a.Data if err = alerts.Err(); err != nil { break } @@ -279,23 +294,23 @@ func (api *API) getAlertsHandler(params alert_ops.GetAlertsParams) middleware.Re break } - routes := api.route.Match(a.Labels) + routes := api.route.Match(alert.Labels) receivers := make([]string, 0, len(routes)) for _, r := range routes { receivers = append(receivers, r.RouteOpts.Receiver) } - if receiverFilter != nil && !receiversMatchFilter(receivers, receiverFilter) { + if receiverFilter != nil && !slices.ContainsFunc(receivers, receiverFilter.MatchString) { continue } - if !alertFilter(a, now) { + if !alertFilter(alert, now) { continue } - alert := AlertToOpenAPIAlert(a, api.getAlertStatus(a.Fingerprint()), receivers, nil) + openAlert := AlertToOpenAPIAlert(alert, api.getAlertStatus(alert.Fingerprint()), receivers, nil) - res = append(res, alert) + res = append(res, openAlert) } api.mtx.RUnlock() @@ -313,7 +328,11 @@ func (api *API) getAlertsHandler(params alert_ops.GetAlertsParams) middleware.Re func (api *API) postAlertsHandler(params alert_ops.PostAlertsParams) middleware.Responder { logger := api.requestLogger(params.HTTPRequest) - alerts := OpenAPIAlertsToAlerts(params.Alerts) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.postAlertsHandler") + defer span.End() + + alerts := OpenAPIAlertsToAlerts(ctx, params.Alerts) + now := time.Now() api.mtx.RLock() @@ -359,13 +378,19 @@ func (api *API) postAlertsHandler(params alert_ops.PostAlertsParams) middleware. } validAlerts = append(validAlerts, a) } - if err := api.alerts.Put(validAlerts...); err != nil { - logger.Error("Failed to create alerts", "err", err) + if err := api.alerts.Put(ctx, validAlerts...); err != nil { + message := "Failed to create alerts" + logger.Error(message, "err", err) + span.SetStatus(codes.Error, message) + span.RecordError(err) return alert_ops.NewPostAlertsInternalServerError().WithPayload(err.Error()) } if validationErrs.Len() > 0 { - logger.Error("Failed to validate alerts", "err", validationErrs.Error()) + message := "Failed to validate alerts" + logger.Error(message, "err", validationErrs.Error()) + span.SetStatus(codes.Error, message) + span.RecordError(validationErrs) return alert_ops.NewPostAlertsBadRequest().WithPayload(validationErrs.Error()) } @@ -375,6 +400,9 @@ func (api *API) postAlertsHandler(params alert_ops.PostAlertsParams) middleware. func (api *API) getAlertGroupsHandler(params alertgroup_ops.GetAlertGroupsParams) middleware.Responder { logger := api.requestLogger(params.HTTPRequest) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.getAlertGroupsHandler") + defer span.End() + matchers, err := parseFilter(params.Filter) if err != nil { logger.Debug("Failed to parse matchers", "err", err) @@ -405,7 +433,14 @@ func (api *API) getAlertGroupsHandler(params alertgroup_ops.GetAlertGroupsParams }(receiverFilter) af := api.alertFilter(matchers, *params.Silenced, *params.Inhibited, *params.Active) - alertGroups, allReceivers := api.alertGroups(rf, af) + alertGroups, allReceivers, err := api.alertGroups(ctx, rf, af) + if err != nil { + message := "Failed to get alert groups" + logger.Error(message, "err", err) + span.SetStatus(codes.Error, message) + span.RecordError(err) + return alertgroup_ops.NewGetAlertGroupsInternalServerError() + } res := make(open_api_models.AlertGroups, 0, len(alertGroups)) @@ -436,12 +471,15 @@ func (api *API) getAlertGroupsHandler(params alertgroup_ops.GetAlertGroupsParams func (api *API) alertFilter(matchers []*labels.Matcher, silenced, inhibited, active bool) func(a *types.Alert, now time.Time) bool { return func(a *types.Alert, now time.Time) bool { + ctx, span := tracer.Start(context.Background(), "alertFilter") + defer span.End() + if !a.EndsAt.IsZero() && a.EndsAt.Before(now) { return false } // Set alert's current status based on its label set. - api.setAlertStatus(a.Labels) + api.setAlertStatus(ctx, a.Labels) // Get alert's current status after seeing if it is suppressed. status := api.getAlertStatus(a.Fingerprint()) @@ -470,16 +508,6 @@ func removeEmptyLabels(ls prometheus_model.LabelSet) { } } -func receiversMatchFilter(receivers []string, filter *regexp.Regexp) bool { - for _, r := range receivers { - if filter.MatchString(r) { - return true - } - } - - return false -} - func alertMatchesFilterLabels(a *prometheus_model.Alert, matchers []*labels.Matcher) bool { sms := make(map[string]string) for name, value := range a.Labels { @@ -515,13 +543,16 @@ func matchFilterLabels(matchers []*labels.Matcher, sms map[string]string) bool { func (api *API) getSilencesHandler(params silence_ops.GetSilencesParams) middleware.Responder { logger := api.requestLogger(params.HTTPRequest) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.getSilencesHandler") + defer span.End() + matchers, err := parseFilter(params.Filter) if err != nil { logger.Debug("Failed to parse matchers", "err", err) return silence_ops.NewGetSilencesBadRequest().WithPayload(err.Error()) } - psils, _, err := api.silences.Query() + psils, _, err := api.silences.Query(ctx) if err != nil { logger.Error("Failed to get silences", "err", err) return silence_ops.NewGetSilencesInternalServerError().WithPayload(err.Error()) @@ -611,7 +642,10 @@ func CheckSilenceMatchesFilterLabels(s *silencepb.Silence, matchers []*labels.Ma func (api *API) getSilenceHandler(params silence_ops.GetSilenceParams) middleware.Responder { logger := api.requestLogger(params.HTTPRequest) - sils, _, err := api.silences.Query(silence.QIDs(params.SilenceID.String())) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.getSilenceHandler") + defer span.End() + + sils, _, err := api.silences.Query(ctx, silence.QIDs(params.SilenceID.String())) if err != nil { logger.Error("Failed to get silence by id", "err", err, "id", params.SilenceID.String()) return silence_ops.NewGetSilenceInternalServerError().WithPayload(err.Error()) @@ -634,8 +668,11 @@ func (api *API) getSilenceHandler(params silence_ops.GetSilenceParams) middlewar func (api *API) deleteSilenceHandler(params silence_ops.DeleteSilenceParams) middleware.Responder { logger := api.requestLogger(params.HTTPRequest) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.deleteSilenceHandler") + defer span.End() + sid := params.SilenceID.String() - if err := api.silences.Expire(sid); err != nil { + if err := api.silences.Expire(ctx, sid); err != nil { logger.Error("Failed to expire silence", "err", err) if errors.Is(err, silence.ErrNotFound) { return silence_ops.NewDeleteSilenceNotFound() @@ -648,6 +685,9 @@ func (api *API) deleteSilenceHandler(params silence_ops.DeleteSilenceParams) mid func (api *API) postSilencesHandler(params silence_ops.PostSilencesParams) middleware.Responder { logger := api.requestLogger(params.HTTPRequest) + ctx, span := tracer.Start(params.HTTPRequest.Context(), "api.postSilencesHandler") + defer span.End() + sil, err := PostableSilenceToProto(params.Silence) if err != nil { logger.Error("Failed to marshal silence to proto", "err", err) @@ -668,7 +708,7 @@ func (api *API) postSilencesHandler(params silence_ops.PostSilencesParams) middl return silence_ops.NewPostSilencesBadRequest().WithPayload(msg) } - if err = api.silences.Set(sil); err != nil { + if err = api.silences.Set(ctx, sil); err != nil { logger.Error("Failed to create silence", "err", err) if errors.Is(err, silence.ErrNotFound) { return silence_ops.NewPostSilencesNotFound().WithPayload(err.Error()) diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/client/alert/get_alerts_parameters.go b/vendor/github.com/prometheus/alertmanager/api/v2/client/alert/get_alerts_parameters.go index 89ff1880eeb..c574dec4232 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/client/alert/get_alerts_parameters.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/client/alert/get_alerts_parameters.go @@ -78,7 +78,7 @@ type GetAlertsParams struct { /* Active. - Show active alerts + Include active alerts in results. If false, excludes active alerts and returns only suppressed (silenced or inhibited) alerts. Default: true */ @@ -86,13 +86,13 @@ type GetAlertsParams struct { /* Filter. - A list of matchers to filter alerts by + A matcher expression to filter alerts. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. */ Filter []string /* Inhibited. - Show inhibited alerts + Include inhibited alerts in results. If false, excludes inhibited alerts. Note that true (default) shows both inhibited and non-inhibited alerts. Default: true */ @@ -106,7 +106,7 @@ type GetAlertsParams struct { /* Silenced. - Show silenced alerts + Include silenced alerts in results. If false, excludes silenced alerts. Note that true (default) shows both silenced and non-silenced alerts. Default: true */ @@ -114,7 +114,7 @@ type GetAlertsParams struct { /* Unprocessed. - Show unprocessed alerts + Include unprocessed alerts in results. If false, excludes unprocessed alerts. Note that true (default) shows both processed and unprocessed alerts. Default: true */ diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/client/alertgroup/get_alert_groups_parameters.go b/vendor/github.com/prometheus/alertmanager/api/v2/client/alertgroup/get_alert_groups_parameters.go index 81020fcf679..06bd5b7d457 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/client/alertgroup/get_alert_groups_parameters.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/client/alertgroup/get_alert_groups_parameters.go @@ -78,7 +78,7 @@ type GetAlertGroupsParams struct { /* Active. - Show active alerts + Include active alerts within the returned groups. If false, excludes active alerts from groups and only shows suppressed (silenced or inhibited) alerts. Default: true */ @@ -86,13 +86,13 @@ type GetAlertGroupsParams struct { /* Filter. - A list of matchers to filter alerts by + A matcher expression to filter alert groups. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. */ Filter []string /* Inhibited. - Show inhibited alerts + Include inhibited alerts within the returned groups. If false, excludes inhibited alerts from groups. Note that true (default) shows both inhibited and non-inhibited alerts. Default: true */ @@ -100,7 +100,7 @@ type GetAlertGroupsParams struct { /* Muted. - Show muted alerts + Include muted (silenced or inhibited) alert groups in results. If false, excludes entire groups where all alerts are muted. Default: true */ @@ -114,7 +114,7 @@ type GetAlertGroupsParams struct { /* Silenced. - Show silenced alerts + Include silenced alerts within the returned groups. If false, excludes silenced alerts from groups. Note that true (default) shows both silenced and non-silenced alerts. Default: true */ diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/client/silence/get_silences_parameters.go b/vendor/github.com/prometheus/alertmanager/api/v2/client/silence/get_silences_parameters.go index d964efefa26..8e02101200c 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/client/silence/get_silences_parameters.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/client/silence/get_silences_parameters.go @@ -78,7 +78,7 @@ type GetSilencesParams struct { /* Filter. - A list of matchers to filter silences by + A matcher expression to filter silences. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. */ Filter []string diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/compat.go b/vendor/github.com/prometheus/alertmanager/api/v2/compat.go index 8954f2f752d..cc860911148 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/compat.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/compat.go @@ -14,6 +14,7 @@ package v2 import ( + "context" "fmt" "time" @@ -170,7 +171,10 @@ func AlertToOpenAPIAlert(alert *types.Alert, status types.AlertStatus, receivers } // OpenAPIAlertsToAlerts converts open_api_models.PostableAlerts to []*types.Alert. -func OpenAPIAlertsToAlerts(apiAlerts open_api_models.PostableAlerts) []*types.Alert { +func OpenAPIAlertsToAlerts(ctx context.Context, apiAlerts open_api_models.PostableAlerts) []*types.Alert { + _, span := tracer.Start(ctx, "OpenAPIAlertsToAlerts") + defer span.End() + alerts := []*types.Alert{} for _, apiAlert := range apiAlerts { alert := types.Alert{ diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/openapi.yaml b/vendor/github.com/prometheus/alertmanager/api/v2/openapi.yaml index bc525ff37a9..f77e2fa2202 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/openapi.yaml +++ b/vendor/github.com/prometheus/alertmanager/api/v2/openapi.yaml @@ -60,7 +60,7 @@ paths: parameters: - name: filter in: query - description: A list of matchers to filter silences by + description: A matcher expression to filter silences. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. required: false type: array collectionFormat: multi @@ -143,26 +143,26 @@ paths: - in: query name: active type: boolean - description: Show active alerts + description: Include active alerts in results. If false, excludes active alerts and returns only suppressed (silenced or inhibited) alerts. default: true - in: query name: silenced type: boolean - description: Show silenced alerts + description: Include silenced alerts in results. If false, excludes silenced alerts. Note that true (default) shows both silenced and non-silenced alerts. default: true - in: query name: inhibited type: boolean - description: Show inhibited alerts + description: Include inhibited alerts in results. If false, excludes inhibited alerts. Note that true (default) shows both inhibited and non-inhibited alerts. default: true - in: query name: unprocessed type: boolean - description: Show unprocessed alerts + description: Include unprocessed alerts in results. If false, excludes unprocessed alerts. Note that true (default) shows both processed and unprocessed alerts. default: true - name: filter in: query - description: A list of matchers to filter alerts by + description: A matcher expression to filter alerts. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. required: false type: array collectionFormat: multi @@ -211,26 +211,26 @@ paths: - in: query name: active type: boolean - description: Show active alerts + description: Include active alerts within the returned groups. If false, excludes active alerts from groups and only shows suppressed (silenced or inhibited) alerts. default: true - in: query name: silenced type: boolean - description: Show silenced alerts + description: Include silenced alerts within the returned groups. If false, excludes silenced alerts from groups. Note that true (default) shows both silenced and non-silenced alerts. default: true - in: query name: inhibited type: boolean - description: Show inhibited alerts + description: Include inhibited alerts within the returned groups. If false, excludes inhibited alerts from groups. Note that true (default) shows both inhibited and non-inhibited alerts. default: true - in: query name: muted type: boolean - description: Show muted alerts + description: Include muted (silenced or inhibited) alert groups in results. If false, excludes entire groups where all alerts are muted. default: true - name: filter in: query - description: A list of matchers to filter alerts by + description: A matcher expression to filter alert groups. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. required: false type: array collectionFormat: multi diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/embedded_spec.go b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/embedded_spec.go index 37938bdc147..2d1fb9f2696 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/embedded_spec.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/embedded_spec.go @@ -61,28 +61,28 @@ func init() { { "type": "boolean", "default": true, - "description": "Show active alerts", + "description": "Include active alerts in results. If false, excludes active alerts and returns only suppressed (silenced or inhibited) alerts.", "name": "active", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show silenced alerts", + "description": "Include silenced alerts in results. If false, excludes silenced alerts. Note that true (default) shows both silenced and non-silenced alerts.", "name": "silenced", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show inhibited alerts", + "description": "Include inhibited alerts in results. If false, excludes inhibited alerts. Note that true (default) shows both inhibited and non-inhibited alerts.", "name": "inhibited", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show unprocessed alerts", + "description": "Include unprocessed alerts in results. If false, excludes unprocessed alerts. Note that true (default) shows both processed and unprocessed alerts.", "name": "unprocessed", "in": "query" }, @@ -92,7 +92,7 @@ func init() { "type": "string" }, "collectionFormat": "multi", - "description": "A list of matchers to filter alerts by", + "description": "A matcher expression to filter alerts. For example ` + "`" + `alertname=\"MyAlert\"` + "`" + `. It can be repeated to apply multiple matchers.", "name": "filter", "in": "query" }, @@ -159,28 +159,28 @@ func init() { { "type": "boolean", "default": true, - "description": "Show active alerts", + "description": "Include active alerts within the returned groups. If false, excludes active alerts from groups and only shows suppressed (silenced or inhibited) alerts.", "name": "active", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show silenced alerts", + "description": "Include silenced alerts within the returned groups. If false, excludes silenced alerts from groups. Note that true (default) shows both silenced and non-silenced alerts.", "name": "silenced", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show inhibited alerts", + "description": "Include inhibited alerts within the returned groups. If false, excludes inhibited alerts from groups. Note that true (default) shows both inhibited and non-inhibited alerts.", "name": "inhibited", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show muted alerts", + "description": "Include muted (silenced or inhibited) alert groups in results. If false, excludes entire groups where all alerts are muted.", "name": "muted", "in": "query" }, @@ -190,7 +190,7 @@ func init() { "type": "string" }, "collectionFormat": "multi", - "description": "A list of matchers to filter alerts by", + "description": "A matcher expression to filter alert groups. For example ` + "`" + `alertname=\"MyAlert\"` + "`" + `. It can be repeated to apply multiple matchers.", "name": "filter", "in": "query" }, @@ -312,7 +312,7 @@ func init() { "type": "string" }, "collectionFormat": "multi", - "description": "A list of matchers to filter silences by", + "description": "A matcher expression to filter silences. For example ` + "`" + `alertname=\"MyAlert\"` + "`" + `. It can be repeated to apply multiple matchers.", "name": "filter", "in": "query" } @@ -865,28 +865,28 @@ func init() { { "type": "boolean", "default": true, - "description": "Show active alerts", + "description": "Include active alerts in results. If false, excludes active alerts and returns only suppressed (silenced or inhibited) alerts.", "name": "active", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show silenced alerts", + "description": "Include silenced alerts in results. If false, excludes silenced alerts. Note that true (default) shows both silenced and non-silenced alerts.", "name": "silenced", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show inhibited alerts", + "description": "Include inhibited alerts in results. If false, excludes inhibited alerts. Note that true (default) shows both inhibited and non-inhibited alerts.", "name": "inhibited", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show unprocessed alerts", + "description": "Include unprocessed alerts in results. If false, excludes unprocessed alerts. Note that true (default) shows both processed and unprocessed alerts.", "name": "unprocessed", "in": "query" }, @@ -896,7 +896,7 @@ func init() { "type": "string" }, "collectionFormat": "multi", - "description": "A list of matchers to filter alerts by", + "description": "A matcher expression to filter alerts. For example ` + "`" + `alertname=\"MyAlert\"` + "`" + `. It can be repeated to apply multiple matchers.", "name": "filter", "in": "query" }, @@ -975,28 +975,28 @@ func init() { { "type": "boolean", "default": true, - "description": "Show active alerts", + "description": "Include active alerts within the returned groups. If false, excludes active alerts from groups and only shows suppressed (silenced or inhibited) alerts.", "name": "active", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show silenced alerts", + "description": "Include silenced alerts within the returned groups. If false, excludes silenced alerts from groups. Note that true (default) shows both silenced and non-silenced alerts.", "name": "silenced", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show inhibited alerts", + "description": "Include inhibited alerts within the returned groups. If false, excludes inhibited alerts from groups. Note that true (default) shows both inhibited and non-inhibited alerts.", "name": "inhibited", "in": "query" }, { "type": "boolean", "default": true, - "description": "Show muted alerts", + "description": "Include muted (silenced or inhibited) alert groups in results. If false, excludes entire groups where all alerts are muted.", "name": "muted", "in": "query" }, @@ -1006,7 +1006,7 @@ func init() { "type": "string" }, "collectionFormat": "multi", - "description": "A list of matchers to filter alerts by", + "description": "A matcher expression to filter alert groups. For example ` + "`" + `alertname=\"MyAlert\"` + "`" + `. It can be repeated to apply multiple matchers.", "name": "filter", "in": "query" }, @@ -1140,7 +1140,7 @@ func init() { "type": "string" }, "collectionFormat": "multi", - "description": "A list of matchers to filter silences by", + "description": "A matcher expression to filter silences. For example ` + "`" + `alertname=\"MyAlert\"` + "`" + `. It can be repeated to apply multiple matchers.", "name": "filter", "in": "query" } diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alert/get_alerts_parameters.go b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alert/get_alerts_parameters.go index 9f5a915c6fa..3c335fa160b 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alert/get_alerts_parameters.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alert/get_alerts_parameters.go @@ -64,17 +64,17 @@ type GetAlertsParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` - /*Show active alerts + /*Include active alerts in results. If false, excludes active alerts and returns only suppressed (silenced or inhibited) alerts. In: query Default: true */ Active *bool - /*A list of matchers to filter alerts by + /*A matcher expression to filter alerts. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. In: query Collection Format: multi */ Filter []string - /*Show inhibited alerts + /*Include inhibited alerts in results. If false, excludes inhibited alerts. Note that true (default) shows both inhibited and non-inhibited alerts. In: query Default: true */ @@ -83,12 +83,12 @@ type GetAlertsParams struct { In: query */ Receiver *string - /*Show silenced alerts + /*Include silenced alerts in results. If false, excludes silenced alerts. Note that true (default) shows both silenced and non-silenced alerts. In: query Default: true */ Silenced *bool - /*Show unprocessed alerts + /*Include unprocessed alerts in results. If false, excludes unprocessed alerts. Note that true (default) shows both processed and unprocessed alerts. In: query Default: true */ diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alertgroup/get_alert_groups_parameters.go b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alertgroup/get_alert_groups_parameters.go index e8b3e72eb35..0fb18bc602b 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alertgroup/get_alert_groups_parameters.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/alertgroup/get_alert_groups_parameters.go @@ -64,22 +64,22 @@ type GetAlertGroupsParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` - /*Show active alerts + /*Include active alerts within the returned groups. If false, excludes active alerts from groups and only shows suppressed (silenced or inhibited) alerts. In: query Default: true */ Active *bool - /*A list of matchers to filter alerts by + /*A matcher expression to filter alert groups. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. In: query Collection Format: multi */ Filter []string - /*Show inhibited alerts + /*Include inhibited alerts within the returned groups. If false, excludes inhibited alerts from groups. Note that true (default) shows both inhibited and non-inhibited alerts. In: query Default: true */ Inhibited *bool - /*Show muted alerts + /*Include muted (silenced or inhibited) alert groups in results. If false, excludes entire groups where all alerts are muted. In: query Default: true */ @@ -88,7 +88,7 @@ type GetAlertGroupsParams struct { In: query */ Receiver *string - /*Show silenced alerts + /*Include silenced alerts within the returned groups. If false, excludes silenced alerts from groups. Note that true (default) shows both silenced and non-silenced alerts. In: query Default: true */ diff --git a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/silence/get_silences_parameters.go b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/silence/get_silences_parameters.go index 0724540b846..48f4aa9cbd2 100644 --- a/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/silence/get_silences_parameters.go +++ b/vendor/github.com/prometheus/alertmanager/api/v2/restapi/operations/silence/get_silences_parameters.go @@ -45,7 +45,7 @@ type GetSilencesParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` - /*A list of matchers to filter silences by + /*A matcher expression to filter silences. For example `alertname="MyAlert"`. It can be repeated to apply multiple matchers. In: query Collection Format: multi */ diff --git a/vendor/github.com/prometheus/alertmanager/asset/asset.go b/vendor/github.com/prometheus/alertmanager/asset/asset.go index b4959299b1d..11d3736275a 100644 --- a/vendor/github.com/prometheus/alertmanager/asset/asset.go +++ b/vendor/github.com/prometheus/alertmanager/asset/asset.go @@ -12,7 +12,6 @@ // limitations under the License. //go:build dev -// +build dev package asset diff --git a/vendor/github.com/prometheus/alertmanager/asset/assets_vfsdata.go b/vendor/github.com/prometheus/alertmanager/asset/assets_vfsdata.go index 3dd06e052bd..1ae501d4ca6 100644 --- a/vendor/github.com/prometheus/alertmanager/asset/assets_vfsdata.go +++ b/vendor/github.com/prometheus/alertmanager/asset/assets_vfsdata.go @@ -44,27 +44,27 @@ var Assets = func() http.FileSystem { name: "lib", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), }, - "/static/lib/bootstrap-4.0.0-alpha.6-dist": &vfsgen۰DirInfo{ - name: "bootstrap-4.0.0-alpha.6-dist", + "/static/lib/bootstrap-4.6.2-dist": &vfsgen۰DirInfo{ + name: "bootstrap-4.6.2-dist", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), }, - "/static/lib/bootstrap-4.0.0-alpha.6-dist/css": &vfsgen۰DirInfo{ + "/static/lib/bootstrap-4.6.2-dist/css": &vfsgen۰DirInfo{ name: "css", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), }, - "/static/lib/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css": &vfsgen۰CompressedFileInfo{ + "/static/lib/bootstrap-4.6.2-dist/css/bootstrap.min.css": &vfsgen۰CompressedFileInfo{ name: "bootstrap.min.css", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), - uncompressedSize: 150996, + uncompressedSize: 162264, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\xbd\x5b\x93\xe3\xb8\x91\x30\xfa\x7e\x7e\x05\xb7\x1d\x1d\x3d\x3d\x23\xb2\x49\xea\x56\x92\x62\x26\xbc\x76\xec\x17\x9f\x23\x66\xfc\xb0\xde\x3d\x2f\xf3\xf5\x03\x25\x42\x12\xdd\xbc\x7d\x24\x55\xc5\x1a\xad\xce\x6f\x3f\x41\x00\x24\x71\x49\x5c\x54\x5d\x17\xf5\x78\xd6\x6b\xb7\x0a\x48\x64\x26\x12\x89\x44\x22\x09\x24\x3e\x7d\xff\x6f\xff\x8f\xf3\xbd\xf3\x97\xa2\x68\xea\xa6\x8a\x4a\xe7\x7e\xe6\xf9\x9e\xef\x46\x69\x79\x8c\xbc\x85\xf3\xdd\xb1\x69\xca\x7a\xfd\xe9\xd3\x01\x35\xdb\x1e\xc8\xdb\x15\xd9\xc7\xae\xd9\x5f\x8b\xf2\xb1\x4a\x0e\xc7\xc6\x09\xfd\x20\x70\x43\x3f\x58\x3a\xff\x75\x44\x0c\xba\x7f\x3f\x35\xc7\xa2\xaa\x95\xc0\x0f\x49\xd3\xa0\x6a\xe2\xfc\x2d\xdf\x79\x1d\xd0\xcf\xc9\x0e\xe5\x35\x8a\x9d\x53\x1e\xa3\xca\xf9\xe5\x6f\xff\xc5\xb0\x90\x34\xc7\xd3\xb6\x23\xfe\xa9\x79\xd8\xd6\x9f\x06\x7e\x3e\x6d\xd3\x62\xfb\x29\x8b\xea\x06\x55\x9f\x7e\xfe\xdb\x5f\xff\xe3\xef\xff\xf8\x8f\x8e\xbf\x4f\x9f\xbe\xff\x37\x27\x2f\xaa\x2c\x4a\x93\xdf\x90\xb7\xab\x6b\xe7\x7e\xde\x75\xcf\xf9\x1f\x8c\x99\x12\x73\xfe\xc7\x61\x50\xe7\x68\x57\xa4\x51\xfd\x89\x6f\xf7\xfd\xa7\x63\x93\xa5\xe7\x7d\x91\x37\xee\x3e\xca\x92\xf4\x71\x5d\x47\x79\xed\xd6\xa8\x4a\xf6\x9b\x34\xc9\x91\x7b\x44\x5d\xe7\xd6\x81\x17\xcc\x37\x6e\x56\xbb\x0d\x6a\x1b\xb7\x4e\x7e\x43\x6e\x14\xff\xf3\x54\x37\xeb\xc0\xf7\xdf\x6f\xdc\x07\xb4\xfd\x92\x34\x70\xed\x65\x5b\xc4\x8f\xe7\x2c\xaa\x0e\x49\xbe\xf6\x2f\x51\xd5\x24\xbb\x14\x4d\xa2\x3a\x89\xd1\x64\x5f\x14\x9d\xa8\x8e\x28\x8a\x51\x35\xc9\xa3\xfb\x49\x8d\x76\x4d\x52\xe4\xe7\x38\xa9\xcb\x34\x7a\x5c\x6f\xd3\x62\xf7\xe5\x72\x0c\x08\x9b\x1d\xf2\x75\x88\xb2\x0d\xc5\xe7\x2d\x96\x28\x73\xfc\xcb\x3e\x39\xec\xa2\xb2\x6b\x38\xd9\x27\x87\x53\x85\x26\x59\x94\x88\x48\x48\x4d\xcf\x4a\x80\x32\x67\xe6\x97\xed\xe5\x58\x9d\xfb\x0e\x6c\x8b\xb6\x23\x91\xe4\x87\xf5\xae\xc8\x1b\x94\xe3\xa2\x8d\xa2\x98\x0a\xc7\xdf\x14\xf7\xa8\xda\xa7\xc5\xc3\xfa\x3e\xa9\x93\x6d\x8a\x2e\x65\x85\x38\xb1\x66\x45\x5e\xd4\x65\xb4\x43\x93\xe1\xd7\x66\xec\x4f\x80\xb2\x4b\x74\xde\x46\xbb\x2f\x87\xaa\x38\xe5\xb1\xbb\x2b\xd2\xa2\x5a\x37\x55\x94\xd7\x65\x54\xa1\xbc\xe1\x25\x1c\xa3\x5d\x51\x45\x5d\x67\xdd\xfa\x4b\x52\xae\x8b\xed\x3f\xd1\xae\xa9\x2f\xd1\x3a\xda\x35\xc9\x3d\x9a\x44\xeb\x63\xc7\xd2\xb9\x38\x35\x78\x14\x1f\x92\xb8\x39\x76\xb2\xdf\x6e\xab\x5f\x9b\xa4\x49\xd1\xe7\xf3\xb6\xa8\x62\x54\xb9\xdb\xa2\x69\x8a\x6c\x9d\x17\x39\xda\x08\xc8\xd7\x58\x5d\x3b\x04\xea\x1a\x27\x2e\x9a\x06\xc5\x97\xed\xa4\x6e\xaa\x22\x3f\x90\x5e\x3f\x10\xc1\x24\xf9\x11\x55\x49\x03\x57\x6e\x8b\x34\x46\xd5\x65\x57\xc4\x68\xf2\x65\x1b\x4f\xea\x28\x2b\xaf\x94\x59\xbc\xcf\xa9\x56\x34\x8f\x29\x5a\x27\x4d\x94\x26\xbb\x4b\x16\x55\x5f\x64\x61\xfe\x69\xbf\xf7\x37\xf4\xa7\xef\xfb\x97\x3a\x8b\xd2\x94\xd1\xa9\x3b\xff\xfd\xa5\x3e\x6d\x27\xf5\xa9\x64\x4a\x97\xf3\xf7\xdc\x3c\xf0\x37\x65\x51\x27\x58\x04\x15\x4a\xa3\x4e\xd8\x9b\x7b\xd4\x69\x74\x94\xba\x51\x9a\x1c\xf2\xf5\x36\xaa\x51\xd7\xa4\xc3\x76\xa6\xd2\x75\xbd\x70\x8e\xb2\x4b\x87\xbb\x29\xca\xb5\xeb\x75\x7f\x45\xa7\x38\x29\x26\xf7\x49\x8c\x8a\x41\x4f\x93\x1c\x53\x23\xea\x8a\x01\xd6\x79\xd1\x7c\xf7\x6b\xa7\x75\x55\x91\xd6\x9f\x3f\x0e\xa0\x78\xc4\x7a\xb6\x2e\x49\x76\xe8\x47\x94\x08\xa3\xab\xbe\xd4\xf7\x07\xdc\x7e\x5d\x15\x45\xf3\xf1\x3c\xa8\xe9\x31\x89\x63\x94\x5f\xb6\xa7\xa6\x29\xf2\x49\x92\x97\xa7\x66\x52\x94\x4d\x27\xb0\x72\x52\xa3\x14\xed\x9a\x49\x37\xe4\x51\x85\x22\x95\x79\x60\x86\xa2\x33\x01\x92\xb5\x18\x26\x3c\x4b\xe5\x2c\xcd\x14\x5a\x4b\x88\x9e\xb1\x9e\x61\xbd\xdf\x17\x15\xd1\xca\xcb\xaf\xcd\x63\x89\x7e\xac\x50\x8d\x9a\xcf\x13\xf2\x47\x7d\xda\x66\x49\xf3\x79\x42\x1b\x77\x56\xcc\x21\x35\xa4\xe4\xf3\x30\xa1\xa3\xb2\x44\x51\x15\xe5\x3b\xb4\x26\x55\x17\x0e\x6e\xbd\x76\xb3\xe2\x37\x77\x5f\xec\x4e\xb5\x9b\xe4\x39\xaa\x26\x2c\x39\x65\x35\x65\x00\xa8\x27\x88\xe5\x0a\x79\x74\x36\x65\x14\xc7\x9d\x49\xf1\x05\x9e\xc6\xa6\x55\x92\x1f\x78\x86\xc0\xba\x9e\x1b\xa1\x92\xb2\xc2\x97\xf6\x36\x61\x1d\x94\x2d\x9d\xbc\xce\x5f\x30\xe0\x7f\xa1\xb6\xb9\xec\x13\x94\xc6\x35\x6a\x28\xbb\x18\xaa\x2e\xd2\x24\x76\xea\x24\xbd\x47\xd5\x30\xac\x4e\x58\xb6\x43\x0f\xbc\xe9\x1c\x65\x8e\xb7\x08\xf1\x3f\xcb\x4e\xbb\x53\x74\x40\x79\x0c\x19\xd6\xc1\xf0\x70\x76\x95\x29\x25\xb3\x94\x1a\x8f\x4d\xaf\xef\x4d\xb4\x4d\xd1\x26\x8b\x5a\x6a\xcd\xb0\xd6\x0d\x22\xdc\x3c\x1c\x93\x06\xb9\xd8\x4a\xac\xc9\x2a\x77\x29\xab\xe2\x50\xa1\xba\x06\x67\x97\x72\xda\x0e\x7a\x3f\xa8\x6a\x74\x6a\x0a\x3a\x44\xbb\x23\xda\x7d\xd9\x16\x6d\xaf\x88\x55\x14\x27\xc5\xe7\x27\xf5\x52\x1c\xfd\xfc\x94\x6d\x51\xd5\xa9\x14\x45\x86\xd5\xc6\xad\xcb\x24\x77\xa9\x9e\x2b\x00\x8b\x53\xc3\x03\x9e\xe9\x3c\x64\x18\xaf\x51\x54\xed\x8e\xe0\xbc\xe8\x3a\x8c\x87\x7d\xd3\x2f\x17\xc5\x7e\x5f\xa3\x66\xed\x86\x65\xcb\x37\x1f\x69\x92\x02\x77\xd7\x61\x48\x79\xfe\x54\xb0\xe3\xf2\x01\x71\x81\xa7\xfa\xd8\x66\x9f\xa4\xc8\x3d\x95\x69\x11\xc5\x7d\xa7\x94\x53\x1a\x9b\xa2\x61\xb1\x89\x51\x13\x25\x69\x3d\xc9\x50\x7e\x12\xd6\xff\xfa\x94\x65\x51\xf5\x38\x94\xa6\x49\xdd\xb8\x49\x83\xb2\xcb\x2e\xca\xef\x23\x58\x51\x2e\x0d\xca\xca\x34\x6a\x10\x67\x79\x2f\xbf\x12\x1b\xfa\x99\x2f\xfd\x73\x86\xe2\x24\x72\xca\x2a\xc9\x9b\xf3\xf7\x93\xf5\x3a\xda\x77\xee\xcd\x7a\xbd\x45\xfb\xa2\x42\x13\x8c\xf1\xff\x9e\x8a\x06\xad\xd7\xfb\xa4\xaa\x1b\x37\x45\xd8\x57\x04\x2a\x92\x1c\x4d\xe2\xe4\x5e\x00\x64\x4b\x3a\x88\x34\x11\x00\x98\x82\xae\xbe\x14\xaa\x4b\xb6\x96\xd8\xdb\xfa\x18\xc5\xc5\x03\xee\xc0\xbf\x25\x59\x59\x54\x4d\xc4\x78\x1c\x58\x7b\x41\x08\x65\xcd\x25\x9a\x44\xd8\xc0\x37\x28\x3e\x2b\x5d\x07\xd6\x1b\xa1\x82\x3a\x53\xef\x6a\xfd\xce\xf9\xee\x9d\x13\x35\x4d\xf5\x1d\xae\xff\xe8\xbc\xfb\xf8\x0e\x3b\x55\xec\x34\x2f\x2b\xe4\x3e\x54\x51\xc9\x10\x1e\xc5\x38\xe9\xa0\x25\x23\xf6\xa7\xd5\x6a\xb5\x29\xa3\x03\x72\xb7\x15\x8a\xbe\xb8\x49\xde\x79\xa1\xeb\xe8\xbe\x48\xe2\x4b\xd3\x79\xa1\x67\xce\xde\xb8\xc4\x31\x75\xf1\xca\xd8\x2d\xb2\x93\xa6\x3a\xab\xda\x1f\xc3\xc9\x71\x3a\x29\xcf\x45\x55\x1e\xa3\xbc\x5e\x4f\x37\x0f\x49\x5c\x3c\xd4\xeb\x29\xa9\x62\x1b\xe2\xee\xd2\x76\x5e\x1e\xdd\x6f\xa3\x8a\xd7\x24\x6f\x1b\xc5\x07\xa8\x07\x9d\xf3\xe2\x61\xe6\xfa\x25\x65\x57\xa4\x69\x54\xd6\x68\xdd\xff\x60\x04\x42\x20\x9d\x26\x9e\xf4\xbf\x8e\xa0\x6f\xb4\x97\xda\xb8\x04\x3b\x8a\xc7\xc6\x4c\xd1\x11\xe0\x2c\x8e\x63\x06\xcb\x05\xef\x2d\x9e\x60\x19\x2f\xf2\xbc\x81\xd0\xf4\xeb\x83\x5c\x74\xf9\x73\xb7\x53\xb9\x4f\xd0\x43\xc7\xcb\x99\x2c\x17\x31\xba\x4f\x76\xd4\x13\xa6\xac\x65\xb5\xdb\xdb\x78\xba\x2c\xd7\xbb\xaa\x48\xd3\x6d\x54\x8d\xfe\x76\x54\xba\xc7\xe4\x70\x4c\x3b\x83\x2a\xfb\xe5\x64\x6f\xc3\x7a\x48\x9d\x79\x4a\x91\x5b\x3f\xd6\x0d\xca\x26\xe4\x1f\xf7\x94\x4c\xfe\x92\x26\xf9\x97\x5f\xa2\xdd\x3f\x70\xc9\xff\x2a\xf2\x66\xf2\xee\x1f\xe8\x50\x20\xe7\xbf\xff\xf6\x6e\xf2\x9f\xc5\xb6\x68\x8a\xc9\xbb\xff\x8d\xd2\x7b\xd4\x2d\x4b\xce\xdf\xd1\x09\xbd\x9b\xfc\x7b\x95\x44\xe9\x04\xf6\xba\x2a\x94\x6d\x58\x87\x7a\xe6\xfb\x82\x17\x36\xef\x1d\xde\x70\x15\x6e\xc3\xdd\x06\x1c\xf8\xcb\xaf\x4d\xb4\x4d\xf2\x18\xb5\x3f\xbe\x73\x83\x77\x9f\xd7\xd8\x55\x18\xdc\x04\x9f\x19\xd2\x63\x30\x21\x3a\x7e\x9c\x4d\x8e\xf3\xc9\x71\x41\xb7\x52\x6e\xe7\xd4\xfa\xd4\x35\xe8\x77\x14\xde\xbc\x42\xd9\xa5\xd4\x81\x74\x5d\x20\x56\x20\x8e\x9a\xc8\x2d\xaa\xe4\x90\xe4\x51\xea\x12\x9b\x30\x61\x77\x2b\xbb\x53\x55\x17\xd5\xfa\x88\xd2\xf2\x12\xc5\x31\x5e\xd6\x65\x64\x1b\x66\x37\x40\x9c\x00\x4e\x22\xc3\x12\x91\x4e\x8a\x74\x72\x4a\x8d\xbc\x15\xa9\x53\x74\xb0\xce\xa9\x03\x77\x70\x23\x67\x6c\x47\x41\xfd\x4b\xdc\x70\x5b\x9b\xa5\xef\x5f\xe2\xf8\x0c\xc8\xa3\x27\x92\xa2\x7d\xe7\xb5\x8f\xe6\x6a\xd8\x1f\x3b\xbe\x43\xc4\x72\xee\x37\x2b\xe1\x72\x1e\xdf\x49\x3b\x30\x6c\x24\x22\x32\x58\xc3\x7e\xaf\x6f\x12\xcc\x76\x77\xbb\x8d\xc6\xf2\x92\x5d\xc5\xb1\x42\xfb\xcf\x1f\xc9\xef\x5e\x09\x3e\x7f\x3c\xf3\xfe\x97\x82\xb0\x06\xc1\xc0\x94\x0e\x86\x65\xf8\x6b\x49\x8d\xca\x8a\xd7\x08\xc3\xa8\x6e\x78\xc7\x8e\x0f\x0a\x0c\xf2\xef\x36\x54\x82\x8b\x98\x25\x71\x9c\xa2\xcb\xaf\x55\x91\x8e\x1b\x0d\xaa\x98\x65\x91\xe4\x0d\xaa\xf8\xca\x49\x34\xe9\x3c\xc9\x09\xb7\xcf\x4a\xa3\x2d\x4a\xfb\x4d\x16\xf5\x48\xc6\xcd\x16\x8e\xb1\x14\xa7\xdd\xd1\x8d\x70\x18\x64\x9d\x45\x79\x52\x9e\x52\x2c\x90\x8d\xb2\xe6\xa2\x5f\x10\x36\xba\xd8\xc2\x85\x06\x4e\xce\xd4\x23\xc5\x82\xf3\x96\x58\x5d\xfb\xa2\x5e\x87\x49\x29\x55\xb3\xc5\x74\xb1\x5b\x86\x64\xd4\x88\x84\x3a\xb5\xde\x50\x74\x2e\x5e\x19\x49\xc3\x4b\x73\x3c\x0b\x60\x17\x2c\x07\xd8\x35\x87\x0c\x09\xdd\xcc\xf0\xe3\x3d\xee\x61\x7a\xdf\x75\x3d\x2f\x5b\xa7\x1b\x57\x67\xf0\x24\xf1\x1e\xac\xdb\xfa\x90\xae\xf3\xbb\x5e\x71\xb3\x0b\x99\x0b\x0c\x29\xf8\xff\xeb\x38\xa9\x3b\x91\xc7\x13\xa6\x96\xec\x06\x86\xaa\x5e\x37\xf2\xa2\xeb\x78\x5a\x3c\xa0\x98\xc5\x15\x47\x0d\xfa\xcc\x36\x6f\x92\x8c\x2f\xe8\x20\xba\x42\x37\x2d\x76\x51\xca\x55\x65\x45\xde\xc0\xee\x7c\xe7\xd4\x76\xab\xe8\xd0\xa5\x0a\xe1\xf5\xa2\x57\xe6\x71\x8b\x97\x25\x79\x1f\x19\x62\x36\x52\xfd\x44\xd8\xd0\x05\xde\xef\xb7\x72\x9c\x2f\xbd\x01\x37\x61\x90\xc5\x63\x56\x2c\x52\x60\x10\xb1\x66\xa7\x82\xed\x41\x71\x6a\xca\x53\x03\xbb\xea\xa0\x53\xce\x7a\x36\xc7\x60\xe2\x1d\xc3\x89\x77\x9c\x4e\xbc\xe3\x6c\xe2\x1d\xe7\x13\xef\xb8\x98\x28\x17\x36\xb9\x27\x74\x99\xef\x4d\x16\x6b\xf6\xe7\xd2\x02\x1c\xf0\x7b\x59\x4c\x9f\x8f\x64\x12\xe5\xee\x78\x3a\x86\x6c\x39\x29\x9d\x76\x5e\x23\x2b\xc0\x25\x05\x9f\x4d\x8e\xb3\xb3\x28\xd9\x4b\xd7\x9d\xe3\x9c\x2b\x0f\x69\xc5\xa2\xeb\x14\xef\x3c\x5c\xbc\xb4\xf3\x77\x25\x68\xae\x4f\xd3\xce\xdb\xa4\xd2\x74\x59\xce\x17\x00\xa4\xd8\xfb\xb1\x25\xdb\xb7\xb9\x37\xbf\xaa\x2d\x2b\x81\xd9\x95\x6d\x59\x21\x4d\xed\xda\x1e\x2b\x76\x01\x09\x98\x45\x9b\x5d\x43\xfa\xc9\x41\x7f\x10\xd8\xc1\x15\xae\x0e\xdb\xe8\x3b\x7f\xd2\xfd\xc7\x0b\x3e\x5e\x3c\x1c\x6c\x9c\x00\x21\x47\xd1\x81\xbb\x78\x59\x54\x7d\x99\xe0\x10\xe6\x10\x5c\x09\x3b\x7a\xb2\xeb\xb6\xdb\xdf\xa1\xe9\xc5\xc3\x9b\xd8\x53\x8e\x9d\x9e\x78\xb0\xe1\xc4\xc1\xd8\xe0\x4a\x26\x20\x48\xa0\xc9\x9c\xb9\x06\x16\xef\x92\xe1\x39\x27\x81\x91\x88\x63\x1a\xd5\x8d\xbb\x3b\x26\x69\xfc\xb1\x97\x67\x45\x66\x49\xd9\x5e\xbc\x24\x4f\x9a\x24\x4a\x93\x3a\x63\xe4\xb1\xf2\xdf\x6f\x84\x00\xe0\xa9\x2c\x51\xb5\x8b\xea\x6e\x3f\x34\xfa\x4a\x83\x64\xba\x01\x75\x54\x43\x24\x2b\x36\x1d\x2b\xdc\x5f\x52\xd4\x6f\x5d\xd0\x0e\x21\xb4\x67\x89\xb8\xe4\xcb\x84\x60\xf5\xf8\xc1\xe3\xd6\x41\xa0\xf1\xb0\x7d\x19\xb6\xb5\xff\x27\xf4\x83\x99\xf3\x7f\x7c\xff\xdf\xfd\x77\x5c\x83\x0a\xdd\xa3\xaa\x1e\xc7\x84\xc8\x2a\x60\xd7\x60\x3a\x4c\xcc\x3a\x8a\x81\xfa\x5e\x91\x16\x50\xb7\xb8\x7e\xfb\x10\x59\xc7\x86\xf7\x77\xd6\x2d\x85\xbd\x3c\xee\xae\x83\xbb\xfe\xee\xe2\x25\xd9\xc1\xdd\xa7\xa7\xa4\xf3\x8f\xb9\x58\x1e\x1b\xb4\xc2\x50\xcd\xf1\x94\x6d\xf3\x28\x49\x99\xa9\x40\xc6\x11\xda\xc7\x6c\xc0\x0d\xe9\x20\x9d\x28\x4e\x4e\x75\x8f\x60\xd8\xdd\x75\x8a\x46\xc2\xf9\x51\x9a\x3a\x5e\x58\x3b\x28\xaa\x91\x9b\xe4\x6e\x71\x6a\x36\x6e\x61\x82\x30\x54\xeb\x7a\x48\xfd\x4e\x78\x4e\x91\x4a\xb7\x73\x42\xa1\x95\x88\xb3\x59\x03\x74\xef\xc7\xf1\x33\x8a\x57\xd2\xe1\x73\x4b\x59\x21\xf9\x93\xcb\x2f\x28\x4f\x8b\xc9\x2f\x45\x1e\xed\x8a\xc9\x5f\x8b\xbc\x2e\xd2\xa8\x9e\xbc\xfb\x39\xd9\x22\xe2\x92\x3b\xbf\x14\x79\xf1\x6e\xf2\xee\xaf\xc5\xa9\x4a\x50\xe5\xfc\x1d\x3d\xbc\x1b\x3f\xcf\x60\xec\xcc\x60\x75\x9a\xe8\xcd\xf8\xb9\xc8\xb0\xb4\x8d\x67\xc1\x6c\x09\x8d\xe6\x72\xbf\xdc\xaf\xc0\xa1\xbb\x44\x3f\x71\x44\x7c\x21\x5a\x2c\x21\xeb\x97\xde\x2f\xdb\xd8\x9e\x33\xac\x4e\x12\x5b\xfd\x2e\x5a\x60\xab\xe3\xea\xcb\x36\x76\x58\x0a\xbe\xf8\x79\x44\xdc\x1e\x96\xcc\xd0\x73\x4e\xaf\x72\xd7\x02\x32\x4a\x58\xea\xb0\x39\x82\x58\x46\xf0\x5e\x34\x06\x41\xb1\x5f\x1b\xf9\x2e\xfa\x17\xaf\xac\x90\x4b\x82\x23\x78\x9f\xd1\xe9\x35\x55\xbf\xe9\xcc\x2f\xdb\x61\x4b\xe5\x3e\xd2\x18\xca\xc5\xeb\xa6\x7f\x94\xe4\xa8\x3a\xcb\x9f\xcc\xd8\x5d\x70\x37\x1b\x36\xdc\x0a\x81\x4b\x04\x43\x38\x1f\xbf\x36\x90\x66\x5d\x49\x1f\x6e\xfd\x6e\xf4\x64\xe7\xcb\x45\xd9\x7e\x3c\xb3\xd4\x6d\x10\x01\x98\x96\x8b\xbb\x67\xc2\xb4\x5a\x85\xcf\x84\x29\x08\x7d\xff\x99\x50\xc9\x82\xa2\xe5\x78\x3c\x79\xc3\x65\x27\x1e\x5a\x1e\xda\xb5\x97\x85\x42\xcb\x17\x76\xed\x01\x51\xd0\x8a\x00\xec\xc1\x08\x47\x57\x9f\x37\xd5\xca\x9e\x87\xe7\xd2\xcd\xaf\xc4\x27\x0d\xc6\x57\xe2\x93\x07\xe7\x2a\x84\x5e\x55\x3c\x0c\xd6\x91\x09\xfd\x6e\xc4\xb2\x7d\x8a\x98\xc2\xac\xc6\x05\x2c\x20\x06\x60\xa1\xf1\x07\x83\x75\xf7\x3f\x9b\x1e\x9e\x29\x12\xfe\xe4\xc6\xdf\xc5\xdc\xb2\x3a\xe2\x1a\x46\xbb\xeb\x85\x15\x0a\xcd\x08\x7f\x0d\x8e\x7e\x54\xbf\x06\xc7\x30\x92\xf6\x48\xbc\xbc\x70\x0f\xa7\xa6\x41\x55\xcd\xb7\xf0\x85\xe8\x27\x03\xf8\x93\xb7\x2b\xd2\x09\x5b\xf0\xeb\x2e\x8d\xea\xfa\xfb\x1f\x77\x45\xea\x7e\x16\xf4\xc6\x17\x7c\xe2\x0b\x69\xdd\x81\x06\xf4\x1f\x9f\xfe\xdb\xff\x1d\x92\x7f\xe9\x3f\x53\xf2\xcf\x8c\xfc\x33\x27\xff\x2c\xc8\x3f\x4b\xf2\xcf\x1d\xf9\x67\x45\xfe\x49\x0f\xfd\xbf\x3d\x85\xee\x97\x3f\xfe\x64\x4a\xc3\xe1\xe7\xf8\x6b\x3a\xfc\x9a\x0d\xbf\xe6\xc3\xaf\xc5\xf0\x6b\x39\xfc\xba\x1b\x7e\x51\x16\xb2\xb8\xff\xb7\x67\xa1\xfb\xe5\x8f\x3f\x99\xd2\x70\xf8\x39\xfe\x9a\x0e\xbf\x66\xc3\xaf\xf9\xf0\x6b\x31\xfc\x5a\x0e\xbf\xee\x86\x5f\x94\x85\x3a\xeb\xff\xed\x59\xe8\x7e\xf9\xe3\x4f\xa6\x34\x1c\x7e\x8e\xbf\xa6\xc3\xaf\xd9\xf0\x6b\x3e\xfc\x5a\x0c\xbf\x96\xc3\xaf\xbb\xe1\x17\x65\xa1\x4d\xfb\x7f\x7b\x16\xda\x71\xb4\xdb\x71\xc0\xdb\x71\xcc\xdb\x61\xd8\xdb\x61\xe4\xdb\x61\xf0\xdb\x61\xfc\xdb\x41\x05\xda\x41\x0b\xda\x41\x11\xda\xd4\x5d\x01\x6b\x06\xe3\xdd\x77\x93\xa6\xf7\xc9\x19\xbb\xf6\xe4\xa5\xe2\x0f\x8d\xfe\x43\xa3\x5f\x5e\xa3\xbf\xda\x03\xf9\x43\x4d\xff\x50\xd3\x9b\x55\xd3\xd1\xb1\xfd\x43\x4d\xff\x50\xd3\x9b\x55\x53\x66\xbf\xf4\x87\x9e\xfe\xa1\xa7\x37\xa2\xa7\x1d\xfc\x99\xdb\x3c\x6f\xa3\x3a\xa9\xd7\xfe\xb8\x75\x2e\x2b\xb4\x47\x55\x85\x62\x12\x6a\xf4\x37\x3c\x18\x73\x6a\xab\xab\x58\x07\xfc\x5e\xfc\x50\x15\x0f\x5d\xd9\x80\x0d\xbb\xd7\xf7\x68\x1d\x6c\xd8\x7a\x21\x94\x83\xbb\x11\x9d\x9a\xe2\x2c\xe1\xf7\x39\xfc\xf8\x30\x07\x0e\xdb\xf4\x14\xc6\x12\xfe\x2f\x82\x9d\xc4\xe5\xf1\x34\xb3\x42\x7d\xe7\x4d\xf1\xff\xbd\xe7\xf1\x8f\xc5\x40\xd1\xd8\x97\xa1\x8c\x90\x0c\xad\x48\x06\x0b\x6f\xd1\xfd\xdf\x52\xa0\xc9\x94\x43\x65\x8c\x04\x87\x42\x42\x76\x6a\x45\x36\x9c\x0b\xf4\xba\x02\xee\x8f\x91\x42\x38\xa7\xa8\x67\x56\xa8\xa7\x53\x58\x8a\x4c\x39\x54\x36\xd2\x1b\x0b\x09\xd9\xb9\x15\xd9\x59\x00\x0b\x92\x29\x87\xca\x46\xb2\x63\x21\x21\xbb\xb0\x22\x3b\xf7\x05\x7a\x5d\x01\xf7\xc7\x48\x61\xde\xeb\xfa\xd2\x0e\xb5\x42\x1d\xe7\x80\x3e\xce\x21\x85\x9c\x0b\x1a\x79\x67\x45\x76\xa1\xd0\xc8\x05\xa0\x91\x0b\x48\x23\x17\x82\x46\xae\xac\xc8\x2e\x45\x8d\x5c\xb2\x1a\xb9\xe4\x34\x72\xd9\x6b\x64\xe0\xdb\xcd\x6b\x85\x4a\xde\x01\x2a\x79\x07\xa9\xe4\x9d\xa0\x92\x81\x9d\x3d\x59\x29\x74\x72\x05\xe8\xe4\x0a\xd2\xc9\x95\xa0\x93\x81\xa5\x51\xf1\x45\xad\x24\x9f\xac\xb8\xbf\x44\x23\x5c\x9e\xd2\xd4\xf5\xcf\x15\xf3\x45\x13\x17\x05\xb4\x88\x51\x26\x5c\x1e\xd2\x72\xd6\x00\xe1\x8a\x29\xad\xc0\x76\x03\x97\xcc\x68\x09\x3b\xb3\x71\xc5\x9c\x56\xb0\x73\x0f\x57\x2c\x68\xc5\x7c\xe0\x6c\xd9\x97\x88\x7c\xdc\xd1\x8a\x85\xc8\xc7\x8a\x56\x2c\x07\x3e\x82\xbe\x7b\x77\x22\x23\x41\xdf\xcb\x95\xc8\x49\x30\xf4\x93\x4a\xa9\x3e\xba\xfe\x79\xf8\xa4\x40\x4b\x02\x52\xc2\xf1\x56\x1f\xdd\x90\x14\xf3\x22\xaa\x8f\xee\x94\x94\x53\x09\xd5\x47\x77\x46\x0a\x78\x01\xd5\x47\x77\x4e\xca\x79\xf9\xd4\x47\x77\x41\xca\xe7\x03\x4b\x4b\x5a\x20\x72\x70\x47\xca\x17\x22\x07\x2b\x52\xbe\x1c\x38\x08\x68\xa7\xee\x44\x16\x02\xda\xb7\x95\xc8\x43\xd0\xf7\x0e\x0b\x86\x5c\x31\x71\x83\x33\x1b\x12\x66\xb8\xa1\xf5\x21\x57\xcf\x0a\x86\x02\x4c\x39\x00\x2c\x21\x5a\x33\xe3\x6a\x58\x51\x51\x80\x39\x07\xc0\xca\x8c\x02\x2c\x38\x80\x39\xc3\xf6\x92\xaf\x91\xf9\xbe\xe3\x00\x16\x32\xdf\x2b\x0e\x60\xc9\xf0\x1d\xf8\xbc\x4c\x64\xc6\x03\x5e\x6a\x8c\xa4\xb5\xe1\x44\xb7\xce\x6e\xd5\x9b\xab\xb3\x17\x76\xe8\x3a\x4f\xfe\xf5\x7d\xba\x6e\xd3\xf0\x36\x6e\x5d\xb7\x49\x79\x39\xcf\xae\xdb\xf8\xbc\x8d\x73\xd7\x6d\xb4\xde\xc6\xbf\xeb\x36\x76\x2f\xe7\xe2\x75\x9b\xc5\xb7\xf1\xf2\xba\xcd\xe9\xdb\x38\x7a\xdd\x66\xf8\xe5\x7c\x3d\xbc\xa3\x7f\x1b\x77\x0f\x47\x10\xde\xc6\xe3\xc3\x11\x8b\x17\x76\xfa\xea\x0c\xf2\xfb\xb0\x85\x85\x5d\x3f\x6c\x06\x15\xde\x1f\x36\x54\xa2\x03\x88\xed\x8b\xc2\x07\xc4\x16\x40\xe1\x06\xe2\x39\x2a\x7a\x82\x78\x6a\x29\x9c\x41\xac\xfc\x0a\x7f\x10\xab\xa7\xe8\x12\x12\xad\x52\x78\x85\x64\xdc\x15\x8e\x21\x19\x19\xc9\x37\xc4\xc2\x14\xdd\x43\x2c\x4b\xd0\x43\xc4\xa2\x84\x9d\x44\x2c\x49\xc1\x4f\xc4\x82\x84\x5d\x45\x2c\x47\xd8\x5b\xc4\x62\x14\x1c\x46\x2c\x45\xd8\x67\xc4\x42\x84\xdd\x46\x2c\x43\xc1\x73\x24\x22\x84\x9d\x47\x22\x41\xd8\x7f\x24\x02\x94\x5d\x48\x2c\x41\xe1\x60\xc1\x58\x65\x72\x30\xb1\x40\x0d\x3e\x26\x96\xac\xca\xcd\xc4\x22\x36\x78\x9a\x58\xd6\x06\x67\x13\x0b\x5d\xe5\x6f\x62\xe9\x1b\x5c\x4e\x3c\x0c\x06\xaf\x13\x8f\x87\xca\xf1\x24\x03\x63\xf0\x3d\xc9\x08\x29\xdc\x4f\xfd\x77\x42\x37\x8b\x6f\xd5\xff\xcc\xe2\x17\xf6\x3f\xb3\xf8\x2d\xfc\xcf\x2c\x7e\x2b\xff\x33\x8b\x5f\xd2\xff\xcc\xe2\xb7\xf2\x3f\xb3\xf8\xad\xfc\xcf\x2c\x7e\x49\xff\x33\x8b\xdf\xca\xff\xcc\xe2\xb7\xf2\x3f\xb3\xf8\x25\xfd\x4f\xfc\x51\xeb\x6d\xfc\x4f\xfc\x11\xed\x6d\xfc\x4f\xfc\xd1\xee\x85\xfd\xcf\x2c\x86\xfc\x4f\x6c\x61\x61\xff\x13\x9b\x41\x85\xff\x89\x0d\x95\xe8\x7f\x62\xfb\xa2\xf0\x3f\xb1\x05\x50\xf8\x9f\x78\x8e\x8a\xfe\x27\x9e\x5a\x0a\xff\x13\x2b\xbf\xc2\xff\xc4\xea\x29\xfa\x9f\x44\xab\x14\xfe\x27\x19\x77\x85\xff\x49\x46\x46\xf2\x3f\xb1\x30\x45\xff\x13\xcb\x12\xf4\x3f\xb1\x28\x61\xff\x13\x4b\x52\xf0\x3f\xb1\x20\x61\xff\x13\xcb\x11\xf6\x3f\xb1\x18\x05\xff\x13\x4b\x11\xf6\x3f\xb1\x10\x61\xff\x13\xcb\x50\xf0\x3f\x89\x08\x61\xff\x93\x48\x10\xf6\x3f\x89\x00\x65\xff\x13\x4b\x10\xf6\x3f\xb1\x1c\xf5\xfe\x27\x16\xa8\xc1\xff\xc4\x92\x55\xf9\x9f\x58\xc4\x06\xff\x13\xcb\xda\xe0\x7f\x62\xa1\xab\xfc\x4f\x2c\x7d\x83\xff\x89\x87\xc1\xe0\x7f\xe2\xf1\x50\xf9\x9f\x64\x60\x0c\xfe\x27\x19\x21\x7b\xff\x93\x39\x00\xe4\xa6\x87\x5b\xf5\x3f\xd3\xc3\x0b\xfb\x9f\xe9\xe1\x2d\xfc\xcf\xf4\xf0\x56\xfe\x67\x7a\x78\x49\xff\x33\x3d\xbc\x95\xff\x99\x1e\xde\xca\xff\x4c\x0f\x2f\xe9\x7f\xa6\x87\xb7\xf2\x3f\xd3\xc3\x5b\xf9\x9f\xe9\xe1\x25\xfd\x4f\x7c\xae\xeb\x6d\xfc\x4f\x7c\x8e\xec\x6d\xfc\x4f\x7c\x6e\xed\x85\xfd\xcf\xf4\x00\xf9\x9f\xd8\xc2\xc2\xfe\x27\x36\x83\x0a\xff\x13\x1b\x2a\xd1\xff\xc4\xf6\x45\xe1\x7f\x62\x0b\xa0\xf0\x3f\xf1\x1c\x15\xfd\x4f\x3c\xb5\x14\xfe\x27\x56\x7e\x85\xff\x89\xd5\x53\xf4\x3f\x89\x56\x29\xfc\x4f\x32\xee\x0a\xff\x93\x8c\x8c\xe4\x7f\x62\x61\x8a\xfe\x27\x96\x25\xe8\x7f\x62\x51\xc2\xfe\x27\x96\xa4\xe0\x7f\x62\x41\xc2\xfe\x27\x96\x23\xec\x7f\x62\x31\x0a\xfe\x27\x96\x22\xec\x7f\x62\x21\xc2\xfe\x27\x96\xa1\xe0\x7f\x12\x11\xc2\xfe\x27\x91\x20\xec\x7f\x12\x01\xca\xfe\x27\x96\x20\xec\x7f\x62\x39\xea\xfd\x4f\x2c\x50\x83\xff\x89\x25\xab\xf2\x3f\xb1\x88\x0d\xfe\x27\x96\xb5\xc1\xff\xc4\x42\x57\xf9\x9f\x58\xfa\x06\xff\x13\x0f\x83\xc1\xff\xc4\xe3\xa1\xf2\x3f\xc9\xc0\x18\xfc\x4f\x32\x42\xf6\xfe\x27\x7b\xb2\xd7\x6d\x6f\xf6\x38\x65\xfb\xd2\x27\x2a\xdb\x37\x39\x54\xd9\xbe\xd9\xb9\xca\xf6\x45\x8f\x56\xb6\x6f\x76\xba\xb2\x7d\xb3\x03\x96\xed\x8b\x9e\xb1\x6c\xdf\xec\x98\x65\xfb\x66\x27\x2d\xdb\x17\x3d\x6c\xd9\xbe\xdd\x79\xcb\xf6\xed\x8e\x5c\xb6\xaf\x70\xea\xb2\x05\x0f\x5e\xb6\xea\xb3\x97\xad\xe6\xf8\x65\x0b\x9d\xc0\x6c\x35\x87\x30\x5b\xcd\x39\xcc\x16\x3a\x8a\xd9\x6a\x4e\x63\xb6\x9a\x03\x99\x2d\x74\x26\xb3\xd5\x1d\xcb\x6c\x75\x27\x33\x5b\xf8\x70\x26\x16\xa6\xe8\x80\x62\x59\x82\x0e\x28\x16\x25\xec\x80\x62\x49\x0a\x0e\x28\x16\x24\xec\x80\x62\x39\xc2\x0e\x28\x16\xa3\xe0\x80\x62\x29\xc2\x0e\x28\x16\x22\xec\x80\x62\x19\x0a\x0e\x28\x11\x21\xec\x80\x12\x09\xc2\x0e\x28\x11\xa0\xec\x80\x62\x09\xc2\x0e\x28\x96\xa3\xde\x01\xc5\x02\x35\x38\xa0\x58\xb2\x2a\x07\x14\x8b\xd8\xe0\x80\x62\x59\x1b\x1c\x50\x2c\x74\x95\x03\x8a\xa5\x6f\x70\x40\xf1\x30\x18\x1c\x50\x3c\x1e\x2a\x07\x94\x0c\x8c\xc1\x01\x25\x23\xa4\x72\x40\x69\x62\x68\xf6\x56\x3a\x9f\x82\x0a\x48\x72\x0b\xa5\x88\x1e\x32\x25\x91\x84\x9f\x42\x22\xd4\xa6\x28\xe1\xbc\x77\x43\x1e\xb5\x1e\x11\x8a\x70\xae\x68\x31\xd7\x3e\xa6\xbe\xe1\x5f\x20\x09\x95\x58\xb6\x45\xfc\xf8\x03\xfe\xdf\x33\x43\x55\x09\xdf\x27\xc7\x06\x93\x1d\xd3\x44\xd6\x75\xc6\x64\xb5\xee\xfe\x60\xba\x3c\x1d\x85\x32\x24\xbc\x06\xb2\x5d\x73\x44\xaf\x4f\x96\xad\x6a\x4e\x44\x06\x21\xa1\xb2\xe4\xa4\xd6\x3b\x86\x65\x3b\xf4\xac\xa9\x92\xb2\x83\xef\xe4\xe5\x34\xd5\x3a\x6f\x8e\x6e\xb1\x77\x9b\xc7\x12\x7d\x57\xc4\xf1\x47\x59\x30\x6c\xb6\x42\x7f\xfe\xb1\xc7\x84\x33\xf4\x8e\x78\x48\xc2\x5e\x7d\xe3\xe5\xd8\x9a\xbe\x44\xc3\xfd\xf5\xd3\xd8\xaf\xbe\xe0\x68\x8f\x91\xf0\xc3\xb5\xbf\x96\x29\x25\x0a\x86\x33\x0d\xcc\x15\xcc\xd6\xa7\xdd\x0e\xd5\xf5\x84\xff\x93\x21\x33\x94\x40\xf9\xd8\xe3\xfd\xde\x8f\xef\x40\xae\x69\x3b\x55\xcf\xff\x14\xfb\x68\xb5\x5b\x98\x9b\xaa\x7a\x2c\x00\x1d\x8d\x24\x92\x7c\x5f\x4c\x98\xdf\x0c\x62\xf2\x27\x88\x62\x85\xe2\xfd\x12\xe4\xb2\x6b\xa4\xec\xdd\x6e\x86\xa6\xfb\xa9\xa1\x9d\xaa\x6b\x2c\xc4\xd1\x88\xfc\x21\xaa\xf2\x24\x3f\x4c\xf8\x3f\x19\xdc\x43\x09\x98\x51\x9f\x66\xe7\x04\xd8\xa0\xed\x94\x7d\xdc\x47\xfb\x70\xb7\x33\x37\x55\x75\x53\x00\x3a\x1a\x49\xc4\x51\x7e\x40\xd5\x84\xfb\x8b\x41\xde\x17\x80\x88\xc2\x18\xc5\x08\xe4\x95\x34\x53\xf6\x12\x6d\x77\x3b\x45\x2f\xd9\x96\xaa\x4e\xf2\x30\x47\x1d\x81\xce\x70\xba\x49\x4e\xd2\x55\x36\xc7\xb3\x45\x8e\xbf\xbe\x55\x8c\xf6\xd1\x29\x6d\x98\x56\xb3\xc5\x2c\x9a\x41\x99\xf4\x79\x7b\x4e\xc9\x59\xd2\x62\x9b\x38\xec\xf4\xe9\x79\x96\x4b\xf8\xc5\x40\x5e\xe0\x28\xa4\x62\x19\xeb\x5f\x90\x70\x2b\x54\x97\x45\x5e\x27\xf7\x48\x9d\xde\x79\xc8\xed\xd7\xae\x87\xd0\x8f\xf0\x6e\x42\x57\xd4\xd5\x1d\x13\x7c\x87\x78\x78\x46\x41\x26\xa3\x66\x68\x5f\x54\x99\x4b\xdf\xb9\x32\xe7\x9a\x26\xa9\x5f\xa9\x7b\x22\x3c\x8a\xc0\x67\xf4\x0d\x87\x57\x10\x94\x63\x27\x0c\x4f\x92\x45\x07\xfa\x44\xd3\xb0\x91\x63\xda\xa4\x49\xb9\x1e\xf3\xa2\xb7\x1b\x6d\x9d\xb8\xee\x73\x99\x81\xe7\x1f\xad\xd3\x93\xb2\x03\xcd\xa6\x18\x75\xbc\x60\x5e\x4f\xe4\xb7\x5a\x24\x98\xcd\xb3\x22\xe3\x33\xa3\xea\xf1\x3d\x0b\x53\x2f\x8d\xc4\xa6\xd7\xbc\x8e\xae\xb1\xd6\xa3\xb6\x8c\xf2\xf8\x6c\x91\x4d\x53\xd4\x71\x9a\xca\xde\x4a\x37\xb9\x59\x3e\xdf\x6d\xa7\xfb\x31\xe1\xbd\x2f\xb1\x35\xbc\x1f\x55\x9e\x1a\xb7\x4c\xa3\x1d\x3a\xe2\xb7\xf6\xce\x7c\xde\xfe\xa2\x8c\x76\x49\xf3\x88\x13\xc8\x0a\xfd\x2a\x7e\x7b\x42\xbb\x4e\x1c\x4f\xa6\x79\x7d\x93\x21\x01\x3f\x57\xfc\x6b\x85\xa2\xb8\xc8\xd3\xc7\xcf\x67\x95\x8d\x36\x62\x84\xf2\xf6\x93\x77\x02\x78\x78\xfc\x16\x45\x67\x76\xfa\x77\x29\xb2\x53\xda\x24\x65\x8a\x3e\x7f\xec\x5f\xe0\xda\x45\xe9\xee\xbb\x90\x26\x65\xfe\xc1\x09\xcb\xf6\x23\x88\x0a\xeb\x02\xd1\xa8\xfb\x28\x3d\x21\x1b\xb5\xe0\xb9\xc7\x2f\x66\xf1\xb2\x70\xab\x6e\x91\x14\xde\xc0\xc2\x51\x2a\x0c\x45\x1e\x60\x60\x1f\x7d\xc0\xdc\x12\xcb\xea\x3a\x9d\xcd\xfa\xde\x09\x3f\x8a\x6f\x40\xc0\x40\xe2\x8b\x28\x02\x19\x37\x3d\x00\x94\x96\x56\xa4\x24\x28\x20\xbf\xbd\x40\xad\xce\x00\x6a\xa1\x15\xb5\x50\x4d\xcd\xbb\x5b\x8a\xd4\xc8\xcb\x08\xdc\xc3\x19\xe0\xbb\x19\x73\x39\x47\xb9\xbf\x11\xd3\xf1\x73\x63\x57\x37\x51\x93\xec\x9e\x8a\x5a\x5a\x02\xa9\x0d\x22\x8b\x10\x90\xea\x97\x2e\xb1\x65\xeb\xf8\x20\x23\x7c\x59\x7a\x98\x98\x81\xea\x6c\xe2\x11\x7b\x80\x5f\xcf\x72\xd3\xc3\x4f\xc6\x46\x76\x2d\x58\x98\x28\x8e\x8b\x5c\x6e\xc6\xfe\xbd\x6d\x72\x18\xcf\xb6\x11\x5a\xd6\xd9\xb5\x2c\xaa\x5a\x18\x58\xec\x9a\xd9\xb2\x68\x4c\x7e\xa9\x95\xba\xc8\xa0\x9e\x0f\x5b\x56\x19\xb6\xfa\x94\xf3\xe2\x6b\x1f\x74\xb6\x80\xe9\xb2\x8d\x04\xa8\x8d\xdc\x36\xb9\xce\xca\x4a\x8c\x5e\x69\xa5\x55\xed\x25\x89\x68\x91\x00\x44\xdd\x3a\xb3\x59\x1d\x02\xef\x2e\xa0\x06\x4c\x9a\x5e\xba\x79\xa0\x57\x77\xdb\x19\xc1\x8d\x21\x31\xb2\x81\xfc\x64\x4b\x08\x0d\xe2\x54\x1a\x44\x88\xc2\x53\x06\x31\x3d\x7c\xdd\x20\x8e\xed\xbf\x7e\x10\xd3\x83\xcd\x20\x4e\xbd\x00\x47\x5f\xc7\x61\xc4\x34\xcf\x50\xa4\x15\x57\x37\xa8\x6d\xd4\xb9\xdf\x3d\x4e\x21\x8e\x68\xf7\x05\xc8\x3a\x0a\xb6\xe6\x9e\x4b\x62\xda\x7b\xbd\x5f\xe3\x30\x85\x74\xf5\xe7\x5d\x2d\xc0\xef\x91\x9b\xf0\x89\xa2\xa8\x7e\x88\xeb\x8f\xf0\x2a\x16\x8b\x85\xbc\x03\x3c\xf4\x29\xda\xd6\x45\x7a\x6a\x90\x2c\x03\x21\xb7\xb0\x2c\x18\x82\x6a\xdd\x79\x7b\xe4\xa5\x91\x11\x2b\xb1\x9e\x02\x30\x7e\xf4\x44\xf1\xde\x82\x08\x07\xc8\x0a\x7e\x0d\x4c\x6e\xfa\x03\x40\x95\xed\x4a\xff\x88\x0f\xef\xbd\x21\x14\x77\x5e\xde\x59\xa9\x0a\x14\xb0\x0f\xd6\xf0\xe6\xa6\x8f\x36\x72\xa5\x34\x10\x24\xac\x1f\xa1\xfc\x88\x46\x85\x4a\x14\x35\xeb\xbc\xa0\xbf\xd8\xba\x41\xa4\x3b\xd4\x0d\xa5\x43\x1e\xbb\xf7\xe6\x0b\x7e\xab\xca\xb4\xa0\x86\x83\x58\x36\xa7\xff\xb1\x31\x42\x5c\xbc\x63\x54\xf7\x5d\x71\x04\x97\x6e\x22\x54\x9e\xea\xa6\x60\xec\x21\x57\x29\x8e\x1c\x58\x2d\xc8\x5d\x07\xc3\x4d\x95\xf9\x6e\x7b\x37\xdf\x5d\xd4\xe0\x67\x69\xb7\x26\xc3\x4b\xb6\x89\xc7\xbe\x81\x50\x40\x31\xa7\x68\xbf\x40\x91\x86\x97\xbe\xf4\x2c\x45\x37\x4e\x55\xfa\xdd\xbb\x38\x6a\xa2\x35\xfe\xfb\x53\x7d\x7f\xf8\xa1\xcd\xd2\xcd\xee\x18\x55\x35\x6a\x7e\x3c\x35\xfb\xbb\xc9\xfb\xe9\x5f\xeb\xfb\x83\xd3\x66\x69\x5e\xff\xf8\xe1\xd8\x34\xe5\xfa\xd3\xa7\x87\x87\x07\xef\x61\xea\x15\xd5\xe1\x53\xe8\xfb\x7e\xd7\xf2\x83\x73\x9f\xa0\x87\xbf\x14\xed\x8f\x1f\xf0\x37\x7a\xe7\xee\xc3\xfb\xe9\x7f\xbc\x9f\xfe\xb5\x8c\x9a\xa3\xb3\x4f\xd2\xf4\xc7\x0f\xef\xc3\x29\xe9\xc7\x07\x27\xfe\xf1\xc3\x2f\xa1\x37\x75\x16\xde\x72\xfa\xb3\xb7\x70\x66\xde\x7c\xba\x73\xbd\x99\x1b\x78\xfe\xcc\x9b\x2d\xdc\xc0\x9b\x75\x5a\xe1\x7a\x77\x69\xe0\x05\x4e\xf7\xe7\xd4\x9b\xb9\x53\xef\x6e\xe7\x2d\x5c\x6f\x31\x75\x82\xee\xdf\x70\xe9\x04\x5e\xe8\x2d\x53\x77\xe6\xcc\xbc\x45\x87\x62\xea\xcd\x5d\xef\x0e\xa3\x0a\xbc\xe0\xb7\x0f\x9f\x08\x1f\x1d\x93\xef\xa7\xff\xf1\xee\x23\x91\x15\x9d\x18\xb0\x8e\x8d\x95\x80\x8e\x0d\x95\xb0\x8e\x09\xd5\xa0\x8e\xc1\x30\x9c\x8e\xed\xfd\x28\x9e\xa1\x8b\x1a\x5c\x8c\xfb\x41\xf0\x4a\x1d\x23\xd0\x1b\x08\x85\x6a\xa3\xa9\xe6\xbb\xb7\x31\x37\xa1\x60\xa4\x13\x44\xc1\x66\xde\xcc\x99\x7b\xd3\x70\x76\x74\xbd\xbb\x7b\x37\xf4\x66\x8b\xa3\x77\xf7\x5b\xe6\x77\xea\x14\x76\x85\xff\xef\xdc\xbb\x5b\x75\x65\xbf\x4c\xbd\xe5\xc2\x5b\x4c\x7f\xf6\xfc\x99\xb3\xf4\xfc\xe5\x7c\xe7\x7a\x41\x30\xf7\x42\xcf\x0f\x16\xde\x2c\x9c\x7b\x61\xf7\xcf\xe2\xb8\xf4\xa6\xab\xe5\xce\x0b\x67\xa1\xe3\x3b\xde\x74\x19\xba\x5e\x18\x2e\xbc\x70\x7e\xe7\x76\xf5\x7f\x5d\x78\xcb\xb0\xd3\xe7\x55\xd8\x11\x9f\x2d\x9d\xd0\x5b\xae\x9c\x99\x17\xce\xa7\xde\x62\x8a\xb1\x4e\x5d\x2f\x58\xce\x5c\x6f\xba\xa2\x3f\x66\xab\x99\xe3\xab\x34\x95\x58\x7b\x58\x51\x87\x3a\x40\x4f\xfb\x3a\x58\x4d\xf9\x5a\x50\x4b\x41\x10\x4e\x49\xe3\xd5\x7c\x3a\xdb\x5f\x94\xd0\x82\x8e\x42\xe0\x4a\x15\x25\xc0\x1b\x08\x03\xa4\xa2\xf1\x7e\xb9\x5f\xaa\x39\xa1\x85\x2f\xae\xa3\x83\x1e\x12\x4e\x19\xa5\x75\x43\xc7\x0d\x9d\xa5\xb3\x64\xd5\xb6\x6e\xaa\xe2\x0b\xe2\x1a\x74\x8a\xeb\x3b\x7e\x3a\x75\xa6\x99\xef\x4e\x7f\xf6\x9d\x69\xaf\x18\xbb\xa4\xda\xa5\xc8\xa9\x7e\xfc\xe0\xcd\x85\xb2\x5d\xfb\xe3\x87\xe9\x07\xb8\xea\x51\x5d\x45\x5a\x41\x10\x8c\x12\x62\x39\x0a\xae\xd3\x33\xbf\xc8\x81\x9f\x62\xad\x8a\x07\x87\x7f\x95\x83\x2f\x86\x20\x99\x88\x2d\x71\xc9\x88\x8b\x32\x54\xe0\x42\xfc\x24\x5d\x3d\x54\xf5\xd8\xb9\x06\x32\x20\xd7\x71\x76\x1a\x31\x47\x2b\x34\xd9\xb6\xd8\xc6\xfc\x3b\xa7\xcf\x27\xbb\x97\xe8\x36\x87\xbc\x8c\x76\x5f\xc4\xf2\x7f\x9e\xea\x26\xd9\x3f\xba\xfd\xdb\x6e\x22\x7e\xb6\x8d\x02\x56\x8a\x14\xca\x92\x26\x1b\xa8\x97\x11\xd9\x57\x9d\x6a\xbe\x79\xbd\xb5\x91\xae\xf8\x8d\x8d\x7b\x7a\x77\x3c\xb7\xbd\xd1\xed\x77\x20\x84\x7d\xc8\x52\xb3\xc3\xea\x9b\x31\x86\xff\xcc\x9e\x14\x57\xe3\x26\xb3\x48\xdc\x66\xda\xb3\x88\xe7\xee\x1f\x93\xb0\x2f\x66\x86\x59\xf3\xee\x9c\xaf\x14\x25\x14\x0b\xd0\x40\x0b\x7b\x7e\xf1\xc5\x2d\x8e\x36\xfb\x8e\xa5\xf8\x60\x10\x87\x9f\xf7\x7b\xfe\x18\xdc\x01\x56\x3b\x2a\xbc\xd4\xdc\x24\x8f\x93\x5d\xd4\x14\x95\x18\x3b\xd9\xe8\x5e\xe6\xe6\xc6\x48\x3c\x1c\x88\xda\x86\x2a\x90\x40\xba\xf3\xcf\x7a\x2f\x53\xe1\x7c\x9e\xb1\x2a\x5c\x2e\x38\x38\x09\x72\x20\x3c\x98\x2b\x7f\xe9\x60\xde\x47\xed\x95\xfd\x98\x34\xc8\xc5\x2f\x54\xae\xf3\x02\xdb\x60\xd0\x70\x0c\x63\x70\xaa\x51\xe5\x92\x88\x20\x3d\x06\x90\x15\xbf\x41\xa5\xb5\x5c\x28\x15\x48\x47\x00\xd8\xaf\x2f\xc0\x4b\xb6\xc2\x61\x86\xb7\x7c\xbf\x14\x0f\x03\x7d\xcd\x1f\xff\x24\x87\x79\xc0\x67\xfa\xbb\x7a\x8f\x01\x15\x1e\xe6\xdf\xc8\xdf\xd7\xf1\xb2\xea\x3b\x61\xd9\x92\x53\x11\xe1\x24\x08\x96\x93\x30\x58\x4c\xbc\x10\x9f\x8c\xb0\x03\x24\x94\xc7\xaf\xc1\x1d\x71\xcd\x97\xdc\xe1\xeb\xaf\xb7\x98\x93\xa6\xfd\x49\xc5\xae\x21\xf9\x7d\x06\x0f\x83\x5c\x22\x9e\x52\xff\x8e\xfa\xaf\x7d\xc9\x67\x27\x22\x41\x75\x12\xf5\x74\xd1\x3d\xca\x9b\x7a\x14\x8f\x5b\x56\x49\x16\x55\x8f\xfa\x53\x41\x7e\xb8\x9c\xc7\x77\xc2\xde\x87\x14\x72\x58\xe8\x60\x18\x70\xcd\xa3\x68\x2e\xe2\x0a\xe6\xb3\xd5\x96\xc3\xc5\x0c\xdc\x80\x9e\x0c\xe0\x55\xc3\x66\x3b\x6a\x74\xd0\x06\xea\xdc\xe0\x0d\x0c\x0c\x83\xf8\x74\x19\xb1\x63\x3b\xe0\xed\xcb\xea\x63\xf1\xf0\x13\xcf\x47\x55\x94\x71\xf1\xd0\x2d\x48\x87\x43\x8a\xec\x64\x0b\x9e\x1b\x52\x4b\xbc\x46\xbb\x22\x8f\x19\x2d\xe8\x5f\x95\xb5\x38\xf9\x81\xcf\xb3\x71\x48\x78\x25\x50\xa2\x42\x8b\xee\x3f\x02\xb6\x28\xee\xfe\x23\x20\x64\x35\x61\xa4\x62\xad\x0b\xfe\x6c\xd2\xff\xd7\xa0\x0d\x3c\xa4\xc8\x05\xaf\x11\x23\x23\x1a\x9d\xb0\x11\x17\xa7\x0f\x23\x56\x59\x23\x18\x4e\x60\x9d\x30\x8a\xda\x42\x2d\xd8\x01\x48\xf2\x7d\xa1\xd7\xb7\xf9\x76\xe7\xc7\x22\x0a\x52\x38\xa2\xb0\x31\x0a\xd3\x60\xeb\xc7\xa2\x51\x08\xa3\x68\x1b\x87\x23\x22\x56\x0f\x30\x62\x5b\x15\x58\x05\x93\x60\x15\x4e\xc2\x30\x34\x68\x00\x0f\xc8\x50\xe6\xc7\x1e\x13\xd7\x0c\xbb\x95\x58\xb8\x71\xc7\x18\xe5\x21\x27\xb4\xaf\xb1\x00\xbd\x20\x2d\x86\x9a\x15\x6f\x1f\x93\xd7\x8f\xb6\xfa\x43\x00\x87\xc5\x66\xc0\x67\xb3\x55\x3c\x9b\x09\xb8\x66\xc1\x6a\x31\x0b\x38\x5c\xdc\xdc\xa7\xe8\xad\x87\x3d\x9c\x04\x77\xb3\xc9\xca\x38\xea\x2c\x1c\x4f\x5d\x98\xf3\x94\x01\xdd\xd0\x5b\xca\x88\x9f\xf5\x14\x2f\x30\xe7\x7b\x3e\xae\xd1\x81\x5e\xb6\x16\x3a\xc0\x4a\xbc\x0f\x9b\x6b\x71\x6b\x02\xf5\x1c\x16\x1b\x1d\x40\xbb\xd5\x32\x10\x0d\x24\xda\xae\xa6\xc1\x82\xc3\xc5\xea\x40\x8f\xde\xda\xfa\xcf\xfc\x49\xb0\x9c\x4e\x96\x77\x26\xe3\xcf\x01\xf2\xf4\x79\x2d\xe8\x59\xd0\xd9\x7d\x4b\x29\x71\x5a\xd0\xe3\x95\xb5\x60\xe0\xe3\x1a\x2d\xe8\xa5\x6b\xa1\x05\xac\xcc\x69\x5c\x5a\x8b\x5a\x13\x0a\x67\x91\xd8\xe8\xc0\x6e\x35\xf5\x43\x71\xbe\xec\x82\x10\x85\x11\x8b\x8a\x55\x01\x8a\xdc\x5a\x03\x82\xe5\xe4\x6e\x3a\x59\xae\x4c\x0a\xc0\xc2\x71\xb4\xf9\xe1\xa7\xe4\x35\xa3\x6f\x29\x1e\x6e\xf0\x29\x56\x79\xec\x7b\x1e\xae\x19\xfa\x5e\xa8\x16\x43\xcf\x8a\x9a\x6e\x8c\xc4\x2d\x41\xef\xd8\xc2\xd8\x2c\x9e\xec\x07\x7c\x61\x81\x94\xdd\xbe\xc1\xe0\x5f\x0b\x38\x59\x95\x11\xc9\xbd\xc2\x3e\x42\xe4\x86\x57\x22\x91\xa1\x71\x73\xa8\x92\xb9\x24\x5d\x98\x0c\xab\x53\x22\x11\x59\xb9\x24\x26\xaf\xdb\x6c\x58\x0e\x88\xb4\xbd\xd8\xed\x76\x5f\xaf\x4e\x83\x27\x2d\x91\xb1\xb2\x3b\xbb\x9d\x35\x3e\x48\x93\x5e\x7d\x1f\x22\x73\x05\x6b\x14\xb0\x2f\x81\xa5\x6e\x50\x28\x78\x7f\x22\x53\x51\x2b\x95\x71\xbf\xf2\xe4\x91\x61\x37\x26\xbd\xaf\xfd\xb5\xea\xc4\xba\xe7\x2c\x1d\x1b\x65\x32\xfa\xfb\x2c\x42\x48\x9b\x5e\x6f\x37\xc3\x71\x02\x6b\x10\xbf\xbb\x51\x8a\xd9\xa0\x3f\xd2\x16\x87\x43\xaf\xd6\x9a\xeb\xb7\x3c\xd6\xd2\x17\x36\x39\xf2\x11\xa6\x27\x6a\x0e\xe3\xdd\x0b\xa4\xac\x94\xc7\xb4\x63\x10\x70\x82\xd6\xe8\xf5\x76\x46\x22\x37\x0a\x2b\x24\xee\x94\x0c\xc7\xc6\xd4\x66\x08\xd8\x2e\x89\x44\x34\x26\xe8\x29\xdb\x27\xeb\x01\x11\x37\x4c\xd2\x71\xa5\xa7\xe9\x13\xbb\x4f\x10\x48\xd9\xe8\x93\x71\xef\x21\xe0\x84\xf4\xe9\x55\x77\x59\x22\x3f\xb0\x46\x49\xbb\x2e\xc3\x21\x31\xa5\x46\x41\x5b\x2f\x91\x88\x5a\xa3\x9e\xb4\x15\xb3\x1e\x12\x7e\xf3\x25\x1f\x2e\x7a\x9a\x42\xb1\x5b\x0f\x9e\x92\x8d\x3e\x19\x77\x33\x3c\x4a\x48\x9d\x5e\x6f\xc7\x26\xf0\x02\xab\x92\xb8\x83\x33\x9c\xe5\x52\x6a\x12\xb0\x8d\x13\x48\xa8\xf5\xe8\x29\xdb\x3a\xe3\x48\xa4\x49\xfe\xe5\x2c\x7e\x8c\x04\xbd\x75\xfa\xe9\xce\x1f\xdb\x4d\x86\x5f\x5c\x87\xba\x82\xb5\x54\xa0\xde\xfc\x4a\xc2\xe2\x71\xcb\xa8\x88\x52\x70\x7d\x02\x71\xf4\x97\xf6\xcd\x80\x8c\x02\x32\x0d\x87\xcf\x1e\xb3\xdd\xdd\x6e\x23\x7e\x2e\x3c\xe5\x31\xaa\xba\x81\xd9\xd8\xf5\x48\x52\x1e\x72\x5b\x01\x00\x90\xd8\x19\x2a\x0c\x1f\x2e\x99\x4b\x2c\xf8\x4e\x18\x46\x70\xf8\xba\xdb\x31\x23\xda\x3a\x63\xd0\x8e\x57\x13\x9f\x74\x71\xaa\x43\x81\x3f\x84\x2b\xaf\xc8\x33\x30\x3f\x30\xe0\xec\xbd\x02\x7c\xda\x1e\x9f\xc9\xf8\xb5\x79\x2c\xd1\x8f\xdb\x53\xd3\x14\xf9\xe7\x11\x7a\xc2\x54\x56\xa8\x46\x8d\xa2\xae\x3e\x6d\xb3\x84\xad\x64\x8f\xc7\x79\xfb\x28\x46\xe7\xfe\x73\xab\x0f\x7d\xb4\xa6\x95\xf8\x76\xb5\xd3\xa9\x44\x54\x09\x1f\xad\x21\x08\x7d\x35\xa1\x8b\xcd\xc0\x99\xb9\xe9\xbb\x2b\xd2\x34\x2a\xeb\xf1\x14\x23\x19\xfc\xbe\x98\xc0\xf3\x57\x65\x9b\x4a\x51\x4d\x93\x1a\x14\x0f\x17\x9c\x1d\xc7\x04\x45\xd4\x60\xa0\x85\xaf\x64\x48\x47\x61\xe8\x11\x06\x7f\x48\xb7\xb0\x3e\x26\x71\x8c\x72\x48\x6c\x04\xd6\xf1\xa6\x73\xf2\xb9\x5e\x90\x99\x54\xad\xa9\xbb\x0c\x66\x71\x82\x7f\x9d\x4a\x99\xb7\x8b\x68\x3a\xd7\xeb\x68\xdf\xa0\x4a\x77\x82\xcc\x1f\x3b\xc4\xdd\x7d\x99\xca\x07\x46\xe8\xe1\x8b\xfe\x10\xcb\xbb\x77\x6c\x6e\xa9\xae\x01\x39\x37\x31\xcc\x07\x72\xf6\x64\x28\x87\x6e\xb3\x0e\xb4\x64\x10\xb9\x33\xc2\x49\x85\x0b\x95\x83\xa3\xea\x35\xc3\x9d\x2f\xe4\xb0\x1a\x49\x32\x64\x32\x94\x9f\x80\xfb\x4e\x38\x73\x96\xef\xbf\xdf\x90\x63\x3a\x9b\xdf\xdc\x24\x8f\x51\xdb\x95\xf9\x1b\x56\x49\x37\xfb\xb4\x88\x9a\x75\x07\xb6\x61\x12\xcb\xfa\xcc\x65\x60\x7a\x7e\xa4\x97\xf5\xba\xbf\x5a\xe3\x3b\xe2\x2d\xe3\x0d\xff\xfd\x92\x39\x2c\x83\xf1\xa7\x49\xdd\xd0\x9c\x1e\xb0\xe7\x83\x97\xcb\x37\xc9\x8a\xc1\x48\x34\x4e\xee\x93\x18\x55\xc3\x35\xca\xb2\x1d\x3a\x4e\xe5\x20\x4e\x22\x75\xbe\x96\x01\x69\xd2\xa0\xcc\x9c\x77\x64\x5a\xb6\xfd\x3a\xb0\x4b\x51\x54\xad\xb7\x45\x73\xdc\x28\xfc\x00\x59\xc8\x49\x7e\x44\x55\xd2\x40\x47\x92\x46\x16\x3b\xdf\x8b\x49\x1a\xc1\x71\xd8\x2f\x71\x7c\x21\xb7\xec\x06\x71\x80\x82\xfd\x06\x5a\xec\xa0\xf1\x5c\xee\x97\xfb\x95\x40\x65\x70\x4b\x78\x32\xf4\x74\x0c\xa3\x09\x96\x44\xfa\x48\x25\x4f\x64\xf4\x18\x79\x32\xf0\x7a\x0f\xdc\x4e\x34\x38\x10\xc4\x13\xe4\xe7\xa1\x90\x0c\x01\x83\x44\xe2\xe4\x1f\xc0\x89\xb1\x39\xf7\x17\xaf\x99\x34\x91\x3c\x58\x57\xc1\x64\xe4\xdc\xf4\x27\xef\x06\xa8\x23\x8a\x62\xc6\x60\x12\xf5\x12\x0e\x7f\x99\x92\x04\xf4\x7e\x01\x2f\x15\x59\x93\x18\xb2\x9d\x7c\xba\x3f\x46\xf3\xb3\x4f\x5a\x14\x6f\x88\xed\xea\xbb\x35\x66\x0d\xe0\x2d\xd1\x6a\x05\x19\x43\x2c\xc6\x0e\x01\xee\x69\x7f\xbd\x55\xce\x2d\x38\xdc\xea\x1b\x1c\xa1\x09\xe3\x13\xf5\x6b\x80\xe6\x72\xeb\x98\xc7\x84\xac\x2e\xc0\x79\x4e\x5a\x25\x1d\xeb\x64\xca\xd9\x66\x2c\xb8\xe2\xe8\xb0\xcc\x21\xe3\xbb\xe1\x0a\x7a\x71\x5a\x62\xdb\x7c\xc8\x3c\x90\x0e\x99\x07\xdc\x21\x73\xf2\x97\x92\x07\x32\xcb\x45\x4e\xe8\xdc\xef\xc7\x2c\x54\x36\xe7\xb6\x1a\x10\x7a\x53\x3d\xe3\x5c\x8f\xe4\x65\xac\x0a\x64\x0c\x0e\x90\x59\xa7\xfb\xf9\x83\x20\xeb\xb1\x50\xd2\x20\x67\xfc\x09\xb6\x62\xaa\xd4\xda\x07\x12\x05\x6a\x0d\x18\x60\x36\x94\x30\xfc\x05\x71\x7a\xbd\xb9\x6c\x89\x30\x9a\xa2\x48\xb7\x51\xf5\x42\xc7\x99\xf1\xe9\xe1\xba\x89\xaa\x46\x79\xe0\x18\x9f\x32\xa6\x20\xdc\xa1\x63\x52\xa6\x06\xe7\xf8\x57\x9f\xf1\x17\x34\x22\x2f\x9a\xef\xd6\xfb\xa4\xaa\x1b\x72\x87\x9b\xdc\xb3\x5f\xa7\x11\x5f\x20\x3a\x63\x1f\xcf\xe0\xee\x9a\x55\xb5\x11\xa7\x98\x9d\x56\x0d\x79\x25\x71\x9a\x84\x13\x1b\xd2\x81\x13\xc6\x7d\x15\x6a\x24\xca\x23\x21\x59\x0e\xdc\xdc\x11\x5d\x51\x09\x5a\xe0\xa8\xeb\x29\xc8\x10\x57\x21\xf2\x43\x47\x6b\xf4\x37\x61\x00\x8b\x31\x23\x46\xd2\x30\x44\x14\x9b\x4e\xfc\xa2\x98\x26\x4f\x41\x21\x06\x7e\x9e\x67\xf0\x28\x69\xdd\x10\xca\x8a\xf8\x95\xa3\x24\xef\x49\x24\x3b\xeb\x15\x25\xca\x25\x38\xd6\xc3\xc1\x46\x4d\xa8\x77\xeb\x32\x4d\x1a\x21\x53\x00\xcd\xae\xc7\x5d\x27\xe8\x93\x17\xa8\x91\xf4\xdb\x24\xd5\x9c\xeb\xc3\x21\x8a\xe6\x7d\x94\xc4\x92\xc5\x29\xc4\xe3\x74\x29\x78\x1e\x7d\x64\x47\x4b\x33\x3d\xd8\xd1\x1c\x32\x1a\x08\x99\x30\x24\x7f\x67\x74\x72\x5e\xc7\xa5\x61\x0d\x7d\x51\x25\x9d\x75\xee\x39\xe0\xea\xe2\xa4\x42\x3b\xea\xae\x57\x19\x53\x89\x6d\xf9\x58\xbb\x2b\xd2\x53\x96\x8f\xab\x80\x54\xa3\x80\x97\xae\xcf\xf0\x0b\x0e\x7b\x29\x06\x5a\x6c\xd8\x36\x2a\xd8\x17\xbf\x44\x73\x51\xad\xe3\x86\x05\xfe\x2c\x06\xe2\x00\x4f\x4a\xe9\x28\xfc\x64\xe1\x70\xfc\x64\xe1\x70\xfc\xa4\x75\x38\x3a\xdf\xdd\x1d\xf7\xcc\xc0\x0c\xe5\xfd\x3e\xb3\xb5\xd7\x18\x7a\xd1\x87\xd4\x18\x6a\x2b\xbb\x0c\x59\x4e\x35\x39\x9d\x71\x3e\x2b\x2d\xbd\x8d\x25\x86\x64\xfd\x0c\xeb\x22\x88\xf6\x89\x0b\xe4\x13\x70\x3d\x65\xa5\xbc\x6a\x44\xbe\x66\xd1\xbc\x66\xa0\x7e\x8d\xa3\x26\xa2\xbd\xa0\xe1\xed\xfa\x33\xc6\xec\x30\xe1\x6b\x7c\x39\x71\x5b\xb4\x9f\x27\x76\xf0\x1d\xfa\x42\x07\xcc\xb8\x07\xd7\xd2\x51\x34\x25\x24\x81\xf0\x21\x0e\xaa\x75\x96\x97\xc6\xcd\xfc\x8f\x1b\xf0\xde\x11\xeb\x86\x9b\xf7\xda\x4f\xdf\x65\xb0\x76\x8f\xa1\x29\xdc\x39\x96\x39\x18\xf6\x82\xa6\xe7\xad\xd6\x81\xb4\x81\x0e\xb8\x0d\xf4\xf0\x17\x65\xe5\xbd\x7c\x9b\x55\xc9\xd8\xe0\x47\xa9\x21\xe8\xf6\x57\x0d\xc0\x6f\xc4\xa7\x1a\x6a\x13\x53\xbe\x36\xf6\xf6\xe3\xf3\x6e\x00\x6f\xc4\x2f\x78\xa9\x45\x5b\x3d\x3a\x66\xdb\x3c\x51\xa4\x8c\xbb\xa6\xd5\x53\xd7\x4b\x0b\x7d\xb0\xbd\xc5\x0a\x20\x3b\x83\x59\xb3\xf5\xe9\x48\xcd\x17\x6d\xf9\x14\xb5\xf2\xb5\x5b\x65\xfe\xdd\x27\x86\xff\xa5\x6e\x99\x13\x5f\x3e\x25\xb5\xa5\x4c\xe6\x39\x93\x5d\x02\x8c\x43\xd9\x1e\x9f\x92\xcf\xd1\xc0\xf8\xd7\x66\x78\xc4\x28\xe1\x55\x4d\x0f\x47\x97\x30\xf6\xae\xbf\x71\xa2\xda\x4c\xcb\xeb\x26\xa1\xe4\xa7\x89\x4e\x94\x2d\x0e\xcb\x10\x91\x02\x9d\x25\x55\x11\x8c\xf1\x0e\x6c\x5a\x3c\x57\xc4\xc3\x2c\xf9\x33\xf7\x55\xd6\xbf\xca\x02\x5b\x19\x5c\xdb\x61\xb9\x4e\x05\xec\x9b\x08\xa2\xbc\x6a\xbc\xae\x63\x55\xf2\xea\x9f\x2b\xc8\xc7\x8e\xc2\x0f\x36\x32\x3f\xb3\x9f\xd1\x05\x35\x80\x3f\x7e\x8c\xf6\xc4\x07\xbf\x48\xc1\xc9\x67\xcd\xdf\x50\x00\x17\x90\x7d\x35\x8f\xfe\xcd\xfc\x86\x49\xe1\x5d\x30\x10\x70\x87\x60\x21\x57\x70\xac\x94\xbd\xc0\xb1\x4e\xe7\x00\x3e\x93\x05\x38\x73\x09\x38\xc0\x4e\x3c\xcb\xfc\x18\x3f\xd1\x6c\x8c\x52\xd3\xdb\x5a\x85\x34\xf5\x8d\x60\x29\xeb\xdb\xd0\xaf\x63\x96\x46\xfc\x3a\xb6\xae\x63\x48\x56\x04\x21\x55\xcd\x5b\x7d\xf3\xcc\x92\x7c\xf4\xe0\xa0\x10\x26\xeb\x17\xd2\x60\x27\xfe\xe2\x2c\x64\xf3\x95\x72\xc8\xc0\x19\x7d\x7b\x01\xb8\xc1\x90\x74\xc3\x87\x1b\xaf\xb1\x2f\x81\xe2\xff\x4f\x9d\x9e\xc6\xe2\x7a\x94\x02\x37\x1e\x3b\x0d\x66\xe5\x21\xd9\xce\x41\xed\x08\x4e\xc8\x9f\xd3\xee\xcf\xe1\x68\xa7\x35\xac\x82\x2b\xa2\x80\x4f\xed\xf0\xdd\x7e\x17\xed\x91\x02\x75\x7f\x7e\x42\x87\xdc\xe2\x2c\xc5\x70\x44\xe6\x3a\x22\x31\xaa\x77\x55\x52\x76\xaa\x60\x91\x5e\xda\x9c\x8e\x88\x3b\x30\x45\x9d\x55\x7a\x50\x01\x3c\xad\xd3\xd5\xf7\x4a\x8e\x55\x5c\x8e\x8a\xbc\x50\xa2\x1f\xf9\x10\x71\x1c\x3f\x35\xcd\xb2\x98\x2d\x4a\x48\x9e\x3c\xf7\xdf\xe3\x97\x8c\x15\xe5\xa3\x5c\xa9\x8f\xae\xc9\xfb\x04\x6f\xb6\xcc\xed\xed\xa6\xed\x6d\xe4\x85\xdd\xd3\xdc\x9a\x0b\x6f\xbe\x98\x79\xcb\x79\xea\x4e\xbd\xf9\xca\x99\x7a\x8b\x20\x74\x03\x6f\x3e\xbd\xeb\xfe\x77\xfe\xb3\xef\xcc\xbc\x70\xe1\x84\xde\x6a\x39\x73\x96\x5e\x38\x77\xee\x9c\xd0\x0b\x56\x53\x28\x3f\xab\x9d\x88\x3a\x13\xd8\xa0\x2a\x4b\xf2\xa8\x41\x76\x82\x32\xdc\x05\x7e\x49\x09\xce\x9c\x99\x22\x45\xe9\x20\x43\xdf\x09\x8f\x33\xb5\x38\xf0\x6e\xcf\x5a\xdd\x58\x5d\x55\xb5\xbc\x31\x45\x73\x67\x8e\x3b\x63\x54\x6d\x4c\xcc\x3a\xfd\xc0\xab\x9c\x5a\x65\x08\xf7\xb5\x5b\x37\x51\xd7\xad\xdf\x5d\xac\x4f\xd9\x53\x29\x6b\x9f\x70\x66\x4c\xb0\x3e\x86\xd6\x3f\x28\xb0\xf5\xfb\x16\x5a\x4b\x8c\xf4\x59\x91\xd0\x8e\x7b\x1e\x57\xfd\x6c\xd3\x78\x5a\x6f\xda\x47\x52\xc8\xbf\xfd\xdf\x34\xaa\x66\x08\x93\xc1\x67\x9f\x99\xb3\x9f\xdd\x82\xef\xbc\xec\x14\x9f\x83\x46\x72\x3a\x9d\xd2\xd4\xec\x8e\xff\x33\x9e\xe4\xbf\x65\xbe\xd3\xd9\xc4\xe9\x71\x26\xdb\x3f\x67\x58\xc6\xfa\x27\x01\x88\x18\x0c\x0b\xd7\x5d\xd9\x3a\x81\x5f\xb6\x1b\x75\xc5\xd3\x9e\xcc\xeb\x16\xee\xa8\x2c\x51\x54\x45\xf9\x4e\x78\xbd\x4f\x28\x17\x14\x03\xba\x16\x03\x3c\xb2\x06\xb4\xb9\xfa\xc1\x2e\x1e\xc7\x57\x9c\x73\x15\x7d\x33\x8a\x91\x7d\x92\x4e\x76\xb9\x09\x90\xf8\x38\x96\x78\x84\x62\x38\xca\x2e\xbe\xad\x48\x5e\xf6\x27\xa8\xf6\x49\x8a\x34\xdb\x18\x8b\x29\x16\x7a\x56\x0f\x87\x30\xf4\xe8\x3e\x83\x39\x02\x3f\x23\x18\x8c\xe8\xd7\xfe\x66\x9f\xa4\x0d\xaa\xd6\x51\x5a\x1e\xa3\xef\xa8\x68\x7e\xf4\x3f\x02\x1b\x13\x4c\x4a\xda\xa9\x71\x5e\xe8\x78\x74\x56\x38\x31\x3b\x17\xc8\x03\xe9\x1d\x79\xfb\x20\x9a\x87\x37\x74\x56\xc7\xfc\x69\x57\x47\xe6\x01\xc9\xad\xd3\x28\x3f\x7c\x87\xf2\x8f\xfd\x71\xa0\xe1\x7a\xc7\x5f\x8f\x45\x51\xa3\xce\xee\x20\xcf\xf3\xde\xc1\xad\xd7\x5b\xb4\x2f\x2a\xa4\x90\x3f\x3e\xbd\x30\x86\x40\xfa\x43\xc8\xf8\x77\x3f\x14\x0b\x61\x77\xf0\x95\x03\xf3\x5c\x1f\x33\x7c\xa7\xff\x82\x40\x6f\x68\x98\xa4\x47\x05\x31\x88\xef\x2f\x55\xf1\x50\xa3\x77\x17\x2f\x8f\xee\x9f\xd1\x6f\xe0\x73\xc6\x02\xef\xc9\x71\xf7\x42\x30\x75\x72\x05\x52\x75\xa4\xbd\x13\x6b\xa7\x1b\x3d\x60\x1f\x42\x19\xfe\xd6\x5d\xc9\xeb\x81\x3c\x6b\x13\x49\xda\x34\xd1\xb6\xe6\x83\xa4\xec\x93\xeb\x71\xcc\x80\x39\xf8\x17\xbe\xf4\xc1\x77\x96\xc4\xb8\x78\x30\xdc\x53\x6d\x22\x57\x55\x10\x9d\xff\xba\x22\x06\x67\xfb\x09\x24\x53\x63\xc5\x25\xd4\x00\x97\x33\xa9\x32\x3a\xc3\xbf\x40\x57\x75\xf2\xb4\xbf\xe0\xcc\x5d\xb0\x90\x65\x89\x2f\x54\x8c\xf4\x20\xfe\x3d\xfe\x16\xc9\x15\x0f\x9f\xc6\x31\x19\x44\x87\x2c\xa6\x23\x6a\xfe\x6e\x82\x78\xcc\xe9\x29\xe7\x7c\x3a\xdc\x65\x92\xa6\xf2\xf8\x43\x43\xc7\x40\x2a\x85\x20\x60\xf3\xe4\xbb\x34\x54\xa9\xe9\x9b\xd3\x9a\x28\x57\x87\xa3\x73\xdb\x18\x15\x7e\xb6\xb3\x13\xd2\x67\x5c\x42\x8e\x7c\x6f\x4f\x3a\x17\xfc\x2a\x9a\x78\x49\xe6\x68\xe2\x12\xfe\x2f\x80\x66\x13\x6d\xfb\x6f\xfb\x3f\xe1\x3f\xca\x28\x17\xaf\x6e\x72\x30\x54\x9c\xc2\xf5\x9e\x3c\xba\xdf\x46\xd5\x8b\x9e\x7b\xb9\x91\xc3\x15\xf2\x82\xd6\xf7\xde\xdd\x56\x9d\x3b\x08\xba\x66\x9c\x1f\x18\x82\x6e\x60\xa8\x88\x09\xcb\x5f\x90\xd9\x05\x54\x7d\xcf\x8d\x67\x8b\x31\x73\x63\x99\x61\x65\xe8\x00\x9f\x77\xf1\xbb\xad\x31\xbc\x66\x0d\xa6\xb2\x60\xac\x94\xe9\xb1\x50\xda\x88\x7b\x84\x50\xad\x13\x33\x58\x29\x66\xa3\xf1\xc3\xc8\xf0\xa7\xd1\x31\x92\x4e\x4e\xed\xd6\x28\xdd\x83\x07\x7c\x3b\xeb\x01\x9c\xf2\x15\xe1\xc5\x23\x17\xcb\xb9\x59\xef\x02\xc5\x35\x4a\xed\xa2\x2d\x5b\x74\xa6\x53\x82\x86\xf6\xa5\x16\x3a\x4a\x41\xdd\x64\x57\xe4\xba\xab\xd2\x41\xe7\x2c\x6d\x46\xcf\xd3\xea\x86\xf4\xd8\xcb\x71\x1f\x6e\x17\x3a\xee\x4c\x2e\xb1\xbb\xca\x1a\xa9\x0b\xf8\x7e\xa3\xec\x8b\x93\xaf\x46\x80\xd0\xe8\xbd\x49\xb9\xc5\x68\x40\xc6\xd7\x73\x86\xfd\xdb\x7c\x39\xc7\xaf\xe7\x70\xb8\x3a\x77\xc5\xe1\x54\x5d\x71\xb1\x9a\x3e\x5b\x40\x2e\xaf\x00\x03\xd1\x21\xfa\xc9\xeb\x64\x18\x25\x39\xaa\x4c\x13\x45\xf3\xba\x8f\x84\xf6\x0c\x18\x90\x63\x51\x25\xbf\x75\xc4\x9e\x66\x42\xaa\xe2\x01\xb2\x1f\x5d\x31\x04\xc9\x22\xe9\xac\x6c\x7f\x42\x6c\x40\xc1\x16\xca\x50\x2f\xfa\x92\x92\x76\x38\xdf\x5a\x74\x17\x93\xb6\x29\x0c\x2b\xf0\xf9\xd4\x03\xcc\x87\xa8\x74\x2f\xf4\x84\xd6\xb7\x33\xe4\x52\x1a\x0e\x86\x91\x7f\x4b\xb2\xb2\xa8\x9a\x28\x6f\x40\x99\x40\xd5\xa3\x74\x80\x5a\xa1\x11\x7b\x42\x59\xcd\x60\xbf\x96\x71\xbe\x26\x60\xac\x96\x8b\x25\x6c\x0c\xdc\x3a\x7b\x36\x7b\x85\x4f\x28\x7e\x8d\xc9\x5a\x2e\xee\x94\x5c\xfe\x61\xb5\xae\x52\x61\x61\x5c\x6f\xd0\x70\x49\x9a\xf7\xf5\xb6\x4b\x50\xc0\x7f\x55\xf3\xc5\x4a\xf6\x56\x2d\x18\xcb\xa3\xad\x11\x5b\xad\x02\x85\x79\xc8\xe2\xe7\x33\x62\x59\xfc\x75\x46\x6c\xb5\x0a\x95\x5c\xfe\x61\xc4\xae\x53\x64\x7e\x5c\x6f\xd1\x88\x89\x9a\xf7\x0c\x46\x8c\x57\xc0\x7f\x59\x23\xc6\x48\xf6\x66\x8d\x18\xc3\xa3\xad\x11\x0b\x82\xd5\x4a\x61\x1f\xd2\xc3\xf3\x59\xb1\xf4\xf0\x75\x56\x2c\x08\x7d\x5f\xc9\xe6\x1f\x66\xec\x3a\x55\xe6\x07\xf6\x16\xcd\x98\xa8\x7a\xcf\x60\xc6\x78\x0d\xfc\x97\x35\x63\x8c\x64\x6f\xd6\x8c\x31\x3c\xc2\x66\x0c\x68\xd3\xa6\x7f\x58\x81\xeb\x34\xa1\x4d\x9f\xcf\xbc\xb7\xe9\x15\xe6\xdd\xc8\xcb\x2d\x5a\x24\x51\x5a\xcf\x60\x91\x78\xa1\xfd\xcb\x5a\x24\x46\xb2\x37\x6b\x91\x18\x1e\x41\x8b\xd4\x57\xa6\xe4\x30\x1f\xfb\x41\x6e\x02\xd7\xf5\x68\xc8\xd7\x69\xf6\xd8\xcb\xea\xa3\x0e\x9d\xf0\x45\x05\x82\xa0\x77\x79\x74\x64\xb5\x58\xf8\xaf\x34\x57\x30\xc8\x4f\x0c\xb9\xe1\xdc\xaa\xa1\x96\x37\x1e\x52\xc5\xe1\xd2\x8a\x90\x78\x9e\x83\xc5\x30\xd5\x62\x20\xdf\xcb\x7f\xe2\x0f\x29\x98\xa8\xf5\x97\xa6\x2c\x40\x8b\x12\xe5\x3a\xc0\xae\xfe\x27\x9d\xa4\x95\x43\xd4\xab\x1d\x77\x36\x84\x3b\x74\x65\x68\x49\x3e\xc8\x7d\xd5\x79\x71\xee\x40\xed\x34\x74\xa6\xe1\x07\x8b\x73\xb8\xc0\xc1\x7a\xca\xb7\x43\xff\xdf\x9b\x7f\xfc\x40\xeb\xc8\xae\xe1\xc7\x0f\xe1\x50\x90\x26\x39\xda\x45\xe5\x8f\x1f\x30\xd7\x43\x71\x96\x34\xa8\x4a\x93\x2c\x69\x7e\xfc\x10\xf8\xe4\x08\xef\xcc\xb9\x3b\x86\xb3\x5f\x66\x4e\xb0\x20\xff\x86\xb3\x63\x08\x1d\xda\x87\xe5\x84\xda\x46\xaf\xfb\x49\x7e\x8f\xaa\x1a\x29\xcc\x84\x58\xcb\x1b\x8a\xe1\xf0\x8e\x12\x91\x30\x7d\x60\x18\xde\x44\x28\x48\x1a\x30\x41\x66\x42\xcb\x9e\xd2\x3c\x84\xf3\xf9\xa4\xff\xaf\x4e\x50\x3a\x33\xa1\x87\x95\x0c\x05\x47\x72\x69\x4b\x13\xb4\x18\x1c\xaa\xd0\x84\x4a\x69\x3a\xf4\x84\x05\xe3\xa1\x07\xe6\xcc\x07\x08\x0a\x1a\x10\xed\xe0\xa9\x0d\x07\xd7\xff\xe0\xa3\x09\xc3\xcd\x19\x90\x8e\x6f\x67\xfc\x9f\x37\x33\x23\x92\xbc\x04\x43\x22\xcd\x92\x5d\x54\xc5\xff\x0a\xa7\xb3\x9e\x72\xda\x3a\x54\x1f\xb7\x8e\xaa\x98\x3e\xb7\xf0\x6c\xe7\xfe\xfa\xc3\x36\x01\x47\xa4\x49\x9a\x14\x89\x77\x74\x96\x0c\x40\x7d\xda\x72\x30\xf8\xd0\x65\x7f\x75\x40\x4a\xbf\x44\x70\xa2\xb6\x61\x6e\xb7\x9f\x61\x28\xe3\x11\xe1\x01\xea\x87\xf1\x27\x77\xff\x87\xeb\xc9\x4f\x1e\x3e\x3d\x25\xe5\x40\x73\x98\x72\x9a\x5f\xdd\x22\xf1\x98\xdd\xa1\x5e\x89\xee\xd8\x69\x99\x2c\x23\x10\x4d\xb2\x0e\x9e\x30\x90\x06\x82\x1b\x3d\x9a\x74\x5c\xca\x00\x13\x82\x37\x2f\x54\xa9\xe1\x37\xaa\xf3\xd4\xa2\xb6\x72\x54\x21\x39\x52\x1e\xf1\xe5\x2a\x7a\xa8\xcb\x75\x82\xb2\xfd\xe8\x00\x45\xbe\xd3\xab\xc2\xbe\x28\x1a\x75\x37\x4c\x6c\xe3\x67\x16\x4c\x3c\x13\x12\xc0\x20\x0c\xa7\xf6\x7d\xc7\x8a\x6d\x4e\x06\xe4\x38\x3a\x9f\xb1\xc1\x5b\x40\xd2\x77\xf9\x94\x4c\x24\xd7\x42\x0f\xca\xcb\xdf\xe7\x49\xe0\x63\xc5\x7a\x1a\x1c\x36\xda\xba\x7f\x76\xf6\xca\x97\x46\xd9\xb6\x0e\x2b\xba\x09\x54\x45\xf5\x4f\x9f\xa4\x9f\x9a\x11\xf2\x5a\xe0\x95\x0f\xc4\xb1\x6d\x21\x76\xf8\x2a\x7b\x76\xf0\x9b\x97\x57\x3e\x7e\x38\x34\x84\x18\x61\xca\xed\xb9\xe8\x9f\xbc\xbb\xf2\x8d\x33\xb6\x2d\xc4\x0b\x5f\x65\xcf\x0e\x7d\x2f\xed\xca\xa7\xb2\x98\xa6\x10\x33\x5c\x8d\x3d\x2f\xe2\xeb\xc9\x4f\x78\x19\x99\xc3\x33\xbe\x9a\x7b\xed\xa3\xb8\x1c\x1a\x58\x6f\xcc\xef\xa0\xf2\xbc\xa8\xe6\x82\xf9\x55\x4c\x0e\x8f\x52\x7d\xcc\xaf\x21\x72\x78\x54\xe3\x6e\x7e\x03\x8f\xaa\x3e\xf6\x09\x95\x6e\xe0\x62\x30\xc2\x83\xf7\x08\xcd\x1f\xb6\xca\x42\x4f\x36\x06\x27\x3f\x84\x89\x62\xa7\xea\xff\x9e\x8a\x06\x4d\x9e\xc4\x13\x58\x45\x1c\x24\xee\x1a\xa8\x8e\xb2\xe3\x8d\xbf\x75\x14\xc9\xd6\x0b\xa8\xe8\x7d\x32\x98\x19\x9d\x4b\xae\x1a\x0b\x76\xb3\xaa\xaa\x96\xf7\xd0\x42\xbf\x86\x05\x5c\x3e\xd9\x2e\xa4\x9b\x22\x24\xb2\x83\xd1\x6f\x18\x41\xdd\x8e\x7a\x1a\x3d\x1a\x2f\x6c\x8a\x6f\x9d\xc0\x7e\x6f\x87\xb1\x29\x4a\xa5\x03\x28\xb3\xa2\x72\x06\xb5\x4c\x13\x66\x74\x0e\x9f\x9a\x10\xe0\xfc\x01\xb4\xd4\x87\x98\x89\xf9\x45\xcc\x43\x72\xcf\x1c\xb6\xc7\xcf\x2f\x55\xc5\x83\xc3\x07\xee\xf9\x62\xb9\xe8\x32\x72\x46\xd4\xeb\x85\xee\x79\xc0\xbb\x25\x5f\x48\x2f\xe6\x33\xe9\xc5\x48\xdd\xad\xe4\x57\xe0\x85\x04\xe4\x70\xe3\xf6\x42\xf3\xb2\x55\xb4\x61\x73\xf9\xf1\xb7\x7c\xba\x36\x26\x05\x22\xc9\xc2\x6e\x52\x83\x68\x0a\x42\xac\x42\x5f\x3f\xf0\x32\x52\xb2\xef\xe4\x53\x4e\x80\x96\x8c\x69\xa3\x79\x0b\xc2\x3e\x29\xa3\x0e\xa9\x63\x67\xbf\xec\xb1\x98\x4d\x14\x84\x4b\xb9\x9b\xb5\x4d\x59\xa8\xc1\xa8\xee\xe2\x93\x70\x80\x1d\x34\x61\x7a\x4a\x8a\xdf\x27\x20\x91\xd8\x9c\x7c\x25\x16\x46\x60\x03\x63\xa6\x29\x4e\x2c\xce\xf8\x96\x30\xf9\xdb\xdd\x15\xa7\xbc\x59\x4f\x49\x12\x02\xa1\x4c\x04\xe1\x5b\x1e\xa2\x72\xb8\xbb\xc5\xb6\x66\xcb\xe5\xa2\x0b\xc7\x8d\xb0\x34\x40\xb7\xaa\x80\x17\xc9\x48\xe4\xea\xe2\x6d\x2b\x14\xc5\xbb\xea\x94\x6d\xa5\xa8\x82\xbc\x37\xa7\xc9\x01\x4c\xef\x22\x72\xe9\x00\xc4\x70\xcc\x48\x50\x7c\x3a\x93\xb0\xcc\xdc\xec\x1a\x5f\x15\x64\x9b\x91\x1b\xb7\xdc\xc3\x3c\x7c\xdd\x0f\x62\xc1\x90\x39\x40\x7b\xc9\x4f\xff\xc9\x5f\x78\x6a\x6e\xe0\xf2\xd3\x3b\x0b\xfa\xd8\x21\x1c\xb8\x50\x3e\x02\xfc\xd5\x98\xe8\x23\xbe\x7c\x1b\xe1\x7a\x75\xff\x62\x70\x19\x1d\x92\x1c\x37\x7b\xb9\xd4\x09\x92\xaa\x80\x1a\x51\x46\x07\x24\x05\x1c\x1d\x52\x2c\x85\x32\x7d\x63\xc4\xcf\x14\x8b\x1c\xc9\xb1\x46\x70\xa4\x66\x1d\x73\x54\xc4\x42\x19\x0a\x54\xf4\x2c\xf6\x31\x99\xa8\x45\x16\x47\xc5\x7e\x7d\xc4\xdf\x7f\xc1\x62\x29\xf0\x8a\x0a\x65\x51\xb1\xca\xaa\x03\xe6\x1c\xb8\x30\x74\xd4\xdf\x2a\xa0\x27\x1d\xa1\xa8\x5e\x50\xb6\xca\x1c\x51\x72\xc6\x37\xdd\xd7\x02\x81\xb7\x7e\x83\x36\x16\xd8\x3c\xc6\x6d\x65\xcd\x04\x59\xd0\x29\x84\x0f\xb9\x31\xa2\xb1\x4b\x34\x0e\x63\xd0\xcd\x04\x8d\xee\x4f\x75\xaa\x3f\xd5\x53\xbb\x7e\x22\x4c\xb5\xf3\x40\x22\x57\x67\xa0\x78\xb4\x09\xe4\x61\x04\x4f\x94\x4e\xa8\x35\x0c\x7a\x6a\x4f\x30\x13\x7a\x2b\x41\xd6\xc1\x28\x3e\xe8\x57\xa4\x4e\x3e\x9d\x78\x66\x62\xea\x29\xee\x3d\x82\xa5\xf8\x1e\xc1\x46\x7c\x93\x96\x3b\xc5\x65\x7e\x3a\x61\x1b\xd5\x88\x3c\x49\x0f\xaf\xdf\x1d\xdf\x6b\x94\x95\xcd\xa3\x70\x6a\x6a\xdb\xe4\x0e\xed\x96\x6c\x1b\xfa\x14\x24\x97\x88\x62\x20\x53\xb4\xff\x4b\x0c\x99\xc0\x93\x53\xcc\x88\x85\xdb\xe2\xb8\xbf\x78\x70\x6f\x21\x2d\xe2\x0b\x29\xb1\x3f\x7e\x36\xba\x47\x42\x53\x8d\x00\x31\xdd\xe1\x89\x7d\x16\xee\xd7\x63\x85\xf6\x9f\x87\x77\x40\x81\x2a\x9a\x9a\x46\x42\x37\xdb\xce\xc3\xf9\x72\xe0\xdd\xf0\xf1\x41\x80\x83\xc8\xf2\x55\x2a\xb2\x7e\x38\x8f\xa2\x79\x8f\xce\xf4\x91\x41\x80\x83\xc8\xf2\x55\xca\xde\xce\x56\xf1\x6c\xd6\xa3\xd3\x7e\x4c\x60\x81\x20\x82\x4c\xb9\x8a\xda\x34\xd8\xfa\xf1\xd0\x49\xd3\x47\x03\x01\x0e\xa2\xc9\x57\xa9\xc8\xa2\xdd\x6a\x19\xec\x07\x0d\xd1\x7f\x1c\xe0\xc1\x40\x3d\x62\x6b\x54\x34\x77\xab\xa9\x1f\xee\x2e\xde\x3f\x4f\xd9\xb6\x68\x2a\xe6\x61\x93\x50\xe1\xbc\x87\xf0\x27\x42\xd8\x59\x9f\x72\x69\x09\xa4\xdd\x90\x4c\x75\xd6\x51\x0d\xc9\x9e\x62\xa8\x75\x8f\xec\x13\xf1\x83\x1c\xfc\x18\x6b\xf6\x08\xb6\x4f\x4f\x49\x6c\x38\x68\xbc\x91\x76\x91\x51\x8a\xaa\xc6\xee\x93\x6e\x30\x1a\xe4\xab\xf2\x5f\x60\x12\x38\xa0\xdd\x29\x12\xe1\x9f\xe6\x73\xe9\x2b\xf1\x62\x20\x18\xe4\xbe\x2e\x4e\xea\x2c\xa9\xeb\x04\x5f\xaa\xde\xa5\x45\xad\xb4\x8c\xd4\x3d\xea\x13\xb9\xf1\x09\x68\xc4\xbe\x81\x7c\xa8\xa7\x74\xbc\xdf\xfb\x92\x2f\x19\xfb\x68\xb5\x5b\xf4\x6b\xc5\x74\xb7\x5c\x4c\x63\x01\x95\x03\x8e\xde\x2e\x40\xe1\x76\x2a\x82\xb2\xc2\xe8\x5f\x7c\xdf\xce\x67\x9d\x86\x92\x1a\xc5\xd4\x8f\x57\x28\xde\x2f\x05\xde\xb6\xbb\x78\xbf\x1f\xd6\xb1\x69\xb0\xf4\xef\xf6\x2c\x1e\x98\xb1\x68\x11\xcf\x11\x47\x0f\xe4\x6a\x36\x0f\x17\xab\x1e\x4a\x63\x22\x76\xfb\x3b\x34\x15\x3f\x0a\x45\xfb\x70\xb7\xeb\x19\xbb\x8b\x16\xf1\x74\x2b\xa0\x82\x79\xdb\x2f\xd1\x6e\x3b\x17\x41\x01\xf6\x16\x8b\x79\x30\x0a\x4d\x69\x4a\xf6\x61\x8c\xa4\xcf\xaf\x68\xbb\xdb\x8d\xdc\x45\xab\xd9\x6c\x16\xf2\x98\x60\xe6\xd0\x6c\xbb\xda\xae\x04\x48\x80\xb7\xbb\xd9\x74\x3e\x9d\x5d\xfe\xdc\x6f\x09\xbf\xa0\xc7\x7d\x15\x65\xa8\x76\xca\xaa\x38\x54\xa8\xae\xdd\x6d\x54\xb9\x75\x53\x25\x25\xaa\xcf\xfb\xaa\xc8\xce\x50\x5a\xef\x80\x24\xfb\x6b\x0a\xb0\xd6\x77\xfc\xcb\xe5\xcf\x6e\xf1\xa2\xe8\x5f\x10\xb7\xd7\x63\x7c\xc6\x6d\x75\xb7\x06\xe0\xb8\xee\x31\x89\x63\x94\xb3\xbe\x32\x90\x69\xb7\x2b\xb8\xfa\x09\x2a\x69\x0f\xcb\xc8\xe5\xcc\x62\xb6\x7a\x7c\x00\x90\x6a\x2c\x9f\x12\xec\x85\xd0\x71\x1f\x55\xee\xa1\x63\x01\xe5\xcd\x77\xb3\x79\x8c\x0e\x13\xe0\x38\xe2\xfc\xa3\x13\xce\xdf\x4f\x18\xbb\x2d\xfd\x3d\xf7\xdf\x2b\x5a\xaa\x6b\x96\x02\x0e\xe1\xef\x8f\x72\xde\x71\xb7\xf8\x06\x99\xbe\x79\x8e\x95\x69\x9a\x06\x8f\x46\x59\x23\xa8\x5c\x94\x27\x59\xd4\xa0\xf1\x6b\x07\x29\xe8\x26\x29\x34\xe1\x9d\xa0\x76\x88\x74\x9c\x24\xdf\x27\x79\xd2\xa0\x8d\x5b\x3c\xa1\xd1\xd5\x2d\x2e\x1e\xf6\xb1\x5e\xe8\xc3\xde\xcb\x3c\x39\x4c\x79\x76\xb7\x45\xfc\x78\x7e\x8e\x67\x8a\xc6\x03\x80\xff\x6a\x89\xec\x2e\xe2\xe1\x47\x37\xc2\xad\x99\xa7\x93\xd5\x6f\x0b\x0e\x0e\x20\x8c\x43\x3a\x58\x29\xf8\xb1\x7f\x0a\x57\xe1\xb6\xf3\x35\xe0\xe6\xfd\x9e\x44\x51\xcb\x6d\xd8\x59\xde\xcc\x01\x35\x72\x28\x51\x49\x97\x0f\x57\x13\x26\x35\x59\xbf\x05\x2c\xaf\x72\x84\xfa\x6b\x3e\xc9\xbe\xe8\x8d\xbc\x8d\xd5\x6e\x88\xa4\x82\x7d\xda\x39\xec\xcb\x0b\x9e\x12\xd6\x1c\x04\x56\x1c\x93\xf9\xaa\x83\xc1\x52\x47\x40\x85\xd7\x9e\xbc\x16\x60\x87\x78\xbc\x8c\xe5\x6b\x12\xdc\xe3\x23\x44\x2a\x52\xca\x69\xae\xe6\xc1\x64\x19\x54\x86\x45\x43\xb3\x13\xcf\x35\x04\x99\xb3\x57\x43\x80\x4d\xa4\x46\x0d\xc1\x73\x7c\x31\x81\x51\xdb\x8b\xce\xd4\xe0\x27\xaf\xce\xa2\x34\xbd\xbe\x1d\x6e\x66\x12\xbb\x0a\x09\x2b\xc4\x38\x42\x48\x50\x93\x7d\x7a\xaa\x8f\x52\x2b\xe1\x95\x4a\xfe\x98\x86\x1c\x64\x11\xf1\x3d\xe5\xc6\x00\x88\xe7\x29\x37\x00\xa0\x05\xb3\x8f\x7b\x70\x91\x8c\x8d\x2a\x0a\x72\x89\x54\x08\x26\xe4\x09\x72\x3b\xfc\x6a\x34\x6a\x9d\xd2\xe3\xb7\x9d\x93\x4a\xc2\x43\x40\x5d\x55\x4f\x6e\x09\xea\xb9\xa0\x48\x0c\x40\xdc\xda\xaf\x16\x38\x8e\x30\xa9\x19\xee\x6f\xc1\xe9\x89\x01\xc9\xc1\x81\xb8\x2f\xe5\x81\x9b\xfb\x7d\x4c\x4b\x44\x8c\x23\x51\x5c\x6c\x69\xa3\x8a\x4b\x01\xcc\x77\xad\x55\x2c\xcb\x98\x15\x08\xae\x56\x12\x6d\x23\xa3\x86\x74\xad\x95\xea\x81\x2b\xb5\xba\xc1\x34\xd7\x41\xf0\x5a\xa1\x12\xec\x6e\x86\xa6\xfb\xa9\x82\x49\x83\x4a\x30\x20\x06\x7d\xa0\xd4\x79\x7d\xa0\x71\x44\x11\x6b\x1f\x03\xe4\xa2\x7a\x1b\x55\x44\x10\xe0\x9c\x22\x50\x71\x0d\xe2\x57\xa3\xb9\x5a\x37\x4c\xed\x8c\xea\x41\x11\x28\x35\xa4\xaf\xd7\x2a\x09\x8f\xc4\x00\xc4\xa9\x8a\x5a\xe0\x38\xda\xaa\x66\xd8\xa0\x2d\x3c\x94\xe1\x0d\x49\xca\x03\xa7\x30\x7d\x7c\x57\x44\x4c\xa3\xb2\x5c\x9c\x75\xa3\x8a\xd1\x02\xec\x93\xf6\x2a\xb6\x21\xec\x4a\x24\x57\x2b\x8b\xa1\x99\x51\x57\x48\x7b\xa5\xaa\xd0\x6a\xad\xa6\x70\x28\xf4\x30\x9c\x9e\x28\x05\x4d\xe2\xde\x4a\x66\x0d\x6a\xc2\x01\xe9\xb5\xa4\xe7\x80\xd3\x92\x3e\xce\x8e\xb2\x2d\x8a\xdd\x0a\xd5\x65\x91\xd7\x1d\x2a\xd3\xf9\x18\x66\x8b\x3f\x5e\x07\x10\x22\xbd\x32\x5a\xe9\x2c\x9b\x78\x6a\x4e\x6e\xe2\x48\x25\xb8\xe7\x13\x19\x10\x17\x00\xe5\x09\x0e\x96\x03\x15\xc5\xf6\x9f\x68\xd7\x00\x15\xf7\x49\x8c\x0a\xe5\x0d\x04\xf1\xe6\x81\xfc\x66\x15\x49\xca\x4e\x36\xa3\xbe\xdc\x25\x37\x0c\xb6\x8f\xab\xf1\x69\x24\x26\x4f\xff\x2c\xf4\xee\xe6\xcb\x60\x36\x7d\x0f\x34\x0b\x16\xaa\x66\xf3\x85\x17\xce\xa1\x26\xb3\xed\xe3\x14\x6c\xb1\x04\xc1\x83\xed\x63\x00\x82\x93\x64\x34\xe4\x23\x20\x39\xbc\x88\x3d\x70\xee\x54\xd0\x78\x10\xc6\x74\xb8\xc3\xf7\x7d\x12\x6e\x19\x5e\xde\xed\xb6\xec\x3e\x7e\x0e\x66\x78\xc8\xcb\x9b\x53\x82\xc3\x85\x15\xfc\x07\x7f\x16\xaa\x47\xa4\x3f\x6b\x31\xe2\x5c\xce\x2f\x74\x26\xd1\x0f\x9a\x83\xee\x0a\x2d\xe0\xd7\x07\x7c\xf5\x4b\x74\x59\x11\x47\xa9\x5b\x94\x28\x3f\x4b\xd3\x00\xd7\x8d\xfa\xb4\x4f\x5a\x14\x1b\xae\xb3\xf4\xfb\xc6\xc0\x9f\x8f\xcf\xe3\xe2\xae\x89\x9f\x53\x98\x97\xed\x30\x1d\x6f\x1f\xc5\xc8\xa1\xfc\xc4\x49\x94\x16\x63\x52\x42\x1c\xb0\x26\x4c\x70\x45\xfb\xa2\xca\x1c\x6f\x5a\x3b\x28\xaa\x91\x5b\x9c\x9a\x8d\x3d\xa4\x5b\x70\x68\x0b\x0b\x8c\x4f\x85\x98\xe8\x59\x99\xa8\x89\x4b\x0d\x09\x85\x34\x6a\xd0\x77\xfe\xc4\x0d\xe7\xef\x3f\x6e\xd8\xd6\x40\xb5\xa6\xae\x97\x3c\x79\x2e\x48\x2d\x79\xa9\xb5\xaf\xa1\xea\xab\x48\xfa\x1f\x59\x6d\xa3\xf4\x06\xa5\x73\xdb\x41\x31\xfa\x92\xc7\x75\x74\x6a\x8a\x0b\xcf\x98\x6c\xe0\x89\x1d\xc3\x49\x04\xe8\x6b\x7b\x81\x5f\xb6\x7d\x33\x6a\xa3\xff\x75\x93\x3c\x00\xdf\x77\x76\x69\x52\xae\xc7\x27\x55\xf8\xb0\xa4\x54\xa7\x0b\x4e\x86\x1f\xa1\x33\x2c\xd2\xdc\xc6\xc4\xe3\xaa\x28\x9f\x6a\x4c\x66\x50\x7a\x00\xdf\x97\xf0\x63\x23\xc2\xbe\x3c\x29\x54\x77\x9a\x7e\x66\x2d\x35\xa9\xa7\x17\x3a\x5f\xf2\x7b\xd0\x33\x86\x9b\x59\xe4\x65\xb4\xfb\xb2\x26\x8f\x63\x3d\x0e\x15\xf4\xef\x5e\xf7\xd7\xf8\xe0\xa1\xbb\x45\xcd\x03\x42\x8c\x5a\x71\x6d\xf5\x6d\x86\x5b\x8a\xf3\xf1\x3d\x33\xf9\x7d\xbb\xfe\xeb\x00\x11\x2a\x94\xbb\xc3\x17\x5f\x39\x1c\x46\xa8\x88\x1f\x81\x39\xfa\xfc\xe9\x45\xe6\xa3\x69\xa0\x79\x1d\xbe\xd5\x51\x47\x79\xac\x1c\x71\x8c\x11\x03\x70\x83\xdd\x95\x28\x41\xa1\x31\xe6\x93\x57\x08\x03\x4c\xe4\xf7\x93\xe1\xea\x5f\x1f\xf8\x07\xda\x28\xaf\xfe\xf1\x6d\xea\x5d\x55\xa4\xe9\x36\xaa\xdc\x0c\x45\xf5\x49\xfd\x2a\xe7\x6a\xb5\x5a\x95\x2d\x5d\x10\xe6\x7e\xd9\xf6\x8e\x2d\xfe\x3d\x38\x20\x04\x9f\xe6\xa0\x1d\xb7\xe0\x30\xcf\x03\xf9\x1d\x1a\xba\xc6\x4c\xfd\xb2\x75\xd8\xf5\xa9\xce\x18\xd0\x69\x07\xaa\x4b\x25\x4f\xda\xa4\x2c\xfa\x3b\xd2\xc6\x6b\x8a\x22\x6d\x92\x12\xe8\xe4\x68\x0f\x97\xbe\xb0\xaf\xc1\xfe\xeb\x3e\xca\x92\xf4\x71\xdd\x39\x79\x29\x72\xeb\xc7\xba\xdb\x70\x90\x7f\xdc\x53\x32\xf9\x4b\x9a\xe4\x5f\x7e\x89\x76\xff\xc0\x25\xff\xab\xc8\x9b\xc9\xbb\x7f\xa0\x43\x81\x9c\xff\xfe\xdb\xbb\xc9\x7f\x16\xdb\xa2\x29\x26\xef\xfe\x37\x4a\xef\x51\xb7\x76\x39\x7f\x47\x27\xf4\x6e\xf2\xef\x55\x12\xa5\x93\x3a\xca\x6b\xb7\x46\x55\xb2\xa7\xbe\x33\xbd\x5f\x82\x97\x31\xd6\x79\x9e\x75\xce\x33\x6a\x1a\x54\xe1\xf3\xce\x9d\x42\x51\x28\x72\xd6\xba\x42\xd1\x17\xb2\x58\x8b\xef\x9d\x32\x1f\x59\x3b\xc5\x61\xff\x26\x1f\xc6\x41\x8f\x99\xf5\xc7\xc7\x82\xd1\x03\xc1\x65\xfc\xf9\x6b\xcc\xcd\x43\x51\xc5\x94\x1b\xb6\x44\xe0\x59\x3a\x1f\x4f\xa0\x70\xae\x4f\xdc\xd8\xed\xfe\x66\x1f\xf1\xa5\xa3\x27\xac\x34\xab\xb1\x62\x5b\xbb\x0d\x6a\x8e\xa8\x72\x51\x8a\x32\x94\x37\x6e\xd4\x34\xd1\xee\x88\xe2\xe1\x8e\x5d\x0f\x4a\xff\xc5\xb7\xe6\xfa\xd9\x39\xef\x76\x1c\x1b\x36\xdb\xd1\xb4\xb3\x68\xd6\xd8\x9d\x01\x6b\x92\xe7\xe3\xad\x26\x90\xa8\x02\xf6\xcc\xaf\xd3\xf3\xf1\x9e\x1b\xb9\x61\xd2\xd9\x0f\xf6\xa9\x30\x62\x4a\xe8\x1c\x2a\x5b\x87\x74\x41\x3e\x12\x87\xd7\x73\x8b\x8e\x74\x54\x64\x7e\xe9\x8b\x5f\xfd\xc6\xa8\xa3\xc2\xb1\x65\x2b\xa6\x0e\xd8\x5a\x48\xf4\xe5\x71\x58\x4c\x78\x87\xeb\xbf\xdf\xf0\xa7\x10\xf0\x98\xd9\x88\x88\x13\x13\xf9\xd8\x7a\xa5\xa0\x9a\xa2\x94\x59\xa6\xf7\x4d\x95\xfa\x64\x2b\x27\xb5\x7e\xa8\x68\xea\xe4\xf4\x14\x5d\xf2\x7b\x31\x09\x9f\x9d\xaf\x94\x12\x16\xad\xcc\x33\x79\x72\x4e\xa9\x4e\xd6\xd3\x4e\xa7\x22\x30\x55\x93\x3e\xf5\xee\xf2\x35\x0a\x25\xc9\x0a\x7f\x9b\x07\x24\x45\x68\x32\xcb\x12\x7e\x35\x60\x70\x0e\xa6\x65\xeb\xdc\x61\x5a\x9a\xeb\x2e\xa0\xab\xae\x38\xf2\x08\x77\x55\x5e\xfb\xe8\x90\xf7\x2b\xba\xaf\x7c\x15\xb8\xaf\x20\x2b\x14\x76\x5c\x2e\x5e\x59\x94\x38\xfe\xa2\x8a\x8d\x49\x1b\x8e\x85\xb8\xc0\x32\x02\xe9\xbc\x84\xd1\x5b\x2a\xdb\x3f\x16\xdf\x37\x5d\x7c\x6f\x66\xdb\x3b\xa8\x99\xcd\x1a\xdf\x83\xd2\x7f\xf1\x1a\xcf\x3d\x1c\x8d\x63\x18\xd6\x08\xe9\xb5\xee\xc9\x35\x2d\x7a\x1b\x04\xb0\x22\xa1\xe3\xea\xe8\x24\x1d\x2c\x36\x6f\x7e\xe9\x4c\xbd\x3c\x1b\x2b\xbc\xd7\xe1\x06\x81\x68\x8a\x03\xe1\x95\x6d\x39\x75\x30\x3e\x43\xf5\x74\x61\xca\x92\x19\xb9\xf1\x25\x6e\x7c\x88\x1b\x72\x9e\xc8\x82\x05\xe2\xdd\x88\x94\x89\x77\xc3\xa5\x54\xb1\x55\x10\x0c\x7d\x85\x7a\x10\x78\xd5\x88\x90\xc5\x47\x25\x20\x5a\x2b\x2c\x58\xec\x92\x73\x8d\x76\x58\x71\xc2\x2a\x23\xa7\x1b\x64\x1a\x31\xaa\xc1\xfa\x50\x4f\x51\x0e\x50\x90\x90\x5c\xce\x8c\x22\x88\x73\x1a\x74\xe8\x6c\x75\x03\x3b\x74\x22\x65\xea\xd0\x31\x84\xac\x55\x03\x9a\xe9\x26\x70\xd5\x70\x18\xa6\x0e\x3f\xd3\x25\xdb\xd1\x4d\x94\x6b\x54\xc3\x8a\x15\x46\x0d\x0d\x56\x83\xf3\x1c\x9f\xa2\x1b\x3a\x9b\xc9\x49\xe6\x3c\x6a\x82\xd2\x6a\xf0\x7e\x2c\x3e\xb9\xbb\xb4\xe5\xc2\x19\x8d\x55\xd2\xa4\xc8\x24\x24\x05\xb8\xde\x51\xea\xc6\x0d\xfa\xac\x1a\xc2\xbd\x92\xfd\x52\x39\x74\x78\x45\x27\xa9\xbf\x2e\xf6\x07\xfb\xeb\x12\x71\x7b\x8c\xd7\x4c\x04\xce\xf4\xc0\xac\x28\xb5\x81\x35\x6a\xa2\x85\x24\x46\xe1\x9a\x79\x60\xc5\x09\x25\xd6\xdf\x73\xd4\xd9\x48\x66\x5b\xf0\x94\x69\xa0\x5f\x1d\x18\xb9\x0c\xcc\xe8\x6c\x24\xbb\x47\x61\x4d\x24\x0d\x2d\xf7\x2e\xf8\x5d\xd9\x3a\xc1\x6c\xc4\x33\x84\x27\x98\xaf\xbc\x9a\x4c\xbd\x4b\x4d\x40\x7b\xdb\xfd\x67\xa3\xcf\xc2\x37\xb5\x4d\xc2\x37\x65\x73\xf0\xf1\xd3\x0e\xba\xd9\xdf\x43\x0c\x5f\xb0\x68\x77\x57\xb4\xbb\x03\x84\x28\x6f\xcd\x24\x86\x66\xed\x57\xee\xa9\x06\x6a\xaa\xed\x67\xa7\x5e\x22\xaf\x6a\x60\x9f\x26\x8a\x2b\x4e\x35\x4a\xe5\x2f\x02\x63\x1d\xdd\xa8\xaa\xbe\x07\xe2\xb3\x0c\xd2\x17\xed\xb1\xb1\xfe\xd6\x02\xd9\xb8\x8c\xef\xd9\xf4\x81\x5c\xe9\xb3\xa8\x3b\x8d\x49\x9e\x2a\x06\xad\xdd\x57\xeb\x05\xfd\xcc\x9b\xe4\x16\x1f\xae\x05\x60\xdd\xb7\x6b\x35\xde\xaf\x03\x9a\x18\xd9\x9a\x68\x19\x61\x37\x64\xfb\x68\x87\xdc\xfb\xa4\x4e\xb6\x49\x9a\x34\x8f\xfd\x97\x5f\x4d\x55\xdf\xba\x44\x55\x5d\x22\x7c\x6c\xa8\x1b\x19\x1c\x9a\x90\x8a\x2e\x97\x3f\xd7\xa7\xb2\x2c\xaa\xa6\x76\xbe\xfb\x4e\xf3\x29\x7b\x1a\x13\x03\xf7\xf1\xa3\x53\x54\xce\x77\x5a\x88\x3f\x86\xf9\xf6\x86\x99\x1f\x11\x37\xc7\xf7\x21\xf8\xb2\xb2\x42\xf7\x42\x59\x7f\xec\xec\xd9\x3e\xfc\xd9\xf2\xa1\xf2\xaa\xae\x32\x2f\x18\xbb\x50\x44\xf6\x8c\x32\x41\xa1\x88\x6c\x22\x6d\xe6\xc3\x46\x57\x79\xa1\x02\x84\xb0\x4f\x00\x66\x0d\x14\x3b\x03\xab\x23\x3a\xd4\x2b\xe8\xaa\x3a\x6f\x20\xeb\x9a\xe8\x8e\x00\xaf\x62\x4f\xfe\x18\xd7\x37\x18\xd7\x11\x7d\xe7\x90\x54\x45\x2a\xce\xdd\xbe\x58\x37\x7d\xc7\x73\x2b\xdf\xea\x51\x02\xa1\x5c\x3c\x22\x20\xe2\x67\xdb\x28\x60\xa9\xef\x34\x7f\xaf\xff\x52\xc0\x1d\x9a\x84\x86\x82\xc9\xfa\x0d\x54\xd2\x37\xb8\xc0\xd1\x52\xb6\xc4\x95\x76\xa9\xaf\x86\x73\x4c\x1b\xf6\x4b\x2e\xac\x1c\x4c\xca\x5d\x99\x53\xba\xdd\x51\x55\xe3\x07\x9d\x14\xac\x92\xc7\x9e\x34\x89\x46\x43\xe6\xa0\x03\xfe\xcd\x9c\x01\x65\x6f\xfe\xe7\x85\x5b\xa1\x12\x45\x8d\x43\x84\xef\x88\xda\x20\x5e\xf3\xf7\xfd\xf7\x0e\x39\x12\xac\xaa\xb9\xe8\x58\xfe\xaa\xf7\xa9\xcc\x6f\x51\x39\xfb\x24\x4d\x7f\xfc\xf0\x3e\x9c\xee\xf7\xfb\x0f\xfc\x83\x56\x77\xce\x1d\xfb\x56\x15\x79\x4a\xca\x4f\xdd\x99\x43\xfe\x13\x78\x73\xb7\xfb\x6f\x48\xfe\xeb\xd0\x7f\x5d\x5a\xfe\x1b\xf0\xc2\x94\x7a\xdc\x6e\xac\xa3\x81\x37\xef\xba\xda\xfd\x13\x90\xae\x39\x4c\x37\x9d\xbe\x7c\xe6\xe2\xff\x68\xbb\x9a\xe4\x71\xb2\x8b\x9a\xa2\xaa\x01\xd3\x27\x1c\xda\xc3\xfb\x76\xf1\x33\xda\xfc\x85\x2c\xe2\x0b\x19\x2d\x38\x6d\x40\x9f\x8d\x9c\xff\x32\xdd\xfd\x2d\x64\x5a\x05\x25\xe7\xa4\xc9\x93\xce\xb5\xf9\xd2\xb9\x36\x9f\x3b\xd7\x46\xff\x62\x8f\x1c\x8d\x66\x60\x3a\x06\x43\x2a\xb1\xa0\x3f\x0c\x41\x2c\x5e\x37\x50\x79\x83\x8f\x4e\x95\xad\xfa\x30\xb9\x6b\x78\x44\x0d\xe8\xb5\x21\x94\xe8\xb2\x0a\x63\x4a\xa3\x3c\xdc\x4f\xe0\xa2\x89\x6a\xca\x24\xc6\x20\x13\xe6\x3e\xda\xbc\x00\xed\x7e\x67\xa1\xb8\x4d\x3e\xda\x90\xa8\xc4\x09\x27\x54\xb3\xaa\x53\xae\x3e\x81\xdc\xc0\x6a\x57\x38\x7e\xa0\xde\xb0\xd7\x1c\x42\xe6\x13\xbd\xcb\x36\xd4\x2d\xbe\x17\x8f\xb8\x06\x7d\xea\xc9\xb3\x22\x25\xe5\xf8\xc2\x6f\xdf\xa2\x29\x4a\x11\xb8\x29\x4a\x19\x2e\x4b\xe2\x38\x95\xf0\x92\x52\x19\x9a\x7e\xc7\x10\xb9\xc0\xa5\x00\x0f\x5d\x77\xe0\x26\x4c\x95\xa2\x1d\xd4\x01\x5a\xce\xb6\xd8\x1e\xdc\x7d\x14\xf3\x49\x94\x84\xa0\xfc\xf6\x60\xcc\x26\xc9\x60\x8c\x18\xf8\x31\x17\xe7\x58\xa4\xcf\x23\x29\xb0\x66\x4a\x27\x29\xd2\x15\xaf\x2c\x33\x45\xfa\x44\x92\x02\x5d\x6d\x3e\x49\x91\x28\x77\x0b\xb6\xff\x5b\x9f\x49\x52\x20\x67\x4a\x28\x29\x52\x14\x2f\x56\x32\x45\xfa\x54\x92\x02\x5d\x43\x46\x49\x91\xac\x70\x47\x6f\x2c\xd1\xe7\x92\x94\x64\x4b\x1e\x2b\x92\xc1\x49\x4a\x16\x59\xbc\x18\x9e\x97\x30\x29\x52\xd1\x0d\xfc\x20\x08\x42\x8e\x2e\x09\xc0\xfa\xe7\xfe\xb6\x10\x50\xd9\x14\xe5\x00\x40\xb2\x0b\x00\x40\x24\x38\xee\x0b\xc9\x0e\x00\x40\xfa\x81\xcb\x17\x13\x0d\x00\xa0\x38\x8c\x3e\x00\x12\x9b\xcd\x82\xe1\xbe\x21\xf1\xbd\xbc\xfe\x74\x11\xad\xd5\xbe\x45\x61\x97\x26\xa5\xc7\x44\xf6\xda\x5f\x9f\xae\xbc\xc7\x67\x7e\xdf\xc2\x3a\xb5\x4a\x8f\x12\x7f\x09\xfb\xda\x84\xed\x3d\xb2\x5d\x52\xed\x52\x24\x88\x77\xde\xb9\xfe\x3d\x84\x0f\x3c\x35\x91\xa2\xa8\xda\x27\xed\x55\x8f\x0d\xc4\x6e\xe7\x44\x71\x1f\x41\xd8\x81\x8e\x5d\xb2\x42\x0b\x5b\x21\x08\x84\xbe\x4d\x0a\xad\xec\x3c\x38\x0f\x07\x00\x34\xd1\x36\x1d\x29\xe2\xbf\x00\x00\x77\x87\xd2\x94\x87\xc2\x45\x3c\x68\xe7\xb8\xbd\xfe\xab\xfc\x8c\x54\x40\x06\x7a\xe1\x68\xf9\x60\x10\x28\xd8\x61\x20\x60\x54\x20\x0a\xcd\x19\xfc\xd8\xad\x33\x93\x42\xd4\x99\x8d\x4e\x0c\x50\xd6\x6a\x51\x67\x66\xcd\xa8\x33\xb3\x72\xf4\x30\x76\xfa\x51\x67\x6f\xa8\x22\xa3\x90\x6e\x50\x4b\x00\x35\x59\x2e\xee\xa8\x9a\x64\x46\xbb\x91\x59\x99\x8e\xec\x6a\xeb\x91\x59\x18\x90\xcc\xc2\x86\x64\x57\x99\x91\xec\x2d\x2d\x49\x16\x7f\x5b\x6a\xd2\x5f\xb7\x89\xdd\xf4\x60\x52\x93\xf4\x60\xa3\x26\x03\x94\xb5\x9a\xa4\x07\xb3\x9a\xa4\x07\xb3\x9a\xf4\x30\x76\x6a\x92\x1e\xde\x50\x4d\x46\x21\x7d\x1b\x6a\x12\xe0\x43\xee\x58\x4f\xda\xd4\xa4\x27\x6d\x6a\xa3\x27\x03\x94\xb5\x9e\xb4\xa9\x59\x4f\xda\xd4\xac\x27\x3d\x8c\x9d\x9e\xb4\xe9\x1b\xea\xc9\x28\xa4\x5b\xd4\x13\x8f\xe4\x91\x4c\xaa\xba\x39\xf3\x57\xbc\xe3\x24\x8f\x52\xfa\xa8\xfa\x98\x5b\x81\xec\x9e\xdc\x60\x8c\x39\x0e\x25\xfd\x0f\x8a\x33\x8d\xb4\x28\x43\x01\xa5\x84\xb1\x47\xd8\xe3\x3b\xe5\xf8\x6f\x14\x6b\x90\x06\x02\x52\x5f\x44\xea\x6f\x86\xcc\x1f\xb8\xb4\x2a\x1e\xce\xc0\xcd\xf6\x63\x51\x25\xbf\x15\x79\x13\x31\x8a\xa4\xbd\xe5\x0e\x80\x09\xf7\xd7\xab\xe2\x81\x05\x92\xaf\xbd\xf3\x00\xba\x4a\xca\x3b\xb9\x11\x7f\xd6\x5c\xcc\x7f\x36\xe6\x09\x29\x3d\xff\x12\x8c\xa1\x7e\x1c\x01\xb7\x42\x24\x22\xf0\x75\x23\x41\xb1\x58\x0d\x85\x0b\x00\x83\x43\x02\x00\xda\x00\x71\x43\xa4\xeb\x9f\xf5\x50\x59\xf7\x8e\xa7\x69\x33\x66\xe6\x3e\xaa\xe0\x68\x37\x1f\xaa\xa8\x3c\x73\xec\xe0\xfb\x2b\xdd\xff\x40\xf4\xa1\x4a\x55\x05\xa5\x40\x1e\x14\x02\x68\x90\x0a\x25\x15\xa9\x5a\x5d\xc5\xf4\x45\x1a\x30\x9e\x3b\x9d\x6c\x75\x40\x26\x80\x8b\x27\x7c\xb3\x21\x59\xb1\xcf\xd2\x57\x21\x5c\x0c\x68\x02\x78\xed\x5d\x02\xe6\x3e\x16\x89\xb5\x36\x28\x64\x3e\x51\x1e\x9f\xa1\xbb\xfb\xb6\x3c\x0a\xa0\xe2\x7d\x7e\x13\x7f\x1c\x88\xcc\x1d\xf9\x14\x70\x56\x7c\x5c\xb3\xe0\x51\x06\x04\x3e\xb8\x69\x98\x14\x01\x64\x16\x69\x0e\x8a\xb3\x2a\xed\x85\x05\x93\x5c\x32\x0b\x25\xaf\x32\x3e\x4b\x3c\x32\xcf\x11\x0e\x8e\x9d\xf5\xfc\x10\x20\x25\x3b\x71\x52\x37\x55\xb2\x3d\x35\xc8\xc8\x91\x88\xa9\xff\xd8\x81\x4f\x7d\x00\x33\x85\xb9\xd8\x07\x48\x0f\x4e\x40\x0f\xf1\x09\xe3\x31\xb5\xe7\xb9\x13\xe7\x07\xc1\x09\x4f\x10\x09\xb3\x62\x72\x40\x38\xf4\x6d\x79\x9e\x80\x59\xc1\x7e\x39\x33\x70\xa6\x9e\x12\x0a\x24\xba\xc6\x3c\x63\xc3\xb7\x3a\x99\x35\xf9\x73\x1d\xc8\x1c\x04\xc6\xb3\x07\x40\xe8\x11\x88\xda\x56\xa1\x66\x77\x04\xf5\x0d\xd7\x18\x18\x04\xa0\x44\x75\x13\x01\xb4\xcd\x7b\xee\xe0\x75\x83\xab\x33\x68\x3b\xde\x24\x80\x2b\x83\x19\x8b\xc8\x05\xab\xf5\x40\x6b\x85\x5e\x8f\x1c\x40\xba\xad\xb3\xfb\x3c\x75\x41\xbf\xf9\xe6\x6a\xf5\x1d\xc9\x2b\x54\x58\x6d\xd4\x79\xfa\xa2\x49\xe7\x5b\x1b\xad\xf5\xc8\x87\x6c\xb2\xad\x50\x89\xfc\x08\xe6\x1a\xc2\xa1\x36\xd6\x23\x37\xa0\xc5\xb6\x41\x26\xeb\x28\x3f\x87\x04\x1c\xea\x19\xc2\xaa\x28\x3c\x4b\x94\x48\x7a\x1e\x6a\x94\xee\xdd\xe8\xd4\x14\x02\xf5\xae\x1c\xdf\x1d\x87\xe8\x92\xa7\x24\xf0\xf4\x04\x40\x0e\x55\x12\xe3\xcd\x0c\x08\xa1\x44\xcf\x71\x04\x4d\x5b\xdc\x46\x3f\x67\x19\xc6\xe0\x49\xab\xc4\xc1\x51\x97\xa7\xeb\xd8\x4e\x31\x57\x19\xca\xd0\x64\x55\xb4\xe7\xa8\x82\xd3\x14\x37\x54\xcf\x51\x86\x2c\x08\x24\x8c\x85\x62\x22\x83\x44\x38\xde\xa4\x95\x88\x69\xa8\x5b\x63\x18\xfe\x94\x0b\x8d\x02\x89\xa0\x0f\xd0\x14\xc1\x2d\x35\xf3\x83\x53\x07\x08\x4a\x10\x8f\x6a\x16\xc1\x74\x34\x9f\xb3\x88\x86\x65\x2f\x12\x4d\xaa\xb3\x67\x0f\x28\xd5\xd9\xcb\xc4\x94\xea\xec\x9b\x0e\x2b\xd5\xd9\xef\x24\xb2\x44\xc6\xe1\xf7\x1b\x5c\x1a\x06\xea\x77\x1f\x5f\xaa\xb3\x57\x08\x31\xe1\x4f\xf1\xaf\x15\x65\xa2\x3d\xba\x9d\x40\x53\xf6\xcd\xc4\x9a\xea\xec\xc6\xc3\x4d\xdd\xbc\xbc\xfd\x88\x53\x9d\x7d\x93\x41\xa7\x3a\xbb\xb1\xb8\x53\x76\xe3\xa1\x27\x60\xba\xdc\x42\xf4\x09\x9e\x24\xb7\x11\x80\xea\xa6\xc6\x37\x10\x83\xca\x6e\x3f\x0c\x95\xdd\x48\x24\x4a\x98\x04\xaf\x1f\x8c\x92\xd5\xfd\xd5\xe3\x51\x80\xc1\x7f\xeb\x90\x94\x6c\xcc\xdf\x3e\x2a\x95\xbd\x7d\x60\xaa\x13\xcb\xed\xc5\xa6\xb2\x37\x0e\x4f\x81\x73\xf8\x35\x22\x54\xaa\xb9\x7b\x23\x41\x2a\x68\xb5\x7a\xed\x38\x55\x76\x9b\xa1\x2a\xcd\x99\x5a\x4c\x3e\x8b\x5f\x24\x56\x95\xc5\xcf\x1e\xab\xca\xe2\x97\x89\x55\x65\xf1\x37\x1d\xab\xca\xe2\xdf\x49\xac\x8a\x8c\xc3\xef\x37\x56\x35\x0c\xd4\xef\x3e\x56\x95\xc5\xaf\x10\xab\xc2\xf7\x01\x5e\x2b\x56\x45\x7b\x74\x33\xb1\xaa\x2c\xfe\x66\x62\x55\x59\x7c\xe3\xb1\xaa\x6e\x5e\xde\x7e\xac\x2a\x8b\xbf\xc9\x58\x55\x16\xdf\x56\xac\x0a\x9c\x38\xb7\x14\xab\x02\xa6\xcb\x2d\xc4\xaa\xe0\x49\x72\x1b\xb1\xaa\x6e\x6a\xdc\x7e\xac\x0a\x6b\xde\x6d\xc7\xaa\xa4\xc9\xf1\x56\xb1\x2a\x61\x12\xbc\x7e\xac\x4a\x56\xf7\x57\x8f\x55\x01\x06\xff\xad\x63\x55\xb2\x31\x7f\xf3\x58\x15\x30\xab\x5e\x3d\x56\xd5\x89\xe5\xe6\x62\x55\x8a\xb9\xfc\x7a\xb1\x2a\x70\x0e\xbf\x46\xac\x4a\x35\x77\x6f\x24\x56\x05\xad\x56\xaf\x1c\xab\x52\x4e\x9a\xdb\x8b\x55\xf5\x17\x7b\xc9\x84\x3d\xbc\xcc\x2d\xbd\xc3\xb3\xc7\xaa\xd2\xc3\xcb\xc4\xaa\xd2\xc3\x37\x1d\xab\x4a\x0f\xbf\x93\x58\x15\x19\x87\xdf\x6f\xac\x6a\x18\xa8\xdf\x7d\xac\x2a\x3d\xbc\x42\xac\x0a\x27\x25\x78\xad\x58\x15\xed\xd1\xcd\xc4\xaa\xd2\xc3\x37\x13\xab\x4a\x0f\x37\x1e\xab\xea\xe6\xe5\xed\xc7\xaa\xd2\xc3\x37\x19\xab\x4a\x0f\xb7\x15\xab\x02\x27\xce\x2d\xc5\xaa\x80\xe9\x72\x0b\xb1\x2a\x78\x92\xdc\x46\xac\xaa\x9b\x1a\xb7\x1f\xab\xc2\x9a\x77\xdb\xb1\x2a\x69\x72\xbc\x55\xac\x4a\x98\x04\xaf\x1f\xab\x92\xd5\xfd\xd5\x63\x55\x80\xc1\x7f\xeb\x58\x95\x6c\xcc\xdf\x3c\x56\x05\xcc\xaa\x57\x8f\x55\x75\x62\xb9\xb9\x58\x95\x62\x2e\xbf\x5e\xac\x0a\x9c\xc3\xaf\x11\xab\x52\xcd\xdd\x1b\x89\x55\x41\xab\xd5\x2b\xc7\xaa\x94\x93\xe6\xf6\x62\x55\x43\x76\x31\x4c\xbf\x4d\x5f\x24\x58\xd5\xa6\xcf\x1e\xac\x6a\xd3\x97\x09\x56\xb5\xe9\x37\x1d\xac\x6a\xd3\xdf\x49\xb0\x8a\x8c\xc3\xef\x37\x58\x35\x0c\xd4\xef\x3e\x58\xd5\xa6\xaf\x10\xac\xc2\x99\x11\x5f\x2b\x58\x45\x7b\x74\x33\xc1\xaa\x36\xfd\x66\x82\x55\x6d\x7a\xe3\xc1\xaa\x6e\x5e\xde\x7e\xb0\xaa\x4d\xbf\xc9\x60\x55\x9b\xde\x56\xb0\x0a\x9c\x38\xb7\x14\xac\x02\xa6\xcb\x2d\x04\xab\xe0\x49\x72\x1b\xc1\xaa\x6e\x6a\xdc\x7e\xb0\x0a\x6b\xde\x6d\x07\xab\xa4\xc9\xf1\x56\xc1\x2a\x61\x12\xbc\x7e\xb0\x4a\x56\xf7\x57\x0f\x56\x01\x06\xff\xad\x83\x55\xb2\x31\x7f\xf3\x60\x15\x30\xab\x5e\x3d\x58\xd5\x89\xe5\xe6\x82\x55\x8a\xb9\xfc\x7a\xc1\x2a\x70\x0e\xbf\x46\xb0\x4a\x35\x77\x6f\x24\x58\x05\xad\x56\xaf\x1c\xac\x52\x4e\x9a\xb7\x0e\x56\x79\xfb\xb4\x88\x1a\xf2\x62\x10\xfe\xb9\xee\x7e\xf2\xbb\xb1\x0e\x80\xbc\x7a\x44\x20\xf0\x6f\x19\x04\x67\xcd\x27\x10\x42\xce\x7c\x5d\x56\xac\xae\x65\x9d\x99\x19\xa8\x33\x1b\x1e\xfa\x27\x63\x40\x36\xb4\x37\x1e\xbb\xd6\x59\x6c\xe6\x23\x8b\x6d\xf8\xe8\xdf\x24\xb1\xe5\x63\x3c\xcd\x86\x47\xe3\x60\xe6\x23\x3d\xd8\xf0\xd1\x3f\x7a\x61\xcb\x07\x13\xa9\xec\x9a\xb7\xa9\x99\x91\x36\xb5\x61\xa4\x7f\x55\x01\x66\xc4\xdb\x27\x2d\x7d\xa4\x6b\x78\x11\x11\x17\xd1\xf7\x95\xfb\xa7\x46\xc5\xe7\x45\xfd\xa9\xdf\xb7\xa5\xcf\x68\x09\xcd\x85\x37\x4a\x15\x18\xea\x26\xd9\x7d\x79\xe4\xc9\xf7\xd3\x94\xd4\x6d\x86\x72\xfa\x37\xe1\x4b\x40\x53\xb9\x45\x9e\x3e\x02\x8f\x3a\x52\xe1\x8e\xef\x73\x06\xe3\x73\x8d\xc3\x3b\xa3\x6b\xb7\x2b\x2d\xee\x51\xb5\x4f\x8b\x87\xfe\x41\xfc\x5d\x9a\x94\xeb\x0a\xed\x1a\xf2\x46\xf7\xc4\xff\xb8\xd9\x0e\xd1\x54\x4a\xd1\xc5\xaf\xbf\x45\xdb\x14\xad\xc9\xfb\x93\x13\xa0\x06\xff\x3a\x33\xfd\x88\x9a\x64\x47\x39\xc3\x2f\x89\x52\xd6\xe8\xab\xa2\x98\x23\x7f\x64\x07\x3f\xd5\x9f\x22\xc2\x4f\x07\x73\xf1\x1e\xdc\x70\x7e\xa6\x4f\x10\xcf\xdf\xb3\x63\xfe\xe0\xce\x7d\x5a\x33\xf7\x85\x9a\x65\xdf\x66\x29\xb6\x09\xfc\xbe\x51\xe0\xf3\xad\x8e\x1d\xa5\xfe\x85\xe3\xb9\x50\x35\xf7\xfb\xaa\xb9\xd8\x6a\x39\xb4\x5a\x8a\xad\x3a\x62\xc3\xcb\x9e\x7c\xbb\x8c\xb0\x32\xbe\xac\x2a\x01\x1c\x07\x00\x15\x0a\xb7\xab\x26\x32\x74\xb8\xe7\xea\xb2\x66\xa8\x92\x9f\xd1\xcb\xaa\xb1\x12\x78\x3c\x2f\xdb\x8e\xd5\xd0\x8b\x79\x59\x3a\xd6\xcb\x0f\xe5\x65\xad\x06\xf9\x46\xdd\xec\x51\xc9\xf0\x46\xc7\x8b\x1b\xf4\x12\x20\x2f\xca\x39\xe4\x1f\x41\x16\x01\x8b\x1a\x80\xa8\x46\x08\xc2\x33\x00\xb3\x1d\x61\x28\x27\x00\x50\x3a\x02\xe1\x3e\x02\x20\xad\x89\xd6\xc6\x80\xe0\x51\xdf\x9d\x8d\x91\x49\x37\x1c\x64\x46\x44\x06\x48\x2c\xe4\x48\x00\x02\x0b\x85\x4e\x00\xf2\x0a\x45\x79\x01\xe2\x0a\x79\x71\x01\xd2\xd2\x13\xda\xe8\x9b\x3f\x6a\x3b\xb2\x31\xf1\xe7\x4e\x7b\x49\x05\x9d\xa0\x02\x59\x4e\x53\x16\x7d\x20\x8b\x69\xca\x73\x1f\xc8\x52\x9a\x0a\x52\x0a\x64\x21\x4d\x39\x21\x05\xb2\x8c\xb4\x54\x36\xda\xc6\x8f\xba\x2e\x6c\x0c\xac\xb9\xb3\x41\x3e\x44\x95\x02\x48\x97\x66\x1c\x01\x48\x99\x66\x02\xff\x90\x36\xcd\x44\x39\x41\xea\x34\xe3\x25\x05\xe9\x93\x81\xd6\xc6\x80\xe0\x51\xdf\x9d\x8d\x91\x49\x77\xde\xcb\x6c\xda\x49\x6c\x2a\xcb\x6b\xce\x12\x98\xca\xd2\x9a\xf3\x3d\x98\xca\xb2\x9a\x0b\xb2\x9a\xca\x92\x9a\x73\x92\x9a\xca\x72\xd2\x52\xd9\x68\x1b\x3f\xea\xba\xb0\xd1\xb3\x56\xba\xfe\x79\xf0\x59\xf8\x45\xad\x6c\xc6\x3a\x79\x55\x2b\x2b\xa6\x16\x58\xd6\xca\x2d\x53\x0f\xad\x25\x65\xca\x00\xc8\x2b\x54\xd9\xea\xf0\x6f\x34\x0d\x1f\xd5\x6c\x6f\xb4\x0c\xb9\xc1\x20\x0a\xe5\xea\x56\x36\x23\x94\x62\x79\x2b\x2b\x06\x44\xb5\xbe\x95\x5b\x06\x48\xb9\x76\x94\x29\x03\xa5\x58\xa0\xca\xd6\x48\x6e\x63\x42\xf1\x68\xe8\xd4\xc6\xcc\xa9\x1b\x8e\xc2\x83\x97\xb9\xb2\x19\x61\xe0\x75\xae\xac\x18\x08\xc5\x42\x57\x6e\x19\x18\xd5\x4a\x52\xa6\x0c\x10\xbc\x56\x95\xad\x89\xd6\xc6\x80\xe0\x51\xdf\x9d\x8d\x91\x49\x77\x3a\x88\x0c\x5c\xef\xca\x66\x84\x00\x17\xbc\xb2\x62\x00\xe0\x15\xaf\xdc\x32\x20\x8a\x75\xa5\x4c\x19\x18\x70\xd9\x2a\x5b\x03\xa1\x8d\xbe\xf9\xa3\xb6\x23\x1b\x13\x7f\xee\x6c\x14\x94\x6a\xe1\x2b\x9b\x11\x4a\xb1\xf2\x95\x15\x03\xa2\x5a\xfa\xca\x2d\x03\xa4\x5c\x56\xca\x94\x81\x52\xac\x5d\x65\x6b\x24\xb7\x31\xa1\x78\x34\x74\x6a\x63\xe6\xd4\x9d\x0f\xc2\x03\x57\xc0\xb2\x19\x21\xc0\x25\xb0\xac\x18\x00\x78\x0d\x2c\xb7\x0c\x88\x6a\xa5\x49\x19\x18\x70\x21\x2b\x5b\x03\xa1\x8d\xbe\xf9\xa3\xb6\x23\x1b\x03\x7f\x34\x05\x1d\x75\x16\xc4\x90\x70\xd6\xb0\xd5\x18\xbd\x04\x52\x71\x20\xd5\xb0\xf1\x16\xbc\x05\x16\x88\xf2\x22\x41\xa5\x1c\x14\xee\xae\x04\xd3\x1a\xc9\x6d\xb4\xed\x1f\x0d\x3d\xda\x68\x79\x54\x87\xff\x32\xb7\xd6\xee\x94\x99\x5a\x70\xb3\xcc\xd6\xc3\xfb\x65\x16\x42\xb1\x65\x66\x41\xc0\x5d\xb3\x96\x8a\x76\xe3\xac\xe1\x5f\xbf\x77\xae\x2d\xb7\xcf\x0c\x9c\x7a\x07\xcd\x02\x69\x36\xd1\x2c\x98\x6e\x1f\xcd\xc2\xa9\xb7\xd2\x66\xa2\xe6\xdd\xb4\xa9\x77\x16\x1b\xea\xda\x6a\x4f\xcd\x40\x29\xb7\xd5\x2c\x8c\x7a\x67\xcd\x42\x69\x36\xd7\x2c\x98\x72\x7f\x6d\xa4\x68\xdc\x62\x1b\xfa\x65\xde\x65\xd7\x16\x1b\x6d\x06\x46\xb5\xd7\x66\x41\x94\xdb\x6d\x16\x48\xbd\xe3\x66\xa1\x54\x9b\x6e\x13\x39\xd3\xbe\x5b\xdf\x23\xe3\xd6\xbb\xb6\xdc\x7d\x33\x70\xea\x0d\x38\x0b\xa4\xd9\x83\xb3\x60\xba\x6d\x38\x0b\xa7\xde\x89\x9b\x89\x9a\x37\xe3\xa6\xde\x59\xec\xc7\x6b\x8b\x2d\x39\x03\xa3\xda\x95\xb3\x20\xca\x8d\x39\x0b\xa4\xde\x9b\xb3\x50\xaa\xed\xb9\x89\x9c\x69\x87\xae\xef\x91\x71\x93\x8e\xd7\x1c\xf5\x3e\x9d\xad\x06\xb7\xea\x1c\x00\xbc\x5b\xe7\x40\x14\x1b\x76\x0e\x06\xdc\xb3\xeb\x09\xe9\xb7\xed\xba\x5e\x18\x76\xee\x78\x51\xb1\xd9\xbc\xb3\x80\xea\xfd\x3b\x07\xa5\xd9\xc2\x73\x70\xba\x5d\x3c\x07\xa8\xde\xc8\x5b\xd0\xb5\xd8\xcb\x1b\xfb\x68\xb3\x9d\xc7\xab\x8c\x79\x47\xcf\x82\x29\x37\xf5\x1c\x90\x7a\x5f\xcf\x81\x69\xb6\xf6\x1c\x9c\x72\x77\x6f\x26\x6a\xde\xe0\x9b\x7a\x67\xb1\xc7\xc7\xcb\x8e\x69\x9b\xcf\x02\xa9\x76\xfa\x1c\x8c\x72\xb3\xcf\x41\xa9\xf7\xfb\x1c\x98\x6a\xcb\x6f\xa4\x68\xdc\xf5\x1b\xfa\x65\xde\xf8\xe3\xf5\xc6\x66\xef\xcf\x02\xaa\xb7\xff\x1c\x94\x26\x02\xc0\xc1\xe9\x82\x00\x1c\xa0\x3a\x0e\x60\x41\xd7\x22\x14\x60\xec\xa3\x4d\x34\x00\x2f\x44\xa6\x80\x00\x0b\xa4\x8a\x09\x70\x30\xca\xb0\x00\x07\xa5\x8e\x0c\x70\x60\xaa\xe0\x80\x91\xa2\x31\x3e\x60\xe8\x97\x39\x44\x50\x1b\xa3\x04\x3c\x84\x2a\x50\x20\x40\x29\x63\x05\x02\x9c\x3a\x5c\x20\x00\xaa\x22\x06\x16\x74\x4d\x41\x03\x63\x07\xf5\x71\x03\xcd\x79\x9d\xcc\xcd\x62\x5d\xe0\x80\xa9\x05\x03\x07\x6c\x3d\x1c\x38\x60\x21\x14\x81\x03\x16\x04\x0c\x1c\x68\xa9\x68\x03\x07\x1a\xfe\xf5\x81\x83\x2c\xb6\x0b\x1c\x30\x70\xea\xc0\x01\x0b\xa4\x09\x1c\xb0\x60\xba\xc0\x01\x0b\xa7\x0e\x1c\x98\x89\x9a\x03\x07\xa6\xde\x59\x04\x0e\xb2\xd8\x26\x70\xc0\x40\x29\x03\x07\x2c\x8c\x3a\x70\xc0\x42\x69\x02\x07\x2c\x98\x32\x70\x60\xa4\x68\x0c\x1c\x18\xfa\x65\x0e\x1c\x64\xb1\x39\x70\xc0\xc0\xa8\x02\x07\x2c\x88\x32\x70\xc0\x02\xa9\x03\x07\x2c\x94\x2a\x70\x60\x22\x67\x0a\x1c\xe8\x7b\x64\x0c\x1c\x64\xb1\x5d\xe0\x80\x81\x53\x07\x0e\x58\x20\x4d\xe0\x80\x05\xd3\x05\x0e\x58\x38\x75\xe0\xc0\x4c\xd4\x1c\x38\x30\xf5\xce\x22\x70\x90\xc5\xe6\xc0\x01\x03\xa3\x0a\x1c\xb0\x20\xca\xc0\x01\x0b\xa4\x0e\x1c\xb0\x50\xaa\xc0\x81\x89\x9c\x29\x70\xa0\xef\x91\x31\x70\x80\xd7\x1c\x75\xe0\x80\xad\x06\x03\x07\x1c\x00\x1c\x38\xe0\x40\x14\x81\x03\x0e\x06\x0c\x1c\xe8\x09\xe9\x03\x07\xba\x5e\x18\x02\x07\x78\x51\xb1\x09\x1c\xb0\x80\xea\xc0\x01\x07\xa5\x09\x1c\x70\x70\xba\xc0\x01\x07\xa8\x0e\x1c\x58\xd0\xb5\x08\x1c\x18\xfb\x68\x13\x38\xc0\xab\x8c\x39\x70\xc0\x82\x29\x03\x07\x1c\x90\x3a\x70\xc0\x81\x69\x02\x07\x1c\x9c\x32\x70\x60\x26\x6a\x0e\x1c\x98\x7a\x67\x11\x38\xc0\xcb\x8e\x29\x70\xc0\x02\xa9\x02\x07\x1c\x8c\x32\x70\xc0\x41\xa9\x03\x07\x1c\x98\x2a\x70\x60\xa4\x68\x0c\x1c\x18\xfa\x65\x0e\x1c\xe0\xf5\xc6\x26\x70\xc0\x02\xaa\x03\x07\x1c\x94\x26\x70\xc0\xc1\xe9\x02\x07\x1c\xa0\x3a\x70\x60\x41\xd7\x22\x70\x60\xec\xa3\x4d\xe0\x00\x2f\x44\xa6\xc0\x01\x0b\xa4\x0a\x1c\x70\x30\xca\xc0\x01\x07\xa5\x0e\x1c\x70\x60\xaa\xc0\x81\x91\xa2\x31\x70\x60\xe8\x97\x39\x70\xd0\x67\x0d\x57\x07\x0e\x78\x08\x55\xe0\x40\x80\x52\x06\x0e\x04\x38\x75\xe0\x40\x00\x54\x05\x0e\x2c\xe8\x9a\x02\x07\xc6\x0e\x5e\x1d\x38\xe8\x2f\xd8\x64\x6e\x7a\xd0\x05\x0e\x98\x5a\x30\x70\xc0\xd6\xc3\x81\x03\x16\x42\x11\x38\x60\x41\xc0\xc0\x81\x96\x8a\x36\x70\xa0\xe1\x5f\x1f\x38\x48\x0f\x76\x81\x03\x06\x4e\x1d\x38\x60\x81\x34\x81\x03\x16\x4c\x17\x38\x60\xe1\xd4\x81\x03\x33\x51\x73\xe0\xc0\xd4\x3b\x8b\xc0\x41\x7a\xb0\x09\x1c\x30\x50\xca\xc0\x01\x0b\xa3\x0e\x1c\xb0\x50\x9a\xc0\x01\x0b\xa6\x0c\x1c\x18\x29\x1a\x03\x07\x86\x7e\x99\x03\x07\xe9\xc1\x1c\x38\x60\x60\x54\x81\x03\x16\x44\x19\x38\x60\x81\xd4\x81\x03\x16\x4a\x15\x38\x30\x91\x33\x05\x0e\xf4\x3d\x32\x06\x0e\xd2\x83\x5d\xe0\x80\x81\x53\x07\x0e\x58\x20\x4d\xe0\x80\x05\xd3\x05\x0e\x58\x38\x75\xe0\xc0\x4c\xd4\x1c\x38\x30\xf5\xce\x22\x70\x90\x1e\xcc\x81\x03\x06\x46\x15\x38\x60\x41\x94\x81\x03\x16\x48\x1d\x38\x60\xa1\x54\x81\x03\x13\x39\x53\xe0\x40\xdf\x23\x63\xe0\x00\xaf\x39\xea\xc0\x01\x5b\x0d\x06\x0e\x38\x00\x38\x70\xc0\x81\x28\x02\x07\x1c\x0c\x18\x38\xd0\x13\xd2\x07\x0e\x74\xbd\x30\x04\x0e\xf0\xa2\x62\x13\x38\x60\x01\xd5\x81\x03\x0e\x4a\x13\x38\xe0\xe0\x74\x81\x03\x0e\x50\x1d\x38\xb0\xa0\x6b\x11\x38\x30\xf6\xd1\x26\x70\x80\x57\x19\x73\xe0\x80\x05\x53\x06\x0e\x38\x20\x75\xe0\x80\x03\xd3\x04\x0e\x38\x38\x65\xe0\xc0\x4c\xd4\x1c\x38\x30\xf5\xce\x22\x70\x80\x97\x1d\x53\xe0\x80\x05\x52\x05\x0e\x38\x18\x65\xe0\x80\x83\x52\x07\x0e\x38\x30\x55\xe0\xc0\x48\xd1\x18\x38\x30\xf4\xcb\x1c\x38\xc0\xeb\x8d\x4d\xe0\x80\x05\x54\x07\x0e\x38\x28\x4d\xe0\x80\x83\xd3\x05\x0e\x38\x40\x75\xe0\xc0\x82\xae\x45\xe0\xc0\xd8\x47\x9b\xc0\x01\x5e\x88\x4c\x81\x03\x16\x48\x15\x38\xe0\x60\x94\x81\x03\x0e\x4a\x1d\x38\xe0\xc0\x54\x81\x03\x23\x45\x63\xe0\xc0\xd0\x2f\x73\xe0\xa0\x4f\xe1\xac\x0e\x1c\xf0\x10\xaa\xc0\x81\x00\xa5\x0c\x1c\x08\x70\xea\xc0\x81\x00\xa8\x0a\x1c\x58\xd0\x35\x05\x0e\x8c\x1d\xbc\x3a\x70\x30\x64\xc4\xc8\xdc\x36\xd5\x45\x0e\x98\x5a\x30\x72\xc0\xd6\xc3\x91\x03\x16\x42\x11\x39\x68\x4d\x37\xfc\xb5\x54\xb4\x91\x03\x0d\xff\xfa\xc8\x41\x9b\xda\x45\x0e\x18\x38\x75\xe4\x80\x05\xd2\x44\x0e\x58\x30\x5d\xe4\xa0\xb5\xba\xf6\x6f\x26\x6a\x8e\x1c\x98\x7a\x67\x11\x39\x68\x53\x9b\xc8\x01\x03\xa5\x8c\x1c\xb0\x30\xea\xc8\x01\x0b\xa5\x89\x1c\xb4\x36\xb9\x00\x8c\x14\x8d\x91\x03\x43\xbf\xcc\x91\x83\x36\x35\x47\x0e\x18\x18\x55\xe4\x80\x05\x51\x46\x0e\x58\x20\x75\xe4\xa0\xb5\x48\x10\x60\x22\x67\x8a\x1c\xe8\x7b\x64\x8c\x1c\xb4\xa9\x5d\xe4\x80\x81\x53\x47\x0e\x58\x20\x4d\xe4\x80\x05\xd3\x45\x0e\x5a\xab\xac\x01\x66\xa2\xe6\xc8\x81\xa9\x77\x16\x91\x83\x36\x35\x47\x0e\x18\x18\x55\xe4\x80\x05\x51\x46\x0e\x58\x20\x75\xe4\xa0\xb5\x48\x25\x60\x22\x67\x8a\x1c\xe8\x7b\x64\x8c\x1c\xb4\xa9\x36\x72\xc0\x56\x83\x91\x03\x0e\x00\x8e\x1c\x70\x20\x8a\xc8\x41\x6b\xcc\x2f\xa0\x27\xa4\x8f\x1c\xe8\x7a\x61\x88\x1c\xb4\xa9\x65\xe4\x80\x05\x54\x47\x0e\x38\x28\x4d\xe4\x80\x83\xd3\x45\x0e\x5a\xbb\xa4\x03\x16\x74\x2d\x22\x07\xc6\x3e\xda\x44\x0e\xda\xd4\x2a\x72\xc0\x82\x29\x23\x07\x1c\x90\x3a\x72\xc0\x81\x69\x22\x07\xad\x55\x26\x02\x33\x51\x73\xe4\xc0\xd4\x3b\x8b\xc8\x41\x9b\x5a\x44\x0e\x58\x20\x55\xe4\x80\x83\x51\x46\x0e\x38\x28\x75\xe4\xa0\xb5\x49\x4f\x60\xa4\x68\x8c\x1c\x18\xfa\x65\x8e\x1c\xb4\xa9\x65\xe4\x80\x05\x54\x47\x0e\x38\x28\x4d\xe4\x80\x83\xd3\x45\x0e\x5a\xbb\x9c\x05\x16\x74\x2d\x22\x07\xc6\x3e\xda\x44\x0e\xda\xd4\x22\x72\xc0\x02\xa9\x22\x07\x1c\x8c\x32\x72\xc0\x41\xa9\x23\x07\xad\x4d\x22\x03\x23\x45\x63\xe4\xc0\xd0\x2f\x73\xe4\xa0\x4d\x4d\x91\x03\x1e\x42\x15\x39\x10\xa0\x94\x91\x03\x01\x4e\x1d\x39\x68\xed\xb2\x1b\x58\xd0\x35\x45\x0e\x8c\x1d\x34\x44\x0e\xbc\x06\xb5\x43\xaa\xfd\x33\xfe\x83\x64\x64\x95\x32\x41\x53\x50\xfa\x94\xc6\xc3\x31\x69\x90\x8b\x53\x2f\x03\x4f\x61\x60\xc8\xa6\x3a\xe5\xbb\xa8\x41\x67\x31\x37\x24\xae\x1d\x0a\x51\x9a\x26\x65\x9d\xd4\x1b\x19\x25\x45\x84\x73\x79\x32\xac\x89\x09\x3d\x71\x15\x49\xe6\xc9\x40\x49\x19\x3d\x71\x1d\x4d\xf8\xcb\xc0\x49\x39\x78\xd5\x79\x1f\x70\xab\x3e\xeb\xab\x89\xa1\x21\xf3\xab\x91\xa7\x3a\xb3\x61\x4b\x73\xad\x04\x37\xeb\xb3\xc0\x9a\xf8\x1a\x32\xc1\x1a\xf9\x1a\x1f\x9e\xbf\x92\xaf\xfe\xd4\x0a\x19\xbd\x83\x1d\x5f\x43\x66\x58\x23\x5f\xe3\x23\x63\x57\xf2\x35\x04\xc5\x70\xbb\x3e\x4b\xac\x89\xb1\x21\x53\xac\x91\xb1\x31\xa1\xb4\x96\x31\xda\x8b\xe2\x01\x55\xbb\xa8\x46\x67\x3a\x5b\xa2\xbc\xde\x17\x55\xb6\x1e\x2a\x24\xfc\xa7\xb2\x84\x9b\x0c\x15\xb2\xbe\x47\x65\xd2\x44\x69\xf2\x9b\xd4\x66\xac\xe1\xd2\xde\x16\x79\xe3\x3e\xe0\xec\xa0\x2e\x79\xea\xe9\xcc\x14\xad\x67\xbe\xcf\xc3\x6c\x8b\x34\xe6\x20\x96\x03\x04\xc6\xbe\x23\x95\x75\xf3\x98\xa2\x35\x29\xa1\x9c\xe1\xe9\x7e\xde\x15\x69\x51\xad\xff\xb4\xdf\xef\x65\xf5\x3b\x35\x28\xee\x01\x16\xd3\xc5\x6e\x19\x32\x30\x11\x03\x44\x92\xc4\x4e\xb8\xa2\x63\x67\x60\xfa\xd6\xb3\xed\x3c\x9c\x2f\x25\x0a\x65\x95\x64\x51\xf5\xd8\x43\xf9\xe1\x72\x1e\xdf\xc9\x34\x28\x18\x4f\xa5\x2f\xe4\xe8\xf8\xe1\x3c\x8a\xe6\xf2\x04\x3f\xed\x76\xa8\xae\x7b\xa8\xf9\x6e\x7b\x37\xdf\xc9\x74\x28\x18\x4f\xa7\x2f\xe4\xfb\x33\x5b\xc5\xb3\x99\x44\x27\xc9\xf7\xc5\x40\x64\xbb\xf3\x63\x24\x13\xe9\x60\x78\x0a\xb8\x84\x43\x3f\x0d\xb6\x7e\x2c\x77\xe3\x21\xaa\xf2\x24\x3f\x0c\x63\xe6\x47\xf1\x0c\xa0\x40\xc1\x78\x22\x7d\x21\x47\x07\xed\x56\xcb\x40\x1e\xf8\x38\xca\x0f\x23\x50\xbc\x9a\x4f\x67\x7b\x99\x0c\x81\xe2\xa9\xd0\x32\x8e\xc8\x6e\x35\xf5\xc3\x9d\x44\xe4\x50\x45\x8f\x6e\x1c\x55\x5f\x7a\xb8\x70\x15\x6e\x43\x60\x54\x06\x40\x9e\xd4\x58\xcc\x51\x0b\xfc\x20\x08\x42\x89\xda\x31\x89\x11\x9e\x09\x6b\xff\x93\xef\x44\x1b\x02\x8d\x27\x63\x19\x55\x28\x6f\xc8\xa2\x58\x1f\xa3\xb8\x78\xc0\x79\xa6\x37\xdb\x68\xf7\xe5\x80\x1f\x35\x70\x65\xe8\x31\x97\x72\x92\xd3\x14\xc7\x67\xfc\x6f\x92\x26\xcd\x23\x5d\x68\xb9\xcc\xc1\xb8\xc4\x6d\x6b\xf7\x54\x9e\xe3\xa4\x2e\xd3\xe8\x51\x99\xef\x7c\xc8\x20\x3c\x5f\xce\xb1\xbd\x1c\x5b\xc7\xc5\x43\xae\x6a\xaf\x59\x39\x29\x82\x3a\xd3\x90\x07\xe8\x2f\x17\x4b\xa1\xf9\x95\xf4\xfb\x15\x92\x22\xc8\xe2\xeb\xe8\xaf\x56\x81\xd0\xfc\x4a\xfa\xfd\x4a\x48\x11\xa4\x87\xeb\xe8\x07\xc1\x6a\x25\xb4\xbf\x92\x81\x61\xc9\xeb\x87\x30\xd5\x71\xc0\x40\xe9\xe8\x78\x54\xe5\x3a\x23\x98\x37\xee\x36\x2d\x76\x5f\x0c\x4a\x85\x21\xcf\xda\x86\xf8\x2f\x8e\x1b\x1e\x3a\xc9\xf1\x53\x08\x4f\xa0\x23\xb4\x24\x7f\x1a\x29\x3d\xbd\x5f\x60\x7b\xb6\x10\x18\x33\x8a\x88\x0e\x00\xf9\x4b\x35\x4c\x9f\xbe\xff\x93\x53\x17\xa7\x6a\x87\x7e\x89\xca\x32\xc9\x0f\xff\xfd\x9f\x3f\xff\xb8\x2d\x8a\xa6\x6e\xaa\xa8\xf4\xb2\x24\xf7\x76\x75\xed\x65\x51\xe9\x7c\xff\xe9\xff\x0f\x00\x00\xff\xff\xae\xba\xa2\x3e\xd4\x4d\x02\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\xbd\x7b\x8f\xe3\x38\x92\x20\xfe\xff\x7d\x0a\x6f\x16\x0a\xd5\x39\x6d\xb9\x24\xd9\xf2\x13\xdd\xd8\xd9\xc1\x2e\x6e\x81\xee\xf9\x63\xe7\x0e\x38\xa0\xaf\x0e\x90\x2d\xda\xd6\x94\x5e\x27\xc9\x95\xca\x36\x72\x3f\xfb\x0f\x7c\x49\x7c\x04\x29\xc9\x76\xd6\xcc\xdc\x6f\xb7\x77\x2a\x65\x32\x18\x11\x64\x04\x43\x11\x14\x19\xfc\xfc\x87\x7f\xfa\x6f\x93\x3f\x4c\xfe\x25\xcf\xeb\xaa\x2e\xc3\x62\xf2\x6d\x31\x5b\xce\xfc\xc9\x0f\xe7\xba\x2e\xaa\xed\xe7\xcf\x27\x54\xef\x79\xe5\xec\x90\xa7\x9f\x9f\x31\xfc\x9f\xf2\xe2\xb5\x8c\x4f\xe7\x7a\xe2\xbb\x9e\xe7\xf8\xae\xef\x4f\xfe\xc7\x19\x09\x78\xfe\x78\xa9\xcf\x79\x59\x19\x81\x5f\xe2\xba\x46\xe5\x74\xf2\xef\xd9\x61\x86\x81\x7e\x89\x0f\x28\xab\x50\x34\xb9\x64\x11\x2a\x27\xbf\xfe\xfb\xff\x10\x78\x88\xeb\xf3\x65\x4f\xa8\xd7\x2f\xfb\xea\x73\xcb\xd0\xe7\x7d\x92\xef\x3f\xa7\x61\x9c\x7d\xfe\xe5\xdf\xff\xf4\xaf\x7f\xfe\xcb\xbf\x62\xee\x3e\x6f\xcb\x3c\xaf\xaf\x8e\xb3\x4f\x2e\x68\xfb\xc1\x75\x57\xfb\xe3\x71\xe7\x38\x71\x16\xc5\xa7\x7c\xfb\x61\xb9\xf4\xdc\xa3\xbf\x73\x9c\xe2\x52\x16\x09\xda\x7e\x58\x1e\x17\xfe\xc1\xc3\x05\x71\xf6\x75\xfb\x01\xad\xe7\x68\x7d\xd8\x39\x4e\x89\xa2\xed\x87\xe8\x30\x0f\x16\xc1\xce\x71\xf2\x32\xcc\x4e\x68\xfb\xe1\x18\xad\x90\xb7\xd8\x39\xce\x2b\x4a\x92\xfc\x65\xfb\xe1\x78\x3c\x78\xee\x6a\xe7\x38\xa7\x12\xa1\x6c\xfb\xc1\x5f\x87\x2b\xd2\xa2\x46\x61\xb2\xfd\xe0\xbb\x87\xcd\x06\x57\x1f\x5e\xc3\x6c\xfb\xc1\x5b\x85\xfe\x7e\xbd\x73\x9c\x97\x73\x5c\x63\x74\x84\xb7\x53\x19\xbe\x6e\x3f\x2c\x0f\xab\x60\x15\xb1\x9f\x4e\x14\x96\x5f\xb7\x1f\xe6\x8b\x79\xb8\x70\x31\x73\x65\x9c\x86\xe5\xab\xd0\xa1\x0a\x1d\xf2\x2c\x22\x65\x6d\xcb\xea\x72\x38\xa0\xaa\x12\xb8\x88\xb3\x63\x2e\x92\x0d\xcb\x2c\xce\x4e\x02\xdb\x11\xee\x57\x29\xf4\x34\xc1\xc2\xda\x7e\x38\xae\x8f\x9b\x63\x48\x00\x24\x46\xf6\x25\x0a\xbf\x16\x79\x9c\xd5\x4e\x53\x6d\x95\x92\x2a\xdd\x06\xab\x65\xd1\xc8\xa5\x69\xb4\x5d\x2d\xd7\x6a\x69\x72\xda\x6e\x36\xbe\x5a\xda\x24\x5b\xcf\x77\x5d\x52\x7c\xcc\xb3\xda\x39\x86\x69\x9c\xbc\x3a\x55\x98\x55\x4e\x85\xca\xf8\xb8\x75\xc2\xa2\x48\x90\x53\xbd\x56\x35\x4a\xa7\xff\x92\xc4\xd9\xd7\x5f\xc3\xc3\x5f\xc8\xcf\x7f\xcb\xb3\x7a\xfa\xf4\x17\x74\xca\xd1\xe4\x7f\xfe\xfb\xd3\xf4\x3f\xf2\x7d\x5e\xe7\xd3\xa7\xff\x8e\x92\x6f\xa8\x8e\x0f\xe1\xe4\xcf\xe8\x82\x9e\xa6\x7f\x2c\xe3\x30\x99\x3e\xfd\x39\xaf\xf3\xc9\x5f\xc2\xac\x7a\x9a\x3e\xfd\x12\xef\x51\x19\xd6\x71\x9e\xb1\x92\x8e\xe4\xf4\xe9\x8f\x98\xe4\xe4\x4f\x79\x92\x97\x93\x7f\x4d\xf3\xbf\xc6\x4f\x1d\x15\xbd\xe0\x2f\xaf\xe9\x3e\x4f\x9e\x18\x7e\xb1\x95\xd2\xab\x34\xcf\xf2\xaa\x08\x0f\x68\xfb\x97\x7f\xfb\x35\xcf\x72\xe7\x3f\xd0\xe9\x92\x84\xe5\xf4\x57\x94\x25\xf9\xf4\xd7\x3c\x0b\x0f\xf9\xf4\x4f\x79\x56\xe5\x49\x58\x49\x3c\x62\xf0\xa7\xe9\xd3\x9f\xf2\x4b\x19\xa3\x72\xf2\x67\xf4\xf2\x34\x6d\xd1\xbd\xfd\x61\xba\xdd\x86\x47\x3c\xc7\xb6\xdb\x3d\x3a\xe6\x25\xba\xee\xf3\xc6\xa9\xe2\xdf\xb1\xf4\xf7\x79\x19\xa1\xd2\xd9\xe7\xcd\xdb\xb9\x4e\x93\xab\xc0\xd2\xb6\xeb\xf5\x2e\x89\x33\xe4\x9c\x11\xd1\x07\x6f\xe6\x05\x3b\xe7\x05\xed\xbf\xc6\xb5\x53\xa3\xa6\xc6\xb8\x90\x13\x46\x7f\xbd\x54\xf5\xd6\x73\xdd\x8f\x5d\x6d\x58\x38\xe7\xf8\x74\x26\x8a\xe4\x1c\x70\xef\xb7\x75\x19\x66\x55\x11\x96\x28\xab\xdf\xc2\xb2\x8e\x0f\x09\x9a\x86\x55\x1c\xa1\xe9\x31\x3e\x1d\xc2\x02\x77\x09\x3f\x5e\x4a\x34\x3d\xe6\x39\x66\xfc\x8c\xc2\x08\xff\x39\x95\xf9\xa5\x98\xe2\x69\x3e\xcd\xc2\x6f\xd3\x0a\x1d\x30\xf0\x35\x8a\xab\x22\x09\x5f\xb7\xfb\x24\x3f\x7c\x7d\xdb\xe7\xd1\xeb\x35\x0d\xcb\x53\x9c\x6d\xdd\x9d\xd8\x9f\x7f\x68\x6d\x21\x1d\xc1\x03\xbd\xf5\x4a\x94\xd2\x9f\x2f\x54\x20\x0b\xd7\x55\x04\x14\xec\xe8\x58\x7f\xf0\x3d\x3f\xf0\x37\x3b\x22\xa5\x30\x89\x4f\xd9\x36\x41\xc7\x7a\xb7\x0f\x0f\x5f\xf1\x60\x66\x11\x13\x0a\xb6\x3e\x6f\xbf\xd5\xe1\x3e\xce\x22\xd4\xfc\xf4\xe4\x78\x4f\x5f\xb6\xc7\xfc\x70\xa9\xb6\x59\x5e\xff\x40\x1f\x9d\x6f\x71\x15\xef\x13\xf4\x7c\xcd\x2f\x35\x26\xb8\x75\xff\x29\x4e\x8b\xbc\xac\xc3\xac\x7e\x3b\x97\xa2\x5e\x1d\xf2\xac\x46\x59\x8d\x15\x6b\xc7\xd8\x72\x77\xf9\x37\x54\x1e\xb1\xa9\x64\x88\xde\xce\xde\xf4\xec\x4f\xcf\xf3\xe9\x79\x31\x3d\x07\xd3\xf3\x92\x09\xce\xa9\xf3\x62\xeb\xee\xd8\x8f\x7d\x5e\xd7\x79\xba\x9d\x05\x25\x4a\xdf\x0a\x1b\x08\x1e\x9a\xb7\x70\xbf\x2f\x7f\x8b\xc2\x3a\x74\xf2\x32\x3e\xc5\x59\x98\x38\x75\x5c\x27\xe8\xcb\x94\xd4\xd0\xe7\x2b\x19\x92\x08\x1d\x72\x2a\xba\x2d\x79\xdd\xe0\x4e\xc9\xaa\x0d\x41\x4c\xa2\xbc\xae\x51\xb4\xeb\x05\x38\x5c\xca\x2a\x2f\xb7\x67\x94\x14\xbb\x76\xa2\x11\x46\x5d\x13\x15\xa7\xfa\x1a\x17\x0e\x7e\xfd\x64\x79\x86\x76\xd6\xda\xb7\x30\x8a\x4a\x54\x55\x57\x7d\x10\x98\xba\xd4\xaf\x09\xda\x66\x79\x99\x86\x89\xa4\x21\x71\x76\x46\x65\x5c\xbf\x45\xc9\x34\x4f\xa6\x97\xa4\x77\x4c\xf3\x64\x92\x63\xd8\xc9\x05\x83\x4f\x48\xa3\x49\xd7\x8e\xf7\xea\x2d\xaa\xaf\xa2\x66\xae\x5c\xf7\x2d\x8a\xae\x80\x1c\x39\x11\xac\x8e\x5b\xf7\x8d\x4c\xdd\xff\x7b\xc9\x6b\xd4\x4e\xdd\x89\x3b\x21\xa4\xf7\xd3\xaa\x2e\xf3\xec\x24\x21\xde\xe7\x49\x84\xca\xb7\x2a\x0d\x13\x66\xb3\xc8\xd4\x58\xbb\x1f\xdf\xaa\xcb\x7e\x5a\x5d\x8a\x6b\x91\x57\x31\x11\x4b\x89\x92\xb0\x8e\xbf\x21\x61\x0a\xad\x82\x8f\xd2\x78\xb8\xbb\x6f\x08\x9b\xa2\x30\x61\xb3\x64\x1f\x56\x08\x03\x60\x6c\x57\xc6\xb7\x33\xf3\x03\x94\xbe\x61\xdc\x78\x9c\x9c\x19\xfe\x15\x5e\xd9\x04\x62\x2f\x63\x55\x27\x88\x14\xb5\xe9\x26\xd9\xc0\xed\x19\xcf\x8b\x0e\x4f\xb0\xdc\xcf\xcd\xba\xf5\x16\x92\x19\xf9\xdb\xb9\x44\xc7\x2f\xcf\xf4\xf9\x90\x84\x55\xf5\xe5\x99\xa1\x60\xc2\x05\x59\xb1\xb4\x96\xd8\xb0\xe2\x38\xe4\x11\x9a\x7e\xdd\x47\xd3\xa2\x44\xd3\x2a\x4c\x0b\xe9\xad\xf1\xd8\xd7\x97\x68\xf7\xf0\xec\x2f\x51\x9f\xae\x76\x56\x26\xbc\xd4\xf9\xce\x49\x2b\x87\x97\xb0\x09\x51\x1d\xca\x3c\x49\xf6\x61\xf9\x46\x5f\x33\x9a\xca\xc5\xe9\xe9\xaa\x28\x44\x1a\x47\x51\x82\xf8\x2c\xe6\x13\x0b\x2b\xc8\xb7\xd3\xb5\xa5\x78\x8e\xa3\x08\x65\x3b\xb0\xed\x5b\x1d\xee\x13\xfc\xee\x25\x18\x0e\x79\x92\x84\x45\x85\xb6\xfc\xe1\x8d\xbd\xfa\xae\x45\x18\x45\x71\x76\x22\xfd\x9b\xad\xc8\x5c\xe1\x45\x7c\x02\xd1\x52\xa6\x30\xcc\xe3\x53\x4d\x3c\x43\xe7\xe0\x37\xeb\x96\x36\x7c\xab\xcf\x57\x01\x4c\x92\x31\x2d\xe2\x46\x29\x0d\xeb\xc3\xd9\x61\x0a\x9a\x84\x7b\x94\xb4\x2f\xd9\x38\x23\x13\x87\x4c\x58\xd0\x40\xef\x2f\x75\x9d\x67\xbc\x9f\x65\x18\xc5\x97\x0a\xcf\x70\x52\x3c\xe4\x9d\xc2\x40\xa7\x71\x56\x5c\xea\x69\x5e\xd4\xf4\xb5\x5f\xa1\x04\x1d\xea\x29\xe6\x36\x2c\x51\x08\xbf\xe2\x79\x9f\x3a\xad\xe1\x25\x90\xf9\x13\x09\x5d\xb5\x97\x13\xab\xa5\x74\xe9\xc0\x91\x79\x7b\xcc\xcb\x94\xca\xfe\xb7\x32\x4f\xd0\x4f\x14\xee\xcb\x95\x59\x7b\xe2\xbc\x62\xdb\x44\xdb\xbd\xe4\x65\xe4\xbc\x94\x61\xc1\xec\xf0\xdb\x6f\xf5\x6b\xd1\x36\x9a\xd2\x5f\x25\xaa\x50\xcd\x7f\x54\x97\x7d\x1a\xd7\x5f\xa6\x6c\x20\xb9\x4c\xc2\xa2\x40\x61\x19\x66\x07\xb4\xa5\x35\x32\x26\x3a\xa6\x51\x5c\x61\x2d\x8b\x9e\x25\xc4\x70\x1d\xa3\xa3\x56\x32\x41\xc9\xa5\x6a\xe7\x64\xd2\x5b\x27\xcd\x7f\x77\xa8\x3c\xe3\x2c\x43\xa5\x4c\xdd\x54\xcd\x19\xd0\xeb\x19\x0f\x5a\x05\x9f\x1c\x5b\x17\x98\x89\x44\x8c\x14\xf3\xe1\x8c\x0e\x5f\xf7\x79\xf3\x65\x2a\x14\x62\x55\xcc\xbf\xc0\xce\xef\xae\x45\xfc\xd6\x2a\x98\x6c\x47\x4a\x44\xd4\x89\x4f\xed\xb7\x63\x8c\x92\xa8\x42\xf5\x35\x8d\x33\xe7\x25\x8e\xea\xf3\xd6\xed\xb0\xec\x5a\xed\xa4\x34\xb6\xee\x5b\x82\x4e\x28\x8b\x64\x67\x75\x47\x1b\x12\x9f\x39\x0d\x1b\x47\xf8\xa9\xa2\x92\xdf\x9e\x82\x55\xa4\x05\x80\x7a\xef\x64\x53\x4e\xc2\x4c\x87\x86\x18\x4c\x15\x8b\x32\x3f\x11\x07\xc2\xf4\xf6\xa3\x03\x97\x5d\xd2\x3d\x2a\xb1\x9c\x98\x2a\x12\x59\x38\x55\x81\xb9\xa2\x93\xc4\x00\x98\x5f\x6a\x19\xf0\xca\x58\xc4\x43\xca\xb0\x57\x28\x2c\x0f\xe7\x2f\x7c\xfe\x3b\xf9\xf1\x58\xa1\x7a\xeb\x90\x78\x50\xd7\x7d\x3a\xf1\xc4\x96\x1d\x39\x5a\x20\xbc\xaf\xae\x26\x04\x5d\x9b\x63\x9c\x20\xe7\x52\x24\x79\x18\x71\x1e\xf1\xe0\xb6\xc3\x66\x9e\x7e\xf9\xa5\xc6\x76\x03\x32\x8c\x6f\xd5\x25\xc5\x31\x7a\x5b\x99\xc4\x55\xed\xc4\x35\xb6\xda\xf2\x44\xaa\x51\x5a\x24\x61\x8d\x5a\x48\xda\x3f\xfa\x22\xf9\x22\x95\x0a\xbe\xf6\xec\xec\x4d\x67\x67\x7f\x3a\x3b\xcf\xa7\xb3\xf3\x62\x3a\x3b\x07\xd3\xd9\x79\x39\x35\xfa\xd3\xba\xf2\x30\x47\x2a\xd0\x62\x07\x9f\x60\x3f\x7b\x82\x5b\xe5\x53\xcb\x8e\x29\x9e\x7d\xb1\x9c\x96\xce\xa7\xe7\xf9\x55\xd4\xc8\x15\x03\x5f\x4c\xcf\x8b\xab\xaa\xaa\x6f\x98\xd9\x73\x20\x95\xfb\xac\x62\x89\x59\x96\x23\x9d\xb7\x59\x82\xc2\x48\x87\x96\x7a\x31\x77\xdd\xb7\x19\x1b\x2b\x47\xe4\x7c\x09\x40\xea\xfd\xe5\x2d\xc5\xbe\x05\xb3\x60\x54\x5b\x71\x04\x16\x23\xdb\x8a\x83\x34\x1f\xd6\xf6\x5c\x8a\x7e\x90\x27\x78\xd4\xa2\x2b\xc4\x8d\x0f\xb7\x96\x04\xb6\x68\x26\x55\x9e\xc4\xd1\xa4\x3c\xed\xc3\x1f\xdc\x29\xfe\x6f\xe6\x3d\xbf\xcd\x88\x37\x3d\x55\x7d\xea\xd9\x7a\x15\xe8\x01\xe7\xdb\x2c\x0d\xcb\xaf\x53\xfc\x4f\x6b\x94\x67\x3e\x26\xa9\x87\x96\x87\xe3\x1a\xcd\xdf\x66\x64\x0e\x5c\x32\x62\xb1\xa3\xd6\xcd\xa1\x01\xc0\x8e\x54\x0a\xc6\x9c\x42\xd3\x39\x35\x06\x96\x4c\x32\x78\x4e\x6a\x60\xf4\x1d\x97\x84\x55\xed\x1c\xce\x71\x12\x3d\xf3\x21\x25\x8b\x94\xcc\x9d\x99\xc5\x59\x5c\xc7\x61\x12\x57\xa9\x30\x28\x1b\xf7\xe3\x4e\xf1\x08\x2e\x45\x81\xca\x43\x58\xa1\xb7\x99\x16\xcd\x00\xa1\x99\xa4\xf8\x5d\x03\x87\x2e\x79\x28\xaf\x09\x4d\x1a\x92\xef\x07\xb4\x6f\x97\x7a\x58\x1c\xbe\x7d\xfa\xdf\xbe\xeb\x2d\xfe\xb7\xeb\xfe\xd1\x7d\x7a\x9b\xc5\xe9\xc9\x39\x26\x97\x18\x87\x66\xd2\x5b\x47\x34\xcf\x04\xaa\x3e\x5f\xd2\x7d\x16\xc6\x89\x20\x65\xa2\xa0\xe0\x12\x02\x57\xb8\x4e\xc7\x3e\x44\x08\xf9\x68\xb9\x93\xdd\x41\x86\xc3\x46\x9c\xb9\xe6\xb0\x24\x69\xa5\x83\xfd\x74\xc8\xc0\x49\x93\xa5\x85\xe6\x0e\xb6\x2c\x45\x79\x24\x71\x68\x23\xc6\x93\xab\x59\xd0\x82\xb0\xe5\xe0\xce\xa1\x23\x6b\x95\x0e\xfe\xfd\x16\xfe\x4c\x5a\x4a\x6f\xdc\xb7\xaf\xfb\x48\x18\xb5\x12\xa5\x93\xd9\x42\x56\x00\x09\x3f\x19\x3f\x6d\x54\xd9\x0a\x8e\x3a\x7e\x58\x6d\xbe\xee\xa3\x89\x48\xc3\x15\x55\x0b\x0f\xa8\x1a\x8a\x17\xc2\x80\xaa\x8a\x25\xb1\x42\x89\x62\xf8\x89\x32\x22\x06\xdf\x02\x8f\x09\x19\x0e\xee\x5a\xcc\x8a\x12\x39\x34\xd0\x22\x61\x0f\x16\x35\x93\xc8\x7c\xe1\x16\x4d\x1b\xa5\x39\xaf\x2c\x1e\x7b\x9b\x61\x5d\x0d\x63\xec\xff\x75\x8f\x54\x4d\xc5\x82\xe4\x24\xfe\x4a\xa5\xba\x2a\x15\x7f\x35\xc9\x55\x77\xa8\xd8\xe4\xf6\x82\xa2\x75\xfa\xa8\x5d\x21\x25\x92\x01\x20\x7e\x9f\xb8\x4e\x41\x34\xf3\x9f\x53\x14\xc5\xe1\xe4\x87\xce\xef\x23\xeb\xdc\xcf\x57\x98\xff\x2a\x15\xe6\x58\x80\xbb\xfe\x06\xa0\x20\x8b\xe2\x26\x14\x6a\x1f\x05\x84\x2b\xdf\x80\x90\xac\xa7\x9b\x10\xda\x87\x50\x40\xbf\x59\x1a\xd0\xd3\x85\xf9\xdb\xf0\x2b\x22\x12\x8c\x80\x47\x87\x67\x56\xe6\x2f\xad\x9e\xe2\xf8\xfd\x98\xa0\x06\x3b\xe9\xbc\x0c\xff\xde\xf1\x0a\x3a\x17\xf1\x3f\x3b\xe5\xa7\x24\x4c\x47\x94\x2f\x91\x26\x29\x79\x9b\x65\xb9\x73\xba\xd4\x35\x2a\x2b\xd9\xfc\xbb\xca\x12\x95\x00\xf8\xf3\xec\x90\x27\x53\xb1\x80\x2e\xa2\xfc\xe1\xa7\x43\x9e\x38\x5f\xae\xb2\xaa\xb9\xb2\x9e\xb9\x6f\xb4\x35\x06\xf5\xd8\x1f\x97\xfd\xe5\xbf\x7d\xfa\x97\xfd\x99\xd3\x3f\x0b\xfa\x27\xa0\x7f\x96\xf4\xcf\x8a\xfe\x59\xd3\x3f\x1b\xfa\x07\xeb\x29\x7d\xa2\x92\xc0\x7f\x39\x2d\xfc\xe4\x76\x8f\x42\xa9\xdf\x3e\x76\x4f\xf3\xf6\x69\xd1\x3e\x05\xed\xd3\xb2\x7d\x5a\xb5\x4f\xeb\xf6\x69\xd3\x3e\x75\xfc\x50\x5d\xc0\x7f\x39\x3f\xf8\xc9\xed\x1e\x85\x52\xbf\x7d\xec\x9e\xe6\xed\xd3\xa2\x7d\x0a\xda\xa7\x65\xfb\xb4\x6a\x9f\xd6\xed\xd3\xa6\x7d\xea\xf8\xa1\xda\x88\xff\x72\x7e\xf0\x93\xdb\x3d\x0a\xa5\x7e\xfb\xd8\x3d\xcd\xdb\xa7\x45\xfb\x14\xb4\x4f\xcb\xf6\x69\xd5\x3e\xad\xdb\xa7\x4d\xfb\xd4\xf1\xd3\x24\xfc\x2f\xe7\xa7\xe9\xd4\xa3\xe9\x34\xa4\xe9\x94\xa4\x69\xf5\xa4\x69\x55\xa5\x69\xb5\xa5\x69\x15\xa6\x69\x75\xa6\x69\xd5\xa6\x69\x35\xa7\x69\x95\xa7\xa1\xfa\x03\xac\x9f\x8e\x34\xa6\x44\xcf\xaf\xed\x34\x2d\x4a\x74\x44\x65\x89\x22\xfa\x22\x71\xe9\x6c\xdd\x87\x55\x4c\xbe\x1d\xb6\x60\x84\xec\x37\xb4\xf5\x28\xc0\xa9\xcc\x5f\xb6\x9e\xe2\x2a\x10\x13\x81\xdf\x90\x95\xe3\xfd\xfc\x87\x96\x06\x5d\xc1\x23\x6f\x3e\xe9\x97\xb1\xb1\xaf\x36\x0e\xc4\xb6\x81\xd4\x34\x90\x5a\xce\xd5\x96\xf3\xf9\x6c\x4e\xfe\x4f\x40\x20\x94\x75\x78\xba\x42\x01\xdd\x42\x45\xe7\x07\x02\x1e\xfc\xa3\x43\xe0\x07\x62\xcb\x40\x6b\x29\x76\xc1\x97\xba\xe0\x4b\x5d\x58\x6a\x23\xb7\x9c\x2d\xf1\xff\xad\xc4\xf1\xeb\xca\x84\x51\x6c\x0b\xdf\x5a\x7b\x23\xa3\x22\xaf\x4e\xf9\x17\x6d\xca\xde\xa9\xb2\x3c\x88\xcd\x93\x11\xac\xf5\xd1\x5c\x03\x83\xb9\xee\xc6\x92\x18\xcc\x07\x75\x68\x3e\x4e\x18\xc4\x3a\x3f\x40\x1d\x88\x79\x97\xf1\x2c\x3c\xbd\x0b\x42\x59\x87\xa7\x2b\xa4\x78\x96\xe3\x14\x9b\xbc\x4b\x94\x26\x80\x0c\x02\x48\x08\x81\x22\x85\xb5\x8c\x67\x09\x48\x61\x09\x49\x61\xa9\x48\x61\x23\xe3\x59\x89\x52\x58\x49\x52\x58\x71\x29\x78\xae\xa2\x46\x80\x18\xd6\x90\x18\xd6\x8a\x18\x3c\x45\x1f\x37\x80\x1c\x36\x90\x1c\x36\x8a\x1c\x3c\x7f\xb4\x79\xa2\xae\xfe\x31\x2e\xab\xba\x33\x9f\x34\xb0\x72\xbc\x1d\x7f\xe0\x70\x38\x7e\x55\xc1\xbc\xf9\x8e\x3f\x70\x30\x57\x85\x71\x77\x7c\x65\x92\x41\x78\x1a\x16\x8e\x84\x43\xf8\x2a\x84\xcf\x20\x7c\x0e\x31\x57\x21\x38\x23\x2d\x1f\x0b\x15\x62\xc1\x20\x16\x1c\x22\x50\x21\x02\x06\x11\x70\x88\xa5\x0a\xb1\x64\x10\x4b\x0e\xb1\x52\x21\x56\x0c\x62\xc5\x21\xd6\x2a\xc4\x9a\x41\xac\x39\xc4\x46\x85\xd8\x30\x88\x4d\x3b\x62\xda\xa0\x7a\x7c\x54\xbd\x6e\x58\xf5\x71\x6d\x07\xb6\x1d\x59\x4f\x1b\x5a\x8f\x8f\xad\x87\x07\x97\xac\x89\x3a\xde\x55\x74\x49\x85\x59\xc7\xea\x7d\xa9\x5e\x34\x6a\x0c\x60\x2e\x01\x10\xdb\xc5\x6a\x16\x52\x8d\x68\x94\x18\x40\x20\x01\x88\xd6\x86\x01\x2c\x25\x00\x62\x54\x58\xcd\x4a\xae\xd1\xf9\x5e\x4b\x00\x4b\x9d\xef\x8d\x04\xb0\x12\xf8\xf6\x5c\x79\x4c\x74\xc6\x3d\x79\xd4\x84\xf9\x69\x8b\xe4\xb0\x5f\xf6\xee\xbe\x0b\xf6\x2a\xef\x71\x5f\xb0\x2b\x7a\xb3\x07\x83\xbd\xd7\xc7\x3a\x31\xd8\x0b\xbe\xd9\x8f\xc1\x8e\xf3\xcd\xae\x0c\xf6\xb5\x1f\xe6\xcd\x30\x87\xfc\x5e\x87\x06\x0b\xf7\x11\x3e\x0d\x16\xf2\xe3\x7a\x76\x83\x67\x83\xc5\xfa\x20\xe7\x06\x0b\xf9\x41\xfe\x0d\x16\xf9\x78\x17\x07\x87\x62\x0f\xf2\x72\x70\x2c\xf7\x20\x47\x07\x07\x83\xe3\x7d\x1d\x12\xa9\x3e\xc8\xdd\x21\xa1\xee\x83\x3c\x1e\x12\x2b\xdf\xe8\xf4\x54\xe9\x60\xbf\xa7\x4a\x87\xba\x3e\x55\x3a\xc0\xfb\x91\xa6\xab\xc9\x01\x92\xe6\xa2\xc9\x07\x92\x66\x99\xc9\x0d\x92\x26\x95\xc9\x13\x92\xa6\x8b\xc9\x19\x92\x26\x82\xc9\x1f\x92\xf4\xde\xe4\x12\x49\x1a\x6d\xf2\x8a\x24\x5d\x35\x39\x46\xb2\x6a\x9a\x7d\x23\x59\xed\xcc\xee\x91\xac\x52\x16\x0f\x89\x88\x5a\x59\xb7\xeb\xaa\xfa\xfc\x27\x22\xde\x1e\x17\x8a\x48\xd7\xe4\x45\x11\xa9\xf6\x38\x52\x44\xa8\x3d\xbe\x14\x91\xa9\xc9\x9d\x22\xb2\xec\xf1\xa8\x88\x28\x7b\x9c\x2a\x22\x49\x93\x5f\x45\x25\xd8\xe3\x5a\x51\xf1\x19\xbc\x2b\xeb\x2a\x77\xe2\xa4\xd1\xbb\xbb\x57\x69\x74\x9f\x7b\x95\x46\x77\xb8\x57\x69\xf4\x68\xf7\x2a\x8d\xee\x70\xaf\xd2\xe8\x0e\xf7\x2a\x8d\x1e\xe8\x5e\xb1\xf5\xd7\x7b\xdd\x2b\x2c\xdc\x47\xb8\x57\x58\xc8\x8f\xeb\xd9\x0d\xee\x15\x16\xeb\x83\xdc\x2b\x2c\xe4\x07\xb9\x57\x58\xe4\xe3\xdd\xab\x34\x7a\x98\x7b\x95\x46\x0f\x73\xaf\xd2\xe8\x16\xf7\x8a\x7c\x98\x78\x90\x7b\x45\xbe\x6c\x3c\xc8\xbd\x22\x9f\x46\x6e\x74\xaf\xd2\x68\xb0\x7b\x95\x46\x43\xdd\xab\x34\x1a\xe0\x5e\x49\xd3\xd5\xe4\x5e\x49\x73\xd1\xe4\x5e\x49\xb3\xcc\xe4\x5e\x49\x93\xca\xe4\x5e\x49\xd3\xc5\xe4\x5e\x49\x13\xc1\xe4\x5e\x49\x7a\x6f\x72\xaf\x24\x8d\x36\xb9\x57\x92\xae\x9a\xdc\x2b\x59\x35\xcd\xee\x95\xac\x76\x66\xf7\x4a\x56\x29\x8b\x7b\x45\x44\x0d\xbb\x57\x44\xc0\x76\xf7\x8a\x88\xb7\xc7\xbd\x22\xd2\x35\xb9\x57\x44\xaa\x3d\xee\x15\x11\x6a\x8f\x7b\x45\x64\x6a\x72\xaf\x88\x2c\x7b\xdc\x2b\x22\xca\x1e\xf7\x8a\x48\xd2\xe4\x5e\x51\x09\xf6\xb8\x57\x54\x7c\xc3\xdd\xab\xee\x9b\x7f\xe2\x24\xa7\x77\x77\xaf\x92\xd3\x7d\xee\x55\x72\xba\xc3\xbd\x4a\x4e\x8f\x76\xaf\x92\xd3\x1d\xee\x55\x72\xba\xc3\xbd\x4a\x4e\x0f\x74\xaf\xd8\xe7\xf6\x7b\xdd\x2b\x2c\xdc\x47\xb8\x57\x58\xc8\x8f\xeb\xd9\x0d\xee\x15\x16\xeb\x83\xdc\x2b\x2c\xe4\x07\xb9\x57\x58\xe4\xe3\xdd\xab\xe4\xf4\x30\xf7\x2a\x39\x3d\xcc\xbd\x4a\x4e\xb7\xb8\x57\x64\x1f\xca\x83\xdc\x2b\xb2\x91\xe5\x41\xee\x15\xd9\x09\x73\xa3\x7b\x95\x9c\x86\x7f\xb5\x3b\x0d\x75\xaf\x92\xd3\x00\xf7\x4a\x9a\xae\x26\xf7\x4a\x9a\x8b\x26\xf7\x4a\x9a\x65\x26\xf7\x4a\x9a\x54\x26\xf7\x4a\x9a\x2e\x26\xf7\x4a\x9a\x08\x26\xf7\x4a\xd2\x7b\x93\x7b\x25\x69\xb4\xc9\xbd\x92\x74\xd5\xe4\x5e\xc9\xaa\x69\x76\xaf\x64\xb5\x33\xbb\x57\xb2\x4a\x59\xdc\x2b\x22\x6a\xd8\xbd\x22\x02\xb6\xbb\x57\x44\xbc\x3d\xee\x15\x91\xae\xc9\xbd\x22\x52\xed\x71\xaf\x88\x50\x7b\xdc\x2b\x22\x53\x93\x7b\x45\x64\xd9\xe3\x5e\x11\x51\xf6\xb8\x57\x44\x92\x26\xf7\x8a\x4a\xb0\xc7\xbd\xa2\xe2\x1b\xee\x5e\x09\x7b\x1e\x13\xa7\x79\xff\x9d\x4d\x4d\x72\x9f\x7f\xd5\x24\x77\xf8\x57\x4d\xf2\x68\xff\xaa\x49\xee\xf0\xaf\x9a\xe4\x0e\xff\xaa\x49\x1e\xe8\x5f\x35\x8f\xd9\xee\xd4\x3c\x68\xc7\x53\xf3\xb8\x4d\x4f\xcd\x4d\xfb\x9e\x9a\xc7\x6d\x7d\x6a\x1e\xb7\xfb\xa9\xb9\x69\x03\x54\xf3\xb8\x3d\x50\xcd\xe3\xb6\x41\x35\x37\xed\x84\x6a\x1e\xb8\x19\xaa\x79\xe0\x7e\xa8\xe6\x8e\x2d\x51\x4d\x32\xd8\xbf\x6a\x92\xa1\xfe\x55\x93\x0c\xf0\xaf\xa4\xe9\x6a\xf2\xaf\xa4\xb9\x68\xf2\xaf\xa4\x59\x66\xf2\xaf\xa4\x49\x65\xf2\xaf\xa4\xe9\x62\xf2\xaf\xa4\x89\x60\xf2\xaf\x24\xbd\x37\xf9\x57\x92\x46\x9b\xfc\x2b\x49\x57\x4d\xfe\x95\xac\x9a\x66\xff\x4a\x56\x3b\xb3\x7f\x25\xab\x94\xc5\xbf\x22\xa2\x86\xfd\x2b\x22\x60\xbb\x7f\x45\xc4\xdb\xe3\x5f\x11\xe9\x9a\xfc\x2b\x22\xd5\x1e\xff\x8a\x08\xb5\xc7\xbf\x22\x32\x35\xf9\x57\x44\x96\x3d\xfe\x15\x11\x65\x8f\x7f\x45\x24\x69\xf2\xaf\xa8\x04\x7b\xfc\x2b\x2a\x3e\x93\x7f\x35\xa3\xe9\x10\xa4\x03\xd0\xda\x51\x39\xf9\x38\x12\x6d\x32\xa9\xa3\x29\x7f\x3a\x77\xe7\xab\x68\x4e\x04\xe5\x20\x73\x9d\x17\xf0\xd1\x47\x76\x2c\xad\x45\x79\x46\x61\x84\xd1\xa9\x07\xa1\x09\x2f\x4a\xee\x16\xdf\x88\x65\x9f\x47\xaf\x3f\x92\x7f\xaf\x02\x55\x13\xbc\x53\xa5\x5d\x5f\xc8\x0f\xa1\x3b\x73\x72\x2e\x90\x56\x51\x5c\x28\xba\x9a\x4e\xd7\xa9\x80\x02\xda\xae\xe8\x3c\xa2\x39\x1d\x0e\x08\x09\x1b\x27\x69\x44\xb8\x4b\x50\x34\x32\xa6\x04\x55\x95\x38\x28\x53\xa0\x36\x82\x0a\xcf\x60\xa1\x44\x1a\x4f\x5d\x36\x70\x75\x19\x17\x98\x37\x4c\x62\x52\x97\xdb\xac\x3e\x3b\xf9\xd1\xa9\x5f\x0b\xf4\x43\x1e\x45\xcf\x57\xed\x50\x9d\x78\xf0\xd5\x0d\x9e\x39\x26\x92\x00\xa5\xc3\x23\xa5\x65\xe1\xc7\xf0\xac\xa8\x56\x1d\x2e\x96\xa4\x6d\x2a\xff\xfc\xb9\xeb\x6f\x5b\x72\xd6\xf9\xfb\xb0\x5f\x47\xe1\xf1\xa8\xe0\x82\x86\xb2\xad\x8a\xb4\x92\xb3\x5e\x22\x0b\x8f\xd1\x5a\x85\x7b\x81\x16\x1d\x03\xb9\x25\x1b\x09\x9d\xcd\xcd\xf1\x10\x0d\x69\x2a\x74\xdb\x06\x74\xee\x25\xd1\x26\xba\x9b\xaa\x05\x02\x09\xa1\x0c\xc2\x18\x2d\xa3\x75\xb4\xd7\x30\x42\xa3\x2b\x54\x46\x40\xd9\x19\x2a\x03\xc7\x78\x3f\xdf\xaf\xf6\x7b\x70\xa0\xba\xdc\x7d\xa6\x51\x3e\xac\x0f\xfb\xc3\x71\x48\x63\xd3\x38\x6b\x60\xe7\x5e\x32\x2c\x7d\xe0\x54\xfe\x29\x8e\x32\x2f\x01\x71\xcd\xd1\xf2\xb0\x57\x70\x81\x23\xcc\xab\x22\xad\xe4\xac\x97\x80\x63\xbb\x3e\x46\xde\x06\xc1\xc3\xc3\x72\x20\x9a\x46\x76\xef\x45\x47\x93\x58\xc4\xa6\xc6\x71\x95\x81\xce\xbd\x24\xe2\xec\x98\x4f\x85\x67\x01\x31\xfd\x09\xa2\x40\x28\x40\x12\x0a\x68\x24\x69\x79\x24\xff\x3c\x2b\x3f\xe1\x01\x5c\x1e\x8e\x51\x08\x8e\x02\x49\x19\x69\x1a\xbd\x70\x1f\x45\x28\xe8\x69\x67\x1a\x3a\x11\xe2\xdc\x8b\x9c\xe5\xaa\x9c\xca\x3f\x05\xdc\x6d\x09\x84\xeb\x78\x44\x68\x1f\x2a\xb8\xa0\x31\x6c\xab\x22\xad\xe4\xac\x97\x80\x83\x79\x3c\x46\xc7\x15\xac\x8d\x3c\xe1\xa6\x69\x3c\x8f\x47\xb4\x0e\xbd\xfe\xa6\xa6\x21\x55\x80\xce\xbd\x24\x68\xbe\xcf\xa9\xf4\x4b\x40\xce\x0b\x40\x44\xc1\x41\x98\xe0\x14\x12\x1a\x51\x5e\x13\xa9\x05\x67\xad\x00\x1c\x4e\x14\x6d\x96\x86\xc9\xcd\xb2\x95\x1a\x47\xd3\xdb\xbb\xfb\x55\x6f\x4b\xd3\x60\xca\x30\xe7\x5e\x02\x24\xc3\xe5\x54\xfc\x21\x60\x66\xbf\x41\x2c\xd1\x31\x3a\x22\x09\x0b\x34\x8e\xac\x22\x52\x7e\x9f\xd5\xdf\xb0\x4e\xee\x8f\x87\xe3\x01\x1c\x0a\x9a\xe1\xd5\x34\x86\xe8\x80\x0e\xc7\x65\x5f\x43\xd3\x10\x4a\x20\xe7\x5e\xf4\x51\x58\x7e\x9d\x0a\xcf\x92\x26\xe2\x9f\xe0\x8b\x66\x79\x58\x1f\x42\x11\x05\xac\x85\xb8\x3c\x92\x7f\x9e\x95\x9f\xe0\xd0\x6d\x82\xcd\x66\x73\x30\x68\x51\xf9\xd5\xfc\x66\xd9\xec\xf7\x7b\xd4\xd3\xce\xac\x7b\x1d\xc4\xb9\x17\x79\x78\xa8\xe3\x6f\x68\x2a\xfd\x12\x30\xf3\x82\xf3\x75\xb0\xef\x2a\x31\x43\xdb\x9b\x3a\x3a\x1a\x85\xa9\xcf\x32\xcc\x70\x66\x27\x33\x22\x39\x2e\xc4\xab\x35\x97\x06\xcb\x5c\x2c\x8b\x78\x11\x2c\xa2\x20\x50\xd0\xf1\xf9\xc4\xf1\x2d\x36\x81\x1b\xac\x00\x94\x68\x83\x0e\xe8\xa8\xa0\x94\xc3\x2a\xcc\xda\x10\xbe\xde\xee\xd6\x56\xa9\x2b\x04\xd2\x10\x41\xba\x00\xcc\xad\x71\x94\x1f\x04\x53\xfe\x3f\x31\x9a\x12\x50\xdb\x02\x2b\x70\x44\x00\xc4\x58\xe4\xed\x37\x99\x6e\xd9\x75\x15\xcc\x36\x74\x53\x31\x25\x55\xa2\xaa\xc8\xb3\x2a\xfe\x86\x23\x6a\x73\xb2\xb5\x36\xfb\x48\xc3\xb2\x44\xf2\x84\x65\x6d\xa6\x48\x92\x93\x04\xbf\x4e\xeb\xfc\x72\x38\xbf\x41\xe8\x7f\x36\x8e\x2e\xc0\xe9\x6a\xb9\x32\x72\x9a\x46\xef\xca\x69\x1a\x8d\xe2\x74\xb3\xf1\x8c\x9c\x26\xa7\x77\xe5\x34\x39\x8d\xe2\xd4\xf3\x36\x1b\x23\xab\x4d\xf2\xae\xac\x36\x89\x85\x55\x0d\xfc\x3d\x59\x31\xf3\x31\x3b\xe6\x65\xea\x1c\xf2\xac\x2e\x73\xcb\x68\xb0\xbc\x3c\x87\x30\x39\xfc\xe0\xcd\x02\x94\x4e\x7e\x9c\xd0\xf5\xb4\xc9\x8f\x13\xbf\x68\x9e\x77\xdd\xb2\x14\x2d\x66\xab\x6d\xb7\xe5\xa4\x36\xda\x52\xd5\x14\x24\x71\xb1\xed\x52\x9f\x36\x40\x72\xa9\x03\x8a\x16\x51\x08\x27\x97\x22\x99\xb9\x68\x06\x0b\xd1\x4a\x4e\x66\x5e\x50\x4d\x50\x58\xe1\x18\xc4\xc9\x2f\xf5\x94\x24\x84\x3c\x87\x51\xfe\xa2\xd5\xb5\x3a\x47\x3f\xf1\x56\x4e\x89\xa2\xcb\x01\x45\x4e\x9a\xb3\xd4\x18\xf8\xe7\xf3\x55\x1e\x68\x81\x32\xc9\x4f\x26\xcb\x61\x4b\x52\xda\xa0\xa6\x08\xb3\xe8\x6a\xcb\x0c\xbc\x83\xe5\x48\xf3\xa6\x5e\x07\x0d\xa6\x1c\xe7\xb9\xfb\xe8\x78\xdc\xb5\x79\x56\x77\x5d\xc7\xc9\x87\x17\x77\x42\x93\x54\xb1\x37\xad\xe7\xcf\xa9\xe9\xf5\xb1\x4d\x57\x7a\xd0\x26\x82\x2c\x2e\xb5\x53\x24\xe1\x01\x9d\x49\x46\xe6\xab\x9c\x94\x36\x2f\xc2\x43\x5c\xbf\x92\x24\x5c\xca\x10\xe4\xbf\xdf\xd0\x0e\x8f\xdc\x1d\x34\xef\x68\x3c\xbe\x09\xcf\x9d\x3a\x95\x8a\x7f\x2b\x51\x18\xe5\x59\xf2\xfa\xe5\x6a\x74\x26\x3a\x8c\x42\xf6\xd2\x28\xac\xd1\x17\x09\xd5\x54\xa9\xad\xe3\x14\x39\x49\x7e\x08\x13\x33\x5c\x9a\x67\xf5\xd9\x5c\x8d\x51\xc8\xb5\xa6\x0c\x9a\x3b\x22\x41\xb5\x50\x4d\xb3\x49\x73\xe0\xaa\x32\xe4\x39\x5d\xcb\x38\x3b\x5d\x75\xb5\xa7\x57\x0a\x88\x7a\xc9\xb4\x1c\x44\x47\x13\x0a\x13\xe1\x7e\x0b\x93\x0b\x1a\x32\x31\x64\x49\x91\x14\xa0\xb2\x94\x1c\x72\xc5\x87\xd1\x62\xd2\x2f\x99\xa4\x01\x4d\x8e\x2c\xe6\x6c\x26\x66\x94\x1b\xca\x1f\x27\x9e\x60\x3f\xf9\x17\x04\x08\x44\xc9\xa4\xde\x93\xc1\xd8\x9b\x05\x2a\x13\xf8\xdd\xac\xf3\xd1\xcb\x85\x08\xa0\x27\xd9\xec\xa3\x59\xa5\x00\x4d\xbf\x97\xa8\x0f\x53\x9d\xad\x57\x30\x55\x49\x36\x45\x12\xc6\x19\x56\x12\xf3\x1b\x4d\x7d\x5f\xb9\x96\xe1\xf5\x00\x8a\xbb\x9e\x55\x7f\xc0\x4a\xd3\x37\x92\x5e\xc1\x5d\x95\xa2\x99\xb8\xa6\x8e\xc8\xc5\xc9\x69\x3a\x08\x4e\x18\x7b\x53\xa2\x31\x15\x1e\x7c\xd3\x83\x2f\x7a\x2a\x21\x35\xd9\xb0\x41\x40\x60\x76\x42\xb5\x53\x20\x71\x0f\xa2\x4d\x48\xc3\xa9\x32\xfb\x28\x93\xcf\x66\x80\x99\xf8\x2d\xbd\x24\x75\x5c\x24\xe8\xcb\x14\xaa\xc5\x24\xbe\x48\xb9\x89\x79\x16\x68\xd9\x18\xca\x19\x2a\x71\x0d\xc9\x4d\x0e\x64\xf9\x64\xd5\x80\x9a\x0a\x69\x5b\x79\xfa\x4f\x02\xfa\x2e\x49\xef\xb4\x9c\x77\x24\x2f\x17\xa7\xc7\xf2\xd8\xb5\x3f\x6d\x59\xec\xb4\x14\x5f\x1d\x26\x92\x6d\x1b\xc8\x17\x26\xf7\x5b\xce\x0f\x26\x75\x9d\x20\xa0\xef\xe6\x0e\x4d\xb8\xaf\xf2\xe4\x52\x23\x69\xc0\xe6\xea\xd5\x11\x8e\x11\x53\xfb\x02\xfe\x4f\xb1\x8a\x98\xad\xa9\x06\xfc\x1b\x07\xfe\xa2\x43\x5f\x95\x64\xab\x5a\xbd\x7a\x09\x86\x8c\x9d\x64\xb0\x15\x05\xcb\x52\x99\xaa\xf2\x15\x8a\x3b\x31\xd3\xcf\xd0\x07\x94\xd5\xa8\xdc\x91\x1f\x24\x73\x6d\xc5\x8b\x94\xcc\xb8\x72\xfe\xda\x15\x30\x30\xe4\x7a\x12\xcb\xa8\x57\x75\x58\xc7\x87\x1d\x74\xc7\x02\xc3\x3a\xf7\x7c\xe0\x02\x8f\xd9\xb7\x30\x89\x23\xe7\x88\x50\x84\xad\xa5\x94\xb8\x7a\xa7\x7f\xe4\xef\xb4\xdf\x98\xdb\x96\xde\x5b\xc5\x11\xd7\x79\x8e\x27\x30\xa0\x1e\xe4\xc3\x3e\x46\xcd\xc6\xe0\x77\x87\xdc\x61\xb3\x0d\x76\x12\x0f\x86\xf4\xea\x92\xa1\x13\x99\xf3\x86\x59\xbe\xde\x55\x8c\x85\x3b\xf5\x96\xab\xe9\x72\x33\x9d\x6d\x9e\xc1\x48\x45\x99\x8f\x3f\xcb\x3d\x36\x4d\x4f\x05\xec\xda\xcd\xc9\x98\x78\x42\x71\xf4\x9f\x8a\x4c\xa6\x5a\x4d\x4b\xe2\x25\x64\x35\x61\x8d\xa2\xc9\xd6\xd0\xdc\x06\xc5\xd9\x90\xef\x62\x92\xac\x67\x4b\x5e\xc5\x24\x3b\x74\xa4\x5c\x59\xd8\x62\x77\x98\xc9\x16\x09\x88\x57\x9f\xbb\x1c\xe9\xa2\x38\xe2\x34\x3c\xa1\xed\xa5\x4c\x7e\x78\x8a\xc2\x3a\xdc\x92\xdf\x9f\xab\x6f\xa7\x1f\x9b\x34\x99\x7e\x9c\x1f\xaa\x6f\xa7\x49\x93\x26\x59\xf5\xd3\xa7\x73\x5d\x17\xdb\xcf\x9f\x5f\x5e\x5e\x66\x2f\xf3\x59\x5e\x9e\x3e\xfb\xae\xeb\x62\xe0\x4f\x13\xa2\x3f\x3f\x7d\x5a\x7f\x9a\x50\x0d\x20\x8f\xdf\x62\xf4\xf2\x2f\x79\xf3\xd3\x27\xb2\x9d\x6e\xb2\xfe\xf4\x71\x8e\x3e\xce\x0f\x45\x58\x9f\x27\xc7\x38\x49\x7e\xfa\xf4\xd1\x9f\xd3\x0e\x7c\x9a\x44\x3f\x7d\xfa\xd5\x9f\xcd\x27\xcb\xd9\x6a\xfe\xcb\x6c\x39\x59\xcc\x82\xf9\xc1\x99\x2d\x1c\x6f\xe6\x2e\x66\x8b\xa5\xe3\xcd\x16\x13\x6f\xe6\x39\xb3\x75\xe2\xcd\xbc\x09\xfe\x39\x9f\x2d\x9c\xf9\x6c\x7d\x98\x2d\x9d\xd9\x72\x3e\xf1\xf0\x5f\x7f\x35\xf1\x66\xfe\x6c\x95\x38\x8b\xc9\x62\xb6\xc4\x28\xe6\xb3\xc0\x99\xad\x09\x2a\x6f\xe6\xfd\xfe\xe9\x33\xe5\x03\x73\xfe\x71\x8e\x9e\x9e\xc5\x01\x29\x51\x81\xc2\x7a\x9b\xe5\xec\x49\xac\xeb\xec\x38\x59\x03\x6d\x7d\x55\x3a\xcc\x1e\x9d\x07\xcf\x13\x66\x80\x84\x86\x64\x9e\x50\x70\x0e\x3d\xe7\xc0\x50\xa9\x41\x3b\xa8\x47\x3f\x40\x47\x58\x20\x0c\x6a\x8a\x2d\xb4\x15\x66\x24\x09\x6d\x65\x42\x50\x8c\x41\xb5\x16\xa8\x69\x99\x56\x5e\x96\xf8\x35\x05\xab\xa2\x32\xba\x34\x25\x3e\x1b\x4c\x95\x15\xd0\x07\x61\xcc\x80\x75\x26\x76\xa0\x99\x02\x32\x55\xe7\x85\x51\xe0\x56\x75\x78\x9b\x1d\x2e\x55\x9d\xa7\x0e\x1b\x24\xe3\x54\x97\xc0\x46\xce\x75\xae\x40\x3e\x7f\x07\xc1\xd3\xfd\x71\x13\x7d\xd1\x4d\xf4\x40\x99\xe8\x8b\x49\x00\x4e\x74\xba\x94\xcf\x26\xfa\xc4\xfd\xc5\x9d\xf8\xe7\xc5\xef\xa9\x3b\x09\x7e\x71\x27\xf3\xf3\x42\x9f\x97\x6c\x60\xd9\x82\x1b\xd5\x84\xcf\xeb\xa2\x99\x78\x6e\xd1\x4c\xda\x29\x3a\xc5\xef\x98\xc9\xff\xcf\x6d\x18\x1b\x9e\x09\x9f\x3c\x64\xcc\x3e\x8f\xb0\x39\xdd\x78\x9a\x34\xd6\x60\x7e\x00\xbd\x7d\x94\xfd\x51\x9d\x31\xe1\x35\xad\x3b\xae\xa0\x55\x14\x9c\x5e\x43\xc3\xab\xe2\x54\x59\x68\xaa\x6f\xfd\x5e\x50\x83\x17\x61\xe4\xcd\xee\x56\xf4\x34\x33\xf8\x19\x4c\x3c\x3c\xda\x54\x19\x55\xaa\xe1\xb1\x84\x70\x6c\x2d\x08\xd4\x31\xbd\x81\x07\x7e\x4d\xc3\xdd\xbc\x08\x57\x7b\xea\xda\xd8\xc3\xda\x96\x0c\x36\x7a\x1c\x8b\xc3\x10\x2a\xac\xce\x17\x07\x04\xae\xd7\xd1\x8a\xbe\x3e\x90\xb9\xf8\xb8\x1e\x0c\x40\x77\x1d\x33\xc7\x07\x30\x4f\x6f\x23\x61\x43\xf7\xfc\xe0\xae\x8c\x41\x6e\xd7\x21\x72\x5f\x92\x41\xb7\x49\x9d\x75\x72\x75\xad\xb7\xa6\xa6\xa3\xc9\x2b\xc2\x1a\xcf\x84\x11\xc1\xfd\xb6\x3d\xce\x1e\x1e\x17\xd3\xdb\x99\x3b\xd4\xff\xb0\x91\xb1\xef\xbb\xd3\x60\x3e\x2a\x32\x56\xfa\x6c\x8e\x8d\xd5\xc1\x91\xa2\x63\x56\xf9\x9f\x9a\x74\xa6\x60\xad\x29\x4a\xb6\xa0\xe9\x83\x1c\x18\x2d\x33\x70\x7b\x2c\xc4\x80\x14\x5d\x65\x77\x78\xff\x9d\x44\xcc\x9e\xdf\xb9\x9b\xf8\x99\xfa\x94\x58\xfb\x3e\x4d\xaa\xba\xcc\xbf\x22\xe2\x61\x52\xa6\x15\x77\xd4\xf3\x27\x9e\xcf\x1c\xd2\x43\x5c\x1e\x12\x34\x39\x34\x3f\x7d\x5a\x7e\x9a\x1c\x5e\xc9\x9f\xf2\xa7\x4f\x8b\x59\xc0\x7d\x45\xe2\xb3\x52\x9c\x0e\x56\xc9\xbf\xe6\x71\xf6\xd3\x27\xd2\x2b\xea\xba\x06\xb3\xf5\x64\x3e\x5b\x9e\x67\x8b\x5f\x96\x93\xe5\x2c\x68\xbd\x4c\x1d\xf9\x7a\xe6\x13\xf4\xb3\xe5\xa7\xce\x0d\xe6\x4c\x72\xbe\x49\x2f\xfe\x01\x83\x6d\xa6\x37\x43\xc2\x6d\x09\x14\x56\x34\x9b\x51\x14\x26\xfa\xc0\x80\x9b\x2b\xbe\x21\xe4\xe6\x2a\xff\xfd\x82\x6e\xce\x90\x31\xec\x86\x59\xfa\x9b\x04\xde\x26\xab\x21\x87\x30\x63\xcd\xc6\x7f\x05\xdf\x93\xff\x32\x87\xb7\x9a\xc3\xf7\x8d\xdb\xed\x96\x0c\x54\xfb\x47\x99\x32\x28\x38\x6e\xdf\xf6\xe3\xa3\x77\x63\xd3\xab\xe2\xfc\x59\xe9\xea\xfe\xc8\x20\xf0\xc1\x71\xfc\x60\xc7\x67\x40\xd3\x91\xf1\x7c\xdb\xfe\xf6\x88\xde\x8a\x42\x1d\xe7\x9b\xf8\x18\x17\xa5\x0d\x42\x05\x6a\x6a\x2f\x7b\x8f\x8c\xec\x47\xa1\x54\x4f\x71\x2c\x96\xee\x32\x82\x76\x4f\x93\x8a\xfe\x7e\x3c\x2c\xba\x1f\x81\xf0\x3a\xc6\x0e\x0c\xea\xc0\xe3\x23\xfc\x9b\xd1\xdb\xf5\x49\x0e\xb2\x55\x05\x1d\x15\x60\x9b\x1b\xdf\xc0\xc2\x3d\x91\x7e\x1f\x8a\x07\xbd\x0b\x80\xef\xfd\xf6\x8d\x1c\xe4\x86\xf1\x32\x7f\x99\x74\x9b\x39\xe4\xa2\xa1\x7b\x01\x24\x06\x44\xd3\x2b\x9c\xb1\xb7\x5c\x79\x22\x36\x96\x6f\xfc\xef\xef\x43\xdf\x2e\x85\x2e\x05\x52\x78\xf8\xca\x0b\xff\x7a\xa9\xea\xf8\xf8\xea\xf0\x1b\x6a\x59\x31\xbc\x99\x42\xea\x15\xdd\x73\x33\x98\x3d\x53\x86\x9e\xc7\x8b\x60\x08\xf3\xea\x6e\x6c\xf1\x62\x5b\x31\x69\x90\x92\x89\x20\x8d\xa3\x28\x41\x16\x84\xc0\xb6\x38\xe5\xce\x5c\xb1\xa5\xe4\x14\x4d\xe5\x3a\xba\x47\x96\x0e\x72\xc7\x90\x59\xbd\xfe\x36\x7a\x22\x0c\x15\xb8\xeb\xad\x7f\xab\x4b\xbb\x4f\xa9\x25\x9b\xa1\x13\x29\xe1\x29\xbc\xaa\x73\x19\x67\x5f\xbb\x1d\x30\xd0\x76\x18\x70\x33\x0c\x34\xd6\xed\x86\xda\x77\x18\x0d\x2b\x45\xc3\x2e\xa5\xb7\xd9\xbe\xce\x60\x35\x54\x37\xf2\xcb\xbb\x21\xc9\xfe\x5c\x89\x79\x50\x57\xdb\x93\x0c\x97\x0a\x95\xdc\xfd\xee\xb6\x0e\x03\xa5\x95\x5e\xa8\x15\x0c\xd9\x8a\xd9\x1d\x10\x10\x2b\x87\x9d\x61\xe8\xdb\xd9\xa8\x1e\x2d\x30\x9d\x29\x50\xd8\x84\x4e\x1d\xbc\xf7\x99\x04\x2c\x5e\xfd\x28\xc2\xbe\xce\xc0\xcc\x16\x44\xaa\x11\x3a\xe4\x65\xd8\x81\x63\xe8\x19\x0b\xab\x70\x43\x1a\x35\xdd\x76\x82\x00\xa3\xea\xf6\xc4\x63\x6c\xfc\xd7\x95\x6f\x78\x9f\x2d\x03\xca\x20\xf1\x64\x78\xf5\x33\xf9\xd9\xb6\x7d\xbe\x1e\x2e\x65\x95\x97\xdb\x22\x8f\x89\xee\x87\x32\xea\x63\x8c\x92\xa8\x42\xdd\xfe\xbf\x09\x01\xb8\x32\x70\x07\x7d\x43\x59\x5d\x75\xfd\xe3\x59\x28\xec\x47\xf4\x5c\x77\xb5\xd7\x4e\x54\xd0\x42\x09\xcb\x80\xc3\x6d\x1f\x5c\x77\xb9\x89\x36\x1a\xae\xa5\x7f\x38\x48\xb8\x84\x91\x6f\xd1\x4b\x87\x3f\x46\xa3\xb7\x0a\x6c\xbe\x9e\x7a\x0b\x26\x31\x26\xb0\x96\x13\x49\x70\x2d\x33\xad\x00\x1f\x33\x74\x56\xa9\xcf\xf8\x39\xd7\xc1\x2d\xb6\xbc\x45\x75\xce\x5f\x7e\x96\xbb\x53\xe6\x45\x94\xbf\x60\x8b\x7e\x3a\x25\xa8\x77\x3c\xe9\xd0\xc9\xfc\x07\x87\xfd\x0d\xfc\x6f\x01\x99\x0e\xe9\x05\x6f\xd7\xdb\x97\x76\x65\x63\x9c\xa0\xdb\x14\x21\xf6\xb1\x60\x67\x5e\xe4\xb1\xe0\x1b\x63\x25\x3c\x43\x26\x42\x10\x2e\xfd\xe5\x5a\xc1\x16\x2c\x82\xfd\xd2\x57\xb0\x89\x53\xa1\x23\x31\x60\x32\x58\x48\x58\x27\x83\x37\x77\xa7\x1e\x19\x28\x68\x90\x94\xf9\xd0\x71\x34\x6c\x46\x8c\x18\xc5\xe1\x73\x62\x60\x1b\x60\x56\x08\xdd\x1a\x33\x2f\xda\x51\x94\x8e\x20\xa3\x20\x08\xf6\xb7\xf4\x62\x0b\x8a\xf8\xb6\xb9\x61\xec\xd1\x80\xd9\x01\x4b\x9e\x66\x7a\xb1\x0f\x48\xfb\x7d\x18\xfa\x7e\x2d\x60\x19\x32\x35\x7c\x6f\xbd\x9e\xab\x7a\xeb\xa1\x15\x9a\x2f\x24\x5c\xd2\xc4\x60\xe8\x07\x4c\x0b\x0b\x7a\xeb\xb4\x58\xf9\x53\x6f\xed\x4e\x37\x2b\x6d\x68\xd4\x29\xc1\x78\x19\x36\x21\x06\x8f\xdc\x88\xe9\x30\xa4\x05\x34\x19\x78\x77\xc6\x4c\x85\x76\xe4\xa4\xe1\x3c\xac\x16\x73\x77\x3c\xff\x5b\x40\xa4\x37\x4e\x03\xb8\x2f\x03\x26\x01\x20\xe7\x38\x3b\xe6\x3d\xa3\xb0\x0a\xfd\xbd\xa6\x54\xa4\xb0\x43\x31\x44\xf9\xbd\xf9\x7a\xb1\x59\xaa\x88\xbc\x55\xb8\xde\x77\x88\x44\xcd\x27\x88\x07\xa8\xbd\x05\xb1\x55\xed\x83\xf5\xd4\x5b\x2d\xa7\xde\x26\x90\xc7\x43\x51\x7a\xc2\xc6\x30\x8d\x1f\x36\x56\xc3\xd5\xbd\x1f\x1c\xd0\x75\xda\x85\x51\x8a\xce\xc7\x4a\x62\xdb\x5d\xb9\xab\xe3\x48\xb6\xb7\xaa\xf8\x6e\x53\x71\xa8\x0b\x03\xf4\x1b\x12\x28\xcb\x9f\xd4\x97\xf1\xef\xc3\xf1\x78\xf0\xdc\xd5\x4e\xcd\xfb\x84\x0b\x25\x44\xc3\x12\x08\x7e\x40\x6e\xb8\x76\xd5\xa4\x24\xd1\x7c\x83\x5c\x57\x42\x27\xea\x3b\xa7\x20\xa9\xfc\x2d\x14\x7a\x16\x38\xfd\xa9\xb7\xc2\x71\x9c\x36\x48\x8a\xe2\x73\x7e\x54\xdd\xbf\x7f\x0c\x87\xcf\x80\x41\x2d\x80\x49\xd0\xf6\x08\x9e\x07\xc6\x2e\xb4\x03\x28\x76\xe1\xb0\xdc\x04\x8a\xdc\x46\xcf\x86\x31\x1d\xd1\x27\x84\xa1\x3b\x03\xe6\x04\x24\x6e\x9a\x06\xcb\x6e\x13\xda\xa5\x72\x68\x39\xbf\x43\x32\xc4\xf0\x1f\xd6\xfe\x7c\x3e\x57\x50\xed\x23\xdf\xe3\xef\x51\x8a\x4a\x9c\x0a\x0c\xf9\x00\xe3\x6f\x41\xde\x33\x0d\x82\xe9\x7a\x2e\xbd\x0b\x19\x1b\xf2\x24\x60\x9c\x0c\xb3\xff\x43\x07\x6d\xb8\xfe\x0f\x69\x00\xa8\x3f\xef\xca\x98\xb7\x40\x3b\x68\xd2\x48\xfa\xde\xd1\x8f\x46\x33\xbf\xd5\x65\x79\x9b\xe2\xc3\x1d\x19\xa4\xf7\x9a\x7c\x49\xfa\xa7\x7e\x23\xb6\x3e\x6e\x8e\xa1\x6a\xc4\x48\xa1\x80\x66\xe8\x6b\xc0\x47\x4b\xa4\x22\x8b\x42\xe4\xa2\x40\x40\x26\x6a\x3e\xc5\x3e\xf0\x15\x60\xc6\x6e\xd7\x7d\x6f\x39\xf5\xbd\xd5\xd4\xf7\x36\xca\xe8\x28\xca\x4f\x99\x19\x6e\xff\x87\x0d\xdd\x70\xed\x1f\x00\x0f\x28\x3f\xeb\xc9\x58\xcb\xcf\xc7\x4d\x7e\x9f\x46\x9b\xe8\x38\x96\xf9\xad\x26\xcf\xdb\x94\x1f\xec\xc8\x10\xdd\x87\xe4\x3b\x34\x61\xd9\x4e\xdd\xc1\x4f\xb3\x98\x71\x14\x83\xc2\xdc\xb9\xbf\xf2\x35\x7f\x32\xf2\x3d\x7f\xd1\x21\x92\xcd\x7d\xf9\x75\x50\x80\x6b\x46\x6c\x55\xf8\xb5\x3f\x5d\xaf\xa7\x9b\xb9\x3c\x1a\x9a\xa5\x2f\xbf\x0e\xb4\xf3\xc3\x46\x6a\x8c\x95\xef\x03\x07\x6d\x3c\xee\xc2\x28\x3f\x9f\x8f\x94\x1c\x9e\x78\xa1\x17\x8d\x64\x7b\xab\x0a\xef\x56\xeb\xae\x77\x61\x80\x7e\xeb\xe2\x64\x1f\x2f\xd4\x55\xff\xde\x45\x6a\xa5\xdd\xb0\x75\xfe\x71\x38\x45\x3d\x57\xc9\xf5\x77\x55\xf8\xde\x62\xe8\xab\xa2\xc5\x2a\x09\x55\xa1\x39\xfb\x96\x2f\x6e\xf0\xd0\x0c\xd7\xe6\x51\x2d\x01\xc5\xd6\x3a\x38\x6e\x5d\x7f\xa4\xc8\xc7\xaa\xfb\x2d\xbd\xd3\x35\xbf\xa7\x8f\xf7\x69\x86\xb6\xec\xdf\xbb\x34\xad\xb5\x1c\x32\x13\xc6\x63\x85\xe6\x82\xba\xf0\x6f\x5d\xc5\x75\xd7\x53\xcf\x5b\x4d\x3d\xdf\xd6\x6b\xc3\x8c\x30\xaf\xe7\xf3\x8e\x0c\x9e\x13\xb7\xac\xe4\x8f\x6c\x6b\x99\x17\x37\xae\xec\xdf\xa0\x04\xb7\xce\x8d\x7b\x57\xfa\x7b\x7b\x7a\xb7\xae\xc8\x2b\xff\xbd\x2b\xd5\x4a\xbb\x41\x4e\xd0\x48\x9c\xe0\xdc\x90\xd6\xfe\x07\x1e\x51\x33\xf4\xd5\x34\x2b\x0c\x4b\xfa\x9c\xfd\xe1\x73\x62\xf4\x62\xfe\xa8\x96\xb6\xf9\x70\xcb\xe2\xfe\x68\x91\xdf\x3c\x17\xee\x5a\xec\xef\xe9\xe3\x7d\x9a\x21\x2e\xfe\xf7\x2e\x5d\x8b\x8d\x06\x2d\xf7\x8f\x41\x08\x29\xbf\xb0\xfc\x6f\x0d\x76\xe6\x53\x6f\xe9\x4f\xbd\xf5\x02\xee\xa0\x41\xef\xc1\x55\x7d\xce\xf3\x60\xa5\x1f\xb9\x9e\x3f\xbc\x99\x45\xdd\x6f\x58\xdf\x1f\x25\xdb\x5b\x15\xfd\x8e\xf5\x7e\x5b\xd7\xee\x54\x01\x65\xfd\xbf\x77\x89\x5a\x69\x37\x70\x9d\x67\x2c\x5a\x48\xdf\xe5\xe5\x7f\x6b\x7f\x83\x60\xea\x6d\xe6\xd3\x95\xb1\xbb\x06\xa5\x37\xad\xe8\x73\xf6\x07\xeb\xfd\xf8\x85\xfc\x51\x2d\x2d\xda\x7f\xeb\xc2\xfe\x68\xc1\xdf\x3a\x0d\xee\x5b\xe8\xef\xe9\xe6\x7d\xca\x21\xaf\xfb\xf7\x2e\x56\xcb\xcd\x86\xd8\xfc\x91\x28\xa1\x59\x20\xad\xfc\x0f\xdc\xa8\x0f\xf7\xd3\x30\x07\x0c\x0b\xfa\x9c\xf5\xc1\x53\x60\xf4\x52\xfe\x98\x86\x96\x09\x70\xcb\xd2\xfe\x58\x51\xdf\xaa\xfb\x77\x2d\xf5\xdb\x3b\x78\x9f\x46\x48\x4b\xff\xbd\xcb\xd4\x52\xab\xa1\x6f\x80\x51\x48\x21\xcd\x17\x57\xfe\xad\xdd\x5c\xac\xa7\xfe\x62\x33\xf5\x03\xd7\xd0\x51\x83\xe6\xc3\xab\xf9\x9c\xf1\xc1\x8a\x3f\x76\x11\x7f\x44\x3b\x8b\xda\xdf\xb6\xa8\x3f\x52\xd4\xb7\xea\xfd\x3d\x8b\xfc\xd6\x0e\xde\xab\x0e\xe2\xa2\x7f\xef\xa2\xb5\xd8\x68\x88\xb5\x1f\x85\x10\xb6\xf5\xed\xb2\xbf\x75\x5b\x87\x3f\x0d\xd6\xd3\xe5\x02\xee\x9e\xd1\xcc\x03\xab\xf9\x9c\xe3\x11\x46\x7e\xd4\x3a\xfe\xf0\x66\x56\x03\x3f\x76\x5d\x7f\x9c\x64\x6f\x37\xee\x37\xaf\xf3\xdb\xba\x76\x93\x02\x24\x71\xf6\xf5\x6a\x38\xd0\xc2\x56\x80\x8d\x47\x1f\x48\x63\x59\xbf\x5d\x37\x58\xee\xe7\x5a\x93\x4b\x16\xa1\x12\x33\xde\xb5\x93\x3f\xd5\x66\x5c\x7d\x87\xb4\x54\x3f\xad\x66\x5f\x4d\x0b\x91\xc6\x43\x0d\xe4\xf8\x16\xb9\x4f\x65\x5f\x67\x0c\xcf\xe9\xfa\xb0\x14\xdb\x02\x8d\x2a\x15\x68\x74\x39\xc9\x1f\x92\x42\x1c\xa3\x24\x47\x92\x2c\xa9\xf8\x5b\x98\x1f\x05\x70\x31\x5f\x11\xc9\x24\x24\x5c\x72\xb0\xbf\xd4\x75\x9e\x7d\xe9\xa0\xc5\x1b\x10\x4a\x54\xa1\xda\x50\x57\x5d\xf6\x69\x2c\x56\x8a\x27\x2b\x67\xc7\x30\x42\xe2\x79\x1b\x76\xa8\x85\x9e\xdf\xc1\xbd\x0d\xcb\xe1\xd7\x89\x28\xb8\xf8\x35\x22\x61\x84\xe8\x44\xc2\x13\xe6\xb9\x3d\x37\xe3\x92\xbc\xfc\x49\x58\x54\x52\xb5\x98\xe5\xa9\x85\xc0\x11\xae\x7e\x04\x8e\x09\xc2\x6d\xaf\xa3\xd9\x9e\xe3\x28\x42\x99\x78\xd4\x89\xc2\x4c\x66\x73\x76\x1e\x69\x70\x6f\x04\xca\x7a\x9f\xba\xca\x19\x19\x4d\x36\xa6\xee\x4e\xc8\xb5\x2e\x72\x41\xaa\xef\x62\x82\xd1\xd1\x59\xe1\xe6\x66\x4a\x9e\x12\x74\xac\xe9\x53\x49\xef\xf6\xc3\x8f\x97\x42\x1f\xbc\x37\xcd\x04\xbf\x9c\xe3\x1a\x39\x55\x11\x92\x7b\x30\x5e\xca\xb0\xd0\x60\xb6\xdb\xf0\x58\xa3\x12\x3e\x7f\x27\x9e\x26\x9c\xf9\x41\xa0\x5f\x6c\xcd\x4a\xf9\x29\xc0\xa7\x27\xf1\x9a\xeb\xd9\x1c\xa5\xf4\x00\x5c\x3b\xab\x58\xea\x6e\x5e\x0e\xdd\x53\xd0\x5e\x8d\xc0\x7e\x53\xea\x60\x13\xbd\x37\x28\x2d\xea\x57\xde\x27\xe5\x30\x64\x0b\x9b\xa2\xec\x32\x22\x4d\x99\xe7\xba\xae\x9c\xa9\xec\x98\xe4\x61\xbd\xc5\x60\xbb\xee\x00\xb3\xe7\x62\x73\x22\x5b\x36\x7e\x48\x73\x3b\xa3\xb9\x6a\xf0\x6b\x42\x3d\xe9\x67\x3c\xd4\x48\xf0\x27\x71\x55\x3b\x55\xfd\x9a\x20\xc3\xb9\xc3\xf1\xb7\x15\x89\x37\xd8\x79\x81\x29\xe3\x99\x34\x5a\x64\x0c\xaf\x65\x37\x11\xc0\x31\xa5\xe2\xbd\xf2\x4b\x20\x08\x0c\x39\xb2\x6b\x3e\xed\x2d\xb7\xaf\xd2\x81\x84\xaa\xd4\x48\x0b\x20\xb6\x5a\xae\x01\x62\x69\x34\x90\x58\x1a\x8d\x21\xb6\xd9\xf8\x00\xb1\xe4\x34\x90\x58\x72\x1a\x43\xcc\xf3\x5d\x17\xa0\xd6\x24\x03\xa9\x35\x89\x99\x1a\xb3\x33\x13\x65\xde\xe0\x59\x42\x30\xf2\x4b\x26\x94\xac\x81\xea\x15\x27\x4c\xf3\x01\x74\xef\x6f\x80\xdc\x1b\xec\x8e\x6e\xb4\x7a\x0d\x10\xd4\xab\x3e\x43\xc4\xf2\x3d\xe9\x63\xeb\xee\x54\xa9\x19\x47\x98\x32\x26\x8e\xaf\x8a\xf5\x7b\xda\x78\x68\x4c\xb9\x5a\x99\x86\x18\x6a\xa3\x0c\xb7\xb5\x63\x63\x47\x59\x1e\x0f\xa5\x9f\xac\x0d\x6e\x6f\x13\x4c\xf7\x8a\x20\x22\xb2\x1c\xc9\x17\x25\xa3\x60\x7d\x1f\xc1\x8c\x20\x45\x7d\x31\x0b\x38\xcb\xcf\x62\x63\xad\xcd\x3c\xf0\x1e\x4a\xa3\xcf\x43\xab\xf6\xd8\xfa\xd2\xa7\x25\xf6\x11\x80\xb5\xa4\xd5\x8d\xdf\x1a\x7a\x8d\x5b\x8a\xb2\xfa\xff\xfc\x44\x79\xfc\x32\xb5\xc1\x60\x72\x76\x08\x32\x02\x76\x90\x3a\x2f\xbe\x88\xf6\x9d\x0d\x0e\xcd\x90\xd1\xb6\x8b\xe2\x6f\x71\x84\xca\x6b\xeb\x56\x73\x77\x84\x79\x27\xaa\x97\x2d\xc8\x48\xb8\xdd\x90\x5e\x07\x27\xa0\x8d\x6b\x94\x0e\xb8\xf4\x8a\xba\x3c\x34\xcb\xe1\xee\x90\xa0\xb0\xdc\xee\xf3\xfa\x3c\x3c\xad\x03\xbf\x71\x4c\xf7\x63\x77\x03\x2f\x2c\x94\x58\xe6\x51\xbe\x5c\x28\x85\xd5\xde\xd2\x5b\x7b\x7b\x30\x12\x37\x5e\xba\xab\x50\x69\x97\x57\x64\x32\xb4\x54\x5c\x15\x19\x48\x84\xef\x04\x93\x89\x74\xa1\xb9\x4c\x46\x8d\xcf\xc3\x68\x1f\xec\xc1\xf8\xbc\x67\x4d\x49\xd2\x3d\x12\xc8\xa9\xb9\xd1\x5a\x88\x33\x0a\x23\xc1\xb4\x48\xd7\x2c\xf1\x10\x5f\x4a\xdf\x0b\xdc\x7e\xc6\xc3\x71\x79\x59\xc1\x1a\xc0\xe0\xfe\x42\x17\x5b\x19\xf4\x4f\x54\x32\x61\xdd\x60\x2a\x2c\x21\xf0\xa9\x6e\xb9\x43\x6a\xe0\xc5\x49\x86\xac\x39\x3a\x29\x61\xcd\x82\x54\xfc\xcc\x72\x44\x98\x72\xc3\x6c\xbd\x89\x27\x24\x11\xe2\xbf\x8c\xa8\xa9\x7a\xab\x04\x98\xd2\xb7\x11\x8e\xb1\xb9\xb4\x56\x08\xa1\xef\xab\x17\x16\x9f\x3a\xf2\x3a\x56\x03\x32\x01\x87\xca\x6c\x9d\xe7\xc9\x3e\x2c\x1f\x71\x55\x99\x9c\xe0\xa6\xaa\xc3\xb2\xd6\xf2\xdb\xd0\x3c\x3c\xb8\x4a\x22\x6f\xce\x52\x24\xf7\x81\x3e\xd2\xb5\xc8\x63\x5c\x56\xb5\x73\x38\xc7\x49\xf4\xac\xf5\x55\x83\xb8\xca\xb7\x8c\x15\x8d\x0d\x75\x12\xb6\xed\x40\xc5\xd2\xa0\xd8\x72\xa8\xfc\xea\x7b\xbe\x76\xef\x01\xfa\x36\xe6\xc1\xa1\xe2\xc9\x29\x95\x43\x3b\x6d\x61\x4d\xea\xb9\xc0\x05\xee\xbd\x89\x09\xa9\x4e\x5b\x12\x70\xaa\x22\x89\x6b\x25\x1f\xee\x2c\x58\xd2\x35\x46\x29\x65\x13\x2f\x35\xe0\x60\x1e\xc4\xd4\xe2\x59\x02\x80\x40\x70\x20\x41\x0d\x76\x48\x78\x2b\xe6\x96\x48\x3e\x98\x0b\x2c\x84\xfe\x08\x23\xe0\xeb\xa3\x3f\x0e\x1b\x28\x9a\xa4\x48\x19\xa7\x39\xbb\xd1\x4d\x5b\xe0\xb5\xd2\x4c\x4e\x03\x69\x42\x24\x35\x8a\xad\xad\x6e\x67\x6f\x14\x97\xe8\xc0\x93\x21\x5d\xd2\x6c\x07\x97\x2a\x79\xaf\xe8\x74\x17\xd3\x5e\x75\x53\x7d\x5c\xea\xab\x7e\xe3\x2e\x57\x48\x46\xa3\x5b\x43\x36\x42\x5a\xad\x87\x62\x76\x8d\x66\x04\xbb\x76\x8a\x15\x31\xd3\xb2\x98\x13\x88\xde\x60\xbb\x02\x5a\x0f\xfb\xac\x1e\x39\x32\x43\xd8\x1d\x65\x6b\x74\x53\x28\xf2\x44\xfb\xa7\x11\x15\x8a\xc5\xb7\xbb\x96\x9d\x0f\x6c\x31\x11\x56\xfc\x49\xde\xb8\x7d\xde\x7c\x99\xf6\xc3\x62\xfe\xf2\x2f\xfd\x6c\x8c\xc1\x6f\x68\x46\x49\x01\x4b\xa9\x64\x11\x12\xcf\x3b\xb6\xce\xe8\x3e\xc3\x5f\x88\xc4\x97\xa7\xdd\xe7\xba\xf7\xd5\xce\x27\x7b\x89\xea\xc3\x59\x9a\xee\xbc\x4c\x9c\x87\x02\x5f\x3f\x8b\x29\x3a\xa7\x60\x0d\xcf\x5e\x28\xd5\x49\x57\x5b\x9b\xab\x84\x74\x89\xa3\x9d\x3e\xce\xf2\x47\x61\x15\xda\xd5\x73\x3f\x9a\x3a\xf3\x63\x7f\xcf\x24\x30\xb0\x9b\x12\xa0\xa5\xcf\x12\x8e\x1f\x87\x8e\xe9\x20\xda\x1c\x74\xe0\x88\xdb\x88\x83\x70\xbd\xe2\xfd\x71\xbc\xb0\x87\x32\x01\xb4\xe8\x65\x47\x6c\x23\xa5\xfa\xd4\x3d\x49\x93\x28\xa1\xc4\xb5\xe6\x9c\xb7\x66\xa1\x70\xf7\xdf\xc8\xab\xe2\xdb\xcf\x6f\x60\xa9\x6d\xbc\x78\xb3\x71\x02\xbc\x3c\xcd\x5c\x3d\xca\x17\x35\x75\xe6\x71\xb9\x4a\xcd\x34\xb4\x77\xf2\x64\xa8\xec\x86\xb6\xe6\x1e\xec\xad\xd1\x82\x9d\xb6\x38\xfc\x13\x73\x9e\xe4\xdb\x25\x42\x7d\x94\x73\x97\xb0\x39\xce\xb3\xe7\xfb\x86\xf0\x31\x28\xdb\xf8\x61\x30\x66\x51\xc7\x05\xdc\x43\x30\xe8\x7a\x2f\x20\x78\x84\x68\x15\x92\xca\x68\xd4\x67\xa7\xa3\xf7\x43\xf6\xe3\xbc\x77\x8c\x1f\x80\x0f\x1a\x60\x13\x5a\x3e\xb4\x3a\x62\x7b\x73\x79\x5c\xf5\xd6\x8f\x18\x5a\x27\x2c\x0a\x94\x45\x12\x23\x4e\x51\x22\x5c\xd8\x6b\x62\x20\x4c\x13\xea\xc1\x02\xe8\x26\x86\x75\x29\x6e\x7c\x7d\x23\x3a\xe0\x1d\x20\x21\xb5\xbe\x02\x44\x44\x3f\xea\xcc\x49\xb5\x62\x05\x7e\xfb\xc1\xa0\x2a\x94\x05\xab\x0e\x6a\x27\x21\xf6\xea\x47\xfb\x48\x0e\x46\x35\x80\x5d\x0b\xac\x5a\x62\x77\x01\x5a\xd5\x91\xef\xee\xd7\xc0\xe8\xf8\xf4\xe0\x92\x16\x66\xef\x4f\xc9\x6d\xc8\x9a\x6c\x5e\x50\xee\x36\x95\x09\x5f\x1a\x0c\x77\xc3\x2d\x36\x81\x1b\xac\x80\x84\xd2\x43\x3e\x3c\xb0\xaf\x00\xfa\x3e\x8b\x0f\x07\x14\x2d\xa2\xd0\xb0\xbf\x42\x1d\x2b\x43\x38\x66\x03\x63\xe1\x97\xf8\x05\x52\xc6\x9b\x9c\x6c\x31\x0a\xa9\xd6\xcc\x3f\xbf\x59\xea\x99\x7f\x34\x92\xee\x8e\xc2\xa3\x3a\xf9\x71\xe2\x17\xcd\xf3\x5d\xa4\xf4\x5a\x5d\xc1\x7e\xd6\x55\xdd\x04\x68\x9f\x4c\x6a\x2b\xa6\xe6\x03\xf0\xb7\x90\x9a\x66\x3f\x6e\x07\xa3\x88\xba\x4a\xad\xa3\x88\xab\x47\x0a\x8c\xf2\x07\x49\x6c\x24\x2d\xbd\x76\x90\xc4\x4c\x80\x76\x89\xa9\xad\xcc\x12\x33\x42\x9a\x25\xf6\x80\xfd\xa0\x23\x34\x5f\x1b\x66\x65\xb5\xd3\xe3\x4b\x9b\x36\x67\x42\x1f\x41\xc8\xa5\xd0\x87\xe7\x66\x44\x56\xf1\x18\x3c\x49\x08\x37\xbc\x8a\xf8\x20\x5c\x56\x26\x41\x1c\x5d\xf3\x31\xcb\x96\xe3\xf0\xaa\x5c\xd9\xbd\xf2\x81\x7a\x3e\x54\xc9\x1f\x12\x8a\x0d\x99\xd8\x37\xcc\x6a\xb0\x0f\x62\x98\x67\x58\x9b\x1d\x8b\x04\x16\xc0\x48\x8c\xa6\x15\xe5\x5b\x1a\xda\xa4\x34\x22\x74\x55\xee\xef\x30\xfb\xe2\xde\x4e\xfe\x20\x9e\xc6\x99\x60\xd1\xb4\x6f\x2b\xac\x8c\x5f\x93\x51\x94\x71\x56\x53\xdf\xc6\x09\xa3\xbf\x5e\xaa\x7a\x8b\x9a\xf0\x50\xef\x80\x22\x13\x2c\x70\x11\x95\x76\x1d\xd1\x80\xaf\xe8\x92\x1f\xea\x11\x2b\x09\x5d\x3f\x05\x2c\x40\x2b\x5b\x78\x1d\x8f\xaf\x95\xe2\x9e\xb6\x63\x41\xdf\xd2\xe2\xee\x75\xe8\x72\xab\x61\x37\x8d\x89\xbb\x71\x81\x4c\x3e\x96\x8d\x1d\x20\xd1\x7b\x2f\x06\x53\x6f\xbd\x30\x13\xb9\xe3\xba\xae\xb5\xbb\x8f\x8c\x3d\x50\xce\xdd\xd0\x6f\xfb\x23\x06\x51\xcf\xf6\x38\x8f\x56\xda\xe8\xd2\x42\x03\x0b\x9c\xba\xe9\x9a\x3e\xa8\xd1\x6f\xbc\xd1\x17\xfb\xcd\x7c\x3c\x0d\xcd\x0d\x84\xbb\xbb\xd5\x6e\x61\xa0\x93\x85\x71\x3f\x12\xc8\xb7\x6e\x2f\xd4\xe0\x49\xd9\xb4\x52\xe7\xc5\x9b\x9d\x03\x78\x0f\x3d\x77\x7e\x69\x5c\x48\x8d\x0b\xb8\x59\x4c\x9c\x8b\xc4\x2a\x01\x9b\x94\xc4\x0d\x84\xf0\xd6\x77\x2d\xec\xa2\x5b\x9e\x4c\xac\xd3\x25\xcb\x07\x73\x0e\x72\xb9\x0d\xdc\x8f\x9f\x03\xf7\xe3\x04\xff\x4f\xbf\x37\x94\x07\x79\x93\x41\x33\x4e\x89\x1e\xfb\x70\x0c\xb2\x5c\x6c\xf5\xf6\xdd\x6e\xdb\x5e\x77\xb7\xcb\xae\x95\xdb\x63\xd7\x93\x35\x78\x73\xee\xf1\x78\xa4\xd7\xc1\x2e\x67\xc1\x72\x31\x5b\x05\x89\x33\x9f\x05\x9b\xc9\x7c\xb6\xf4\x7c\x2c\x92\xf9\x1a\xff\x1b\xfc\xe2\x4e\x16\x33\x7f\x99\xf8\xb3\xcd\x6a\x31\xf1\x67\x9b\xcd\x2f\xeb\x89\x3f\xf3\x36\x73\xfd\x6e\xdd\xa1\xa3\x85\x5f\x15\x35\x2a\xd3\x38\x0b\x6b\x34\xca\x0e\x0e\x36\xf1\x0f\x60\xe0\xbd\x85\x26\x5c\x77\xbc\xd0\xae\x3b\x5e\x7c\xd2\x6e\xf3\x95\xc5\x46\x6e\x3a\xbe\x59\x02\xdc\xf2\x0d\xbd\xdc\x13\xbc\xce\x5f\xc9\x32\x37\x92\xf2\x28\x25\x18\x41\x9f\xac\xd5\x8c\x9a\xea\x81\xfb\xb1\xa7\xf5\xdf\xc5\x24\x57\xef\x90\x6e\x35\xc6\x59\x4c\x9c\x85\x30\xd1\xd9\x3d\xce\xe5\x4f\x9f\xe6\x9f\xe4\x09\x6f\x54\x17\x5b\xb7\xdf\x51\x57\xaa\x97\xb8\x3e\x9c\xaf\x92\x93\xec\x2b\x96\x97\xc2\xf4\x08\x94\xbe\x48\x58\x53\xfe\xee\xe0\xdb\x9b\xe4\x97\x5d\x98\x24\xea\x52\xc3\x08\x7a\x54\xc8\xf8\x15\x46\x6f\xad\xf6\x85\x55\x1f\xfa\x3a\x23\xe5\x9c\x15\x5e\x43\x39\xa2\xeb\x45\xb8\xd8\x99\x2c\x70\xb1\xb4\x8e\x24\x94\xeb\xf6\x8d\xed\x2e\x06\x18\x17\x8f\x4a\xbe\xe3\x25\x74\x53\x1e\xb5\x10\x72\xc7\xbc\x4c\x35\x10\x91\x13\x33\xd4\x7b\xde\x94\xf7\xb7\xe7\x60\xc0\x30\x0d\x3f\xc0\x3a\x42\x21\xf5\x53\xb6\xd6\xc6\xb7\x19\x34\xc1\x19\xd4\xba\x49\xc7\x3b\x09\x6b\xf4\xbf\x7e\xa0\x13\xef\x79\x67\xab\x1c\xc6\xe1\x7b\xda\x1e\xba\x46\x68\xb9\x95\x95\x9c\xb1\x00\x97\x7a\x57\xe2\xdc\x56\x3f\x98\x30\xbb\x33\xb1\x5f\x3b\x39\xee\x83\x09\x7c\xdf\xa6\xe0\x01\x63\xa1\x4c\xde\xc3\x35\x09\x34\xd7\x24\x00\xfd\x49\x9a\x52\x82\xfa\x26\xfe\xc4\xfd\x85\xf8\x27\xbf\xa7\xee\x04\x7b\x90\xf3\xf3\x42\xf7\x16\x27\x6c\x67\x2f\x1d\x25\xfa\x1d\xe8\xf3\xba\x68\x26\x9e\x5b\x34\x9d\x1b\x3f\xee\x73\x4f\xab\x98\x61\x51\xa0\xb0\x0c\xb3\x03\x12\xae\x20\x55\x0b\x95\xdf\x6f\xd0\x9e\x1a\x30\x12\xdf\xdd\x76\x23\x26\x80\x7e\x4b\x96\x68\xbe\x85\xc9\xa5\x0d\xca\x99\xcc\xc1\x89\xa7\xe0\xf8\x2d\xbd\x24\x75\x5c\x24\xe8\xcb\x54\xa9\xc0\x9a\xf6\x85\x2c\x0d\x90\xc7\x9f\x9e\xbc\xa7\x2f\xed\x87\x0b\xe9\x12\x5d\x69\x2f\xb0\xe6\xbe\x40\xe3\x32\x34\x47\xae\x1a\x26\xb3\xe6\xa4\xc7\xa8\x29\x42\xe1\xdb\x39\x44\x86\x88\x8c\x0c\x52\xd9\x65\xe9\x13\x4f\x1f\x91\xcf\x88\xd2\xd8\xb3\xb1\x53\x30\x39\x55\xda\xfb\xc9\xa6\x1d\x0e\x21\x3c\xed\x0e\x77\xd3\xf3\x70\xe0\x4e\x76\xf0\xe3\x86\xca\x40\x72\xea\xfb\xc8\x27\xd3\x07\xc9\x03\x0b\x8a\xe0\xd7\x30\xe9\x4a\x75\xcb\x6e\xcf\xdb\x4d\x9e\xb6\xf3\x51\xdb\x31\x66\xdb\xc0\x70\x0b\x2d\x20\x51\x85\xbe\x9a\x38\x60\x0f\x1d\x3c\x9b\x6f\x98\xc3\x02\x2d\x6d\x0d\x4a\xdc\x4f\xa3\x81\x03\xab\x4e\x22\x7b\x7d\x73\x48\xa0\x9b\x84\xd9\xe9\x07\x94\x3d\xff\xa7\x79\xc3\x58\xbb\x5c\xf2\x2f\x65\xfe\x52\xa1\x27\x00\x0d\xd0\xfa\x37\xfc\x0e\x71\xf6\xa4\xc9\x17\x15\x55\x58\xd7\xe5\x0f\x02\x80\x32\x24\xca\x12\x98\xb4\xea\xc3\x0f\xf6\xba\x5a\xe2\x87\x1b\x5e\xb3\xcc\x60\xa9\x5a\x31\xee\xbd\x3a\x74\xa5\xcb\xba\xc1\xc0\x38\xfa\x7d\xa3\xd0\xae\x07\xb6\x5b\x72\x94\x45\x30\xf3\xa8\x18\xc7\xc3\xde\x5f\x55\x1f\xfa\x36\x59\x50\x33\xc3\x4f\x87\xca\xdd\xc7\xb3\x84\x52\x66\x19\x37\x84\x68\x32\x3b\xa1\xab\x3e\xcb\xbd\xd9\x42\xcc\xdc\x61\x4f\xb6\xf5\x98\x37\x39\x61\x45\xbd\xc5\x1a\xaa\xdd\x6e\x39\xbd\x2a\x89\xc9\x37\xa3\xf3\x25\xdd\xeb\x2b\xff\x58\x29\xb0\x92\x4c\x87\x1a\x0a\x99\x06\xe6\x9d\x94\xbc\x17\xfe\xea\xc1\x88\x85\xb7\x30\x0e\x5e\xda\x4d\xa8\xda\x28\xc2\xe3\x67\x58\xc6\x15\xcf\xc8\xb0\xd7\x6a\xcf\x75\x0d\x42\x8a\x09\xaa\x7e\x9e\xe8\xed\x7d\x9f\x18\xf8\x3b\x85\xda\x46\xcd\x57\x95\x7c\x64\x20\x69\x93\x13\x30\x90\x84\xa4\x31\xb0\xb4\x20\xe3\x27\xb0\x4d\x1f\x96\x7a\x70\x94\x97\x2c\xc3\x2f\x48\xcc\x8b\x94\x71\x8b\x6b\x90\x78\xcc\x58\x34\x18\xf2\x2d\xf1\x50\xaa\x53\x84\x7c\xa4\x5c\x06\x0a\xa5\x45\xe8\x14\x0c\x9c\x0c\xe2\xfc\x35\xe8\xf7\x6d\xca\x8c\x91\xff\x3f\xa6\xc9\x43\x6c\xf5\x8d\x6a\xac\x8a\x42\x1d\xbe\x61\xfa\xab\x60\x19\xad\xbb\x42\xfb\xbf\x47\x75\xad\x06\xdb\x61\x35\xa7\x8a\x2f\xd4\xb3\xd4\x28\x77\x68\x76\xf5\xff\x98\x62\x3f\x4a\x87\xab\x56\x79\xab\x1b\x74\xb7\xba\x55\x69\xab\x87\x6b\x2b\xa0\x98\xc6\x0a\x4a\x55\x5e\x76\x17\x58\x3b\xc6\x49\xe2\x24\xf9\x0b\xb8\xf8\x28\x4f\x8a\x1e\xdd\x27\x98\x2e\x45\xd1\x1d\xfe\x66\x3b\x5c\x82\xa2\xd9\xdd\x8e\xbb\x5d\x95\x34\xf8\x8c\x86\xd5\xfb\xa1\x58\x94\x17\x20\x1b\xf9\x08\x1d\xc3\x4b\x52\x9b\x91\x68\xae\xe5\x68\x36\x54\x5b\x36\x98\x72\x35\x94\xa4\x7d\x77\x06\x10\x37\xb3\x55\xda\xef\x33\xab\xc7\xce\xe2\x07\xf4\x86\x4d\xec\x2c\xfc\xf6\x88\xfc\x1a\xd2\xe2\x90\x76\x40\x55\x4d\x71\x48\xc8\xd2\x74\xb9\xd6\x8c\x32\x64\x02\x70\x50\x7e\xc8\xa4\xfd\x4d\x13\x9c\xc0\x19\x75\x39\xd0\x6c\x78\x32\xdb\x9d\xaa\x74\x18\x47\x1d\xee\x2b\xf9\x48\xbb\x18\x9c\xd3\x69\xdb\x41\x4e\xba\x7e\xc9\x23\xe0\x78\xd0\xb4\x07\xf2\x19\x75\xc8\x01\xeb\xa5\x6e\x26\xe4\xf1\x8b\x61\x43\x28\x5f\x25\xd0\xb9\x13\x87\x52\xa9\xa1\x83\x1a\x57\x79\x42\x87\x93\x3e\x21\x65\x4b\x16\x0d\xd5\x27\xed\x5f\xf3\x40\xcc\x6e\xb8\xd6\xcc\x68\xc6\x55\x02\x24\x4d\x52\x75\xc6\x13\x8a\xd3\x83\x3a\x35\x93\x13\x33\x0d\x58\x81\x91\xed\xf2\xa4\xfd\x4b\xd6\xc1\x3b\x02\x72\x06\x39\x25\xfd\xc2\xee\x96\x7c\x03\x18\x77\x11\x27\x89\xa8\x4a\xc2\xc7\x16\x77\xe2\x9a\xdc\x1d\x51\xda\x0a\x86\x36\x17\x8f\x50\x47\xd3\x60\xb7\x34\x06\xdc\x5e\x48\x51\xe3\x17\x5b\x37\xf8\xd3\xb6\x4c\xc0\xd5\x77\xa4\x5d\x3b\x83\x43\x31\xd3\x9c\x1b\x31\x8a\x54\xf4\x6d\x05\x40\xc3\xa1\x06\xb3\x44\x11\x5d\x88\x76\xa9\x61\xda\x87\x55\x8c\x47\xba\x03\x23\x0b\x62\xdf\xd0\xd6\xa3\x00\xa7\x32\x7f\xd9\x7a\x10\x2b\x75\xb8\xe7\x69\x3f\x7e\x26\x3f\x8a\x50\xd8\xd5\x4a\xad\x8b\x04\xc3\x94\x4b\xc9\x9c\x95\x85\xdf\xf6\x61\xf9\x5d\x32\x1e\x98\x4f\x54\xc9\xb9\x4d\x58\x52\x13\x2d\xb9\x09\x39\xfb\xe4\xec\x51\xfd\x82\x50\x66\x32\xc1\x24\x11\x12\x6e\x11\xc6\x19\x2a\xa7\x7a\x91\x73\x4c\x2e\x71\x04\x55\x24\x27\xa8\x34\x05\x61\xab\x14\x2a\x6d\x92\xeb\xdf\xf9\xb0\xf1\x31\x72\xf6\xa5\xf8\x71\x49\xfa\xd0\x21\x7d\x67\x99\x7b\xf0\x97\x1e\x5e\xae\xed\x8b\xee\x39\x7b\x64\xce\xa3\x27\xb3\x26\x98\xfe\xae\xac\xe7\x4d\x8a\x01\xc7\xf9\x09\x03\xf3\xf4\xdc\xe0\x35\x30\x5e\x04\xf3\x28\x7f\x4d\x74\x15\xa4\x72\x23\x43\x7e\xe8\xaa\x0e\xeb\xf8\xc0\x72\x3e\x4b\xa4\xa4\x23\x8e\x66\x69\x1a\xbf\x9a\xb5\x88\x78\xd2\x74\xa3\xe5\x22\xa1\x90\x60\xbc\xc8\xef\x3e\xfb\x35\x3c\x85\x00\xef\x0f\x39\xee\x52\x6a\x27\xa5\xb4\x9d\x02\xd0\xf1\xb6\xfb\x3d\x18\xfd\x5d\x25\x30\xa5\xa8\x26\x2f\x1d\xa0\x9c\x0c\xd4\x89\x0f\x79\x66\xdd\x57\x31\x0b\xc4\xb3\x01\x40\x4e\x53\xb6\xbf\xc1\xbc\xd9\x17\x8b\x65\x42\xfe\x11\xb6\xfb\x76\x2a\xe6\x54\x87\x32\x4f\x92\x6b\x1a\x36\x7c\xd8\x56\xc1\xb7\x73\xfb\xb1\xc8\x79\x55\xd2\x65\x87\x4d\x9b\x2e\x3b\x98\x6d\x68\x12\x6b\x86\x8e\x7e\xa8\xa6\xa7\xcb\x54\xc3\x0b\x56\xca\x26\x18\x06\xe9\x8c\x31\x5c\x9f\xf6\xb4\xef\x0c\x34\x5c\xdf\x24\x7d\x13\xd2\x92\x2a\x5c\x45\xdc\x4d\x16\xf2\xa1\xad\xcc\x5f\x26\xec\x88\x2e\x58\x38\x36\xc9\x9f\x4a\x6e\x22\x1a\x3b\xc0\x96\x95\xf9\xcb\x4e\x2f\xb2\xe3\x99\xf4\xe5\xa4\xef\x6b\x6e\xb0\x73\x33\xc3\x8e\x80\xb7\x7f\x74\xed\x91\xdf\xe3\xa2\xb8\x85\x02\xfb\xa0\xf1\x49\xd8\x7e\xa1\xfd\x16\x57\xf1\x3e\xb1\x0d\x75\x6b\x9e\x81\x77\xdc\x3f\xc5\x69\x91\x97\x75\x98\xd5\xd2\xdb\x4e\x28\x36\xd9\xf4\xd6\xf9\x65\x36\x9d\xa6\x8d\x34\x32\xc1\x8d\xb3\xe4\x6c\x02\xa6\x62\xb5\x5c\xc1\xa6\x22\x8d\x2c\xc2\x96\x2a\x61\x61\xcb\x20\xba\xb0\xe5\xfa\xb4\xa7\xbd\x2e\x6c\xb9\xfe\x26\x53\xc1\x13\xfd\xab\x88\xbf\xab\xa9\x48\xa3\xc7\x98\x0a\x19\xcf\x68\x53\xa1\x36\xbf\xd3\x54\xfc\xc3\x69\xcf\x4d\xa6\x42\x1e\xb4\xa1\xa6\x42\x68\xf5\xb7\x33\x15\x02\x13\x43\x4d\xc5\x66\xe3\xc1\xa6\x82\x1c\x69\x37\x09\x5b\xaa\x84\x85\x2d\x83\xe8\xc2\x96\xeb\xd3\x9e\xf6\xba\xb0\xe5\xfa\x9b\x4c\x05\xbf\xa6\x43\x45\xfc\x5d\x4d\x45\x72\x7a\x8c\xa9\x90\xf1\x8c\x36\x15\x6a\xf3\x3b\x4d\xc5\x3f\x9c\xf6\xdc\x64\x2a\xe4\x41\x1b\x6a\x2a\x84\x56\x7f\x3b\x53\x21\x30\x31\xd4\x54\x78\xde\x66\x03\xdb\x8a\x26\xb1\x48\x5b\xaa\x84\xa5\x2d\x83\xe8\xd2\x96\xeb\xd3\x9e\xf6\xba\xb4\xe5\xfa\x9b\x6c\x45\x7b\xcb\x8e\x8a\xf9\xbb\x1a\x8b\x26\x79\x8c\xb1\x90\xf1\x8c\x36\x16\x6a\xf3\x3b\x8d\xc5\x3f\x9c\xfa\xdc\x64\x2c\xe4\x41\x1b\x6a\x2c\x84\x56\x7f\x3b\x63\x21\x30\x01\x1b\x0b\x19\xfe\x7b\x4e\x09\xb3\xe6\xf4\xa9\x8d\x55\x67\xac\x0a\x63\xd5\x96\x71\x96\x46\x6e\xfb\x90\xc9\x7d\xcf\xcc\x7e\xe4\xb4\xfe\x7b\x97\xcc\x2d\x93\xf8\x86\x19\xfc\xb7\x9f\xbe\xf6\xb9\xcb\x2b\x13\x7a\xe4\x49\xfa\x4a\x21\x9d\x54\x23\x77\x05\x6e\x9e\x6d\x0d\x94\x05\x5a\x08\x42\xbc\x69\x67\x10\x62\x59\x13\xf5\x86\xc1\xa0\x86\x56\xce\x64\x48\x13\x87\xab\x41\x84\xd4\xcf\xd9\x22\x86\xb9\x15\x03\xfd\x4c\xf8\xb3\xfc\xa1\xba\x8f\x9a\xf0\xe1\xb6\x0f\xb4\x3a\xe7\x2f\x36\x40\xf0\x83\xef\x20\x11\x71\xbd\x82\x84\x23\x7f\x2f\x97\xae\x9d\xec\x41\x47\x17\xeb\xdf\xef\xd0\xfa\xdc\xed\x8e\x12\xe2\x67\xe9\x2c\xe1\x1c\xff\x3f\x94\xe8\x00\xf7\xe0\xa3\xbf\x76\xa7\x13\xf6\xff\xb3\xe0\xa3\xbf\xf9\xc4\xea\xf1\xd0\xa1\x43\x58\xfc\xf4\x89\xb0\xdc\x16\xa7\x71\x8d\xca\x24\x4e\xe3\xfa\xa7\x4f\x9e\xdb\x16\x33\x4e\x7c\x7a\x36\x71\x31\x59\x9d\x7d\xff\xd7\xc5\xc4\x0b\xe8\x5f\x7f\x7e\xf6\x7d\xe0\x64\x3c\x3c\x6a\xa8\xa9\xc7\x4c\x0f\x92\x48\x32\x1c\x25\x66\xd2\xc2\x3a\x93\x18\xc8\x80\x49\x1e\x85\xe5\x57\xd0\xda\xb4\x5b\x28\x60\x28\x85\x3c\x00\xa0\x5e\x01\x0f\x23\x33\x9a\x15\x3f\x08\xa6\xfc\x7f\xe2\xe8\x99\x5b\xdb\x58\xea\x31\x2d\x12\xb1\xd5\x20\x6a\xa0\x81\x91\xf0\xf8\x56\x3c\x46\x33\x63\x21\xa9\x58\x19\x0b\xa4\x64\x64\x74\x38\xe3\xa6\x12\x98\x61\xc0\xb0\x28\xe2\x01\xcc\x8b\x04\xe1\x3d\x5b\x31\xff\x5d\xdb\x18\xdc\x81\x49\xf7\xcf\xdf\xd0\xd2\xc8\x43\xa7\x18\x9a\x41\x13\x46\xb2\x36\x16\x81\x43\x26\x06\x82\xd0\x27\xf9\x21\x2c\xa3\xbb\x76\xd3\x0c\xdc\x92\x20\x5e\xb3\xf1\x92\x97\x11\xf5\x16\xf7\x25\x0a\xbf\x3a\xf8\xf7\xc0\xdb\x99\xdb\x2d\x83\x7d\x97\x33\xfb\xc6\xdb\x99\x71\x8f\x7f\x3e\x2b\xfb\x87\xe5\x8b\x61\x5d\x06\x35\x23\x3b\x25\xe8\x1d\x2b\xc2\xfd\x8e\xca\xe9\x39\xb6\x2f\x81\x95\xea\x4d\xc5\x94\x86\x62\xfe\x42\x3e\x1c\x86\xfd\x6c\x62\x3a\x12\x67\xe2\x91\x2c\x22\x86\x0d\x6e\x3a\x28\xc0\x45\x97\x46\x53\xb9\x4b\x48\xe1\x03\x4a\x73\x69\xe6\x05\xc8\xb7\x68\xe6\x06\xff\xcb\xae\x3c\xfc\x51\x60\x6d\xaa\x31\xfb\x23\x05\x3d\xe6\xb9\x7c\x49\x02\x97\x8c\xb3\xcf\xa3\xd7\xde\x0d\x71\x62\xf2\xc6\xa2\x69\x77\x60\x79\xa2\x26\x38\x75\x5c\x27\x48\xd9\x56\xca\xf3\xca\x12\x80\xea\xb2\x97\x60\xe8\x11\xb7\x39\x98\x44\x9b\xe3\x44\x4d\x2d\x8e\x37\x0c\xd5\xbb\xd9\xb6\x85\xfa\xb1\x7b\x94\x52\x87\xcb\x3d\x61\x77\x49\xb6\x5b\x50\x78\xf2\x0a\x1f\x4c\xf7\x6d\xca\xac\x41\xa6\x8f\x3b\x57\x04\x6c\x99\x66\x12\x75\x48\xd7\x8d\x6a\x31\x01\x8a\xdc\x09\x1f\x1e\x26\x7c\x43\x77\x86\xb2\x2f\xdf\xc7\x6a\xe0\x9d\x92\x02\x66\x48\x7b\x30\xd6\x9d\x0c\x62\x5f\x1a\x0b\xba\xc9\x59\x4e\x08\x3f\x5b\x42\xd2\x70\xe4\x94\xec\x34\xf7\x11\x07\x55\xee\xf6\x97\x49\x90\x5d\xa7\x76\x1a\x12\x36\xd6\x3a\x4e\x4f\x0e\x56\xbc\x24\x7c\x1d\x7e\xa6\x99\xed\x26\x53\xa6\xd1\xae\x4f\xca\x1d\xc9\x69\x47\x9c\x22\x15\x0a\xea\xbc\xe8\x96\x16\x32\x74\x22\xaf\x21\xbe\xed\xb4\x3a\x97\x78\xae\xb8\xd2\x45\x53\x00\x56\x8c\xe4\xfd\xac\x29\xd8\x85\xeb\x7b\x5b\x4d\x6c\x16\xbe\x4e\xe8\x7b\x5a\xd6\x1a\x2f\x28\x1a\xcb\xa6\x9f\xb6\xf1\x88\xfd\x85\xed\x1a\x23\xb0\xec\x48\x8a\x94\xeb\x0d\x82\xa2\x91\xd5\x8c\xf0\xa4\xf1\x2d\x18\x6a\x77\xc2\xb6\xe3\xf1\x67\xfd\x18\x8f\x6a\xa9\x24\x8b\x87\xf1\x33\x02\xfc\xf6\x9b\xdb\x46\x86\xbe\xd5\x1f\x37\x34\x00\x53\x03\xba\xad\xcc\x6a\xa1\xf5\x8f\x52\xc7\xd8\xdc\x13\xcf\xf0\x03\x6d\x1e\x77\x09\x4d\x2f\xe6\x89\x68\x86\xa6\x83\xe1\x81\x59\x7a\x2b\x69\x6a\xb4\xc7\x91\xee\x9f\xb3\x46\x06\x1e\x70\xa5\x55\x3f\xe2\x41\xa3\x0a\x34\xe8\x31\x7e\x63\x68\xdb\x87\xd5\x40\x1b\x1c\x57\x99\x03\xc6\x02\x0d\x07\x2a\xd0\xa0\x31\xb7\xab\x67\xe2\x32\x0c\xed\x01\x77\xfa\xdb\x39\xe4\x97\xac\xde\xce\xe9\x01\x65\xa5\x4c\x05\x91\x5b\x9e\xc2\xa2\x7d\x99\x89\xad\xc5\x72\xa0\x28\x2f\x8b\x73\x98\x55\x5b\x92\x1f\x3b\x7f\xa9\xb6\x1e\xd8\xc5\x9e\xdc\x3c\x6f\x6f\xb3\xf0\x70\xc8\xcb\x28\xce\xb3\x76\x4d\xdc\x09\xb3\xc3\x39\x2f\x99\x1b\xd8\xd6\x33\xb3\xa2\x24\x48\xd1\x00\x84\x09\x90\x1f\x9d\xfa\xb5\x50\x6f\x0f\xed\x99\xfd\x76\x25\x06\x89\x51\xb5\x50\xa9\x8d\x3a\xa1\xa3\xe0\x95\x82\x05\xd5\x1d\xdb\xe9\xa7\xc0\xde\x66\x38\x96\x8c\x0e\xe5\x25\xdd\x3f\xf0\xe0\x5d\xeb\x76\xea\x4e\x9b\x47\xf7\x71\x4b\x5b\xe9\x7b\xb3\xaf\x28\xb1\x68\xc7\x33\xd9\x56\xfe\xa3\x5a\x70\x85\x3e\x17\xf5\x35\x6a\x93\xe7\xd1\x7d\xf7\xb8\xe9\x0e\xfa\x14\x25\x1f\x1c\x6b\xb7\x66\x7f\x7e\x1a\x40\x82\x84\x2d\x2d\x21\x35\x7c\xb9\x64\x11\x2a\xb1\xba\xdf\x8d\x89\xce\x00\xa5\x8d\x72\xee\x8c\xa7\x13\x2f\xc2\x53\x9c\x91\x66\xfd\x0a\xa0\x9c\x90\xd0\xc4\x08\x4a\xab\x08\x4f\x88\x7d\xd9\x33\x2e\x98\x40\xe7\x2d\x21\xef\x1e\x07\xa4\x72\x66\x1f\xbf\x4d\xed\x63\xcc\x89\x0c\xa7\x32\xe2\x87\x04\x5b\xf6\x94\x2b\xea\xfd\x0e\x6f\xb0\xdc\xcf\x77\xd0\x18\xf7\x2a\xae\x74\x70\x4f\xa4\xa5\x5c\x41\x76\x63\x1e\x3d\x82\x8f\xe8\x83\xf0\x86\x99\x08\x23\x0e\xfa\x41\xf6\x83\x9b\x80\xfd\x92\x24\x49\xc8\x75\x7e\x82\x48\xcd\x7e\xf4\xd3\x66\x3d\x35\x0a\x4c\x59\x45\xec\xdd\x60\x0d\x38\x1e\x08\x5e\x89\x20\xe2\xe7\x0b\xdb\x22\x85\xc1\x87\x72\xc9\x3a\xc9\xf0\x13\x9b\xe2\x24\x23\x7b\xa1\x84\x29\xa1\xc6\xe9\xc1\xa0\x8b\x9d\x60\x8c\x36\x4d\x30\xc9\x7e\xde\x23\xfa\x39\x97\x0b\x4c\x6d\xa4\x22\xcc\xfb\xf4\x40\x23\x57\xa5\xe0\x70\x8d\xba\x52\x09\x46\x78\xcb\x68\xf9\x7d\x13\xc5\xc8\xfe\x4d\xd3\xa6\x77\xd6\xd0\x37\x5b\x18\x9d\x90\xf5\x58\x18\x1e\x2f\x3c\x5c\x0b\x69\xb4\x56\xc1\x47\x29\x4d\xdc\x4a\x4d\x13\x37\xec\x7e\x3a\xe5\xcc\xd2\x3e\xac\x10\xc6\x02\xa7\x25\x15\x8e\xfc\x9b\xf2\x12\xfc\x1d\xe4\x35\xa0\x23\xaa\xa5\x27\x08\x69\x05\xfb\x62\xc0\x7f\xd9\xd6\x22\x29\x04\x4a\x8b\xfa\x55\xd9\x08\xb1\xaf\xb3\x09\xa3\xa3\xbf\x16\x85\x3b\xf3\x31\x04\x59\xaf\x52\xf7\xc5\x2c\xb5\x6d\x31\x4b\x6d\x59\xc9\x73\x3b\x05\x71\x8a\x32\x4e\xc3\xf2\x75\xd0\xe1\xea\x50\x6e\x23\xf7\xb8\x2d\x55\xbf\x8b\x80\xf8\x96\xfe\xe1\xa0\xe2\x9b\xc1\xf8\x94\xf4\x74\x43\x5f\x85\xf8\x4d\x48\x11\x55\xe8\x90\x67\x51\x6f\x27\x99\xeb\x13\xaa\xad\x94\x6e\x76\xe5\x03\x3a\x1a\x2c\x82\xfd\xd2\xd7\x71\xce\x4c\x38\xc7\x74\xd6\x73\xd7\x53\xcf\x5b\x4d\x3d\x5f\xee\xee\xe5\x70\x40\x55\x65\x67\xcc\x5f\x87\xab\x45\xd0\x31\x46\xdb\xa8\x5d\x65\xa5\x03\x3a\xea\xa1\x15\x9a\x2f\x54\x7c\x33\x18\xdf\x98\x4e\x2e\xdc\xa9\xb7\x5c\x4d\x97\x1b\xb1\x8b\x71\x76\xcc\x7b\xf8\x59\x85\xfe\x7e\xdd\xf2\x83\x1b\x28\x9d\x23\x45\x43\x7a\xe6\xad\xc2\xf5\x5e\xc2\x34\x03\x30\x8d\xe9\x93\x3f\x9f\x7a\x4b\x7f\xea\xad\x17\x62\xa7\x5e\xc2\x32\xeb\x32\xf9\x7e\xf0\x3d\x3f\xf0\x37\xa0\x3f\x71\xf0\xdc\x55\xcb\x10\x6b\xa6\xf4\x8e\x97\x4a\x1d\x34\xa2\x8c\xe6\x1b\xe4\xba\x2a\xca\x19\x8c\x72\x54\x4f\x83\x60\xea\x6d\xe6\xd3\x95\xd8\xd1\x28\xcc\x4e\x7d\xa3\x1e\x1d\xe6\x81\xa0\x9f\xb4\x89\xd2\x47\x56\x38\x40\x86\xfb\xc8\xf7\xe6\xae\x82\x6d\x06\x62\x1b\xd5\x3b\xdf\x9d\x06\x73\x45\x37\xc9\x6e\x94\x7e\x21\xae\x8f\x9b\x63\xd8\x72\x44\x1a\x29\xdd\xa3\x65\x03\x05\x18\x22\x17\x05\x32\xba\x19\x84\x6e\x54\xf7\x16\xeb\xa9\xbf\xd8\x4c\xfd\xc0\x95\xc5\x57\xf6\xe4\xe2\xa0\xd9\xce\x85\xe1\x2e\xbf\x6a\xa2\x2b\xbf\x0e\x9a\x7c\x91\xef\xf9\x0b\x09\xd3\x0c\xc0\x34\xa6\x57\x81\x3f\x0d\xd6\xd3\x25\x9b\x7a\x7f\xbd\xa4\xfb\xbc\x2e\xf3\xac\x75\x22\x7d\xc3\x12\x85\x21\xbf\x1b\xbc\x24\x31\xb7\xaf\xbd\xe9\x54\x17\x98\x2a\x71\xdc\x04\x9e\xe8\xce\xd4\x9e\xfd\xbb\x6a\xde\xd9\xb7\x59\x98\xa0\x12\x4a\x31\x3d\xe8\x63\xa6\xd7\x79\x97\xa3\x8e\xc9\x13\xa2\x64\x89\xa9\xb3\x61\xed\x57\x7c\x5a\x49\xdc\x5a\xc5\xb5\xe4\x75\x51\x5c\xa5\x71\x45\x36\xaf\x2a\xfd\x5d\x08\xe8\x05\xa8\xc9\xec\x90\xe4\x15\xea\xfd\xe2\xd6\x05\xee\x86\xee\x83\xac\x2a\x5e\x91\xeb\x2e\xdc\x75\x00\x48\xff\x70\x40\x81\x7e\x17\xdc\x3a\x0a\x71\x58\x29\xa1\x9a\x9c\xc5\x6f\xef\x1c\x74\x73\x3c\x44\x3a\xa8\x38\x5e\x2d\x07\xfe\x2a\xf0\x39\xa0\xe6\xd1\xcc\xd7\xf3\x68\xe1\x41\xea\xe9\xa3\x39\x0a\xd4\xf8\x73\x19\xad\xa3\xbd\x86\x0c\x66\xf1\xb0\x3e\xec\x0f\x47\x1d\x18\x60\xd2\x77\xfd\xb9\xbf\x6c\x41\x65\x3f\xc4\x0b\x82\x95\xbf\x80\x6c\xd7\x02\x45\x5d\xf6\x68\x4e\x75\x8e\x96\x87\xbd\x82\x0a\x66\x70\xef\x45\xc7\xbd\x06\x0a\x8d\xe1\xde\x47\xde\x9c\x03\x8a\x3e\x84\x7b\x08\x16\x4b\x17\xe2\xcd\x43\x87\xa3\xa7\xca\x17\xa1\x00\xed\x45\x3c\x30\x63\xe1\x3e\x8a\x50\x20\xc1\x41\x5c\x2d\xfd\xc3\xbc\xe5\x4a\x71\x02\xd6\xc1\x72\xe1\x2e\xe0\x45\x85\xf9\x21\x52\x18\x3b\x1e\x11\xda\x87\x0a\x2a\x98\xb7\xe3\x11\xad\x43\x4f\x05\x05\xd8\x0b\xe6\xf3\xa3\xdb\xb2\x27\xbf\xba\x57\xbe\x77\x00\x45\x7a\x5c\x47\x2b\x4d\xa4\xc7\xe0\x20\x88\x94\x62\x32\x30\xe7\xed\xdd\xfd\x4a\x81\x04\x78\x5b\x6c\x3c\xdf\x5b\x75\xe6\x45\x78\xf1\xae\xbd\xb5\xb7\xf6\x21\xd6\x10\xfe\x4f\x65\x2d\x3a\x46\x47\x24\x21\x82\x39\x43\x07\x74\x38\x2e\x65\x40\x80\xb1\xe5\x1a\xff\xd7\x75\xa0\x7b\x61\x7a\x7b\x0f\xf9\xd0\x44\x25\x73\x72\xa3\xce\x82\xe5\x61\x7d\x08\x45\x3c\x86\x29\xb0\xd9\xef\xf7\x48\x82\x83\x34\x6d\xe1\x06\x6e\xf0\xf6\xcf\xfc\x93\xcd\x57\xf4\x7a\x2c\xc3\x14\x55\x93\xa2\xcc\x4f\x25\xaa\x2a\x67\x1f\x96\x4e\x55\x97\x71\x81\xaa\xeb\xb1\xcc\x53\x71\x5f\x62\x6b\x69\x3d\x9a\xcf\xbc\xce\xc1\x5a\x77\xe2\xbe\xbd\xfd\xf3\x3b\xe2\x9e\x71\x8c\xfd\x2b\xd3\x62\x32\x57\x35\x15\xbe\xb8\xa6\x21\x5e\xd8\xaf\x5f\xf5\x31\xe4\xe3\x83\xd8\xcb\xc7\xe7\x20\x92\x8f\x27\xb1\x45\x17\xf5\x7c\x12\x2b\x56\xfb\x29\xf8\x57\x83\x16\x6e\x8c\x6b\xa7\xc2\xc2\x07\xf1\x66\x26\xb3\x25\x5d\x47\x19\xbc\x80\x22\x0d\x92\x9e\xe6\x11\xd0\x94\x48\xdf\x18\x8b\xe5\x16\x96\xce\x09\x0b\x00\x65\xf5\x0f\x8b\x20\x42\xa7\x29\xb0\xed\x36\x78\x9e\xf8\xc1\xc7\xa9\xe0\xba\x68\xbf\x03\xf7\xa3\xa1\xa5\xb9\x66\xa5\xe0\x50\x7e\x4b\xd7\x93\xb5\x17\x1a\xb1\x1c\x65\x52\x0f\xc3\x2c\x4e\xc3\x1a\x45\xed\xc7\x57\x5a\x40\x66\x41\x35\xa1\xdd\x9c\xc4\xd9\x31\xce\xe2\x1a\x81\xd3\x68\x37\xba\xc5\x4d\xa2\xb2\x71\x4a\x53\x56\x4b\x3f\xdf\xde\x66\x84\xc8\x88\x69\x40\x75\x92\x1e\xbb\x13\x13\x43\x89\x47\xee\x08\x4e\x75\xaf\x22\xdb\x06\xf2\x26\x6e\x2e\xfd\xde\x19\xc0\x60\x83\xd0\x31\x44\xfa\xe2\x84\x04\xa5\x98\x52\x58\xce\xf4\x28\xcc\xcd\xd6\x17\x85\x71\xf0\xad\xc9\x86\x5a\xf9\x7b\x95\x07\x91\xe9\xff\x5e\xc5\xc2\x53\x13\x0d\xf9\x9b\xa1\x31\x2a\xe5\x97\xb3\x28\x58\x86\x7f\xf1\xeb\xd9\xa6\x08\x7f\xc3\xd3\xf7\x25\x2a\xf4\x4d\x7b\x88\xc5\x35\x7b\x65\x5b\xb2\xb6\x0a\x6f\x92\x91\x79\x67\x30\xd4\xdc\xf2\xd1\xc0\x44\xa0\xfd\x44\xa5\x29\xc0\x76\x44\x1a\x59\xc3\xed\x59\x2a\x2d\x26\x67\xed\xe3\xe7\x0d\xdf\xd8\x14\xd4\x3f\x6a\x4a\xa1\x6f\xe6\xee\x6f\xc4\x19\xb4\x64\x35\x65\x13\xae\x68\x24\x6c\xe7\xbc\x8c\x7f\xcf\xb3\x3a\x4c\xc6\x9c\x71\x05\x11\xfc\x3c\x44\xbd\x8c\x9f\x4f\x6d\xbb\x38\x06\x92\xd3\x35\x6e\xd8\xa7\x56\x65\x2f\xca\x30\x6a\xc0\x88\x0f\x6e\x3b\x40\xe6\x82\xf0\x08\x7b\x90\x26\x8c\xa1\xa0\xb0\xdb\x6d\x17\xd0\x89\x78\xd6\x6d\x8e\x20\x7d\x29\xfb\xdb\x8d\xea\x43\x92\x8b\x7d\x57\x0d\x02\x29\xbe\xa7\x12\x41\x04\x47\xe8\x11\xd4\xfc\xe1\xaa\x34\x88\xc8\x48\x6d\xb2\x64\x06\x83\x79\x10\x33\x84\xdd\xaa\x4e\x69\xf4\xbd\xd5\x09\xa2\xf8\xae\xea\x04\x10\x1c\xa3\x4e\x40\xf3\xc7\xab\xd3\x10\x22\xf7\xab\x13\xcf\x1e\x05\xf3\x20\x66\x91\xba\x55\x9d\x92\xd3\xf7\x56\x27\x88\xe2\xbb\xaa\x13\x40\x70\x8c\x3a\x01\xcd\x1f\xaf\x4e\x43\x88\xdc\xaf\x4e\x6d\x82\x21\x98\x89\xe6\x7e\x67\x89\xe4\xb1\xf9\xbe\xfa\xd4\x7c\x67\x97\x09\x22\x38\x46\x9f\x9a\xef\xe0\x38\x0d\x22\x32\x56\x9f\xc4\xf6\xc7\xe4\x52\x9d\xaf\xda\x97\x29\x15\xe2\x67\x53\xc7\x18\xfb\xf4\x62\xbe\x01\xed\x7a\x0f\x64\xea\xa1\xec\xd0\x4f\x3c\xfc\x6b\x8e\xa1\xfd\xc8\x20\xbd\xa7\x95\xf4\x49\xd4\xc8\x12\xff\x6a\x34\x0e\xb9\xb2\xd3\xd7\x14\xc3\x51\x9a\x4a\x0c\x87\x0b\x75\x7a\xc3\x3f\x43\xf1\x2f\x4e\x46\x0c\x23\x87\xb1\xb7\x9d\x34\x90\x46\xb6\xf8\xb7\xad\xb1\xe8\x07\x0d\x25\xa7\x2a\x0d\x25\x2d\x04\x28\x0e\xfc\x58\xc6\xbf\x8b\x19\xda\x8f\x1d\x46\x7b\x2b\x69\x10\x8d\x2c\xf1\xef\x6f\xe3\x90\x0f\x1a\x42\x4e\x53\x1a\x42\x5a\xa8\xd3\x1b\xf4\x41\x8f\x7f\xbb\x83\x1a\x8f\x1c\x3c\x5b\x13\x79\x1e\x9b\x98\xe1\x1f\x08\x47\x60\x1e\x36\x89\x19\x41\x79\x12\x93\x42\x9d\xd8\xf0\x2f\x8e\xf4\xe3\xa2\xa1\xfd\xc8\xc1\xeb\x69\x25\x8d\x9f\x8d\x25\xf2\x11\x73\x1c\xf2\x41\x43\xc8\x69\xca\xf7\x61\x93\x42\x9d\xde\xd0\xaf\xa2\xec\x03\x28\xdc\x7c\xe4\x00\xda\x1b\x49\xe3\x67\x66\x88\x7d\x67\x1d\x85\x7b\xd0\xf0\x71\x92\xd2\xf0\xd1\x42\x9d\xdc\xc0\x0f\xb7\xec\x1b\x2d\xd8\x7a\xe4\xe0\x59\xdb\xc8\xba\x67\x62\x87\x7f\x09\x1e\x83\x7a\x98\xe6\x31\x8a\xb2\xe6\x91\x42\x48\x52\x03\x3e\x2d\xf3\xaf\xc8\x50\xe3\xd1\x5a\x67\x6e\x22\xbf\x2d\x4c\xcc\xf0\x4f\xd5\x23\x30\x0f\x7b\x55\x30\x82\xf2\xab\x82\x14\xbe\xb1\xad\x42\xf4\x08\x17\xf1\xf2\xa5\xb3\x14\xdd\x71\x01\xe3\x96\xf7\xd6\x11\x72\xe9\x17\x94\x76\x73\x99\x57\x34\x13\x97\xdc\xb9\xd5\xde\xb8\x3f\x0b\x18\x41\xd5\x9b\x73\x77\x86\xd4\x14\x04\x98\x9c\xfd\xe3\x4b\xf8\xcf\xe4\xe7\xac\xfb\xc9\xe4\x31\x04\x94\x52\x6d\xb9\x59\x05\x6f\xfb\x4b\x5d\xe7\x19\xdf\x30\x35\xec\x7e\xf1\xf6\x1e\xeb\x90\xb6\xeb\x72\x3e\x01\xdf\x13\xde\x66\x75\x1e\x56\xb5\xf1\xde\x98\x79\xe0\x16\x8d\x98\x22\x90\x16\x74\x79\x7d\x19\x80\x76\x64\x03\xce\x4c\x21\x7d\x93\x5d\x07\xcf\x5a\x66\x9b\xee\x96\x9b\xbe\xd4\x36\xcf\xf2\x5e\x41\xe9\xaa\x19\x15\x92\x0f\xa9\xe9\x93\x1f\x19\x03\xfd\xd8\x38\x9c\x0e\x85\x00\x93\x64\x54\xf8\xe5\xcb\x51\x7b\x62\x85\x72\xef\xa0\x06\x73\x8e\x23\xed\xd2\x2f\x5c\xc1\x0f\x7a\x8e\xfd\xfe\x6a\xbe\x6c\x0a\xbe\x89\xa7\xe7\xb2\xbc\x5b\x45\x65\xcf\x92\xe2\x06\xcf\xef\x94\xe4\x87\x8e\x1d\xf9\xc0\x2c\x7f\x80\x7c\x9b\xa5\x79\x14\x26\x4e\x5e\xa0\x4c\x3f\x30\xdc\xd5\x4d\xe8\x73\x77\xf2\xb8\xe1\x7b\x30\xd4\x9b\x75\x18\x60\xfb\x1d\xf4\x18\x37\x28\x62\x1b\x17\xd9\x57\xe6\xf6\x03\xae\x1b\xb8\x3b\x51\xc8\x3b\xfd\x56\x5a\xf2\xac\xee\xfb\x10\xee\xf3\xa7\x2c\x46\x71\x98\xe4\x27\xe0\xe3\x2b\x45\x48\xb3\xfc\x10\x5d\xe5\xe9\x55\xa1\x89\x4e\x70\xcd\x8e\x61\x84\x26\x32\x5e\x61\x3f\x87\x74\x5d\xfa\x31\x2f\xd3\xc9\x6c\xce\x8e\xdc\x28\x97\x10\xdf\x0a\x31\xed\x21\xa1\x55\x53\x3c\x49\x58\xa3\x1f\xdc\xa9\x83\xad\xcd\xf3\xce\x56\x39\x78\xa3\xc4\x90\xf1\xe0\xbb\x22\x08\x28\xbd\x0a\x52\x02\xd5\xb9\xed\x6e\x38\x6e\x7f\xf2\xf6\xb4\x25\xbd\x0d\xac\x17\x4f\x75\x08\x13\xf4\x83\x37\x73\x7d\xb1\xbb\x42\xa9\xac\x1c\x2c\x9f\x2c\xb6\xf3\xfd\xd6\x43\xb8\x3e\x8a\x4c\x27\x72\xe1\x94\x43\x76\xba\x98\xd1\x72\x8e\xd9\xa6\xa5\x2b\x80\xe4\xdb\x99\x63\xd9\x19\x26\x9b\x11\x2b\xcf\xb7\xd0\x03\xc6\xec\x63\x6f\x8a\x9c\x5e\x7a\xc4\x58\xc0\x93\x9b\x37\xa2\x16\x14\x45\x0f\xb4\xc6\x42\x2a\xae\xbe\x81\xe7\xd4\xdb\x33\xe1\xf2\x2b\xc5\x3c\xf2\xac\x86\x6b\x14\x26\xc9\x44\xd6\x56\xa5\xf9\xef\x50\xb9\x58\xd4\x5d\x51\x66\xe0\xcb\xa8\x7d\xef\xb9\x43\x4e\xb0\x9a\x23\xd9\xb2\x68\xaf\x30\x45\x87\x62\x6b\x85\xc2\xf9\x13\x71\x70\x12\xdf\x21\x9d\xa0\xf0\x42\x51\x4c\xbe\xed\x44\xf3\xad\x2e\x97\xff\x0c\x1d\x96\xd0\x5f\x57\x98\x40\x54\xe6\xc5\xc0\xb7\xe4\x42\x48\x68\xf5\xed\x45\x90\xf1\xb7\x33\xb8\xcc\xa9\xd1\x21\x36\xbc\x75\xc4\xf4\x6a\xe2\x91\x89\x3e\xbe\x64\x4b\x1e\xb9\xd7\xed\xae\x2b\x51\xdb\xdd\x86\xbb\x9e\x1b\xa1\xed\x5e\xd4\x7c\xb0\x13\x35\x17\x7d\x28\x71\x4c\x26\x4a\xc0\xe1\x29\x07\x6b\xb6\x0e\x29\x11\xff\x15\xed\x27\x94\x4b\xd0\xd5\xcf\x70\x0b\x86\x58\x9f\x2a\x7d\x49\x0d\x45\xd6\xde\xa4\x77\xc8\xdf\xf0\x2e\x57\x94\x45\xf0\xdd\x03\xb8\x42\xf6\x4c\xe1\xc4\x7c\x8a\x80\xcd\xd9\xd4\xe6\x23\x92\xa9\x01\x62\xa6\x23\xf5\xf3\x1f\xae\xdc\x6b\xf4\x45\x6f\x99\xda\xb9\x7d\x58\x3a\x29\x0a\xab\x4b\x69\x3a\xaa\xe3\x6c\x36\x9b\x4d\xd1\xb0\xd9\x4b\xe2\x40\x26\x5f\xf2\xdc\xba\x00\x14\x9f\x65\x8b\x8e\xe4\x0a\x09\x77\x56\xba\x6e\x9b\x07\x6d\xeb\xb1\xc8\x0e\x78\x51\x0b\x2f\x1f\x83\x67\x33\x27\x6e\xf1\xfd\xbe\x0d\x8c\xa7\x75\x14\x0c\xaf\x77\x7b\xab\xf6\x5d\x62\x21\xf8\x98\x97\x7a\x2b\xdf\x54\x18\xe4\x39\x1e\x64\xdb\x0e\x05\xda\x26\x39\x71\xdf\xac\x49\x84\xd6\x6b\x53\xeb\xf6\x83\x34\xd0\xc8\xf3\x16\xa4\xd5\xac\xce\xf3\xa4\x8e\x0b\x40\xbd\xba\xb7\xc3\xca\x55\xb6\x98\x32\x7d\x60\x1b\xff\x8f\x61\x1a\x27\xaf\x5b\x27\x2c\x8a\x04\x39\xd5\x6b\x55\xa3\x74\xfa\x2f\x49\x9c\x7d\xfd\x35\x3c\xfc\x85\xfc\xfc\xb7\x3c\xab\xa7\x4f\x7f\x41\xa7\x1c\x4d\xfe\xe7\xbf\x3f\x4d\xff\x23\xdf\xe7\x75\x3e\x7d\xfa\xef\x28\xf9\x86\xea\xf8\x10\x4e\xfe\x8c\x2e\xe8\x69\xfa\xc7\x32\x0e\x93\xe9\xd3\x9f\xf3\x3a\x9f\xfc\x25\xcc\xaa\xa7\xe9\xd3\x2f\xf1\x1e\xd1\x05\x1f\x56\x52\x85\x59\xe5\x54\xa8\x8c\x8f\xd3\xa7\x3f\x62\x92\x93\x3f\x91\xac\x05\xff\x9a\xe6\x7f\x8d\x9f\x3a\x2a\x7a\xc1\x5f\x5e\xd3\x7d\x9e\x3c\x31\xfc\x62\x2b\xb6\x78\xc2\xd2\xee\x94\x69\x98\x48\x4b\x5a\x0b\x57\xb3\x9d\xe2\x96\x63\x92\xd7\x48\xf8\x4d\xdf\x43\xe0\x66\x61\x71\xfd\xab\x2b\x50\x42\x97\x04\xd5\xd8\x8d\xc0\xaf\x28\x6c\xad\x18\x43\x24\x57\x31\x49\x53\xdc\x96\x48\xe7\x0f\x3a\x20\xa5\x21\xcd\x5d\x41\x1a\x52\x2b\xae\x2d\x14\x81\x69\x90\x85\x97\x39\x53\x12\xe5\x2d\xbe\x69\x2b\x26\xb3\xb0\x2c\xf3\x17\x40\x89\x64\xbd\xa1\xba\x37\x5b\x97\xdd\x1d\xbd\xb3\x05\x5b\xd0\x11\x11\xb5\xf3\x51\x47\x28\xde\xdb\x2b\xae\x56\x02\x67\x2c\xa9\x38\x89\x55\x7f\x9b\xed\x2b\x87\xd1\x70\xf0\x20\xfc\xd6\x38\x45\x12\x1e\x50\x8a\xb2\xfa\xff\xfc\x54\xe7\xc5\x97\xa9\x08\x52\x63\xcf\x89\xbf\x2c\x16\xf4\x54\x4d\x3f\x0a\xc6\xbd\x8a\x89\x8f\x4e\x97\x61\x71\x28\x26\x3e\x0e\x06\x8c\x5d\xae\x2a\xe2\xd5\x49\x5f\xff\x29\xd7\x8c\xf7\x9d\x7e\xe8\x89\xf8\x70\x56\x3e\xc8\x2b\x4f\x1e\x16\x52\xd4\xad\x81\x4e\x98\xf0\x06\xa0\x81\x86\xa6\x64\x07\xc0\xc8\xe0\x30\x97\x54\x60\xbe\xd5\x90\xf5\x48\x22\xe0\xa8\x89\xc4\xda\x71\xeb\x12\xcb\x1a\x46\x4e\x19\x3f\xea\x05\x0c\x1e\x41\x2a\x70\x79\x08\x59\x7e\xc2\x71\xca\xc5\x10\x41\x83\x48\xab\xf8\x28\xb2\xbd\x31\x23\x90\x81\x83\x25\x21\x6d\x47\x4b\x3d\xb3\xc1\xb7\x99\x08\x43\xa5\x38\x42\x83\x47\x0a\x4b\x5f\x1e\x27\x5c\x32\x52\xd3\x08\x12\x68\x8c\x70\x05\x1f\x21\x2e\xf2\x1b\x15\x4d\xa4\x01\x0e\x9d\x40\xab\x1d\x38\xf9\xa8\xb9\xa8\x65\xe0\xe0\x11\xf7\x51\x1c\x3a\x8e\x3b\xce\x32\x54\x0a\x2f\x71\xf2\x7e\xdf\x81\xf9\x9b\xac\xe7\xd6\xc0\x88\xce\x74\x34\x2f\x2f\xc8\x17\x11\xd3\x49\x71\x2d\x94\x5c\xea\xce\x42\xcb\x2f\xf6\x35\xff\xcb\x67\xf8\x7f\xd8\x67\xf8\x2e\xab\x1d\xad\x52\x8e\x73\x3b\x3c\x71\xaa\x0b\xb9\x1b\xb0\x75\x81\xd0\x6e\xb7\xe1\x91\xac\x87\xaa\xc5\x46\xdf\x44\xa6\x7a\x87\xa7\xc2\x28\xda\x3c\x15\x0e\x82\x3d\x15\xe5\x1b\x59\xc0\xcd\x98\x1d\xcd\xcf\x82\xa5\x14\xb0\xfd\x2c\x7b\x2b\x24\x14\x72\x66\xd2\xb7\x9e\xa1\xa8\x25\x03\xa9\x93\xe8\x79\xb1\xcc\x3a\x73\x06\x79\x30\x92\x9e\x04\xa3\xb8\x62\x72\x35\x30\x45\x6a\xaf\xdd\xc2\xcf\x28\xae\xe8\x49\x30\x2b\x2b\x82\x5f\xc5\x81\xa8\x5f\x25\x6e\x15\x1d\x22\x44\x8a\x08\x12\x23\xa9\xf9\x59\xf4\xac\x74\x31\xee\x84\xfe\x48\x47\xbd\xf9\x7a\xc4\xbc\xf3\x4c\x06\xf2\x00\xca\x5b\xe4\xc5\xfe\x46\x14\x46\x56\x19\x5f\xd1\xef\x1a\x27\x77\x85\x3f\x5d\xf2\x32\x7b\x54\xf6\x34\xbf\xbb\x4d\xf2\x16\xfe\x06\x68\x80\xe8\x17\x72\x28\xe6\x17\x0a\x7b\x9c\x87\xa8\x00\xc3\x04\xe9\x00\xad\xfa\x59\x70\x0c\x47\x4f\x65\x19\x3b\x28\x5d\x89\x8a\x2d\x1e\x71\x27\xda\xf8\x81\xce\xe2\x38\xf1\xaa\x1c\xea\xf2\x55\x18\xa4\x02\x66\x2b\x7e\xb7\x71\x38\x5c\xc0\x13\xfe\xea\xe0\x57\x92\x98\x47\xd0\x04\x6a\xf7\xbb\x02\xf7\xa3\xf9\x55\x27\x5f\xba\xc1\xbc\x42\xf5\x95\xa4\xaf\x6f\x1f\x57\xf8\xbf\x9e\x0e\x76\xfe\x3a\x87\x21\xfe\xba\x74\x83\xc2\x10\xfd\x25\x78\x20\xed\xc5\x15\x3f\x4b\x2e\xfb\x7b\x59\x30\x91\x05\x50\x40\x02\x2b\x3d\x81\x63\xc0\x5c\x7a\x5d\x81\x04\x97\x7e\x9c\x82\xcb\xdc\xe9\xea\x2d\x31\x47\x95\xbb\x6c\xaf\x19\xba\x81\x3b\xaa\xdc\xb2\x2e\x5e\x6d\x39\xa4\xdb\x77\xb7\xb0\x27\xcc\x70\xdc\x9c\x28\x96\x59\xf1\xd0\x1e\xff\xf7\x2e\x1f\x56\x94\xb9\x05\xe5\x0e\xed\xa6\xa3\xb8\x83\x05\xd8\xb0\x43\xcf\xeb\x93\x04\xfb\xf9\xa5\x42\x89\xfe\xe1\xa4\xab\x9b\x49\x5f\x04\xc9\x67\xd9\x3a\xbf\x1c\xce\x7c\xd3\x5f\x11\x66\xce\xeb\x4e\x2f\xea\x30\xb0\x98\xcf\xb4\xed\x04\xda\xbb\xa2\x36\xe6\x7a\xa1\x78\xa7\x09\x0a\xcb\xed\x3e\xaf\xcf\xd2\x77\xe6\xae\xa9\x3d\xd5\x00\x89\x39\x84\xac\xee\x02\x3b\xca\xc5\x2c\xb8\x88\xaf\x99\x63\xa5\x38\x86\x07\xe4\x90\x9b\x76\xe3\x24\xae\x5f\xf9\x86\x1b\x4b\x95\x7d\x6f\xcc\x52\x4a\x47\x6b\xd8\xfc\x72\x03\xd0\xb4\x97\xd6\xe0\x5d\x2e\xf2\xa0\xea\x5b\x5b\xa4\x7a\x27\x43\x4d\x3d\x55\xca\x8a\x12\x7d\x53\xca\xf8\xbe\x4e\x49\xac\x6f\xac\x54\x69\x4e\x64\x31\x05\xe8\xd0\xdd\x8f\x72\x39\x96\xe7\xf3\xd5\xb2\x07\xe8\x7f\x91\x8f\x2a\xe0\x0e\x20\x56\x65\x60\x03\x63\x86\x7a\x06\x71\x41\x58\xee\x61\xc3\xb1\xf0\xe1\x30\x46\x5a\xac\x74\x93\x91\x2c\x8a\x6e\x4f\x62\x27\x14\xa7\x28\xf3\x02\x95\xf5\xeb\x96\xd5\xee\x06\x6e\x30\xb2\x51\x22\x83\x6d\x1f\x0d\xa8\x15\x1e\x9c\x1e\x51\x02\xcd\xd4\xc4\x13\x9e\xb8\xf9\x51\x69\x38\x44\x4e\x16\x48\x1a\xb8\x70\x42\xee\x0e\x1a\x50\x3e\x8e\x13\xb7\xc2\x33\x68\xfc\xac\x79\x20\xa7\x96\xb9\x87\xad\x60\x99\x27\xea\xf4\xe3\xc5\x58\x14\x46\x67\xac\x7d\x09\x76\x43\xfe\xb8\x0d\x4b\x63\x36\xe7\x30\x33\x1c\x7c\xdc\x75\x1b\x95\x07\x2e\x05\x6e\xdd\x36\x9e\x11\x04\x39\x0b\x20\x49\xb6\x49\xc0\xc7\x0b\x73\xc8\x30\x0f\x94\x52\xbb\xad\x1b\xac\x24\x1b\xb9\x0d\x14\x8c\x2d\x49\xa5\x96\x59\x15\x5c\x95\xeb\xf2\xa5\x8a\x1f\xc4\xe0\x0e\x09\xb7\x64\xe9\x9c\x72\x67\xd2\x50\x4d\x6e\xb8\x35\xb0\x4a\x6f\xbf\xb5\xdc\xeb\xe3\x0b\x1b\x02\xc8\xb3\x20\xef\xc0\xfd\xf8\x99\x7c\x1d\x27\xff\x64\xb9\x53\xa2\x02\x85\xf5\x9b\x8d\xd4\x3b\x5c\xb4\x7b\x8c\x93\xe4\xa7\x4f\x1f\xfd\xf9\xf1\x78\x6c\xaf\xdd\x5d\x77\xb7\xee\xae\x95\x4b\x77\xd7\x93\xb5\x78\xe5\x6e\xf4\xd3\xa7\x5f\x83\x99\x1f\x4c\xdc\xc4\x59\x4c\xe8\x7f\xde\x2c\x70\xbc\x59\xf0\xcb\x02\x97\x2f\x12\x7f\x16\x38\xfe\x2c\xf8\x85\x82\xfd\x0e\xdc\x92\x6b\x1e\xf8\xbf\xd3\x1e\xfb\xb3\x15\xe9\xb1\x37\x0b\x70\x6f\x7f\x99\xe3\xdf\x8b\x04\x77\x73\x82\xbb\x4a\xea\xd7\xc9\xc2\x21\xff\x59\xbb\x1c\x67\x51\x7c\x08\xeb\xbc\xac\x00\xf3\x66\xba\x79\xb1\xb5\x73\xc1\x08\x43\x37\xc0\x7e\xc1\xc9\xc2\xf8\x8d\x7c\x1f\x95\x0b\xf8\x3e\xaa\xb7\xe5\x80\xdd\x9a\x24\xf1\x95\x1c\x53\x88\x7f\xc7\x06\x91\x51\x24\x8b\xcf\xed\x0e\x27\x57\xda\xe1\xd4\xfe\xe2\xdb\x33\xba\x49\x34\xef\x6e\x05\x2c\xd5\x02\xc2\x15\xfe\x4d\xec\x05\x1e\xa0\xac\x26\x1b\x74\x8a\x86\x5f\x72\xc2\xe2\x81\x9b\xd7\xc9\xe9\x5e\x25\xd7\x96\x59\x98\x07\x56\x30\x50\x8f\x5d\x5f\xde\x6a\xd6\xe5\xe1\xb6\xb9\xb8\x1d\x20\xf7\x53\x20\xef\xe4\x10\x16\x24\xe3\x9b\x49\x25\xb1\xf0\x79\x6a\x69\x2c\x9e\x56\x23\xba\x0f\x51\xad\x32\xe1\x31\xf3\x85\x2f\x65\x8e\xd8\xd0\xf6\x76\x84\x92\x7d\x56\x05\x09\xaa\x1c\x3a\xda\xd7\x3a\x07\x5c\xd4\x32\xaf\xc3\x1a\xfd\x30\x5f\xba\x11\x3a\x89\xfe\xa9\x5c\x21\x25\xfa\x7c\x28\xde\x99\x82\xcd\xf6\x86\x10\x16\x4f\xc8\xb3\x72\xf5\x88\x33\xf3\xfc\xa0\x4b\x6a\x4d\x2f\x3d\xa1\x7a\x75\xb8\x94\x58\xa7\xc8\x08\x42\x2b\xa1\xe6\xb4\xd7\x81\x10\x13\x76\xe9\x0f\x67\xab\x40\xcf\xc3\x28\xf7\x64\x37\x0a\x5a\x1d\x07\xa7\x4a\xaf\xfa\xb7\x20\x71\xbb\x27\x5b\x2a\xf1\x51\x6a\x93\xfd\xa9\xcc\x5f\xae\xee\x47\xe3\x89\x01\x57\x3f\x2e\xe0\x3e\xbf\x05\xee\xc7\x4e\xd5\x07\x06\x15\x90\x86\x7c\x47\xea\x33\x89\xe6\x23\xb4\x48\xb5\x7b\xa0\x0e\x75\x4a\xd2\xc5\x13\x23\xd5\x05\x33\xbc\x1b\x01\x2b\x77\xd5\xac\x28\x83\x2d\xa3\xac\x79\x53\x79\x24\xb5\xce\x38\xd1\x85\xf9\x96\xde\x2c\x10\x32\x93\xca\xe5\x6f\x6f\x33\x1a\x1f\xf0\xfb\x80\xae\x86\x7b\x82\xfe\x29\x4e\x8b\xbc\xac\xc3\xac\xe6\x2d\xea\xbc\x50\x81\xeb\xbc\xd0\xe1\xd2\x38\x8a\x12\x0d\x2f\x2d\xd5\xa1\xd9\x47\x0b\x95\x0b\x52\x0a\xf0\x80\xed\x2b\xdc\x44\xa8\x32\xb4\x83\x3a\xc0\xca\xc5\x16\xfb\x53\x9b\x9a\xc4\x94\x62\x51\x00\x0f\x05\xf8\xee\x8e\x85\x93\x7c\x19\xcf\x94\x1d\x00\xd5\x40\xf5\x72\x1a\x39\x98\x6e\xec\x51\xf8\xec\xf2\x7f\x98\x6e\xd3\x51\x39\x05\x2e\xd5\x39\xa9\x37\xea\x08\x5c\xa9\xe0\x50\x8d\x89\x63\x7a\xf5\x8e\xca\x31\x4b\xb3\x61\xba\x10\x47\xe3\x57\xbd\x17\xe7\x24\x5f\x8a\x23\x72\x24\x81\xea\xe5\x26\x3e\xe9\xcd\x39\x0a\x9f\x24\x97\x85\xe9\x56\x1b\x95\x49\xf9\x72\x9b\x93\x70\xb3\x8d\xc0\x86\x00\xa4\x14\x1a\x19\x23\x17\xdf\x28\x8c\xf1\x6c\x11\xa6\x6b\x69\x54\xde\xb4\xdb\x69\x4e\xf2\xd5\x34\x02\x33\x32\xa8\x5e\x6e\xe2\x93\x5e\x5e\xa3\xf0\xc9\x52\x32\x98\x2e\x96\x51\xd9\x54\xef\x97\x39\x49\x97\xcb\x08\xcc\x48\x80\x5a\xb1\x89\x45\x7a\xff\x8c\xc2\x22\x4d\x7b\x60\xca\xbd\xab\x72\xa8\xdc\x10\x73\x12\xaf\x87\x11\x18\x11\xc1\xd4\x52\xe3\x00\x92\xcb\x63\xb4\x01\x2c\xbf\x5e\x4d\x57\xbb\xe8\xc3\x27\xde\xf0\x72\x12\xae\x77\x91\xc6\xa8\x05\x52\x0a\x8d\x1a\x48\x6e\x7f\x51\x35\xf0\x1c\xd7\x08\xd4\xbf\xa3\x02\x29\x78\x6f\x57\xdb\x59\x77\xa9\x19\x75\x37\x4d\x17\x83\xea\xa0\xca\x55\xd1\x83\x9a\xd0\x95\x3c\xf1\xc7\xa0\x66\xd0\xc5\xd0\x83\x1a\x92\x2f\x9b\xe2\x75\xe7\x43\x1a\xb9\x7c\x10\x5c\xb8\xd3\x2d\x00\x4d\x67\x66\xea\x66\x07\xc6\x22\x71\x63\xc7\x3a\x48\x1e\xab\x1b\xba\xd2\x01\xd2\x20\x1b\x00\x6b\xdf\xa0\x40\x2e\x62\x00\x5c\x78\x91\x49\x0d\xb4\x97\x58\xdb\x80\xbf\x47\x24\x70\xed\x1d\xc2\xc1\xa9\x39\x97\x53\x53\xa8\xa6\x9c\xc3\xb6\x16\x56\xb9\xda\x43\xb1\xae\x1c\x9c\x1b\x3a\xf9\x82\x17\xd5\xc8\xb5\xc3\x27\x6a\x9e\xc9\xde\x74\xa8\xcb\xaf\x0a\xac\x36\xfd\x5b\xae\xe9\xac\x54\x78\x96\xc6\x9a\xcc\x3e\x14\x61\xcf\x54\xdd\xa8\x59\xa2\x14\x80\xbc\x42\xfb\x39\x21\x8c\x96\xdb\xda\xd5\x46\x3b\x7b\xbe\x3f\x08\xbb\x34\x5b\x7b\xdb\xf5\xdf\x67\x0b\xd1\xe8\xbf\x4b\xbf\x87\x8e\xad\xcf\x1d\x19\xd1\x10\x0c\x1d\xa9\x71\x04\x4e\x57\x60\xbb\x23\x04\x79\x88\xcb\x43\x82\xae\x5a\xc0\x04\xc1\x92\x8b\x2e\x55\x48\x03\x5e\x57\xcd\x3a\x28\x02\x91\x4f\xc6\xc7\xb8\x19\xf5\x41\x39\x72\x70\x28\x29\x7d\x6c\x17\x71\x46\x0e\x8d\x26\x95\xe0\x12\x02\xa1\x01\x27\x18\x85\xca\xe0\x32\x1c\x00\x50\x4b\x47\xf4\xc9\x2f\x00\xc0\x11\x63\xde\xb6\x04\x02\x3c\xa0\x24\x51\x20\x71\x91\x0c\x7a\x4c\x50\x03\x9d\x8b\x14\x74\x46\x5c\x36\x05\x47\x40\xc3\x21\x94\xc3\xa8\x04\x00\x01\xa3\xf9\x18\x20\x36\x30\x7d\x12\xab\xd2\x21\x42\x6b\xa1\x06\xcb\xad\x4a\xfb\x45\x57\xa5\xfd\xd2\xe3\x30\x43\x04\xd8\xc2\x0e\x92\x61\x95\xde\x27\xc6\x6e\x4c\x1e\x25\x49\x4b\x96\xec\xc8\x49\x7b\x27\x5f\x3a\x68\xfe\xa5\xa3\xa7\x60\x3a\x60\x16\xa6\x03\x26\x62\x3a\x62\x2e\xa6\xa3\xa6\x63\x7a\xe7\x8c\x4c\xa3\xef\x20\x4a\x7e\xfe\x13\xbf\x1a\xfa\x44\x99\x9c\x86\x88\xb2\x85\x1a\x2c\xca\xe4\xd4\x2f\xca\xe4\xd4\x2f\x4a\x0e\x33\x44\x94\x2d\xec\x20\x51\x26\xa7\xfb\x44\xd9\x8d\xc9\x3b\x8a\xb2\x3d\x8c\x1b\x39\x4d\xd2\x27\xcb\x26\x19\x22\xcb\x16\x6a\xb0\x2c\x9b\xa4\x5f\x96\x4d\xd2\x2f\x4b\x0e\x33\x44\x96\x2d\xec\x20\x59\x36\xc9\x7d\xb2\xec\xc6\xe4\xd1\xb2\x2c\xca\x38\xab\xb1\xf8\xc8\x43\x9f\x04\x29\xd0\x00\x21\x8a\x80\x83\xe5\x48\x1b\xf5\x8a\x92\x82\xf5\x4a\x53\x00\x1b\x22\x50\x11\x7c\x90\x4c\x69\x83\xbb\xc4\x2a\x8d\xd2\xc3\x24\x3b\x43\xe9\x1e\x87\x28\xa8\x2a\xf2\xac\x8a\xbf\xa1\xde\xbb\x95\xc4\x64\x2f\xed\x06\x1b\x6d\xff\xa5\x8a\xd6\x90\x3f\x48\x74\x93\xd5\x26\x13\xad\x84\x6c\x0a\x9a\xea\x80\xa4\x00\x28\x8f\xc9\x67\x23\xa0\x22\xdf\xff\x15\x1d\x6a\xa0\xe2\x5b\x1c\xa1\xbc\x7f\x8f\x93\x74\x52\x57\x4b\xa4\xd6\x66\x3e\xd4\x3b\xe0\x7b\xfb\xd7\x4d\xb7\xb1\x5d\xf8\x3a\xbb\xf0\x67\xeb\x60\xe5\x2d\xe6\x1f\x81\x66\xde\xd2\xd4\x2c\x58\xce\xfc\x00\x6a\xb2\xd8\xbf\xce\xc1\x16\x2b\x10\xdc\xdb\xbf\x7a\x20\x38\x4d\x72\x44\x36\x2f\x90\xcf\x36\x60\xfe\x7e\x41\xdf\x6c\x95\x0c\x0f\xcd\x1a\x64\xce\xd0\x64\xc6\xa6\xd6\x77\x8c\x39\x25\xfa\x86\xca\x0a\x19\x18\xe4\xd5\x56\x46\x75\x20\x89\x61\x1b\x09\x19\xa2\xaf\x03\x46\x42\x2f\x65\x58\x5c\xf5\xbc\x30\x2a\x3e\xa0\x82\x21\xa0\x57\x30\x2a\x28\x68\x21\x88\x44\xad\x12\xf8\xd0\xbb\xdb\x92\x35\xf5\xd3\x02\xc0\x10\x1f\x71\x20\xae\x25\xd5\x51\xf0\x00\xe5\xac\x39\xf9\x30\xe9\x0a\x59\x42\xc9\x44\xfd\x86\xc4\x20\x7d\xd7\x42\xca\xa1\x7b\x87\xc0\x03\x10\x78\x20\x02\x4f\x43\x40\x33\xbb\x89\x3c\x74\xb9\xdf\x54\x14\x3c\x0b\x9c\x09\x89\x07\x20\xf1\x0c\x48\x24\x4e\x94\x9d\x43\x34\xe9\xd3\x55\xde\x64\x44\xca\x04\x64\x60\x42\x20\x05\x48\xc7\x8c\xb2\xe8\xaa\x25\x17\xea\xc3\x2a\x81\xe8\x38\xe9\xc6\x92\x2b\xb4\x27\xca\x82\x59\x05\xd0\xf1\xb2\x44\x56\x57\x30\xf9\x95\x05\xb3\x94\x06\xcb\x46\x20\x24\x4b\x44\x0a\xfe\x28\xae\xea\x32\xde\x5f\x6a\xd4\x4b\x82\xb6\xd7\x3f\xee\x92\xad\xae\xaa\x10\x85\x23\xd1\x02\x62\x38\xdf\x97\x09\xa5\x24\x3d\x8a\x50\x16\x9f\x86\x0e\x99\xf9\x53\xc5\x26\xee\x12\x32\xa0\xd4\x65\x26\x22\x6c\xbf\xe0\x2b\x28\xf5\x2f\xf8\x12\x52\xf3\x07\x7e\x3e\x8e\x25\xaa\x0f\x67\x7d\x24\x49\xb1\x01\xa9\x56\xcb\x71\x1a\xa6\x18\xf1\xa5\xc0\x79\x26\x35\xb3\xca\x08\x9c\x63\x1d\x62\x48\x52\xb6\x69\x26\x23\x55\xa5\xd5\xe1\x35\x48\xcc\x3c\xcf\x64\xc4\xda\x2c\xeb\x30\xeb\x53\x4d\x46\x6d\x9c\x68\x32\x05\x75\x9a\x75\x04\xc0\xb9\x06\xd1\x30\xcd\xb4\x4e\x9a\x8a\x8e\x88\xf2\x84\xf5\xa4\x25\x60\xd2\x94\x0a\x25\x47\x72\x7a\xad\xc3\x4a\x53\x90\x13\xf5\x53\x5e\x73\x5d\x93\xad\xfa\xa2\x13\xb0\x29\x4a\x27\xa0\x83\xb5\x8e\xe0\xb3\xa9\x1c\xc1\x2a\xe9\x9b\x80\x13\x52\xb8\x0e\x23\xa8\x6d\x04\x9f\xaa\x6a\x02\x4a\x83\xae\x11\xac\x26\x45\x23\x38\x75\xdb\x20\x60\x35\x1a\x08\x82\xd7\x6c\x1f\xd8\x98\x2a\xa2\x97\x46\x15\x96\x3d\xc1\xab\x0b\xde\xbc\x84\x4c\x65\x90\x3e\xcc\x63\xae\xd2\xc7\x3b\xcd\x94\xbd\x77\xf5\x9b\x5b\xb6\xbf\x83\xeb\x5c\xa5\xf7\x7b\xcf\x64\xdd\xff\x21\x0e\x34\xe3\xe6\x5d\x7c\xe8\x2a\xbd\xd7\x8d\xae\xd2\xfb\x3d\x69\x8e\xe3\x2e\x67\x3a\x7d\x90\x3f\x9d\x3e\xde\xa5\x4e\xdf\xd1\xab\xae\xd2\x77\x71\xac\xf1\x74\x7b\x27\xdf\xba\x4a\xdf\xdf\xbd\xae\xd2\xf7\xf6\xb0\xd3\xf7\x70\xb2\x55\x61\xde\xeb\x67\x03\x52\xbc\xdb\xd5\xc6\xe2\x7b\x27\x6f\x3b\x7d\x2f\x87\x3b\x7d\x4f\x9f\x5b\x15\xda\xa3\xdc\x6e\x40\x78\x0f\xf3\xbc\xa1\x39\xf8\x70\xe7\x1b\x98\x84\xef\xe1\x7f\xa7\xef\xe7\x82\xe3\x1e\x3c\xd6\x0b\x4f\xdf\xc9\x11\x57\x95\xf0\x01\xbe\x38\xa0\x7f\x8f\x70\xc7\x41\xfb\xf1\x30\x8f\x3c\x7d\xa4\x53\x6e\xd9\x0d\x40\x30\xa7\xd1\xc3\xbc\xf2\x34\x7a\xbc\x57\x4e\xd9\x7b\x57\xaf\xbc\x65\xfb\x3b\x78\xe5\x69\x74\xbf\x57\x4e\xb6\x70\x3c\xc4\x2b\x67\xdc\xbc\x8b\x57\x9e\x46\xf7\x7a\xe5\x69\x74\xbf\x57\xce\x71\xdc\xe3\x95\xa7\xd1\x63\xbc\xf2\x0e\xcf\xc3\xbc\x72\x8c\xf2\xdd\xbc\xf2\x34\x7a\x17\xaf\x1c\x4f\xb7\x77\xf2\xca\xd3\xe8\xfd\xbd\xf2\x34\x7a\x67\xaf\x5c\x97\xe9\x23\xbc\x72\x55\x98\xf7\x7a\xe5\x80\x14\xef\xf6\xca\xb1\xf8\xde\xc7\x2b\x27\x63\xfa\x1e\x5e\xb9\x2e\xac\x47\x7a\xe5\xaa\xd0\x1e\xe5\x95\x03\xc2\x7b\x98\x57\x0e\xcd\xc1\x87\x7b\xe5\xc0\x24\x7c\x07\xaf\x1c\xd2\x9a\x47\x79\xe5\xb8\x07\x0f\xf5\xca\x75\x4d\x7c\x90\x57\xae\x2a\xe1\x03\xbc\x72\x40\xff\x1e\xe1\x95\x83\xf6\xe3\x51\x5e\x39\xa4\x0c\x0f\xf5\xca\xf9\xc6\x4e\xaa\x66\xa7\x87\x79\xe5\xc9\xe9\xf1\x5e\x39\x65\xef\x5d\xbd\xf2\x96\xed\xef\xe0\x95\x27\xa7\xfb\xbd\x72\xb2\x1b\xf7\x21\x5e\x39\xe3\xe6\x5d\xbc\xf2\xe4\x74\xaf\x57\x9e\x9c\xee\xf7\xca\x39\x8e\x7b\xbc\xf2\xe4\xf4\x18\xaf\xbc\xc3\xf3\x30\xaf\x1c\xa3\x7c\x37\xaf\x3c\x39\xbd\x8b\x57\x9e\x9c\xde\xcd\x2b\x4f\x4e\xef\xef\x95\x27\xa7\x77\xf6\xca\x75\x99\x3e\xc2\x2b\x57\x85\x79\xaf\x57\x0e\x48\xf1\x6e\xaf\x1c\x8b\xef\x7d\xbc\x72\x32\xa6\xef\xe1\x95\xeb\xc2\x7a\xa4\x57\xae\x0a\xed\x51\x5e\x39\x20\xbc\x87\x79\xe5\xd0\x1c\x7c\xb8\x57\x0e\x4c\xc2\x77\xf0\xca\x21\xad\x79\x94\x57\x8e\x7b\xf0\x50\xaf\x5c\xd7\xc4\x07\x79\xe5\xaa\x12\x3e\xc0\x2b\x07\xf4\xef\x11\x5e\x39\x68\x3f\x1e\xe5\x95\x43\xca\xf0\x50\xaf\xbc\x3d\xa3\x43\x50\x37\xc9\xc3\xdc\xf2\x26\x79\xbc\x5b\x4e\xd9\x7b\x57\xb7\xbc\x65\xfb\x3b\xb8\xe5\x4d\x72\xbf\x5b\x4e\x0e\x56\x3d\xc4\x2d\x67\xdc\xbc\x8b\x5b\xde\x24\xf7\xba\xe5\x4d\x72\xbf\x5b\xce\x71\xdc\xe3\x96\x37\xc9\x63\xdc\xf2\x0e\xcf\xc3\xdc\xf2\x26\x79\x47\xb7\xbc\x49\xde\xc5\x2d\xc7\xd3\xed\x9d\xdc\xf2\x26\x79\x7f\xb7\xbc\x49\xde\xd9\x2d\xd7\x65\xfa\x08\xb7\x5c\x15\xe6\xbd\x6e\x39\x20\xc5\xbb\xdd\x72\x2c\xbe\xf7\x71\xcb\xc9\x98\xbe\x87\x5b\xae\x0b\xeb\x91\x6e\xb9\x2a\xb4\x47\xb9\xe5\x80\xf0\x1e\xe6\x96\x43\x73\xf0\xe1\x6e\x39\x30\x09\xdf\xc1\x2d\x87\xb4\xe6\x51\x6e\x39\xee\xc1\x43\xdd\x72\x5d\x13\x1f\xe4\x96\xab\x4a\xf8\x00\xb7\x1c\xd0\xbf\x47\xb8\xe5\xa0\xfd\x78\x94\x5b\x0e\x29\xc3\x1d\x6e\xf9\x8c\xdc\x2a\x42\x93\xed\x74\x17\x8c\xc8\x3e\x03\x06\xa0\x89\x85\x28\x04\x79\xd6\x41\xc8\x19\x6d\x0a\xa1\x9c\xd0\xb6\xed\x5e\xc7\x2d\xab\xb4\x9f\x81\x2a\x1d\xc2\x03\x4f\xa7\x02\xb2\x61\xdd\xaf\x83\x5b\xa7\x51\x3f\x1f\x69\x34\x84\x0f\x9e\x0b\x64\x28\x1f\xdd\x17\x0a\x22\x8d\x53\x3f\x1f\xc9\x69\x08\x1f\x3c\x91\xc5\x50\x3e\x84\x98\x0c\x37\x6f\x92\x7e\x46\x70\x64\xd4\xcf\x08\xcf\xc2\x00\x33\x32\xbb\x54\x24\xb3\x59\x82\x0e\xb5\x13\x62\x6f\x9d\xa5\x6c\x15\xca\xb7\xa1\x78\xd2\x7d\x47\x6e\x7f\x37\x57\x1b\x6b\x14\x5a\x17\x21\xf5\xb3\xd4\x46\xb6\x7d\x3a\x35\xb5\xbe\xb2\x55\x9b\xab\x64\x76\xc8\x10\x41\xec\xc8\x03\xa6\xb3\xa3\xd5\x57\xb6\x6a\x73\xd5\xdb\x8c\x1f\xaf\xa7\x43\xd3\x1e\xb6\x57\xb9\x6e\xc1\xe8\x29\xfc\xab\x72\x2a\x5f\x04\xe5\x47\xdc\xb1\x75\xaf\xe3\x43\x77\xe4\x9d\xfe\x06\x41\x79\x42\x00\x3d\x45\x00\x08\xce\x0f\xcf\xeb\xc7\xe9\x41\xf0\x63\xdc\xa0\xa8\x83\x25\x3f\x0d\x1c\xc7\x87\xaf\xaf\x1d\x24\x17\x0d\x2d\x17\x46\x54\xe8\x93\x5c\xf3\x36\x23\xd8\xe9\x15\xe7\x12\x41\x76\xd0\x9f\xe7\xfc\xd7\x6e\xf6\x9d\xbb\xbc\x2d\xbf\xc4\x5a\x6e\xde\x7b\x59\x00\xc6\xf0\xcf\xd5\xa5\xc0\x9c\x54\x93\x1f\x7e\x30\xf4\xe2\x79\x92\x97\x93\x1f\x94\x0e\x3c\x3f\x5f\x67\xf4\x49\xe6\x5c\x6e\xaa\x76\x9b\x75\xa9\xe3\xc0\x77\xdf\xde\x66\x55\xe9\xe4\x59\xf2\x0a\xa4\x3a\x60\x36\xa7\xcb\xf7\xef\x09\x17\x2c\xf3\xfb\x08\xb6\x0e\x2e\x55\xf4\x6b\x47\x32\xf6\x97\xe8\x50\xb3\xcb\xdd\xdc\x67\xe5\xae\xdd\x97\x32\x2c\x84\xf4\x08\x8c\x09\x87\xe4\xf4\x0c\xf7\x09\xda\xd2\x74\xf8\x53\xa0\x86\x3c\xa9\x6a\xca\x98\x25\x17\x15\x30\x6e\xc9\x73\xcb\x18\xb9\x49\x2b\x41\x94\x33\x7a\x9f\x81\x76\xf9\xef\xdb\x8c\x5e\x2c\x4c\xf3\x0a\x36\xfc\x9a\x61\x77\x32\xf3\xd8\x75\xd2\xf4\x8f\x78\x6b\x9d\xbb\x0a\x9e\x45\x7d\xa2\x6d\x94\xe6\xa4\x95\xa7\x36\xf5\xa0\x96\x34\xef\x9d\xd0\x98\x34\x9b\x6b\x6d\x41\xb2\xd4\x42\x09\xcd\x55\xf3\xf1\xe2\xf8\x01\x4b\xe6\xed\x07\x1f\xe5\x9a\xc0\x65\x35\x4a\xea\xbc\x17\x67\xc5\xdb\xac\xd4\x36\x9e\xcb\x1b\x79\xae\xda\x8a\x58\xa8\x4e\x2c\x62\xe5\x19\xb3\xc1\x33\xa4\xcb\x38\xcf\x98\x0f\x56\xa5\x30\x72\xc6\x8c\xb0\xaa\x95\xda\x0a\x73\x22\xa4\xde\x90\x2b\x09\x2b\x82\x5a\x88\xb5\x29\xed\x45\x77\x31\xb7\xda\x3c\x3d\xb7\x00\x06\x02\xf8\x05\xfd\x8d\xa1\xe9\xde\xd5\xae\xfb\xed\x45\x83\x3a\xb7\x50\x1d\xae\x6f\x92\xf7\xff\x4d\x19\x55\x19\xc9\x37\xb5\xa7\x72\xe3\xd4\x71\xaf\xfc\x22\x67\xa9\xbc\x76\xdc\xe9\x2c\x7d\x6d\xab\xf5\x4c\xab\x69\x49\x40\x9a\x0e\x04\xc8\xb2\x9a\xee\x55\x3c\x50\x82\xd5\x34\x51\x51\xe9\xd9\x55\x53\xc7\xe3\x9c\xea\x39\x20\xd3\xda\xf1\x08\x19\x4f\xba\x03\x56\x87\x2b\x09\x5c\xd3\xc1\xb1\xdb\x36\x75\xc8\xbd\x8a\x91\x5f\x10\xad\x83\x26\x2a\x52\x7a\x09\xb1\x0e\xe8\xf8\x6d\x17\x80\x1e\xf8\x84\x9e\xaf\xdd\x62\xab\x74\xc0\x27\xb4\x7c\xe0\xba\x50\x85\x7f\x05\x9f\x78\xc1\xb5\xc2\xbe\x82\xb2\xbb\x43\x59\xe6\x7e\xce\xb9\xf7\x74\xe6\xe7\x84\xd8\x5c\x64\xde\xd3\x79\x9f\x13\x42\x73\x99\x77\x4f\x67\x5d\xc1\xc6\xf3\x0d\xeb\x9c\x2b\x08\x69\x86\x61\x8d\xf1\x45\xcb\x38\x34\xee\x0b\x42\x6c\x21\xb1\x0e\x0d\xfc\x82\xd0\x5a\x28\xcc\x43\x23\xaf\x60\xe4\xec\x43\x43\xaf\x20\xa5\x1d\x00\xc6\x3e\xe0\x5d\x98\xeb\x1d\x08\x08\xb9\x40\xec\xc0\x5c\x67\x3f\x20\x94\x02\x99\xfd\xb9\xce\xbc\x82\x8d\x31\x3f\xd7\x59\x57\x10\xd2\x0b\x7c\x14\xb0\xc2\x71\xdb\xfb\x40\xa5\xe9\x5c\x10\x03\x53\xbc\x76\xf5\xba\x85\x29\x88\x85\x29\x1a\x01\x06\x30\x31\xc5\x5e\xc3\x04\xd9\x98\x22\xd1\x90\xe9\x46\xa6\x70\xbc\xee\xfa\x52\x6d\xfe\x16\xc4\xca\x14\xaf\x1d\x90\xc1\xcc\x14\xc4\xcc\x14\x8d\x00\x68\xb2\x33\xc5\x5e\xc3\x69\x34\x34\x45\xa2\xa1\x35\x58\x9a\xc2\xf1\xe5\x6b\x58\x95\x6e\xf8\x84\xa4\x2f\x77\x03\xe8\x85\x4f\xc8\xf9\x6a\x2f\x80\x4e\xa8\x18\x4d\xd6\xa6\x48\x34\xa4\xb0\xb9\x29\x9c\x79\xdb\x05\x4f\xef\xc1\x9c\xd0\x9b\xcb\x09\xa7\xf4\x0e\xcc\x09\xad\xb9\xd2\x01\x4f\xe7\x5f\xc5\x67\x30\x39\x45\xa2\xa1\x04\x6d\x4e\xe1\x2c\x3a\xee\x21\x09\x2c\x08\xbd\x85\xcc\x3f\x24\x82\x05\x21\xb7\x50\x7b\x00\xc9\x40\xc5\x69\xb4\x3b\x45\xa2\xa1\x35\x18\x9e\xc2\x09\xda\x7e\xcc\xf5\x5e\x04\x84\x62\x20\xf5\x62\xae\xf7\x21\x20\xc4\x02\xa5\x0f\x73\xbd\x07\x2a\x3e\x83\xf1\x29\x12\x0d\x25\x68\x7d\x52\x27\x6b\x9d\x06\x07\xf4\x1a\x32\xfa\x92\xcf\x24\xbf\xc1\x01\x1d\x87\x8c\xbe\xe4\x33\xc5\x75\x70\x40\xdf\x41\xc3\xcb\x7a\xe2\x80\xee\x83\x86\x9a\x5d\x3b\x0e\x78\x10\x99\xdf\x75\x08\xea\x0f\x7d\xe9\x67\xbe\xdc\x1f\xa8\x3b\xf4\xa5\x9f\xf9\x6a\x77\xa0\xde\xa8\x58\xdb\xde\x40\x9d\x51\x11\x0b\x77\xa8\x2b\x7d\x69\x1d\x0a\x07\xf0\x28\x32\xea\x04\x64\x92\x4f\xe1\x00\x4e\x45\x46\x9d\x80\x4c\x71\x2b\x1c\xc0\xaf\xd0\x70\xf2\x8e\x00\xae\x85\x86\x96\xf6\x43\xf7\x2e\xb2\x45\xd7\x0d\x50\x26\xd4\x1d\xc8\x16\x72\x47\x40\xa1\x50\x77\x20\x5b\xa8\x5d\x01\xa5\xa2\xe2\x6d\x3b\x03\x8a\x45\x45\xcd\xba\x03\xc9\xa5\x75\x36\x1c\xc0\xdb\xc8\xa8\x83\x90\x49\xfe\x86\x03\x38\x1c\x19\x75\x10\x32\xc5\xe5\x70\x00\x9f\x43\xc3\xc9\xbb\x02\xb8\x1d\x1a\x5a\xda\x11\x7d\xee\x93\x20\x8e\x75\x44\x0b\xe2\xe8\x5a\x21\xa1\x2a\xc0\x91\xbe\x68\xb0\x25\x87\x6d\x24\xd8\x12\x0e\x0f\xf7\x30\x66\xd6\x23\x0d\x3c\x81\x91\x93\x4e\x29\xc0\xe6\x75\xf7\xd4\xa9\x2c\x91\x1c\xae\x23\xfc\x08\x40\x60\x3c\xc7\x00\x1b\x09\x10\x8e\xea\x40\x9c\x86\xd8\x0e\x44\x0b\x45\x78\x55\x5f\x90\x87\x01\x38\xd5\xfe\x50\x8f\x41\x37\x12\xb4\x25\xe0\x03\xb1\xdb\xc2\x3e\x90\x80\x31\xf8\xab\x7a\xe2\x3f\x5c\xcf\xc9\xf7\x46\x81\x0c\xb8\x91\x80\xcd\xb1\x20\x88\xdb\x12\x11\x82\xe8\x4d\x71\x61\x65\x0f\x0d\x71\x35\xa7\xdd\x17\x20\x32\xd8\x46\x82\x35\x86\x89\x20\x66\x73\xb0\x08\x22\x37\x84\x8c\x55\x5f\xd4\x88\x01\x38\xed\xfe\xd8\x91\x41\x37\x12\xb4\x25\x82\x04\xb1\xdb\xe2\x48\x90\x80\x31\x9a\xac\xec\x01\x25\xae\xe6\xd4\xfb\xc2\x4a\x06\xdb\x48\xb0\xc6\xe0\x12\xc4\x6c\x0e\x31\x41\xe4\x86\x40\x93\x18\x17\x53\xac\x49\x4d\x50\xf1\x2a\x41\x81\x11\x27\x83\x6c\x64\x48\x38\xee\x84\xb1\x1a\xa2\x4f\x18\x31\x14\x83\x12\x6b\x62\x0d\x43\xa9\xe1\x29\x5e\x25\x50\x73\x30\xca\xc0\x1b\x19\xdc\x12\x92\xc2\xf8\x6d\x81\x29\x4c\xc2\x18\x9e\x12\xb3\x62\x8b\x50\xa9\x01\x2a\x5e\x25\x48\x63\x9c\xca\xa0\x1b\x19\xda\x1c\xad\xc2\xd8\x2d\x31\x2b\x4c\xc0\x14\xb9\x12\xfb\x62\x09\x5e\xa9\x21\x2a\x5e\x25\x40\x53\x08\xcb\x80\x1b\x19\xd8\x18\xc8\xc2\xb8\xcd\xe1\x2c\x8c\xde\x10\xd4\x12\xe3\x62\x8d\x6b\xa9\x1d\x2a\x5e\x25\x50\x73\x74\xcb\xc0\x1b\x19\xdc\x12\xe3\xc2\xf8\x6d\x91\x2e\x4c\xc2\x18\xef\x12\x4b\x63\x09\x79\xa9\x49\x2a\x5e\x25\x40\x53\xe0\xcb\x80\x1b\x19\xd8\x18\xfe\xc2\xb8\xcd\x41\x30\x8c\xde\x10\x0a\x57\xfd\xd1\x30\x01\xe1\xe6\x79\x48\x4c\xcc\x1b\x34\x72\x03\x5b\x64\x6c\xa0\x61\x8d\x8f\x0d\x64\xcc\x51\x72\xd5\x1b\x28\x13\x88\x96\x8d\xfe\x70\x99\xc3\x37\x32\xbc\x25\x68\x36\x50\xb0\x85\xce\x06\x22\xc6\x00\xba\xea\x8b\xa1\x09\x40\xcb\x43\x6f\x24\xcd\xc1\x1b\x19\xdc\x1c\x4f\x1b\xf0\x5b\xa2\x6a\x03\x09\x53\x6c\x5d\xf5\x87\xd7\x04\xa4\xe5\x61\x40\x90\xcd\x1b\x34\x72\x03\x5b\xa8\x6d\xa0\x61\x0d\xb8\x0d\x64\xcc\x61\x77\xd5\x17\x79\x13\x80\x96\x8b\xde\xf8\x9b\x83\x37\x32\xb8\x39\x0a\x37\xe0\xb7\xc4\xe2\x06\x12\xa6\x88\xbc\xea\x0d\xca\x19\x04\x67\x62\x40\x68\xde\xb5\x68\xd4\x16\xc6\x00\xdd\x42\xc5\x1c\xa6\x5b\x08\x41\xc1\xba\x65\x77\x5a\xea\xa4\x91\x39\x5a\xc7\x75\x84\x33\x01\x08\x8c\xd6\x19\x60\x23\x01\xc2\xd1\x3a\x88\xd3\x10\xad\x83\x68\xa1\x68\x3d\x8d\x7a\xa2\x75\x0c\xc0\xa9\xf6\x47\xeb\x0c\xba\x91\xa0\x2d\xd1\x3a\x88\xdd\x16\xad\x83\x04\x8c\xd1\x7a\x1a\xd9\xa3\x75\x5c\xcf\xc9\xf7\x46\xeb\x0c\xb8\x91\x80\xcd\xd1\x3a\x88\xdb\x12\xad\x83\xe8\x4d\xd1\x7a\x1a\x59\xa3\x75\x5c\xcd\x69\xf7\x45\xeb\x0c\xb6\x91\x60\x8d\xd1\x3a\x88\xd9\x1c\xad\x83\xc8\x0d\xd1\x7a\x1a\xf5\x44\xeb\x18\x80\xd3\xee\x8f\xd6\x19\x74\x23\x41\x5b\xa2\x75\x10\xbb\x2d\x5a\x07\x09\x18\xa3\xf5\x34\xb2\x46\xeb\xb8\x9a\x53\xef\x8b\xd6\x19\x6c\x23\xc1\x1a\xa3\x75\x10\xb3\x39\x5a\x07\x91\x1b\xa2\x75\x62\x5c\x4c\xd1\x3a\x35\x41\xc5\xab\x04\x05\x46\xeb\x0c\xb2\x91\x21\xe1\x68\x1d\xc6\x6a\x88\xd6\x61\xc4\x50\xb4\x4e\xac\x89\x35\x5a\xa7\x86\xa7\x78\x95\x40\xcd\xd1\x3a\x03\x6f\x64\x70\x4b\xb4\x0e\xe3\xb7\x45\xeb\x30\x09\x63\xb4\x4e\xcc\x8a\x2d\x5a\xa7\x06\xa8\x78\x95\x20\x8d\xd1\x3a\x83\x6e\x64\x68\x73\xb4\x0e\x63\xb7\x44\xeb\x30\x01\x53\xb4\x4e\xec\x8b\x25\x5a\xa7\x86\xa8\x78\x95\x00\x4d\xd1\x3a\x03\x6e\x64\x60\x63\xb4\x0e\xe3\x36\x47\xeb\x30\x7a\x43\xb4\x4e\x8c\x8b\x35\x5a\xa7\x76\xa8\x78\x95\x40\xcd\xd1\x3a\x03\x6f\x64\x70\x4b\xb4\x0e\xe3\xb7\x45\xeb\x30\x09\x63\xb4\x4e\x2c\x8d\x25\x5a\xa7\x26\xa9\x78\x95\x00\x4d\xd1\x3a\x03\x6e\x64\x60\x63\xb4\x0e\xe3\x36\x47\xeb\x30\x7a\x43\xb4\x9e\x46\xbd\xd1\x3a\x01\xe1\xe6\x79\x48\xb4\xce\x1b\x34\x72\x03\x5b\xb4\x6e\xa0\x61\x8d\xd6\x0d\x64\xcc\xd1\x3a\x06\xb3\x47\xeb\x04\xa2\x65\xa3\x3f\x5a\xe7\xf0\x8d\x0c\x6f\x89\xd6\x0d\x14\x6c\xd1\xba\x81\x88\x31\x5a\xc7\x50\xd6\x68\x9d\x00\xb4\x3c\xf4\x46\xeb\x1c\xbc\x91\xc1\xcd\xd1\xba\x01\xbf\x25\x5a\x37\x90\x30\x45\xeb\x18\xa8\x27\x5a\x27\x20\x2d\x0f\x03\xa2\x75\xde\xa0\x91\x1b\xd8\xa2\x75\x03\x0d\x6b\xb4\x6e\x20\x63\x8e\xd6\x31\x98\x35\x5a\x27\x00\x2d\x17\xbd\xd1\x3a\x07\x6f\x64\x70\x73\xb4\x6e\xc0\x6f\x89\xd6\x0d\x24\x4c\xd1\x3a\x4f\xbc\x67\x8e\xd6\x19\x04\x67\x62\x40\xb4\xde\xb5\x68\xd4\x16\xc6\x68\xdd\x42\xc5\x1c\xad\x5b\x08\x0d\x8c\xd6\xf9\x19\xae\xd4\x49\x4e\xe6\x68\x1d\xd7\x11\xce\x04\x20\x30\x5a\x67\x80\x8d\x04\x08\x47\xeb\x20\x4e\x43\xb4\x0e\xa2\x85\xa2\xf5\xe4\xd4\x13\xad\x63\x00\x4e\xb5\x3f\x5a\x67\xd0\x8d\x04\x6d\x89\xd6\x41\xec\xb6\x68\x1d\x24\x60\x8c\xd6\x93\x93\x3d\x5a\xc7\xf5\x9c\x7c\x6f\xb4\xce\x80\x1b\x09\xd8\x1c\xad\x83\xb8\x2d\xd1\x3a\x88\xde\x14\xad\x27\x27\x6b\xb4\x8e\xab\x39\xed\xbe\x68\x9d\xc1\x36\x12\xac\x31\x5a\x07\x31\x9b\xa3\x75\x10\xb9\x21\x5a\x4f\x4e\x3d\xd1\x3a\x06\xe0\xb4\xfb\xa3\x75\x06\xdd\x48\xd0\x96\x68\x1d\xc4\x6e\x8b\xd6\x41\x02\xc6\x68\x3d\x39\x59\xa3\x75\x5c\xcd\xa9\xf7\x45\xeb\x0c\xb6\x91\x60\x8d\xd1\x3a\x88\xd9\x1c\xad\x83\xc8\x0d\xd1\x3a\x31\x2e\xa6\x68\x9d\x9a\xa0\xe2\x55\x82\x02\xa3\x75\x06\xd9\xc8\x90\x70\xb4\x0e\x63\x35\x44\xeb\x30\x62\x28\x5a\x27\xd6\xc4\x1a\xad\x53\xc3\x53\xbc\x4a\xa0\xe6\x68\x9d\x81\x37\x32\xb8\x25\x5a\x87\xf1\xdb\xa2\x75\x98\x84\x31\x5a\x27\x66\xc5\x16\xad\x53\x03\x54\xbc\x4a\x90\xc6\x68\x9d\x41\x37\x32\xb4\x39\x5a\x87\xb1\x5b\xa2\x75\x98\x80\x29\x5a\x27\xf6\xc5\x12\xad\x53\x43\x54\xbc\x4a\x80\xa6\x68\x9d\x01\x37\x32\xb0\x31\x5a\x87\x71\x9b\xa3\x75\x18\xbd\x21\x5a\x27\xc6\xc5\x1a\xad\x53\x3b\x54\xbc\x4a\xa0\xe6\x68\x9d\x81\x37\x32\xb8\x25\x5a\x87\xf1\xdb\xa2\x75\x98\x84\x31\x5a\x27\x96\xc6\x12\xad\x53\x93\x54\xbc\x4a\x80\xa6\x68\x9d\x01\x37\x32\xb0\x31\x5a\x87\x71\x9b\xa3\x75\x18\xbd\x21\x5a\x4f\x4e\xbd\xd1\x3a\x01\xe1\xe6\x79\x48\xb4\xce\x1b\x34\x72\x03\x5b\xb4\x6e\xa0\x61\x8d\xd6\x0d\x64\xcc\xd1\x3a\x06\xb3\x47\xeb\x04\xa2\x65\xa3\x3f\x5a\xe7\xf0\x8d\x0c\x6f\x89\xd6\x0d\x14\x6c\xd1\xba\x81\x88\x31\x5a\xc7\x50\xd6\x68\x9d\x00\xb4\x3c\xf4\x46\xeb\x1c\xbc\x91\xc1\xcd\xd1\xba\x01\xbf\x25\x5a\x37\x90\x30\x45\xeb\x18\xa8\x27\x5a\x27\x20\x2d\x0f\x03\xa2\x75\xde\xa0\x91\x1b\xd8\xa2\x75\x03\x0d\x6b\xb4\x6e\x20\x63\x8e\xd6\x31\x98\x35\x5a\x27\x00\x2d\x17\xbd\xd1\x3a\x07\x6f\x64\x70\x73\xb4\x6e\xc0\x6f\x89\xd6\x0d\x24\x4c\xd1\x3a\x4f\xc8\x69\x8e\xd6\x19\x04\x67\x62\x40\xb4\xde\xb5\x68\xd4\x16\xc6\x68\xdd\x42\xc5\x1c\xad\x5b\x08\x0d\x8c\xd6\xdb\x4c\x27\xa9\xd3\x24\xe6\x70\xbd\x49\x58\x68\x2d\x00\x81\xe1\x7a\xc3\x8f\x24\x8b\x80\x70\xb8\x0e\xe2\x34\x84\xeb\x20\x5a\x28\x5c\x6f\x92\x9e\x70\xbd\x49\x58\x40\x2d\x40\x9a\xc3\xf5\x86\x9f\x51\x16\xa1\x2d\xe1\x3a\x88\xdd\x16\xae\x83\x04\x8c\xe1\x7a\x93\xd8\xc3\xf5\x26\x61\x21\xb5\x00\x68\x0c\xd7\x1b\x7e\x80\x59\x04\x36\x87\xeb\x20\x6e\x4b\xb8\x0e\xa2\x37\x85\xeb\x4d\x62\x0d\xd7\x9b\x84\x05\xd5\x02\x9c\x29\x5c\x6f\xf8\xe9\x66\x11\xd6\x18\xae\x83\x98\xcd\xe1\x3a\x88\xdc\x10\xae\x37\x49\x4f\xb8\xde\x24\x2c\xa0\x16\x20\xcd\xe1\x7a\xc3\x0f\x3d\x8b\xd0\x96\x70\x1d\xc4\x6e\x0b\xd7\x41\x02\xc6\x70\xbd\x49\xac\xe1\x7a\x93\xb0\xa0\x5a\x80\x33\x85\xeb\x0d\x3f\x13\x2d\xc2\x1a\xc3\x75\x10\xb3\x39\x5c\x07\x91\x1b\xc2\x75\x62\x5c\x4c\xe1\x3a\x35\x41\xc5\xab\x04\x05\x86\xeb\x0d\x3f\x32\x2d\x41\xc2\xe1\x3a\x8c\xd5\x10\xae\xc3\x88\xa1\x70\x9d\x58\x13\x6b\xb8\x4e\x0d\x4f\xf1\x2a\x81\x9a\xc3\xf5\x86\x9f\xa1\x96\xc0\x2d\xe1\x3a\x8c\xdf\x16\xae\xc3\x24\x8c\xe1\x3a\x31\x2b\xb6\x70\x9d\x1a\xa0\xe2\x55\x82\x34\x86\xeb\x0d\x3f\x60\x2d\x41\x9b\xc3\x75\x18\xbb\x25\x5c\x87\x09\x98\xc2\x75\x62\x5f\x2c\xe1\x3a\x35\x44\xc5\xab\x04\x68\x0a\xd7\x1b\x7e\xfa\x5a\x02\x36\x86\xeb\x30\x6e\x73\xb8\x0e\xa3\x37\x84\xeb\xc4\xb8\x58\xc3\x75\x6a\x87\x8a\x57\x09\xd4\x1c\xae\x37\xfc\x50\xb6\x04\x6e\x09\xd7\x61\xfc\xb6\x70\x1d\x26\x61\x0c\xd7\x89\xa5\xb1\x84\xeb\xd4\x24\x15\xaf\x12\xa0\x29\x5c\x6f\xf8\x99\x6d\x09\xd8\x18\xae\xc3\xb8\xcd\xe1\x3a\x8c\xde\x10\xae\x37\x49\x6f\xb8\xde\x24\x3c\x94\x16\x81\x2d\xe1\x7a\xd3\x1e\xe3\x96\x1a\xd8\xc2\x75\x03\x0d\x6b\xb8\x6e\x20\x63\x0e\xd7\x31\x98\x3d\x5c\x6f\x12\x1e\x4c\x8b\xb0\xe6\x70\xbd\x69\xcf\x78\x4b\xf0\x96\x70\xdd\x40\xc1\x16\xae\x1b\x88\x18\xc3\x75\x0c\x65\x0d\xd7\x9b\x84\x87\xd3\x22\xa8\x31\x5c\x6f\xda\x03\xe0\x12\xb8\x39\x5c\x37\xe0\xb7\x84\xeb\x06\x12\xa6\x70\x1d\x03\xf5\x84\xeb\x4d\xc2\x43\x69\x11\xd8\x12\xae\x37\xed\xb9\x70\xa9\x81\x2d\x5c\x37\xd0\xb0\x86\xeb\x06\x32\xe6\x70\x1d\x83\x59\xc3\xf5\x26\xe1\xe1\xb4\x08\x6a\x0c\xd7\x9b\xf6\xd8\xb8\x04\x6e\x0e\xd7\x0d\xf8\x2d\xe1\xba\x81\x84\x29\x5c\xe7\x89\x7a\xcd\xe1\x7a\x93\x74\x81\xb4\x0c\x6d\x0a\xd7\x1b\xe1\x2c\xb9\xd2\xc2\x18\xae\x5b\xa8\x98\xc3\x75\x0b\x21\x30\x5c\x9f\xb1\x4c\xb5\x28\x72\x92\x38\xfb\xba\xdd\x86\xc7\x1a\x95\x40\x06\x41\x39\x87\xa2\x31\x15\xe2\xae\xc8\xe3\xac\x46\xa5\x83\xbe\xa1\xac\xae\x68\x7a\x3e\x9e\x20\xf9\xe9\x69\xb7\x0f\x0f\x5f\x4f\x24\x0b\xb3\x73\xc8\x93\xbc\xdc\x0a\x99\xf0\xdc\xe7\xb7\x59\x8d\x9a\xda\x49\xf3\x2c\x27\xc9\xfc\xae\xc7\x3c\xab\x9d\x63\x98\xc6\xc9\xeb\xf6\x2f\xff\xf6\x6b\x9e\xe5\xce\x7f\xa0\xd3\x25\x09\xcb\xe9\xaf\x28\x4b\xf2\xe9\xaf\x79\x16\x1e\xf2\xe9\x9f\xf2\xac\xca\x93\xb0\x9a\x3e\xfd\x12\xef\x51\x19\x62\xde\x27\x18\xfc\x69\xfa\xf4\xa7\xfc\x52\xc6\xa8\x9c\xfc\x19\xbd\x3c\x4d\x5b\xd4\xe2\xb8\x11\xa2\x2c\x51\xf5\x95\xfc\xa0\x29\x7e\xb5\xdc\xd5\x0c\x94\x5c\xc5\xa0\xe7\x1c\xd4\xe0\xd8\xa5\x0d\x7a\xba\x44\x0d\xb2\x2e\x2f\xd9\x21\xac\x91\x9a\xdd\x73\x47\x6a\xdb\x42\x94\x24\x71\x51\xc5\x15\x90\x81\x91\x21\x22\x49\x64\x85\x2e\xa8\x99\x64\x49\x15\xcd\x22\x2b\x40\x69\xa9\x64\x49\x1d\xcb\xd8\x2c\xc0\x69\xc9\x98\xcd\x79\x0f\x48\x2b\x9e\x6e\xb8\x8f\xa1\x36\xe5\x70\x2f\x4f\xdd\x5d\xe8\x36\xb6\x2c\x27\x3c\xa8\x82\x45\xc3\xf8\x6a\x53\x10\xf7\xf2\xd5\xdd\x06\x39\x92\x2f\xbe\x97\x85\x4a\xef\x34\x8c\xaf\x36\x25\x71\x2f\x5f\xdd\x7d\x38\x23\xf9\x6a\x57\xed\x48\x3b\x9e\x9e\xb8\x8f\xb1\x36\x45\x71\x2f\x63\x5d\x46\x70\x2b\x63\xac\x17\xf9\x0b\x2a\x0f\x61\x85\xae\x6c\xb6\x84\x59\x75\xcc\xcb\x74\xdb\x56\x68\xf8\x2f\x45\x01\x37\x69\x2b\x74\x7d\x0f\x8b\xb8\x0e\x93\xf8\x77\xad\x4d\x57\x23\xe5\x9b\xc5\xc6\xe9\x85\xa4\x6f\x74\x12\x9a\x98\xb9\x2b\xd9\xce\x5d\xd7\x0a\x8c\x4a\x09\x9c\x95\x99\x9a\x50\x0b\x23\xb5\x58\x98\x09\xec\xf3\x24\x92\x60\x57\x76\x58\x85\x17\x5a\xa4\x35\x20\x43\x70\xa0\x90\x55\xfd\x9a\xa0\x2d\x2d\xd1\xed\x23\xb6\x4e\x57\x6a\xdf\x3f\x1c\x8f\x47\x0d\xa0\x28\xe3\x34\x2c\x5f\x39\x88\xeb\xae\xf6\x12\x54\x28\x81\xd1\x34\xb1\x53\xa5\xf0\x8c\xad\x62\x87\x21\x58\xee\xe7\xba\xb5\x40\x87\x3c\x8b\x04\x4a\xcb\xc3\x2a\x58\x45\x3a\xa5\x16\x50\xa6\xd5\x15\x4b\xd4\x16\x9b\xc5\x31\x58\xe8\xd4\x2e\x87\x03\xaa\x2a\x0e\xe5\xaf\xc3\xd5\x22\x00\x68\x51\x30\x85\x12\x2b\x94\xe8\x78\x9b\xe5\xc6\xd7\x87\x37\xce\x8e\x79\x0b\xb2\x0a\xfd\xfd\x5a\x27\x82\x61\x64\x0a\xa4\x44\x1e\xb4\xe3\x72\xb9\xd2\xbb\xf1\x12\x96\x59\x9c\x9d\x3a\xf9\x1d\x3c\x77\xa5\x53\x60\x60\x32\x11\x5e\x28\xd1\xd9\x87\xeb\xbd\xac\x7f\x04\x36\x0a\xb3\x53\x07\x14\x1d\xe6\x01\x34\x5a\x14\x4a\xa6\xc2\xca\x24\x22\xe1\xca\x8b\xfc\x50\xb7\x7f\x64\x5e\xf2\xae\xac\x8f\x9b\x63\xa8\xd3\x20\x40\x32\x09\x5a\x24\x51\x38\xec\xa3\x79\x14\x02\xdd\x28\xbf\x72\x90\xf9\x62\x1e\x2e\x5c\xa8\x13\xe5\x57\xb5\x0b\xe5\x57\x45\xd8\xbe\xb7\xf0\x96\x1a\xfa\x7d\x1e\xb5\xda\xeb\x7b\x7e\xe0\x6f\xf4\x77\xcf\xa5\x46\x91\x51\xc3\x19\x9a\x24\x3c\x7c\x75\x02\xf7\xaa\x79\x5d\x33\x39\xfb\x70\x37\x81\x15\x68\x3f\x08\xa6\xfc\x7f\x50\x9b\x73\x1c\x51\x7f\x6d\xeb\x7e\x76\x27\xe1\x8e\x36\x25\x36\xb4\x08\x4b\x94\xd5\xd4\x97\x11\xb2\x19\xeb\xce\xa0\x08\xdd\x65\x94\xa6\x03\x86\x0e\x39\xf5\xeb\x68\x66\x64\xa5\x50\x4b\x8f\x4c\x7b\x5d\xa2\xf0\xeb\xf5\x25\x2f\x23\xfa\xb8\x25\xff\x3a\xb8\x40\x48\x29\x4e\xea\xc9\xfd\x56\x50\x35\xf7\x99\x50\x85\xb8\x22\xc5\xd9\x19\x95\xb1\xf4\x4e\x63\x39\xa9\xaf\xe4\x6f\x9c\xc4\xf5\x2b\x4f\x53\x2d\x42\xc5\x19\x00\xa7\xe5\x71\x67\x2f\xe3\xa2\x8c\xb3\xfa\xfa\x87\x29\xf3\xc9\xa7\xdb\xed\x1e\x1d\xf3\x92\x75\x1d\xcc\x0a\xbd\x33\xe7\x8b\x0e\xb7\x59\x5e\xff\x30\xdb\xd7\xd9\xb3\x36\x76\x97\x2c\x42\x65\x12\x67\xe8\x2d\xdc\xef\xcb\xdf\xea\xb8\x4e\xd0\x17\x1e\x0a\xb4\xce\xfb\xe4\x87\xa7\x49\x58\xd7\xe5\x0f\xa4\xfe\x79\xf2\xf4\xfc\xf4\x56\x94\x48\x72\x6f\x8b\x12\x39\x8a\x83\xbb\x4f\xf2\xc3\xd7\xff\x7b\xc9\x6b\x34\xc5\xd0\x4c\xac\x5e\xd1\x4c\xaa\x3c\x89\xa3\xc9\x87\x30\xda\x07\xfb\x68\x57\x84\x27\x44\xa5\xe4\xc4\x59\x15\x47\x68\x1b\x7e\xcb\xe3\xe8\x2d\x4e\x4f\xd3\xba\xbc\x9a\xaa\xcf\xfe\xf4\x3c\x9f\x16\xd7\xbc\x2c\xce\x61\x56\x6d\xe7\xbb\x97\x38\xca\x5f\xaa\xed\x9c\x56\x89\x0d\x49\x87\x58\xbb\x7f\xc6\xe5\xd7\x2a\xfe\x1d\x6d\xc3\xf9\x1b\x99\x65\x8a\x53\x26\x0a\x0e\x0f\x42\x18\x67\xa8\xb4\x01\x65\xe1\xb7\x7d\x58\x5e\xa3\xb8\x2a\x92\xf0\x95\x08\xe0\x6d\xb6\x0f\xa3\x13\xd4\x6b\xd7\xc5\x9a\x1d\x62\x5d\xa0\x95\x78\x0a\x24\x61\x51\xa1\x2d\x7f\x90\x74\x10\x43\x4e\xea\x68\xca\x9f\xce\x57\x6d\xf6\x68\xaf\x5a\x0c\xe9\x50\xec\x28\xea\x1a\x0b\x45\x67\x80\xb3\x08\x21\x1f\x2d\x75\x44\x82\xa1\x63\x13\x40\xac\x99\xd4\x78\x0c\x7f\x24\xff\x4e\xa5\xf2\x48\xfe\x79\x56\x7e\xa2\x50\xe0\x83\xf7\x84\xf2\xc0\xbb\x3d\x23\x50\xbc\x81\xcc\xc3\x0e\x6c\xf8\xf6\xdf\x3e\xff\xe1\xc3\xa4\xca\x2f\xe5\x01\xfd\x1a\x16\x45\x9c\x9d\xfe\xe7\x7f\xfc\xf2\xd3\x3e\xcf\xeb\xaa\x2e\xc3\x62\x96\xc6\xd9\xec\x50\x55\xb3\x34\x2c\x26\x7f\xf8\xfc\xff\x05\x00\x00\xff\xff\x81\x0f\x8e\xc4\xd8\x79\x02\x00"), }, - "/static/lib/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css.map": &vfsgen۰CompressedFileInfo{ + "/static/lib/bootstrap-4.6.2-dist/css/bootstrap.min.css.map": &vfsgen۰CompressedFileInfo{ name: "bootstrap.min.css.map", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), - uncompressedSize: 68044, + uncompressedSize: 654593, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x7d\x59\x77\xdb\xba\xce\xe8\x7f\xe9\x6b\xb4\x77\x9d\xb1\xe9\xb9\x4f\x04\x45\x39\x92\x22\x3b\xaa\xea\x7a\xbb\x77\x7d\x6b\x2f\xd5\x51\x15\xc5\x53\x6c\xc7\x71\x9c\xbb\xee\x7f\xff\x16\x67\x8a\xa6\x1d\x27\x4d\x77\x7b\xce\x71\x1e\x1c\x89\x04\x07\x80\x20\xc0\x01\x80\xfe\xdf\xbb\x87\x62\x36\xaf\x26\xe3\x77\xff\x3a\xf6\xde\xcd\x27\x8b\x59\xbf\x98\xbf\xfb\xd7\xff\x7d\xf7\xe7\x9f\xef\xff\xfc\xf3\xfd\xbc\x3f\x9f\xbf\xff\x7b\x3c\x99\x8d\xf2\x61\xf5\x54\xfc\x49\xdf\xdf\x79\xef\xbe\x4d\x26\xf7\xf3\xfb\x59\x7e\xf7\x27\x7f\x37\x81\xef\x66\xd5\xf8\x5e\x02\x9a\x19\xb3\x82\x16\x73\xe5\x3c\xe4\xb3\x2a\xff\x36\x2c\xe6\x8e\xcc\x51\xf5\x58\x8d\xe7\xef\xff\xbe\x99\x3c\x14\x33\x57\xe1\xfb\xd5\x5d\xb1\xa5\xdc\xb0\x9a\xdf\xbb\xea\xfd\xbb\x1a\xe5\xe5\xd6\x16\x19\xc0\x96\xfc\x6f\x93\xd9\x75\x31\xfb\x63\x96\x5f\x57\x0b\x67\x0b\x1c\xd0\x95\xd3\x9f\x5c\xbb\x6a\xfe\xbb\x9c\x55\xd7\x5b\x5a\x7c\x26\xfb\xdb\xac\xc8\x07\x77\x93\x6a\x7c\x3f\x7f\xa6\x92\x3f\xbe\xcf\xf2\x51\xb1\x9c\xcc\x06\x4e\x8a\x3e\x37\x16\x0c\xe0\x8f\xd9\x64\xe9\x2a\xfd\x7d\x32\x1b\x6d\x2b\xbc\x29\xff\xef\x6f\x8b\xfb\xfb\xc9\x78\x5b\xd1\xcd\x10\x7f\xdf\xcf\xf2\xf1\xbc\xba\xaf\x36\x64\x5f\xcf\x26\x77\xd7\x93\xe5\x78\x4b\xe5\xe3\xfc\xe1\x8f\xeb\xea\xa1\xba\x76\xb3\x19\x6f\xfb\x8f\x72\x36\x59\xdc\x39\xd9\x69\x7c\xb7\xb8\xdf\x9c\xdd\x5f\xcc\xef\x27\xa3\x3f\x36\x22\x3f\xce\x1f\x36\x24\x7f\xcb\x9d\xfd\xe9\xe7\xb3\x6d\xbc\x40\xb3\xdd\x54\x9e\x15\xf9\x75\x7f\xb6\x18\x7d\xdb\x56\x7a\x58\xe4\xb3\xef\xd5\xa3\xab\x82\xbb\xbc\xac\xc6\x39\xa5\xf4\x96\x0a\xb6\x02\xfd\xfd\x2d\xbf\xde\x3e\xb3\x36\xe4\xff\x7d\xbb\x18\x7d\x9b\xdc\xcf\xdc\xb5\xe6\xc3\x62\x76\xbf\xa5\xd6\x4d\xf9\x7f\xdf\xcd\x26\xe5\xac\x98\x6f\x9f\x34\xf9\x75\x55\xb8\x27\xd6\xdf\xa3\xe2\xba\xca\x5d\x19\x54\xf6\x6c\x64\x09\x53\x40\x6d\xe6\x9b\x59\x31\xbf\x9b\x8c\xe7\xd5\x43\xf1\x47\x31\xfa\x56\x5c\x3b\x59\x61\x38\x99\x3b\xc9\x35\x9a\x5c\xe7\x43\xe7\x6c\x99\x4c\x86\xf7\xd5\xb6\x5e\xcd\x8a\x79\x71\xff\xc7\x7d\xf1\xe8\xa6\xd8\xe4\x6e\x93\x38\xee\xe7\xb3\xc9\x62\x5e\x0c\xb7\x89\x0f\x3a\x57\x37\xcd\x84\xc5\x7d\x35\xac\xee\xab\x82\x0d\x58\x55\x8e\xb7\x83\x7c\xcb\xfb\x03\x4a\xbb\xf1\x56\xb9\xa8\x80\xfe\x60\x9a\xc6\xa9\x9e\xcc\x4a\x99\x60\x7f\xa6\x73\xd7\xd5\xfc\x6e\x98\xaf\xb6\x03\x7d\x1f\x16\x8f\xcf\x41\x4c\xf2\x6d\x4c\xbb\x29\xdf\xa8\xe2\x6e\xc2\x05\xdf\x76\xa8\x79\x7f\x56\x14\x63\x3a\xf9\xdd\xa8\xc9\x06\x39\xdc\x1f\x1c\xf0\x99\x2a\xab\xa7\x6a\x5c\x3e\x03\x73\x97\xf7\x9f\x05\xda\xc0\x66\x8a\x5f\x8a\xc7\xfb\x3f\xee\x67\x8b\x71\x3f\xbf\x2f\x9e\x83\x2b\x46\x77\x37\xf9\xbc\x9a\x3f\x07\x77\x53\x39\x55\xb0\xd1\xab\x87\x6a\x5e\x7d\xa3\x6f\xab\x2d\x75\xd9\x40\xff\xe3\xbd\x1b\xe7\x23\xb6\x84\xfa\x1f\xef\xdd\x28\xbf\xbb\xab\xc6\xe5\xfc\xdd\xbf\xde\xfd\x1f\xfa\x77\x42\x50\x0f\x79\x31\xc2\xc4\xeb\x21\x84\xbc\x2e\xc2\x88\x3f\xc5\xf4\x69\x0a\xea\x71\x25\x1e\x3b\x01\x07\x6f\xd3\x57\x82\xda\x81\x97\xd2\xa7\x84\xfe\xb4\xd5\x4f\x48\x7f\x52\x94\x10\x99\x9b\x06\x5e\x93\x16\xeb\xf0\x5c\x2c\xe0\x12\x5e\x4b\x37\xf0\xba\xaa\x6c\x8c\x9a\xaa\x58\x3b\xf0\xda\xaa\xb5\x90\xe7\xca\xaa\x46\xac\x47\xa2\xdb\xec\x49\xd6\x4a\xe8\x53\xc6\xbb\x90\x06\xb4\x39\x81\x5e\x87\xff\x60\x24\xfb\xd1\x0d\x28\x30\xf1\x2a\x50\x35\x9c\x81\x2a\x28\xaa\x20\xc4\xeb\xf3\x6a\xd3\x80\xc2\x88\x57\x46\x96\x12\x54\x95\xf2\x91\xe1\xd1\xa6\x15\xb3\x27\x22\xda\x4e\x1d\x69\x6d\x5a\x63\x6c\xe0\xd6\xdc\xd4\xd1\xb6\x40\xa3\xab\xaa\x8f\x75\xbf\x59\x4f\x12\xfe\xd4\x0e\xbc\xc4\x20\x34\x43\x9f\x3d\x11\x93\xf8\xbd\x3a\x99\x32\xfa\x54\xf0\xa7\xa6\x68\x49\x0c\xa6\x7c\x0d\xf9\x80\x74\x02\xde\x50\x42\xeb\x63\x83\x94\xd3\x26\xe7\x40\x61\x52\xd5\x19\xcd\x1d\xac\x70\xae\xfa\x56\xd0\xd7\x8c\x57\xdd\x0d\x0c\x26\xc8\xd4\xf8\x67\x28\x36\xb9\xb1\xa3\x2a\xed\xd9\xd5\xa7\xaa\x02\x42\x8c\xf1\x6e\x2b\x22\x17\xbc\x44\x16\xf0\x1e\xf4\x55\x1b\x23\x40\xa1\xe4\x20\x46\xcd\x12\xd3\xc7\x03\x96\xc0\x9f\x57\x0c\x24\x57\x6d\xa6\x0a\x25\xce\x21\x27\xec\x97\x3f\xcf\x19\x6c\xaa\x06\xb2\xcd\x7b\xdf\xa6\x2c\x54\xe3\x5e\x31\x4d\x34\x0a\x72\x40\xac\x49\xc4\x08\xdd\xd6\x5c\xde\x35\x7e\xe4\x58\xa7\x46\xb9\x1a\x9d\x52\x35\xb8\x9a\xc9\x32\x35\x3e\xb9\x31\xd6\xb2\x83\x8c\x76\x31\x7e\x1f\x05\x82\x8b\x73\x7f\x15\x6f\x68\x9b\xd7\x8e\xef\xe2\xc0\x5b\x71\x42\x61\xff\x2c\x16\x48\xc6\xf8\x31\x0e\xbc\xbe\x5f\x5d\xca\xd2\x1d\xd5\x5c\x8c\x3f\xc4\x81\x77\x22\xcb\xcc\x15\x08\x9b\xd2\x67\xa0\xb1\x65\x04\x8a\x39\x8e\xdd\x40\xb2\x15\x31\xa5\x42\xaa\xf0\xe9\x28\x52\x69\x76\xd4\xd8\xc6\xf8\x43\x12\x78\x99\xbf\x6c\xc9\x04\x72\xd3\x67\x44\x20\x9c\xfa\xa9\x62\x3e\x2e\xe1\x16\xec\x77\xc0\x19\x81\xfd\xf2\x39\x56\xe8\x84\x3e\xea\x0b\x06\x2d\x10\x41\xa2\xcf\x85\xa2\x52\x41\xe7\x0c\xe1\x5d\x23\x44\x89\x85\x34\xa0\x90\xbc\x5f\x67\x40\xd1\xfb\x00\xb4\x96\x33\xf0\x42\xd4\x7f\x0f\x86\x98\x1a\x01\x22\x42\x22\xb2\x79\x6b\xf1\x0f\x1b\x64\xde\x43\x26\x58\x13\x85\xed\x08\xf8\x7c\x45\xc8\x6b\xd2\x82\x12\xa8\x49\x45\x26\x4b\x64\x9c\x21\xe5\x2b\x31\x18\x51\x83\x10\x29\x56\x12\x94\x98\x84\x8e\x69\xa7\xda\x0e\x7e\x8e\x69\x61\x96\xc1\x71\x1d\x01\xf2\x03\x29\xc2\xe2\x50\x11\xb0\x19\x09\x5a\xd1\x6e\x86\x76\x2d\x25\xe0\xe3\xe0\x13\x17\x6b\xeb\x8c\x27\x49\x2a\x86\xab\x29\x61\x52\x05\x93\xa2\x09\xb0\x29\x5e\x02\xaf\x30\x47\xe9\x90\xd2\xb9\xa7\x59\xb1\x29\xa7\x6d\x8f\x56\xa8\xd5\x5e\x5f\xc9\x5c\xa3\xe5\x36\x3e\x8a\x4f\x2e\xbc\x0a\xfc\xe3\xf8\xf4\x82\xd7\xe9\x92\x48\xa1\xf1\x44\xd4\xdc\x24\x92\x71\xe2\x60\x94\x52\x01\x49\x0e\xaf\x04\x21\x7b\xa8\xc7\x88\x1d\x6e\xf8\xc1\x43\xe0\x3d\x60\xe3\xd3\x57\x3c\x4f\x94\x02\xd0\x19\x31\x0a\x03\xaf\x21\x71\x22\x4a\x83\x8a\x81\xd3\x8a\xaa\xab\x26\x96\xd0\x46\x35\x9e\x68\xd2\xb2\x6b\x55\x37\x95\xb0\xd7\x3f\xa1\x52\x86\x4d\xa1\x87\x05\xea\xf2\xb5\xaf\x24\x52\x4f\xc1\x75\x8d\x15\x83\xfc\x61\xb3\x9e\xa1\xa4\xa5\x19\xe7\x9f\x98\xdc\x44\x82\x54\x69\x30\x8a\xd0\x1a\x40\x07\x75\x22\xef\x1c\x36\x94\x8d\x89\x37\x61\x42\x66\x82\x83\x51\xbc\x5e\x3a\x46\xad\x88\x42\x74\x42\x39\x0b\xb2\x88\xcf\x33\x41\x00\xa2\x08\x40\x84\x68\x88\xb9\x5a\x69\xba\x91\x08\x69\x06\x9b\xff\xed\xe0\x3c\x09\xbc\x3e\xb9\x4d\x04\x64\x8a\xfa\x81\xa4\x17\x12\x32\xad\x5d\x27\x69\xdb\x60\xeb\x4c\x4e\xbd\xdc\xf8\x61\x33\x5c\x09\x92\x4c\x73\x56\x4f\x0d\x73\x4f\x0d\x6e\xa1\x9e\x34\xda\x5d\xc5\x04\xb9\xd2\xe9\x4d\x85\x6f\xac\x1a\xd0\xea\x41\xf3\x5c\xae\xa6\x7f\xa8\x6a\x4e\x8d\x05\x0b\x97\x9b\x4d\x53\x93\x0b\x25\x9e\x10\x83\xd3\xce\x59\x87\x8f\x00\x25\x62\xde\xf7\x50\x1c\x09\x34\x2a\x99\xc7\xe5\x6e\xa6\xa7\x76\x93\x4a\x72\x29\xff\x32\xfe\x9a\x88\x65\x0c\x1b\xa6\x35\x29\x56\x93\x67\x6d\x43\x65\x60\x53\x76\xa6\xf6\xe4\xc2\x6a\xdd\x56\x9b\x1f\x23\x40\xb1\x56\x52\x61\x4d\xcd\x04\xe7\x61\xe0\x65\xe4\x5e\xea\xfd\xa2\xf9\xfe\x2f\x26\x7a\xe3\x4d\x3f\x4f\xb0\x6d\xd2\x93\x21\xd8\x53\x27\x75\x8a\x18\x3d\xb4\x4d\xb6\x2a\x8b\x68\x0d\x1d\xd5\xff\x96\x9d\x16\x3b\xd2\x52\x47\x5a\x7b\x47\xb8\x18\x91\x2f\xc6\x12\xd3\xec\x64\x28\x66\xfa\x36\x01\x69\x82\xb4\x7f\x22\x88\xdc\x25\x68\xe6\xef\xdb\xcb\x47\x39\x35\xb4\x0e\x2a\xea\x4b\xca\x8e\x5d\xa9\x14\x88\x7a\x31\xc2\xea\xab\xf4\x96\xa1\xc0\x1f\x88\x58\x35\xea\x06\x62\xbf\x0a\x02\x2f\xc7\xc3\xc0\x91\x35\x09\x02\xca\xf6\x7a\xfd\xe2\x07\xde\x08\xa3\x30\xe4\xa0\x21\x95\x75\xbd\xfa\xd6\xa9\xe0\x42\x30\x14\xbb\x91\xb4\xbe\x32\xd0\x78\x5a\x03\xa4\xa7\xa8\xe4\x6e\x4c\xec\x05\xa4\xc9\x5f\x17\x81\x98\xb1\x29\x42\x73\xca\x9d\xf1\x21\x78\x13\xa8\xeb\x15\x0b\x9f\xc4\x10\x33\xc8\x14\x42\x5a\x19\x1c\x60\x44\x58\x9d\x5d\xaf\x89\x82\xef\xde\x39\xa6\x8b\x04\xd1\x06\x99\x85\x87\xe0\x75\x71\xa8\xb8\xa8\x29\xb7\x85\xbe\x2f\xb6\x0f\xa9\x1a\x75\x63\xfb\x63\xaf\x49\xc8\x57\xd1\xcb\x36\xee\xca\x39\x1c\xaa\x1f\xad\xf5\xad\xb4\xae\x95\x16\x44\xd1\x7a\x47\x8a\x80\xef\x0a\xc5\x80\x35\xcd\x5d\xa1\xa5\xf9\x4a\xa8\x0f\x1d\x27\x48\xf8\x88\xcd\x7d\x9f\x90\xa5\xa1\x90\x98\xa6\x14\x65\x32\xf1\xd3\xe8\xea\x28\xf0\xfa\xe9\xf8\xea\x38\xe0\xe3\x1e\xd7\xc7\xdd\x3d\x7e\x9a\x33\x83\xcf\x92\x18\x24\x37\xa5\x18\x71\x42\x53\xd1\x1c\x3e\xdf\x80\xc9\xfa\xc1\x13\x48\xfc\xc9\x14\x22\x2f\x45\x59\x68\x34\xb1\x26\x10\x92\x7a\x0b\x92\x7b\x88\x83\x7f\x4d\x8c\x2e\xa9\x06\x58\xaf\x39\x75\xa1\xd1\x53\x75\x11\x8a\x10\x1f\x88\x6e\xbd\xbd\x36\x7e\xf2\x91\xd7\xc5\xc8\xdc\x07\xf7\xea\xbc\x1d\x53\xee\xb4\xf8\x3d\xc6\x47\x38\xf0\x56\x10\x8c\xfd\xc0\xeb\xe2\xf6\x1a\x40\xf2\x46\x00\x8d\x9d\x6b\x18\x40\x68\x0f\x55\x82\xcb\x37\x82\x68\xac\x41\xb4\x35\x84\x7f\x45\x35\x39\xfe\xfa\x5a\x1a\x3e\xe0\x80\x96\xbf\xdc\x8c\xe1\x0f\x43\x34\xb6\x41\xf8\xfd\xc8\x8b\x71\x8e\xe4\xe2\x5c\x2e\xc7\x72\xf5\xa4\xd3\x8c\xad\x57\xac\x44\x48\xac\x76\x0f\x0c\xcf\xbc\x2e\x06\x12\x9c\xb1\x2e\x7e\x80\xc0\x8b\xf1\x08\xd6\x00\xda\x6f\x03\xd0\xd8\x06\xe0\x5f\x0b\x25\x92\xd7\xcf\x06\x08\x0a\x02\x31\x5f\x1a\x4c\xd4\xf7\x55\x3e\x87\x6c\xde\xe2\xc8\x58\xb6\xa6\xf5\x9f\xf6\x8e\x3f\xa9\xa2\x50\xb7\xfe\xd3\xd9\xf1\xe7\xdf\xbd\x02\x79\xc6\x92\xd5\xa5\x27\xd7\x36\xc1\x02\xc8\xfa\xec\x98\x03\x1d\x74\x7c\xeb\x07\x7b\xfa\xff\x68\x05\x41\x03\x1c\x92\x61\x4f\xe1\x3d\x85\xff\x13\x28\xdc\xd8\x53\xf8\xe7\x51\x98\x44\xc8\x3c\x93\x64\xc7\x38\x4b\xfd\xa8\x97\xad\x95\x4e\x1c\x38\x1f\x3b\xf6\x72\x98\x04\x5c\x33\x18\x25\x73\xfb\x78\x49\xae\x4c\xad\xb4\xd8\x4e\xd3\x6a\x25\x44\x5e\x3b\x38\x83\xd6\x96\x6a\x3b\x8e\x6a\x3b\x8e\x6a\x3b\x28\x96\xb4\x21\x43\x9c\x3c\x5b\x6f\xd7\x51\x6f\xd7\x51\x6f\x57\xd5\xdb\xdd\xa9\xde\xd0\x51\x6f\xe8\xa8\x37\x54\xf5\x86\xbf\xb4\xbf\x7b\x3a\xfc\x9e\x74\x48\x7f\x52\x7f\x7f\x55\xbd\xbb\x8b\x07\x59\x6f\x4c\x8e\x21\xf5\xd2\x60\x81\x3f\xc9\x73\x92\x07\x5c\x4b\xe8\xd8\x09\x5d\x3b\x21\x7c\x16\xe2\xed\x8a\x64\x36\xc4\xb6\x04\x89\xcb\x08\x7f\x12\x64\x20\xe3\x7a\x42\xc7\x4e\xe8\xda\x09\xe1\xb3\x10\x6f\x57\x24\xb3\x21\xb6\x25\xc4\xe4\x10\x52\xaf\x13\xcc\xe1\x93\x30\x11\x20\xf7\xf5\x84\xae\x9d\x10\x3e\x0b\xf1\x76\x45\xba\x36\x84\x99\x80\x1f\x80\xd0\x75\xe0\x21\x10\x7e\x5f\xf1\x53\x74\x69\xfe\x53\x74\x69\xe7\x27\xe9\xd2\xce\x4f\x92\x19\x9d\x9f\x24\x3b\x7f\x55\x7f\xf7\x74\xf8\x3d\xe9\xd0\xfd\x49\xfd\xfd\x55\xf5\xbe\x56\x97\x76\x6d\xfd\xd3\xb5\x75\x69\xd7\x56\x59\x5d\x5b\xcb\x6d\x83\x78\xbb\x22\x3d\x1b\x62\x5b\x82\xc4\xc5\xd2\xa5\x5d\x5b\x97\x76\x6d\x95\xd5\xb5\xb5\xdc\x36\x88\xb7\x2b\xd2\xb3\x21\xb6\x25\x70\x5d\x9a\x6b\x0d\x45\x98\xca\xca\x6d\xe5\x9a\xdb\x4a\x2d\xb7\xd5\xde\x36\x88\xb7\x2b\xd2\xb7\x21\x8c\x84\xde\x5e\xb9\xee\x95\xeb\x5e\xb9\xee\x95\xeb\x5e\xb9\xee\x95\xeb\x5e\xb9\xee\x95\xeb\x5e\xb9\xee\x95\xca\x9e\x0e\x7b\xe5\xba\x57\xae\x7b\xe5\xfa\x6f\xa0\x5c\x1b\x7b\xe5\xba\x57\xae\x7b\xe5\xba\x57\xae\x7b\xe5\xba\x57\xae\x7b\xe5\xfa\x66\xca\xb5\x79\x2c\xbd\x35\x93\xba\x3d\xbd\xe9\x23\x72\xa1\xdc\x34\xdb\xa1\xe1\x56\x51\x28\xbb\x7b\xcb\x3f\x26\x45\x9f\x99\x25\x7d\x1e\x1a\x8e\x66\x7d\x1b\xe6\x9a\xf9\x79\x0e\x20\x5c\x2f\x3e\x84\xc8\xeb\xa3\x39\x84\xca\x75\x23\x8b\xa4\x9f\x5b\x33\x94\xee\x00\x99\x34\xd7\x6f\xdb\xe5\xfd\x40\xbb\x90\xc6\xe1\x7a\xfe\x65\x24\xdc\x78\x57\x80\xba\x89\x37\x11\x6e\x1f\x9d\x96\xb7\x62\x5e\x27\x95\xf4\xeb\xcd\x22\xef\x04\x50\x33\x51\x3e\x68\xf8\x03\x89\x38\x2a\xca\x2b\x2d\x0c\xf5\x73\x12\x79\x15\x46\xb1\x86\x47\x97\x2d\xe5\x66\x88\xb2\x54\xa7\x8f\xe1\x13\x27\xce\x40\x7a\xb4\xa9\x7a\x52\x5a\xcd\xc0\xa8\x26\xa5\xb5\x4c\x59\x2d\x53\xa3\x96\x94\x55\xd2\x53\x6e\xc5\x85\x55\xc5\x01\x58\x55\x0c\x58\x15\x83\xb5\x2a\xde\xa4\x1f\x1b\x88\x92\xda\x34\x49\xdd\x24\x49\xfd\x2a\xf8\x42\x9b\x27\xe1\xba\xdf\x08\x0a\x23\x33\x2b\xb5\xb2\x8a\x3a\xff\xca\x1c\xee\x31\xa5\x50\x5b\x02\x65\x5f\xe1\x68\x70\xc5\x3c\x43\xbb\xa1\x74\xf2\xea\x45\xa6\x77\x55\xe2\xb0\xbf\x66\x4f\x23\xc9\x35\x51\x40\x91\x4a\x65\x79\x72\x13\x51\xb6\x70\x95\x6f\xd6\xbd\xf6\x37\x84\x2a\xb0\xf1\x8a\x0d\xcf\x60\x9a\xba\xd4\x51\x2c\x4a\xa8\x87\xb1\x30\x7d\xa3\x51\x2c\x3d\x78\x3e\x7d\x96\x0b\xe5\x5c\x95\x8c\xb5\xeb\xb2\x7e\xef\xee\x00\xd3\x77\xc0\x74\x9f\xaf\xe6\xe5\x20\x66\xc3\xe9\xe7\x96\xd7\x00\x74\xa6\xa4\x80\x11\xb9\x03\x67\x81\x70\x31\x5b\x27\x1c\x56\x3e\x19\xca\x87\xd3\x3f\xc6\x11\x9d\xda\x73\x1c\x1a\x8e\xd7\xc2\x3d\xe8\x11\x47\x5e\xb9\x25\x6f\xb2\x25\xef\x08\x36\xe7\x2d\x00\xa1\x25\xd0\x91\x1b\xf8\x77\xa0\xb8\x52\x03\xdd\xf9\x0c\x68\xe9\x2b\x67\xd7\x30\xf2\x4a\x5f\x39\xbd\x4f\x00\x5d\x44\x74\xa6\xf5\x42\x07\x9a\xb1\x74\x93\x9f\x80\xe1\xc0\xda\x91\xbe\x64\x3d\x11\x70\x42\xca\x69\xfe\xa8\x7d\xb2\x47\x1a\x6a\xa1\xa1\xf8\x63\xc7\x72\xfe\xdb\x0a\xd5\x61\x9e\x21\x58\x39\xa5\x49\xa0\xc4\x68\x4f\x33\x7d\x16\x78\xd3\x1d\xa0\xad\x18\x1e\x89\x1a\xfe\x5c\x71\x3c\x41\xad\x33\x9f\x49\xa3\xf7\xfc\xdf\xb4\xe9\x0d\x7c\x84\x66\x4d\x6f\xe1\x33\x4f\x15\x1f\xa1\x39\x66\x69\xf7\x58\xa7\x75\xd6\xbd\x57\x50\xce\x9d\x8c\x07\xc0\x3c\x90\x87\xe0\x8d\x98\x7c\x9a\x63\xc3\x8f\xb0\xe6\xef\x94\x7e\x3e\x8d\xa4\x27\x5b\x56\xc6\x91\xb7\x24\x08\x4d\x7c\xaf\x24\x08\xdd\xf9\xde\x94\x2d\xf6\x46\x3e\x95\x58\x6d\xe1\x85\xb9\x5b\x13\x6d\xa3\x89\xc7\x58\x35\x71\xf2\x7c\x13\x3d\xe5\x01\xaa\xdd\xf2\xbb\x0e\xe7\xb9\xb6\x0a\x4f\xa3\x5d\x4d\xd2\xfa\x10\x24\x54\xe3\x2f\x30\x6a\x27\x06\xdf\x49\x7f\xec\x96\x10\x94\x7a\x8e\xf5\xeb\x4e\xd5\x8c\x71\x38\x8c\x6e\xc1\x8a\x2b\x90\xd1\x16\xce\x98\x2b\x91\x88\xe8\xc2\xd9\xb9\xe6\xde\x3a\x65\xee\xad\x62\x05\x11\x45\x94\x56\x69\x28\x7d\x54\x33\x36\x77\x74\xa8\x9b\x66\x20\xc2\x10\xcd\xe5\x6f\x53\x50\x22\xd5\xce\x58\x2c\xca\xc8\x04\xea\x7e\xa7\x99\x96\xaf\x99\xfa\x29\x8d\x77\x7c\x7a\x25\x23\xb8\xf0\x5f\x1e\xff\x85\xeb\x30\xaa\xda\x94\x14\x0a\x99\x2b\xac\x26\x4e\xca\x22\xc6\xd4\xa4\x54\x6e\x2b\x30\xff\xa8\x1d\x09\x4f\x5e\x9e\xb2\xbc\xc2\x77\x69\xf0\xd3\x1a\x8c\xfd\xd1\x55\xbd\xc1\xaa\x83\x4f\xd3\x40\x84\xbc\xe0\xbf\xdc\x11\x9f\xb3\x68\x69\x35\xd8\xb0\x1a\x3c\x80\x67\x31\xbc\x62\x4b\x00\xd5\xe0\x20\x43\xfd\xc8\x88\x19\xb0\xb3\x33\x5d\x58\xd7\x48\x61\xdd\xad\x2e\xb4\xa0\xa5\x10\x95\x8f\x85\x7a\x12\x3c\x74\x11\x50\x55\x9e\xc9\x05\x47\x74\x78\x45\x75\x7b\x58\x5d\x31\xc1\x57\x84\x2f\xec\xdd\xb3\xed\x29\x92\xb4\xf5\xd9\x55\xbb\x1e\x71\xa8\x84\xfa\x82\x99\xb0\xb5\xf0\x0a\xd0\x02\x76\xef\xce\x1b\x1d\x63\xfd\x14\x9a\x6b\xc4\x8e\x81\xe9\xcf\x12\x87\x46\x48\x09\xbd\xe8\x12\x25\x87\x98\xad\x41\x17\x1a\xea\x01\x47\x94\x07\x8f\xb0\x5a\x28\x52\xed\x5e\x61\x74\x80\x4d\xd1\x2e\xca\xdf\xf8\x8c\x7c\x73\xff\x17\x8f\xa6\xb5\x9a\x24\x26\x21\x7c\xb6\x56\x3f\xf7\x43\x39\x5c\x1f\x79\x4a\x45\x42\x5b\x84\x12\xc3\x71\x5e\x7b\x67\xde\x91\x88\x4a\x8a\x15\xf9\xc5\x48\x8a\xee\x9f\x92\x88\xaa\x8f\x03\xa2\xa4\x3b\x46\xc6\x18\xe7\xf5\x1d\x64\x0f\x0d\x83\x88\xaa\xe9\x45\x10\x8a\xa0\x44\xe4\xf0\xaf\x96\xe1\xbc\x9e\x3b\x42\x37\xb8\xa2\xd5\x58\xa1\x4d\x26\xda\x01\xb7\xd2\x8f\xa5\x7e\xec\x6d\x0a\x0b\xd0\xc3\x13\x82\xec\x80\x09\x7c\x05\xf3\xf5\x3d\x79\x93\x88\x01\xad\x58\x84\x6e\xea\xd2\x0e\xa9\x5e\x5d\xa7\x34\xf5\xab\xd7\x65\x1b\x63\xed\xc0\x6e\x9c\x79\x5b\x27\x6d\x13\x30\x4e\xbf\x9d\xd9\x63\xb6\x9b\x46\x85\xd7\x47\x2b\xf8\x4b\x0e\xaf\x8e\xd0\x72\x08\x19\xed\xe3\x37\xaf\xc7\x26\xa3\xa4\x55\x12\x71\x5a\xae\xc0\x88\x91\x96\x06\x5e\x8e\x3f\x38\xb7\x5b\x4a\xf4\xdf\x82\x4f\x09\x53\x41\x82\xb6\x81\x21\x62\xec\xd2\x93\x70\x0b\x8a\xa3\xed\x28\xd2\x4d\x7e\xa4\xf5\xbe\x0a\x4c\x65\xb6\xd5\x0c\x04\xa1\x26\x52\xb3\x35\x37\xe0\xb0\xb6\x8d\xf0\xfb\x91\x57\xe0\x1b\x7f\xdb\x5e\x23\x66\x38\x4f\x0d\x9c\xd3\x8d\x38\xf3\x65\xca\xf4\x19\x9c\xa7\xdb\x71\x9e\x32\x9c\x97\x72\x63\x4b\xc8\x7a\x97\x28\xce\x73\x63\x49\x34\xd5\x38\xa7\xcf\xe2\x5c\x41\xe4\x75\xf0\xd8\x7f\x7e\xa0\xcb\x9d\x06\xba\x94\x27\x2a\x5b\x91\x7e\x9e\x97\x63\x23\x38\xd8\xa6\x81\x36\xe3\x05\x95\x2f\x19\xe8\x09\x44\x5e\x8e\xef\xfd\xff\x2a\xee\x5e\x30\xa4\x9f\xfe\x61\xa4\x77\x1a\xe9\x9f\x87\x74\x03\x22\xaf\x87\x4f\x77\x40\x7a\xb0\x13\xd2\xea\x9c\xe9\xc7\x47\x5a\x89\x87\x4d\x48\x2b\x02\xf3\xb3\xbc\xdd\x91\x3e\x00\x5a\x3b\x7e\x82\x0d\x92\xcc\x38\x65\x91\x04\x38\xc4\xc4\x3b\x82\x0a\xce\xf0\x76\x12\x34\x03\x11\x99\xeb\x88\xf5\xfb\x47\x48\xa0\xc2\x80\x9d\xb3\xaa\xd6\xe3\xb5\x34\xeb\x5b\x95\xa3\xcd\x24\x10\x78\xb3\xb3\x18\x7c\x0a\xeb\x50\x4e\xb4\x63\x8e\xf6\xd9\x06\xb4\x2d\x09\xab\xb6\x69\x5b\xd1\x7e\x5e\x9a\x37\x65\x70\xd1\x12\x2b\xb4\x63\x0b\xed\x73\x63\x6f\x76\xe6\x44\xdb\xe8\x9c\xcf\xce\x4c\xf1\xfb\x17\x8e\xf6\x72\xb7\xd1\x36\x35\xcf\x8f\xcc\x72\x8b\x71\x9c\xa3\xad\x8e\xea\x69\x8b\xcf\x8e\x76\x9b\x31\xf9\x10\xff\x97\x31\x79\x87\xa1\x3d\xfb\x95\x68\xef\x34\xda\x6f\x8c\x76\x1e\x79\x13\xc0\x8f\x2f\x44\xbb\xb1\x1b\xda\x0d\x19\xf1\xe6\xc7\x47\xdb\x14\x13\x4e\xb4\x8f\x8c\xf0\x86\x8d\x67\xd1\xa6\x4a\xbb\x63\x44\xd5\xac\xdd\x20\x88\x6d\x25\xbf\xb5\x3b\xe3\x27\xcf\x43\xfe\x6f\x82\x69\x7f\xb2\x63\xac\x9a\xfe\xcc\x02\x97\x9d\xf0\xec\x5b\xa0\x4b\xb4\xe2\x4a\x9c\xd2\xdf\xc0\x63\x93\x2e\xda\x4a\x38\x6a\x22\x95\x76\xdb\x44\x6a\x39\x57\xc2\xa4\xe9\x0a\xbc\x69\xe0\xf6\x00\x6c\xc9\xd6\x90\x21\xa1\xd2\x1b\x78\x6a\x22\x35\xa9\x4b\x38\x69\x12\xb5\xfd\xe9\x34\x19\x39\x3f\x7b\x29\x7e\xf4\x37\x9c\x8b\xea\x1d\x58\xd2\x6d\x84\xb1\x2a\x70\xea\x6f\x38\xab\x35\x0b\x4c\xa2\xc8\x3e\x15\x4d\x54\xdc\xc6\xb9\x19\xfc\x2b\x5c\x8b\xe0\x1c\x86\xea\x76\x3b\x8e\x8c\x70\xba\xe4\x6b\x3f\x34\xe3\xcc\xc6\xf5\x4d\xb2\x95\xd6\xb5\xd2\x7a\xdf\x5b\x5e\x57\x84\xb6\xa3\xc3\x16\x8a\x91\x15\x20\x2c\x9a\x9d\xbe\xf3\xe4\xc7\xc8\x72\x9f\xcf\x8e\x95\x27\xfa\xbd\x04\x9a\x60\x1d\xee\x5a\xb1\xce\xdb\x5f\x6f\x20\x54\x11\x94\x6b\xe7\x3f\x7d\x47\x5a\xd7\x4a\xcb\xaf\x5b\xf2\xe4\x9f\xa8\x56\xb8\x42\x68\xae\x1d\xe4\x58\x31\x37\x7b\xf6\xe1\x0e\xdf\x83\x76\xbd\x26\xc2\x7f\x19\x76\x18\x89\xa1\x62\x6b\xa7\xff\x3d\x3b\xed\x2f\x76\x0a\x5c\x82\x49\x3d\xba\xe4\x4f\xd6\x03\xc5\xf1\x48\xc5\x2d\x23\xb4\x38\xa3\x8e\x3e\xc0\x8a\x55\x89\xb4\x1e\x02\x34\xae\x9f\xdf\x74\x54\x17\x53\x23\x36\x3d\x36\xa3\xa3\x10\x47\x48\x3b\x57\xa0\xd5\xae\x4b\x7d\xef\x78\xd5\x77\x4d\x77\xa4\x7c\xc4\xfa\x73\x9f\xe9\xfa\x99\xaf\xee\xc2\xad\xc8\xf9\x6a\xf0\xcd\x63\xd9\x55\x2d\x52\xa2\x2b\xf8\x69\xe8\x38\xbe\x72\x49\x9c\xae\x1d\x41\x52\xdb\x04\x28\x06\x18\xc3\x03\xdb\x22\xf3\xf5\xce\x08\x1a\xbe\x2b\xe6\xae\x21\xed\xbe\xf3\x0d\xc0\x02\xe8\xbf\x09\x8c\xc1\xe8\x84\x03\xfc\x1e\xf8\x7e\x78\xc5\xae\xdc\x8e\x60\x06\xeb\x97\x17\x86\x58\xca\xd8\x4a\x5b\x4f\xac\x8b\xc8\x4b\x51\xaa\xf8\x28\x8d\xc4\x3d\x95\x26\x60\xac\xd6\x7c\xc6\xcd\xa3\xc9\x39\xa1\xbc\x09\x4b\x1d\x1c\xd2\x76\x5c\x87\x59\x01\x09\x05\xed\x42\x79\xed\x96\xa9\x6a\xc2\x7a\x14\x46\x6b\x5a\x59\x8c\xcb\xbe\x02\xb0\x60\xb8\x85\xf5\x03\x2e\x6d\xd3\x91\x92\x63\x26\x08\xd5\xf5\xa1\x75\x17\x64\x48\xb3\x89\x7e\x34\x52\x7b\xc6\x2c\x8e\xe4\x12\xad\x64\x37\xec\xba\xaa\xb7\x38\x87\xfe\x14\x89\xdb\x8f\x39\xa0\x3c\x91\xc3\xf3\xad\xa5\x57\xcb\xe2\x7e\x64\xe4\xb3\x1b\xd7\x43\x60\xff\x9e\x18\xd7\x0c\x40\x95\x18\x42\x4b\x30\x9f\xa9\x69\x2b\xac\x57\xd4\xca\x26\x81\x6b\xe0\x23\x08\xa5\xbc\x89\x5f\x78\x59\x21\xe3\xa2\xab\x13\xd3\xae\x92\xae\x89\x9e\xd6\x5d\x14\xb0\x25\x46\xac\xce\xb1\xc3\xc8\x5b\x11\x75\x83\xc7\x18\xea\x44\x5f\x96\x12\x66\xd6\x42\x6e\xe0\x06\x87\xa2\xfb\x44\xcb\x0b\x52\xc2\x02\x47\x74\x5b\x40\x11\xc2\x37\x70\x08\xa1\x58\xc0\x30\xa8\x85\x84\xa2\xbb\xc0\xb9\xc9\xc0\x24\xf0\xce\x7d\xa3\x55\xba\x87\x67\xc4\x9f\x90\x1b\xb8\xf3\xdd\x6d\xad\xfc\x88\xe5\x9f\x62\x77\x2b\xa5\x1f\x89\xeb\xa3\x0a\xab\xeb\x69\x82\x4a\x90\x28\xf5\xeb\x87\xc6\x6d\x4a\x8c\x11\x0b\xf1\x2a\x90\x0d\xcf\x81\x0e\x03\x1a\x62\x71\xc3\xd4\x5f\x5b\xa1\x95\xd8\x01\x91\x29\x88\x0c\x4d\x40\x4e\xd6\x17\x70\xf5\x48\x5f\xfd\xcd\xb5\x96\x5c\x80\xf9\x55\x08\xeb\xbc\xdc\x08\xb4\x5f\x5f\x07\x17\x86\xae\x92\x71\xe1\x77\x3d\x4f\x57\xd3\xea\x00\xa8\x60\x4a\xd4\x7c\x70\xb2\x6b\x11\x1a\xda\xa4\xa7\x94\xe1\x09\xbb\x20\x16\x23\x1b\x44\xde\xdc\xbf\x81\x61\x58\x1b\xd3\x86\x1c\xb3\x2a\xe4\xf9\x37\x51\xa8\x0c\xab\xcd\x31\x6d\x44\x91\xb7\x20\x75\x4e\x39\x61\x9c\x72\x46\x78\x29\x57\xad\xd3\x28\x62\xf9\x77\xb1\xab\xd6\xcf\x8d\xb2\xc9\x8c\x1e\xf8\x96\x96\x4e\x4c\xf6\xbc\xf4\x57\x70\x7b\x18\x24\x86\x34\x11\x4b\x14\xfd\x9d\x88\x61\xd2\xe2\xf3\xd2\x12\x5e\x3b\xcc\xd0\x44\x19\xb6\x1d\x31\xe2\x5a\x35\x90\xb7\x92\x5e\x72\x71\xdc\x34\xa4\xff\xf5\x39\x30\x4b\xac\x21\x66\xe2\x67\x4a\xe8\xbf\x01\xbc\xf7\x65\xdb\x71\x4b\x10\x72\xa4\xac\xa9\x76\x97\x3d\xaf\xe3\xde\x5d\x79\xb2\xc5\x64\x05\xad\x9b\xfd\x4e\xfc\x5b\x78\x90\xd1\xd0\x48\x05\x13\x1c\xe9\x4e\x13\x47\xc0\xf9\x15\x58\x01\xa5\x37\x68\xc6\x78\xd3\x8d\x8f\xb5\xe6\x68\x5b\xdb\xa3\xb5\x55\xd2\x2d\x3c\xa9\xfb\x9a\x0a\x4a\x22\xa5\x12\xff\x5d\xfa\xa8\x1f\xba\x37\x0d\xb7\xf0\x5e\x06\xf8\x4f\x9c\x05\x47\x10\xba\xf7\x27\xb7\x70\x17\xd4\x4b\x2e\xa5\xc9\xdc\x89\x34\x76\x24\xa8\x13\x89\x6f\x9c\x88\x79\xcc\x18\xe6\x80\xfd\x2e\xb8\x99\x9e\xcf\x0d\x3c\x6e\xe1\x29\x70\xc9\xe0\x0a\xaa\x26\x33\x4e\xd2\xe1\x5a\x49\x20\xe6\x10\xb7\xd1\xe3\xcd\x8e\xc4\x48\xe9\x56\x56\x74\xd4\x02\x97\xdc\xae\xe0\x20\x88\x68\x09\xad\x73\xda\x72\x51\x23\x97\xfa\xa6\xfb\x84\x18\xdf\x4b\xb6\x75\xea\xa8\x69\x44\xb6\x4d\x9e\xa6\x63\xf2\x34\x1d\x93\xa7\x89\xbe\xb2\xfb\xe1\x22\x91\xc3\xff\x7d\x05\x6c\x4b\xf6\x1e\xd8\x9e\xec\xc0\xa7\xff\x26\xf0\xa4\x26\xce\x1d\xb4\x04\xf1\xce\x28\xad\x13\xb9\x87\x38\x85\x96\x20\xc6\x39\x46\x03\x9c\xd8\x9f\xbe\x89\xd1\x18\xb7\xbc\xa9\x49\x28\x1f\xa1\xca\xf7\x0e\x30\x42\xb7\x3e\x2d\x85\x46\x4d\xfa\x6f\x8e\x8f\x03\xf9\x69\x9b\x61\xfc\x49\xd8\x5a\xbd\x6a\xf1\xd4\xb5\x15\xa0\xde\xf3\xd4\x2c\x69\xe6\xae\x26\x9a\x86\xa8\xba\x08\x28\x3b\x26\x2e\xb3\xc9\x2b\x2a\xd0\x51\xbe\xed\x4c\x3a\xde\x94\x91\x6e\x3d\xd5\xd8\x52\xec\x5b\xe4\x2d\x7c\x54\x81\xab\x43\xcc\x98\xc1\x47\x4b\x48\xd6\x96\xe4\x29\x7a\x82\x16\x95\xfe\x67\xe0\x30\x3b\xca\x5a\xc2\xee\xc4\xda\xb9\xb5\x1d\x0b\x60\x6b\x27\xd3\xae\xef\x3a\xe3\x17\x5e\x0d\x1b\x3b\x33\xb7\x11\x51\x5b\x4f\x4a\x7d\xbf\x5b\x9a\xef\x69\xe0\x1d\xe1\x21\x1c\x4b\x4d\xdc\x1e\xc0\x11\x61\x6b\xbd\x44\x5e\xb7\xae\x12\xd4\x8a\xe8\xfc\xef\x84\xeb\x87\xf8\xf3\x88\x6e\x57\x96\x58\xa9\xf2\x90\xa9\x72\xa3\xf8\x28\xa2\x02\x65\x05\x2f\x59\xa5\xbe\x42\x53\x04\xec\x63\x4e\x32\x48\x77\x9b\xd9\x51\xfb\x28\x4d\xa4\xb0\xe8\xb5\x8c\x0d\x65\x6e\x3a\x58\x69\x53\x03\xbc\x16\x78\x34\xad\xdf\xe2\x5b\x72\xbe\xa8\xef\x28\xd9\xe8\x4c\xb4\x01\x4a\xb2\x71\x1c\x62\x6b\x1c\x62\xa7\x82\x18\xc2\x47\xf9\xad\x9a\xf6\x00\x2a\xf5\x69\x2b\x83\x44\x31\xfa\xce\x6e\x6d\x07\x32\x62\xb6\x61\x59\xca\x2e\xd7\x4b\x2e\x6d\xd6\x4f\x20\x3f\x50\xc1\x03\x68\x80\xc3\x2d\x7b\xd1\x14\xdd\x71\x4b\xd2\x15\x36\x8f\x31\x06\x7a\xe5\xaf\xe9\x90\x1a\xf1\xee\xf3\xc0\xb9\xfa\xc9\xeb\x4a\xb4\xed\x50\xb1\x6d\xcb\xbe\xb3\xe3\xf8\x3a\x58\xdb\xfe\x04\x99\x7c\xaa\xa0\xfe\x99\xb3\xa9\x6b\x5a\x5a\x7b\x55\x6b\x82\x92\x7a\x03\x96\x9d\x85\xeb\x80\xe1\x47\x67\xae\x63\xd8\xc7\x6d\x3d\xec\xf3\x16\xb3\xb3\x1d\xd1\xed\xe2\x23\x9c\x67\x03\xf0\x2a\x58\xc2\x6d\xe7\x91\x69\x9c\x25\x84\xce\x13\x23\x97\x8c\x49\x1d\xb2\xe8\x45\xa8\x6e\x5b\xcd\x0c\xe1\xe9\x0a\x19\x1f\x0a\xd2\x41\x79\x09\x47\x62\x8e\xd1\x0a\x33\x24\x8e\x3e\x75\xbc\x6c\x05\x4f\x37\x70\x03\x86\x29\xcd\x0e\x72\x21\xb7\xed\x93\xf4\xd4\x6b\x06\xc6\xd9\x64\x62\x1c\x90\xd1\x7e\x3e\x42\x42\xd4\xc1\xf0\x12\x2e\xf4\xa8\x5c\xb2\x55\x61\xc7\x31\x09\x32\x71\xd8\xd9\xb7\x3f\x15\xe6\xb3\x8d\x5b\xa8\x02\xed\x46\xec\x9c\x33\x5d\xf3\xe5\xe8\x8d\xe1\x23\xe8\x45\xab\x5a\xca\xb4\x47\x30\x05\x66\x27\x86\x8e\x80\xfe\xeb\xcd\xc0\x40\x59\x74\xfb\x6b\x8b\x0e\x6f\xe9\x98\xbb\xfa\xca\xa0\xc7\x8e\x0e\xf8\xb2\xef\x88\xf3\xc2\x16\x3b\x10\xe3\xe7\x90\x1b\xee\x1d\xc8\x35\x5f\x3c\x86\x99\x8f\x1c\x7b\xa0\x11\x1c\xf8\x91\x37\x85\x31\xdc\x2b\x0d\x31\x82\x39\x89\xc4\xda\xf0\x84\x1d\xab\x24\xf6\xda\xc0\xe0\x95\x4c\x9e\x02\xbf\x91\xe5\x9f\x58\x9b\x84\x0c\x81\x37\xaf\x96\x9b\xee\xca\x33\xeb\x98\xea\xb2\x29\xa8\x13\xf0\x04\x8f\x9b\x11\x77\xf4\x7d\xf9\xbe\xee\x75\xbb\x1f\x73\x56\xa6\x81\xe1\xc7\x91\x6f\x32\x2d\xcb\x37\x7d\x3c\xc7\x38\xc8\x7b\x82\x1b\x20\xca\x44\x61\x05\x23\xd0\x33\x22\x8b\x8c\x6f\xf2\xfc\x34\xbc\xb6\xcc\x64\xbe\x64\x4f\x1d\xb6\xf0\x99\x79\xd8\x95\xd7\x11\x2b\x94\xc9\x7f\x09\xd6\x07\xf8\x26\xfa\xfc\xc3\xfa\x08\xa4\xbd\x3f\xaa\x7f\x58\xd4\x3a\x26\x36\x66\xf6\x1d\xdc\x06\x52\x44\x5f\x96\xa0\x2d\xbb\x57\x30\x25\x9a\x94\x89\x3c\xa9\xb5\xee\x1e\x12\xe3\x0c\x7c\xdb\x8d\x43\xc7\xb5\x80\x88\x5d\x9a\x25\x46\xf1\xba\xba\x8b\xd5\x21\x9a\xbd\x50\xe7\x0c\xf5\xfd\x14\x13\x6f\x05\x45\xe5\x07\x74\x03\x91\x75\x8c\x83\x78\xc1\x72\x5f\xbe\x78\xe7\x80\x8a\xd4\x1e\x8b\xe6\xf7\x8f\xa4\x45\xcb\x9e\x73\x7f\xb6\x29\x24\x26\xc5\xd7\x18\xc1\xb8\x8d\x0c\x15\x23\x84\x96\xb1\xa7\xde\xd3\x77\xac\xb3\xab\x67\x6d\x41\x1f\xa0\xe5\x1d\x00\x6a\x40\xfa\x9a\x6e\x1c\xc2\x27\xba\x78\x3c\x83\x8e\xf1\x05\x24\xf1\x01\x92\x8f\xc0\x48\x30\xc1\xe9\x6b\xec\x57\x7f\x00\xa5\x7b\xfc\x89\x0a\xd9\x23\xd9\xf0\x5c\x6f\xd2\x16\xfa\xd1\x48\x2d\x8c\x71\x3b\xc5\x9f\xa8\x5e\xa8\x7c\x51\x38\xf9\x3e\x6c\xb2\xf1\x9a\xfb\xc8\xab\x7c\x14\xa6\xeb\x63\x7d\xf9\xc9\xab\x30\xea\x24\x1b\xc7\x7a\x44\x58\x7b\xa5\xba\xa3\xfb\x35\x63\x4d\x37\x6a\x03\xfc\x5a\x96\x9b\x41\xcb\x3b\xc1\x68\x09\xe9\xfa\x58\x3f\x01\x23\xc1\x81\x3c\x9a\xff\xc7\xc6\xfa\x16\xb3\xd3\x81\xb9\xdc\xff\xbf\x68\xac\x1f\x70\x8b\x2e\xae\x4e\x64\xe1\xfd\x58\xff\xb7\x8d\x75\xe3\x07\xc6\xba\xb1\x1f\xeb\x7f\x97\xb1\x46\xa7\x34\xe5\xf7\x18\xa8\x17\xf2\x1a\x41\x7f\xb5\xf6\x83\xbb\x65\x70\x63\x94\x7f\xd1\x0e\x6e\xcd\x50\x7e\xcd\xf3\x82\xcd\x09\x34\xc2\xec\xdf\x18\xeb\xbb\xb5\x24\x91\x30\x2d\xe6\xb4\xde\x53\xef\x5f\x5b\xec\xee\xf1\x88\x5d\x41\x16\x63\x2c\xd3\xbf\x7f\xf2\xce\x30\x1a\x41\x2a\x13\xc6\xf0\x49\x9c\xf4\x1f\x89\x6f\x9a\xab\x0b\x66\x55\xd9\x31\xb4\x68\x8f\x4a\x2c\x0e\x98\x0a\x74\x83\xd9\x85\xc3\x44\xf9\x63\x4c\xae\xe4\x31\xd1\x12\xab\x8e\xc7\xf2\x32\xb0\xc4\x0a\x9d\x98\xa2\x43\x11\x98\x72\x3c\x66\x98\xd2\x80\xbb\x9a\x4a\x74\x62\x8a\xce\x5c\xa3\x33\x05\x8a\x0f\xed\xe5\x19\xa6\xff\x8a\x99\xc0\x67\x0e\x14\xa1\x03\x03\xa1\x39\x0f\x5d\x70\x8e\x8d\x1b\x3b\xbe\x4b\x35\x30\x8a\x19\x46\x25\xd6\x18\x4d\x81\xa1\x34\x35\x51\x6a\x70\x94\xce\x0c\x94\xa6\x80\x67\xa9\xb0\xad\xfa\xa7\x76\x7f\x9b\x8f\x89\x2a\x98\xc1\xa5\xdc\x82\x4c\x81\x6d\xda\x9a\x6f\x16\x25\x2a\x55\xa7\x70\x3d\xe3\x42\xbc\x29\x6c\x72\xba\x0a\x7b\xed\xb3\x3d\xd7\xb7\xdc\xe4\x10\xee\x80\x76\xa5\x01\x2b\x63\x5f\x19\xb0\xbb\xfd\x24\x94\x94\x09\x23\xef\xc8\x9f\xc1\x2d\x0e\x1d\x47\x24\x53\x28\x71\xe4\xad\xfc\x19\x8c\x41\xde\x30\xb5\xf5\xdd\x6d\x7b\x0a\x53\x6c\x6e\x06\xdb\x0e\x8f\x5f\xe3\xb4\xaa\x6f\x13\x8f\xdf\x60\xcf\xe0\xd0\x17\xdb\x4c\xd3\x72\x9d\x13\x63\x0a\x53\xe2\x6e\xc2\xa8\xb8\xbb\x56\xf1\x45\xe0\x2d\x61\x06\x33\x7d\xb5\x2d\x7f\x64\x13\x53\x98\x04\x91\xe9\xa9\xac\x49\x99\x1a\x5e\xc8\x0e\x97\xf8\xbc\xfe\x75\xca\x8c\x9d\x08\xe0\xfb\xa6\xcb\x1a\x9f\xa0\x9a\x69\xac\x38\x3a\xf2\x27\xcd\xc8\xeb\xe3\xa7\x97\x14\x59\x34\x23\xaf\x8b\x4f\x37\x15\x59\x77\xf4\xe9\xf9\x0d\xd6\xca\xfb\x97\xb4\x72\xd6\x8c\xbc\x1c\x0f\x2f\x36\x14\x31\xed\x5d\x65\x91\xc1\x05\x65\x29\xfc\x41\x35\xd3\x33\x3d\x0a\x98\xe1\x1f\xbe\xb9\x58\xcf\x8c\xfd\xc1\x05\x25\x29\x1e\x5f\xb8\x4a\x4e\x2f\x28\x3b\xe3\x7b\x67\xe6\x92\x67\x3e\x39\x33\x8f\x2e\xe8\x26\x1c\x9f\x3a\x33\x47\x21\x1d\xac\xe3\x0b\xa2\x84\x95\x9b\x12\xaa\xc8\x14\xe8\xd6\xfd\x60\xcd\x30\xa8\xc1\x2e\xdd\xb5\x85\x0c\xbf\x8d\x5d\x19\x3e\xd9\x2b\x0d\x31\x37\x2a\x39\x30\x22\x98\xf8\xe7\xcd\x96\x69\x12\x46\x1c\x41\x0e\x98\x95\x4f\x67\x06\xa7\x91\x9a\x24\x53\x28\xe3\x68\xcd\x83\xfe\x45\x36\x60\x29\x4a\x02\xaf\x3f\x83\x7b\x65\x74\x31\x02\x3d\xf3\x69\x13\x4b\xf6\x61\xf5\x19\x1c\x2b\xb3\x0d\x0e\xd1\x10\xcf\xf1\x01\x70\xf3\xdc\x51\x68\xc6\x11\x78\x5b\x57\x6d\xfe\x55\xd1\xf8\x2d\x3c\x9b\x77\xbf\x56\x7e\x9d\xa2\xe0\x3e\xf3\xbd\x06\xc8\x0b\x86\xaf\x87\xcc\x8c\x23\x5f\x89\x73\xe5\xe4\x06\x6e\xa2\x07\x60\x34\x3b\x8a\x82\x97\x9d\xef\xbd\x8c\x66\x03\x46\xb3\xb7\xa0\xc5\x25\xb3\x99\xd4\x17\x78\x9a\x2b\x3f\xd3\x15\xc9\x0c\x86\x09\x71\xd8\x1e\x4c\xa1\x4a\x02\xaa\xf1\x07\xd0\x51\x07\xda\x43\xf8\x42\x57\x0a\x53\xe8\xa8\x12\x33\xf8\xe2\x9d\xc1\x0c\xee\x2e\x89\xc3\xda\x60\x0a\xa3\xcb\x80\xae\x1e\x4e\xa0\x23\xd3\xd0\x29\x7c\xa1\x8b\x8b\x03\xe8\xa8\x12\xef\xe1\x8b\x37\xf5\xd9\xe9\x90\x98\x3c\x77\xf8\x93\x37\xe7\xf2\x9e\xa0\x25\x16\x27\x4a\xcd\x1b\x18\x27\x9f\xd8\x00\x54\x2d\x71\x8c\x3b\x75\x06\x80\xcc\x2d\xbf\xda\x54\x9f\xf4\xa5\x86\x8d\x76\xc0\x2e\x21\x62\xb7\x7f\xba\xb0\xa3\xbc\xf9\xd4\x32\x86\xba\xed\xf8\xbc\xba\x6d\xe4\x9b\x3e\x00\x92\xea\x7e\x09\x17\xeb\x5f\x58\xd7\x07\x94\x42\x8c\xb0\xa9\x6a\x58\xec\xf9\x01\x5d\x3f\xd6\xfa\xb5\xb6\x62\xaf\xdd\x29\xa5\x08\x55\xd8\x0b\xd1\xe7\x19\xf6\x4a\x6e\xba\x22\x2d\xf5\xd9\xfd\xa5\xcf\x62\x6d\xc9\x45\x84\xb0\xa4\xd5\x16\xfb\x64\x8c\x5f\x72\x5e\x4d\xd6\x3e\xf7\x1e\x3f\x69\x94\x57\x10\xb2\xe5\x76\x53\x32\xdd\x13\x4c\x40\xfa\x5a\x98\xcb\x93\x15\x3c\xd2\x3d\x10\x7e\x82\xac\xb6\x3a\x59\xca\xec\x2f\x6c\xed\xd8\x0f\xed\x8f\x94\x6f\x70\xe8\xb8\x05\x66\x4a\x3a\xad\x5d\xe0\x14\xf5\xb5\x5f\xcf\x7d\xa9\x13\x0a\xa7\x01\x57\xc4\x14\xcb\x90\xa9\xb7\x53\x70\x27\xc7\x97\xe8\x3f\xc2\x13\x10\xe5\xbb\x7a\x0e\x27\xf0\x8c\x7d\xb4\xfe\x06\xf0\x8d\x2f\xa3\x72\xb8\x0f\xdc\x63\xe2\x55\xfe\x21\x4c\x15\x99\x13\x4d\xe6\xa4\x01\xb7\x40\xbc\xd2\x3f\x04\x22\xbd\x50\x12\x4d\xe6\xa4\x01\xdf\xd7\x2b\x4f\xde\xa8\xf2\x23\xf8\x16\x19\xdf\x99\xcf\x1d\x57\xa4\x9d\xba\x11\x58\x58\xbf\x3d\x48\x9e\x0f\x05\x90\x1d\xc3\x17\xc9\x7b\x47\xc0\x16\xb4\x7d\x75\xf5\x14\xaf\x79\x4b\x70\x29\x7b\x83\x5b\xa2\x4c\xbf\xc4\x39\x72\x5b\x9e\xb7\xd5\xe5\x9b\x19\x76\x47\x0d\xcb\x31\x73\x35\xea\x0b\x44\x07\x7e\xe4\x15\xcc\xa1\x5a\x8c\xdf\x2d\xae\x80\xa8\x35\x47\x85\xbf\xa9\x1c\x7f\xe4\xb7\xbc\x02\x3f\xec\x04\xbb\x60\xb0\xc7\x3b\xc1\x1e\xf9\x2d\xaf\x87\xdf\xdb\xb0\x72\x71\x59\x83\x3d\x60\xf5\x8e\xc9\x4e\xfd\x25\x2d\xaf\x8f\x1f\x6c\x58\xb9\x9c\x34\x61\xf1\x55\xcb\x58\x4d\xc4\x0e\x71\x29\x00\x3f\x80\x22\x5e\x3c\xf1\xe9\x52\x64\x09\x8f\x3e\x5d\x8a\xb4\xcd\xc2\xcc\x23\xa6\xaf\x63\xf7\x4a\x07\x70\x6d\xa4\xaa\x4e\x47\x3e\xc0\x37\x99\x78\x0e\xc8\xe4\x3b\x6b\x63\xe3\x8c\x08\xf1\x11\x2e\x24\x17\x9d\x43\x1a\x79\x85\xe1\xc9\x15\x0a\x6d\xdf\x53\xe6\x3e\x0d\x76\xbc\x60\x71\x95\x36\xf7\xcf\xea\x97\x63\xa6\x1f\x40\x46\xd9\xe4\x11\xbb\x56\xe8\x1a\x88\x20\xb1\x3c\x54\x41\xc5\x64\x1c\xa0\x44\x8c\x08\x15\xd8\xf8\xf8\xf9\x6a\x0a\xab\x96\xa5\x59\xcb\x1c\xd3\xce\x7c\xfc\xd1\xce\xac\x30\xdd\xa8\xdc\xfa\xcf\x56\x53\xd9\xd5\x34\x8c\x6a\xf0\x17\x66\x02\x85\x09\x1d\xf8\xb6\x69\x07\x42\x10\xbe\xa2\xeb\x9b\x58\x24\x8a\xb5\x4d\x70\x45\x57\x6c\x2f\x82\x2f\x5f\x02\x1f\x5e\x19\xc6\x10\x3b\xac\xf1\xb2\xba\x58\x6e\x6f\x0a\x65\x22\xf0\xbf\xc1\x9f\x25\xc3\x95\xb8\x27\x98\xbc\xed\xb0\x3d\x51\x81\x10\xd9\xa6\xa9\x27\x09\xb8\x32\x6c\x64\x26\xc6\x73\x15\xfb\x5f\x9e\xb9\xe6\x0c\x03\x11\x5b\x6b\x00\xda\x79\xb9\xa9\xd8\x35\x53\x68\x3a\x73\x3a\xce\x1c\xf2\x11\x02\x63\xca\xed\xbc\x26\x7e\xd6\xa2\x5e\x9e\x9f\xbc\xc1\x72\x18\x07\xc1\x4f\xbf\x96\x6f\x3a\xae\xe5\xb3\xda\xbc\x8b\x9d\xbe\x55\x17\x81\x57\x69\x2b\xcf\xf4\x11\x5f\x22\xe5\x4b\xbb\xc4\x9d\x67\xd6\x0a\xdf\x78\x3c\x21\x70\x05\xd0\xcc\xa2\xba\x85\xef\x0b\x0e\xdc\x7e\x56\x84\x28\x53\x34\x92\x75\xe5\xe0\x3e\xab\x43\x9f\x03\xef\x0c\xc6\xf8\xce\x79\xd8\x35\xc2\x54\x26\x9e\xf0\x83\x7d\x4e\xf7\x31\xbe\xc7\xc8\x71\xee\x75\x79\x29\x4b\x2d\x60\x89\x0f\x0c\x8a\xce\x6a\x26\x45\x0d\x78\xd8\xe6\x63\x16\xa3\x53\x60\xc6\xd4\x68\xe2\xd3\x7f\x25\xfe\x88\x25\xf8\x0d\x6e\x31\xa7\x87\xca\x67\xeb\x71\x7c\xac\x72\xc6\x98\x99\x0c\x1a\xb6\x80\xcf\x2c\x6b\x4f\x31\xbb\x28\xe0\x46\xe9\xb4\xcf\x3e\x1a\xf8\xca\xa0\x69\xe8\xb7\x98\xdd\xb2\x4e\xe9\x32\x63\x26\x12\x1a\x6c\xd8\xb3\x19\x32\x8a\xbc\x23\x1f\x65\xca\x8b\xf2\x73\xcb\x5b\xf9\xa8\x90\x37\x0e\xf8\xf8\x42\x1a\x9b\xae\xb3\x93\xf2\x9b\xae\xc5\x85\xf3\x03\x61\x88\xbe\xf4\x95\x1f\x6d\xfa\x84\xd3\xa0\xe6\xc7\x25\x63\xcb\xae\x70\xe4\xaa\xfa\x73\x24\x1c\xb6\xe6\x18\xe5\xe1\x56\xaa\xdc\xd5\xbd\x9c\xec\x1e\x2e\xa4\x67\x6f\xad\x87\xdc\x0d\x65\x6a\xf7\xd0\x8c\xc4\x27\x43\xe8\x6e\xee\xa1\x0a\x9d\xb7\x43\x0f\x7f\x7f\x1a\x2e\x37\xf7\x70\x25\x2f\x52\x6a\x3d\x1c\x48\x26\xac\xf7\xf0\x60\x2d\x8e\xe1\x64\x4b\x0f\x15\x26\xdb\x7b\x88\x67\xd0\x5a\x3b\x27\xdb\xe8\xcc\x6a\x7a\xc1\x5e\x32\x02\xa7\xe1\xfa\xae\xfb\xf3\x77\x71\x43\xb3\x34\xa2\x4e\xac\xe4\xf1\x6b\xb5\x6e\x09\xba\xf1\x20\xce\x65\x1d\xda\x36\xbd\x94\x49\x28\x75\x58\xfd\x9d\x19\xde\xf1\x73\x44\xb1\xa2\xac\xbf\xc7\xf8\xd6\x8f\x8c\xa0\xdd\x89\x63\x4d\xb1\x71\x9f\xd4\xab\x9b\xeb\x5b\xd7\x11\xcd\x63\x9c\x8b\x23\xf0\xfc\x08\x7f\xd9\xbe\xf1\xd1\x0e\xa7\x1d\xf3\x0c\x9f\xd4\x41\x6c\x3f\x60\xc3\xae\x1a\xcf\xc0\x0c\x45\xca\x5c\x5f\xdb\x3f\xe0\xf9\x6a\xb9\x6c\x67\x4a\xe3\x8a\x7e\xfd\x45\x47\xfd\x1e\x37\xe5\xf5\xa8\xa1\xbe\x32\xb5\xc0\xb0\x13\x75\xec\x63\x0b\xb0\xf3\x7c\x9a\x5d\x97\x51\xcd\x1c\x97\x50\x8f\x4f\x9d\xeb\xc7\x8e\x78\x1c\x73\x7d\x33\x85\x15\x88\x9c\x42\x41\x16\x0a\xb0\x40\xe4\x09\xc4\x29\x52\xd7\xb6\x96\x0f\xc5\x41\x98\x6d\x97\x66\xf0\x65\x18\xd8\x4e\xf1\xff\xd8\x85\xdb\x4e\xbe\xee\xc5\x03\x1e\x4a\x5f\xf7\x64\x81\xe7\x7e\xa0\xcc\xe4\x03\xd3\x03\xe7\x95\x0c\x23\xbb\x73\xc5\x8c\xfb\x3a\x5d\x59\xf9\x97\xbf\xe8\x7b\xb7\x2b\x3d\x6e\xe2\xbf\x0c\xcb\xd0\x9f\x10\x61\x31\xd5\x52\xa7\x5f\x0f\x1e\x51\x82\x72\x7d\x4c\xeb\x3b\x66\x33\xa8\x7d\x28\xfc\x01\xac\x0b\x86\x10\xc5\xf5\x78\xbf\x4d\xf4\xa6\x37\x98\x9a\xc5\x7e\x16\x61\x42\x4d\x98\xac\xbe\xca\x94\x51\x7a\x6b\x84\x59\xfb\x9a\xc0\x25\x8f\xd5\xbe\x02\x59\xf3\xa7\x27\xa0\xf2\x36\x5b\x82\xf4\xbd\x0a\x1f\x41\x28\xe3\x8d\x7b\x76\x4b\x92\x73\xe1\x32\xc4\xb7\x84\x78\x2b\x18\xe0\x05\x11\x54\xe8\xd4\x8d\x4f\x05\xf1\xda\x2c\x18\x4b\x4f\x88\xe9\x21\xbe\x09\xbe\xb0\x62\x93\xa0\x96\x81\x8f\xc3\x6b\xda\xfa\xda\x64\xd4\xf4\x4e\xf0\x85\x19\x66\xb2\x63\x85\xa0\x69\xbf\xc7\xd3\xab\x93\x0b\xaf\x82\x03\x3c\xbb\x3a\xbd\x90\x26\xb9\x64\xed\x88\x2c\x74\x7a\xd7\xd4\x72\xad\x48\x15\x89\xa5\x07\x7a\x0e\xcf\x2a\x2b\x00\x84\xe1\xe0\xe6\x5f\xa9\x33\x43\x22\x3f\xae\x62\x28\xe7\x2f\x94\x7e\x3d\x35\xdb\xbe\x76\x99\x5d\xc1\x3d\xd0\x49\xa8\x02\x7c\x84\xb6\x1d\xf3\x2d\xac\xb0\x37\x20\x08\x7d\x60\x86\x0b\x13\xe9\x58\xa6\x67\xbb\xe5\x40\xaa\x0f\xd7\xf3\xba\xc7\x16\x31\x65\xc1\x13\x0c\x80\xad\x03\x1e\x59\x38\x81\x73\x1d\x60\xc4\x3a\x8d\x7c\x0f\x47\x98\x85\xe4\x7e\x8f\xa5\x73\x61\xa8\x60\x62\xbb\xb7\xdb\xda\x0f\x6d\xed\x88\x1e\xf0\x08\x98\xdf\xe2\x13\x0b\x69\x71\x82\xdd\x44\x08\xd1\x07\x7c\x82\xbd\x03\x1f\xa1\x1b\xe6\xb2\x58\xfa\x89\x01\xb3\x03\x11\x88\xd1\x09\xc3\xc5\x66\xe6\x57\xdc\x05\xff\x81\x05\x53\x68\xf8\x6e\x22\xc4\xe8\xd8\x6f\x60\xaf\x22\x08\x7d\xc4\xde\x19\x46\xe7\xbe\x49\x84\x64\x47\x22\x58\x9d\x18\x48\xf3\x6e\xe1\x52\x66\x45\x5d\xb1\xea\x77\x1e\xa1\xc4\x8f\xf8\x58\x39\xff\x2e\xf1\x9c\x30\xbf\x83\x2c\xb4\x75\xa1\xa5\x23\xf2\xfa\x0d\x71\x42\x1e\x82\xc8\x9e\x93\xe1\xf3\x4b\x90\xc4\x11\x2b\x26\xf4\x5b\xff\x9e\x73\x17\x47\xee\xb9\xfb\x62\x55\x7e\x88\xbf\x4a\x4d\xde\xc0\xd1\x00\x8c\x49\xbe\x92\x8e\x32\x09\x7a\x82\x23\x1e\xcc\xff\x8e\xed\x9c\xd1\x07\xee\xf1\xfb\x91\x79\x63\x9d\x41\x62\x30\xb5\x3c\x92\xfb\x08\x4b\x60\xb0\x1c\x88\x4e\x44\x7d\x55\xa1\x3f\x36\xa0\xbe\xec\x72\x87\x17\xc0\x9a\xe0\x75\x2f\xb7\xc2\xc7\xe8\x10\xd7\x04\x42\xe9\xab\xe0\x20\x37\xfe\x59\x93\xed\x1c\x87\x3e\xdb\x87\xbf\xe7\x11\xfe\x6f\x58\x50\x8a\x49\x6d\x2a\xc8\x1b\xc8\x99\xdf\x00\x06\xcb\x81\x56\x7e\x62\xc4\x3d\xd2\xa3\x35\x92\x7d\x3d\xf6\x57\xc0\x9a\xe0\x75\x1f\x6c\x85\x8f\xd1\x2d\xa9\xc9\x8d\x05\x51\xa1\x21\x1e\xc8\x79\x53\x3a\x35\x97\xaa\x7d\x74\x8b\xa9\x3a\x3c\x22\x26\x5d\xe5\x12\xe1\x94\x1c\xf1\xb6\x39\x50\x19\x24\x72\x38\x6b\x74\x9a\xc8\xbe\x0e\x83\x06\xb0\x26\x78\xdd\xf3\xad\xf0\x29\x7a\x0c\x1a\xa6\xe8\x3a\xab\x45\x7c\x70\x09\x31\xd7\xf6\xae\xe7\xb8\x3a\x5d\x5b\x1e\xdd\x35\xeb\xd2\xac\x19\xca\x72\x87\xcd\x93\x26\x1b\x8e\xb1\xcf\x38\xe2\xa3\x72\x33\x3f\x07\x74\xde\x34\x47\x50\xda\x2e\xbd\x6f\xae\x38\xf7\x70\xa0\xd1\x45\x62\x6c\xc5\xf4\x88\x0c\x24\x55\x66\x17\x4b\x3e\xe2\xbc\xee\xd5\x56\xf8\x18\xb5\x4d\x3f\xda\xb0\xbe\xe4\xb3\x82\x24\x6c\x36\xc0\x4a\x0f\xf1\x87\x0b\x79\xbb\x33\x30\xcc\x3f\x06\xd0\xc0\x8b\x0b\xe6\x36\xd3\x51\x37\x61\x61\x64\x5a\xaa\x84\xca\x19\xaa\x34\xc2\x39\x6c\xdc\x64\x3f\x23\x41\xf5\x9d\x8c\x25\xf8\x63\x11\x1a\xd8\x91\x83\x1f\x63\xe1\x6c\xa8\x63\x8c\x95\xb0\x69\x27\x93\xd5\x8d\xe7\x5c\x8b\x27\x0e\x8c\xbf\x22\xef\x1c\xfc\x8c\x89\xa2\x30\x5c\xdf\x08\xf6\x5c\x1b\xc1\x9e\x63\x23\xd8\x73\x6c\xfa\x36\xa6\xd9\x75\x19\xd5\x34\xb0\x0a\x7a\x58\x5b\x12\xd7\x9d\xcc\x7b\xe2\x0e\x64\x81\xbd\x69\xe0\x93\x27\xfc\x6f\xd9\x7f\x11\xae\x4e\x41\xf1\xaf\x74\xec\xb4\x6f\x30\xa3\xfd\x92\x75\x55\x8c\x3f\x02\x1b\xd8\x11\x96\xf1\x33\x96\x2c\xee\xd0\xc0\x30\x39\xec\xe8\x70\x8c\x27\x46\x55\x03\x23\x46\x76\x47\xf6\x4a\xde\x56\x9b\x20\x0b\x0d\xb2\x04\xfc\x88\xf9\x58\x9c\xc0\x13\xfe\x67\x9a\x14\x8e\x93\x3c\x99\x90\x6d\x07\x51\x04\xfd\x06\x5f\x3b\xd8\xb8\x3c\xe3\x4b\xfc\x1b\x9f\xee\xea\xcd\xc3\x55\xf9\x5b\xfa\x4b\x7f\xc3\xd1\x93\xe5\x5e\xdd\x44\x4d\xf9\x1d\x98\x58\xc5\x40\x59\x98\x81\xdb\x42\x23\xa2\x28\x21\x4e\x4b\x9e\x76\xbd\x8b\xbd\x97\x7a\x05\x12\x19\xd3\x8a\x13\xe8\xe4\xd2\x4e\x39\xbf\xd4\xdf\x3d\xda\xb8\xf6\x74\xc5\x20\x6c\xbe\xe4\x30\xe6\xe5\xdf\x69\x20\x6a\x22\xbb\x56\x8e\x5f\xd9\xad\x54\xf1\xd6\x01\xdd\xd6\xa3\x0c\x84\xc6\x87\x9d\xd6\xcf\x2f\xdb\x2e\x97\xe7\x29\xb0\xb8\xa2\x25\xb7\x39\xb7\x26\x42\xe2\xa0\x64\xbe\xc5\x5f\x9f\xea\x9d\x5b\x7c\x0b\x6c\xc1\x86\x13\x3b\x74\xe6\x6b\xaa\x3b\xa4\xd5\x9d\x01\xfb\x24\x89\xf1\x09\xc3\x81\x8b\x05\x42\x07\x0b\x84\x75\x16\x70\x2d\xd6\xed\x89\x45\x6e\x2e\xb9\xb6\x9e\x02\x87\x1a\x01\xc2\x33\xa0\xb9\x32\xa5\xcf\x12\xfa\x3a\xa1\x82\x0d\x29\x23\xa3\x9e\x39\x4f\xaa\x57\x8d\xfd\x19\x70\xf5\x2c\x0d\x3b\x02\x64\xde\xc3\x0e\xe0\xce\x2f\x41\xdb\x63\x4f\xfc\xaf\x3a\x0b\x5d\x46\x2f\x82\xcd\xd6\x61\x65\x9c\x81\x1f\xaa\xb7\xbb\x0e\x2b\x0f\x64\x5f\x5d\x2f\x8e\x58\x7c\xd4\x11\xa8\xfb\xc0\x31\x23\xf0\x08\xa4\x74\xa1\x09\xb4\xfb\x23\x50\x0b\xa5\x31\x0f\xbf\x3b\x02\x3e\x5d\x79\x4a\xc1\x12\xf8\x67\x3a\x51\x32\x06\x2f\xbb\xf1\xbf\xc8\xf8\x00\xa5\x9f\x47\x5e\x7e\xe3\x5f\xb9\xee\x3a\x4b\x3f\x8b\xbc\xe2\xc6\xbf\x70\xd9\xcd\x95\x7e\x1c\x79\x25\xdc\xf8\xd8\x65\xf3\x5f\xfa\x38\xf2\xfa\x37\x7e\x1c\x3a\x2c\xf2\x4a\x3f\x90\x9f\xdc\x14\x6b\x4d\xf9\x8d\x31\xbe\x32\x7d\x84\x21\x46\xae\x18\x98\x35\x73\xc6\x15\x84\x2c\x91\x28\x87\x1d\x76\x04\x26\x5e\x69\x69\xce\xc7\x44\xb9\xf9\xe0\x80\xce\x19\xa2\x0e\x43\x1d\xef\x7d\xf5\x3e\x65\xef\xba\xfe\x5d\x3c\x86\xe8\xb2\x51\xc2\x9f\xe9\x9c\x73\xfd\x78\x66\x16\x3d\xc5\x2b\x1c\x78\x2b\x38\xc1\x37\x3e\x9b\x7e\x26\x2a\xb9\x85\xca\xc8\x46\xa5\x67\x75\xdd\x7e\xaf\xc0\xc2\xa5\xfb\x42\x5c\x06\xb0\x3b\x32\x8b\x3d\x32\xbf\x39\x32\x8d\xff\x0c\x64\xf0\x95\xe8\x42\x43\xaf\x21\xfa\xca\x12\xa7\x50\x4f\x32\x5c\xa2\xe8\x8f\x0d\x4d\x14\x34\x31\xc3\x1b\x4b\x89\xb1\x1b\x38\x11\x02\x67\x64\x98\x37\xcd\x8d\x8f\xc6\x2c\xf4\x25\xcc\x48\x3f\x4a\x15\x2a\x68\x6f\x3a\x33\xad\x17\xae\xea\x01\x1c\x65\x71\x3e\x56\x9c\x72\xeb\xad\x9b\x6b\xfe\xf9\x5a\xf5\x4a\x19\xf3\x4f\x08\xb9\x7a\x60\x56\xb0\x32\x72\x57\xba\x82\x15\xf3\x55\x61\xb4\x35\x6e\x14\xfb\xf6\x8d\xa2\xc4\x72\x60\x60\x60\x7c\xe1\xb7\x63\x33\xde\xc0\x26\x9c\xb1\x73\x59\x80\x58\x95\x23\xa2\xcf\xdf\xd4\x2a\x75\xaa\xcb\x94\x46\xe6\xd4\x40\xd4\x68\x7e\x09\xd6\xa8\x18\x05\x47\xac\xc8\xd2\x28\x52\x19\xed\xac\xe1\xa0\x4e\x36\x30\xb7\x65\x30\xf4\x3d\x32\x3c\xae\x64\xa1\x41\xbd\xe7\xaa\xa5\xa5\x8d\xf9\xd4\x00\xe4\xa8\x9b\x24\x2a\x8d\xed\xef\x54\x0f\x40\xa9\x4f\x4f\xa7\xc6\xf4\x1c\xe8\x6a\x27\x06\xe6\x7a\xcc\x7a\x1a\xf1\x09\xd8\x03\x36\x71\xb0\x9f\x2c\xc3\xf1\x9e\x1b\x65\x46\xe0\x6c\xc6\xf8\x24\xef\xc8\x18\x13\xf3\xe6\x7a\x62\x3c\x1b\xdf\x92\x96\x27\x07\x44\x96\x99\x1b\x58\x8f\xc0\xbc\xd9\x54\x68\x8f\x0c\xc0\x91\x73\xac\x47\x46\xc7\xe7\x1b\xe6\x5a\x5f\x63\xb8\x30\x00\x4d\xe6\x19\xd4\x78\xca\xaa\x71\x61\x00\x4e\x6b\x3c\x6d\xd5\x38\x70\xd7\xc8\x91\xae\x8c\x59\x5a\x68\x3a\x15\x16\x81\xbb\x96\x44\x35\x9b\x9d\x80\x19\x2f\x5a\x51\xa9\x5c\x9b\xff\x13\xdd\x78\x57\x53\x69\x64\xc0\xad\xb3\x84\x99\xde\xd5\x14\x9b\x6e\xa8\xdc\xb8\xa8\x30\x19\x6e\xb4\x81\x11\xcc\x74\x71\x1e\xf5\x01\x77\xe9\x54\x3b\x63\xfa\xac\x78\x91\x32\xe8\xbf\x48\x19\x8c\x5e\xa6\x0c\xf2\x1f\x51\x06\x25\xfc\xa0\x36\x98\xfe\xa8\x36\x58\xfe\xa8\x36\xe8\xef\xa0\x0d\x4a\xd8\x4d\x1d\xcc\x77\x54\x07\x8d\xd7\xa8\x83\xe5\xcb\xd5\xc1\xd1\x6b\xd4\xc1\xc9\x6b\xd4\xc1\xd1\xae\xea\x60\xfe\x0a\x75\x30\x79\xb1\x3a\x58\xbc\x42\x1d\xac\x5e\xa1\x0e\x96\xaf\x50\x07\xcb\x5d\xd5\xc1\x7c\x47\x75\xb0\xda\x55\x1d\x34\x76\x55\x07\xab\x5d\xd5\x41\x63\x57\x75\x30\x79\xa9\x3a\x98\xee\xaa\x0e\x46\x3b\xaa\x83\xf9\x6b\xd4\xc1\x72\x57\x75\xb0\x78\x99\x3a\x18\xed\xd5\xc1\x5e\x1d\xec\xd5\xc1\x5e\x1d\xec\xd5\xc1\x5e\x1d\xec\xd5\xc1\x5e\x1d\xec\xd5\xc1\x5e\x1d\xec\xd5\xc1\x5e\x1d\x98\xea\xa0\xb1\x57\x07\x7b\x75\xb0\x57\x07\x7b\x75\xb0\x57\x07\xff\xe5\xea\x00\x3f\xe1\xc0\xeb\xe1\x8b\x40\x38\x12\xf8\x21\xf1\x72\xec\x07\xf2\xd3\x28\x3e\x21\x5e\x0f\x63\x99\xfd\x1e\x57\x3e\xf1\x56\x70\x8e\xef\xa8\xfa\xa8\x97\x2b\xc1\x2a\x58\xa8\x82\x25\xfc\xba\x92\x8d\x57\x94\xc4\x97\x81\x11\x9a\x2a\xd9\xf1\x03\x3c\xcc\x9c\xb6\x5f\x2f\xb6\x93\xbb\x64\xd3\x74\x25\x2c\x94\xcd\x5f\xbb\xde\x6e\x2a\xbc\x94\x21\xf0\x32\xbc\xcd\xe0\x2d\x74\x7c\x12\xc8\x8a\x95\xa2\xbf\xfa\x28\xba\xd5\x91\xb6\x4a\x2b\x6d\x04\xdb\x7e\xc6\xdf\x5a\xd6\x98\xea\x2f\x36\xe0\x27\x1e\x5f\x4b\x18\x8a\xf6\x11\x0a\x9e\x79\x6d\xab\xd7\x42\xe5\xb6\xeb\xc0\x1b\x5f\xdb\xea\xb5\x40\x61\x8b\xa2\xdc\x51\xea\xf2\x0b\x7f\xe5\x53\x19\x93\x80\x76\x90\xc8\x9e\x73\x6b\x30\x51\x5f\xb7\xfe\x9a\xd7\x5f\xfb\xf5\xd7\x9e\xf1\x8a\x89\x61\x93\x2f\x32\x88\xc8\xe8\xaa\x0c\x51\xc1\x5f\x66\x0f\xda\x7a\x6e\xeb\x2e\x18\xef\xb9\xf5\xde\xb7\xde\x7b\xe6\x3b\x36\xe0\xb5\x2a\xa9\x75\x84\x67\xc9\x5a\x6a\x5d\x49\xb4\xed\x8a\xee\x4a\x69\x75\xa5\xb4\xba\x52\x5a\x5d\x29\xad\xae\x94\xba\x2b\xa5\xd5\x95\x52\x77\xa5\xb4\xba\x12\x2b\xb1\xab\x7b\x52\xd4\x3b\x52\xd4\xfb\x51\xd4\xbb\x51\xd4\x7b\x51\xa8\x4e\x14\xf5\x3e\x14\xaa\x0b\xc5\x6f\x3b\x2e\xbf\x94\x18\xa9\x63\x9a\xf4\xb6\xce\x8b\x62\xf3\x24\xc2\x1a\x58\x39\xb1\xc8\x1e\xf4\xea\x5f\xbd\xee\xd5\x7b\xd0\xde\x46\x5e\x07\xf9\x8b\x6d\xc3\x85\x0d\x78\xa4\xb2\x6a\x1d\xe1\x59\x85\x35\x1c\xa9\x6b\x9a\xf4\x9e\x99\x16\xc5\xb6\x69\x84\x0d\x78\xa4\xb2\x6a\x5d\x29\x75\x57\x4a\xab\x2b\xf1\xe6\xc1\x5e\x67\x85\x62\x33\xdf\x60\x0d\xac\x82\x1f\xd4\xfa\x50\xa8\x2e\x14\xbf\xed\xb8\xfc\x12\x62\x24\x2d\x6e\x09\xdb\x56\x15\x64\xf5\x39\x9a\xd5\xab\xcf\xea\x7d\xc9\xea\x3d\xcd\x36\xcd\xd1\xcc\x35\x47\xef\xfc\x0a\xe8\xd2\x78\xe2\x7f\xe0\x9e\xcb\x6b\x4a\x2d\xab\x2b\xb5\xac\x3e\x1f\xb3\xfa\xe4\xcd\xea\x53\x3b\xdb\xa4\xd4\xb2\x4d\x4a\x2d\x75\x09\xcf\xcc\x12\x9e\x99\x35\xea\x99\xc5\x25\x99\xc5\x45\xd9\x66\xe1\x99\x6d\x16\x9e\xa9\x4b\xa9\x65\x96\x52\xcb\xac\xd9\x98\x59\xb3\x37\xb3\x66\x77\xb6\x59\xa9\x65\x9b\x95\x5a\xea\x90\xe3\xff\x1c\x8f\xfc\xb6\xe3\xf2\x4b\x89\x91\x3a\xa6\x49\x6f\xeb\xbc\x28\x36\x4f\xa2\x0d\x4a\x2d\xdb\xa4\xd4\x52\x97\xf0\x5c\x27\xaf\x83\xfc\xc5\xb6\xe1\xda\x28\x3c\xb3\xcd\xc2\x33\x75\x29\xb5\x75\xb6\x77\x4c\x8b\x62\xdb\x34\xda\xa8\xd4\xb2\xcd\x4a\x2d\x75\xc8\xf1\xb5\xc1\x5e\x67\x85\x62\x33\xdf\x6c\x90\xe3\xd9\x26\xa5\xf6\x5b\x8e\xcb\x2f\x21\x46\xd2\xe2\xf6\xcb\x5a\xa9\xf5\xea\x73\xb4\x57\xaf\xbe\x57\xef\x4b\xaf\xde\xd3\xde\xa6\x39\xda\x73\xcc\xd1\x12\xf6\x5a\x6d\xaf\xd5\xf6\x5a\x6d\xaf\xd5\xf6\x5a\x6d\xaf\xd5\xf6\x5a\x6d\xaf\xd5\xf6\x5a\x6d\xaf\xd5\xf6\x5a\x6d\xaf\xd5\xf6\x5a\xed\x77\xd5\x6a\x8d\xbd\x56\xdb\x6b\xb5\xbd\x56\xdb\x6b\xb5\xbd\x56\xdb\x6b\xb5\xff\x00\xad\x86\x6f\x71\x8b\x3e\x57\xa0\xe2\xfc\xe1\x5b\x16\x4b\xa8\x02\x4d\xae\x5b\xf0\x0a\x1c\x99\xf6\x31\xfd\xfa\x87\x6d\xdb\x7e\x87\x70\x2c\xba\x0e\x2c\x38\xa7\xe6\x86\x0c\x9c\xf9\x73\x66\xe9\x36\xf5\x1f\x79\x65\x66\xc1\xc2\x2a\xc8\x0d\x40\x45\xf7\x7e\x5d\xc9\xc6\x2b\x4a\xd2\xc1\x15\xe1\x99\xa4\xe1\x9d\x11\xb1\xc9\x4c\xaa\x8c\xa4\x29\xa0\x70\x0c\xcc\x88\x6d\x0e\x2a\x84\xd9\x3d\x0f\xdb\x5f\x4f\xc9\x59\x82\x88\x86\x17\xde\x03\x1f\x66\x6e\x58\x44\x86\x18\x19\xef\x03\xb8\x25\x66\xa4\xa9\x8a\x7c\x55\x39\xe8\x52\x7c\x13\xaa\x06\x39\x15\x06\x80\xaf\x87\xec\xae\x41\x4a\x73\xcd\xd7\xd7\x99\xaf\x41\xca\x58\x8e\x36\x64\x09\x6b\xa0\x32\xe4\xa1\x09\x1a\x0c\xfc\x96\xd7\x6d\x3e\xfa\xc4\x0e\x30\xa7\x0d\xdf\x7a\xf5\xc8\x69\x95\x15\x94\x98\xe0\x20\xf0\xba\xd8\x57\x0c\xee\xa7\x94\x51\x88\x88\x88\x5a\x3c\xf9\x4b\x9f\xf2\xde\xca\x9f\xf9\x8c\x45\x64\x4e\x09\x4f\x82\x2d\x57\xfe\x07\x66\x6d\x6e\xe6\xfc\xb3\x85\x1a\x9b\x0b\x35\x1c\x85\x50\x33\x32\x41\x0b\xd4\x69\x89\xb0\x84\xe2\x9d\x45\x04\xbc\xe0\xec\xac\xc3\x0b\x35\xe5\xb7\x74\x2c\xa8\xb9\x86\x1a\x30\xa8\x13\x17\xd4\x89\x86\x5a\x02\x8a\xa9\x54\xf1\x19\xa5\x79\xe2\xbb\xff\xff\xbf\x01\x00\x00\xff\xff\xb4\x36\xa3\x31\xcc\x09\x01\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\xbd\x09\x77\xe3\xb8\xb1\x28\xfc\x57\xf8\x7a\xf2\xde\x9b\xb9\xa6\x5b\x9b\x2d\xdb\x3d\x79\xf7\x5c\x02\x24\x65\x4a\x96\xd4\xb2\xec\xf6\x78\xd2\x39\x69\x9a\x82\x25\x5a\x5c\x24\x2e\x92\xe5\x9c\xfc\xf7\xef\x60\x25\xb8\x49\xea\x9e\x49\x32\xf7\xbb\x9d\x93\xd3\x23\xa3\xb0\x55\xa1\x50\x55\x28\x14\x8a\x7f\x7f\xb7\x41\x51\xec\x86\xc1\xbb\x0f\x1d\xf5\x5d\x1c\xa6\x91\x83\xe2\x77\x1f\xfe\xf2\xee\xfd\xfb\xc6\xfb\xf7\x8d\xd8\x89\xe3\xc6\x53\x18\x26\x71\x12\xd9\xab\xf7\xf8\xcf\x77\xaa\x0c\xfb\x5b\x14\x86\x49\x65\x39\x7a\x92\x20\x33\x37\x4e\x1a\xf9\xbe\x4a\x4d\x36\x28\x98\x85\x51\xe3\x6f\xd1\x73\xcc\x9b\xed\xa9\xed\xbb\xaf\x6e\x10\x37\xfe\xb6\x08\x37\x28\xaa\x9a\x40\xb2\x5b\xa1\x8a\x72\xde\xce\x73\xe3\x24\xae\x6a\xe7\xfa\xf6\x1c\xc5\x7b\x5a\x92\x0a\x7b\xe0\x4f\x61\x34\x43\xd1\x69\x64\xcf\xdc\xb4\x72\x04\x27\x9c\x55\xb5\xff\xdb\x3c\x72\x67\x7b\xfa\x3d\x00\x7e\x8a\x90\xbd\x5c\x85\x6e\x90\xc4\x07\x3a\x39\x7d\x8e\x6c\x1f\x6d\xc3\x68\x59\x49\x37\xfb\xc9\xdb\x8b\x3f\xa9\x70\x1a\x85\xdb\xaa\xd6\xcf\x61\xe4\xef\x6d\x1c\xd9\x41\xec\x26\x6e\x18\xec\xa9\x74\xa8\x93\x39\xa6\x2d\xaa\x46\xf4\x6f\x4f\x69\x92\x84\xc1\xbe\xe6\xf5\x35\xa4\xe9\x55\x82\x67\x51\xb8\x9a\x85\xdb\x7d\x73\x77\xec\x08\x25\x7b\xe0\x81\xbd\x39\x9d\xb9\x1b\x77\x56\xcd\xb5\x74\x6e\xa7\xf3\x28\x4c\x2b\xb7\x9b\x1b\xac\xd2\xa4\x1e\xec\xa4\x71\x12\xfa\xa7\x75\x04\xc4\xa3\xd7\x14\x3f\xd9\x95\xf3\x71\xec\x68\x56\x39\xcf\x08\xd9\x33\x27\x4a\xfd\xa7\x2a\xe8\xca\x9e\xbb\x81\x7d\x60\x95\xf7\x56\xfa\xdb\x93\x3d\xdb\xbf\xcb\x6a\xe0\x7f\x7b\x49\xfd\xa7\x30\x89\xaa\x7b\xb5\x3d\x14\xed\x5b\x9d\x3a\xf8\xdf\x56\x51\x38\x8f\x50\x5c\x49\x54\x1f\xcd\x5c\xbb\x0a\x80\x65\x4c\xed\x5a\xc9\x82\x68\xcf\x82\x7a\x61\x5c\x89\x66\x12\xda\x35\x02\xcc\x0f\x67\xb6\x57\xdd\x24\xf4\x12\x77\xdf\x5c\x22\x14\xa3\xe4\x34\x41\xaf\xd5\x34\x08\x57\x75\xc2\xd6\xb1\xa3\x30\x8d\x91\xb7\x6f\x63\x78\xc8\x8e\x9e\xdd\xd7\xaa\xe6\xf1\xca\x0d\x02\x14\x55\xa1\x93\x26\xae\xe7\x26\x2e\x22\x8b\xe3\xce\x83\xbd\x2c\xe1\x2c\x31\x21\x83\xd9\xe9\xc6\x8e\x5c\x3b\x48\xf6\xf7\x97\xd5\x3f\x50\x8f\x08\xf4\x03\x93\x9b\xb9\xf1\xca\xb3\x77\xfb\x2b\x21\xff\x09\x1d\x18\xec\xd9\x43\xaf\x87\x6a\x84\xf6\x01\xcc\xdc\x20\x41\x91\xed\xd4\xc9\x31\xa9\x26\x5e\xd0\x67\xaf\x52\x96\x4b\xb5\x56\x61\xad\xcc\x96\x6a\xc5\x4e\x84\x50\x80\x05\x43\x35\xb5\xf8\x3a\xd1\x7a\xa7\xb4\xe2\x81\x2e\x17\xf6\x2c\xdc\x1e\xc0\x21\x76\xdf\xdc\x60\x7e\xa0\xce\xca\x76\x0e\x57\x4a\x22\x94\x38\x0b\x34\x3b\xf5\xdc\x60\xb9\xbf\x6e\xcd\x26\x11\x7a\x0e\xbd\x26\xa7\x49\x94\x06\x8e\x9d\xa0\x43\xf5\x90\xbf\x5a\xd8\xb1\x1b\x1f\xaa\xb7\x70\x2b\x0d\x07\x69\x56\x1b\x37\x76\x9f\xf0\x5f\xbb\x6a\x21\xe6\xf2\x3d\xf1\x57\xf5\x5d\x60\xfb\xc4\xd4\xfb\xab\xfa\xce\xb7\x57\x2b\x37\x98\xc7\xef\x3e\xbc\xd3\x34\x4d\xfb\x19\xff\x4f\x83\x9a\xa6\x0e\xb5\x9e\xa5\x8e\x35\x4d\x53\x27\xf8\x9f\x69\xc5\xaf\x0c\x3a\xdc\x5b\x6f\x52\xd1\x62\x9c\x07\x0c\xf2\x65\x8f\xf4\x97\xa5\xa9\xf7\xc5\x32\x4d\x2e\x1b\x57\x94\xed\x19\xd7\xd2\xd4\x39\xc0\x3f\x0d\xfc\x0f\xfd\x39\x3c\xf4\x73\xac\x0d\x4c\x75\x47\x7e\xda\xf8\x1f\x88\xff\x59\x02\xf1\xf3\x5e\xfc\x1a\x8a\x5f\xf3\x0c\x3c\x10\xbf\x1e\xc4\x2f\xb7\xaa\xb5\x0f\xaa\x9a\x4b\x55\x7d\xa0\x41\x4d\xdd\x92\x02\xa7\xa2\xff\x6c\xf8\x49\x55\xf3\x6c\xf2\xf7\x10\x9a\xaa\x01\xd7\x00\xd7\xd4\x35\x75\xaa\xbf\x00\x83\x4e\xef\x41\xeb\x99\xea\x40\x83\x06\x25\xf7\x03\x1e\xf1\x91\x0e\x03\x35\x46\x05\xf2\xf3\x0c\xd0\x35\x19\x9a\x12\x07\x3c\x08\x5a\x17\xfe\x21\x93\xb4\xe8\xd4\xa0\xc1\x5b\xdc\xb3\xa1\xc6\x74\x49\xf8\x50\xff\x6e\x2a\x1b\x6b\xcb\xa2\x2d\x06\x66\x60\xf5\xe9\xa4\x2c\x31\x3d\xf2\x8b\x31\x3c\x64\xe3\x11\x92\xd0\x4e\x06\xbd\x47\x53\x6d\xc2\x6b\x8e\xe6\xa3\x36\x35\xd5\x1e\x46\xf3\x81\xfe\x09\x35\x09\x61\xc6\xac\x36\xae\xa2\x69\x35\xff\xf0\xb6\xa4\x85\x43\x69\x30\x36\xf1\x9f\x25\xc0\x00\x2e\x80\xa9\x36\x81\xde\x06\x78\x2c\xc3\x60\x58\xde\x67\xac\x73\x2f\x56\x65\x2e\xff\x0d\xc5\x52\xf1\xbe\x48\xaf\x6e\x46\x5e\xbe\xfa\x3d\x93\xae\xa2\x23\xaa\x3f\x88\x2e\xe8\x26\x85\x11\x30\xd5\x9e\xbe\x05\x9a\xda\x83\x6f\xf8\x5f\xfd\x0c\x94\xe7\x8a\x7b\x1a\xc2\x57\x80\xf1\x21\x34\x35\x35\x75\xa8\x77\x81\xc1\xc7\xef\x31\xca\x31\xba\xf3\x3f\x19\x09\xf8\x70\xa4\xde\x83\xc4\x48\xfc\x1f\x32\x80\x41\x26\x30\xd6\xdb\x80\xf5\x33\x26\xc3\x1a\x7c\x8d\x2d\x73\xd0\x57\x2d\x78\x05\x34\xd5\xd2\xe7\xd0\xa0\x4b\x32\x35\x3e\x1a\x1c\x3e\x35\xf9\x38\x50\x53\x11\x15\x31\x3d\x13\xb3\xf3\x90\xb3\x38\x1c\xd1\x3f\x2d\xb6\x38\x23\xba\x38\x19\x97\xcc\x41\x81\x4d\x1e\xad\xc5\x8d\xa6\x4e\xfa\xfe\x4d\xb9\xda\xbd\x36\xed\xab\x6d\x50\xd9\x83\xd5\xb8\xc1\x8b\xd2\x5f\x0e\x2b\x80\xb0\x01\xfa\x74\x10\x4b\x4f\xf1\xbf\x30\x81\x9a\x3a\xd0\x9b\x9c\x86\xbf\x4d\x6c\x18\xaf\xba\x20\xca\x99\xde\x57\x2d\xcc\x5f\x6c\x51\x0d\xb1\xa8\x06\xe3\xea\x81\xd6\xe3\xdb\xed\x5e\x9b\x98\xea\x18\xd7\x2e\xad\xd0\x04\x13\x12\x1a\x94\xae\x84\x85\x6c\xb1\x74\x96\xd6\x63\xcb\x31\x16\xa4\x1f\xe3\x16\x43\xdc\x82\xe2\x3c\x15\xec\xf8\x58\xac\x58\xb3\x4d\x6d\x0a\x1d\x63\x66\xe2\xf3\xcf\xaa\xac\x01\x1d\xc0\x60\xdb\xd7\x96\xf6\xdc\x90\x21\xc1\xb8\x73\x62\xe2\xdd\xc1\xf7\xb9\x01\x17\xa6\xa9\x8e\x75\x1f\x33\x31\x7c\x31\xf1\xd4\x74\x3c\x10\xa6\x87\xbe\x36\x4b\x62\x6e\x62\x2c\x06\x8c\x9c\x13\x73\x39\x30\xb9\x82\xeb\x99\xea\x18\x06\x64\x2b\xe0\x56\xd3\x42\xe9\x98\x94\x22\x2a\x6a\x02\xd3\x54\x9d\xeb\x26\xef\x7c\x42\xa7\x08\x59\xb7\x63\x98\x60\x38\x45\x1a\xa3\xa1\xb7\x71\x07\x9a\x65\xb0\x75\x19\xc3\x96\x69\xaa\x5d\xc0\x04\x3a\xd4\xd4\x2e\xd0\xbb\xa6\xa1\xc6\x40\x1b\x70\xed\x0f\x2f\xcc\x91\x3a\x87\x18\x7a\x42\xea\xcc\xa1\xee\xf6\x88\x38\xb0\x38\xee\xd9\xba\xc1\x45\xcf\x54\xd7\x40\xf7\x7b\x44\x7c\x1b\x42\xaf\x40\x8d\xd7\xb5\x4c\x75\xaa\xf1\x8d\x46\xf8\x65\x2c\x56\x72\xaa\x0d\xd9\xe4\x09\x4b\x65\xbd\x8f\x8b\xbf\x06\x0c\xd3\x89\x10\x06\x43\xb1\xc4\xf7\xe2\xd7\xa4\x20\x37\x8d\xab\x31\xdb\xf7\x63\x73\xfe\xb1\xcf\x69\x9e\x63\x95\x4c\x4a\x4c\x05\x67\x4e\x7b\x17\x3d\x53\xdd\x41\x13\x23\x0e\xf5\xf9\x35\xa3\xf8\xa0\x77\xd5\xc3\x4b\x10\x5f\xf3\x35\xc1\x3d\xf8\x4c\x13\x78\xd7\xb8\xcd\x75\xf3\x9a\x13\x9c\xf0\x7b\x97\xec\xec\x81\x18\x8f\xad\x05\xe6\xc8\x0c\x23\x5b\xf0\xf5\x44\xc8\xef\xb1\x60\x85\xa9\x00\x0c\x7a\x8d\x6b\x53\x9d\x5e\xaf\xf9\x5a\x20\x78\x75\x4d\x84\xd3\xa0\xfa\x1f\xeb\xea\xd3\x1b\xd8\xa7\x6d\x0c\x21\x60\x0d\xad\xac\xfb\x2c\x93\x0a\xb9\xde\xf5\x7a\x30\x64\x94\xec\xad\x06\x23\x5e\x1a\xf2\xd2\x41\x2f\xc8\x4a\x7d\x5e\x3a\xe9\x79\x59\xe9\x32\xeb\xe1\x25\x2b\x75\xb3\xba\x8b\xac\x74\x9e\xf5\x7b\xd5\x1f\xa9\xc3\xeb\xcb\xbe\xa8\x76\xde\xef\x4b\xd3\x7b\xb8\xde\xf6\x45\xdd\xa4\x5f\xa1\xbf\x0d\x5c\xc9\xef\x67\x83\xd7\x56\xba\xb4\x44\xa5\x73\xab\xae\xd2\x2e\xab\xb4\xa9\xa8\x74\xd3\xc5\xca\x70\xb0\xe2\x0a\x70\x20\x29\xc0\x1c\x63\x3f\x08\x23\x89\xf0\x22\xea\x77\x1f\x4c\x75\x6c\x45\x0f\x9a\x3a\xbc\x5e\xf6\x38\xdf\xf6\x1a\x26\x93\x15\x56\x7f\xfb\x60\xaa\x43\x52\x63\x20\x24\x96\xa4\x64\x26\x98\xdd\x10\x6c\x18\x06\xdd\x9d\xd9\x30\x03\xdd\x37\x4d\xd5\x86\x2b\xb3\x02\x14\x9b\x26\xde\xbb\x19\x2b\xea\xa6\xea\x43\xcd\xb2\x68\xd5\xa1\x76\xdf\x57\x1f\xaf\xdb\x3a\xd7\xa0\xbd\x37\xdd\xa4\xdc\x7f\x8f\x17\xe0\x31\x33\x0e\xae\x43\xc3\x12\x8b\x69\x8c\x88\x09\xcb\xb7\xec\xf5\x89\x90\x53\xbd\x0b\x68\xf2\x0d\x78\x6d\x62\xd5\x37\xb4\xd8\xd8\x46\x70\xdd\x57\x1f\xa0\x65\xf0\x4d\xdd\xe3\x76\x8a\x4e\x06\xe5\xdd\x8d\x25\x0b\x4c\x90\x35\x23\xe6\xc4\xe0\x6c\x3d\xd6\x3f\x9a\xe5\xbe\x1c\xbc\xd9\x0c\x79\xef\x3d\xd6\x59\x1a\x73\x70\x73\x79\xcd\x51\x1f\x9c\x5f\xf3\x99\xf7\x36\xd0\x54\x07\xb7\xfe\x80\xc1\x86\x93\x97\x81\x29\x89\x95\x7b\x66\x5f\x6b\x74\x97\x33\x00\x36\x3e\x24\x31\x86\xff\xb9\x8d\xfb\x06\xef\x62\xd5\x37\x25\xb9\xc6\x56\x55\x17\x33\x83\x37\x7d\x75\xa2\x4d\x19\xb1\x8c\xdb\x4b\x7e\x62\x1a\x4c\xce\x2d\xce\x80\x9f\xb6\xc3\xbe\x6a\xdd\xbf\x0c\xf9\x28\xb7\x6b\x4b\x0c\x10\x58\x32\xe5\xa7\xb7\x31\xb7\x8b\x26\x93\xab\xeb\x92\x02\x1d\xe3\xf9\xce\x81\x30\x3c\x87\x19\x04\xbe\xe2\x9f\x9f\xb6\xd8\xfe\x74\x01\x46\xd3\xc1\xfa\x8f\xfd\x83\xff\x7c\xb8\x58\x00\x43\xc2\xc6\xc9\xab\xe4\xc2\x2f\x7a\xea\x80\xbe\x6e\xa8\x3b\x60\xbe\xf1\x11\x9d\x4c\xbb\x19\x5b\xd8\x2f\xc0\x8e\xab\x50\x51\xab\x59\x53\x2b\x57\x75\xa2\x9d\x81\x91\x3a\x80\x01\x2c\x1d\x49\x65\x84\x34\x59\x01\xd9\x79\x0e\x1a\xea\x31\xf9\x09\xe5\x6d\xc7\x78\xcb\xc4\x84\xfb\xd4\xa6\x06\xfc\x7d\xb4\x00\x43\xc9\x0e\xa7\xb5\x7b\x89\xde\x2f\x9e\x95\x0b\xa7\xdc\x03\xff\x3c\xcd\x3d\x80\xf9\xdf\x58\x63\xce\xd1\x36\x64\xb5\xfd\x1e\xc6\xfc\x51\xfc\xb3\xb8\xc6\xa5\x0f\x07\xff\x81\x49\x4f\xb5\x35\xf3\x77\xec\x6a\xf9\x7b\x74\x15\xe0\xae\x7e\x3f\x04\xed\xc0\x03\x16\x3b\x16\xe4\xed\x8c\x12\x07\xc7\xc0\xa0\x47\xda\x6d\xe6\x66\xc8\x4e\x3d\xcb\xac\xf0\x5e\x14\x32\x56\x19\x18\xaa\x63\x6e\xc1\x88\x8e\x23\x5b\xc8\xfc\x1f\xb9\x4c\xb4\x33\xde\x30\x97\x54\x35\xb4\x2a\x1a\x5a\xa2\xa1\x55\xdf\xf0\xa1\xa2\xe1\x43\x26\xc0\xfe\x09\x23\xfe\xd3\xa6\x1a\x00\x43\xbd\x37\x61\xff\x68\xa2\x16\x4d\x48\xa3\x37\x51\xc7\xe6\xd3\x6d\xb1\x83\xfb\x8a\x0e\xee\x85\xbb\xea\xde\x98\x56\x37\xab\x9e\xaf\x25\xe6\x5b\xd3\xac\x9a\x3e\x96\xa0\xcf\xef\x3b\xda\xff\xf0\x49\x4e\xbe\x6d\xb4\xdf\xb1\x59\x35\x77\x0a\xcd\x6e\x20\x62\x87\x6d\x01\x35\xb9\x7a\xc2\x70\xe8\x69\xc6\x2b\xc0\xca\x24\xad\x00\xf5\x22\x80\xc7\xe1\xad\x0c\x01\x32\x34\xed\xf5\x7f\x24\xe8\xbe\x9a\x86\xdf\x06\x1a\xaf\x80\x7a\x6f\x2e\xc0\x27\xaa\xcc\xef\x8d\x39\xb8\x97\x0b\x1e\x8a\x05\xd6\xc1\x1a\xbf\x5f\x93\x87\x62\x0d\xb9\x00\x0e\xb0\x81\x05\x3b\xc0\xa0\xc7\xcd\x6f\xd1\x5c\x2e\xf8\x56\xd5\x55\xdd\xf2\x18\x85\x50\xdd\xf2\x18\xe5\xf5\x7b\x8f\xf9\xcf\x9b\x2d\xd6\x5f\xf6\x6f\xd5\x5f\xf7\xdf\xa6\xbf\xee\xbf\x4d\xa0\xdd\x7f\x9b\xd4\xfd\x1d\x47\xfb\x1f\x3e\xc9\x87\x6f\x1b\xed\x77\x6c\x76\x84\xfe\x9a\x83\x7a\x05\x86\xea\x15\xd8\x63\xbd\x34\xff\x1f\x08\xb2\xeb\xb5\xd4\xd7\x83\xb0\x02\xb3\x33\xb5\x60\x10\x3d\x61\x17\x35\x9a\x5d\xd4\x24\x76\x51\xd7\xec\xab\xf1\xfb\x35\x71\x8a\x35\xa4\x82\xc7\xef\x1a\xed\xbb\x46\xfb\xae\xd1\xbe\x6b\xb4\xef\x1a\xed\xbb\x46\xfb\xae\xd1\xbe\x6b\xb4\xef\x1a\xed\xbb\x46\xfb\xae\xd1\xbe\x6b\xb4\xef\x1a\xed\x8f\xa5\xd1\x9a\xdf\x35\xda\x77\x8d\xf6\x5d\xa3\x7d\xd7\x68\xdf\x35\xda\x77\x8d\xf6\xdf\x5e\xa3\xf5\x02\xdd\x94\x22\xbb\x0a\xf1\x21\x34\x8e\x6a\x76\x86\x2b\xdd\x3b\x8d\x40\x27\x41\xd1\x96\x14\xbb\x86\x84\x00\x2f\xc4\x01\x4e\xb4\x4f\x24\xe6\xca\xb1\xa4\xc0\x66\xa7\x58\xe7\xb9\xaf\xfa\x40\xf3\x81\x55\x6a\x8e\x07\xed\xab\xb6\x13\xe0\x41\x6d\xad\x67\xf1\x58\xb3\x29\x0f\xe5\x2a\xc6\xca\xcd\x4e\x7c\xdd\x54\x7d\xe0\x2c\x70\x13\x3f\x8b\x05\x96\xeb\xcc\x71\xaf\x3b\xe0\x44\xb8\xce\x0e\x68\x0f\x43\x35\x24\xfa\xda\x9a\xb9\x81\x3e\x52\x2f\x81\x66\x6a\xea\x1a\x38\x2d\x5f\xc7\xff\x9d\xb5\xf1\x7f\xdb\xc0\x49\x7c\xdd\xe2\x51\x8f\x93\xbe\xba\x83\x9a\x61\xb1\xc8\xb6\x39\xf8\xa5\xa1\x9b\xea\x19\x78\x68\x1b\x96\x14\x7b\x46\xa1\x2e\x80\x81\xd9\x57\xd1\xf3\x32\xd2\x49\x80\xa2\x8e\x4d\x04\x74\xb1\xd6\x87\x3c\x32\xee\x79\x1d\xe9\x23\xb5\x4d\x86\x5e\x02\xb4\x89\x74\x43\x5d\x82\xe7\x2d\x6e\xb0\x05\xe8\x7c\xad\x4f\x68\xa8\xce\xe4\xd7\x9b\x91\xba\x84\x8f\x2e\x10\x6d\xb5\x9b\x91\xba\x86\xcf\x27\x6b\xdd\x54\xd7\x10\x25\x6b\xfd\x5e\x80\xce\xc1\xad\xea\x82\xe7\x6d\xac\x9b\x18\x4b\x5d\x53\x43\x80\x82\x58\x1a\xb8\x1d\xeb\x23\xb5\x4b\x06\x0e\x01\xba\x88\x75\x43\x0d\xc1\xf3\x25\x6e\xd0\x04\xc8\x8b\x73\x03\x87\xa5\x81\x53\xf8\xbc\xc6\x75\x53\x88\xce\xa3\xc2\xc0\xe8\xf9\x32\x91\x11\x7e\x4b\xa4\x71\xdd\x54\x46\x38\x48\x29\xc2\x61\x4a\x11\x7e\x4d\x0e\x23\xdc\x4e\x28\xc2\x5e\x52\x18\xf7\xf1\x39\xdc\x90\x18\x4b\x5d\x53\x11\x6a\xa4\xd2\xa8\xe9\x46\x1f\x61\x9b\xcd\xc4\x90\xb7\x8d\x6e\xa8\xe8\xb9\x89\x2b\xaf\x01\xba\x4a\x73\x63\x9e\x80\xe2\x98\x4b\xf8\xec\xe2\xba\x4b\x88\x5e\xd3\x12\xae\xcd\xad\x8c\x6b\xb4\x95\x46\xed\x6e\x65\x5c\x1b\x5b\x8a\xeb\xfc\x95\xe2\xba\xda\x1e\xc6\x35\xdd\x52\x5c\xaf\x36\x85\x71\x9d\xe7\xf9\x4e\x27\x81\x8b\x3a\x66\x34\xd4\x79\x95\xc6\xf5\x77\xfa\x48\x6d\x92\x71\x5d\x80\xa2\x9d\x8e\x6d\xcf\xe7\x18\x37\x48\x01\x6a\xbd\xe6\xc6\x75\x4b\xe3\x86\xf0\xb9\x8b\xe7\x18\x42\xb4\x7a\x2d\x8c\x6b\x3f\xc7\x6f\xba\x89\xf7\xa1\x8e\xd9\x1f\xbd\xbc\x49\xe3\xee\xde\xf4\x11\xde\x5a\x26\x01\x75\xde\x74\x43\x9d\x83\xe7\x33\xdc\x20\x06\x68\xf1\x96\x1b\x77\x5e\x1a\xd7\x87\xcf\xfe\x1b\x09\xdd\x45\xad\x5d\x69\x6d\xcf\x9a\xd9\xda\x6e\x9a\xd2\xa8\x27\x4d\x69\x6d\x5f\x5a\x64\x6d\x97\x2d\xba\xb6\x49\xf3\xf0\xda\xee\x9a\x74\x6d\x17\xcd\x12\x8d\x97\x6d\x99\xc6\x17\x2d\x31\xaa\x0b\x7e\xed\xf5\xf3\xa4\x73\x01\xa3\xdd\xb6\x45\x69\xd7\xc8\xfa\x73\x81\x7e\x69\x7c\x52\x63\xa0\xf5\x86\xe5\xf0\x58\x11\x8f\x47\x77\x16\x11\x4d\x45\x59\x22\x57\x1a\x8c\x68\x40\x66\xa9\xa3\x99\x8f\xd9\x05\x39\xd1\x16\x53\x69\x16\x6f\x89\x20\x73\x1a\x1b\xdd\xe2\x6d\x3f\x92\x87\x3a\x0f\x42\xa0\xfd\xd2\x57\x43\x5d\x9b\x0b\x2c\x62\xf0\x4b\x64\xf5\xd5\x14\x3e\x9c\x59\xe5\xa9\xa6\xc0\x5c\x98\x7d\xf5\x0c\x18\x6e\x8f\x3c\x3d\x31\xac\xca\xf7\x0c\x59\xdc\x78\x9b\xbd\x4e\xbc\xb9\x56\xd7\x50\x9b\x0e\xe8\xb8\x3d\xb3\xd5\x1b\xfd\xc1\xba\xe9\xfe\xe6\x6e\xb4\xd9\x27\x2c\x08\xc6\x93\x23\x9b\x7f\xba\x55\x97\x50\x73\xee\xd9\x5a\x18\x17\x83\x4f\x34\x78\xb7\xaa\x39\xa9\xd3\x06\xe2\x8d\x08\x55\xc4\xcf\x4d\x1e\xbd\x3d\x40\x9b\xc1\xa1\xa7\x7f\x52\xb8\xf9\x1c\xe4\x1f\xf7\x49\x9a\xf2\x56\xe3\x91\xe7\x53\x93\x45\x18\xdb\xc2\x56\x7d\xc8\xbf\x5b\x1c\xd0\x5e\x2c\x4d\x4d\xa1\x3e\x1b\xa9\x0e\x44\x13\x16\x69\xad\x3f\xdf\x62\x19\x14\x03\xae\x2c\xa5\x97\x84\xc6\x02\x10\xbd\x94\x7b\x30\x26\xcd\xce\x16\x85\xec\x3d\xcc\x40\xbc\xdb\xca\xfd\x43\x1a\x87\xc0\x5c\x80\x11\xd6\xcb\x27\x40\x28\xe1\xec\x2d\xce\x0b\xec\xab\xf3\x3d\xb0\x70\x0f\x6c\xbd\x07\xd6\x06\xf5\xb0\x94\xa0\xb2\x05\x5a\x1b\x5a\x62\x03\x67\x55\xac\xbe\x7a\x09\x16\xe0\xe4\x4a\xd7\xd4\x2d\x7f\xa8\x64\x6a\xea\x25\x98\x83\xb7\x2b\xdd\x12\x8f\x6f\xb4\xec\x21\x5e\x46\x71\xab\xaf\xfa\x10\x9b\x45\x43\x41\xd5\xc7\x0a\xda\x4c\xb4\x3e\x41\xc0\xb6\x2a\x68\x3c\xc0\xd6\xd7\x02\xac\xaf\x88\x65\x30\x07\xc1\x95\x5e\xc1\x76\xf7\x26\x33\xb8\x1e\x29\x9d\x85\xd9\x47\x7f\xd2\x60\xef\x67\xd7\xe0\xe1\xe6\x08\x1b\x43\xd9\xdb\x47\x3f\x6b\xbb\xcc\xda\x2e\xc1\x73\x53\x3c\xb2\x40\xaf\x46\xbf\xba\x85\x9f\xb5\xf0\xc1\xb3\x9f\xb5\x78\xc9\x5a\x4c\xb1\x1e\xad\xdb\x30\xd9\x2e\x31\xa4\xc9\x86\xba\xd8\x2f\x9e\xde\xdf\xb3\x4b\x32\x6e\xcd\xc8\x6c\x8b\x9d\x62\x68\x9f\x4c\xbc\x74\x1a\x59\x40\xc7\x2a\x05\xbe\x6b\x8f\x7d\xdc\x11\x37\x56\x9b\xd9\xc6\xa5\x7d\x3e\xb7\x81\xc0\xe8\x0d\xf0\x89\xdc\xbe\x59\xfc\xa5\xc4\xa4\x6b\xe5\x7a\xd8\x65\x3d\x50\x1c\x9f\xfd\xac\x87\x97\xac\x87\x97\xbe\xe8\x21\xee\x63\x3e\x63\xc3\xf3\xc7\xf1\x84\x7f\xe2\xac\x5f\xf2\xc2\x4b\x7a\x01\x23\xde\xa6\x4e\x0a\xef\x25\x70\xbd\x7b\x2d\x7b\x25\x7c\xdc\x4b\x02\xe9\x69\x84\xd6\x37\x55\xb4\x00\xcd\x0b\xcc\xf5\x60\x0e\xbc\x0b\xdd\xe2\xe7\x82\x8c\xb8\xd3\x3e\x9d\x4d\x16\xbe\x9e\x4d\xc4\x16\xef\xc9\xe8\x6b\x9f\xac\xce\x43\xfe\xd5\xc2\x74\x01\xdc\x0b\xdd\x54\xbb\x70\x0e\x56\x78\xbc\x4b\x88\x0f\x2f\x6c\x8d\xad\x3e\x6b\x9f\xbd\xda\x95\xde\xf9\xf8\x40\x7a\xc1\x9f\x3d\xce\xd4\x34\xe9\xc1\xa6\x9d\x5f\xed\x31\x46\x6d\x4d\x86\xc8\x5e\x7f\x3e\xe4\xeb\x4c\xb3\x7d\x6a\x5c\x0c\xf9\xc6\x9a\x54\xf8\xa4\x28\xb9\x5f\xc0\xfa\x9a\xbf\x75\x76\x41\x90\x3d\x6d\xe9\xb1\x57\x44\x19\xf2\x96\x68\x3a\x10\x63\x4e\xf2\xbf\xaa\x5e\x19\x8e\xf3\x0b\x3c\x7c\x01\xdb\x6b\xbe\x93\x5d\x90\x5c\x9b\xc5\xdd\x21\x19\x02\x3e\xf8\x74\xc5\x97\x7d\x7c\x8f\x0f\x4a\x97\xc0\x03\x97\x81\x81\x4d\x87\x25\x38\x0f\x8c\x21\x7b\x43\xef\x81\x65\x68\x8c\xd8\x06\xd8\x81\x25\x68\xad\x0d\x4b\x8d\xa1\x07\xb6\x6b\x03\x0b\xa8\x25\x68\xe1\xda\x6c\x95\xaf\xa0\xc9\xa4\xa7\x0f\xb5\x50\x37\xc4\x9a\xb3\xd5\xa2\x2f\x3a\xd9\xe9\x6b\x92\x39\x5d\xc9\x7b\xc3\x30\x4b\x85\xb0\x05\x62\x21\xe6\xcc\xb0\x61\xff\x76\xf4\x3e\x3e\xf7\xe0\x2d\x05\xb5\x93\xcc\x32\xca\x96\xac\x4a\xc5\x68\x0b\x83\x1c\xfd\x34\x0d\x37\xde\x19\x8c\x73\x51\x61\x58\xf6\x70\xa5\x65\xf4\xd5\x36\x64\xf3\xf5\x4d\x56\x79\x0d\xb2\xda\x56\x36\x49\x3e\xdf\x95\xd9\x67\x25\x21\xd4\xda\x66\x09\xf5\x25\x14\x73\x3c\x19\xe4\x47\xcc\x9e\x44\x67\xae\xaf\x69\xfe\xe9\xf4\x7c\x92\xaf\x3d\x16\xe0\x58\xa2\xcf\xbd\xd6\x30\x85\xd0\x80\x9a\xdf\x3b\x96\x3c\xab\x5e\x5f\xed\x92\xee\x76\xba\x76\xc6\x95\xd3\xc4\x03\x4d\xdf\x70\x75\x4c\x0c\xf8\xa6\xab\x4d\xb8\x04\x9b\xc4\xb0\xd4\x54\xf7\x40\x9c\x18\x7d\x35\xd6\x97\x20\xf2\x0d\x61\x32\xbd\x5c\xf7\xd5\xb5\x4e\x6c\x66\x43\xdb\x5d\x8b\x3d\xfb\x76\xdd\x57\xbb\xa4\x7c\x67\x68\x67\xd7\x43\x3e\xad\xf3\xeb\x91\xba\x26\x33\x71\x4d\x6d\x69\xf1\x72\x78\xde\x1f\x89\xd7\x67\x4d\xa0\xa9\x3e\xa9\x73\x62\x68\x3b\x6b\xb8\x17\x91\x37\x6b\x84\xbb\xc2\xeb\x6c\x6a\x5d\xd1\xa1\x76\x61\x8d\xd4\x13\x82\x60\x5b\xd7\xd2\xbe\xa0\xcb\xa6\x2f\x4d\xf8\xac\x3f\x3c\x92\x5e\x2f\xfd\x5b\xf9\xc9\xe2\x57\x8b\x00\x17\xfc\x01\x65\xc0\x1c\x7a\xa0\x9b\x92\x8d\xb2\x04\x9d\x54\x92\x01\xee\xc6\x20\x1e\x16\xf2\x62\x7b\x09\xde\x5e\x0d\x4b\x6d\x42\x0f\xa4\xaf\xac\xf6\x5b\x9a\x97\x01\x34\x77\xc3\xfa\xa0\x0c\x68\xdf\x7d\xab\x0c\x38\xa1\xed\xbf\x56\x06\x88\x6d\x7d\x8c\x0c\xa0\x3b\xc2\x85\x5f\x25\x03\x9a\x74\x96\xff\x04\x19\xd0\xbe\x3b\x5e\x06\xcc\x49\xf9\xd9\xd7\xca\x00\xb1\x45\x64\x19\xb0\x4b\x8c\xb5\x8e\x41\xf0\x42\x57\x2f\xe1\x12\x24\xd8\x02\x6c\xeb\x1e\x58\x37\x8d\xbe\xda\xd4\x97\x60\x95\xe4\x65\x40\x4a\xb6\x94\x5f\x92\x01\x27\xa4\xbc\x5d\x92\x01\x29\x99\x89\xbf\x57\x06\x08\x39\x71\x8c\x0c\xf0\x89\x0c\x38\x29\xc9\x00\x97\x4c\xa0\x5b\x92\x01\x62\xc2\x47\xcb\x00\x73\x6d\x7e\x52\xed\xbd\x16\x95\x95\x37\xab\xb2\x4d\x5e\x32\x4a\xae\xc9\x96\x99\x32\x5a\x0d\xfa\x8d\x11\xd6\xb6\x56\x3c\x22\x6e\x56\x34\xac\x1c\xa3\xca\xb4\x71\x0a\xd9\x56\xc6\x52\x7a\x15\x0f\x10\xf7\x4e\x0a\xaa\xbb\x3b\xf6\xfa\xed\x2b\x51\xcb\xc6\xef\x00\xe2\x4e\x9b\xc3\xa1\x94\xeb\x62\x58\x6c\xe9\xc1\x11\x16\x1c\xa9\xa8\xb5\x00\x4d\x6c\x98\x9c\x81\x39\x78\x59\x1b\x26\xde\x60\x67\x50\x38\x37\xce\x21\x41\x6a\xa9\xff\x46\x1a\x0d\xf3\x86\xaf\xa1\x25\xfa\x88\xc8\x09\x7d\x28\xc9\x69\xe9\x8a\xf8\x31\xff\x8c\x5d\x36\x27\xb3\x23\xdd\x05\xf5\xd2\xba\xc6\xf0\xc8\x99\x78\xc6\x08\x9b\x4e\x6b\x83\x3d\xc6\xed\x59\x2f\x9f\x46\xf4\x8d\x27\xa3\x99\xb1\x27\x2f\xd0\x58\xeb\xc9\xe9\x48\xc2\xec\xf0\xe9\x56\x1e\x49\x1f\x8b\x59\x62\x2a\x1c\x0a\x8f\x30\x35\x73\x4e\x8b\x15\x38\xe3\xc7\xb9\x41\x08\x5a\xe2\x3c\xf7\xf4\x6a\x96\x3c\x0f\xc3\x0a\xcf\x83\x0b\x2a\x0a\x8f\x72\x51\xf4\x66\x23\x75\x70\x2d\x5c\x14\xb3\xbb\x91\xfa\xe0\x82\xfb\xaa\xc4\x37\xf8\x48\xc5\x32\x81\xc4\xc0\x92\x74\xe9\x3e\xc1\xb1\x01\x7d\xfe\x06\xbb\xcb\x1b\x59\xda\x05\x20\x27\xf6\x25\x14\xf9\xc9\x9c\xbe\x8a\x56\x60\x77\x69\x60\xa1\x1f\x82\xcd\xa5\x21\xb2\x71\x4c\x35\xd5\x86\x1d\x9d\x63\x6e\x6a\x06\x97\x61\x86\x61\x32\xc1\xe2\x01\x0b\xab\xdf\x25\xd0\xb8\x13\xd0\x1c\x09\x27\xa0\x31\x91\x0f\x4a\x3e\x53\xd5\x9a\x21\xaa\x3e\x65\x55\x51\xe6\x53\xdc\xeb\x60\xd1\x06\xfd\x4c\x45\x18\xc6\x5e\x17\xe6\xd8\x54\x97\x44\x16\x2e\xf5\x08\xf8\x0d\xc3\x54\x7d\xb8\x06\x8b\x06\xbf\x20\xc9\x35\xb3\x44\x33\x4c\x0a\xd2\x6c\xab\x47\x60\xde\x20\x66\xc1\x1a\x74\x4e\x8c\xc9\xbe\x89\xe9\x93\x91\x8a\x8e\x22\xd7\xfa\x28\x72\xad\x01\x53\xd2\xbf\x81\x5c\x6b\x42\xae\x2d\x77\x01\x1d\x26\x57\x48\xf0\x0e\xf5\x08\x6c\x17\x26\x3e\x48\xae\x41\xb4\x30\x0f\x92\xab\x49\x9a\x35\xf5\x08\xac\x17\x26\x36\x4c\xd6\x60\xb1\x30\x27\xfb\x26\x86\xc9\xf5\x47\xe3\x2e\xff\xdb\xb9\xab\xfb\x62\x52\xee\x6a\xbd\x98\x5f\xc1\x5d\xcd\x17\x93\x72\x57\xf4\xb2\x8f\x5c\x3e\x21\xd7\xfd\x51\xe4\x9a\x1f\x45\xae\x39\xbb\x34\xfc\xed\x9b\xb1\x4c\xf8\x5a\x72\x51\x8b\xec\x04\x46\x60\xe9\x9b\xa6\x3a\x87\x6b\xd0\xf0\x0e\x93\x8b\x9e\x69\xd6\x7a\x04\x4e\x3c\xb3\xaf\xc6\x98\xca\x9e\x79\x70\x33\x4a\xdc\x35\x39\x8e\xbb\x26\xc7\x73\xd7\xe4\x77\x93\x5d\x93\x23\xb8\x2b\x0d\x19\x77\xad\x42\xd3\xaa\x68\x56\xc3\x5d\x61\xc8\xb8\xab\x11\x1c\x26\xd7\xe3\x51\xdc\xb5\x3c\x8a\xbb\xa8\x69\xb1\xfc\x1d\x36\x63\x59\x0a\xd6\x92\x8b\x9a\xc3\xae\x1e\x81\xb3\xb5\x69\xaa\x4b\xb8\x06\x6f\xeb\xc3\xdc\x45\xad\xe5\x54\x8f\xc0\x6e\x6d\xf6\xd5\x2d\xa6\xf2\xfa\xf0\x66\x7c\x38\x8a\xbb\xdc\xa3\xb8\x4b\xdc\xda\xfd\x06\xee\xa2\xa2\x9e\x5a\x49\xe1\x31\xdc\x35\x27\x78\xcf\xf5\x08\xb8\x89\x69\xaa\x2e\x5c\x83\xab\xf8\x30\x77\xc5\xa4\x59\xac\x47\xe0\x32\x36\xfb\x6a\x8a\xa9\x1c\x1f\x16\xf5\x7f\x34\xd9\xb5\xfc\x76\xd9\x15\x6f\x98\xec\x0a\x36\x5f\x23\xbb\xfc\x0d\x93\x5d\x57\xe9\x3e\x72\x2d\x81\xee\x8c\xd4\x35\x80\x1f\x65\x8b\x98\xd3\x28\x22\x71\x20\x4b\xb0\xd5\xf7\x4f\xb8\x67\xb2\xab\xbd\x36\x90\x12\x0d\x56\x6e\xb2\x9e\xc9\x9c\x6c\x97\x95\x5c\xf3\x88\x2b\x64\xfa\xfd\x2c\x35\x4d\xa2\xdf\xdf\xd2\x4a\xe4\xa1\x8c\xfc\x9c\xe6\x8a\x35\x48\xb3\xbe\xea\xea\x6b\xb0\x49\x0f\x6c\xad\x37\x30\x52\xd3\x3d\xd8\x77\x8f\xc3\x9e\xba\x55\xbb\xfb\xb1\x5f\x13\xec\xa9\x7b\x61\x0e\x6b\xb1\x3f\x23\xd8\x9f\x61\xec\xb7\xa6\xa9\x76\x31\xf6\xdb\xc3\xd8\x2f\xc9\x40\x4b\x83\x34\xeb\xab\x3e\xc6\x7e\x7b\x60\xa7\x60\xec\xff\xb8\x6b\xbf\xe3\x6b\xbf\xfb\xaa\xb5\xdf\xf1\xb5\xdf\x1d\xb1\xf6\xcb\x3d\xd8\x6f\x8f\xc3\x5e\xb6\x77\xf7\x69\xe3\x02\xa1\x2a\xb1\xcf\xb4\xc3\x59\xd3\x34\x89\x76\x78\x6b\x1e\xc6\xbe\xcb\x5c\x33\xa4\x59\x5f\xbd\x84\x6b\xb0\x69\x1e\xd0\xc1\x5f\xb5\xf6\x93\x7f\xf5\xda\xb7\xf9\xda\xb7\x2b\x75\x44\xdd\xda\xb7\xf9\xda\xb7\x8f\x58\xfb\x70\x0f\xf6\xcd\xe3\xd6\xbe\xc9\x2f\x19\x0f\x63\x2f\x8b\x88\x4a\xec\x77\xd4\xc9\x8f\xb1\x3f\x33\x4d\xb5\x89\xb1\x3f\x3b\xbc\xf6\xd4\x2f\x78\x42\x9b\xf5\xd5\x39\xc6\xfe\xec\x08\xec\xfd\x3d\xd8\xef\x8e\x5b\x7b\xea\xaa\xde\x1d\x23\xf5\x68\x12\xea\xb3\x7a\xec\x33\x33\xf2\xac\x6b\x9a\xc4\x8c\x7c\xeb\x1e\x5e\xfb\x4b\xd2\xec\x92\x36\xeb\xab\x27\x98\xf3\xbb\x47\x48\xbd\x7f\xd5\xbe\x5f\x7e\xf5\xbe\xbf\xe4\xfb\xfe\xf2\xab\xf6\xfd\x25\xdf\xf7\x97\x07\xd4\xfd\xec\x96\x5e\x66\x57\x79\xc2\x98\x0b\xe8\x05\xbc\xe1\x6d\x05\x5c\x70\x66\x54\xe5\x3c\xfe\xd8\xcf\x8c\xa2\x47\x4b\x14\xff\x2a\x59\x38\x2e\x90\x97\x8e\x79\x78\x1e\x78\x85\x09\xfc\x28\xe7\x51\x1c\x48\x7e\xb1\x49\xb5\x5f\x6c\xf8\xe8\xf6\xb2\xd6\xbf\x18\xf2\x25\xce\x31\xad\x9b\xbd\x7e\xf1\x72\x9f\xd1\xd6\x34\xf1\xf1\x68\xc8\xa2\x71\x87\x2b\x10\x5f\x99\xe4\x9e\x54\xc7\xfc\x1a\x82\xc5\x95\x49\xb6\xad\xc5\x57\xc3\xe8\x58\x7d\x75\x78\x33\x07\x43\x9e\x91\x38\xcb\x8a\x4f\x7c\x6d\x83\x15\x18\xa9\xc3\x9b\x35\xe0\xde\xb6\x41\x44\x82\x52\x71\x17\x59\x1c\x8c\x14\x6e\x45\x22\x13\x0a\x77\xff\x85\xc4\xe3\xe3\x1b\xdd\x92\x92\xb6\x0f\x44\xcc\x7c\x0a\x07\xa3\x91\xfa\x78\x33\x16\x83\x7d\x24\xf7\x6b\x63\x8b\x87\x82\x8b\x74\xe1\x37\xa3\x92\x6b\x51\xea\x62\x09\xb2\x3e\x5e\x40\x18\xf4\x6e\xe9\xb5\xd2\xbd\x66\x6a\xea\x43\x0a\x36\x61\x8f\x98\x9b\x62\x92\xe2\x2e\x8e\x3a\x65\x61\x08\x0c\x39\x28\xc5\x96\x12\xf4\xe6\x32\x3d\x4f\x68\xc8\xd8\x02\xf6\x25\x37\xe5\x50\x8a\x9b\xc8\x45\x9e\x38\xf9\xdc\x8b\x32\x74\xad\x1b\xe4\x66\x8d\xcd\xc0\xd0\x5b\x70\x74\x74\x84\xc0\x20\xff\xab\xf0\x30\x66\x98\x0f\x39\x31\xa4\x9c\xbe\x62\x53\x25\xa0\xdd\xe7\xce\xdc\x18\xbc\xf5\xfb\x95\x39\xac\x4b\x49\xe7\xf7\xc7\xa0\xcd\xc1\xf3\x8c\xbb\x82\x51\x0a\x34\x39\x56\x4c\x46\x83\x7a\xec\x38\xc4\x10\x90\xc1\x2f\x8f\x58\x2e\x3f\x04\x40\x53\xd3\xda\xa6\xdb\xaa\xa6\xc3\x7f\x5f\xd3\xe6\xb7\x35\xd5\xc6\x24\x68\xd4\xb0\xa4\x65\x1e\xe7\x29\x9f\x45\x40\x4d\x60\x03\x10\xbb\xfb\x58\x06\x7d\xe3\x7e\x70\x63\x2f\x6f\x0e\xf2\x01\x38\x72\x95\x4b\x68\xa8\x31\x94\x18\xf4\x9e\x84\x83\xf0\xf9\x1a\x79\xc6\x1b\x54\xcc\x9c\x25\xe9\xbf\x80\x24\x2a\xe4\xd8\x99\x7b\x20\xbf\xb5\x72\x51\x5c\x46\x71\xe6\xb9\x50\x3a\x56\x96\x42\x43\xdd\x49\x33\xd7\x2e\x80\xa9\xfa\x50\xf7\x75\x83\xbf\x35\x19\x90\xcb\xa3\xaf\xc0\x85\xdd\x4d\x5e\xe9\xf4\x32\xf7\x48\x5c\xfa\x26\xae\x3d\x07\x42\x54\xf6\xcc\x12\x29\xec\xfa\xe6\x57\x60\x54\x4f\x8a\x6c\xe9\x4a\xf4\x70\xa1\x41\x02\x14\x05\x01\x3e\xe1\x15\xd0\x5d\x5d\xe3\xf8\x8f\x47\x6a\x08\xd9\xcd\x34\x0d\xda\xa1\x17\xde\x03\xab\x18\xbb\x4a\x82\x0e\x97\xc0\xb8\xea\x19\xc5\xe4\xe8\xc3\x82\x94\xaf\x7a\x54\x62\x2e\xaf\xe5\xf4\xc9\x55\xc1\x7e\xe3\x8a\xbb\xb8\xda\x9b\xae\x89\xb8\x07\x1b\x57\x5d\x5f\x19\x2b\x10\x5d\x6b\xc2\x13\x16\x82\xd0\xaa\xb8\x25\xea\x37\x2c\x61\x93\x58\xe1\xb5\xe4\x68\x74\xa1\x4c\x00\x5e\x3d\xe9\xe7\xab\x0b\xe3\x69\x0b\x2b\x0c\x05\x69\x5a\x93\x3e\x13\x81\x0c\x79\x8b\x6b\x9d\x49\x85\x9c\x96\xae\x4c\x13\xa0\x71\x9b\x20\x06\x46\xbf\x9c\x34\xde\x32\xf3\x1d\xd7\xd0\x72\xd2\xeb\xdc\x98\xea\x43\x0b\x74\x3b\x3d\x2c\x8d\x9b\xa0\xd3\xe9\x95\x82\xf4\xaa\x43\xe7\x5a\xc0\x3d\x23\x66\x72\x13\x44\x67\x3d\x42\x8c\xb1\x9c\x9e\xf6\x98\x6b\xe3\x16\x08\xcf\x7a\x7d\xf5\x04\xf4\x82\xb3\x9e\xa1\xc6\x20\x05\xc2\x8c\x68\x81\xf8\xac\x47\x32\xfe\x93\x10\x14\xfc\xef\x09\x68\x82\x97\xf3\x9e\xc6\x42\xc9\x52\xbe\x2a\x4b\x7e\x73\x6d\x68\xc3\xd1\x81\xbb\xf7\x42\x34\xa3\x53\xf8\xca\xce\x83\x76\x4d\x0e\x3e\x43\xbe\xce\x2d\x90\xe2\x29\x6e\x61\x13\x04\x18\xcd\x25\x49\x40\xfe\x28\x4f\xff\x0c\x36\xc1\x2b\x86\xa5\xba\x07\xae\x2d\xf1\x88\x58\xc4\x84\x1b\xb7\xf3\x73\x12\x48\xd5\x04\x57\xb4\x0f\x0f\x3c\x58\x6c\xfe\xa4\x1e\x3d\x6a\x19\x4b\xe0\x83\x3e\xd3\x14\x8e\xa0\x24\x0b\x34\x34\xf1\x21\xb3\x05\xda\x1d\x92\xfb\x1f\xd3\x23\xc6\x93\xea\xf4\x2c\x29\x2b\x38\x95\x6b\xb6\x30\xc4\x9a\x3c\xae\x85\xf7\x58\x3c\xe3\x15\xe1\x63\x49\xe6\x84\x22\x9c\x9b\x7f\x1b\x40\x93\xa5\x10\x92\x44\x0a\x7f\xbb\x5b\xbe\xb9\x26\x21\x0c\x2d\xd0\x6d\xf7\xe8\x02\x26\xed\x5e\x46\xdb\x76\xbb\x87\xcf\xb4\x4d\xe0\x61\xac\xda\x10\x5b\xdc\x0f\x32\x6c\xad\x37\xc1\x06\xc3\xe6\x86\x07\x22\xc3\xe2\x14\x95\x88\x76\xeb\x5e\xf6\xfa\x6a\xac\x37\xc1\x05\xed\xc4\x03\x81\x99\xa3\xee\x96\x53\xb7\x79\x8d\xa9\xdb\x02\xed\x16\x59\x85\x26\x78\x6d\xf5\x78\x90\x6f\x0b\x74\x5b\x6c\x31\x17\x6d\x42\xe2\x16\x58\xb6\xc9\xaa\x92\x87\x56\x7a\x13\xb4\x5a\x3d\xf9\xd2\x7f\xc0\xd2\x72\xf3\x9d\x0d\xdf\xfa\x8c\xfb\x0a\x1b\xe8\x08\x3e\x44\xc5\xef\x4b\x09\x71\xd7\x01\xee\x9c\xf2\x24\xb1\xd9\xdb\x20\x9a\x5f\x63\xc6\xea\x80\x10\xff\x58\xc3\x36\x78\x6b\xf4\xbe\x76\xe7\x89\xfe\x7b\xc2\x2c\x94\xe2\xa9\x3b\xa0\x3d\xc7\xa4\x22\x5c\x46\x79\x6d\x2b\xfd\x6e\x93\x7f\x9b\x50\xeb\xf3\xf2\x26\x6c\x83\xc5\xe2\x1a\x57\xe8\x80\x10\xff\x58\x32\xaa\xe1\x7f\x7d\xbd\x0d\xae\x1a\xbd\x21\xdb\x36\x1d\x70\x36\xbf\x1e\xa9\xb1\x41\x1e\x57\xc1\x36\x68\xe0\x06\x2e\xd4\xce\xb2\x1b\xf9\x73\xd0\x57\x7d\x9d\xc8\xdb\x09\x9b\xd2\x16\x4f\xe9\x12\xa3\xeb\x5e\x6b\x6a\x17\x06\xa0\x09\xab\x36\x91\x0f\x3a\x24\x93\xba\x76\xc6\x1b\x1f\x8a\xfd\xb8\x80\x7d\xf5\x52\xef\x80\xf8\x05\x13\xd4\x98\xb4\x16\x95\xbb\xd8\x07\x17\xa0\xaf\x9e\xe8\x75\x03\xdf\xa6\x8b\xeb\xbe\xea\x9b\xa4\xc8\x24\xcf\xc3\x8c\x36\x78\x59\x62\xe4\x8c\x00\x60\xec\x2a\x44\x43\xd7\xbd\xee\xab\x73\xd2\x28\x25\x8d\x4e\xf4\x36\x78\xc3\x8d\x2e\xf5\xda\x46\xe1\xcb\x35\x56\x1d\x6d\x10\xcc\xaf\xf9\x95\x4e\x11\xd5\x0e\x48\xe7\x64\xf3\xb5\xc1\x1b\xae\xd5\x04\x22\x92\x39\x63\x4d\xa3\x03\x62\x4c\xd7\x13\xd0\x06\x0d\x5c\x6b\x0e\xb5\xc7\xa1\x80\xb5\xf1\x42\xd1\x00\xbf\x36\xc4\xaa\x95\x2e\xfd\x16\x4f\x11\x2f\xda\x09\x60\xcb\x7d\x46\xa0\x67\x94\x49\xf4\x36\x78\x99\x5f\x73\x29\xc9\xce\x83\x5a\x0a\x44\xec\xf8\x06\x90\xdb\x95\x18\xf0\x2a\x93\x04\xc8\x71\x93\x47\x04\xeb\xc8\xe9\xe6\x05\xdf\xb6\x80\xf8\x1a\xc4\xa0\x09\xde\xf4\xa3\x3e\x9a\x35\xce\x1b\x69\x92\x2f\xa2\xf8\x84\x26\x00\x0d\x1e\xb1\x37\xbe\x6d\x07\x64\x87\xb4\xc1\x2b\xc6\x3f\x84\xda\x92\x3f\x7a\xe5\xdb\x07\xd3\xf4\x65\xce\x88\x23\xe2\xfd\xc9\xbe\x35\x33\xe0\x25\xe8\x80\xf5\x9c\x6c\x1d\xbc\xfa\xb1\x4e\xd8\x87\xfc\x4e\xf5\x36\x38\xc7\x43\x4a\xde\x84\x16\xd8\x8a\x07\x02\x4d\x90\x88\x17\x02\x01\x38\x17\x8f\x0c\x6e\xdd\x55\xcd\xf0\xcd\x6f\x1f\x9e\x9a\x74\x2d\x30\xce\x46\xbf\xc9\x06\xbf\x10\xef\x13\x7c\xe0\x0e\xfa\x84\x31\xdc\x39\xe1\x90\x36\x68\x08\xb2\x4d\x38\x53\x12\x6e\x8e\x4d\x0d\x4f\x8f\xfc\xde\x99\x5a\x4f\x53\xb7\x64\x1f\x9c\x18\xa4\x0d\x3e\xbc\x77\xc0\x0e\xff\x08\xf5\xc9\x66\x55\xb3\x29\xb7\x83\xbe\x1a\xc3\x0e\x68\xe2\x8a\xbe\x8e\xbb\x59\xd3\xbc\x1d\xa4\xfb\x1d\xc1\x28\x36\x68\x07\xe5\x5d\x1b\x82\x57\xc8\x5f\x20\x17\x37\x47\xfe\x9d\xc2\x43\x51\x3f\x4a\x8f\xbe\x34\xf1\x89\x05\x61\x30\x0d\x89\xef\xab\xfe\x05\x42\xf6\x81\xa9\xb8\x30\x78\xe1\x34\xdf\xab\x78\x32\x26\xbf\xa2\x1a\x91\x6b\x95\xa9\x55\x8c\x55\x9b\xdc\x75\x80\xe0\xe7\xa9\x0b\xfa\x6a\x53\xd7\x42\xb0\x3f\x48\x72\x05\x46\xea\xd6\xd0\x76\x40\x84\x41\xe2\xa3\x62\xd3\x20\x91\x4f\xfb\x3c\x76\x0d\xc0\x23\xa6\x63\x9d\x44\xe9\xb1\x6d\xb6\x81\x23\xe6\xca\xbb\xd4\xb5\x26\x9c\x88\xa6\xf7\xb7\x25\xc4\x1d\xf1\xc5\x25\xf6\x0c\xbd\x4f\x1c\xeb\x53\xab\xe8\xf4\x18\x0b\x32\x4d\xf2\x6b\x34\xac\x38\x2b\xa3\xfc\x79\xa2\x77\xe0\x13\x2d\xe4\x84\xd9\x05\xda\x16\xfc\xb6\x61\xb3\xc1\x1e\x44\xbe\x81\x2c\x90\xd7\x12\x5f\x58\x3b\x81\x2b\xf0\xc2\xcd\x90\x71\x08\x5c\x6c\x85\x18\xda\x58\xbc\x40\x1d\x69\x1f\x49\xe0\xaa\xcd\x23\x50\xef\x5a\xd7\xa6\x58\xd7\x6e\xaf\x8f\x39\x7d\x29\xde\x7a\x5e\xf6\x49\x44\x67\x6c\xde\x5d\xf4\x2c\x11\xd4\x4d\xea\x9d\x15\xca\xdc\x3e\x36\x78\xb4\x9e\x78\xb0\x73\xdd\xc7\x5b\x73\xc2\xbb\xea\xf6\xb5\x5b\x3c\xf4\xdd\x4b\x5f\x6a\xb5\x1b\xf4\xe9\x91\x8d\xad\x3c\x79\x91\xa3\x0d\x86\x3c\x38\x39\x27\x62\xd9\x42\x1a\xc2\xd4\xbe\x1b\xe1\x21\x6d\xf6\x91\x3a\xfa\x1e\x6c\x90\xc5\x50\x0f\xd9\xf5\x3d\x27\xa5\x0b\x64\x76\x13\xdd\xfc\xe2\xdd\x30\xba\x7e\x43\xd8\xe0\x43\xe1\xcb\x8e\x03\xc9\x86\xcd\xe5\x87\xf9\x8d\xc1\x89\xbf\x73\x87\x35\xd3\x26\x4e\xce\x87\x76\x1f\xd3\xf5\x97\x56\x9f\xbb\x39\x1f\x9a\xfd\x5b\xbc\x6f\x9b\x82\x31\x06\x59\xa4\xaa\x9f\x7d\x72\xd1\x07\x24\x00\x37\x34\xef\xde\x06\xd2\x22\xc7\xa3\xbe\x74\x2e\xb7\x8f\x78\xb5\x2a\x69\xe4\x0e\x38\x87\x5c\x0f\xb7\xc1\x09\x3c\xa4\x87\x51\xde\x3f\x30\x38\x36\x10\xfe\xbe\x6a\xff\xae\x40\x32\x32\xc4\x6e\xda\x8d\xcc\xfd\xef\x2e\x9f\x89\xb3\x71\x09\xac\xaf\x7d\x9e\xaa\xbd\x02\x72\x3c\x75\xe1\xb0\xe2\x29\xa6\x47\xe3\x8f\xe9\x6b\x87\x2d\xb4\x8a\x5f\xb5\xcc\x7d\x28\xaa\x05\x89\xd3\xe0\x12\x56\x5d\x09\x35\xe8\xab\xd4\x50\x17\x5e\xa2\x95\x4e\x1e\xf3\xec\xf4\xc3\x8f\x45\xc5\xa3\x38\xe9\xbd\x62\x95\x43\x8a\x2a\xaf\x0e\x68\xf1\xef\x7b\x4d\xda\xe0\xb2\x37\x92\x1b\xef\xb2\xc6\x43\xe9\xf8\x27\x34\x59\x07\x78\xd7\x59\xe3\xf6\x75\xf5\x59\xa8\x9e\x93\x8a\xcf\xf6\xaa\x94\x71\x65\xc3\x71\x85\x9f\x89\x35\xf9\x68\x62\x61\x73\x7f\xe4\x53\x87\x73\xb0\x0e\xb1\xe1\x04\xcf\xc0\x62\x85\x6d\x61\x9d\x5c\xf5\xf0\x85\x78\x01\xf8\x98\xa9\xc5\xdc\xdb\x30\xd5\x12\x30\xc2\x3a\xb5\xcd\xcf\x2d\x4b\x40\x9e\xf1\x56\x3d\xe2\xc9\xa6\x6f\xd4\x3d\xe7\xa9\x7e\x0b\x2e\xe1\x55\xf5\x21\xbc\xba\x97\xe0\xe5\x5d\xe1\x7d\xca\x76\x45\x78\x4f\x4e\x48\x7e\x59\xc5\x15\xe6\x39\xae\x7b\x76\x34\x14\xd0\x75\xd5\x8c\xab\x66\x47\x89\x76\x77\xf1\x90\x19\x25\x27\x0f\xdc\xd8\x5f\x81\xe0\x41\xf0\x40\xee\x5b\x51\x46\x08\x2e\x1f\xfa\xf4\x09\x7d\x61\xfd\xc7\xf9\x89\x49\xde\xbe\xbd\x5b\xfe\x86\xb8\x35\x26\xe2\xb0\x79\x4b\xfc\x24\x8f\x97\xa0\x92\x39\x32\x75\x0d\xf7\x08\x83\x5f\xaf\x80\x1a\x43\xcd\xfe\x4d\x9d\x3c\x5d\x01\xf5\x04\x68\xce\x6f\xea\x64\x76\x05\xb0\x58\xc2\x12\x6d\xcc\x1f\x78\x90\xf7\xf0\x31\xb0\x2a\x0d\x15\xea\x38\xbd\xf3\x7e\xcd\xd6\x25\xfc\x35\x73\x98\xbe\x3e\x72\x97\xc5\xd4\xe4\x9e\xa0\xdf\xa4\x0e\xbf\xa5\xf1\xc3\xe5\x63\x4e\x8e\x53\xd0\x2f\xad\x47\x83\x24\xb5\x78\x18\xa9\x21\xfc\xa5\xf3\x30\x29\xd5\x19\x3e\xb4\x1f\x6e\xd5\x36\xbc\x6b\xfd\x22\x76\xf2\xb4\xf9\x0b\x79\xc4\x15\xc3\x12\x41\x32\x6b\xee\x31\x6f\x6b\x17\x0d\xde\xc7\x15\x78\xfb\x95\x13\x86\x72\x28\xd6\x05\x7a\x99\xc4\x77\xe7\x76\x46\xd8\x4b\x3b\x23\xac\x67\xcb\x84\x9d\xff\x9b\x08\xbb\xb5\xcd\xf2\x16\xf9\x65\x65\x0b\xc2\xce\x29\x61\xe7\x95\x84\x4d\xcb\x84\x9d\x43\x6d\x6e\xfc\x26\xc2\x06\x4f\x79\xc2\xee\x80\xd6\x36\xf6\xf0\xae\x51\xf5\x85\xbb\xbb\x37\x27\x23\x7b\xdb\xc9\xc8\xde\x78\x92\xc9\x8e\xfe\x3d\x54\x5f\x3b\x26\x27\xf5\x8b\x23\x48\xbd\x03\x84\xd4\xa8\x8a\xd2\xf3\x32\xa5\x77\x40\xeb\x9a\x5f\x4b\xe9\xec\xec\xf9\x28\x91\x2d\xe8\x11\x93\x62\x2b\x4e\x07\xd8\x8c\x9a\xe5\x97\xe1\x12\x68\x5d\xfe\x6a\x50\x3e\x04\xae\xc0\x79\xa1\x66\x17\x6a\xe1\x75\x96\x90\x67\x75\x3d\xc2\x8a\x73\x7b\x3d\xe4\xb3\x79\xbd\x26\x99\x3d\xce\xa4\x4a\xe7\xb4\x68\x6e\x89\x4a\x0b\x6b\xa4\x2e\xa1\x16\x5a\x59\xa5\xc1\x48\xbd\x04\xe7\x60\x8e\xb5\x33\x4b\x25\xe1\x82\x56\xc8\x1f\xfe\x7d\xfb\x13\xa2\x87\xf5\x33\xed\x3a\x5d\xd1\xaf\xe4\xd2\xae\xcf\x45\xd7\xc3\xc7\x05\xb8\x95\x1e\x5c\x1d\x9b\x29\xc1\xc8\xdf\xf3\x3f\x88\x43\xff\x7d\xdd\x3d\xcf\xa0\x05\xc4\xdd\xd2\x1c\x34\x41\xcf\x10\x7b\x8f\x3e\xfb\x7b\xa8\xbe\x54\x62\x54\x9b\xf4\x69\xd7\xa5\xd4\x6c\x34\x67\x98\x65\x49\xe9\xe0\xf6\xbc\xee\x8a\xc0\x13\xbf\x61\x19\x67\x3e\xf4\xf1\xcd\xaf\x59\x5c\x58\x13\x74\x85\x2b\x4a\x72\x04\x64\xff\xfc\x4a\x1e\xb9\xcd\xc1\xb0\x3a\x0d\x07\x65\xc2\x0b\xe0\xaf\xad\x91\xea\xc3\x2e\x88\x22\x8b\x18\x40\x5b\x60\xed\x4d\x20\x93\x51\xbe\x05\xc8\x2e\x38\xe1\xae\xb7\x41\x04\x12\xa8\x55\xf8\xfe\xd7\x60\xae\xf3\xb0\x94\x07\x61\x9b\x50\x91\x10\x81\x0b\x9d\x5b\xe5\x6b\xd0\xd4\xfb\xea\x19\xb8\x00\x97\x2b\x32\x99\x2e\x88\x56\x56\x85\xe7\xe3\x02\x34\x57\x56\x5f\x0d\x41\x17\xbc\xe0\x9a\x21\xc9\xc5\x71\xac\xeb\x9d\xba\x92\x2e\x40\x88\xfb\xd8\x81\x2e\x58\xe0\x3e\x76\xa4\x8f\xe3\x73\xd0\x32\x87\xd4\xb4\xcf\x02\x05\x18\x51\x4c\x82\xe8\x80\xa7\x3b\x82\x6f\xbd\x3e\xcd\x6e\xfb\x8d\xd7\x12\x55\x8f\x13\x27\x99\x65\xe5\x14\xd8\x57\x23\x27\xae\x2b\x10\x6e\x29\x4a\xda\x96\x7c\xc8\x5b\xdb\x00\xf9\x3f\x6b\x5c\x78\x09\xde\x36\x56\xc7\xfc\x9d\xa7\x13\x82\xbe\x94\x70\x29\xbb\x83\x9f\x4a\x1f\xce\x17\xa7\x96\x0b\xd0\x15\xa7\x96\x2e\xe8\x5c\xcb\xdf\xe2\x7e\x64\x87\xd9\x96\x78\x33\x19\x82\x36\xe8\xc2\x6c\x43\xf2\xb4\x26\x55\x08\x54\xde\x99\xed\x91\x09\x37\xc4\x11\x38\xa9\x48\x3a\x73\x47\x0e\x80\xb6\x9c\x86\x64\x28\xc6\xb7\x2b\x30\x95\xcf\x67\x8f\xfc\x4e\x79\x5b\xb2\x83\x2b\xf9\xaa\x57\x41\x66\x2b\x97\xd8\x64\xcc\x98\xf7\x52\xcf\x08\x77\xce\x7d\xed\xc6\x01\xb9\x92\x80\x57\xe1\x43\xbf\xa1\xe1\x69\xe4\x12\x17\x1f\x37\x33\xba\x0e\xfb\x2c\x02\xa8\x70\x66\x1c\xe6\xb5\x5c\x29\x22\xa2\xec\x6c\x1b\x48\x6c\x24\x8e\x96\xc5\x08\x26\x0f\x24\x86\xa1\x9e\x81\x25\x98\x9b\x50\xed\x82\x2b\xb0\x4e\xac\x6b\x12\xf6\x70\xd6\x23\x41\xed\x01\x94\xff\xb3\xc3\x85\x97\xc0\x4b\xac\x4d\x69\xb9\x7a\x1e\x78\xe9\x8d\x48\x94\x69\x97\x64\x08\xd4\x42\x60\x49\xd2\x78\x9c\x7f\x1c\x3d\xae\xbe\x85\x8e\xc0\x35\xd1\xc7\x60\xc0\xf8\xc8\x12\x7c\x64\x69\xaf\xe0\x06\xab\xd8\x36\x18\xf3\x2d\xdd\x01\x1f\xd5\x2d\xd4\x4e\xc0\x58\xfa\x56\x34\x53\xed\x0b\xf8\x91\xa0\x74\x99\x1e\x81\xd2\x6b\x2c\x50\xca\x26\x3a\xd6\x12\x78\xa3\xae\xa1\xb6\xd6\x07\x74\xc4\x89\x16\xe9\x37\xb8\xb3\x9d\x3e\xa0\xb4\x8f\x33\xef\x36\x22\x9e\xfc\x12\xb7\x9d\xeb\x37\x24\xda\xc5\x60\x2d\x86\x1e\x58\xf4\x47\x39\xaa\x2f\xb7\x47\x4c\xb1\xb1\xf9\xef\x44\xf5\xf6\xeb\x11\x28\x45\x9b\x7f\x27\xd5\x4f\x76\x47\x4c\xf1\x7c\xf7\xdf\x89\xea\xdb\xe6\x31\xdb\x77\xf7\xaf\xa6\x7a\x57\xa2\xfa\x59\xeb\x88\x29\xbe\xb5\xea\xa9\xde\xfc\xc3\x51\x7d\xdd\x39\x66\xfb\x36\xff\x75\x54\xd7\x22\xe3\x93\x8a\xb4\x1d\x98\x7c\x35\x79\x5a\xe0\x56\x6d\x62\x2b\xe6\xdc\x22\x97\xe2\x9a\xdf\x23\xaf\x1c\x16\x50\xfe\xcf\x1c\x17\x5e\x82\xf3\x33\xeb\xed\xba\x42\x6f\x7f\xc2\x7a\xbb\x0b\xee\x2b\x28\x7c\x01\x3e\xa9\x4d\xa8\xcd\xe1\x23\xa7\xf0\x02\xfe\x4a\x32\xe3\xc0\xc7\x32\x85\x23\xf8\x2b\x99\xcd\xb6\x7b\xc4\x6c\x2e\x3a\x62\x36\x32\x85\x3b\xf0\x13\xa6\x4e\x53\xbf\xe7\x14\x6e\xe9\x9f\x70\x67\x97\xfa\xfd\xb1\x14\x7e\x31\x3e\xa9\x27\x40\x5b\x1b\xf7\xdc\xd0\xb1\x3f\x91\x87\x0f\xcc\x42\x46\x1d\xf0\x3a\x32\x59\xd4\xe0\x12\xb6\x41\x7b\xc4\x21\x34\x8d\xaa\x48\x82\x8a\x3a\xe0\x65\xcc\xe3\x93\x9a\xb0\x0d\xc2\x31\x87\x68\xb3\x5b\xcc\x7c\x4b\x30\x61\x05\x57\xa0\xdb\xb6\x6e\x59\x8c\x41\x9b\x05\xa2\x5c\x82\xc5\x99\x45\xae\xaa\x9b\x40\xb4\x6c\x01\x12\xae\x20\x32\x38\x22\x41\x43\x44\x62\xb2\x7d\x4c\x5f\x7e\xc4\x5d\x4e\xb4\x15\xf5\xad\x8b\x38\x3d\xa4\xbd\x42\x72\xf9\xd7\x84\xd9\x3c\x17\x93\x3e\x8b\x80\xf4\x61\x1b\xf8\x13\x31\xda\xf8\x96\x3c\x7b\xb0\x44\xa4\xce\xf9\xc4\x54\x5d\x16\x2b\xd9\x06\x27\x13\x71\x6e\x20\x69\x70\x05\xee\x6b\xd0\x01\xd1\x2d\x4f\x3c\xb6\x83\x6d\xb0\xbd\x65\xa0\x18\x60\xec\xcf\x24\xec\x63\x70\x05\x76\x18\x7d\x1a\x80\xd1\x64\xd1\x38\x97\xe0\xbc\x63\x91\x5b\x7b\x81\xfe\x80\xa0\xdf\x95\xd0\xa7\xae\x59\x9b\xfd\xc4\x04\x58\xca\x04\xd8\x52\x02\x34\x25\x02\xac\x01\xa1\xc0\x99\x44\x81\x41\x07\xac\xee\xfa\xd2\x9a\xa6\x77\x1c\x02\x83\xfb\x5b\xcc\xa7\x87\x8e\x16\x95\xa6\xf0\xbd\xb8\xec\xbd\x17\xe1\x63\xa5\x30\xf2\x87\x0a\x1b\xd2\x05\x1b\x30\xe0\x36\x64\x0a\x66\x7d\x75\x8a\x8d\x63\x3b\x1f\x58\x6c\x68\x33\x72\xf7\x21\xc2\x32\x26\xd2\x69\x21\x00\xc4\x9d\x11\x8b\xbb\x31\x63\x03\xb2\x14\x75\x20\x3b\x38\xfa\x20\x05\xaf\xf4\x3e\xb8\x0d\x78\x6a\x71\x63\x03\xee\xf9\xbb\x17\x5a\xb9\x29\x2a\x27\xb0\xaf\x9e\x80\x06\x70\x93\xbe\xa6\x9e\x80\x13\x70\xb1\xee\xf3\xb8\x10\xcd\xea\xab\x0f\x1a\x0f\xb0\x3c\x74\x4c\xec\x69\xd2\x49\x95\x1d\x7a\x2d\x39\xa9\xe3\x58\x24\x0d\x7c\x28\xde\xa0\x8b\xa0\x02\xfa\xf7\x39\x79\xfa\xe3\x82\x33\xd0\xd4\x33\x23\xdb\xec\xb3\xc7\x21\x8f\xc2\x73\x60\xe7\x8d\xfc\x49\xfe\x52\x9e\x67\x47\xaf\xc8\xfc\xee\x02\x7c\x7e\xd9\x81\x0d\x58\xf0\x04\x5a\xbe\x74\xd3\x48\xf1\x4a\xc1\x99\x51\x31\x46\xa1\xe7\x87\x52\xcf\x7d\x53\xdd\x82\x0d\x38\x37\x2c\xe9\x82\xc0\x90\xc7\x48\xc1\x99\xc9\x6f\xba\xec\x3c\x31\x26\xf9\xf3\x5f\xf1\x96\xa9\x90\xc5\x71\x8a\x49\xbc\x3c\xe2\x02\x67\x5c\x77\x95\x33\xd9\x64\x51\x42\x78\x62\xfe\x75\x5f\xbd\x6f\x80\xee\x8a\x06\x09\xeb\x9a\xea\x9c\x80\xb7\x55\xdf\xa8\x4e\x1a\x34\xcc\x1c\x44\xac\x91\x33\xb9\xda\xf6\xad\x1a\xde\x5c\xd3\xde\x2f\x69\xef\x93\x04\xd7\xac\x66\xcc\x93\x1e\x49\x3c\xca\x69\x38\x08\x40\xc3\xc4\xe7\x73\x1f\x74\x4d\xcc\x96\x43\xeb\x1b\x12\x56\x15\x9d\xae\xf8\xa8\xea\x02\xcd\x1e\x16\x59\xbc\x57\xc1\xe2\xbd\x7c\x3a\xd1\xc2\x63\x98\xa1\x76\x4f\xae\x1f\xad\x6c\xc2\x9d\x6b\x3a\xe1\x94\x9c\xd2\x27\x5f\x3d\xe1\x3b\xc2\x22\xce\xf1\x93\x63\x53\x7a\x26\x89\xc8\xb1\x44\x7e\x2c\xca\x98\x00\xdc\xaa\x3e\xdc\x80\x97\x7e\x75\xdc\x6f\xb3\x6f\xaa\x73\xfd\x04\x2c\xa2\x3e\xc9\xaa\x70\x09\x1e\x79\xbd\x06\x88\x57\xfd\x4f\x04\xba\xc2\xd0\x50\xd7\x7c\xf8\x28\x02\x5c\x03\xf8\xab\x1a\xc2\x0d\x08\xac\xca\x58\xc3\xcb\x37\xd2\xe1\x09\x38\xc7\x6d\x97\xba\xd6\x85\x8f\xbc\x5e\x03\xf8\xb8\x67\x0c\x5d\xc4\x7d\x53\x5d\xeb\xda\x52\x7f\x64\x4d\x7b\x9a\xfd\x2b\xc9\x6a\xc0\x8d\xb0\x00\xbc\xde\x50\xba\xc6\x37\x7d\xd5\xc1\x8c\xb0\xce\x38\x53\x62\xd2\x4c\xc0\x4a\xa1\x4c\xf3\xec\xe7\x43\xf1\xfe\x3c\xdb\x26\x77\x24\xd0\xfd\x71\x58\x3e\xcf\xdf\x8f\xe8\xd3\x35\x2e\x94\x68\x66\x76\x4b\xf8\x3a\xfa\xe4\xea\x6a\xcc\xd2\x5e\x19\x1b\xb0\x19\x9b\x15\x41\xc0\x29\x38\x19\xf5\xd5\x35\xdc\x80\xab\x71\x55\xec\x6f\x0a\xba\x63\x2c\xf2\x37\x60\xf3\x91\x4b\x91\x14\x6c\x27\x3c\x3f\x2e\x6c\xdd\x8e\xea\x5d\x39\x55\xbe\xa8\x89\xf4\x5e\x2d\xab\x62\x94\x1f\x45\x4d\x5e\xc1\x03\x97\xd8\x5b\xf0\x91\x68\x52\xee\x46\x1f\x6a\xd7\xc4\x06\x1a\x0e\x8b\x9f\xeb\x18\x56\xdc\x9d\x5a\xda\xdd\x48\x9d\xeb\xc4\xdc\xe7\xef\x12\x57\xa0\x8f\x8b\xb6\xa2\x68\xa0\x61\x7d\xb5\x05\x24\x9a\x96\x76\x00\x37\xb0\xc6\x4f\x75\x0e\x7a\xf2\xba\xd2\xa9\xf7\x6c\x3e\xdd\x1d\xf8\x95\xbd\x2c\xac\xca\xdb\x5b\x78\x9a\xf0\x58\x4c\x0c\x9c\x21\x60\xec\x0f\xb8\xba\x23\x6b\xfe\x68\x15\x2f\xfa\x73\x99\xbb\x2a\x83\xce\x16\x80\xc8\x9b\x30\x97\xca\xeb\xb8\xa4\x5e\x16\x5d\x08\x16\x94\x6c\xbc\x01\xdb\x94\xfd\xdd\x94\xaf\xc6\x3b\xf0\x82\x87\x80\x6f\xc0\xb0\xe4\xcc\x93\x6d\x0e\xbe\x26\xb6\x81\x63\x55\x06\x29\x94\x27\x8c\x7b\xc3\x06\x74\xd5\x0b\x52\x43\xe6\xa7\x92\xd7\x1b\x6e\xc8\x37\x3c\x0a\x5e\xb8\x17\x38\xbf\x11\x99\x3d\xe1\xd5\x40\x64\xf6\x1c\x18\xaa\xab\xb7\xc0\x5a\x58\x35\xc3\x0c\xab\x61\x13\xbc\xe0\x2d\xa7\xb7\xc0\x12\x98\x22\x57\x65\x16\xce\xd8\x04\x0b\x58\x1e\x6c\xf8\xcf\x19\xac\x0d\xae\x40\x9f\x7e\xb2\x26\x93\x0e\x92\x3f\xd9\x83\xdd\x3e\x1b\xd5\x5a\xc2\x4e\xdf\x2c\x06\x41\x18\x75\xa1\xbc\xd4\xd7\xdb\xc9\x8c\xc5\x7f\x52\xfe\xb9\x25\x78\x1e\xa9\x63\x0f\xcc\xc5\xa3\xd8\xd9\xcd\x88\x65\x8c\x9b\xc3\x5e\xb6\x33\x67\x23\xd5\xce\x98\x95\x3c\x9d\x7a\xac\x7c\xd2\x39\xce\x27\xef\x96\x62\x6c\x36\x80\x07\xda\xb6\xc1\x1c\x9a\x2a\x82\x2f\x7a\x05\xcb\xbd\x40\x27\x4b\xff\xe9\xc2\x4f\x55\xb1\x9b\xd7\x56\xf6\xb0\x69\xd2\x3f\x66\xdb\xf8\x40\x5f\x43\xbc\xe3\xf6\x0c\xca\x1f\x3f\xd5\x0f\x2a\x9e\x47\x1d\x37\xe8\x9a\x0e\xfa\xef\x40\xf4\x71\xcf\x98\xdc\xf4\xac\x1f\x53\x18\xc0\xc7\x8d\x19\x96\xf0\x9c\x1c\xc6\x73\xf2\xbb\xe0\xe9\xec\xc1\x93\xbf\x95\xab\xc7\x53\xe4\x95\xfa\xaa\x31\xed\x3d\x78\xf2\xcb\x96\x7a\x3c\x45\x72\xa6\xaf\xe2\xa1\x7f\xe9\x7a\x2e\x01\x7c\x1a\x49\xef\xf2\x07\x15\xb6\x82\xb8\x4c\x74\xf8\xae\xb6\x9a\x24\xa1\xfa\x8e\xdc\xa8\x3c\x08\x23\x97\x05\x43\x8a\x8f\x07\x14\x7d\x4d\x17\x80\x47\xff\x1b\x97\xf8\x44\x3c\xae\x50\xda\x85\x23\x5d\x95\x2e\x7e\xbc\x02\xf7\x5c\x58\x5e\x82\x9b\xbe\x8a\xa4\xac\x0e\xfc\xf0\xc9\xc4\xef\x84\x1f\xa1\x1c\x61\xb9\x35\xc9\xb5\xe3\xfe\x83\x53\x41\x4f\x8f\xf3\xcf\x9d\x26\xda\x3d\x96\x69\x0d\x98\xc5\xad\x0d\x44\x86\xab\x10\x5c\x9b\x72\x52\x20\x32\x3a\x5f\x20\x9a\x89\x42\x7c\x7a\x44\x8f\x21\xb6\x2a\x8e\xeb\x29\x2c\xf6\xd4\x2d\xf6\xf4\xbb\x4d\xe9\xf1\xb8\x8e\x50\xa1\x9f\xed\x3f\x6d\x42\xce\x71\x1d\xb9\xc5\x8e\x9a\xc5\x8e\xec\xe3\x3a\x9a\x17\x3b\xda\xfd\x13\x48\x04\x6f\x4d\xf6\xc2\x79\xa0\x69\x63\x39\xe1\xad\xa1\xc1\x8f\xf8\xc0\x37\xe0\xbe\x1c\x7a\x26\x32\x3f\xb2\xd7\xf3\x47\xd6\xb7\xee\xea\xbf\x9a\x31\xce\xa7\x4e\x96\xf2\xfe\x6e\xe0\x96\x7f\xd8\x67\x9c\xc2\x64\xd0\xe7\xf3\x5f\x40\xbe\x7d\xc7\x73\x08\xe5\xeb\xeb\x63\x3c\x69\x95\x89\x8b\xa7\x15\xcf\xa6\xf7\xbc\x77\xda\x80\x5f\x2c\xc9\x36\xb2\xa4\x04\x1a\x29\xd0\x47\xaa\xb3\x01\x3c\x67\xeb\x30\x05\xe4\xed\x46\x04\x1e\xf9\x02\xb8\x83\x35\xf8\x94\x0b\xb5\xa4\x6d\xc9\x92\x2c\x81\x38\x64\x8f\x45\xfa\xf2\x75\x16\x81\x5e\x86\xf4\x0c\x35\x85\xf8\xe8\x97\x02\x6d\x30\x94\xc3\xdd\x69\x02\x0b\xd8\x82\xb7\x92\xc5\x58\xf5\x5c\x4c\x7e\x97\xda\x33\x25\x33\x2b\xf3\xb8\x19\xd0\x34\xbf\xe6\xfa\xbe\x57\xbe\xbe\xf7\x20\x3f\x41\x8e\x97\xd0\xe8\xcb\x3c\x38\xa8\x7a\x9d\xbe\x81\x1f\x35\x91\x2a\x2a\x85\x0f\xc6\xb1\x47\x9e\x4f\xe4\xd8\xe0\x54\x69\xc3\x69\xbf\xf4\xd9\x80\xaa\x57\xdf\x13\x3c\xff\xfa\x53\x98\x0b\xb4\x8f\x58\xee\x79\xf0\x05\xf0\x03\xf4\x24\x3b\x40\x4f\x96\x70\x0e\xfa\xea\x19\xf0\xe0\x35\xf7\x30\x4d\x32\x23\x7f\x42\xb0\x17\x09\xa3\x7c\xb0\xef\xdd\xfb\x40\x8b\xe8\x09\xb5\x09\x8e\x3d\x36\x5d\x00\x72\x5a\x73\x85\xeb\x9a\x7e\x90\x69\x07\xb5\x10\x0e\x4b\x27\x6e\x4b\x73\xf8\xcb\xab\xf2\xc5\x8b\x6e\xaa\xa1\xee\xc1\x04\x88\x33\x9e\xf6\x6b\xf6\x44\x18\x2e\xf1\xd2\xeb\x1e\xf4\xb2\x98\x27\xed\x31\x7b\xa0\x0d\x63\xa0\xa9\x27\x50\x43\xe2\x15\xd5\xf3\x48\xdd\xe9\x9a\x2f\x3c\xc9\x96\x1c\x56\xb1\x02\x23\x75\x6e\x68\x29\x77\x1d\x49\x31\x17\xd6\x15\xe8\xe8\xb7\xea\x0e\x5c\x02\x9f\xd2\xb1\x6e\xba\xe9\x81\xe9\xc6\x07\xa6\xbb\xd4\xf3\xd3\x3d\xdb\x3b\x5d\xbf\x7a\xba\x83\xef\xd3\xfd\xe7\x4f\xb7\xf9\xdf\x65\xba\x9a\xf3\xab\xba\x04\x1e\x0c\xae\xb9\x33\x6d\x09\xfd\x6b\x72\x4d\x66\x89\x9b\x98\x2c\x6c\xbd\xdf\x57\x2f\x89\x13\x8f\xe9\x50\xf8\x46\xc2\xde\xaa\x3e\x14\x37\x79\x85\x0f\xa6\xc8\x8c\xba\x85\x1f\xab\x3e\x9a\xf8\x71\xa4\xa6\xba\xb8\x4e\xab\x91\x19\x4f\xa3\x9c\xb1\x53\x1c\x82\xe7\x64\xab\x1f\x62\x77\xcc\x10\xff\x02\x2c\xe2\x3d\x43\xf8\xf4\xfb\x14\x7b\x86\x08\xff\x20\x58\x6c\xf7\x0c\xc1\x33\xbb\xd6\x0f\x11\x1f\x33\x44\xba\x67\x08\x9e\x8d\xbd\x7e\x88\xf5\x1f\x60\x2d\xe0\x02\xdc\x4a\x5f\x6f\x1e\x76\xa0\x7f\xc3\x0d\xc6\x36\x7c\xb9\xe9\x57\xfa\xbe\x0a\x79\x71\x0c\xe9\x7b\x76\xf9\xc7\xa8\x6f\x70\xa0\xa9\xf6\x0e\xe6\xf2\xff\x31\x6b\xe3\x0d\x5a\x26\xfb\x0c\x4e\x1b\xee\x20\x14\xdf\x39\x78\x90\x53\xaa\x54\x86\xf7\x19\xda\x90\x07\x19\xb2\x4c\x18\x09\x34\xb1\xc1\x64\xc8\xdf\xc1\xc9\x3e\xe6\x46\x8d\xb8\x73\x38\xe7\xb8\x4d\xce\xe0\x85\x30\x86\x63\xb0\x3f\x8b\x18\xca\x9f\xba\xc7\x92\x99\x26\x8e\x97\x11\x1c\x73\xbb\x6c\x0d\x3d\x6a\x6d\x20\x11\x75\xf2\x8c\xcf\xb5\x7e\x66\x7c\x04\xe4\x15\x7d\x0a\xac\xa2\xe1\x64\x10\x5f\xfa\x63\x96\x98\x82\x24\x33\x70\xbe\x3a\x4f\x41\x31\xed\x4e\x46\xc4\x12\xb2\x4e\x31\x65\x5a\x04\x7f\x35\x2a\x2f\xff\xd6\x10\xc9\x5e\xfd\x31\x21\xfa\x23\x3e\xaf\x33\xd3\xdf\x34\xd9\x47\xb3\x1f\x8a\xcf\x2b\x07\xb2\x83\x60\x98\x3f\xa9\x1f\x9b\x4a\xae\x74\xca\xe9\x09\xa2\x8d\x4d\x4a\xa3\x69\xfe\x3d\xb0\xfc\x44\xc1\x10\x66\x61\x0f\x2b\xa8\x0b\xd0\xe1\xd7\xf4\xcb\x4c\xeb\x4d\xf3\x2f\x68\x6b\xcb\x26\x85\x87\xb1\xb4\x62\x17\x74\x81\x59\xf5\xde\xf5\x02\xbc\x01\x7c\xc0\xe8\x82\x14\xf4\xc9\xe0\x09\x7f\x14\x3f\xec\x82\x26\x18\x31\xfd\x5b\x3c\x76\x0c\xc8\xdd\x30\xcc\x40\x8f\x02\xf4\xa8\x09\x85\x56\xc5\x18\x1c\x31\x92\xfd\x52\xac\x08\x5d\x4e\x4a\xbd\x2b\xe8\xb7\x6e\xfa\x6a\x0a\x2f\xe1\x5b\xeb\x06\x9f\xba\xb4\x07\xab\xe2\x86\xf8\x17\xf2\xf1\x4f\x64\x49\x5f\x0d\x4d\xbf\x2a\x6f\x06\x9f\x0a\xc9\x01\xa1\x8d\xad\xe2\x6b\x3e\x3f\x7b\x52\x19\x66\x27\x20\x17\x48\x5d\x65\xe1\xb6\x9f\xc8\x97\xa1\x90\xf5\x15\xc7\xd2\x71\xf6\x1d\x96\x4b\x29\x1b\xc1\x80\x98\x1b\xa9\xae\x6d\xf9\xeb\xca\x81\x36\x2c\x25\x3c\x3c\xfa\x44\x3c\x14\xbc\x85\xbe\x2e\x45\x21\x4a\xa0\xc7\x6f\xef\x87\x31\x8c\x7b\xa6\xc8\x6a\x69\xca\x49\x22\x8e\xd8\x34\x55\x01\xcb\x7c\x0e\x1f\xc9\xa3\xe3\xfb\x07\xde\xf9\xa7\x5f\xf0\xdf\x0f\x0f\x9c\xb0\x83\x5f\x0e\x48\x99\xaa\xb4\x4b\x95\x31\xf9\x83\x8a\x8b\x71\x2a\x84\x12\x98\x5c\x73\xc9\xb2\x94\x24\xcb\x12\xc4\x70\x7e\x4d\x02\xb0\xa7\x56\xae\x13\x43\x7e\x8a\x3d\x94\xee\x51\x06\x2c\xaa\xa3\x70\x85\x6f\x69\x03\x33\x77\xc1\xd1\x3b\x3e\x39\xd1\x44\xec\x38\xe7\x6b\x6e\x65\x6b\x5f\x08\x58\x19\x71\x64\x8f\x68\x45\x4a\xba\x04\xbe\x59\x06\x3b\xe2\x2e\xa5\x20\x0a\x4c\x97\xa5\x45\x52\x85\xd8\x16\x17\xe9\x03\xbe\xed\x0b\x4e\xcf\xc9\x7e\x61\xe9\xc1\x8d\x65\xa8\x3b\xb0\x84\x6f\xe4\xb1\x42\xca\xdd\x42\xc3\x7c\x32\xce\x81\xe6\xf5\xc9\x08\x31\x0f\x22\x0a\x81\x96\xf4\xfb\x58\x8c\xec\xfa\x6c\xef\xac\x81\x96\x58\xc4\xfa\x69\x5b\x59\xad\x8e\x45\x5c\x06\x97\xfc\x3d\xd5\xfa\xf0\xc6\x26\x4f\x87\xb4\x47\x66\x6f\x78\x70\x33\xf8\x44\xe6\xd8\x1e\x98\xea\xfd\x15\x6c\x36\x6f\x34\xf5\xfe\x12\xbe\x36\xf9\x2d\xe0\xd8\x83\x17\x03\x92\x4f\x1a\x2e\x6f\x4c\xa9\xf1\x04\x5e\x8c\x67\x98\x1c\xa5\xdd\x3b\xa8\x78\x41\x6c\xc0\x3e\x5b\x2f\xbb\x20\xc9\xa1\x58\x5d\x98\xcf\x01\x30\x07\xf9\x08\x7f\x58\x75\x97\x57\x68\xed\x83\xaa\xe6\x52\x55\x1f\x88\xfb\xfb\xc2\x23\xe6\xec\x57\xe1\xe9\xc0\xb0\xe0\xaf\x79\xac\xc8\x3a\x52\xc8\x6e\x50\xf0\xbf\xd9\x05\xe5\xdc\x80\x6b\xce\x0c\x93\x4b\xf8\x36\xe8\x4b\xe1\x71\x4c\x5a\xfc\x82\x37\x85\x2d\x84\xc5\xd3\x2f\x78\x06\x73\x60\x55\x7a\x80\x4a\x62\x28\xa0\xe6\x50\x0c\x86\xc5\xfa\xbd\xca\xa7\x81\x83\x11\x8b\x7e\x9c\xcb\x19\x05\xc9\x44\x74\x9e\x40\x2e\x25\x21\x1b\xcc\x18\xec\xf7\xd9\xe7\x56\xb0\x82\x19\x4a\x52\xd2\xce\xcb\x0d\x23\xf7\xe9\x6a\xf2\x75\x37\x4d\x93\xd3\x40\xb1\xbb\x14\x9d\x3c\xe2\xa7\x19\x08\x2c\x4b\x92\xb5\x25\xd4\x46\x7d\x66\xe7\xbb\x50\x9b\x0e\xa5\x51\xec\x0a\xb1\x65\xc8\xef\xc4\x07\x23\x35\xe6\x3c\x50\x46\x92\x7e\xf0\xb1\x49\x86\xb7\x04\x92\xf4\xd4\xb2\x24\x07\xdb\x71\x31\xf6\x57\x93\xa7\x17\x66\xa3\x84\x9c\xe9\xca\x48\x52\xe3\x7b\x9b\x65\x63\xae\x45\x92\x9e\x34\xe6\x04\xc9\x41\x05\x92\x85\xe1\xb9\x21\xb3\x06\x4c\xa3\xde\x57\xf8\x07\x87\x75\xae\x62\xb6\x42\x1b\x78\x25\xbe\xe3\xb6\x23\x36\xf5\xb4\x2e\x4a\xae\xd6\x84\x94\xac\x7f\xfd\xe6\xfb\x96\xaf\xda\xf2\x73\xfd\x35\xb7\xe5\x8f\xb3\x5a\xde\xa0\x30\x5a\xe8\xda\xcc\x69\x50\x4c\xad\x40\x28\x3c\x17\x1e\x4b\x5c\xf3\x0a\xa4\x2f\xdd\x9f\x95\xa5\xc4\xf0\xeb\xe4\x85\x23\xf8\xbb\x24\x2a\x7c\x50\x94\x15\xe3\x23\x64\xc5\x1c\x68\x77\xfc\x83\x9d\x97\x24\xd6\x70\x9c\xff\xda\xf8\x71\x12\xe6\xb1\x5e\xb8\xf8\xa0\x62\xe3\x0d\x8a\x79\x6d\x3f\x4a\xc2\xe6\xbe\x7a\x1f\x56\x0a\x9b\x39\xd0\x7e\x1d\x65\x5b\x78\x0e\xf8\xf7\x74\xbf\x45\x50\x3d\x08\x2c\x4a\x32\x8a\x52\x57\x16\x52\x56\xbd\x90\xca\x4b\x2a\x4a\x62\x81\x1d\x4f\xd6\x64\x1d\xd1\x74\xa0\x3d\x8f\xd8\x87\x0b\xda\x90\xc4\x39\xd5\x4a\x08\xab\x8e\x2f\x1f\x2b\x9e\xf5\x95\x9e\x33\x5b\xfd\x9c\x2c\xb5\xeb\xc5\xe8\xd1\xcb\x29\xd6\xe4\xbe\x5a\x77\x54\x8a\x55\xba\x9c\x82\x89\xc5\x6b\x67\xeb\x28\x91\x1c\x83\x51\x49\xaf\x4a\x09\x0d\x17\x7a\x93\x3f\xb1\x1e\xcc\xf5\x0d\xe8\xcb\x2e\xa3\x22\x49\xde\x60\x60\x55\x1b\xf4\x3b\x78\x46\xb3\x18\xdf\x57\xfb\x31\x86\x05\xff\x04\x89\xb2\xba\x97\x0d\x77\x7e\xbd\xea\x96\xf2\xdd\xf5\xcc\x52\xf2\xbc\x61\xc1\xda\x85\x1b\x91\xff\xbc\x36\xcb\x73\x4f\xdf\x82\x7e\xe5\x79\xaf\xe0\x77\x18\x56\x04\x1f\x9f\x65\x56\x2c\xb3\x6d\x5f\xa0\x57\xe1\x50\x78\xac\x70\x1e\x54\x95\x3d\x54\x39\x14\x58\xb0\x97\x0b\x27\x23\x15\xbd\xc0\x8f\xd9\xf7\x04\xe6\xed\xe1\x2d\x89\x21\xc0\xc3\x2f\xf5\x45\x6b\x48\x1c\x3b\x22\x71\xa3\xa7\x2f\x5b\x43\x53\x3d\x03\x4b\xbd\xd1\x1c\x6a\x78\xab\x1a\xdc\x87\xe0\x66\x9e\x09\x17\x78\xba\x8f\x2b\xb6\x79\x27\x97\x52\xc5\x65\x56\x71\x09\xb4\x09\x49\x8c\x67\xc8\xf7\x67\x61\xc6\x19\x25\xcf\x85\xa7\x9f\x34\x87\x7d\x96\xdd\x31\xd5\x97\xfa\x0a\x77\xbf\x86\x82\x21\xe4\xd0\x8c\x5f\xfa\x6a\x13\x7a\x7a\x13\x57\x69\xc3\xa5\xde\x6a\x0e\xcb\xb5\x5e\xe0\xb9\x6e\x48\xdf\x88\xe8\x51\x3a\x31\x12\xa5\x70\x44\xfa\x58\xb6\x87\x86\xda\x86\x2e\x78\x3d\x1b\x0e\x05\xbd\x2e\xcf\x86\xb7\x6a\x0a\x96\xfa\x05\xa6\x46\x0a\x84\xcf\xaa\x20\x25\x4a\xc9\x87\x0c\xed\x77\xf8\x98\xaf\x55\x97\x52\xea\xa1\x78\x24\x2c\x4f\xa1\xf7\x02\x13\xd3\x2a\x7e\x1a\x83\xdd\x93\xbf\x80\xb8\x3b\xec\x13\xc4\x56\xed\xa1\xa9\xa6\xe0\x05\xbe\x18\x19\x9b\x9c\x75\x87\xb7\xec\xdb\x1b\x5d\xd0\x5b\x5c\x0c\x0d\xf1\xdd\x9c\x13\xd8\x36\x2b\x7c\xb2\x15\xf1\x32\x3d\xad\xc7\x5d\x3e\x4c\xe3\x0c\x4c\xd9\xf1\x6d\x78\xfa\x8e\x33\x9b\x87\x57\xf0\x2c\x4b\x0e\x6b\xd7\x1d\x4a\xf7\xbc\x99\x36\xc8\xe7\x6d\xc4\xce\x5f\x0f\x8b\x25\xf1\x50\x9b\xf2\xef\x35\x14\x44\xc0\xfe\x87\x12\xbd\xbd\x89\x08\x8a\x4b\x67\x0b\x0e\xb0\xeb\x4d\xb4\x5f\x4d\xe6\xe8\x7d\x10\x46\xc9\x57\x25\x43\x96\x2f\xc6\x61\xf5\x48\x8f\x79\x4f\xd6\xa4\xc6\x46\x33\xb4\xca\xcc\xfc\x55\x9f\x26\xe0\x8c\xd5\xe8\xcb\xfb\x49\x0e\xc0\x70\xe1\xc9\xf5\x48\xdd\x82\x17\x78\x75\xcd\xd9\xc9\x85\x97\xd7\x84\x9b\xb2\x14\xc9\xda\xb4\x5f\x7a\xba\x32\xcc\x73\xf2\xa0\x42\xf9\xf6\xea\x8c\xd8\xe2\xce\x30\xbc\x21\xf7\x7f\x92\x80\x18\x2a\x65\x90\x90\x32\x73\xa0\xe9\x1f\x99\xef\xb4\xae\x42\xef\xa3\xac\xee\xec\xbd\x29\x3b\x27\x79\x15\x3d\x14\x2d\xfc\x8c\xc8\x4e\xe1\xda\x72\x90\x8f\x25\x41\xf9\xf4\x8b\x32\x40\xbc\x00\xaa\x1a\xdf\x16\x61\xb8\x73\x86\xaf\x70\xfa\x4e\x45\x97\x53\xbc\x15\xac\xfc\xd5\x48\x29\x54\x05\x1f\xd7\xb6\xe0\x37\xf6\x61\x95\x12\x5a\xec\x27\x1a\x65\x48\x3b\x4f\xa0\xca\x01\x32\x8a\xd8\x75\xa4\xb2\xb3\x8f\xe1\x94\x46\x25\xec\x49\x9f\x6f\xac\xf4\xad\x3b\x32\x55\x27\xd4\x13\x77\xc4\x43\x44\x06\x52\x3a\x5c\xd8\xd1\x89\xad\xa3\xad\x01\x9d\x2a\x26\x7f\x44\x32\x9d\xf1\x12\x87\x14\x38\x59\x81\x0b\x6a\x4a\x7c\xa9\x9f\x98\x16\xe5\xbb\x86\x66\x00\xa8\xef\x91\x3d\xf6\x04\x81\x7e\x9f\x7d\x7c\xf6\x3a\x0d\x46\x44\x58\x90\x4f\x62\xc5\x7a\x27\x18\x0d\x45\x4d\xbc\x66\x4e\xa9\x29\x0f\x73\xbd\x76\xc3\x11\xcf\xc7\xde\x04\xb1\x1e\x85\x85\xa6\x7b\x46\x6d\x87\xb9\x51\x1b\xc5\xa6\xd3\x52\x53\x9e\x07\xe8\x7a\xbd\x1a\x91\x39\xe8\x78\x0e\xb1\xfe\xb6\x3a\x7e\xd4\x93\x55\x6e\xd4\x60\x5d\x68\xfa\x50\x6a\xca\x4d\x8e\xeb\xdd\x7a\x44\xd4\x8b\x8e\xf5\x74\xac\x5f\x14\x9b\xde\x97\x9a\xf2\x0f\xb0\x5e\xfb\xd1\x88\xbc\x42\xd4\xf1\x0a\xc5\xfa\x26\x3a\x1e\xd7\x6e\x94\xc3\xf5\x25\x96\x9a\x42\x38\x92\x47\x45\x99\x01\xca\x6f\xd4\xe0\x2f\xc4\x69\xbf\x04\xc5\x63\x32\x16\x8e\x1e\xc9\x39\xbe\x04\x45\xb7\x2f\x83\x39\x04\x66\x57\xc2\x10\x81\x39\x95\x30\x9b\xc0\x1e\x4b\x30\xc3\x03\x78\x53\xf9\x40\x5c\x9e\x04\xa4\x0b\x1f\x08\x1d\x15\x50\xd6\xf5\x81\x38\x4a\x07\x80\xe0\xe2\xb3\xc1\x68\x09\x22\x05\x8f\xec\xab\x6a\x2f\x80\x21\x6d\xb3\x81\x74\x53\x7e\xfe\x48\x0b\x4a\x35\xec\x43\x15\x50\xe1\x6f\x67\x5f\x07\x5c\x2a\xb1\xf7\xd5\xb9\x37\x0b\x73\xf2\x69\xb8\xa9\xf8\xdb\x25\x7f\x93\xe6\x29\xc8\xf2\xfa\x6e\x41\x06\x44\x59\x92\x1a\x0a\x6c\x4b\x40\x3a\xd3\xb6\x04\x6d\x4a\x50\xa7\xd8\xaf\x0c\x2c\x4e\x4a\x72\x4b\x38\xa2\xb1\x04\x7f\x10\x7f\x3f\xde\xbc\x1a\x5a\xe9\x8b\x2c\xc5\x83\xcb\x70\x4c\xa0\x5b\xc0\x5f\xce\x6b\xaf\x64\xcd\x79\x01\x5e\xca\x57\xba\xc6\xbc\x28\xa5\x45\xd3\xac\x64\x5e\x57\x62\x67\x25\x21\x2d\x71\xb2\x92\x35\x2d\x91\x46\xcf\x3d\xe1\xc7\x30\x94\xc1\xba\x19\x2c\x06\x17\xd0\xd5\x5b\x40\xdd\x81\x2e\x7c\xa1\x86\x7c\x1e\x01\xbb\x84\x80\x5f\x46\xe0\xb1\x34\xdd\x72\x89\x8c\x37\xc3\xc0\x05\x25\x14\x1e\xf6\xa0\xb0\x04\x95\x38\xa4\xdf\x71\xf8\x63\xe1\xd0\xfc\xef\x8c\x83\x76\x7f\x85\x27\x4a\x5f\xc5\xae\xb3\xe9\x67\x86\x85\x98\x7f\xc4\x32\x98\x49\xf3\x8f\xc8\x46\x5b\x4b\xb3\xad\x2c\xf1\xa5\x66\x21\x2d\x0a\xa5\xa2\x35\x2d\x92\x26\x90\x9f\x7f\x04\x48\x95\x75\xd5\xfc\x61\x04\xde\x40\xc9\xfc\xaf\x95\x5a\x72\xba\xe4\x1b\x93\x7d\x1b\xa4\xe4\xde\xbd\xeb\xab\x3b\xd8\xd2\x9b\xee\x58\x63\xf6\xc3\x8e\xf8\xcb\x77\x4c\x78\x37\xf5\xce\x62\x6c\x1d\x38\xbb\x0f\xea\xb2\x37\x0f\xa4\x7a\x13\x62\x69\x1b\x16\x77\xc7\x98\x7d\xf9\xef\x31\xfe\xfb\x04\x88\xbf\xad\xc2\xdf\x03\xf8\x06\xc8\xf5\xe3\x1c\x32\xab\xc7\x11\xd6\xbf\xa3\xc1\x05\xc4\x2c\x28\x60\x6e\x76\x2c\xc1\xb2\x7d\x01\x09\x57\x08\x70\x9c\x81\x63\x0a\x5e\xcb\xe0\x5d\x06\xc6\xc4\x58\x40\xcc\x6f\x97\x40\x1a\xf1\x9e\x05\x23\x11\x86\x12\xa0\x9c\xa3\x87\x00\x71\x7f\x1c\x9a\x66\xd0\x94\x42\x69\xaf\x85\xe3\x2b\xaa\x38\xbe\xca\x23\x95\xe3\x52\x0e\xc1\x50\x11\xf6\x78\x18\x66\x5c\x01\x32\xe1\x10\x0a\xbd\x29\xfe\x5d\x03\x0d\xae\x28\xc9\x38\x58\xaa\xe3\x53\xe8\x56\x82\xba\x52\x63\x97\x82\x77\x12\x78\x29\x81\xb7\xe5\xd6\x6b\x09\x9c\x02\xcd\x58\xd1\x65\x72\x21\x25\xd5\x3c\x9b\x3b\x9e\xd8\x0b\x24\xc3\x71\xa8\x23\x80\x3e\x05\x86\x12\xd0\xcd\x9a\xba\x14\x1a\x4b\x50\x1f\x14\xdb\xae\x25\xa8\x44\x32\x6c\x03\x32\xe8\x12\x66\x37\x00\x7c\x74\x3c\x2b\x8f\x96\x2f\x73\xbc\xcb\x53\x68\x60\x68\x2c\x43\xdd\xac\x8e\x4b\xc1\xa9\x0c\x5e\x66\xe0\x6d\x45\xeb\x75\x06\x4e\xf7\xb7\x26\xc6\x2b\xa5\xd7\x1c\x32\xe7\x22\x12\xce\x51\x24\xef\x9b\x10\xc8\x99\x93\x18\x56\x0b\x48\x4a\x04\xd8\x11\x50\x9f\x42\x7d\x19\xea\x02\x39\x9f\xae\xb4\xe9\x42\x29\x7e\x4b\x6e\x1d\xca\xe0\x65\x06\x5e\x82\x06\x7c\x5c\x60\x1e\x3a\x81\x9e\xae\xe5\x36\x7e\x51\x28\xcc\xc1\x5e\xa9\xb0\xde\x2f\x15\xb6\xfb\xa5\x82\x53\x2f\x15\xe6\x60\x9f\x58\x88\xf7\x8a\x05\xe7\xeb\xc4\x02\x1b\xaa\x7a\xef\xef\x05\x2e\xc1\x1e\xc9\x50\x0b\xc4\xa2\xa1\xb9\x5f\x34\x6c\xf7\x8a\x86\xf6\x7e\xd1\x70\xb6\x5f\x34\xb4\xf7\x8b\x86\x78\xaf\x68\x08\xf7\x89\x86\x74\xaf\x68\xd8\xed\x15\x0d\xdb\xbd\xa2\x61\xbb\x5f\x34\xc4\x7b\x45\xc3\x6e\xbf\x68\x68\xee\x17\x0d\xbb\xfd\xa2\xa1\xb9\x5f\x34\x84\xfb\x44\xc3\x7a\xbf\x68\xf0\xf7\x8a\x86\x78\xbf\x68\xd8\xee\x17\x0d\x69\x8d\x68\xf0\xbf\x8b\x86\xef\xa2\xe1\xbb\x68\xf8\x2e\x1a\xbe\x8b\x86\xef\xa2\xe1\xbb\x68\xf8\x2e\x1a\xbe\x4a\x34\x34\xbf\x8b\x86\xef\xa2\xe1\xbb\x68\xf8\x2e\x1a\x64\x30\x6c\x61\x38\x75\x54\xf3\xc7\x89\xc2\xe1\xcd\xf3\x49\x43\xe1\xcb\xa6\x55\x16\x7a\xa8\xbf\x02\x75\x07\xe6\x7a\xa2\x6b\xec\x86\x46\x6a\xcd\xbc\xdc\x72\x73\x24\x97\xfc\x41\xda\x37\xbf\xb5\x3d\xbc\x69\x51\xbf\xfd\x0e\xc8\xeb\x25\x31\xdb\x23\xfb\x45\x3d\xda\x59\x3d\x54\x90\xab\xf3\xec\xe7\x23\xfb\xf5\xd5\x4d\x20\x6e\x82\xc8\xc7\xa8\x79\xc8\x48\x42\xa7\xc7\x4b\x5c\x00\x61\x22\x66\x3c\xe5\x1d\xbe\x51\x0f\x2e\x2f\xf2\x6b\x8b\xe6\x52\xd1\x9c\x16\xc9\x7d\xed\xb2\x90\x10\x17\x68\x83\x0e\x90\x32\x2e\x0e\x8f\xfc\x7e\xe0\x40\x5c\x64\x4e\xf3\x1e\xff\xfd\x21\x58\x03\xcd\x3a\x03\x6a\x5b\xd7\xf4\x2b\xcc\xa2\x86\x25\x45\xcd\x64\xf9\x63\xac\xc2\x97\xff\xc8\x9b\xa5\x29\x34\xf6\xc4\x19\x59\x15\x59\x40\x0b\x19\x71\xb2\xaf\xe7\x17\x42\xaa\x0c\xed\x9e\x5f\xe0\xee\x80\xf4\x9c\x75\xdf\x83\xaa\x89\xe8\x51\x0a\x20\x86\x17\xa0\x8f\x37\xaa\x2d\xbd\x16\xce\xde\x3b\xb4\x81\x06\x9f\xf0\xdf\xf7\x12\x38\xcb\x0b\xd8\x04\x1a\xfc\x54\x6c\x9d\x45\x8f\xd1\xd6\xb6\xa6\x21\x26\xa3\x20\xfc\x05\xb7\x4e\x19\x97\x3b\xe4\x43\x37\x87\x0b\xc6\x59\x01\x22\x05\x93\x62\x01\x6d\x32\x2e\xf6\xb1\xaf\x60\x9c\x15\xc8\x9d\xb2\x02\xab\x03\x28\xda\xdc\x80\xf8\x24\x51\x01\x69\xd6\x27\x4c\x3e\x47\x44\x6c\xc1\x19\xfd\xfb\x81\xfd\x6d\xcc\x68\x75\xb1\xbd\x59\x73\x16\xb0\x07\xef\x4c\x4c\xa1\x39\x14\x01\x0f\x0b\xa8\x0e\x57\x86\x3f\x9f\xdc\xaa\xc3\xd0\x78\x99\x4f\xee\x79\xe8\x83\x61\x62\x48\xc8\x20\x1e\x86\xd8\x32\x64\xcd\x20\x01\x86\x38\x32\x24\x66\x90\x15\x86\x30\x4b\xe1\x39\x37\x30\x93\xec\xc3\x95\xd1\x5e\xd0\xba\x6f\x0b\x3e\xb2\x0b\x58\x37\x67\x0c\xd4\x5a\xf0\xa1\x05\xa8\xcb\x40\x9d\x05\x1f\x5b\x80\x2e\x19\xe8\x7c\xc1\x07\x77\x41\x61\xf4\xb9\x18\xdd\x7f\x61\x78\xbf\xf0\xd1\xe7\xbc\x9f\x90\x81\xbc\x17\x3e\xba\x00\xad\x19\x28\x78\xe1\xa3\x0b\x50\xcc\x40\xab\x17\x3e\xfa\xbc\x38\x3a\x12\xa8\x2f\x19\xea\xcb\x89\x58\x5f\x86\x39\x83\xb4\x96\x7c\x6c\x0e\xe9\x32\x48\x67\xc9\x87\xe6\x90\x4b\x06\x39\x5f\xf2\x91\x51\x2d\xd1\x7d\x9f\xa1\xed\x97\x88\x1e\x32\x90\xe7\x97\x88\xbe\x66\xa0\xc0\x2f\x11\x3d\x66\xa0\x95\x5f\x4b\xf4\x0c\xed\x80\xa1\x1d\x94\xd0\x66\x90\x56\x50\x42\x9b\x41\x3a\x41\x09\x6d\x06\x39\x0f\x2a\xd0\x9e\xe4\x99\x7c\xc5\xb0\x5e\x65\x6c\xc9\x90\x66\x10\x6f\x55\x64\xe5\x35\x83\x04\x18\x82\x72\x4c\xce\x20\xab\x55\xb6\x31\xf2\x03\x4b\x4c\xbe\x66\x28\xaf\x25\xf2\x30\x9c\x19\xa8\xb5\x2e\x11\xb5\xcb\x40\x9d\x35\x1f\x3b\x63\x72\x06\x3a\x5f\x4b\xab\x94\x1f\x5d\x62\xf2\x98\xe1\x1d\x4b\x3c\xc9\x10\x67\x20\x2f\x2e\x71\xf2\x9a\x81\x82\x98\x8f\x9e\x31\x39\x03\xad\x62\x69\x6b\xe4\x47\xcf\x56\x3b\x61\xa8\x27\xd9\xfa\x30\xcc\x19\xa4\x95\x14\xd7\xb4\xcb\x20\x9d\x84\x0f\x2d\x56\x9b\x41\xce\x93\x8c\x43\xea\x88\xee\x6f\x18\xda\x9b\x12\xd1\x43\x06\xf2\x36\x25\xa2\xaf\x19\x28\xd8\x94\x88\x1e\x33\xd0\x6a\x53\x4b\xf4\x0c\xed\x2d\x43\x7b\x5b\x42\x9b\x41\x5a\xdb\x12\xda\x0c\xd2\xd9\x96\xd0\x66\x90\xf3\x6d\x86\xf6\xc4\xc4\x42\x7e\xcb\x14\xc7\x92\x5a\x72\x63\xd6\xff\x98\xf5\xcf\x9f\x58\x18\x26\x06\x75\x19\xa8\x23\xba\x11\xa0\x4b\x06\x3a\x17\xb3\x12\xa0\x13\x06\xba\x10\xa8\x2c\x09\xda\xd2\xe8\xae\x18\x3d\xdc\xd1\xca\xde\x2e\x2f\x59\xc6\x2b\x63\xcd\x40\xc1\x2e\x2f\x59\xc6\x2b\x23\x66\xa0\xd5\x2e\xbf\x1e\xe3\x95\x91\x32\x50\xb4\xcb\x4b\x16\x69\xf4\x79\x86\xfb\x1b\xc3\xfd\x2d\x2f\xce\x31\xee\x0c\xd4\x79\xcb\x8b\x73\x8c\x3b\x03\x9d\xbf\xe5\x37\x01\xc6\x9d\x81\x2e\xde\xf2\xe2\xbc\x92\xf2\x61\x8b\xe1\xde\x2a\x51\x7e\xcd\x40\x41\xab\x44\xf9\x98\x81\x56\xad\x12\xe5\x53\x06\x8a\x5a\xb5\x94\x97\x70\x6f\x33\xdc\xdb\x65\xdc\x19\xa8\xd3\x2e\xe3\xce\x40\xe7\xed\x32\xee\x0c\x74\xd1\x96\x70\x1f\x8e\x30\xa3\xfb\xc2\x5c\x81\x01\x50\xa7\xa4\x6e\x5f\x9d\x92\xba\x43\x49\xa6\x4f\x57\xc6\xbc\x43\x21\x57\x18\x62\xcb\x10\x97\x41\x1a\x18\xe2\xc8\x90\x25\x83\x2c\x3a\x13\x96\x00\x1c\xbd\xea\x77\xa6\xba\x03\x5b\xdd\xa3\x1f\x5a\xcf\x5b\x30\xd3\x95\xe1\x5f\x4c\x46\xb8\xcd\xcb\xc5\x64\x22\x59\x30\x45\x88\x5d\x0b\x71\x6a\x21\x99\x05\x33\x29\x29\xd3\xe9\xca\x88\x2f\x69\xdd\xd5\x25\x1f\x99\x32\x6f\x11\x64\xd7\x83\x9c\x7a\x90\xc4\xf2\x93\x92\x05\x33\x5d\x19\xbb\x2b\x5a\x79\x73\xc5\x47\x9f\xf3\x7e\x72\x20\xbb\x1e\xe4\xd4\x83\x24\x96\x9f\x14\x55\xf9\x74\x65\x9c\x9d\xd0\xba\xad\x13\x3e\x38\x5f\xc2\x1c\xc4\xae\x85\x38\xb5\x90\x4c\x95\x57\x12\xfd\xa4\x41\xeb\x5e\x34\x4a\x44\xcf\x81\xec\x7a\x90\x53\x0f\xaa\x26\xba\x40\x7b\xb9\xb8\x25\x75\x17\x8b\xdb\x02\xda\x39\x88\x5d\x0b\x71\x6a\x21\x45\xb4\x27\x39\x26\x5f\xbb\xb4\x6a\xe0\xde\x4e\x24\x0b\xa6\x08\x71\x6a\x21\xa8\x16\x62\x17\x98\x7c\x92\xa7\xf7\xf6\x85\xd6\x4d\x5e\x6e\x27\xb2\x32\x2d\x82\x9c\x7a\x10\xaa\x07\xd9\x45\x7a\x4f\xf2\x4c\xde\x5e\xd2\xca\x6f\xcb\xdb\x89\x6c\xc1\x14\x41\x4e\x3d\x08\xd5\x83\xec\x22\x93\x4f\x72\xab\x7d\xe9\xd1\xba\xe7\x5e\xb6\x3e\xb4\x97\x1c\xc4\xa9\x85\xa0\x5a\x88\x5d\xb5\xda\x19\xd1\xdd\x80\xd6\x6d\xf8\x25\xa2\xe7\x40\x4e\x3d\x08\xd5\x83\xaa\x89\x2e\xd0\x0e\x43\x5a\xd7\x0b\x8b\x68\xe7\x20\x4e\x2d\x04\xd5\x42\x32\x0b\x66\x5a\xd2\xa3\xf7\x2b\x63\x8e\xeb\xde\x87\xc6\x55\xc0\xb7\x17\xd5\x88\x45\x90\x5d\x0f\x72\xea\x41\x92\x1e\x9d\x96\x2c\x98\x7b\x7c\x4a\xa0\x95\x5f\x56\xb7\x39\xc9\x52\x04\xd9\xf5\x20\xa7\x1e\x24\x49\x96\x69\x49\x8b\xdf\xaf\x8c\x78\x4d\x2b\xaf\xd6\xb7\x39\x71\x5e\x04\xd9\xf5\x20\xa7\x1e\x24\x89\xf3\x4a\xca\xef\x22\x5a\x79\x13\x95\x28\x9f\x03\xd9\xf5\x20\xa7\x1e\x54\x4d\xf9\x0c\xf7\xb3\x98\x56\x6e\xc5\x25\xdc\x73\x20\xbb\x1e\xe4\xd4\x83\x24\x0b\xe6\xa1\x68\xc1\x3c\xae\x8c\x66\x7c\x6b\xaa\x8f\xa1\xf1\x1a\xdf\x5a\x92\x4c\x2f\x42\xec\x5a\x88\x53\x0b\x61\x23\x1f\x34\x61\xce\xb6\x74\x8f\xb4\xb6\xb7\x05\x13\x26\x07\xb1\x6b\x21\x4e\x2d\xe4\x80\x09\x73\xf2\x4a\xeb\x5e\xbc\xde\x96\xb4\xa9\x0c\xb2\xeb\x41\x4e\x3d\xe8\x90\x09\xb3\x7c\x63\x0a\xf0\xed\xb6\x68\xc2\xe4\x40\x76\x3d\xc8\xa9\x07\x1d\x30\x61\xd6\x4d\xa6\x04\x9b\x45\x5d\x9e\x83\xd8\xb5\x10\xa7\x16\x72\xc0\x84\xd9\xb6\x98\x06\x6c\x95\x88\x9e\x03\xd9\xf5\x20\xa7\x1e\x74\xc0\x84\x69\xb7\x99\x02\x6c\x17\xd1\xce\x41\xec\x5a\x88\x53\x0b\xd9\x6f\xc2\x5c\x76\x98\xfe\xeb\x14\x4d\x98\x1c\xc4\xa9\x85\xa0\x5a\xc8\x01\x13\xc6\x3d\x67\xca\xef\xac\xac\x4d\x65\x90\x53\x0f\x42\xf5\xa0\x43\x26\x4c\xd8\x65\x0a\xb0\x5b\x32\x61\x72\x20\xa7\x1e\x84\xea\x41\x07\x4c\x98\xf4\x82\xd6\x8d\x2e\x8a\xba\x3c\x07\x71\x6a\x21\xa8\x16\x72\xc0\x84\x69\x5e\xd2\xba\xaf\x97\x25\xa2\xe7\x40\x4e\x3d\x08\xd5\x83\x0e\x98\x30\xdd\x2b\x5a\xb7\x73\x55\x44\x3b\x07\x71\x6a\x21\xa8\x16\x72\xc0\x84\xd9\x5d\x31\xbd\x77\x55\x56\xa4\x32\xc8\xae\x07\x39\xf5\xa0\x43\x26\xcc\xd9\x09\xd3\x7b\x27\x25\x13\x26\x07\xb2\xeb\x41\x4e\x3d\xe8\x90\x09\x73\xd2\xa0\x95\x2f\x1a\x25\x35\x9e\x03\xd9\xf5\x20\xa7\x1e\x74\xc8\x84\x59\x2e\xa6\xa4\xf2\x62\x31\x2d\x52\x3e\x07\xb2\xeb\x41\x4e\x3d\xe8\x90\x09\xb3\x76\x69\xe5\xc0\x9d\x16\x71\xcf\x81\xec\x7a\x90\x53\x0f\x3a\x60\xc2\xf8\xee\x94\x18\x1d\x2f\xee\xb4\x60\xc2\xe4\x20\x76\x2d\xc4\xa9\x85\x1c\x6b\xc2\xac\xfd\x29\xd5\x7f\xfe\xb4\x60\xc2\xe4\x20\x76\x2d\xc4\xa9\x85\x1c\x30\x61\xb6\x01\xad\x9b\x04\xd3\x92\x36\x95\x41\x76\x3d\xc8\xa9\x07\x1d\x32\x61\xda\x21\xad\xfc\x16\x4e\x8b\x26\x4c\x0e\x64\xd7\x83\x9c\x7a\xd0\x01\x13\xe6\x72\x45\xeb\x9e\xaf\xa6\x05\x5d\x9e\x83\xd8\xb5\x10\xa7\x16\x72\xc0\x84\x71\x23\x5a\xb7\xb1\x2e\x11\x3d\x07\xb2\xeb\x41\x4e\x3d\xe8\x80\x09\x13\xc6\xb4\xae\x17\x17\xd1\xce\x41\xec\x5a\x88\x53\x0b\xd9\x6f\xc2\xa4\x09\xad\x1a\x25\xd3\x82\x09\x93\x83\x38\xb5\x10\x54\x0b\x39\x60\xc2\x34\x53\x5a\xf7\x35\x9d\x96\xb4\xa9\x0c\x72\xea\x41\xa8\x1e\x74\xc8\x84\xe9\x6e\x68\xe5\xce\x66\x5a\x34\x61\x72\x20\xa7\x1e\x84\xea\x41\x07\x4c\x98\xf9\x2b\xad\x7b\xb5\x9d\x16\x74\x79\x0e\xe2\xd4\x42\x50\x2d\xe4\x80\x09\xe3\xef\x68\xdd\x97\x5d\x89\xe8\x39\x90\x53\x0f\x42\xf5\xa0\x03\x26\x4c\xfc\x46\xeb\xae\xde\x8a\x68\xe7\x20\x4e\x2d\x04\xd5\x42\x0e\x98\x30\xcb\x37\xa6\xf7\xde\xca\x8a\x54\x06\xd9\xf5\x20\xa7\x1e\x74\xc8\x84\x59\x37\x99\xde\x6b\x4e\x8b\x26\x4c\x0e\x64\xd7\x83\x9c\x7a\xd0\x21\x13\x66\xdb\xa2\x95\x93\x56\x49\x8d\xe7\x40\x76\x3d\xc8\xa9\x07\x1d\x32\x61\xda\x6d\x5a\xf9\xad\x5d\xa2\x7c\x0e\x64\xd7\x83\x9c\x7a\xd0\x21\x13\xe6\xb2\x43\x2b\x9f\x77\x4a\xb8\xe7\x40\x76\x3d\xc8\xa9\x07\x1d\x30\x61\xce\x3a\xd4\xe8\x68\x75\x8a\x26\x4c\x0e\x62\xd7\x42\x9c\x5a\x88\x6c\xc2\x34\xf7\x98\x30\x97\x17\x4c\xff\x5d\x14\x4d\x98\x1c\xc4\xae\x85\x38\xb5\x90\x03\x26\x8c\x7b\xc5\x94\xdf\x65\x59\x9b\xca\x20\xbb\x1e\xe4\xd4\x83\x0e\x99\x30\xe1\x09\x53\x80\x27\x25\x13\x26\x07\xb2\xeb\x41\x4e\x3d\xe8\x80\x09\x93\x36\x98\x12\x6c\x14\x75\x79\x0e\x62\xd7\x42\x9c\x5a\xc8\x01\x13\xa6\x39\xbf\xa3\x1a\x70\x7e\x57\x24\x7a\x0e\x64\xd7\x83\x9c\x7a\xd0\x01\x13\xa6\xbb\xa0\x75\x3b\x8b\xbb\x02\xda\x39\x88\x5d\x0b\x71\x6a\x21\xfb\x4d\x98\xf9\x0b\xad\x7a\xe5\xde\x15\x4c\x98\x1c\xc4\xa9\x85\xa0\x5a\xc8\x01\x13\xc6\x5f\xd2\xba\x2f\xcb\xbb\x92\x36\x95\x41\x4e\x3d\x08\xd5\x83\x0e\x99\x30\xb1\x47\x2b\xaf\xbc\xbb\xa2\x09\x93\x03\x39\xf5\x20\x54\x0f\x3a\x60\xc2\xec\x7c\x5a\x77\xe3\xdf\x15\x74\x79\x0e\xe2\xd4\x42\x50\x2d\xe4\x80\x09\x73\x16\xd0\xba\xad\xa0\x44\xf4\x1c\xc8\xa9\x07\xa1\x7a\xd0\x01\x13\xe6\x24\xa4\x75\x2f\xc2\x22\xda\x39\x88\x53\x0b\x41\xb5\x90\x03\x26\x4c\x1b\xd7\xc5\x7a\x2f\xbc\x2b\x29\x52\x19\x64\xd7\x83\x9c\x7a\xd0\x21\x13\xe6\x72\x45\x2b\x9f\xaf\xee\x8a\x26\x4c\x0e\x64\xd7\x83\x9c\x7a\xd0\x21\x13\xc6\x8d\x68\xe5\xc6\xfa\xae\xa8\xc6\x73\x20\xbb\x1e\xe4\xd4\x83\x0e\x99\x30\x61\x4c\x2b\x7b\x71\x89\xf2\x39\x90\x5d\x0f\x72\xea\x41\x87\x4c\x98\x34\xa1\x95\xa3\xa4\x84\x7b\x0e\x64\xd7\x83\x9c\x7a\xd0\x01\x13\x66\x9d\xdc\x11\xa3\x23\x48\xee\x0a\x26\x4c\x0e\x62\xd7\x42\x9c\x5a\x08\x1b\x19\xbe\x18\xe4\x7b\x12\xc6\xa1\x8f\xf9\xd6\x46\x96\x1b\xd2\x17\x7e\xb2\x7c\x32\xe2\x8b\xc7\x0e\xfc\x44\x72\x94\x8b\xa4\x69\x4e\x45\x6e\xf7\x2c\xf5\xfb\xa4\x2a\x75\x7b\x96\x38\x3e\x04\x9a\x45\x73\xb7\xb9\x40\xf0\x02\x7c\x21\xbf\x5d\x20\xbd\xab\x21\x2f\x33\x0a\x25\x08\xde\xc9\x21\xe6\x8e\xc0\x97\x06\x91\xeb\x88\x27\x34\x7a\xc8\x5e\x38\x3c\x66\x05\x8c\x27\xec\xac\xc4\x05\x2d\x7d\x0d\xc9\x03\x8b\xa6\xbe\xa1\x5d\xe6\x9b\xa3\x52\x73\xf6\x64\x82\xcd\xfd\x0f\xd2\xbe\xf9\xad\xed\xb5\xe1\xb9\xc8\x69\x87\xd8\x02\x49\x69\xee\xe4\x22\x57\x2a\x5a\x03\xcd\x0a\xe8\x0b\x8a\x54\xb0\x05\xdc\xd0\xa4\x47\xbc\x04\xaf\xec\x86\x3e\xee\xc8\x57\x5a\x96\x4a\xe4\x3a\x2e\x6d\x66\x93\x12\x2e\x2a\xad\x0d\xa0\xb1\xed\x34\xdc\xde\xd8\xc0\x5f\xe9\x23\x0a\x96\xbd\x2f\x32\xa4\xb4\x8f\x6b\xe3\x66\x28\xd2\xfa\x8d\x78\xd6\x6e\xb9\x66\xca\x5e\x86\x15\x6b\x1e\xdd\xe5\x43\xb1\x22\x4f\xc3\xf8\xcd\x3d\xda\xc5\x8a\xfc\xbb\xe9\xc5\x8a\x8f\xc5\x8a\x3c\x79\xe4\x37\xcd\xd1\x4c\xe1\x2d\x7d\x3b\x21\x72\x24\x3e\x49\x94\x5e\x92\x57\x04\x88\x6c\xc5\x21\x7b\xe7\x41\xb6\x62\x56\x72\x02\x34\x0b\x6f\xe0\xde\x46\x37\x24\x91\x00\xa5\x27\x89\x50\x4e\xa2\xfb\x58\xf8\xcc\x93\xf4\x71\xba\xeb\x54\x27\x79\x28\x31\x83\xf2\xd7\x3f\xc6\x2b\x4b\x0e\xfa\x90\x7d\x1a\xe7\x9e\xfd\x24\xdf\x2c\xca\xa6\x6a\xbd\x18\xec\x4b\x36\x9c\xbb\x79\x8e\x40\xc6\x46\x10\xcb\xa2\x73\x63\x6c\xaa\x06\x74\xe7\xf7\x86\x3a\xd1\x74\x4d\x9d\xb6\x8d\x97\xf9\xbd\x25\xcc\x11\xf1\x96\x8d\x64\x24\x34\x2c\x36\x95\x7b\x6d\xda\x97\xbf\x39\x32\x10\x0f\x93\xac\x73\xe3\xf2\x66\xa4\x5a\x67\x46\x63\x30\xe4\xaf\xff\x3a\xc6\xbc\x71\xd7\x57\x1f\xda\xc6\xd5\xc9\x9d\xa1\x5a\x9a\x61\x14\x93\x5c\x4a\x09\xc0\x87\xac\xba\xd5\x36\x2e\x70\xf5\x5e\x96\x4d\x7c\xd8\x31\x4e\x4e\xee\xfa\x34\xf9\x6f\x8f\xc1\x0d\x91\xb2\x5c\x16\xee\x3d\x53\xed\x75\x8c\xf6\xc9\x9d\x89\x2b\xbe\x9d\xdc\x59\x22\x0b\x3c\x89\x10\xe6\x99\xa8\x7b\xe7\x46\x00\x47\xea\xe0\xcc\x88\xe1\x50\x3c\x1f\x31\x18\xb1\xd8\xdf\x17\x30\x32\x46\xea\xa4\x0b\x9b\x06\xff\xce\xd7\x2b\x4c\xcc\x91\x3a\xde\xc2\x9d\x39\x2c\x22\x33\xb8\xd0\x5b\x18\xd8\xd5\x2f\xcd\x61\xf6\xae\x53\x37\xd5\xfb\x8e\xb1\xc6\x53\xba\x6f\x1b\x8b\x93\x3b\x9e\x1e\x14\x75\x8c\xf0\xe4\x6e\xa4\xfa\xc0\xb9\x5a\x10\x2e\xee\xea\xae\x31\x29\x27\x02\xbd\xd0\x43\x70\xab\x3e\x76\xf5\x67\xfe\xa9\xc6\x8e\xe1\x62\x82\x6c\x81\x66\x6a\x2a\x42\xe7\xcb\x7b\x4d\x45\xcf\x5d\xfc\x9f\x35\x68\x1b\xad\xab\x3b\x16\x5d\x3a\xb9\xd0\xef\x6e\xd5\x18\x74\x75\x47\xfe\xcc\x23\x86\xbd\x53\xdf\xc5\x61\x1a\x39\x28\x86\x61\x90\xa0\x20\x79\xf7\xe1\x2f\xef\x1a\xff\xf1\xbf\x3e\x07\xca\x7f\x28\x20\x0c\x93\x38\x89\xec\x95\xb2\x39\x7b\xdf\x7d\xdf\x56\x7e\x5c\x24\xc9\x2a\xfe\xd0\x68\xcc\x51\xf2\xc4\x81\xef\x9d\xd0\x6f\xfc\x44\x1a\xc0\x70\xb5\x8b\xdc\xf9\x22\x51\xda\xcd\x56\xeb\xb4\xdd\x6c\xb7\x95\xbb\x05\x92\x3a\xd2\xd2\x64\x11\x46\x71\x7d\xed\xad\x9b\x24\x28\x52\x15\x2b\x70\xde\x93\x5a\x37\xae\x83\x82\x18\xcd\x94\x34\x98\xa1\x48\x19\x5a\x77\xd2\x34\xdc\x64\x91\x3e\x91\x09\x24\xdb\xa7\xb8\x21\xe6\xd4\x78\xf2\xc2\xa7\x86\x6f\xbb\x41\xe3\xc6\x82\xc6\x68\x6a\x90\x09\x36\x3e\x07\x9f\x83\xff\x72\xfd\x55\x18\x25\xca\xe7\x77\xcf\x69\xe0\x24\x6e\x18\xc4\x9f\xdf\xfd\x2c\x97\x6f\xec\xc8\xb5\x9f\x3c\x54\x2c\xf7\xdd\x57\xb7\x54\x39\x0a\xc3\xa4\x58\x84\x9e\xca\x85\xc9\x6e\x85\x0a\x45\xae\x6f\xcf\x4b\x83\x38\xe1\xac\x58\x6f\x1e\xb9\xb3\x62\x6f\x55\xf3\x7b\x0e\x23\xbf\x58\xf6\x94\x26\x49\x19\xc3\x24\xb2\x83\xd8\xad\xc2\x7d\x16\x85\xab\x59\xb8\x0d\x2a\xbb\x39\x9d\x47\x61\xba\x2a\x62\x11\xac\xd2\xa4\x12\xe2\xa4\x71\x12\xfa\xa7\x55\xd3\x0a\xec\x4d\xb9\xe4\xc9\x8e\x8a\x3d\xd8\x51\x11\xf3\xa7\x08\xd9\x33\x27\x4a\xfd\xa7\x02\x60\x65\xcf\xdd\xc0\xc6\x38\x15\x5b\xd8\xb3\x79\x91\xa4\x2f\xa9\xff\x14\x26\x51\xa9\xae\xed\xa1\xa8\xb8\x72\xab\x28\x9c\x47\x28\x2e\x71\x03\x9a\xb9\x76\xa1\xcc\x73\xe3\x1a\x52\x78\x61\x5c\x9c\x43\x12\xda\x71\x52\xea\x35\x9c\xd9\x5e\xa9\x62\xe8\x25\x6e\xb1\xcb\x55\xb8\x0a\x37\xa8\x82\x62\x61\x1a\xa3\x62\x17\xf1\xca\x0d\x02\x14\x15\x47\x4b\x13\xd7\x73\x13\xb7\xc4\x49\xab\xc8\x0d\x28\x19\xde\xa9\xef\x3e\x60\x16\x57\xfe\xfe\x39\x50\x94\x46\x43\x81\x64\x51\x15\xbe\x47\x94\x8d\xed\xa5\x28\x56\xc2\xc0\xdb\x29\x71\xba\x22\x1d\x4c\xed\x38\x9e\x3a\x91\xbb\x4a\x14\x37\x88\xdd\x19\x52\xbe\xfc\xf0\xf7\x7f\x7c\xc1\x1b\x5a\xf9\x2f\x64\x3b\x0b\xe5\x4f\x4e\xe8\x85\x91\xaa\xfc\x89\x34\x57\xdc\x80\x95\xc4\x74\x1c\x45\x39\x3d\xfd\xe1\xef\xb4\xe8\x1f\x1f\x94\x1f\xfe\x4e\xeb\xfd\xe3\x67\x0c\xfc\x07\xde\xc5\x7b\x3a\x4a\x16\xc8\x47\xa7\xdf\xd8\xdd\xd3\x2a\xd7\x17\xde\x7a\xa7\x98\xe5\x96\xab\xd0\x0d\x12\xa9\xbf\xac\x10\x77\xfd\xb4\xaa\xeb\xb7\xd1\x50\xee\x63\xa4\x7c\x71\x83\x78\x85\x9c\xe4\x8b\xf2\x1c\x46\x0a\xe6\x93\x58\x89\x43\x25\x59\xd8\x89\xb2\x4e\xc3\x04\xcd\x14\x37\x41\x7e\xac\x2c\x11\x5a\x29\xc9\x02\xd1\xd2\xf8\x3d\xeb\x63\x8a\x90\x52\x21\xf6\x62\x3b\x8e\xe9\x3f\x6e\x1c\xa7\x28\x6e\xb4\x3b\x97\x9d\x1f\xc8\x6f\x27\xf4\x7d\x14\x24\xa7\x9d\x4e\xb7\x73\x76\xd5\xba\x68\xe3\x9e\x4e\x4f\x9f\xc3\x20\x39\x7d\xb6\x7d\xd7\xdb\x9d\xc6\x76\x10\x9f\xc6\x28\x72\x9f\xf1\xe4\xd9\x0c\x7f\xfc\x53\x75\x95\x9f\x28\x5a\xf9\x1e\xfc\x30\x08\xe3\x95\xed\xa0\xda\x0e\x44\x0d\xd2\xfe\x1f\x84\xa3\x1a\x0d\x25\x4e\x76\x1e\xf2\x30\xf5\x66\x6e\x4c\x18\x69\x86\x1c\xcf\x8e\xc8\x06\x3e\x0d\xc2\x53\xca\x8b\x76\x90\xa8\x4a\x8c\x3c\xe4\x24\x61\x84\x8b\xd7\xa9\xed\xb9\xcf\x3b\x37\x98\x9f\x62\x89\xaa\x2a\xab\x28\x5c\xa1\x28\xd9\x61\xe0\x06\x05\xb3\x30\x3a\x5d\x45\xe8\xd9\x7d\xc5\xe4\x6f\x34\x94\x5b\x2a\x8c\x83\x46\x83\xfc\x39\x0a\x23\xdf\xf6\xdc\x37\x32\x8e\x12\x3e\x2b\xd7\x77\xc3\x1b\x05\x79\x08\xd3\x2a\x56\x15\xdf\x0e\x52\xdb\xf3\x76\x78\x99\x96\x68\xa6\x3c\x47\xa1\x2f\x1a\xa1\xf7\x4e\x1c\x2b\x49\xa8\x44\xc8\x0f\x37\x88\x74\x48\x10\x89\x95\xc4\x8e\xe6\x28\x71\x83\xb9\xe2\x46\x11\xf2\xd0\xc6\x0e\x12\xe5\x29\x0a\xb7\x31\x8a\x62\x65\xbb\x70\x3d\xa4\xd8\xab\x95\x87\x67\xae\x04\x68\xcb\xda\xbd\x2f\x4d\x0c\x29\x6e\xac\x78\x5c\xe9\x0d\xad\xbb\xf7\x55\xeb\x1e\x20\x27\xf4\xec\xb8\x11\xc8\x33\xc3\x18\x93\xbe\xf4\xd0\x49\x31\x3e\xa2\xf3\xd6\x7b\x05\x2e\xec\x60\x8e\x28\x3e\x5f\x9e\xc2\xd7\xd3\xd8\x7d\x73\x83\xf9\x07\xc5\xa1\x8a\xff\xf4\x29\x7c\xfd\x22\x58\xf2\xcb\xd6\x9d\x25\x8b\x2f\x78\x2e\x41\x98\x28\xf6\xf3\x33\x72\x30\x8f\x3e\xed\x94\x2f\x2b\x7b\x36\x73\x83\xf9\x17\x25\x8c\x70\x4f\xd1\x0c\x45\x5f\x08\x1e\x4a\x5b\x0c\x83\x19\x78\x86\x9e\xed\xd4\x4b\x14\xcc\x0d\x0a\xe5\x06\xbc\xa7\x6c\xcf\x13\x84\xa1\xcd\x3a\xef\x15\x18\x46\x11\x72\x12\xd2\xce\x73\x03\xa4\x2c\x10\xb1\x0c\x2a\xeb\x9f\xbd\x57\x3e\x46\x68\x83\x82\x44\xb1\x67\x2f\x69\x9c\x90\xb5\xc3\x8b\x49\x86\x8a\x31\x11\xed\xe7\x04\x45\x4a\x18\xb9\x28\x48\xe8\x5a\x3b\x64\x66\x31\xee\xd2\x32\x94\x30\x50\x1e\xdc\x60\x16\x6e\x63\xe5\xe3\x22\x0c\x90\x62\x07\x33\x0c\x72\xc7\x53\x3a\xc8\x79\x25\x2e\x89\xbd\x52\x16\xee\x7c\xe1\x91\xd9\x25\xa1\xf2\x84\x14\x27\xf4\x57\x1e\x4a\x90\xb7\x53\x88\x5e\x5d\xd9\x11\x9e\x9a\xe8\xec\x73\xf0\x1f\xea\xe7\xe0\x3f\x3e\x7c\x78\x42\xcf\x61\x84\xe8\x6f\x3a\x3f\x22\x4d\xe4\xc5\xa0\xe4\xc4\x6b\xf1\x33\xde\xf5\x2d\xb2\x63\x3e\x07\x8b\xc4\xf7\x68\x65\x69\x6b\x7d\x50\xb2\xcd\x49\x6a\x93\x1d\x8e\xa9\x77\x4a\xa9\xf7\x41\x69\xbd\x6f\x9d\x13\x50\x87\x6c\xdd\x2d\x7a\x5a\xba\xc9\x69\x82\x5e\x13\x3c\x22\x3a\xa5\xe4\xfb\xa0\xb4\x9a\xcd\xff\x4d\xea\x9d\xe5\xea\xd9\xab\x53\x81\x2c\x15\xa8\x1f\x94\x68\xfe\x64\xff\xf8\xa7\x27\xcf\x76\x96\xaa\xd2\xfc\x89\xb4\x3a\x67\xd3\xc4\x72\x6a\xe1\xfa\x44\xc4\x7d\x7e\x17\xa0\xed\xe7\x77\x64\x7f\x9d\x2b\x71\x12\xa5\x4e\x92\x46\xb6\x27\xf6\x1a\xa6\xde\xcc\x8d\x57\x9e\xbd\x53\x1c\xba\xfc\xde\x4e\xf9\xd1\x32\x5a\x4d\x55\x09\x3d\x6c\xec\xf1\x65\xff\x89\x74\x7d\x37\xd6\xc7\x1f\xd8\xd6\xc3\xd4\xdd\x9c\x67\x1b\x50\x96\x24\xa7\x01\xc6\x8f\x70\x91\x90\x1c\x44\x31\x63\x89\x68\x9f\x06\x68\x4b\x68\x44\x56\xe0\x73\x60\x47\x89\xeb\x78\x48\x55\x6c\xac\xa8\x54\xe5\xd9\x9d\x3b\xf6\x0a\x73\x0c\xf9\x9d\x46\xb8\x2c\x0c\x89\x51\xba\x40\xf6\x8c\xfc\x97\xa8\x78\x2c\x2c\xdc\x40\x55\x02\x7b\x83\x65\x14\x31\x25\xe9\x22\x31\xb4\x3e\x28\x4f\x5e\xe8\x2c\x7f\xce\xa8\x03\xc2\xd9\x4e\xde\x94\xb7\x14\x19\xcc\x61\xbe\x1d\xcd\x31\xcb\x54\x31\x7c\xfb\xbd\xa2\xc5\x8a\xad\x3c\xa1\x38\x51\x56\x91\xed\x24\xae\x83\x67\x8c\xe5\x89\x62\x0b\xe6\xfc\xf2\x64\x3b\x4b\x3c\xb5\x60\x46\x57\xeb\x8b\xd8\x5f\x53\x94\x28\x76\xa0\xa0\xd7\x95\xe7\x3a\x2e\x66\x4e\x37\x71\x6d\x4f\x21\xac\x60\x7b\xee\x3c\xa0\x8a\x5c\x08\x80\x2d\x52\x1c\x3b\x50\x3c\x1b\xb3\x69\x1a\x53\x59\xa7\x28\x64\xaa\x5f\xdc\x60\x81\x22\x37\xf9\xc2\xda\x84\x81\x92\x2c\xdc\x60\x8e\xe5\xd6\x12\x29\x5f\xfe\x9c\x2c\xfe\xf3\x8b\x58\x67\xb2\x03\x9e\xc2\xd9\x8e\xd2\x86\xe2\xf9\x41\x69\x72\x06\x2f\xf0\x74\x4e\x79\x3c\xd9\x31\x22\x5a\xe7\xbf\xdc\xc0\xf1\xd2\x19\xa2\x75\x31\xef\x32\x2d\x43\xd8\x18\x57\xfb\xe9\x67\xd1\xd5\x96\x71\xff\x9f\xa4\xbf\xb2\xae\x72\x1b\xe4\x4f\xd2\x5f\x59\x15\xc6\xea\x7f\xc2\xb3\xa6\x94\x24\xc5\x19\xb1\x3e\x28\x1e\x7a\x4e\xb2\x9d\x55\x24\x3c\x6f\xfb\x34\xe7\x1b\x93\x73\x80\x99\x26\x69\x84\x4e\x57\x51\x18\x3e\x2b\x51\xea\xa1\x0f\x78\xc9\x85\xa2\x20\xb4\xe7\x66\xd4\x87\xe7\xd0\x49\xe3\xd3\x8d\x1b\xbb\x4f\x98\x43\x71\x39\x36\x44\xc9\x22\x10\x98\x12\xa6\x09\xc6\x80\x74\x1d\x06\xd2\xde\xc2\xfd\x10\xc3\xd5\xf6\x7d\x3b\x71\x1d\xa2\xd3\x22\xe4\x20\x77\xc3\xdb\x3e\xa5\x89\xb2\x0d\x53\x6f\x16\xfc\xdf\x44\xa1\x8a\x04\xdb\x70\x8b\x70\xab\xd8\x0a\x1b\x94\x74\x9c\x1b\xea\xbd\x62\x05\xca\x1c\x05\x28\xb2\x3d\x15\xaf\x7b\x4c\x3b\x51\x7c\x64\x07\x74\x5c\x3c\x3d\x56\x1b\x2b\x10\x62\x1a\x62\x5e\x75\xb1\x91\xf3\x8c\xc1\xa4\x5b\x37\x48\x10\xe1\xe5\x90\xb5\xf3\xd0\x0c\x0b\x05\xdc\x9c\x21\xc2\x66\x8c\x75\xa6\x8c\x0c\x9b\xd1\xd6\xc6\x9b\x62\x89\x76\x4f\xa1\x1d\xcd\xe4\xfe\x54\x4a\x90\x88\xf4\xc5\x88\xab\x2c\x6c\x6c\x72\xf9\x08\x23\x38\x43\x09\x8a\x7c\x37\xc0\x23\xf2\x29\xa7\xb8\x92\x1b\x2b\xab\xc8\xf5\xed\xc8\x25\x5b\x4b\x74\x4e\x80\x76\x30\x6b\x84\x11\xe9\x7b\x6b\x63\x32\xe7\x28\x43\x24\x9a\xed\x6d\xed\x5d\x8c\xd5\x02\x5e\x2a\x14\x24\x68\x96\xe9\x78\xd9\x88\x9b\xa1\x0d\xf2\xb0\xe9\xf2\xde\x0f\xdf\x5c\xcf\xb3\xdf\x87\xd1\xbc\x81\x82\xd3\xfb\x69\x63\x16\x3a\x71\xe3\x01\x3d\x35\xe0\x74\xda\xc8\x73\x01\xe9\x07\xeb\xaa\x72\x3f\x2b\xdb\x71\x91\xe7\x85\x44\x38\x11\x2b\xe1\xc9\x0b\xe7\x8d\x76\xb3\x75\xd9\x68\x76\x1a\xb9\x6e\x4e\xed\x60\x76\x8a\xb9\x76\x6b\x47\xb3\x18\x4b\xc6\x95\x9d\xb8\x4f\xf8\x34\xb0\x6b\x7c\x0e\xfe\x92\xd8\x4f\x6e\x30\x43\xaf\xff\xef\xf3\xbb\xd3\xd6\xe7\x77\x7f\xa5\x93\xf8\x10\x84\xc9\x8f\xf9\xf9\xfc\x44\x77\x35\x23\xc1\x07\xa5\xa9\xfc\x2f\x61\xb9\x71\xc1\x47\xe6\xcc\xfc\x0b\x0a\x99\x9d\x1b\xcc\x65\x31\xa8\xcd\x66\x64\x05\x98\x1a\xc0\x1a\x51\xa1\x1a\x11\x6f\x0e\xd3\x8d\xd0\x73\xf8\x2a\x44\xe1\x14\x2f\x20\xe1\xb1\x0d\x8a\x9e\xbd\x70\x8b\x2b\x19\xb3\x39\xd5\xe1\x96\x41\x04\xce\xa2\x42\xb9\x4a\x96\x4e\x26\x7c\xb8\x24\x90\xe4\x11\xef\xf7\x03\xdf\x05\xb9\x4d\x2c\x26\x7e\xb7\x5b\x61\x96\x5c\x2d\x98\x48\x67\xe6\x26\x95\xe8\xe1\x8a\x49\xba\x98\x9a\x5c\x58\x75\x60\x11\x29\x5a\x83\x1d\x97\xdb\xaa\xf2\xe5\xcf\x8b\xd6\x7f\x7e\x39\xfd\xf2\xe7\x45\xf7\x3f\xbf\x10\xf9\xcf\x77\x2a\xee\x07\x63\xf5\x14\x26\xf8\xd4\xc5\xba\x7c\xaf\x3c\x20\x25\x48\x97\x54\x73\x24\xe1\x8a\xf4\xc8\x34\x08\x56\xbe\xc8\x8e\x5d\x14\x11\x84\xa3\xd0\x53\xb6\x2e\x96\xcf\x0a\x36\x98\x95\xd8\xb1\xb1\xbd\x6a\xc7\x8a\x9b\x28\xf6\x26\x74\x67\x31\x6f\xe9\x84\x9e\x67\xaf\x62\x37\x98\xbf\xff\x3d\x34\xeb\xa2\xa5\x2a\x8b\xb6\xaa\x2c\x3a\xaa\xb2\x38\x53\x95\xc5\xb9\xaa\x2c\xba\xb2\x16\x38\x4d\xc2\x15\xa6\xbc\x54\x42\x11\xfd\xa0\xfc\x89\x13\xec\x34\x07\x90\x74\xe9\x2d\x8a\x51\x22\x88\x1c\x06\xca\xca\x8e\x6c\xb2\x1e\x19\x91\xa7\xae\xef\x7a\x76\xe4\xed\x54\x4e\x29\x8e\x6b\x18\x28\x5f\xfe\xbc\xfa\xcf\x2f\xb1\x32\x47\x58\xcc\xc4\x28\x79\xaf\x5c\x87\x5b\xb4\xc1\x0a\x7e\x8b\x14\xdb\x8b\x43\x5a\x2e\x04\x56\x6e\x11\xf0\x66\x4f\xf1\xc1\x2e\x42\xfe\x17\x25\x0d\xdc\x04\x9b\x96\x71\x82\xec\x19\xb6\x44\xbf\x20\x1f\x6b\xdf\xd5\xb1\xe8\x8a\xc9\xd7\xe2\xab\x3d\x3d\x45\x68\xe3\xda\xd4\x6b\x23\xed\x1e\x3d\xc5\x4a\xdd\x4e\x90\xf2\x84\x16\xf6\xc6\xc5\x62\x8f\x4a\xd1\x99\x9d\xd8\xa7\xff\xa1\xd8\x49\x12\xb9\x4f\x69\x82\x08\x6f\x84\x29\x86\x13\x8f\x82\xb2\xf2\xd2\xb9\x1b\x08\x1b\xa3\xb0\x0d\xb1\xbe\xc3\xc7\xb2\x90\x9e\xca\xf0\x36\x83\x8b\x28\xf4\x91\x4a\xb6\x9b\xaa\x58\x86\xaa\x8c\x57\x28\xb2\x55\xc2\xa4\x53\xfb\xd9\x8e\x5c\x61\x73\xe0\xee\x84\xc1\xe1\xa4\x51\x4c\x27\xe6\x06\x33\x3a\x5b\x6a\x90\xcf\xc4\xac\x85\x71\x2f\x59\x45\x8c\xe4\xd4\x2c\x96\x84\x81\xd2\xb9\x3a\x15\x76\x3a\x3f\x0c\x90\x25\xc6\x1c\x2a\xcd\x99\x9a\xe8\xf1\xd2\x5d\xad\x88\x24\xfe\x1c\xd8\x4f\x4f\xd1\x5f\x12\x37\xf1\xd0\x5f\x55\xf6\x17\xa1\x53\x18\xb9\x73\x37\xb0\xbd\x53\x0a\x53\xfe\x2e\xe4\x41\xa1\xcf\x0f\xd4\x15\x89\x59\x3d\x33\xbb\xeb\xeb\x28\xb3\x30\x49\xd0\x2c\xab\x4a\x49\xf1\x41\x59\x20\x6f\x25\x99\x10\xdc\xf2\xa7\x0c\xd1\xcc\xcc\xf1\x42\xd7\xa7\x18\x99\x53\x37\x58\x7e\x50\x82\x90\x4d\x81\x1b\xe0\xf6\x6c\x46\x0c\x84\xbf\x57\xb0\x58\x2b\x42\x7e\x66\x23\x91\xbd\xfd\x81\xa9\xfd\xb2\x5d\xc4\x2c\x3c\xce\x7e\xa1\xa7\x7e\x0e\x52\xfc\xcf\xcc\x3b\x92\xa3\xd9\x70\xac\xb9\xc2\x7a\x50\x48\x27\x21\xfb\x6f\x8a\xcb\x2b\x27\xdb\xe4\x4d\x67\x89\x74\xee\x11\x86\xdd\x2c\x39\x95\x0a\x44\xdd\x59\x65\x5f\xef\xcf\x39\xe6\x0c\x80\x6d\x37\x4e\xe1\xfb\x60\x16\x0a\x0b\x81\x09\x64\xd6\x1d\x31\xde\x89\x17\xa6\x60\xb9\x2a\xcd\x1c\x76\x4f\xea\xe7\x20\x4e\xa2\x30\x98\x57\x4d\x35\x67\x83\x92\x63\x0d\x19\xb7\xb8\xd7\xc8\xc9\x75\x2b\x0e\xbd\xf9\x7d\x96\x6d\x2e\x36\x64\x8c\x6d\x35\x3a\x5a\x85\x65\x7c\xd9\xfc\xdf\x3f\xd5\x0f\x42\x8e\xc7\x85\x63\x86\x90\x32\x64\x4b\xf1\xfd\xf4\x25\x4e\x9f\xbe\x90\xc1\xbf\xc4\xe9\x2a\xb3\xe8\xa9\x46\xa3\x3e\x01\xac\xa3\xcb\x87\x76\x6a\xa5\x14\xcf\x31\x64\xe6\x29\x21\x57\xca\x04\xe3\x2a\xa4\x6e\x68\x7c\xae\xf3\xec\xc4\xdd\xd4\x9a\xfb\x17\xe7\xff\xfb\xa7\x32\x9f\x52\xd6\xdb\xa0\x88\x98\xb8\xdc\x38\xc7\x86\x3c\xd9\x9e\x9c\x5c\xe9\x93\xf2\x77\x85\xf3\xc3\xe9\xfb\xf6\x39\xf2\x7f\x56\xfe\xc1\xe6\xa1\x10\x26\x3e\x7d\xcf\x0b\x25\x4a\xdc\xb8\xc1\x32\xe6\x53\xb7\xe9\x94\xb9\x81\xef\xb9\xc1\xb2\x78\x38\x90\x05\x00\xad\x90\x95\xfc\x5c\x7d\x50\x90\x5c\x06\x64\xcd\x24\xe1\x37\x8f\xec\x9d\xd4\x02\xeb\x2c\x6c\xde\x6e\x08\xb5\x97\xdc\x93\xd1\x6a\xbe\x67\x1e\x4c\x4e\xb4\x05\x36\x60\x7e\xfc\x89\xfb\x2a\x73\x13\x26\x30\x69\xda\xb5\x13\xa7\x15\x0b\xd3\xff\x87\xa4\x8e\x02\x72\x25\x43\x14\x4d\x8c\xb8\x1b\x0c\x2b\x98\x95\x67\x3b\x68\x41\x4f\xf0\x64\xa2\x8d\xc0\xf6\xd1\x4c\xb1\x03\x67\x11\x46\xb1\xf2\x23\x36\x47\xc2\x34\x51\x16\x11\x7a\xfe\x89\x4a\x71\x8b\x1d\x45\xb0\xb0\xf6\xc3\x08\xf7\x17\xd9\x78\x89\x9f\xc3\x08\x9b\xa8\x58\x8e\xbf\xa4\x71\x42\x54\xae\xfd\x17\xdc\xf2\xaf\x18\xff\x15\x56\x89\x21\x3e\xcc\xe0\xcd\xaa\x92\x33\x0d\x36\xe8\x49\xa7\x8e\x9d\xc6\x28\x56\xe2\x15\x72\xdc\x67\xac\x85\x76\x0a\xf5\x92\xe2\x96\xbe\x1d\xec\x94\x30\x59\xa0\x48\xb8\xf0\xf0\x41\xc0\x8e\xb0\x99\x10\x32\xa7\xce\x2b\x1e\xf7\xd9\x65\xb6\x67\x8d\x0f\xb6\x70\xf5\xc4\x1c\xb1\xad\xab\xb3\x66\x9b\xb0\x0d\xb1\x9a\xe9\x94\x7f\xa2\xbf\x1d\xcf\x8e\xe3\xbf\xfe\x94\xe3\xa7\x4c\xe2\x56\x2c\x09\x11\xf4\x47\xad\xb2\xdc\x4d\x7d\x47\xd9\x4a\x0a\x56\x87\xe1\x0c\x71\x4e\x5f\x11\x2f\x95\x13\xce\xf0\x7f\x96\x4f\x33\xbc\x63\x6d\x7f\x55\xe1\x81\xaa\x76\xf5\xd6\xed\xe1\x16\xf2\xa9\x60\x92\xdd\x7d\xe1\x6c\x46\xac\x25\x21\x9d\x98\xd9\x5f\x10\x1f\xff\x60\x13\x13\x17\x11\x6c\xa3\x14\x64\xb7\x64\xe3\x55\xab\x29\x61\x39\x16\x1b\x62\xa3\xad\x85\xe7\x21\x1b\x76\xf1\x3e\x45\x4a\x3c\xad\xf8\xf0\x6c\x7b\xf8\x14\xc2\x8e\x17\xc4\xe4\x88\x90\xbd\xc4\x87\xa2\xd8\xc5\x54\x95\x8f\x14\x76\x9a\x84\xa2\x35\x73\x7d\xe3\xb2\xd3\x85\x8b\xed\x5d\x25\x76\xa2\xd0\xf3\x9e\xec\x88\x6d\xef\xff\xa3\x78\x68\x6e\x3b\x3b\x7a\xc2\xc1\x27\x4c\x6c\xb3\x93\x0e\x3d\x7b\xa5\xb2\x9e\x7c\x7b\x49\xc8\x96\x28\xf8\xf4\x15\x93\x53\x0b\x35\xb6\xe8\x99\x98\x1c\x01\x98\x2e\x20\xb3\x24\x7e\x3e\x3f\x3e\xe5\x13\xe3\x06\x81\x18\xfe\xe7\x22\x83\x98\xc4\x19\x26\xa4\x21\xf5\x8d\x89\xd5\xd0\x98\x2f\xca\x09\x83\xd8\x8d\x09\x1d\x98\x9d\x8c\x77\x45\x82\xe6\x3b\xe5\x47\xdf\x4e\x9c\x05\x8a\xa9\x05\x4a\xce\x22\x64\xe3\xfd\xf4\x7e\x9f\x76\x15\xe3\x5b\xe4\xb6\x94\xa8\x23\x81\x03\x9d\x8a\xeb\x33\xcd\x5b\xd4\x03\xbe\x3b\x9b\x79\x94\x1b\x99\x79\x25\xcc\x1e\x66\x38\xe5\x4c\x4d\x62\x63\x62\x3b\x97\x8e\xc4\xae\xae\xf2\xb2\xf6\x94\xb3\x62\xbc\x99\x0b\xe4\x1f\xc2\x68\x69\x53\x19\xfd\xcc\x9c\x0e\xd3\x4f\xbd\xec\x7c\xfa\x94\xce\x69\x07\xad\x66\xa3\xd5\x52\xdc\x58\x89\x13\x97\x9c\xf2\xd6\xa9\x1b\x11\xbb\x74\xdf\x25\x4f\xb5\x80\x69\x77\x2f\x2f\x2e\xf3\xbc\xb5\x70\x67\x33\x14\xfc\xbc\x97\x14\x85\x33\x2c\xbd\x47\x66\x84\x24\xb7\xca\xfc\xdc\x4c\xe8\xc5\x8e\x84\xe8\x03\x3f\x1c\x52\xb2\x71\x0b\x61\x16\xa6\xb8\x05\xad\xcc\xad\x08\xe6\x3e\x65\x0a\x9e\x5e\x16\xd0\x1d\xf8\x27\x32\xc0\xa9\x83\x3c\xef\x94\x01\x7e\x96\x2b\x89\xd3\x50\x4d\x3d\xae\xc9\x18\x98\x8e\xb3\xcf\x41\x47\x1a\xb1\x6a\x78\x31\x3f\x28\xa5\x63\x95\xf0\xc2\xc6\xb2\xe1\xa6\x60\x53\x4d\x79\xda\x71\x79\xca\x1c\x16\xf8\x94\x34\x64\x5c\x2c\xbc\xae\x7f\x4e\x66\xe4\xd4\xee\xce\x03\xe2\xb3\xca\xb5\x52\xbe\x64\x93\xca\xdc\xb1\xa6\xfb\x2a\x35\xc0\x3c\xc3\xcd\xbb\xcf\x41\xb2\xa8\x32\x23\x29\xca\xc9\x22\x67\xf7\xe6\x4f\x28\x0c\x71\xae\x01\xf2\x47\x13\x06\xe4\xae\x7d\xb2\x15\x4f\x25\xb3\xa3\x53\xda\xee\xe4\xd6\x9e\x31\x86\x67\x3f\x21\x2f\xdb\xeb\x44\xdc\x91\xb2\x58\x48\x4b\xba\x7f\xe9\xf5\x26\x56\x02\xd4\x8b\x20\xf9\xc2\xdd\x80\x58\x6e\xdc\x25\x5e\x3e\x02\x93\x0e\xf7\x1c\xf7\xc5\x4e\xcd\xfc\xdd\x94\x49\x23\x7b\xe6\xa6\xf1\x17\xaa\xc0\x7d\xdb\x19\x4f\x99\xfd\xac\xd8\xb3\x99\x74\xc5\xa6\xa3\xc4\x76\xbd\x58\xb1\x93\xaf\xd8\x65\x67\xcd\xab\xce\xe7\x80\xc6\x3f\x08\x0a\xec\xf3\x8c\x88\x0b\x49\x0c\xc2\x94\x42\x33\xe2\x24\x91\x76\x15\x9d\xb0\x74\xca\x69\x34\x14\x83\x9d\x94\x89\x9b\x96\xa0\x9a\x73\x2e\x8a\x43\x81\x9b\xfa\xca\x76\x81\x02\x2c\xeb\xe3\x05\x77\xdf\x3e\x51\x0f\x05\xf3\x57\x29\x3f\xa2\xf7\xf3\xf7\x8a\x1d\x2b\x11\x8a\x99\x6e\xf3\x43\xbc\x4c\x8e\xe7\x3a\x4b\xe2\x18\x0d\x53\x67\xa1\x24\xf6\xea\xa7\xf7\xd8\xf8\xb2\xbd\x08\xd9\xf4\x6e\x82\xf5\x8a\x2d\xb1\x59\x48\xcd\x7b\x37\x26\x2a\x4a\x38\x92\xa9\x9d\x15\x23\xe4\x93\xf5\x77\xd2\x08\xf3\x91\xb7\xe3\xd3\x70\xc2\xe0\x39\x8d\x89\xc9\x37\x63\x9e\xdf\x58\x71\x93\x18\x4b\xa5\x9d\x98\x64\xb2\x0d\x4f\x93\x30\xc8\x7c\xc5\x76\xb0\xdb\xda\x3b\x7a\x5f\x40\xe8\x7d\xbc\xd7\x91\x13\x92\x04\xa3\xa8\xbc\x3d\xb6\x5b\x88\x9f\x0a\x9f\x39\x57\x09\xbd\xb5\xf9\x1c\xe0\x0d\x61\x47\xc8\xae\xba\x90\xa8\xbc\x91\xe1\x4e\x07\xf9\x1c\x56\x30\x84\x64\xbb\xab\xc2\xf2\x61\xe0\x9f\x0e\x9e\xb4\xc5\xc4\x09\x26\x0c\xcd\x4a\x7f\x64\xad\x1b\xb4\xd8\x13\x25\x01\xed\x8a\xc8\x02\x72\xe4\x78\x0e\x23\xbf\x5a\x11\xb2\x19\xd9\x81\x83\x30\xe3\x10\x2f\x90\x68\x22\x91\x43\xba\xf4\xa3\x4e\x32\xee\xe4\xc1\x22\x20\x08\x83\xd3\x2f\x7f\xa6\x73\xf8\xcf\x2f\x0a\x0f\x43\xfa\xa6\xad\xb8\x4a\x3d\xaf\xd1\x69\x9e\x77\xdb\x9f\x83\xbf\x44\xa1\x87\xfe\x1f\x0f\x48\xfa\xfc\xee\xaf\xcc\x88\x66\x3e\x15\x12\x90\x81\xa2\x6a\xb9\x51\x40\x6c\x1b\x46\xb3\xd3\x6d\x64\xaf\x30\x4e\x92\xef\xea\x37\xc8\x8a\xab\xab\x66\x9e\xde\x62\x0c\xc9\xd5\x92\xf9\xc4\x5b\xd2\x45\xb6\xf2\x80\x9e\x06\x6e\x42\x6c\x85\xed\x02\x45\x48\xf9\xb1\xfd\x93\x32\x43\x71\x12\x85\xbb\x58\x09\xc8\xe1\x58\xf9\x62\xa7\x33\x37\x64\x87\xf2\x8d\x3b\x43\xe1\x17\x7e\x33\xc7\x9c\xbd\xc4\x54\xd1\x82\x59\x84\xad\xc4\xb3\xec\x5e\x5e\xb2\xb8\xdd\xc0\xa6\x9e\x7e\xbc\x79\x89\x28\xa3\x72\x81\x68\x7f\x6c\x98\xc5\xec\xf2\x3a\xef\xd5\x13\x0c\xf5\x17\x5c\x47\x5e\x03\x95\x29\x22\x0e\x20\x6e\x53\x5c\x9e\x15\xc5\xe9\x93\xef\x26\x62\xbd\xb8\x1e\xb2\x57\x2b\x64\x47\x78\x45\x3e\x30\x1e\x29\x5e\x98\x8d\x57\x6e\xe0\x86\x81\x9d\xa0\xd9\x07\x2c\xcf\x95\xcf\xef\x16\x76\x30\xfb\xfc\x4e\x72\x29\x62\x66\x63\x82\x78\xc6\xba\x91\xaf\x1f\xff\xcb\x7d\x56\xfe\x84\x02\x22\xa7\x19\x83\x9c\xd2\xc6\xa7\xcf\x61\x74\xca\x78\x93\xd9\x3d\x1c\x49\x45\x29\xa3\x29\x97\x4a\x38\x66\x85\x05\x2c\x15\xe5\xff\x50\xe1\xc5\x27\x27\x4e\x6b\x55\x1c\x8b\x4b\xff\x51\x38\x65\xdf\xf2\xdb\xee\x00\x45\xdc\x42\xc5\x8b\xc2\xac\x22\xea\x89\x61\xfb\x91\x4a\xe5\x19\x39\x91\x44\x28\x4e\xf0\x31\x5a\xbe\x8a\x23\x97\xb3\x59\x28\x8b\x10\xb2\x1f\x4e\xfd\xf0\xed\x94\xca\x57\x32\x50\xd5\x12\xef\xad\xc5\x69\xb1\xb7\x92\xa0\x4d\xb9\x56\xce\x54\xe4\x07\xb5\x0a\x8b\x5d\x16\xf2\x62\x6c\x7b\xe6\x86\x74\x1d\x72\xe5\xce\x02\x39\xcb\xa7\xf0\x55\x2c\xc6\xbe\x30\x8b\x43\x57\x50\xd4\xf4\x2f\x4c\x52\xa1\x3b\x4b\x12\x30\x7c\x55\xa4\x16\x6c\xb3\xe7\x55\x4e\xe1\x34\xa8\x54\x9b\x37\xdc\x84\x2f\x1e\x09\xf9\x69\xe1\x8e\xf5\x19\x73\x8d\x1d\x21\x72\x83\x4b\xee\x5b\x23\x44\xfc\x7c\xbc\x0f\x6f\x47\x6f\xf6\xd1\x8e\x31\x08\x3d\xa1\x26\x0b\xe4\x46\xca\x8f\x8b\x30\x72\xdf\xc2\x20\xb1\xbd\x9f\x88\x18\xb1\xdd\x80\x1e\xba\x15\xd6\xcf\x07\xd1\x11\x5f\x83\x67\x17\x79\x33\x7c\x8c\xe6\x26\x11\xe0\x57\xd8\xb8\x50\x8a\x49\xf0\xdd\xe0\x94\x04\x13\xe1\x33\x08\x36\xd6\xc9\xd1\xed\xe7\x2f\xf8\xa0\xc5\x3b\x89\xf9\x31\x36\x0d\x08\x93\x12\xeb\xe5\xcb\x9f\x67\xee\xe6\x3f\xbf\xc4\xaa\xb2\x5d\xb8\xce\x42\x59\xd8\x58\xfe\x49\xdd\x35\x7f\xfe\x82\x6d\x6d\x36\x92\x38\x43\x85\xca\x16\x89\x8b\x1b\x9b\x1c\xc7\x51\x10\xe3\xb3\xaa\x18\x8e\x5e\x39\x30\x4f\x13\x19\xd1\x56\xe2\xc4\x0e\x66\x76\x34\xa3\x9e\x24\x2e\x3e\xbe\xe9\x64\xd6\x6a\x77\xce\xaf\x58\x43\xf9\xaa\x76\x91\xf8\xde\xfb\x78\x85\x9c\xf7\xdb\x85\x9d\x6c\xe7\xe4\xc6\xd7\x4f\xbd\xc4\x5d\xd9\x73\xd4\xf8\x21\x59\xa0\x53\x3e\x47\x72\x41\xeb\xa1\x39\x0a\x66\xa7\x5c\x94\x11\x6b\x45\xc6\x3f\xe7\xcf\x90\x59\x87\x6f\x79\x71\x21\x14\x3e\x4b\xd8\xe7\x39\x81\xfa\x71\x15\x3c\x05\xc5\xb3\x77\x61\x4a\x91\x2e\xec\xc6\xcc\x4a\xca\xf6\x66\xde\x80\x6d\xe5\x95\x0c\x31\x1b\xb0\xe6\x5b\xb1\x1d\x91\xbf\xa1\x2d\x6b\x25\x72\x8c\xcb\xe9\x68\x1a\xab\xc6\xe7\x2d\xf9\x9f\xf9\x36\xa0\xf4\xa9\x89\xb9\x51\x14\x46\x27\x12\xdc\x44\x71\x78\x3d\x95\xcb\xc4\xf1\xa9\x12\xd7\x8a\xfb\x83\x2a\x97\x16\x81\xee\xb5\xeb\x4a\xbe\x39\x71\x32\xdb\x2e\xdc\x04\x9d\xb2\xf8\x49\x66\x1f\xc8\x61\x5f\x3c\xf2\xb8\xda\xbb\x21\xbc\xdc\x55\xae\x7e\x21\x3c\xb2\x63\xa6\x74\xad\x20\x34\x06\x5e\x0f\x72\x83\xf7\x3e\x5b\xc8\xdc\xa2\x50\x1d\x4b\x8d\x84\xf0\x59\x71\x03\x27\xa2\x91\x19\xb8\xe5\x0c\xf1\xbf\xb8\x0e\x15\x63\xbc\xcf\x04\x7f\x90\xfa\x4f\x28\xa2\x82\x9f\xa9\x7d\x22\xf5\x4f\xe3\x15\xa6\x72\xd1\xaa\xa8\xa8\x1e\xa6\x49\xbe\x3a\x25\x08\x27\x35\x73\xa9\x91\xf9\x0b\x6d\x83\xec\xc8\x59\x08\xe1\x8f\xc5\x25\x3e\xc6\x60\xc9\x1b\xb9\x33\x44\x63\x68\xd0\x6b\x12\xd9\x0a\x71\xdc\xa0\x19\x26\x1d\x16\x7b\x58\x30\xd1\xd6\x0a\x51\x28\xc2\x18\xe2\xa1\x51\x61\x1a\xb1\x2e\xbf\xbc\xc7\x26\xf1\x29\xb3\xbc\xbe\x28\xc4\xaf\x4b\xe2\xa6\xe8\x21\x10\x4b\x5d\x42\xb9\x64\x81\xfc\xf7\xca\x28\x4c\x10\x0f\x37\x71\x49\xbd\x20\x4c\x94\xd8\xf5\x57\xde\x8e\xf5\xf8\x44\xce\xac\x34\x0e\xa6\xd8\x3b\xb9\xb2\xff\xbf\x34\x20\x93\xfb\xb4\x15\x14\x84\xe9\x7c\xf1\x1e\x1f\xd7\x95\x19\xb5\x59\x55\x7c\x32\x63\xfd\x1d\x2f\xb3\x5a\xe7\x97\xdd\xf7\xd2\xa1\xea\x34\x7c\x7e\x8e\x51\xf2\x41\x39\x6d\xaf\x5e\xb9\xae\xcb\xf9\x6d\x99\x8c\xa1\x18\xca\x26\x74\xb5\x79\x27\x6b\x70\x66\x64\xe7\x6c\x73\x6c\x07\x48\x0a\x94\x9f\xe0\x85\x05\x8a\xd7\x85\x1c\xee\xc5\x5d\x52\x69\xad\x33\x8e\xa1\x45\xf2\x45\xf0\xdf\xbf\x62\x5e\xad\xdf\xc5\x5e\xce\x05\xc4\x12\xe7\x36\x73\x0d\xb8\x34\x54\x28\x0b\xa3\x2b\x9e\x3f\x3e\x07\x19\x26\xcf\xae\x87\x4e\xd3\x95\x17\xda\xb3\x1c\xf3\xe3\x0e\x2b\x44\xca\x01\xc3\xba\x95\x47\x94\x63\xc9\xc3\xad\x98\x10\x15\x7e\x9f\x30\x4d\xc4\x29\xb4\xce\x91\xc3\x6e\xd8\x7c\xdf\x8e\x76\x85\x9a\x24\x36\xc4\x4d\x90\x5f\x29\xa2\x78\xf0\x67\xe9\x2e\xb2\xf6\x38\x97\x20\x7f\xe5\xd9\xfc\x3e\x56\x0c\x23\x0e\xb1\x7b\x46\xb0\x0c\xe9\xea\x8a\xc6\x68\x2d\xdc\x19\x22\x41\x91\x0c\x79\xe1\x22\xff\x42\xfd\xa8\x5f\x68\x6c\x78\x16\x3d\xf1\x23\x51\x48\x1f\xd3\x08\xc1\xe9\x94\x5d\x5c\x8d\x10\xc2\xdb\x95\xdc\x7b\x91\xd5\xcd\x0f\xca\x3c\xc6\x7f\xa1\x3d\xfe\xb5\x62\xe2\xa5\x78\xa9\x77\xea\xff\xaf\x1f\x60\x49\xaf\x49\x4e\x4f\x9f\xbc\x14\x7d\x50\x7e\x68\x36\x2f\x9e\x9e\x9f\xd9\xf3\x02\x37\x98\xb9\xf3\xf0\x83\xf2\x43\xb7\xdb\x6a\x3e\xb7\x59\xe9\x2a\x8d\x56\xf8\x1c\xf0\x43\xf7\xf9\xac\xed\xb4\x78\x29\x09\x83\xf8\x01\x5d\x76\xd0\xa5\xc3\xca\x22\x7c\x50\xfc\x61\xe6\x74\xce\xcf\xce\x59\x51\x18\xe1\x3d\xf8\x41\xf9\xe1\x79\x76\x81\x5a\x67\xac\x74\x87\x3c\x62\x83\xff\xf0\xfc\xec\xb4\x9a\x17\xac\x74\x1e\x21\x14\x7c\x50\x7e\x68\x5f\xda\x17\xa2\x83\x04\xd9\x1e\x2e\x6b\x3a\x57\x57\xbc\xa2\xb3\xb3\x71\xbd\xd6\x85\xdd\x7e\xba\x64\x65\x44\xa1\x93\x1e\x9f\x45\x77\x78\xa1\x7f\xe8\x3a\x17\xe7\x17\x33\xa9\xec\x74\x66\x47\x78\xea\x9d\xb3\x8e\x7d\xd6\xe4\xe8\x90\xc8\xc3\x5d\x91\x22\x31\x72\x42\x6c\x9b\x96\x3a\x8a\x53\xc7\x41\x71\x5c\x9c\xad\x1b\x3c\x87\xa5\x99\xd9\x51\x40\x4c\x9c\x3c\xb6\x33\x4c\x98\xa8\x48\x2f\x8f\xea\xd5\x1f\x9e\x2f\x9f\xaf\x9e\x6d\x51\xb5\x3c\x61\xe9\x11\xcc\x6b\xcc\xcd\xa7\x5c\x71\xec\x7f\x50\xce\x2f\xba\xab\xd7\x32\xc8\x9f\x7d\x50\x2e\xba\x97\x55\x20\x6f\xfe\x41\xb9\xba\x6a\x57\x81\x5e\xbd\x0f\x4a\xab\xdd\x6c\x0a\x58\xdd\x83\x16\x2c\x02\x3d\x74\x1a\xef\xe2\x04\xf9\xaa\x02\x3c\x37\x58\x0e\x6d\x67\x4a\xfe\x36\xc3\x20\x51\x95\xcf\xef\xa6\x68\x1e\x22\xe5\xde\xfa\xfc\x4e\x55\x6e\xc3\xa7\x30\x09\x71\xe9\x35\xf2\x36\x08\x9b\x4f\xca\x08\xa5\x08\xc3\xb4\xc8\xb5\x3d\x0c\x1a\x85\x49\xa8\x4c\xed\x20\xc6\xa5\x9f\xdf\xdd\xb8\x4f\x88\x29\x18\x5e\x98\xcd\x01\x57\xd0\xf0\x24\x14\x48\x6c\x5b\xc3\x0f\x5f\x5c\xda\x8e\x8f\x5b\x59\x36\xdd\xf9\x4f\xa1\x47\x0b\xc9\x78\xb9\xe6\xfb\x5f\xe1\x4c\xcd\x61\x18\x84\xa7\xb7\x68\x9e\x7a\x76\xa4\x2a\x43\x14\x78\xa1\xaa\x0c\xc3\xc0\x76\x42\x55\x81\x61\x10\x87\x9e\x1d\x17\xe6\x8e\xdb\xd0\xf1\x60\x98\x46\x2e\x8a\x94\x11\xda\xe2\x02\xf9\x4a\xf7\x1f\xdf\xfc\x94\xe1\xe8\x57\x0c\xd5\x0f\x18\x8e\x78\xbb\x70\xdc\xb3\x85\xa6\xaa\xb0\xff\xff\xc4\xe7\xf4\xaf\x0b\xff\xaf\x0a\x81\xff\xff\xd8\x7b\x17\xe5\xc6\x71\x24\x51\xf4\x57\xb8\xd5\x5d\x5b\xe5\x6e\x51\x45\x52\xa2\x24\xbb\xb6\x3a\xe6\x71\x77\xef\x99\x88\x9e\xb9\x37\xa6\xcf\x46\x9c\x88\x71\x9f\x3b\x94\x08\xc9\x9c\xe2\x6b\x49\xda\xa6\x7b\xa2\xce\xb7\xdf\x00\x08\x92\x78\x24\x1e\xa4\x2c\x55\xef\xec\x6e\xcf\x96\x6d\x10\xf9\x40\x22\x91\x40\x26\x1e\x29\xc9\xe2\x1f\x5a\x69\x07\xaf\x49\x3c\x8c\xd6\xef\x72\xad\x3d\x0f\x52\x81\x90\x75\xa2\xbe\x09\xfc\x20\x0c\x6e\xd5\xfb\x7d\xf2\x11\x1b\x6a\x8e\xa9\x7f\xf0\x9a\x27\x9b\x4d\xa7\x8c\xf9\x03\xc6\x70\x2c\xbf\x47\x75\xce\x69\x59\xaf\xf7\x51\x3b\xb7\x71\xc6\x11\x3d\xeb\x53\x91\x86\x03\x91\xd2\x58\xd5\x9e\x89\xb4\x3b\x39\x29\x1d\x9a\x04\xcf\x4b\x6a\x28\x8b\x47\x26\x2d\x4e\x55\xfe\xd7\x3a\x50\xb9\xf5\xbc\xb9\x87\x28\x5f\xf3\xb0\x24\x3d\x1f\x29\x1f\x72\x64\x2c\xc7\x8e\x58\xfb\x2f\xf6\x67\x09\x19\xd8\x6d\xf8\xf6\xac\x23\x84\x9d\xde\x71\xa7\x08\x87\xcf\x94\x09\xe6\x2c\x61\xaf\x42\xdc\x31\x2f\x76\x65\xa7\x3e\x9d\xa5\x3f\x26\xd8\x23\xbe\x23\x47\xc0\x44\xf4\xe1\x66\xbf\xfa\x68\x1c\xa5\x5f\x5e\xf9\x68\x9a\x01\x1f\xc0\xaa\x35\x56\xfb\xd3\x68\x17\x5c\xfc\xf0\xb3\x17\x63\x6b\x2b\x34\x6d\xfc\x82\x67\xc1\xac\x4e\x62\xb1\x27\xae\x54\xc3\x6b\xe6\x51\x28\xf1\x4c\xd3\x8c\x23\x45\x56\x67\x87\x8c\x27\x84\xbc\xe5\x76\x30\x34\xe2\xa9\x20\xf6\x5b\xaf\xee\x8c\x3b\x34\xf9\xf0\x4f\x7f\xd0\x06\x3a\x3c\x63\x75\x6e\x86\xe2\x61\x0e\xc7\x58\x1f\x76\xe1\x27\x6c\x36\xae\xa3\x3a\x22\xf2\x55\x4e\x44\x68\x8f\x39\x30\x03\x82\x2d\x3e\xff\x74\xc3\xe4\x03\x0c\xfd\xda\x6e\xd2\xd9\x00\xab\x6d\x7a\xcd\x9e\xf7\x2b\x6d\x77\xf3\xdd\xcb\xef\x16\x83\x1b\xb1\xca\x2a\xc3\x2e\xac\xb2\xc6\xb8\x05\x0b\xed\x4a\x2b\xe4\xf4\xdf\xbb\xc4\x74\x21\xcf\x51\xfe\x62\xdc\xd5\xb5\xdf\x3d\x95\xf6\xf4\xa6\xed\xbd\x9d\xb9\x0b\x36\x65\x03\x8c\x9d\x03\xc7\x52\xdb\x7d\x2f\xd5\x96\xd7\xb4\xdd\x2e\x61\xa3\xe7\xd7\xb0\xbb\x04\x6e\x99\xd8\xec\x37\xbc\xfe\x0e\xc6\xd4\x8d\x03\x3b\xeb\xf4\x6a\xfb\x00\x33\x83\xfb\xbd\xb8\x26\x84\xd1\x55\x1e\xf5\xe2\x3e\x5f\xe2\x2f\x4b\xfc\x69\x89\xbf\x2d\xf1\xc7\x25\xfe\xba\x14\x1c\x6e\x69\xb6\x16\xfc\x95\x10\x8e\x57\x04\x2c\x07\xcb\x07\x5f\xf2\x61\x02\x6e\xf6\xef\x18\x09\xe4\x5a\x6c\x1d\xc2\xe7\x4a\xaa\xe3\x0f\x6b\xa2\xae\x1a\x69\xc9\x1a\xa8\xc6\xd5\x22\x4d\x0d\x81\x5a\x01\x57\x6d\xc3\x48\x44\x8e\xdd\x90\x3a\xcb\x14\x45\xb1\x06\x91\x20\xb0\xd5\xe8\x67\x2e\x69\xf7\xb9\xb2\x78\x36\x1a\x58\xb5\xb0\x07\x84\xb2\x24\xc3\x65\x78\x1e\x4a\x59\xf0\xeb\x73\x51\xca\x9d\xb4\x9a\x89\xb2\x0f\x42\xb1\x1e\x88\x2f\x78\xeb\x92\x13\xc2\xce\x22\xc3\x2c\xda\x81\x96\xad\x53\x17\x69\x12\x8b\x31\xd3\xa5\x7f\xc3\xb9\xe6\x78\x24\xc1\x3e\xba\xb7\xdc\x6d\x43\x75\x80\x8f\xa0\xc8\xa2\xea\x33\xc6\x80\x7f\x8a\x33\xfb\x32\xe8\xb9\x04\x62\x79\x87\xe3\x0e\xad\x46\xfd\xc3\xa6\xe5\x31\x27\xf3\x7f\xcc\x3b\x14\x63\x84\xc2\xe9\x2c\x10\xb0\x48\xe8\xe0\x3b\x4b\x76\x1e\x34\xb1\x6f\x16\x16\x52\x82\xe9\xd6\x62\x69\x54\x37\xee\xe1\x21\x49\xfb\xd5\x18\xed\xb8\x8a\x06\x29\xb8\x01\xbc\xa4\xcf\xb7\x24\x75\x26\xc9\xfe\x96\x4e\xe9\xe2\x42\xf9\xb1\x2c\x51\x75\x88\x46\x27\x6c\x09\x87\x6c\x54\xe1\x2d\xc8\x42\x30\x28\xdc\x2e\x48\xae\x5c\x85\x28\xb4\x43\xf2\xe3\x14\x78\xfb\x1d\x87\x3e\x82\x40\x42\xac\x77\xce\xfd\x9b\xfb\xfb\xc0\xf3\xd7\xf7\xf7\x9e\xf7\x5b\x8f\x84\x99\xa9\x80\xb2\x93\x7b\x4c\x1f\x93\x21\x98\x25\xaf\x79\xa0\xf9\x9d\xc0\x35\x0f\x8f\xd9\x3e\x8f\x92\x54\x56\xcb\x61\x80\x2a\x83\xcc\xe3\xc8\x1a\xc7\xd1\x37\x31\x42\x01\xda\x7c\x84\xdc\x3b\x06\xa7\x35\x93\x6c\x20\x40\xaf\x6b\x5d\x4d\x77\x88\x0a\xa8\xe7\x35\xde\xb8\x88\x08\x38\x87\x1d\x50\x36\xb8\x1b\x0f\x45\x8c\xe4\xf8\xdd\x76\x19\xf2\x40\xcc\xee\x2d\xe3\x87\x91\x2d\x3f\x17\x17\x8c\x81\xb4\x1f\x9c\x11\xa5\xb4\xb6\x24\x75\x3e\xef\x63\xb9\xd7\x2a\x94\x39\xde\x72\x0d\xe8\xb3\xcc\xcc\xd0\x8b\x72\x07\x33\x1b\x0f\x72\x2f\x32\xa3\x02\xf3\x00\xf0\x21\x8d\xa5\xbe\x8f\x55\x91\xd8\x52\xea\x63\x70\x38\xc9\x6d\x18\x18\x1d\xd0\x80\x3d\x61\x5a\xa9\xe3\xbe\x20\xbd\x20\x2e\xd4\x97\x65\x85\xdc\x2e\x3c\x35\x06\x7d\xb0\xf6\xf6\xfa\xb3\x5a\xf7\xdb\xb3\x43\x50\xeb\xa5\x0f\x68\x0d\x48\x86\x83\xa6\x0b\xf6\x8f\x6e\xd4\xf2\x45\x75\xc6\xff\x9d\x09\xdf\xd3\x13\xff\x77\x4b\x47\xae\xc2\xcb\xe9\x6d\xaa\x1f\x96\x9c\x63\x47\x4d\xfe\x50\xcc\x5b\xe0\xc1\xa7\xe3\xe2\xdf\xec\xb8\xfc\x0d\x79\x11\xd4\x79\xcf\xb8\x73\x64\xe7\x9b\x1a\x74\xa6\xc1\x0e\xd7\xb8\xfe\x4c\x38\x33\xfe\xc3\x41\x80\x5f\xd4\xc8\xc9\xde\xb9\x09\x39\xf7\x67\x16\x03\xb4\xb6\x81\x05\x2d\xb2\x19\x3f\x91\x16\xf7\x67\x7a\x02\x48\xdf\x6e\x2c\x48\x77\x9b\xfd\xe7\xd1\xe6\xfe\xec\xd5\x83\xb7\xb8\xbe\x24\xf2\x65\x55\x3c\x0b\x03\xd0\xcd\x6a\xf7\x98\xa2\xb6\x0f\x09\x0c\x1f\x70\xe1\x10\xc9\xc5\x7f\x50\x2b\x86\xff\xed\x06\x2c\x50\xc6\x2b\x98\x2b\x2a\x5e\xa7\x61\x7d\x71\xc7\x52\x5e\xb8\xa7\xc7\xa6\x41\x55\x0d\xae\x12\x34\x1b\x34\x2c\xe8\x0f\x58\x1c\x64\xfd\xc6\x15\x76\xc1\xfa\xef\x3e\xdd\xbf\x39\x14\xa9\x3b\x78\xb7\xc2\xb0\xf1\x3e\xc2\xcb\xa4\x7e\x54\xa7\xae\x4f\xc4\x9d\xba\x01\xfd\xb9\xa2\x3f\xd7\xf4\x67\x48\x7f\x6e\xe8\xcf\x2d\xfd\xb9\xa3\x3f\x6f\xe9\x4f\xdf\xeb\x7f\xe9\x31\xfa\x14\xe5\x82\x52\xc2\xc3\x8f\x7e\xaa\xb3\x81\x6e\x9d\x0d\xa4\xeb\x6c\xa0\x5e\x67\x03\x03\x75\x36\xf0\x50\x67\x03\x1b\x75\x36\x70\x52\x67\x03\x33\x75\x36\xf0\x83\x49\x78\xcc\xef\x0c\x3d\x7f\x24\xd8\xf3\x56\x67\x2c\x7b\x59\x3c\xb0\x97\xc5\x03\x7b\x59\x3c\xb0\x97\xc5\x03\x7b\x59\x3c\xb0\x97\xc5\x03\x7b\x59\x3c\xb0\x97\xc5\x03\x7b\x59\x3c\xb0\x87\x49\x78\xcc\xef\x0c\x3d\x7f\x24\xd8\xb3\x97\xc5\x2c\x7b\xe9\x69\x60\x2f\x3d\x0d\xec\xa5\xa7\x81\xbd\xf4\x34\xb0\x97\x9e\x06\xf6\xd2\xd3\xc0\x5e\x7a\x1a\xd8\x4b\x4f\x03\x7b\xe9\x69\x60\x0f\x93\xf0\x98\xdf\x19\x7a\xfe\x48\xb0\x67\x2f\x3d\xb1\xec\xb5\xa3\x52\xb5\xa3\x5e\xb5\xa3\x6a\xb5\xa3\x76\xb5\xa3\x82\xb5\xa3\x8e\xb5\xa3\x9a\xb5\xa3\xa6\xb5\xa3\xb2\xb5\x8c\xbe\xb5\x8c\xca\xb5\xa3\xd6\xb9\xed\xa0\x78\x6d\xa7\x7b\xda\x8d\xc7\xb3\xa6\x9f\x61\x34\xd1\xb0\x4f\x6f\x56\xca\x0a\x1d\x51\x55\xa1\xb8\x5f\x4c\x8f\xd6\x65\x1f\xd5\xc9\x78\x08\x6b\x00\x20\xcc\x3d\xa1\x6e\x55\x47\xab\x9e\xaa\xe2\xb9\x2f\x90\x97\x9d\x83\xf5\xc3\x4b\x9f\xda\xf5\x9d\x1f\x9c\xef\x78\x36\xe8\xc6\xd3\xb0\x82\x91\x8b\x8c\x58\x03\x15\xd6\x50\x42\x1a\xca\x38\x43\x08\xe5\x4a\x85\x72\xb5\x5a\xae\xc8\xff\x89\x98\x85\x0f\x0c\x01\xee\x8b\x40\x67\xad\xa2\x13\x84\x22\x81\xbe\x84\xc1\xdc\x15\x09\x28\x43\x25\x4a\x49\x1a\x81\x2c\x8d\x00\x92\xc6\x46\xd9\x6d\x9b\xe5\x06\xff\xdf\x56\xea\x3c\xfe\x03\xdb\x85\xec\x97\xd1\xd0\x8f\x43\x80\xa7\x30\xac\x95\x80\x22\x8a\x91\x59\x4e\xc1\x8a\x42\xcc\x3d\x84\x7c\xa7\xe8\xcb\x9d\xaa\x2b\x77\x52\x4f\x92\xc9\xe9\xb2\xa2\x59\xbd\x8a\x7e\x90\x59\xf3\x72\x1a\x4d\x26\x63\x08\xfd\xda\x57\xc8\x41\xf8\xc0\xa0\xe7\xbe\x8c\xe8\x37\xaf\x32\xc4\xc9\x2a\x01\xc4\xa4\xd2\x86\x50\xa9\x0e\x21\xac\x0f\x3b\x08\xfd\x46\xa5\x0f\x1b\xa5\x3e\x6c\x60\x7d\xb8\x85\xd0\x6f\x25\x7d\xd8\xca\xfa\xb0\x15\xf4\xc1\xf7\xc0\x51\xa1\x52\x88\x9d\x52\x21\x76\xb0\x42\xf8\xe0\xa8\xbb\x55\x69\xc4\xad\x52\x23\x6e\x61\x8d\xf0\x83\xd7\x9a\x4b\x3a\x27\xfc\x98\x54\x75\x23\xcc\x92\x34\x04\xe3\x76\x33\x1c\xfb\x17\x0b\x99\x46\x2a\x40\x7f\xc5\x02\xfa\x2b\x01\xd0\x83\xa1\x3c\x16\xc8\x13\x60\x7c\x05\x25\x8e\x90\x00\x13\xc0\x30\x01\x0b\x13\x08\x30\x2b\x18\x86\x6b\x90\xd8\x9e\x35\x0c\xb3\x66\x61\xd6\x02\x4c\x08\xc3\x84\x2c\x4c\x28\xc0\x6c\x60\x98\x0d\x0b\xb3\x11\x60\xb6\x30\xcc\x96\x85\xd9\x0a\x30\x3b\x18\x66\xc7\xc2\xec\x04\x98\x5b\x18\xe6\x96\x85\xb9\x15\xfb\x54\xa1\x08\x3e\xa7\x09\xbe\xa4\x0a\x2a\x5d\xe0\x95\x41\xd4\x06\x5f\xa1\x0e\x3e\xa7\x0f\x3e\xa3\x10\x64\x3b\xb2\xd7\x3c\xce\x2d\x94\x6d\x20\xad\x1c\x00\x95\x81\x29\x8e\xd6\x5e\x01\xb5\xd9\xf9\x8b\x56\x5b\x03\xd5\x80\xe9\x88\xd6\x0e\x81\xda\xc0\xec\x42\x6b\x6f\x80\xda\xec\xd4\x41\xab\x6d\xa1\x6a\x4a\x29\xec\x80\xda\x1b\xa5\x14\x6e\x81\xda\x5b\x59\x0a\xbd\xb6\xf0\x1d\xa1\x14\x83\x0f\xf5\x9b\x6c\x53\xcd\x51\xa7\x94\x89\x31\x19\xfc\x08\xc8\x93\xd0\xf8\x12\x80\x37\x01\x87\xb1\xc9\xb3\x06\xe3\xd2\x14\x3b\xcc\xe3\xea\x54\x39\x15\x80\x93\x81\x2d\x81\x40\x4d\x20\x04\xf0\x87\x10\xfa\x50\x89\x7d\xa5\xc6\x2e\xac\xc0\x34\x8b\x33\xf5\xf2\x0c\x22\xb9\x56\x93\xec\x57\x91\xd0\xca\x12\x58\x5b\x42\xd8\x43\x0d\x76\x40\x5c\x01\x24\xae\x40\x29\xae\x8d\xa6\xb7\xf9\x95\x94\x66\xd1\xad\x5e\x76\xf7\x24\x99\xb0\x0b\x4c\x6c\xf0\x3a\x40\xd7\x44\x76\x4e\x74\xca\xd6\x47\x7e\x60\x4a\x3b\xa5\x12\xec\xd4\x3a\xb0\x03\x54\xa0\x0f\x68\x5d\x4d\x7a\xab\x57\xd5\xb1\x3e\xf2\x76\xf9\xb1\xd2\x07\xf6\x60\x4a\x82\xe3\xa2\xf1\x69\xd4\x5e\x8d\x40\x69\xf3\xaa\xd6\xa5\x8f\x40\x2a\x90\xaa\xf5\x29\xd4\x28\x54\xa8\xd1\xa8\x1d\x4c\x69\xa3\xd6\xa8\x8d\x46\xa3\x36\x1a\x8d\xba\x85\x29\x6d\x01\x8d\xda\x42\x1a\xb5\x85\x34\xaa\x9f\x4d\x0d\x8e\x90\xc6\x15\x52\x3b\x43\x22\x29\xc5\x18\xbf\x55\xeb\xd4\xad\x46\xa7\x6e\x35\x3a\xe5\x07\xaf\x3d\x27\xd2\xf3\x91\x19\xeb\x27\x29\x3d\x25\xde\x57\x92\x50\x8c\x0e\x93\xd2\x65\xe2\x9d\x26\x09\x83\xa7\x02\xf7\x78\x68\x0f\x02\xf6\x95\xb4\x05\xd2\x10\x70\xa0\x02\x0e\x78\xe0\x00\x02\x5e\xa9\x80\x85\x46\x83\x6d\x5e\xab\x80\xd7\x3c\xf0\x1a\x02\x0e\x55\xc0\x21\x0f\x1c\x42\xc0\x1b\x15\xf0\x86\x07\xde\x40\xc0\x5b\x15\xf0\x96\x07\xde\x42\xc0\x3b\x15\xf0\x8e\x07\xde\x41\xc0\xb7\x2a\xe0\x5b\x1e\xf8\x16\x54\x12\xa5\x8a\xf9\x82\x8e\xf9\xb0\x92\xa9\xb5\x4c\x54\x33\x50\xcf\x7c\xa5\xa2\xf9\x82\xa6\xf9\x9c\xaa\x75\x8b\x7e\x76\x88\x48\xfb\x78\x72\x5d\x1f\xac\x0b\x19\xfd\x11\x26\x00\x61\xc0\x15\xc1\x08\xb4\x02\x81\xf8\xa9\x7e\xac\xbd\x06\x6b\x83\xb3\xf6\x08\x14\x82\x40\xe0\x04\x3c\x02\x6d\x40\x20\x7e\x66\x1d\x6b\x6f\xe1\xda\x7a\x79\xed\x40\xa0\x8d\x5e\x5e\xb7\x20\xd0\x56\x21\x2f\x1f\xee\xf3\x9d\x5e\x60\x3e\xdc\xfb\xf2\xf4\x62\x79\x80\x20\x65\xce\x07\xfc\x3a\xfc\xc4\x2c\xbe\xb0\x9f\x98\xc5\x97\xf4\x13\xb3\xf8\xea\x7e\x62\x16\x5f\xd2\x4f\xcc\xe2\x4b\xfa\x89\x59\x7c\x4d\x3f\x91\xee\x7f\x5f\xc7\x4f\x24\x8a\x7c\x79\x3f\x91\xa8\xf3\xb5\xa4\xf7\xfa\x7e\x22\x51\xde\xab\xf8\x89\x44\x91\xaf\xe2\x27\x12\xa5\x7e\x6d\x3f\x31\x8b\xaf\xe5\x27\x66\xf1\xb5\xfc\xc4\x2c\xbe\x80\x9f\x48\x8e\xc4\x5c\xc7\x4f\x24\x27\x6e\xae\xe3\x27\x92\x03\x3d\x97\xf1\x13\xb3\xf8\x6c\x3f\x31\x8b\xcf\xf5\x13\xb3\xf8\x0c\x3f\x11\x32\xb5\xd6\x7e\x22\x64\x40\xad\xfd\x44\xc8\x26\x5a\xfb\x89\x90\xed\xb3\xf6\x13\x21\x73\x66\xed\x27\x42\x16\xca\xda\x4f\x84\x2c\x91\xb5\x9f\x08\x19\x17\x6b\x3f\x11\xb2\x17\xd6\x7e\x22\x68\x17\x26\xf8\x89\xe0\x60\x9f\xe0\x27\x82\x23\x78\x8a\x9f\xc8\x0e\x11\x93\x9f\xc8\x8e\x08\x5b\x3f\x91\x1d\x08\xd6\x7e\x22\x3b\x00\xcc\x7e\x22\xab\xf1\xd6\x7e\x22\xab\xe9\xd6\x7e\x22\xab\xe1\x66\x3f\x91\x55\x69\x6b\x3f\x91\x55\x65\x6b\x3f\x91\x55\x61\xb3\x9f\xc8\xe9\xac\xb5\x9f\xc8\x69\xea\x4c\x3f\x51\x38\xfc\x9d\x32\x87\xb9\x7f\x1d\x7e\x62\x7a\xba\xb0\x9f\x98\x9e\x2e\xe9\x27\xa6\xa7\xab\xfb\x89\xe9\xe9\x92\x7e\x62\x7a\xba\xa4\x9f\x98\x9e\xae\xe9\x27\xd2\x83\xc8\xd7\xf1\x13\x89\x22\x5f\xde\x4f\x24\xea\x7c\x2d\xe9\xbd\xbe\x9f\x48\x94\xf7\x2a\x7e\x22\x51\xe4\xab\xf8\x89\x44\xa9\x5f\xdb\x4f\x4c\x4f\xd7\xf2\x13\xd3\xd3\xb5\xfc\xc4\xf4\x74\x01\x3f\x91\xdc\x4d\xb8\x8e\x9f\x48\xae\x3e\x5c\xc7\x4f\x24\x37\x2b\x2e\xe3\x27\xa6\xa7\xb3\xfd\xc4\xf4\x74\xae\x9f\x98\x9e\xce\xf0\x13\x21\x53\x6b\xed\x27\x42\x06\xd4\xda\x4f\x84\x6c\xa2\xb5\x9f\x08\xd9\x3e\x6b\x3f\x11\x32\x67\xd6\x7e\x22\x64\xa1\xac\xfd\x44\xc8\x12\x59\xfb\x89\x90\x71\xb1\xf6\x13\x21\x7b\x61\xed\x27\x82\x76\x61\x82\x9f\x08\x0e\xf6\x09\x7e\x22\x38\x82\xa7\xf8\x89\xec\x10\x31\xf9\x89\xec\x88\xb0\xf5\x13\xd9\x81\x60\xed\x27\xb2\x03\xc0\xec\x27\xb2\x1a\x6f\xed\x27\xb2\x9a\x6e\xed\x27\xb2\x1a\x6e\xf6\x13\x59\x95\xb6\xf6\x13\x59\x55\xb6\xf6\x13\x59\x15\x36\xfb\x89\x9c\xce\x5a\xfb\x89\x9c\xa6\xce\xf4\x13\xc5\x9b\xba\x29\x73\xd5\xf6\xd7\xe1\x28\xb6\xe9\x85\x1d\xc5\x36\xbd\xa4\xa3\xd8\xa6\x57\x77\x14\xdb\xf4\x92\x8e\x62\x9b\x5e\xd2\x51\x6c\xd3\x6b\x3a\x8a\xdc\x95\xd0\x4b\x3b\x8a\x6d\x7a\x15\x47\xb1\x4d\xaf\xe5\x28\xb6\xe9\x05\x1c\xc5\x36\xbd\x96\xa3\xd8\xa6\xd7\x72\x14\xdb\xf4\x02\x8e\x62\x9b\x5e\xcb\x51\x6c\xd3\x6b\x39\x8a\x6d\x7a\x01\x47\xb1\x4d\xaf\xe6\x28\xb6\xe9\xd5\x1c\xc5\x36\xbd\x98\xa3\xd8\xa6\x67\x3b\x8a\x6d\x7a\xae\xa3\xd8\xa6\x67\x38\x8a\x90\xa9\xb5\x76\x14\x21\x03\x6a\xed\x28\x42\x36\xd1\xda\x51\x84\x6c\x9f\xb5\xa3\x08\x99\x33\x6b\x47\x11\xb2\x50\xd6\x8e\x22\x64\x89\xac\x1d\x45\xc8\xb8\x58\x3b\x8a\x90\xbd\xb0\x76\x14\x41\xbb\x30\xc1\x51\x04\x07\xfb\x04\x47\x11\x1c\xc1\x53\x1c\x45\x76\x88\x98\x1c\x45\x76\x44\xd8\x3a\x8a\xec\x40\xb0\x76\x14\xd9\x01\x60\x76\x14\x59\x8d\xb7\x76\x14\x59\x4d\xb7\x76\x14\x59\x0d\x37\x3b\x8a\xac\x4a\x5b\x3b\x8a\xac\x2a\x5b\x3b\x8a\xac\x0a\x9b\x1d\x45\x4e\x67\xad\x1d\x45\x4e\x53\x6d\x1c\xc5\x25\xf3\x32\xbc\xfc\x16\x31\xfc\xe4\x20\xfc\x92\x19\xc5\xd4\x3c\x2c\xc6\xdf\xe5\xe7\xde\xc6\x47\xe2\xc5\x27\x84\x9b\xa2\xd4\xbc\x76\x39\xbe\xd2\xc7\x13\x43\x51\xec\xf4\x4f\xc5\x4b\x8f\x12\xf7\x0f\xca\x4b\xf9\x48\x02\x13\x5e\x92\x0e\xe8\x7b\xfa\xf3\xef\x22\x5b\x06\x70\xb7\xce\x58\x31\x90\x3f\x65\x49\xac\xd8\xa7\x1a\xbb\x8a\x1d\x8d\xfe\xa5\x4c\xdd\x53\x85\x20\x14\x4b\x73\x2c\x9c\x8f\xad\x93\xed\x42\xf9\x89\xc3\x4c\x65\x3b\x2c\xf7\x99\x77\x72\x58\xe8\x14\xd5\x35\x80\xb4\x2b\x8e\xe1\x62\x05\x23\xdd\x47\x55\x4f\xb1\x77\xfc\x69\x37\x34\x55\x52\x62\xee\x49\xd5\xa6\xba\xcb\x9b\x07\xb7\x38\xba\xcd\x4b\x89\xde\x17\x71\xff\xb4\xa7\xfc\xb6\xa0\xf8\xd2\xaa\x17\xde\x08\xa8\xbb\xfc\x19\x03\x62\x20\xf3\x07\xfb\x3c\xa1\x99\xc0\x56\xa2\x40\x93\xcf\x2d\xc4\x02\xe7\x07\x4e\x32\x4c\x69\xac\x6a\xce\x37\xfb\x5d\x1c\x8d\x39\x97\x04\x48\x08\x1b\xdb\x31\x63\x3d\xb1\x57\x86\x2f\xca\xc1\xd3\x33\xb0\x8d\xf6\x32\x03\x9d\xd0\x78\x5c\xac\x24\x81\x86\xdc\x1e\x0f\xf1\x14\x3c\x3f\x70\x2d\xd1\x57\x7c\x98\x46\x75\xc8\x02\xb8\x90\x8b\x84\x3e\xe2\xca\xd5\xbd\x14\x6f\xe2\x5d\xbc\x57\x91\x51\x60\x64\xdb\xc7\xd6\x15\xfb\x8a\xf9\x66\xec\xad\xfd\x6a\xbf\xdd\xef\x75\x52\x1e\x53\x20\xea\xfb\xeb\xb0\x3b\xec\x0f\xc7\x29\x98\x34\x3d\x06\x54\x7d\x98\x46\x99\x26\x68\x5c\x88\x05\x62\x7f\x8d\xa5\xea\xde\x3a\xac\xd0\xe6\xb0\x87\x09\x80\xd8\xb8\x9e\x1a\xea\x49\xfd\xd4\x7f\x31\xf6\xd2\xee\x18\xfb\xb7\x48\x2b\x5b\x9a\x8f\x52\xdf\x47\x7b\x3f\x3e\x1a\x7a\x9b\xc3\xa3\xeb\x21\xb1\xe2\xc3\x34\xaa\x49\x7e\x2c\x16\xdc\x5f\x42\xcf\xf4\x45\x1a\x53\x87\x50\x88\x20\xbc\x32\x1e\xb6\x19\xb4\x86\xd8\x1b\x5d\xb1\xb9\x2b\x36\x87\x63\x1c\xe9\x44\x48\x72\x80\xea\xfb\x21\xda\xc7\x31\x0a\x2d\x91\x68\x3a\x81\xaf\xf5\x30\x8d\x1e\xcd\x4b\xba\x10\x0b\x84\x7e\x60\x4a\xd5\x5d\x71\x3c\x22\xb4\x8f\x60\x02\x20\x36\xb6\x49\x63\x3d\xb1\x4f\x86\x2f\xc6\x6e\x39\x1e\xe3\xe3\x56\x3b\x42\xfa\x34\xac\xfa\x9e\x39\x1e\xd1\x2e\xf2\xed\xf1\x68\x3a\x47\xaa\xf8\x30\x8d\x6a\x97\x20\x76\x21\xfc\x2d\xf4\xce\x58\xa8\xe9\x9c\xf0\x20\x9b\x2f\x0a\x08\xe0\x62\x1b\x34\xd4\x12\x7b\xa6\xff\x60\xec\x18\x14\xdf\x6e\xf4\xa6\x8b\x26\xc2\x35\xf4\x8b\xbf\xf7\xf6\x5b\x6b\x34\x9a\x6e\x11\xeb\x3d\x4c\xa3\x49\x52\x9b\x2e\xf8\x3f\x85\x3e\x19\xca\x34\x5d\x12\x1f\xe3\x23\x82\x50\x03\x98\xd8\xa6\xf4\x75\xc4\xfe\xa0\xe5\xe6\x71\xb2\x3f\x1e\x8e\x07\x9d\x1c\xbb\x0c\xc4\xfa\xde\x40\x07\x74\x38\x6e\x6c\xb1\x68\x3a\x43\xa8\xf6\x30\x8d\x62\x4c\x13\x19\x8c\x7f\x49\xa3\xa3\x2b\xd2\x4c\xed\x9b\xc3\xee\x10\x01\x78\x65\x3c\xfc\xb8\x20\x35\xe4\x51\x81\x8b\x8d\x9d\x70\x1b\xde\xde\xde\x1e\xf4\xca\x5c\x7d\x36\xcd\xe5\xb7\xfb\xfd\x1e\x59\x22\xd1\x8e\x07\xb6\xd6\xc3\x34\x7a\xd1\xa1\x49\x9e\xd0\x42\xf8\x5b\xe8\x85\xb1\x30\xb6\xf6\xc2\xb6\x0a\x37\x8c\x43\xa9\x97\xd0\x59\x38\x35\x02\x13\xeb\x3d\xcc\x67\xc0\x59\x12\x1d\xea\xd5\x89\xf7\x2a\x35\xef\xe1\x33\x99\xc0\x05\xd5\x5a\x87\xeb\x38\x0c\x61\x2a\xbd\xed\xe0\xc9\xac\x6f\x43\x2f\xdc\xaa\x28\xa1\x5b\x74\x40\x47\x88\x12\x18\x60\x88\x87\x94\x22\x53\x5a\x71\xc6\xd8\x03\xc7\x17\x24\x04\x02\xa6\x0d\xc5\x78\x6a\x80\xf3\xa2\x0b\x41\x18\x2e\x9c\xf1\x1f\x28\xc6\xc0\xd0\x32\x87\x1b\xd4\x22\x55\x90\x63\xf4\x6e\x38\x3b\xc2\x6c\x18\x6e\xc3\xe5\x2d\x73\x1d\xbd\x63\xa3\x42\x75\x59\xe4\x75\xf2\x84\x98\x37\xcc\x80\x74\x08\x72\x64\x91\x49\x3d\xd0\x72\xfb\xea\x43\xd6\xaf\x21\xdd\x26\x49\x4b\x40\x42\x66\x4d\xf1\x78\x78\x60\x42\x9e\x10\x13\x3f\x38\x60\xff\x89\x19\x75\xbe\xa8\x9b\xba\xdd\x6c\xf5\x4d\x1d\xaf\xe1\x7f\xc5\xa6\x66\xf1\x2b\x34\xf5\xf6\xd6\xd7\x37\x75\xbc\x49\xf2\x15\x9b\x9a\x9e\x5e\xa1\xa9\xbe\x7f\x7b\xab\x6f\xeb\x78\x18\xea\x2b\xb6\xb5\x4d\xa7\xb6\x55\xc2\x61\x9d\x69\x10\xe4\xdf\x86\x7b\x05\x5d\x05\xe3\xb2\xe9\x3c\x16\x55\xe6\x1e\x8a\xbc\xa9\x8a\xd4\x9a\xdb\x3e\x79\xc9\x21\x4a\x0f\xef\xfd\x65\x88\x32\xe7\xfb\x7e\x3b\xc1\xf9\xde\x09\xca\xf6\xe6\xa3\x18\x60\xef\x3e\xb2\x7b\x0e\xaf\x93\xe3\x5e\x3f\x1d\x42\xa6\x37\x4d\xca\x3b\x26\x63\x6e\xab\x4a\x45\x74\x40\xf1\x9a\x44\x0e\xb4\xa9\x88\x48\xde\x28\xfa\xa6\x3d\x3b\xad\x39\xde\xd2\x0f\x6b\x07\x45\x35\x76\xfb\xdd\xe2\xb1\x59\x74\x19\x33\x1f\xa2\xb8\x78\x96\xbf\x8a\x06\xbf\x3b\xfc\x57\xbb\x15\x8a\x1f\x0f\x28\x76\xb3\xa2\x7f\x37\x1f\xff\xdd\x8f\x1c\xb9\xfb\x78\x8e\x86\x34\xd9\x5f\xa0\x0e\xbf\xbb\x73\xb3\xda\x45\x6d\x19\xe5\xca\x95\x1e\x9f\x4d\xdb\xa4\x42\x5d\xa6\xdd\x29\x0b\x16\x3e\x17\xd4\x18\xb6\xf1\xf6\x31\xfd\xc2\x25\xea\x75\x18\x21\x76\x27\x2c\xbc\x3e\x6f\x51\xbf\x7c\xf3\x83\xd5\x30\x95\x06\xcc\xcc\x2d\xb4\x7c\xc8\x80\x59\x3e\x36\x6e\x99\x46\x07\xf4\x40\x72\xaa\xf3\xcc\x33\x59\x93\x8b\x32\x3a\x24\xcd\x0b\x97\xf3\x49\x10\x66\xf1\xcb\xab\x60\xc2\xbd\xf2\xaa\x7c\xbd\x2a\xba\xd7\x40\xd2\xe7\xd3\x5d\xf0\x2a\xfc\x97\x0a\x45\x71\x91\xa7\x2f\x3f\xab\x1d\xcb\x71\x81\x2b\x13\xe1\x12\xd6\xc6\x51\x83\xee\xdf\xfc\xcc\x11\x10\x93\xda\x36\x49\x66\xac\x83\xf1\xe0\x7a\x6e\x5a\x1c\xa2\xd4\x54\x3b\x2b\xf2\xe6\x41\xac\x64\x4c\x48\xea\x38\x44\x79\xc0\x2f\xaa\xfc\xa5\x5d\x56\x66\x51\x73\xfa\x44\xc0\x55\x92\x9f\xb8\xee\x11\x07\x32\xc9\x7a\xc7\x0f\xa4\x71\xa8\x2a\x09\x74\x49\xb5\x89\x4a\x3d\x45\xe9\x23\x9a\x3e\xd4\x65\x6d\x20\xf9\x57\x17\x62\x61\x15\xe5\x27\xdb\x09\x74\x7c\x32\x9d\xa0\x60\xd2\x8c\x73\x29\xd3\xc9\x7c\x35\xcc\x45\xdf\x63\x63\x7f\x03\xe6\x4f\x57\x56\x14\xb3\xc2\x59\x67\xf7\xee\xa6\x2d\x88\xcf\x61\x61\x07\xb1\x6a\xc9\xa8\x58\x4d\x91\x60\xd4\x96\xa3\xde\x81\x80\x38\x0a\x2c\x59\x0a\x34\x3c\x91\xb4\x86\x46\xa6\x38\x6d\x28\xd3\x28\x21\x49\xa4\xad\x17\x29\xc0\xe2\xc3\xaa\x0b\x7d\x0d\x63\x96\x5b\xc8\xaa\x39\xb3\x5b\x58\xc0\x5f\x87\xc5\x71\xd9\x2a\xe6\xd6\x51\x06\x7c\x31\xc9\xe8\x65\x53\x51\x54\x34\xab\x2c\x55\x02\x29\x3e\xe1\xb3\xb0\x00\xd4\xac\xff\x02\xba\xfc\x83\x56\x7f\x26\x75\x30\x24\x11\x84\x1b\x09\xb2\xe8\xab\x19\x24\xfc\xe9\x13\x79\xda\x32\xc7\x1e\x26\x01\x6c\xe8\x5f\x30\xde\x9f\x17\x0e\xf4\x29\x7b\x4c\x9b\xa4\x4c\xd1\xcf\xea\xc4\xda\x7d\x26\x75\x60\x82\x81\x53\x60\xe2\x6a\x58\x3f\x4b\x5d\xee\x52\xa6\xae\x76\x94\xb1\x99\x73\x3d\x21\xc5\x29\x81\xbe\x72\x26\x38\x38\x11\x1c\x9b\x18\x6a\xe0\x6a\x4c\xe5\xc6\x14\xd9\x25\x72\x83\xf3\x4f\x49\x54\x48\x8a\x7c\x6d\xa2\x2b\x40\xa2\x42\x4e\x2b\x48\xa6\x04\x6f\xb7\x84\x13\xb1\x47\xfb\xba\x48\x1f\x1b\x04\x74\xce\x4a\x48\x6c\xdc\x27\xc9\x33\x50\xf8\x4b\xbf\x36\xfb\xd9\xf9\x3f\x0e\xfb\x95\xcc\x0d\x0b\x00\x62\x58\xcd\x41\x00\x8a\x25\xa2\x44\x9b\xa9\x0c\x58\x68\x80\xd5\x31\x0f\x31\xa7\x69\x34\xb9\x2b\xa8\x70\xcc\x37\x5e\xef\xe8\x19\xb5\x03\xa2\x59\xd6\x1d\x87\x94\x90\xa4\xc3\x35\x57\x0e\xe5\x3c\x16\xf3\x0f\x6f\xd5\xf2\x25\x4c\x1b\x3b\xb5\x6e\xa2\x26\x39\xc8\x5d\x0a\x52\x5b\xf9\x6c\x5e\x5c\x30\x9f\xe1\x53\x94\x26\xb1\x7b\x44\x28\xc6\x73\x15\x9c\x35\x5e\x79\xe2\x50\x18\xea\xc6\xfc\xc4\xc1\x2e\xda\xae\x43\x81\x76\x53\x14\xd8\xb0\x69\xb5\xb7\x3b\x64\xd8\x53\x67\x05\xfc\x8b\x9b\xe4\x31\x6a\xfb\x13\xd4\x32\xeb\xd0\xd1\x7a\xdd\xe4\xc3\x36\x6d\xe9\xcf\x9a\x92\x2c\x83\xbb\x6b\xec\x90\x6e\xb6\x0b\x67\x73\x8b\xfd\xd1\xdb\x1b\x7d\x3c\x01\x34\x59\xf8\x07\x27\x46\xa3\x0d\x13\x01\x3a\xb9\xcb\x56\xeb\x39\x22\xcb\xf8\x04\xbb\x38\xb1\x73\x47\x7e\xc5\x83\x98\x57\x98\x85\xb1\x26\xc3\x57\x42\xeb\xc1\x68\xe4\xaf\x1c\x87\x92\x79\x84\xd8\xe4\x1d\x12\x52\x2e\x2c\x80\x46\x32\xd0\x6e\xc3\xa0\xa0\x92\x99\x87\xe2\x59\x37\xce\x3f\x25\x59\x59\x54\x4d\xd4\x2f\xd7\xc6\x8e\x4e\xb2\xe8\x84\xee\x9c\xc7\x2a\x7d\x4f\xdc\xc4\xe8\x8e\x94\x7c\xa8\x9f\x4e\xdf\xb7\x59\xba\x78\xbb\x3a\xd4\x4f\x27\xa7\xcd\xd2\xbc\xfe\xf4\xee\xa1\x69\xca\xbb\x0f\x1f\x9e\x9f\x9f\x97\xcf\xab\x65\x51\x9d\x3e\x04\x9e\xe7\xe1\xca\xef\xba\xb1\xf7\xe9\xdd\xee\x1d\x9d\xc3\xc9\xaf\x4f\x09\x7a\xfe\x5d\xd1\x7e\x7a\x47\x2e\xc6\x38\xbb\x77\x6f\x57\xe8\xed\xea\x50\x46\xcd\x83\x73\x4c\xd2\xf4\xd3\xbb\xb7\xc1\xaa\x6b\xcd\x3b\x27\xfe\xf4\xee\x8f\xc1\x72\xe5\x6c\x96\xdb\xd5\x8f\xcb\x8d\xb3\x5e\x86\xab\x83\xbb\x5c\xbb\xfe\xd2\x5b\x2f\xd7\x1b\xd7\x5f\xae\x1d\x7f\xe9\xbb\xcb\x5d\xea\x2f\x7d\x07\xff\xb9\x5a\xae\xdd\xd5\x72\x77\x58\x6e\xdc\xe5\x66\xe5\xf8\xf8\x67\xb0\xc5\x73\xd0\x72\x9b\xba\x6b\x67\xbd\xdc\x60\x14\xab\x65\xe8\x2e\x77\x04\x95\xbf\xf4\x7f\x79\xf7\xa1\xe3\x03\x73\xfe\x76\x85\xee\xdf\xdc\x88\x72\xa9\x50\x89\xa2\x06\x8f\x4f\xfa\xab\x58\x81\x99\x1d\xc9\x1e\xd7\xe8\x6f\x51\xd1\xfb\x3b\x2a\x7c\xc6\xf4\x32\xf0\xdd\x20\xa5\x50\x03\xd0\xaa\x87\x81\xcb\xed\xd5\xa9\xf3\x72\x55\x4a\xc5\xc6\xb8\xd4\xaa\xa5\x0f\x53\x09\x66\x81\x0d\x53\xf1\xdc\x41\x3e\x38\x55\x79\xe0\x93\xa0\xf8\x82\x7a\xe3\x05\x81\x46\x9b\xc5\x4e\xf1\xbb\x35\xf1\xd0\x03\x10\x7b\xe0\x62\xb4\x67\x10\xfc\xa8\x67\x11\x1c\x81\x6a\x46\x9b\xa2\xd4\xe8\x8e\x41\xb7\x54\xfa\x70\x78\xac\x9b\x22\x73\x3b\xf1\x0e\xf6\x85\x2b\x3d\xcb\xc0\x0c\x9a\x19\xf4\x73\xb7\xc6\xc6\xbc\xa6\x75\x59\x8f\xd6\x25\x14\xac\xcb\xda\x09\x41\xeb\xd2\x6d\xf9\x52\xeb\xe2\x78\x3f\x7a\x4e\xf0\xb0\xfe\x25\xf3\x9c\xf0\x47\xcf\x59\x3d\xac\x01\x63\x40\xc5\xde\x6f\x07\x74\xea\xf3\x61\x57\xb6\x8e\xef\x95\xed\x68\x13\x16\x64\xee\xfc\x6f\xe3\x49\x25\x34\x0c\x3a\x22\xb6\x0f\x13\x6d\x1b\x67\x6a\x6d\xb5\x7a\x30\x73\xb0\x6e\x5f\xd5\xce\xc9\x4e\xc5\xb0\x4e\x90\x5c\x10\xb9\x32\xb7\xae\xd0\x7b\x20\xc2\xf2\xd4\x9a\x0b\xd3\x92\xc8\x08\xda\xaf\x91\x0c\xdc\xcb\x74\x2c\xaa\xcf\x58\x44\xd1\x3e\xef\xc3\x26\x02\xcb\xc2\xd7\x5e\xee\x10\x10\xc7\x0e\x04\x37\x45\xfe\xd3\xb9\xba\xbb\xdb\xa3\x63\x51\xa1\xb9\xdc\xf5\xf0\x7a\x3d\x9f\xc8\xec\x1d\xe9\x2e\x74\x36\xd3\xb6\x78\x40\xe6\x57\xeb\x03\x52\x07\xe3\x87\xaf\x53\x9b\xd6\x59\x85\x73\x1b\x66\x85\xa5\x6f\xd6\xeb\x58\x18\x53\x9b\xee\xf2\xa2\x79\xdf\x4b\xfc\xe6\x75\x5a\x38\x0d\xe7\x7c\x1d\x3c\x26\xe4\x74\x39\x34\x5a\xc8\x27\x61\x00\x8f\xd5\xa1\xf1\x31\x42\xbc\x1e\x43\x52\x87\x5b\xb2\xa5\x81\xbb\xd8\xcc\x94\xe4\x57\x0d\x98\xc4\x87\x55\xc8\xc8\xb3\xa7\xfe\x5f\x36\x64\x12\x04\xde\xc2\x09\x57\x67\x87\x4c\x04\x41\xda\x04\x4d\x40\xd9\x1b\xc3\x26\x14\x0a\x2b\xa9\xa8\x3a\x0b\xab\xda\x7c\xf8\xc4\x80\x0e\xae\x71\x6e\x18\x85\xe2\x01\x7c\xde\x9e\x18\x34\xda\x06\xd5\xfd\xf5\x85\x52\xfc\x60\x74\x07\xf0\xef\xdd\x9a\x1f\xab\xff\x3b\xa7\x6e\xaa\xe2\x33\x22\x1e\x40\xd7\x02\xc1\x5d\xf0\x03\xc7\x0f\xa8\xc3\x70\x48\xaa\x43\x8a\x9c\x43\xfb\xe9\xdd\xe6\x9d\x73\x78\x21\x3f\xaa\x4f\xef\xd6\xcb\xb0\x5f\xcb\x13\x9f\xa2\xc3\xe9\x62\xc5\xff\x5b\x91\xe4\x9f\xde\x91\x76\x75\xae\x45\xb8\xdc\x39\xab\xe5\xe6\x61\xb9\xfe\x71\xe3\x6c\x96\xe1\xe0\x05\xc8\xc8\x77\xcb\x80\xa0\x5f\x6e\xde\x8d\x6e\x4a\xcf\x64\xcf\x37\x69\xc5\x3f\x72\x14\x86\xea\x9c\x32\x0e\xc3\x7d\x37\x69\xa6\x7e\x1e\x10\xac\xcd\xb4\x48\xcc\x30\x6a\x14\xb1\x18\x6e\xec\x7c\xad\x68\xcc\xc0\xa4\x32\x1e\xa3\x63\xf3\xd7\x17\x91\x19\x4d\x95\xe4\xb7\x9e\x61\xab\xfe\x3b\x2a\x73\x99\xa8\xcc\x7f\x3d\x3b\xfc\x55\x02\x3a\xa2\xc5\x54\x0d\x8d\xab\x9a\x4c\x39\x26\xc2\xac\x5c\x2c\xc3\x3a\x1a\x08\x3e\xb0\x20\x2c\xa3\x27\x70\x62\x5e\xb4\x59\x81\xeb\x03\x3c\x06\x7a\x96\x20\xaf\x15\xe8\x61\x50\x4f\x0c\xf5\x18\x20\xa7\xf4\xc9\x1c\xce\x2c\xdc\x6f\x4b\x0c\xfa\x31\x30\x99\xe1\x57\x08\xf9\x4c\xc4\x04\x5f\xdf\x5d\x6f\xbc\x4d\xac\xbc\x1d\xd6\x7f\x9d\xde\xbc\x73\xc3\x3e\x93\xf0\xd8\x04\x7e\xec\xad\x90\xb9\x5d\xaf\x16\xfa\x39\x03\xeb\x7c\x7d\x64\x62\x2d\xb2\xee\x9b\xe3\x2c\x3a\x98\xd7\x64\x6a\x46\x08\xc8\x0c\x79\xb1\x99\x8c\x18\x64\xe5\x29\x23\xcb\xf3\x6c\xc7\x14\xd3\xad\x8a\x67\xe1\x4c\x1b\x50\x3e\xf9\x2c\x92\xcc\xa6\x74\x08\x0d\x38\x24\x0d\xbc\x45\x1d\x6e\x37\xe3\x55\x2c\x16\x1f\x23\x60\x4d\xf3\x21\x01\x68\x9b\xa3\x3e\x5c\xc5\x3e\x63\x1d\x1d\x3e\x0b\xdf\xfe\xf6\x58\x37\xc9\xf1\x85\x8c\x1e\x94\x37\xc2\x57\xf0\x58\xef\x17\xa9\x4d\xd2\x71\xc8\xd9\x2d\xb3\x7b\xad\x58\xa7\x0a\x6a\x65\x98\x2d\xbf\x49\x52\x10\xee\x0d\x89\xc7\xe4\x80\x1b\x77\x4c\xc3\xc4\xf7\xdd\xb2\x24\x8e\x53\x64\x43\x4f\x3c\xcb\xad\xa3\x0c\xa0\xea\x6e\xb2\x90\x1e\x5c\xc8\x5f\xb9\x75\x6f\x8f\x5f\xe4\x5e\xc9\xe0\x38\x74\x7e\xfd\x0a\x2f\x77\x09\x74\x36\x51\xdb\x54\xf6\xf4\xa1\xf2\xc8\x2a\xc3\x63\x8e\x4e\x51\xf7\xb6\x3c\xf7\x14\x7d\xfd\x50\x25\xf9\xe7\xb1\x50\x3e\xb3\x28\x9f\x5a\x1c\xa3\xe3\x9a\x47\x34\xa1\x9e\x15\x94\xf6\xca\x62\x37\xf2\xe5\x72\x46\x53\x35\x1c\x3b\xdb\xbd\x6f\x72\x61\x6a\x91\xf4\x1f\xbc\x0f\x09\xdc\x41\x20\x97\x79\x64\x11\x68\x06\x69\x7f\x19\xe9\xb1\x46\x55\xef\x44\x0a\xb7\x91\x54\x9f\x6a\xc5\x17\xb8\xd4\xfe\x7a\xc4\x78\xf7\x52\xac\x31\xfd\x22\xa9\xe5\x35\x02\xf0\x1a\xa7\xfa\xfe\xa6\xd0\x14\xf8\x8e\xe7\xb5\xef\x80\x0e\x6a\x64\xba\xfa\xb9\x6f\x72\xc3\x6b\x88\x44\x8d\x62\x74\x28\xaa\x88\x43\x32\xc2\xf7\xf1\x85\x7d\x83\xd7\x1e\x43\x28\xe1\xb5\xee\x68\x62\xb4\xcc\xdd\x40\x4c\x71\x38\x5c\xfe\x77\xee\xce\x9f\xb7\xdc\x84\x1c\x67\x64\xb1\xdd\x57\xbe\x21\x7f\x0e\xa8\xa8\xa8\x0e\x8f\x55\x8d\x9b\x5c\x16\x09\xbb\x88\x8a\x78\xb2\xf7\xf9\x31\x41\x69\x5c\x23\xe6\x60\x7b\x34\x4a\x99\x02\xbb\xe8\x09\xe5\x4d\x2d\x8b\x68\x78\x7a\xd1\xf6\x59\x0d\xcf\xdb\xee\xe1\x4b\xb0\xc3\x17\x09\xf9\xb4\x67\x26\xbe\xf1\xbc\xcd\x6d\x7c\x0b\x93\xd8\x04\x87\x03\x48\x82\xe9\xea\xbe\x6c\x09\x5c\xef\x3d\x8f\xac\x49\x57\x56\xbb\x85\xe3\xaf\x47\x65\xe1\x75\x65\xe0\x8b\xd7\x99\xa1\x09\xbc\xee\x5c\xaa\x2f\xb4\x9a\x77\x47\x9f\xdc\x71\xec\x41\x96\xe3\x2b\x3d\xf5\x43\xb7\xa5\xc9\xb5\xb5\x2a\xca\xb8\x78\xc6\x13\xec\xe9\x94\xa2\x29\xbd\x31\xca\x5c\x68\x5b\x78\xd8\xcf\x6f\x1b\xa4\x29\x56\x2d\xa4\x80\x76\xed\xe4\x23\x97\x67\xe8\xcc\xf8\xdc\xa6\xad\xe4\x98\x8b\xcd\x82\xe4\x84\xfb\x2c\x1c\xfa\x89\x63\x34\x8c\x36\xc1\x66\x07\x11\x09\xd7\xe1\x7e\x13\x28\x88\xb0\xb2\x1f\x4a\x27\x8e\x53\x0b\xd2\x26\x99\xfb\x2b\x6c\xd5\x3b\xc9\x6b\x85\x2e\x0e\xd5\xb1\x25\x93\x07\xeb\xcc\x6e\x99\x30\x5c\x2d\x81\x14\x03\x96\x69\xf3\xcc\x21\xcb\x89\x9f\x7f\x32\x09\x85\x61\xb8\x3f\xa3\x85\xb0\xe2\x9c\x31\x6c\x95\xad\xb5\x1f\xb8\x46\x25\xa2\x0f\xb0\xda\x8a\x8f\x3b\x0c\xa4\x3b\xc3\xc4\x20\x9f\x38\x6a\x03\x7f\xb7\x5b\x81\x43\xc7\x47\x5b\xb4\x5a\x83\x24\x38\xd1\x77\x65\x13\x47\xac\x05\x59\x93\xb0\xb7\xc1\xc2\xf1\x77\xde\xc2\xb9\xdd\xaa\x45\x2d\x8d\x56\xda\x82\xc9\x63\x75\x56\x57\x4c\x19\xa9\x36\x20\xaa\x71\xda\xb7\x75\xe6\x28\xe5\x44\xce\x77\xc6\x61\xbb\x5e\x79\xb3\xdb\x06\x29\xca\x39\x23\x14\x6e\xa7\xfd\xf8\xd4\xab\x0c\x79\x90\xd7\x5a\x66\xdb\x28\xd8\xc3\x0a\xdc\x7f\xe1\x31\x4f\x1c\x97\xfe\x6a\xb7\xbe\xdd\x80\xf8\xfd\x6d\xb4\xdb\xcb\xf8\x59\x59\xe3\x82\x89\x23\xd2\x82\xa0\x49\xbc\x21\x36\x7c\xdb\xcd\xc2\xf1\x6f\x43\x85\x7c\xc5\xf1\x48\x38\x9f\x3c\x18\xa7\x0b\x7f\xc2\x48\x34\xd7\x57\x0c\xc3\xae\x7d\x73\xc7\x20\x2b\x64\xbe\x49\xde\xd6\xdb\x1e\xe7\x35\x49\x52\x8a\x33\x46\x1f\xd4\x3c\xfb\xa1\x67\xd0\x8d\xfe\xe1\x65\xfb\x34\x07\xdf\x1c\x8f\x07\xdf\xdb\x7e\x04\xdf\x66\xa6\x5f\x24\xfc\x93\x93\x29\x7c\x83\xbc\x68\xe7\x81\x2f\x5f\xc6\xab\x5b\xe4\x79\x20\x15\x56\xea\xb4\x0c\x1a\x8d\x67\x53\x36\x6f\x0f\x61\x83\xb7\x25\xf1\x0a\xb5\xd0\xc5\x31\xd9\xb7\x02\x1e\x96\x17\xe8\x94\x09\x83\xd3\x0a\x44\x31\x3e\x87\xe6\xea\x86\xa8\xbe\x79\x9c\xe4\xb9\xe6\x1d\x36\xb7\xa1\x42\x1b\x26\x0f\xd4\x29\x8d\x84\xc7\xaa\xa2\xa9\xf6\xc3\xd5\xa0\x39\xf4\x35\x6e\x5b\xe3\xc6\xed\x67\xea\xb6\x62\x47\xdc\x13\xa7\xcb\xc3\x2e\x58\xad\x56\x10\x85\x7d\x1c\xf8\xc2\x12\x86\x52\x60\x45\xde\x15\x4d\x9c\x32\x2d\x88\x9a\xe5\x1c\x2e\x9c\xdd\x4a\xb1\x22\xa1\x5c\x09\xe3\x93\xb2\x3f\x79\xd6\x9c\xd3\x0b\x13\x86\xa6\x0d\x84\x62\x64\xf6\xed\x9c\x39\x77\x72\xd2\xe6\xfb\x21\xf0\x8f\x41\x3c\xb7\x61\x80\x86\x9c\x31\x26\xe1\x46\x4e\x19\x92\x3a\x55\xe9\xde\x5a\x9e\x62\xa9\x77\xc7\xdb\x63\x04\x5a\xea\xfe\x8b\x80\x7d\xc6\xe4\x19\xa0\x0d\x02\x69\xc4\x11\xf2\x50\x08\xd0\x60\x45\x4e\x4a\x66\x4c\x9c\x66\xaa\x46\x59\xfb\x9b\x85\x13\xf8\x5b\xfc\xcf\xad\x4a\xda\xe2\xb8\xec\x1a\x30\x6b\xd6\x9c\xde\x17\x13\x06\xa6\x05\x80\x62\x5c\xd2\x66\x9e\x31\x5f\xb2\x02\x17\xd6\x30\xf1\x6d\x7c\x9c\xd9\x30\x59\x4b\xce\x18\x97\x60\x23\x27\x0c\x4b\x83\xaa\xcc\x7b\xa1\x1c\xb8\x0c\xc9\xbd\x5d\xde\x63\x9e\x1a\xed\x59\x05\xdb\x00\xf6\x32\xe2\xc0\x0f\xd6\x32\x7e\xde\x04\x56\x9f\xa7\xc6\x79\xcc\x04\x4d\x02\xde\x05\x0b\x67\xb7\x5b\x38\xb7\x2b\x85\x74\xe5\xf9\xb1\xfa\x3c\x7d\x76\x9c\x2e\xfa\x49\x73\xa3\xa9\xbe\x72\x66\xc4\xed\x9b\xeb\x53\xb2\x22\x16\xdc\x64\x3f\xf2\xe3\x79\x4d\x92\x54\xe2\xac\x39\x51\x6e\x9e\xfd\xd0\xd3\x6a\x06\xdd\xd1\x85\x77\x33\x27\x6d\x93\x09\x98\x26\x6f\x5d\x9e\x41\x8a\x15\xb5\xf0\x6d\x69\x2d\x26\x61\xbb\x5a\x2f\x27\x71\x30\x89\x1c\xc1\xe3\x8a\x6d\xa4\xe1\xb8\x84\xba\xb1\x13\xc6\xd3\x24\x50\xc5\xd0\x92\x1a\x3e\x7b\x5b\xf2\x8c\x0e\x9e\x3c\xe0\xe6\xb4\x1c\x1e\x7b\x86\xf6\xdf\xbd\xb2\x7e\x29\x76\x2d\x27\xed\x81\x49\xb8\x26\x8e\xc5\x33\x89\x41\xfd\x00\x6e\x59\x1a\x76\x89\xbc\xdd\xc2\xf1\xf1\x8a\xc1\x0f\xac\x24\xa6\x1a\x93\xa6\xad\x47\xb6\xb9\x93\x47\xe5\xac\xfd\xc6\x89\xc0\x86\x91\x79\xfe\xfe\xe3\x99\x1d\x3e\x7b\x74\xbe\xc6\x7e\xa4\x51\x0a\x77\xaf\xaf\x71\xd0\xfe\xe4\xa4\x9d\x2f\x01\xd3\xd4\xe5\xe9\x39\xa4\xc0\x7e\x90\x37\x27\x27\xbd\xaa\xa0\x97\x93\x72\x5c\x6a\x37\x19\xd9\x46\x4e\x1f\x95\xd3\x77\x16\x27\x81\x9a\x46\xe4\x99\x3b\x8d\x67\x75\xf0\xfc\xd1\x78\xf6\xce\xa3\xa1\xfd\x77\xaf\xac\x5f\xf2\x4e\xe4\xa4\x1d\x2f\x16\xcd\xd4\x6d\xc7\xd9\x74\x20\xc1\x8b\xdb\x90\x06\x4f\x7a\x85\x65\x43\xb6\x68\xd7\x06\xe1\xa8\x46\x9e\x66\x3b\x91\x6d\xd9\xe4\x61\x37\x75\x0f\xd1\x1e\xce\x30\xe0\xce\xdb\x53\x9c\xdd\x99\xb3\x87\xda\x99\x7b\x8c\xba\x66\xdf\xbd\xb6\x22\x81\x7b\x8e\x93\x36\xb0\x04\x4c\xd3\x03\xa4\x67\x51\x83\xe4\x0f\xec\x36\x1a\x64\x85\x17\xed\x3e\xf6\xa0\xb7\x66\x51\xa9\x86\x9d\x7e\xc7\x90\x6d\xe4\xe4\x91\x37\x63\x8f\x70\x12\xa8\x61\xfc\xbd\xc2\x9e\xe1\x59\x7d\x3c\x7b\x20\x9e\xbf\x87\x68\x10\xc1\xdd\x2b\xab\x18\xb4\xa5\x38\x69\xc7\x8a\x47\x34\x71\xde\x3b\x87\x12\x24\x7e\x79\x3f\x71\xd2\x45\x4e\xad\x8c\x54\xa3\x50\xbb\x2f\xc8\x36\x70\xf2\x20\x9c\xbe\x19\x38\x05\xd2\x30\x04\xcf\xdc\x1c\x3c\xa7\x67\x67\x8f\xbe\xb3\x37\x0b\xf5\x8d\xbf\x7b\x65\xbd\x02\x36\x0f\x27\x6d\x49\x71\x78\x66\xcc\x82\xf3\x69\x41\xc2\x97\xb6\x0d\x0d\x22\x5a\xef\x16\x4e\xb0\xbe\x5d\x38\x41\xe8\x99\x84\xa4\x1a\x7b\xba\xbd\x3f\xb6\x79\x93\x87\xde\xe4\xdd\xbe\x09\x80\x86\x81\x77\xf6\xee\xdf\x19\xfd\x3a\x7b\xe4\x9d\xbb\x1b\xa8\x6d\xfc\xdd\xab\x2b\x95\xbc\x3b\x38\x69\x1f\x8a\x45\x33\x71\xc6\x9b\x4f\x07\x36\x78\xfc\xd6\xa0\xe1\x30\x60\xb0\x70\xc2\xdd\xc2\xd9\xac\x0d\xa2\x51\x4f\x75\xca\x2d\x3e\xb6\x5d\x33\x26\xba\x69\xfb\x7a\xf6\x70\xc6\x49\xee\x8c\x7d\xbe\xf9\x5d\x79\xc6\x04\x77\xd6\xbe\x9f\xae\xd9\x77\xaf\xa3\x46\x69\x92\xd3\x91\xa5\xbd\x83\xcc\xec\xde\x18\x2f\x8f\x12\x9c\xd0\x30\xf3\xbc\x70\xb3\x5f\xc1\x48\x1e\xf3\x18\x55\xb8\xb1\x32\x26\xfe\x14\x43\xce\x0d\xa0\x29\x78\xa4\x73\x28\xf9\x38\x70\x94\x3b\x02\xc6\x6b\xa0\xe9\x89\xe2\x23\x4f\x15\xd0\xcc\xc9\xe3\x2d\xd2\x8b\x67\x1e\xeb\x8e\xfc\x67\x1c\x13\x5d\x52\x6e\x88\x89\x4b\xe6\x67\xc3\xf4\xc9\x95\xf6\x49\xd9\x1c\x47\xa8\xef\x1d\x11\x05\xff\xd2\x2e\xfb\x10\x2c\x97\x8b\xb3\x7e\xdc\x67\x49\x73\xff\xe6\xe7\x11\x5e\x4c\xd7\x59\xa1\x1a\xe9\x6b\xec\x1f\x9b\xa6\xc8\xb9\x2a\xca\xd7\x55\x96\xc7\x28\xa6\x76\x87\xbd\x8a\x4d\x2f\x2d\xd3\x0b\xdf\x58\x82\x51\x35\x33\xdf\xef\x80\xdf\x98\xe7\x37\x8a\x51\x67\x52\xb0\xe1\xb8\x11\x6f\x4f\xb3\xa9\x1f\xd3\xa8\xac\xe5\xba\xe2\x93\xc1\x5c\xf5\x21\xee\xa3\x78\x34\xa2\x57\x10\x8f\xcb\x6e\x7d\xe7\x3c\x24\x71\x8c\x72\xe9\xc6\x7d\x57\x1d\x2b\x30\xbd\x10\x3f\x4f\x3a\x22\x73\x26\x19\x8d\xf5\x97\xa4\x33\xb9\x7e\xf5\x3e\x02\x29\xf5\x78\x8c\x1d\xd0\xeb\x71\xcd\x72\x61\xe2\x1d\x5b\x7d\xf2\x02\x0a\xf9\x8d\xbc\xab\xd1\xff\x81\x27\x83\xfe\xf7\x14\x1d\x1b\x4d\x4f\x8d\xb8\xa4\x89\xf3\xf9\x21\x69\x90\x5b\x97\x51\x97\x77\x96\xbe\x4d\x03\x02\xdc\xdd\x45\xc7\xa6\x37\xea\xea\xc7\x2c\xf8\x77\x3e\x96\x41\xd8\xbf\x84\x2d\x3e\x53\xc1\x7e\x1b\x5e\xe1\xb8\x7f\x73\xff\x86\x35\x36\x7d\x96\x3b\x94\x75\x8f\x46\x70\x86\x68\x48\x8e\xd6\x7f\x55\x65\xdd\xe4\x9f\xe6\xa0\x85\x3d\x87\x2a\x68\x58\x08\x28\x2b\x9b\x17\x4e\x14\x8a\x74\x6c\x03\x60\x86\xf2\xc7\x73\xdf\xf7\xf6\x3d\x3a\x23\xcb\x4f\x7c\x1f\xd3\x22\x6a\xee\x08\x58\x27\xff\xf1\xcd\x27\xdf\xeb\xed\xb9\x38\x11\xb1\x49\xe6\x70\xa1\x4f\x67\x06\x4d\xa2\x54\xc3\x7b\x24\x03\xfd\x34\xa9\x1b\xb7\x6e\x5e\x52\xa4\x7d\x1e\xe4\x9c\xa4\xed\xfd\x81\x0a\xfa\xbf\xa5\x1f\x5a\xbd\x1e\xce\xf5\x88\x3b\x8e\x99\x4a\x18\xfc\xda\x9e\xec\xb4\x8e\x03\xf4\x18\x28\x36\x29\xa7\xe9\x15\x2e\x1e\x6f\x9d\x31\x2c\xc9\x4c\xf1\x8a\xf1\x05\x46\xc0\xf0\x26\x70\x27\xf0\x37\x9a\x18\x80\xc9\xed\x66\xa7\x62\x32\x8b\xcf\x64\x32\x8b\x5f\x89\xc9\xdb\xdb\x40\xc5\x64\x7a\x3a\x93\xc9\xf4\xf4\x4a\x4c\xfa\x81\xe7\xa9\xb8\x6c\xd3\x33\xb9\x6c\xd3\x39\x5c\xd2\x29\xc5\x81\xec\x13\x31\x44\x03\xc4\x90\x3b\x16\xcc\x7c\x00\x66\x59\x5e\xfa\xf2\x88\xe3\x68\x7d\xf5\x99\xe4\xcc\xf9\x03\x9e\x88\xec\x67\x12\x48\x18\x93\x66\x94\xae\xc7\x95\x9d\xd7\xb5\x0f\x36\x68\xe6\x7e\xec\xdb\x01\xf4\xa2\x48\xf7\x57\xb4\x24\x50\x75\x1a\x37\x1e\xd4\x1d\xa9\x02\x97\x3a\xd5\x46\x1e\x67\xf5\x25\x20\x53\x49\x40\x1c\x02\x62\x3f\xec\x74\x41\x58\x5e\x0c\xaa\x61\xce\x3c\x0b\x28\x83\x40\xf7\xfa\xba\x30\x8b\x15\xce\xc3\xd1\xc0\xb2\x0f\xb5\x1a\xdb\xc1\x3c\x75\x77\x55\xa5\x86\x0d\x91\x59\xbd\x4d\xad\x9f\xa4\xc0\x16\x02\xd4\x2b\xf0\xa0\xb6\x7f\x69\xdd\x32\x8d\x0e\x28\x43\x79\xf3\xbf\x3f\xdd\xbf\x69\x8a\xf2\xfe\xcd\xcf\x0b\x47\x5f\x8b\x08\xc3\xa2\x5e\x27\x16\x8b\x8a\xb8\x41\x43\x76\x70\xd1\x8a\xf6\xc2\xe5\xf2\xae\x0f\xe8\xe2\xe4\x29\x89\x7b\x99\xf1\x8e\xf1\xb8\xcc\x66\xd6\xde\xa0\xb7\xcc\x2a\xc3\xb8\xdc\xfd\x06\xdd\xa2\x03\x3a\xca\x34\x93\x06\x65\x96\xd1\x16\x20\x0c\xe4\x8f\x61\xa0\x43\x8a\xa2\xea\x0e\xb7\xf0\x61\xf6\x83\x84\x49\xfe\x80\xaa\xa4\x53\x56\xd8\xab\x9c\xf2\x4a\xa0\x07\xb7\xb6\x8b\x2b\xb2\xdd\x48\x4a\x81\xeb\x36\xfe\xc6\xdf\xf9\x7b\x6d\xc8\x12\xbe\x17\xa7\x91\xf5\x72\x08\x6b\xf3\xe4\xbb\x62\x38\x12\x3d\x89\xb8\x70\x16\x9e\x27\xce\x04\x30\x79\xf2\x70\x14\x33\x8a\xf7\xe1\x5e\x1b\xc5\xb4\x8d\xfd\x73\x43\xa6\x8b\x50\xeb\x5e\xa6\x1f\xaa\x3f\xa0\x28\x96\xac\xb0\x94\x12\x7f\x0c\x8e\x4a\x69\xa8\x78\xb7\x5d\x15\xab\x04\xc2\xb6\x56\x51\x0d\x2c\x3b\x77\x7c\xa0\x56\xcf\xa1\x3c\x64\xc4\xd1\x30\xc6\x33\xfb\x57\x6b\x99\x90\x6c\x6f\x06\xb5\xe1\xb4\xd9\x19\xee\x95\x0f\x80\x0a\x3c\xd1\xb0\xb0\x82\x35\x2e\x66\x0c\x73\x38\xbe\x8a\xec\x3b\xfe\x68\x19\xa5\x22\x98\x2e\x1d\xbc\x3a\xea\xec\xbe\xc1\x18\xfc\x50\x63\x64\x37\x07\xb8\x0f\xdc\x06\x14\xfb\x85\xd9\x62\x52\x73\x31\x6c\xc7\xa8\xab\x58\xa0\x59\xb2\x76\x41\xd1\x9a\xa6\x28\xd2\x7d\x54\xcd\x7f\x7c\x1c\xeb\xf6\x9d\xf0\xf0\xb8\x50\x26\x3c\x83\x5b\x37\x51\xd5\x19\x5b\xe9\x0d\xdc\xee\xa1\x5f\xfa\x5d\x66\x92\x7d\x95\x99\x8b\xa2\xea\xbb\x9d\xec\x80\x1d\x93\xaa\x6e\xdc\xc3\x43\x92\xc6\x37\x0b\xa0\x56\xf7\x87\x5c\x17\x58\x84\xb8\x3e\x93\xa5\x0d\xa6\x96\x46\x03\x02\xba\xe3\xc6\x2f\x52\x8c\x2c\x30\x08\xb8\x81\x31\xce\xd0\xdd\x52\x6c\x0c\x36\xc9\xeb\x30\xa0\xc6\x45\x24\xa4\xe0\x0f\x0b\x4b\xcb\x9e\x54\x01\x8c\x78\xba\x75\x99\x26\x0d\x98\x35\xca\x5b\x86\x9b\x71\xf3\x4a\x78\x98\x9a\xf9\xa6\xc1\x4b\x97\x9a\x0b\xb5\x7f\x0c\xd6\x83\x5d\x27\xae\xea\xbc\xd5\x6b\x8f\x82\x5d\xc3\x0a\x4b\x7d\x61\xeb\xcd\xf9\x5e\x81\x44\xb1\x27\xa7\xaa\xae\x90\xf0\x6a\xab\x14\xf0\xf0\x89\xdd\x8e\xb4\x63\x67\xdc\xa7\x9c\xc8\x8e\x9a\x1b\x99\x19\x68\xea\x1b\x6c\x51\x9c\x54\xe8\x30\xbc\xc4\xfc\x98\xe5\xa3\xf9\x82\x3f\x89\x6f\x80\x8f\x66\x8c\x7b\x00\x9c\x33\x61\xba\x27\xc0\xd5\x0f\x80\x2b\x5b\x60\x31\x7d\x02\xc6\x51\xda\xef\x84\x27\x14\xbd\x0d\x80\xe9\x18\xcc\x25\xf1\x23\x60\x6b\x09\x93\x9f\x66\x36\x75\x3c\x19\xec\xa7\xd2\x40\x5a\xda\xa8\x8b\x8b\x71\xb2\x4d\x85\x67\x04\x91\x5b\xba\xf5\x06\x29\x12\xf7\x89\x33\xfc\x5c\x9f\xb2\x6b\x62\x2d\x76\x87\xdf\x01\x8f\xe2\xa4\xc0\x1e\xb0\x2d\x00\x49\x1d\xb0\x2f\x5a\x3d\x0c\xcf\xe7\x54\x8a\x1a\x68\x86\xbc\x76\xef\xac\xdb\x32\xc2\xf6\x82\xd9\x10\xba\x31\x9f\xdd\x90\x56\x32\x36\x6b\xf2\x0b\x2c\xc9\x06\x63\x56\xa1\xe6\xf0\x20\x9b\x33\xf6\x03\x64\x4f\xd8\x76\xfc\xc0\x67\xe0\x58\xe8\x3f\x8f\x09\x3a\x80\x8a\x5c\x82\x0d\xf5\xf7\x63\xd2\xef\x23\x9f\xe9\x30\x8c\x8d\x7b\x2b\x6e\x62\x7a\x1f\xb5\xda\xaf\x69\x21\x9e\xdb\x26\x08\x04\x57\x37\xb5\x5b\x51\x1f\xcb\xc1\x5a\xdc\x13\xd9\xe2\x01\xa7\x30\x08\x42\x2a\x58\xe5\x33\xaa\x98\x39\x94\xea\x5b\x6a\x8c\x04\xa0\xe7\x87\x28\x98\x35\x37\x7d\xed\x29\xda\xfb\x3d\xa0\xcc\x6a\x6f\x43\x23\xed\xd1\x69\xd4\xb5\xdc\x54\x8b\x30\x01\x64\xd7\x32\xe5\xc6\x1a\xdc\xcb\x95\x8a\x57\x2b\x02\x3c\xae\xb5\x55\xbb\xc1\x19\x57\x2b\x03\xc5\xaa\xe5\x15\x7c\x17\x93\x99\x9a\x63\xce\xa7\xa5\xea\x52\x73\x20\x2f\x8c\x80\x14\x69\x67\x63\xe0\xbc\x9f\x57\xf1\x56\x4d\xfc\x70\x1d\x69\xc8\xdd\xf6\x4a\x7d\xdb\x2d\x4e\x1f\xc6\x94\x74\x49\x91\xdf\xc0\x8a\xc9\x48\x6b\x61\x89\x04\x50\xd6\xf9\x58\x66\xf6\xfc\x6b\xa1\xbd\xa8\x3a\x08\xfc\xc9\x1d\xd0\x3c\xb8\x23\x7b\xef\xb1\xb3\xb9\x12\xe5\x07\xe0\x10\xe4\x7f\x16\x92\x4e\x4e\x10\x0a\x73\x1f\xbc\x12\xd6\x8b\x76\x81\x5b\x56\xa8\x44\x79\x2c\xb0\xee\x46\x25\x2e\x9d\x68\xf4\x94\xd8\x07\x77\x05\x20\x61\x0c\x1a\x0f\xd3\x49\x60\x24\x01\xce\x8e\x2c\x21\x70\x9a\x5a\x19\xf1\xd2\xc3\xc5\x0b\x43\x15\xf6\x1b\xb0\x30\x1e\xeb\x8b\x15\xcf\x06\x36\x88\xd7\xaa\x86\x89\x81\xbe\xfa\x1c\xe6\x75\xb0\xa2\x87\xaa\x5f\x36\x0d\x72\x00\x42\x6b\x4a\x18\x56\x9b\xed\xa8\x00\xfb\x3a\x17\x98\xf2\x4d\x39\xcb\x4c\xfb\x58\xfc\x7d\x00\x71\xc3\x15\x3c\x84\x3f\xa4\x06\xb9\x0d\xbd\x70\xab\x4b\x0b\x67\xbf\x09\x3b\x6e\x7a\x42\xa7\x2d\xbf\x39\xa0\x78\x1d\x47\x36\x27\x2c\xa5\x1e\x50\x46\x04\xf4\x35\x25\xef\x5f\x3c\xa6\x22\x93\xeb\x22\x9a\xd2\xfc\x8f\x71\x47\x15\x8a\xc4\x19\x83\xd6\x07\x12\x49\xf6\x02\x27\x29\xdb\xfd\x65\x97\xb1\x1d\x77\x94\xf3\xbd\x13\x94\xed\x8d\x25\x75\x0b\x7a\x70\x15\x68\xac\xfc\x60\x1e\xa1\x32\x30\x1d\x34\xb3\x60\x19\xc2\x80\xe1\xd1\xd1\xba\xe6\xdd\x17\x96\x83\x2e\xc0\x6e\xdf\xff\x5d\x7d\xdb\xfe\xa7\x6d\xd0\x68\x80\x4c\xdf\x82\x22\x5c\x65\xa6\x06\xc8\xc0\xf6\x1a\xa0\x25\x0c\x68\x80\x8e\xd6\xb5\x2f\x1e\x4d\x1c\x65\xca\x8e\x17\xf6\x3a\x7c\x61\x47\x43\x70\x83\xac\x65\x35\xbf\x47\x95\x3e\x80\x2c\x77\x55\xd0\xfd\x95\x31\x1a\x18\x06\x16\xcc\x10\x62\x70\xdd\x0c\xf2\x7b\x26\x42\x03\xbb\x0a\x74\x23\xaa\xe9\x7b\x23\x53\xb1\x8b\x1c\xca\x52\xbf\x98\x1f\xaf\x1c\xbc\x0b\xdb\xba\x13\xc5\x4b\x15\x5f\xb9\xd9\x72\x0e\xf8\x4c\x56\x18\x34\xda\xfd\xa3\xe9\xa8\xe0\x8e\xbd\x48\xcc\x0b\x4a\x99\x6c\x72\xc5\xfc\x8f\x8a\x23\x4f\x59\x92\xb3\xe6\x17\xde\xec\x65\x3e\xf4\x09\x86\xcb\x2a\xc9\x9b\x6e\x3d\xe9\x46\xf1\xdf\x1e\xeb\xe6\xce\x41\x6d\x74\x68\xc6\x45\x2b\x50\xae\x83\x82\x1a\xa7\x4e\xd5\x3f\xe5\xb8\x14\xef\x74\xf8\xac\x91\x97\xc8\x0d\x99\xb3\x15\xfb\x4f\xe0\x6d\x2d\xd7\xe7\xb6\x34\x7a\x59\x8d\x72\x1d\x57\x3d\xd0\x5d\x4d\x80\x87\x3b\xb2\x22\x46\x31\x13\x01\xe6\x52\x51\xf3\x07\x16\xa4\x2b\x56\x8a\x17\x77\x6d\xce\x20\x82\xdc\x88\xd1\x68\x0d\x2f\xb3\x93\x04\xab\x09\x77\x63\x89\x4a\xe4\xc6\x96\x0d\x4e\x04\x3b\x6f\x1f\x9b\x1a\x29\x5c\xdc\xa7\x87\xb9\xe6\x75\x00\x90\x8e\x63\x15\x6f\xe1\xee\x19\xbe\xa8\x79\xfb\x4b\xcf\xd6\xcf\x2a\x7e\x16\x0e\xdc\xa8\xe1\xac\xe8\xff\xd1\xe5\x34\x57\xbc\xff\x3a\x8f\x95\x5e\x34\x73\x59\x12\x3a\xd2\x78\x64\x57\xdd\x2c\x85\x55\x04\xbd\x74\xf1\x4c\x65\x53\x94\x5a\x0a\x3c\x97\xba\x9b\x9e\x6c\x42\xf2\x3e\x8a\x31\x1a\x54\xcd\x49\x6e\xc9\x8e\x0c\xd6\x59\x75\xbe\x17\xb8\x6e\xa0\xb9\x88\x29\x7b\xfe\xc3\x19\x62\x5d\xbb\x99\xe8\xe6\x75\x9b\xad\x6b\xdd\x9d\x13\x7a\x6f\x9d\x0f\xe4\x5f\xfc\xff\x79\xe1\xe2\x89\x3a\x92\x67\x16\x1a\x6a\x98\x60\x44\x54\xd1\x0f\x13\x46\x4b\x4b\xce\x46\x8b\xc7\xde\x4a\xb2\xe8\x84\xee\x9c\xc7\x2a\x7d\x7f\xff\x26\x8e\x9a\xe8\x8e\x94\x7c\xa8\x9f\x4e\xdf\xb7\x59\xba\x78\xbb\x3a\xd4\x4f\x27\xa7\xcd\xd2\xbc\xfe\xf4\xee\xa1\x69\xca\xbb\x0f\x1f\x9e\x9f\x9f\x97\xcf\xab\x65\x51\x9d\x3e\x04\x9e\xe7\xe1\xca\xef\x3a\xb9\x7e\x7a\xb7\x7b\x47\x25\x4a\x7e\x7d\x4a\xd0\xf3\xef\x8a\xf6\xd3\x3b\x6c\xa1\x77\xce\xee\xdd\xdb\x15\x7a\xbb\x3a\x94\x51\xf3\xe0\x1c\x93\x34\xfd\xf4\xee\x6d\xb0\x3a\x1e\x8f\xef\x9c\xf8\xd3\xbb\x3f\x6e\x96\xe1\x66\xbd\xdc\x86\xa9\xbb\x5a\x86\xb7\xce\x6a\xb9\xf1\x03\xdc\x9b\xab\x1d\xfe\x37\xfc\xd1\x73\xd6\xcb\x60\x93\x06\xcb\xdb\xed\xda\x09\x96\xb7\xb7\x3f\xee\x9c\x60\xe9\xdf\xae\x7e\x79\xf7\xa1\x43\x8c\x59\x79\xbb\x42\xf7\x6f\x6e\x26\x8a\x0f\x4f\xb1\x0d\xaa\xb2\x24\x8f\x1a\x34\xcb\xf6\xcf\x9a\xfe\x5e\x85\xa9\x2b\xf5\xec\x7a\xec\xd9\xb5\xd0\xb3\x6b\x67\xcd\xf6\x6c\xdd\x54\xc5\x67\xc4\xf7\xad\xe7\x04\x0f\xeb\xb3\xbb\xa9\x37\xea\xd3\x16\x2e\x72\x7f\x18\xde\xce\x9f\xc8\xcc\x1c\xe5\x99\xc9\x12\x09\x76\xce\x30\x2a\x21\x73\xb8\x47\x8b\xea\xd7\x65\x4d\xfc\x60\x54\x3a\xfc\xfb\xa0\x75\xee\xda\x71\xd7\x8c\x45\x39\x24\xd5\x21\x45\x4e\xf5\xe9\xdd\xea\x1d\x6f\x59\x8c\x2a\xa7\x93\xc3\x75\xf5\xad\x7e\x4e\x9a\xc3\x03\x1f\x36\xea\xe6\xb4\x00\x9e\x13\x28\x80\x05\x4b\x74\x6a\x0c\x98\xd9\xb2\x9f\x08\xd9\xc3\xb7\xc2\x8c\x1f\xa5\x29\x1c\x29\x9b\xce\x0c\xa3\x30\x64\xde\x26\x71\xd0\x3e\x82\x37\x04\x40\x7b\x46\xc9\xd7\x9e\x5b\xf6\x33\x65\xba\x8b\xa2\xe2\x6f\xae\xb3\xee\xbf\xf1\x21\x56\xe1\x23\x60\x93\x99\xab\x4c\xaa\x06\xf2\x0f\xa9\x88\x38\xe8\x9b\x3c\x28\xaa\x91\x9b\x90\x87\xb5\x16\xdc\xac\x00\x7f\xef\x1d\x17\xe8\x6b\xef\xf7\x12\xaa\xc7\xa2\xca\xe4\x4a\x12\x57\x9a\xba\x8b\x8b\xb3\xfc\xeb\xe2\xc6\x56\x80\x73\x1e\xda\x99\xa8\xe4\xc6\xe7\x83\xb4\xf8\xce\xb2\xc2\xe2\x0a\x5c\x92\x09\xed\xa5\x34\x6a\xd0\xff\x7a\x4f\x37\x16\x6f\xc6\x9e\xd4\x55\xb1\x67\xfe\xca\xa6\x93\x89\xb8\xab\x6f\x57\x8b\x97\x57\x15\x9b\x32\x5b\xd1\xea\xc8\xdb\xb1\xd4\x6a\xc2\xfb\xb3\xaf\xbe\x15\xab\xbc\x89\xc7\xfb\x26\xb8\xc7\x2f\xb3\xe0\x0b\xa5\x05\x5f\x08\x2e\xe5\xbb\x37\x0f\xbb\x15\x5f\xe0\x78\x3f\x92\x55\xdf\x2f\x99\xe7\xe0\xc5\xfb\xea\x61\x0d\x2c\xd4\xbb\x0b\xd1\x83\xd4\xbb\x9d\xe6\x0f\xbb\xb2\x75\x7c\xaf\x6c\x39\x0f\x6b\xf6\x36\xf2\x38\x06\xa2\xb2\x44\x51\x15\xe5\x07\xf6\x19\x21\x37\x2b\x7e\x81\xbf\x00\x85\x80\xda\xf1\xaf\x26\xc2\x11\x21\xc7\xa1\xef\x2e\x8e\x41\xd8\xf3\x22\x58\x2c\xe9\xbb\x3b\x37\x23\x3b\x1a\x8f\x42\xa4\x88\xd1\x21\xa5\x81\x00\xb0\xfe\x25\x7b\x4c\x9b\xa4\x4c\xd1\xcf\x0b\x61\x4f\xeb\x2f\x58\xad\x7f\x26\x41\x2c\xf2\xeb\xa7\xfb\x37\xfe\xfd\x9b\x9f\x6f\xf8\x4d\xce\xe1\xf8\xb5\xe6\xa2\x8f\xbc\x6c\xd4\x08\x78\x46\x8e\x25\x45\xfc\x86\x22\x24\x02\x43\x6d\x19\x49\xa7\x99\x34\x5c\x10\x3d\x21\x02\xaf\xc4\xdc\x05\xe2\x85\x73\x72\x78\x82\xef\xde\xb1\x33\x00\xdc\x6e\x9d\x4d\xd8\x27\x1e\x05\x2b\xc5\x40\xc6\x67\xae\xfa\x37\x1b\x34\x57\xe9\xf4\xdb\xa6\x10\x9b\xe9\xc9\xfa\x38\x83\xc4\xa4\x86\x47\xd5\x8e\x80\x76\x73\x9f\xe3\xcf\x78\x67\xe0\xf5\x67\x05\xe5\xe5\x01\xe9\x18\xb4\xfd\x41\xb6\x73\xb9\xd1\xbe\x9a\xa8\xde\x15\x98\x70\x24\x5c\x6d\xe0\xce\xb5\x68\x23\x13\x60\xf4\x97\x3f\x50\x29\x33\x0e\x04\x7c\x25\xde\x6d\xad\x04\x83\x36\x8d\xf2\xd3\x7b\x94\xdf\x80\x68\xb9\x25\x18\x13\x38\xfc\x5d\x55\x3c\xd7\x88\x79\x54\x46\x56\x09\x08\xdd\x5f\xf0\xb4\xed\xee\x09\xf0\xcf\x30\xee\xa8\x69\xaa\xf7\x4c\x35\x58\x8a\x60\x74\x1a\x08\x9e\x7e\x54\xbc\x37\xe7\x41\xfb\x7a\xf3\x57\x4b\xac\xdd\x07\x35\xf3\xac\xd5\xd1\xb4\xe0\xb3\xfd\xb1\x33\x7d\x6f\x4f\x94\x2b\xbf\x0d\xc0\x1d\x32\x05\xc3\xd4\x3a\x61\xdb\x88\xd9\x56\x78\xb0\xd2\xda\x1d\xe7\xa3\x56\x9a\x7d\xa2\x45\x14\x29\x73\x48\x27\x18\x9e\xa9\x11\xc2\x2f\xf9\x09\x41\x37\x5b\xd9\x9d\xcd\xb5\xfc\xe2\xa4\xe5\xcb\x2f\x17\x5a\xf8\x11\xae\xd9\x75\x1f\xb7\xba\x53\x55\xbd\xbb\xeb\xd9\xa9\xd3\x84\x6c\xd0\x3f\x3c\x66\x7b\xd5\x8e\x26\x56\x5a\xac\xc9\x8b\x59\xd6\x94\x27\x8b\x1b\x4a\x4a\xae\x48\xb2\xbe\x3c\x2d\x66\x49\x86\x5d\x7b\xfe\x38\xbc\xb2\x2f\x34\xbd\x60\xdc\x1d\xe2\xee\x40\xb3\x8b\x2b\x9b\xec\xb4\xe2\x4b\x81\x74\x94\xf8\xa2\x97\x72\xcd\xa0\xd3\xd5\xa3\x5c\xe6\x61\xa9\x1a\x7c\xb3\x22\x36\xc6\x2e\x87\xc5\x3e\x30\x63\x19\xc8\xd1\x90\xe1\x1e\x72\xd2\xed\xd9\x5b\x20\xac\x1e\xf3\x1c\xaf\x72\x30\xaf\xf0\x5b\xe2\xcc\x33\x61\xd2\xb3\x42\xa2\x71\x3c\x3c\x56\x35\x2e\xa7\x71\x5f\x65\x1a\x1f\x84\x02\xb4\x01\x0e\x15\xa8\x5e\x93\xe3\xf5\x5a\x39\x6e\x25\x83\x64\x1c\x7d\xaf\x32\xc8\x30\xe9\xff\x02\x23\x6c\xf2\xdc\x76\xd6\xf0\x02\xfb\x13\x10\xf6\xdc\x71\x25\xe0\x3f\x6f\x4c\x31\xc8\xfe\xb3\x0f\xa3\x7a\xf6\xec\x05\xbf\xcb\x19\x08\x55\x87\x17\x35\x5f\x77\x08\xd6\xff\x05\x46\xe0\x65\xc6\x59\x2d\x0e\xb0\xfa\x75\xc6\x57\xfd\x2a\x03\xab\xbe\xe6\x88\x52\x8c\x1b\xfd\xd7\xfe\xfd\x07\x70\x0f\x93\x69\xc7\x31\x49\x53\x37\x2d\x9e\x35\x1b\x2c\xf2\x80\xb6\x1c\xb2\x04\xf7\x63\x59\x0a\xcf\x49\xf5\x47\x47\xc3\xb2\xfd\xf8\x8a\x24\x87\x9d\x18\x9d\xf7\xa1\xd9\x1e\x9d\x82\x12\x5a\x9f\xf4\x9d\x19\xa3\x63\xf4\x98\x36\x46\x8c\xb0\xaf\x32\x9b\x41\xd0\xd8\x4f\xe6\xa9\x9e\xc5\x0c\x7c\x62\x11\x8a\x2d\x2c\xe0\xbd\xac\x2b\x1b\xad\xf9\xf6\x49\xd5\x52\x07\x8e\xdf\x39\xe0\x5d\x19\x93\xcd\xca\xa3\xa7\x8b\x3e\x69\x28\x04\xc8\xd5\xc7\x38\x81\x6c\x14\x03\x87\x4c\xf6\x2b\x9b\xe7\x49\xd9\x61\xdb\x43\x0f\xef\xd1\x0e\x05\xba\xec\x54\x20\x03\xb3\x93\x50\xa9\xc7\x06\x46\xdd\x44\xfb\x1a\x78\x72\x8b\x8b\xb0\x0d\x36\x4a\x00\x13\x84\x23\x08\x96\xde\xb9\x9d\xf2\x9a\xef\x48\x53\x61\xeb\xe5\xfb\x0f\xac\xc3\xae\xbc\xfd\x22\xc4\x01\xe5\x06\x70\xfd\x23\x7c\x62\x7a\x2a\xa9\x8b\x94\xf6\x51\xf7\x2b\x82\x0e\x66\x77\x61\xb5\xf1\xa7\x51\x7c\xcb\x19\xbb\x61\x53\xa6\x4a\x25\xdd\xf1\x71\x52\xfe\x23\x79\x47\x98\x3c\xe0\x2b\x74\xf1\x9c\x60\xad\x30\xd5\x8d\x3f\xd9\xdd\xca\x91\x3e\xf0\x4c\x3d\xf0\x4c\xdd\x2b\xbc\xb6\x86\x49\x96\x49\x9a\x4a\x7a\xcc\xee\xc0\x8f\x4f\x20\xeb\xd6\xc1\x90\x82\x09\xa8\x05\x59\xd3\xaf\x7d\x1a\x3f\x58\xca\x47\xeb\xe3\xa7\x18\x1e\xaf\x41\x58\x5c\x0b\xb6\x7c\xe8\x56\xfe\x79\x45\xf3\x7b\x5b\xe0\xa5\xf1\x91\x68\xf7\x3a\x62\x82\x62\x88\xf2\xf8\x51\x41\xde\xed\x66\xa4\x0a\xc5\xfd\x66\xe5\x68\xc9\xf7\x51\x9d\x0c\xdd\x39\x02\x90\x20\xfd\x13\xea\xb7\x30\x48\xe1\xa9\x2a\x9e\xfb\x02\x0d\xbf\x4d\xb4\xef\x5f\x71\xc4\xdc\xe2\x3f\xcb\x48\xba\x25\xc4\x19\x5f\x01\x84\x5d\x4a\x2b\x5e\xb5\xce\xa3\xa7\xe1\x9d\xde\xaf\xfb\x56\x9c\xc5\xab\x04\xc2\xab\x97\xf4\xa9\x4b\xf8\xd9\x4b\xf2\x40\x80\xbb\x47\xcd\x33\xa2\x7b\x3c\xa6\x99\x8f\x3c\x05\x8c\xe1\xa3\x24\xef\x9e\x64\x95\x0a\xdd\x63\xfa\x98\xc4\x9d\xdd\x15\xbe\x90\x64\x85\x72\x71\x06\xd7\x26\xf9\x15\xe5\xe2\x36\xbd\xce\x8b\xc9\xd7\x11\x39\x2b\x59\x77\x5f\xc9\x47\x1d\xa4\x9d\x70\x61\xc3\x7e\xe5\xeb\xce\x15\xb0\x5f\xc1\xbb\x6f\x76\x77\xf2\xcd\x0f\xfc\xcb\xed\x60\xe7\xdf\xb1\x70\xca\x1a\x09\x43\x9d\xb5\x9a\x9c\xfc\xd0\xec\xab\xac\x2d\x7b\xb6\x85\x19\x40\x3c\x66\xa3\x20\x28\xa3\xd1\x66\x93\xab\x9b\xa8\x49\x0e\x6c\x36\x38\x88\x1d\xe0\x49\x14\x93\x5e\x99\x0f\x82\x70\x14\xfa\x2c\x93\x86\xc9\x60\x08\x33\xb0\xf3\xc1\x50\x68\x3f\x25\xcc\x7c\xa1\xad\x17\x07\xb9\xb5\x5d\x29\x9f\x2a\x80\x4f\x09\x2a\x1f\xac\x78\xed\x15\xb1\x66\x09\xc2\x70\x2f\x8e\xaf\xbe\x78\xea\x08\xa3\x70\x6e\x72\x28\x72\xdb\xb3\x99\xcb\x50\xba\xd7\xaa\x4a\x81\xc3\x1c\x83\xb4\xb9\xb4\x85\x75\xa1\xfb\x47\xbe\xb6\x35\x0e\x0a\xb7\x3e\x54\x45\x9a\xf6\x4b\xc9\x76\xe8\x8b\x6d\xf8\xf4\xc0\x9d\x60\x70\x5f\x14\x89\xf9\xa2\x76\x4c\xcc\x17\x2e\x6f\x99\xb4\x77\x94\x4c\x77\xf0\xac\x7f\x33\x82\x99\xf2\x4c\x55\x84\x09\x50\x55\x8b\x99\x0c\x55\x55\x32\x33\x16\x66\x92\x54\x55\xe9\x27\x4c\x85\x09\x82\xad\xde\x17\xcb\x44\x86\x12\x69\x26\xe4\x49\x06\x68\x77\x8c\xa4\x2a\x9e\xd9\x77\x88\xe8\x88\x56\x7c\x53\x26\x2d\x30\xa5\x2d\xe8\x93\xe5\x49\x4c\x49\xb3\x09\x3c\x49\x54\xc5\x33\xcb\x1e\xf0\xc5\x02\x3f\x64\xaf\x95\x27\x51\x6c\xf0\xf1\xd3\x08\xf4\x12\x7f\x6f\x96\x34\xa7\x07\xbf\xfc\x83\xab\xb6\xb0\xc4\x93\x75\x4d\x2a\x37\x8b\x9e\xb3\x32\xec\xa1\xa8\xa7\xa4\x4e\xf6\xa9\x55\x0f\xf2\xf3\x22\xbc\x8c\x71\xfe\x29\xc9\xca\xa2\x6a\xa2\xbc\x57\x73\x6e\x4d\x23\x7f\x56\x4e\xaf\x4c\x0a\x49\x76\x82\x65\x33\x41\xea\x98\xe5\xe6\x45\x28\xe1\xec\x17\xb5\x15\xdd\x6e\xb6\x1a\x2b\x9a\xc5\x46\x55\x13\xaa\x28\x54\x4d\xac\x05\xa8\x9a\x58\x25\x33\x63\x01\x54\x4d\xac\xf2\xda\x56\x94\xcb\xb4\x2a\x91\xfe\xf5\x59\xd1\x2c\xbe\xac\x15\x15\xf0\x9f\x6d\x45\x45\x7c\x17\xb3\xa2\xff\x48\xaa\xfd\x3a\x56\x94\x17\xfd\x6c\x2b\xca\xa0\xf9\xf5\x5b\x51\x86\xd9\x73\xac\xe8\xed\xad\xaf\xb1\xa2\xf4\x89\x33\x9d\xaa\x09\x55\x14\xaa\x26\xd6\x02\x54\x4d\xac\x92\x99\xb1\x00\xaa\x26\x56\x79\x6d\x2b\xca\xa5\x82\x96\x48\xff\xfa\xac\x68\x7a\xba\xac\x15\x15\xf0\x9f\x6d\x45\x45\x7c\x17\xb3\xa2\xff\x48\xaa\xfd\x3a\x56\x94\x17\xfd\x6c\x2b\xca\xa0\xf9\xf5\x5b\x51\x86\xd9\x73\xac\xa8\xef\xdf\xde\x6a\xcc\x68\x9b\x1a\x75\x4d\xa8\xa2\xd0\x35\xb1\x16\xa0\x6b\x62\x95\xcc\x8c\x05\xd0\x35\xb1\xca\x6b\x9b\x51\x3e\x59\xbd\x44\xfb\xd7\x67\x47\xdb\xf4\xb2\x76\x54\xc0\x7f\xb6\x1d\x15\xf1\x5d\xcc\x8e\xfe\x23\xe9\xf6\xeb\xd8\x51\x5e\xf4\xb3\xed\x28\x83\xe6\xd7\x6f\x47\x19\x66\xad\xed\x28\x8f\x42\x88\xe3\x83\xa3\x5a\xfd\xe5\xac\xb4\xa3\x3c\x1f\x3f\x80\xfb\x8d\xd0\x57\x58\x91\x4d\x5a\x6c\x52\x61\x93\xfe\xc2\xca\x3b\x67\xb3\x87\xe2\x93\xec\x9a\xce\xaa\xc1\xe5\x26\xb4\xfa\x2d\x25\xc6\x98\x19\x11\xe9\xb7\xb8\x96\xa6\x5b\xcd\xff\x38\x1d\xae\xb6\x55\x50\xa9\x41\xae\x9c\x91\x82\x4c\x94\x0e\x9e\xb7\x4e\x36\xb6\x49\x6b\x99\xcc\x76\x09\xb0\x4a\x3a\xfe\x38\x83\x04\x1f\xd1\xa0\x35\xd3\x2e\xd3\xab\xbc\x39\x2e\xbc\x3a\x42\xff\xb7\xbc\xbd\xb1\xc0\x20\x6e\x9b\x41\x55\xe4\x9c\xf2\x53\x49\x01\x83\x43\x81\x29\x9c\x82\x49\xcf\x3c\x5f\xd5\xdc\x88\xed\x14\xd2\xf0\x81\x36\x11\xe5\xca\x06\xa5\x78\x42\x6a\xa1\xad\x4d\x0f\xe8\x58\xd7\x1f\x18\xc6\x64\x2c\xab\x02\x59\xfc\xa7\xf6\x38\xa7\xd6\xba\xbe\x16\xcf\xd0\x89\x95\x7c\x3b\x42\xcc\x7e\xed\x25\x1f\x77\x5b\x79\xe3\x03\x33\xf8\x77\xee\x85\x99\x15\xfe\x1f\xf4\xa8\x20\x6e\xd3\xdb\x60\xc7\x36\xfd\x6d\x70\xfb\x8e\x7e\xc7\x32\x47\x87\xa8\xfc\xf4\x8e\x30\x3d\x14\x67\x49\x83\xaa\x34\xc9\x92\xe6\xd3\x3b\xdf\x1b\x8a\x29\x27\x41\xf7\x62\xcd\xda\xd9\x3e\x04\xc1\x1f\xd7\x8e\x1f\x76\x3f\x83\xd5\x43\x10\x68\x5e\x90\x83\x85\x38\x1c\x88\x98\x39\x2c\x09\x82\xe8\x3c\x8d\x21\x28\xf4\x43\x9a\xd6\x99\x63\x90\xe2\xa8\xfa\xac\x31\x9e\xe2\x51\x4d\x18\x44\xe4\x0e\xa8\x21\xf3\x66\x44\x6d\xb0\x8e\xe4\x42\xf1\xf8\x0f\xd4\x19\x6a\x74\x5a\x8e\xad\x2c\xa4\x44\x7e\x3b\x85\xbe\xc6\x4e\x4a\x88\x03\x1b\xc4\x1a\x6b\x29\x57\xd6\x1a\x4b\x0d\xd3\x82\xad\xd4\xd4\x04\x4c\xa5\xb1\xbf\x95\xb6\x11\xee\x69\xd0\x42\x4a\x55\xfd\x1b\x1b\x9a\xff\x19\xcc\xa4\x2c\x85\xaf\x6d\x2c\x79\x49\x82\xb6\x72\xea\x20\x05\x0c\xa6\x59\x6f\x40\x0b\x09\x55\x31\x18\xa1\x43\x54\xc5\xaf\x7e\x7e\x77\xf2\xe9\x42\x29\xb3\xf1\x73\x51\xc5\xd4\x35\xd8\x57\x28\xfa\xec\xe2\x02\xe3\x09\x7c\xe6\x13\xc9\x80\x3d\x5c\xf2\x68\x15\xc7\xcc\xa4\x15\x46\xc0\x0f\x33\xe5\xdb\x2a\x58\x6a\x3f\x38\x0f\xe0\x05\x38\x0f\xb8\x80\x2a\x42\x2e\xc9\x31\x49\x26\xd3\xf6\x78\x84\x1f\x7c\x91\xa4\x3f\x62\x38\x7e\x52\xa1\xe3\x72\x6e\x88\xd9\x34\x38\x19\xab\xee\x14\x70\x6f\x9b\xba\x58\x5a\x37\xfa\x5b\x06\x30\x80\x92\x41\x26\xd9\x0b\x90\xfd\x1e\x62\x11\xcc\xe1\x62\x60\x13\x4a\x0f\x62\xc3\x28\xfe\xe9\x3e\xa0\x28\x46\x95\xf3\x3d\xcb\xf7\x02\xee\xbd\xef\x29\xc8\xb1\x28\x80\x7c\x96\x62\xd7\xbb\xfb\x22\x7e\x99\x7a\x2b\x81\x4b\x3f\x42\x2f\x84\x0c\x67\x33\x7d\x40\x35\xdd\x26\x69\x84\xb4\xcd\xe3\x19\xd5\xad\x5c\xbd\x7e\xdc\xcb\x10\xfd\x1b\x21\x2b\x6d\xe6\x3e\x96\x28\x6a\x1b\xa9\x73\xf5\x20\xe3\xb2\xc4\xe6\x58\xe6\x00\x32\x08\x5d\xba\x8e\xd5\xa7\x62\x01\x64\x42\xfb\x54\x3c\xd9\xda\x3f\x88\x19\xe8\xf3\x13\xaa\x5f\xf6\xec\x6d\x87\xb7\xba\xf9\xa8\xbd\x59\xa6\x30\x36\x12\x8b\xca\x11\xac\x51\x63\xb0\xcc\x13\xc5\xcd\xea\xa8\x56\x04\x93\x5b\x4b\x94\x65\x4a\x53\x3b\x56\x54\xb6\x80\x79\x80\xc9\xb6\xb5\x90\x24\x99\xfb\x7e\x42\x4e\x4d\x6f\xb9\x51\x76\xb8\x0b\x24\xab\xa4\x0f\x50\x73\x60\x42\x47\x7b\x20\x07\xdd\xd5\x27\x5b\x16\x64\x32\x0c\xc6\x24\x3b\xb9\x78\xa8\xa4\xd1\xcb\x2b\xbc\xe1\xc5\xee\x7f\x01\xc6\xc4\x46\xe9\x24\xf6\x16\x2c\xab\x4d\x51\x72\x7f\x77\xe4\x85\x98\x60\x8e\x4e\x51\x77\x9c\x9d\xb9\x0c\x55\x3f\x54\xd8\x2e\xf4\x4b\x01\xee\x1a\xbe\x9e\xa0\x3e\x7d\xd4\xab\x4f\x6c\x12\x0b\x6c\x1b\xaf\x3c\x77\x61\xb3\xf9\xd9\x61\xd6\x73\x82\x56\xd3\x6b\xf9\x56\x47\x97\x47\x7c\x9a\x7d\x1c\x68\xf3\xe6\xa3\x72\x3b\x54\xbd\x19\xca\x7c\x11\x13\xdf\xf6\x2f\x09\x48\xf9\x6d\xfb\x0f\x5f\x04\x76\x99\xe6\xf3\x13\xac\xe7\xd0\x8b\x14\xe3\x04\xcb\x14\x29\x1e\x30\x50\x4c\x05\xe2\x64\xc3\x30\xc3\x74\xc7\x98\x1a\xfe\xd5\x7a\x84\x59\x2e\x5e\xa9\x4b\xbe\x88\xc4\x7f\x38\x53\xc4\xbc\x24\x95\xe8\xbf\xe7\xc9\x48\x6b\x69\x5c\xc8\x3d\xe2\xa7\xc7\xa7\x48\x20\x68\x4c\x21\x68\x4e\x22\x38\x85\xa6\x68\x1a\x27\x81\xb1\xab\x17\x23\xdf\x73\x78\xea\x9a\x38\x95\x2d\x76\x45\x71\xbe\xb4\xe4\x4c\x80\xa6\x9b\xcf\xc6\x6c\x80\x93\x48\x4e\xe8\x21\x00\x4e\xd9\x45\xaf\xc5\x94\x4d\x17\x01\xa0\xba\x3e\x82\x59\x63\xcc\x58\xe7\xa4\xd7\x1a\x33\x26\x78\x14\x56\x96\xac\xc7\x2a\xbc\x60\xd7\x15\xbb\x87\xe2\x31\x6f\xfa\xc7\x45\xe9\x23\x5c\xf0\x27\x05\x00\x8f\xee\x14\x95\xfc\xca\x86\x47\x09\x7c\x56\x7f\x29\xaa\xf2\x21\xca\xeb\xfe\x6a\x1b\x59\x9d\x14\xcf\xc3\xdf\x5f\xe4\x26\x72\x86\x4c\x7d\x7f\x4c\x7e\x6e\x68\xe8\x87\xe8\x70\x28\xaa\x38\xe9\x83\x75\xc3\xfd\xad\x28\x3f\x3c\xe0\xa5\x39\xe7\x23\x8d\x95\x39\x53\x0d\x3c\x5b\xab\xa8\xcf\x8c\xf4\xe2\xe8\x36\x2f\x25\xba\x01\x5f\xcc\xb0\x4b\xb2\x6a\x99\xad\x53\xc1\x45\xa7\xcc\x20\x1b\xf3\x5f\x42\x90\x25\xf4\x03\x30\x80\x45\x47\xe4\xa3\xfa\xcd\x8f\x0e\xed\xbe\x42\x51\x7c\xa8\x86\x47\x76\x2e\xfb\xc6\x0b\xe3\xb6\x29\xbc\x18\x7f\xbc\x91\x29\x5d\xc8\xb5\x7c\x1f\x57\x15\xfd\x1a\x9b\xda\xbd\x72\xf0\xbd\x23\x15\xfd\xdd\x78\xb4\xc1\x8c\x84\x4f\xad\x41\xef\xf0\x62\x5c\x1f\xf5\x27\x2a\x80\x17\x45\x98\xfb\x95\x1f\x98\x67\xad\x2d\x78\x20\xc1\x09\x9e\x13\x29\x48\xf1\x98\xc7\xa8\xc2\xe3\xf9\xb5\x11\x73\x23\x5b\x40\x00\x6e\x37\x08\xa9\x29\xcb\xe8\x94\xe4\x5d\x92\xe8\xa9\x3a\x09\x1d\x93\x84\x35\x49\xaf\x2b\x65\x74\x42\xec\x39\x18\x43\x90\x59\xfd\xd2\x90\xda\x29\xef\x43\x62\xc2\x9b\xd1\x01\xff\x68\xb4\x3e\xc1\x9d\xe6\xc5\x6d\xe1\x41\x9b\xa1\x41\x6c\xdc\x4a\x78\x04\x7f\xa4\x19\x6e\xf6\xab\x8f\xba\xbe\xb5\x1c\x8a\xd2\x03\x6a\x22\x33\x4c\x98\x5f\x78\x9d\xfb\xb5\x12\x77\x10\x5a\x44\x75\xd9\xf8\x94\xd8\xc1\xc0\x52\x7d\xc2\x6b\x46\xe0\x2c\x01\x69\x14\xe1\x83\x09\x1e\x89\x6c\x58\xbc\x8e\x64\x98\xbc\x54\x54\xfb\x71\x27\x52\x14\xa4\x3e\xe5\x55\x1b\x75\x32\x46\x91\xf6\xb0\x83\x2a\x52\x9f\xf3\x40\xd6\x10\x5f\x9e\xfa\xa8\x11\x60\x5f\xc8\xf9\x74\x71\xac\xcb\x11\xc6\x69\xaf\x07\x90\x67\xdf\xd5\x94\x8c\xba\xa8\x56\xbc\x95\x95\xde\xad\x04\x05\x80\x39\x98\xa7\x85\x2b\x3b\x25\x54\xb1\x50\x67\x3a\x71\xf7\xaf\x35\x18\x32\xa4\xd8\xc9\x7b\x20\x75\x86\xbc\x03\xbb\x71\x6e\x6a\xec\x39\xa3\xde\x72\xd0\x73\x4b\x94\x28\x3e\x21\xcb\xc7\x41\x3a\xb1\x13\xa9\xaf\x65\xa1\x6f\xc3\xb7\x72\xa2\x88\x2d\x98\x28\x42\xfd\xae\x93\xea\x81\x19\xf9\x65\x89\x7d\x54\x23\xba\x1e\xd1\xa6\x95\x62\x9f\x2b\x54\xbf\xb9\xf8\xab\x7c\xb7\x91\xe9\x1b\xc3\xb3\x8b\x51\x57\xb7\xdf\x2b\xef\xff\xb4\x7e\x0c\xa4\xab\x8e\xb2\xb2\x79\xd1\x9d\xcc\xdc\x37\x39\xc7\x95\x62\xa5\xc3\x3e\xeb\xc6\xe0\x27\xfb\x04\x8a\xa3\xc2\x1b\xc5\x49\xe1\x0d\x1c\xa8\xf7\x3d\x49\x87\xdd\xb2\x4a\xb2\xa8\x7a\x99\xf9\xe0\x5a\xc4\x63\x11\x24\x39\x14\x2b\x4f\x1a\x28\x48\x6c\x82\xc3\x41\x45\x82\xe0\x92\x48\x2c\x55\x19\x2b\x26\x2e\x6b\x98\x55\x4d\x87\xbf\x46\x87\x22\x8f\xa7\x48\x88\x5f\x69\x47\x22\x1e\x51\x46\xe3\x87\x69\x52\x0a\xd7\xe1\x7e\x13\xa8\xc9\x08\x72\x1a\x3e\xcc\x96\x94\xef\xed\x16\x8e\xef\x6f\xb1\xc0\x14\xb2\x7a\x3c\x1c\x50\x6d\xdf\x84\x60\x17\x6d\xd7\xa1\xd4\x84\x0e\x8b\x24\x27\x5a\x3c\x4d\x4a\x3e\xda\xa2\xd5\x5a\x45\x42\x94\x51\x57\x3c\x5b\x42\x6b\xac\x4c\x9b\xed\xc2\xd9\xdc\x82\xf2\x49\xf2\x63\x61\xcf\xf9\x36\x0a\xf6\x3b\x91\x73\x8c\x42\x94\x0c\x29\x9b\x28\x16\x7f\x1b\xed\xf6\x20\x72\x41\x26\xb8\x6c\xb6\x40\xf0\xc0\xf2\x37\xc1\xc2\xf1\x77\x6b\x50\x22\xcf\x51\x95\x8b\x19\xe7\xbe\x09\xfc\x20\x0c\x6e\xd5\xeb\xcf\x83\xef\x6d\x45\xd6\x29\x22\x51\x34\x7d\x31\x20\x1d\x3d\x95\x78\x75\x8b\x3c\x4f\x45\x45\x90\x11\x2d\x9e\x2f\x26\x6c\x7b\xfc\xdb\xd5\xc2\xd9\x82\x52\x8a\xa3\xfc\x24\x9c\x04\xd4\x75\x6e\x7c\x58\x85\xf2\xb0\xea\x90\x88\x02\xa2\xa5\xd3\xb4\x67\x1f\x07\xfe\xca\x53\x10\x10\x64\xd3\x95\xce\x17\x4d\xe0\x2d\x9c\x70\xa5\x1c\x52\xdd\xc9\xdf\x29\xea\xb3\x3b\xde\x1e\x23\x91\x77\x82\x46\x94\x4d\x57\x38\x5d\x75\x22\xe4\xa1\x10\xa6\x20\x08\x87\x14\xce\x97\xcd\x7a\xb7\x70\x82\xf5\x2d\x9e\xbc\x3c\x85\xe2\x54\xf6\x4f\xa9\x76\x29\x4e\xe5\x5e\xad\x3e\xcb\x4a\x53\x7d\x9e\x6a\x70\xe2\xc0\x0f\xd6\x20\x72\x49\x61\xaa\xcf\xb3\x45\x12\x06\x0b\x27\xdc\x2d\x9c\x8d\x68\x6e\xfe\xf6\x98\xed\x8b\xa6\xea\xc3\x5d\xc3\xd2\x3c\xd0\x05\x4a\x75\xa9\x21\x74\x31\xd1\xd5\x84\x4d\x0f\x81\x31\x86\xb5\x35\x66\x2d\x60\xee\xad\x0a\x2d\xe9\x6e\x72\x4d\xba\x3a\x07\x06\xaf\x69\xec\x3b\x45\x95\x3e\x9d\xe3\x94\x93\x51\x3e\xef\x53\x9d\xf1\x7e\x1f\xe1\x8b\xc4\xdf\xc5\x79\x42\x3c\xf0\xd8\xd5\x1c\x5d\x3e\xc0\xa3\x62\x2b\xc6\x49\x9d\x25\x35\xb9\x1c\x06\xca\x70\x2d\x73\xc1\x82\x2c\x0f\x69\x51\xa3\x59\xa7\x6d\x84\x90\xa0\x56\xae\xda\xb6\x82\x6b\x77\xcf\x5b\x7b\xbb\x50\xa5\xb6\x87\x03\x0a\xe1\x00\xce\x7e\x17\x47\x4c\x64\x89\xa7\xf0\x20\x1d\x5f\x1c\xe0\x6e\x8f\x87\x58\x09\x27\x75\xca\xc8\x65\xb0\x0d\x03\x01\x4a\xb1\xd6\x5e\xed\x56\xf1\xda\x57\x0e\xc4\x00\xad\x50\x08\x86\xa4\x36\xf1\x2e\xde\x2b\x69\x68\xda\x74\xd8\x1d\xf6\x87\xa3\x12\x52\xd9\xaa\xc0\x0b\x56\xc1\x46\x84\x83\x56\xc5\x7e\x18\x6e\x89\x3d\x84\xa7\x90\x35\x8a\xf9\x54\x8e\x03\x67\x2b\xb4\x39\xec\x15\x14\x34\x2d\xda\xfb\xf1\x71\xaf\x82\x53\xf7\xd2\x3e\x40\xfe\x4a\x80\x92\x57\xb1\xde\x21\x5c\x6f\x3c\x65\x63\x7c\x74\x38\xfa\xa0\xca\x21\x14\xa2\x3d\x84\x5e\xd3\x92\x68\x1f\xc7\xe3\xf4\xca\x02\xa9\x9b\xb1\x09\x0e\x2b\xb1\x19\xe0\xd2\x73\x17\x6e\xd6\xde\x5a\x13\xfa\x5c\x1d\x62\xa8\x25\xc7\x23\x42\xfb\x48\x41\x41\xd3\x98\xe3\x11\xed\x22\x5f\x01\xa7\x6c\x4f\xb8\x5a\x1d\x3d\xb1\x3d\xd0\x22\x71\x1b\xf8\x07\xb5\x96\x1d\x77\xf1\x16\xd6\xb2\x63\x78\x90\xb5\x8c\x12\xd0\xb5\xc6\xdf\x7b\xfb\x2d\x0c\xa6\x6c\xcc\xfa\xd6\x0f\xfc\xad\x64\xc5\xa5\x65\xdd\xce\xdf\xf9\xbb\x40\xd9\x16\x84\xff\x03\xdb\x12\x1f\xe3\x23\x02\xf1\x6b\x9a\x82\x0e\xe8\x70\xdc\x80\x50\xca\x96\x6c\x76\xf8\x3f\xa9\xf9\xe2\x12\xcc\xdf\xfb\x28\x50\x9a\x33\x62\xb4\x6e\xc1\xa1\xbf\x39\xec\x0e\x11\x84\x5e\x37\xee\x6f\xf7\xfb\x3d\x82\x80\xd4\xa3\x65\xed\x85\xde\x30\xc0\x7e\xd3\x1f\x99\xf8\x8c\x5e\x8e\x55\x94\xa1\xda\x29\xab\xe2\x54\xa1\xba\x76\xf7\x51\xe5\xd6\x4d\x95\x94\x88\x5a\xb7\x63\x55\x0c\x8f\x99\x32\x6d\x1b\xe7\x47\xbf\xcf\x94\x4a\x0f\x44\x34\x85\xb6\xba\x27\xbe\xc2\xf2\x6b\x60\x62\xd9\x93\x9e\xbc\x73\x2a\x65\x2d\x03\x53\x06\x73\x41\x5f\x4f\x0e\xd2\x6f\xc3\x99\xcb\x52\x61\xdb\x8a\x11\xe0\x15\x5f\x0b\x17\x5e\xb9\x60\x42\xd8\xd2\x33\x17\xcc\x37\x50\x50\xa2\xdb\x31\x31\x34\xae\xdf\x77\x63\x03\xc7\x64\xdd\xee\x78\xcb\x4d\x17\x9d\x9e\x17\x96\x96\xe5\x6d\x4a\x0a\x04\xa8\x78\xac\xba\x95\x87\x95\x26\xaa\xdc\x13\xee\x6d\x94\x37\xef\xd7\x61\x8c\x4e\x0b\xd5\x2d\xc0\xf0\xc6\x09\xc2\xb7\x0b\x76\x2d\x2e\x17\x84\xde\x5b\x1d\x02\xc3\xe7\xad\x88\x4e\x2c\xb8\x11\x3b\x81\xee\xf9\x49\x19\x14\x38\x31\x44\x79\x92\x45\x4d\x2f\x87\x21\xd9\x2a\x29\xed\x06\x77\x4d\x65\xe1\x24\xf9\x31\xc9\x93\x06\x81\xa6\xa2\x7b\xf5\x7c\x0e\xd8\x99\x5d\x2f\xb4\x00\x6c\x03\x93\xea\x0e\x2a\x1d\x14\xa4\x63\x62\xf6\xd8\xa5\x43\x65\x7c\x68\x86\x7b\x05\x1e\x78\x64\x86\xd0\x83\xef\x29\xb1\x17\x94\x86\xfa\xe2\x4d\xb6\x5f\x57\x3a\x02\x83\x7d\x1c\x99\x27\x12\x71\xa3\xc3\x78\x5a\x46\x3c\x90\x07\xa4\x03\x62\x8d\x91\xe8\xbd\xc1\xa8\x87\x2b\x9b\x8a\xcf\xd0\x39\x0e\x5f\x4b\xde\xf6\x50\x09\x1f\x13\x53\xd1\x87\x4e\x15\xe9\x23\x61\xc3\x64\x04\xe2\x3d\xe3\xd8\x8f\xcd\xb5\x24\xcd\xc1\x1d\xed\x1d\x24\x81\x4b\xed\xa5\x49\x6e\x97\x1a\xb8\x9b\x29\x6f\x37\x1b\x54\xc1\x70\x03\x52\x85\x4b\xbb\x7b\x6e\x20\x39\x9c\x1c\x91\x35\xef\x6e\x7e\xaa\x35\x65\x7f\xc0\x3c\xb0\xba\xa5\x38\x31\xf5\x1a\xc7\x65\x44\x0d\xfc\xde\x81\x95\x12\xbe\x17\x6b\x8b\x83\x6b\x8d\x29\x67\x57\x6f\x4a\x98\x6d\x5f\x06\xdd\x43\x51\x25\xbf\x14\x79\x13\xa5\xe7\x3d\x6b\x05\xa3\xfc\xc1\xb1\xd6\x76\xfd\xf1\x2b\xab\xd3\xb5\xd6\x3c\x28\xc6\xc0\x94\x13\x5b\x8a\xc3\xc4\xb6\x2c\x28\x7b\x70\x3a\xaa\x09\x3a\x26\x68\x07\x69\x83\x4e\xfd\xa6\xd2\x85\x5a\x25\x1c\x94\x04\x48\xfb\xf6\x57\x91\x40\xde\xa0\xfc\x16\x33\x9e\x9a\x54\xe2\xb6\x51\x62\x6b\x35\xb6\xbc\x3f\x33\x85\x19\x51\x9b\x2d\xf5\xd9\xfa\xfa\xca\x04\x5e\x38\x05\x80\x72\x66\x4f\xc6\xa8\xd4\x6e\x9d\x7e\x2b\x35\xfc\x75\x18\x80\x5b\x29\x28\xba\x46\xd5\xed\x33\x10\xc0\x7c\x02\x99\x08\x5e\x4d\xdf\xb3\xf8\x57\xa4\xef\x30\x33\x5f\x47\xdf\x41\x5e\xce\xd2\x77\x10\xe3\x35\xf5\xdd\x96\x81\x8b\xea\x3b\xf7\x56\x3c\xcc\x27\xf0\x66\xfc\xab\xe9\x7b\xf7\x5e\xf8\xaf\x44\xdf\x61\x66\xbe\x8e\xbe\x83\xbc\x9c\xa5\xef\x20\xc6\x6b\xea\xbb\x2d\x03\x17\xd5\x77\xfe\x51\x6f\x98\x51\xe0\xb1\xe5\x57\x53\xf8\x36\xfd\x15\x29\x7c\x9b\xfe\x7a\x14\xbe\x4d\x5f\x5b\xe1\xdb\xf4\x2b\x2b\x7c\x9b\x5e\x5b\xe1\x59\xcc\xc7\xf4\xb1\x7e\x50\xde\x68\x54\x54\xff\x41\xef\xcc\xf4\x4d\x77\x3c\x95\x43\xab\x42\x63\xff\xf4\x13\x1c\xa3\x9a\x71\x14\x42\x38\xf0\xa0\xc0\x38\x35\x58\x67\x00\x03\x4e\x4d\xe9\xb9\x14\x8e\x57\x4c\x23\xa7\x79\x78\x50\x11\x48\x19\x59\x11\x03\x29\xf4\x0b\xcc\xc6\xac\x93\x1b\xc2\xf9\x0c\x25\xce\xa9\x5d\x60\x04\x04\x3a\x41\xcf\xa9\x70\x1e\x64\x2a\xc1\xa9\xdd\xc0\x32\xc3\x77\xc3\xf0\x45\xc1\xc8\xf4\xa3\x26\xc2\x81\x12\x05\xc6\xc9\x5d\xa0\x07\x03\x3a\x40\xcf\xa5\x70\x7c\x65\x1a\xb9\xa9\xe2\x67\x59\xe1\xc5\x3f\x7c\x81\xd9\x98\x7a\x32\x46\x38\xff\x02\xa1\x9b\x2a\x78\x1d\x0c\x64\x7b\xb4\xfc\x09\x47\x6d\x26\xd0\x9a\x6c\x78\x18\x3e\x04\xc3\xd3\x7f\x81\x79\x98\x75\x8a\x87\x3b\xab\xa3\xc0\x38\x55\xf0\x06\x30\x40\xf6\x46\x2e\xd9\x93\x41\xd3\xc8\x4d\x15\x3f\xcb\x0a\x2f\xfe\xe1\x0b\xcc\xc6\x8c\x43\x47\xfc\xd1\x22\x18\xe1\x54\xe1\xeb\xa1\x00\xd9\x1b\x78\xe4\xcf\x31\x4d\xa2\x36\x55\xf4\x2c\x27\xbc\xe8\x87\x2f\x30\x17\xd3\x8f\x48\xf1\x07\xa1\x40\x7c\x53\x05\xaf\x05\x82\x74\x5e\xcb\xa1\x70\xe8\x6a\x0a\xb1\xc9\x1a\xcf\x30\x22\x68\x7c\xff\x45\xd5\xf9\xd3\xce\x73\x09\xa7\xb6\x20\x74\xd3\xb5\x5d\x0d\x03\xcd\xac\x5a\xfe\x84\x03\x62\x13\x68\x4d\x9e\x56\x19\x3e\x84\x69\xb5\xff\x42\x5f\x17\x1a\x4f\x56\xd3\xa7\x3d\x88\x57\x29\xdf\x0e\xe7\x2f\x31\x5b\x5c\x9e\x1d\x57\xb3\xde\xb8\x4b\x3e\xde\x26\xf0\xcb\xd6\xf1\xc6\x36\x14\x65\x74\x48\x9a\x97\x3b\x87\xb9\xfd\x4c\x78\x63\xdf\x77\x00\x51\xaa\xdf\x29\x25\xe0\xe4\x05\x9b\x7e\x6f\xf5\x86\xfc\xb9\x1c\xff\xec\xbb\xdd\xa6\x2e\x7b\x4f\x62\xe0\x76\x3b\xb0\xbb\x7f\x6c\x9a\x82\x13\xe8\xb8\x89\x3e\x31\x01\x3f\x73\x31\x84\xa0\x13\x9e\x6c\x57\x6c\x04\x77\xad\x6e\x8a\xa8\x6e\x84\x0d\x4c\x31\x33\xca\x2a\xf4\xa8\xb3\xca\xa6\x46\x19\x4b\x99\x4c\x75\x4c\x55\xc5\xe5\x75\xc5\x23\xa5\xd2\x41\xa5\x5d\x78\x03\x3f\x0f\xdd\x1f\x22\x99\xf0\x3e\xf4\x0d\x74\x3d\x65\xb8\x6f\xdf\x9d\x58\x50\x00\x0d\x5d\x67\x75\x30\x85\x48\x53\xf1\x6e\x9d\xe1\x49\x5f\x02\x4a\xde\xad\x1f\xd6\x4c\x03\x6d\x1f\xa8\x25\x1c\xdb\x19\xcf\x62\x28\xa1\x1e\x92\x18\xe9\xee\x42\x93\x5a\xdc\x73\x4a\x67\x9c\x5c\x62\x0e\xf9\x71\x47\x97\x98\x72\xe0\xe9\x83\xad\xee\x39\xa0\x0b\x69\x8e\xc5\x9b\xbf\x5e\x78\x73\xbd\xb7\xb7\xbb\x6e\x18\x4f\x72\x89\x67\x6b\xc6\x23\x5f\x45\x1c\xa5\x6e\x51\xa2\xdc\xf0\x5a\x18\x53\xb1\xfb\x5d\x78\x92\xac\xe5\x8e\x6e\x0e\xc5\x2f\x42\xfa\x23\x06\x74\x3c\x19\x74\x4c\x5a\x14\x8b\x57\x6a\xd8\xf3\x5d\xe3\x79\x28\x2f\xf4\x3e\x42\xda\x27\x9f\xd9\x1a\x66\x86\xbe\x00\x3c\x63\xca\xdd\x3e\x63\x5b\x1a\x27\x51\x5a\x9c\xb4\x67\x98\x28\xc5\xf1\xb1\x6e\x32\x38\xf9\x14\x5f\x3a\xb3\x49\x08\x2d\x8f\x51\x8c\x1c\x80\x28\x7b\x76\xb4\x3f\x43\x48\xca\x8e\x45\x85\xd5\x7c\x45\x9f\x52\xe8\xde\x51\xe0\xeb\x9f\x59\x6f\x61\x45\x50\xaa\x43\xf1\xa5\x51\x83\xb0\xe2\xbb\xd8\x8c\xdf\x8c\x34\x75\x55\x66\x1c\xba\xd4\x4b\xcf\x74\xf6\xb6\x83\x26\x36\x10\x80\x06\x9a\x36\xa0\x90\xcb\x58\x8c\x1d\xae\xba\x89\x9a\xe4\x60\x89\xb9\x3e\x44\x29\x7a\xef\x2f\xbd\x40\x12\x16\xff\x49\x56\x4f\x9a\x13\x2d\x1a\xee\xb8\x4d\x30\xb6\x78\xc2\xed\xc7\x08\x31\x25\x78\xa0\x60\x3b\x52\xa1\xcc\x4c\x8d\x7e\xa0\x67\xb9\xfb\xc9\x49\xc6\xf8\xf4\xc0\xa0\x34\x9a\x17\x25\x9d\x6e\x42\x59\x98\x2b\xb2\x2f\x5e\xda\x3f\x35\x6d\xc5\xc3\x68\x4d\xf5\xd6\xad\xc7\xd0\xcd\x52\xfd\x02\xea\xb2\xd3\x20\x9b\x27\xc0\xb2\x33\x7b\xf6\xf8\x87\xe8\x80\xb5\x80\xa1\x4b\xfb\xcf\xbd\x66\x63\x56\xa8\x5a\xf0\xdf\xb3\xe2\x17\xe5\x47\xb1\x9c\x79\xb5\x8f\x79\xb4\x0f\xe4\x5f\x3f\x20\xae\x7d\x91\x41\x98\x75\xe6\xf0\x6d\x1a\x5a\xb2\xd5\xb1\x45\xcd\x77\xf5\xc0\x3e\x80\x90\x23\xfe\x35\xd3\xc3\x88\xb3\xba\x38\xa1\x5a\xbd\x64\x76\xfe\xea\x3f\xb8\xd1\xde\x04\xd7\xac\x23\x30\xf1\xb8\xea\xdf\xa7\x9f\xb7\xe6\x59\x8b\xcf\xe1\x3f\x3d\x8b\xca\xf6\xf4\xa0\xde\xf3\x51\xb1\xd4\x4d\x9e\x7f\x97\x3c\x14\xb0\xee\xe8\x2e\x8c\x75\x19\xbf\x99\x35\xd3\x57\xb9\xb1\x20\x0d\x50\x3a\x2a\xe1\x11\x4a\x6e\x07\xb9\x7b\xd4\x3c\x23\x94\x0b\x89\x0f\xb8\x17\x02\x94\xcb\xf9\xf1\x01\x3c\xe3\x12\x7e\x35\x71\x05\xbf\x02\x16\xf0\x9c\x3c\x41\x07\xdf\x07\x5e\x36\xb8\x73\x5c\x52\xcc\xfe\x0b\x4c\x50\x9a\x1c\x31\xfa\xb7\xe1\xc4\x89\x50\x61\x19\xec\xf3\xdb\x70\xad\x11\xc8\xb0\x53\xf9\x85\x9e\xd4\x9d\x31\xd3\x0a\x5a\x87\xf2\x58\x93\xc3\xb9\xff\x0a\xb8\x5f\xaa\xfc\x29\x80\x9e\xe9\xf2\x48\xac\x26\xa7\x91\x50\x6b\x1b\x15\xf8\x0f\xce\x77\xac\x6e\xc8\x01\x0a\xba\xc6\x25\xd3\xca\x3e\xaa\xdc\x0c\x45\xf5\x63\x65\xf1\x56\x82\x7b\x7b\x7b\x7b\x4b\x43\x3b\xfd\xf9\xe2\x3e\xd4\xd3\xab\xdb\x50\x30\x2e\x15\x3b\x4a\xb6\x87\x94\x21\x5f\x80\x09\x2e\x85\x9e\x27\xe4\x78\xc0\x2a\xde\x85\x6f\x84\xf4\xe1\xda\x85\x85\x7a\x01\xbd\x22\xee\xdf\x8d\x05\x22\x68\xb2\xd5\x2c\xa3\x0d\x88\xf9\xf5\xa6\x7a\x4d\x68\x89\x86\x5f\x2c\x28\x96\x81\x2c\x2e\xf3\x52\xd0\xb0\x18\x54\x2f\x07\x59\x36\xc7\xe3\xe6\x6c\xc8\x70\xe8\x55\xdb\xb3\x8e\x1d\xb2\xf4\xb4\x60\xfe\x1a\x0f\x7e\x31\xa8\x77\x36\xa8\xf9\x63\x65\x1a\x6c\xbe\xbf\x16\xd1\x2d\x9b\xa2\x48\x9b\xa4\xd4\x8e\x1f\x66\x35\xb0\xf5\x54\x37\xa8\x86\x01\x3b\x06\x4f\x8f\x51\x96\xa4\xd8\x6e\x46\x65\x99\x22\xb7\x7e\xa9\x1b\x94\x2d\x9c\xdf\xa5\x49\xfe\xf9\x8f\xd1\xe1\x27\xf2\xf7\xbf\x15\x79\xb3\x70\xee\xdf\xfc\x84\x4e\x05\x72\xfe\xfd\x0f\xf7\x6f\x16\xce\x9f\x8b\x7d\xd1\x14\xb8\xf4\x7f\xa0\xf4\x09\x35\xc9\x21\x72\xfe\x84\x1e\x11\xfe\xf6\xdb\x2a\x89\x52\xfc\xe9\x4f\x45\x53\x38\x3f\x45\x79\x8d\x4b\xef\xdf\xfc\x98\xec\x51\x17\x16\x1f\x0a\xeb\x28\xaf\xdd\x1a\x55\xc9\x11\x57\xf8\x2d\x66\xc2\xf9\x3d\x79\x2b\xf2\x5f\xb3\xe2\x6f\x49\x07\xd7\xd3\x05\xcb\x7e\x7a\xc9\xf6\x45\xda\x15\x12\x7a\x1c\x38\x13\x26\xee\x5f\xa7\xae\xb2\x28\x95\x77\x0d\xd6\x9e\x72\x6e\xe3\x2f\xf3\x0d\xcf\x8c\xb3\x85\xe3\xaa\x43\x7d\xf1\x8e\xdb\x6c\xe0\x4b\xa1\x38\x42\x8a\x1a\xbc\x90\xc5\x2b\x13\x32\x35\x30\x8c\x93\x14\x88\x24\xf9\x21\x5f\xcc\x5f\x74\xe6\xab\x43\x78\xba\xf7\x4a\x3b\x3c\xe3\x2c\xac\x88\xa9\xab\xf3\x2e\x02\x8b\x43\xaa\xb2\xf0\xaa\xf0\x56\xac\xe6\x2c\xa3\xaa\xea\x2b\x2a\x14\x1c\x50\xe7\xfe\x50\xd8\x72\xd7\xf3\x38\xdc\x9a\x5f\xae\xf9\xb0\x37\x4b\x86\x37\x5c\x0a\x72\xa2\x83\x29\xee\x59\x29\x5e\x31\xa2\x4a\x46\xa6\xea\xf1\x2d\xae\xda\xa5\x1c\x90\xe4\x21\x0e\x5b\x80\xc5\xfe\x97\xd6\x2d\xd3\xe8\x80\x32\x94\x37\xff\xfb\xd3\xfd\x9b\xa6\x28\xef\xdf\xfc\x2c\x05\x66\xd7\xfd\xb3\x05\x10\x56\xda\x36\x6b\xe4\xac\xc4\xe5\x34\x65\x20\xee\x5e\x6e\x13\x69\x08\x0f\xd9\x8f\xce\x8c\x70\x66\x90\xb6\x6f\x6c\x26\xf8\x9e\x05\xeb\xad\x30\x5c\x90\xb5\x8f\x99\x31\x52\x0d\x90\xad\xa8\x30\x22\x66\x6b\xe9\x0e\x04\x58\xf9\xb2\x5e\x1b\xd7\x5a\x41\x67\x77\x16\x2c\xd8\x77\x82\xc0\x0a\xdf\x0d\x42\xf6\x37\x4d\x47\x00\xfd\xd1\x2d\x34\x0d\x3d\x42\x33\xd2\x18\xd9\xec\xea\x4d\xd3\x77\x9a\x4b\xcd\xb6\x53\x46\x12\x6c\xaf\x08\xf7\xf9\x54\xe8\xed\x05\x2e\x92\xe1\x25\x0e\xde\x3d\x1f\xcf\xcb\xb2\xd2\x06\x16\xea\x06\x61\x63\x0d\x33\x33\x88\x6b\x4d\x53\x7e\x0c\x61\x2d\xe6\x1e\x3d\x2b\x64\x4e\xcf\xe6\xe8\x3e\xc3\x81\x7d\x4f\xf0\x9c\xf0\xfd\x00\x3c\x86\x27\x28\xbe\xba\x33\x88\xbb\x04\x75\x45\xcf\x4c\x92\xe7\xa8\x1a\x23\x72\x14\x71\x30\xac\x10\x75\x0f\xb1\x5b\xbe\x66\xa2\x8c\xe0\x98\x1f\x7c\x29\xca\xf1\xd8\x82\xf9\xc9\x3a\x45\xac\x69\xa3\x59\x5d\x8e\x2d\xc6\x0e\xd7\x7f\x2f\x32\xff\x7b\x91\xf9\x7a\x8b\xcc\xaf\x1a\xbf\xe5\x07\xd0\x59\xab\x55\x5f\xb6\x7d\xa1\x18\xa4\xf3\xf4\x94\x19\x43\x28\x7e\x88\x8e\x8d\x61\x84\x03\x9c\xbd\xf2\x5a\x97\xf2\x34\xae\x75\xfb\x02\xd3\x5a\x57\x3a\xbc\x12\x0a\x93\x02\x83\xd9\xf9\x81\x9b\x97\x2c\x48\xfc\x00\xae\x79\x49\xb4\xc2\xa5\x89\x84\x84\xa8\x97\x82\x22\x3f\x0f\x4d\xa0\x3c\x61\x41\xb0\x64\x66\x07\xe5\x62\x58\x52\xe2\xd0\x82\x77\xa2\x21\x33\x58\x67\x34\x8b\x09\x7e\xcf\xe6\x9d\x7b\x0d\x84\xe1\x85\x59\xc8\xeb\xd8\xe3\x17\xf2\x7c\x66\x21\xa5\xda\x74\xeb\x68\x7b\xc5\x19\x88\xfc\x00\x2c\xe7\x61\xc5\x61\x16\x39\xa1\x38\xd0\xa5\x58\x3c\x8d\xb5\x7a\x66\x5e\xed\x55\x4e\xe2\xd9\x7e\xf5\xc3\x75\x1b\xd0\x7b\xdc\xb2\xdf\x52\xf7\xc4\x66\x58\x6a\x1f\xd0\x0a\x46\xff\x68\x72\x5d\x1b\xed\x33\x35\x43\xa5\x86\xac\xf7\xa2\x63\x54\xf0\x5e\xb8\x0b\x88\x4a\x3d\xa4\xfe\x85\xbd\x22\x8e\x54\x7e\x90\x5d\x18\x4b\x0b\x26\x10\xb5\xd7\x28\x99\xb8\xad\x47\x0f\x76\x86\xda\xb9\xb1\x54\x29\xa9\x21\x96\x3a\x05\xb5\x83\x51\xaa\x7e\x9b\xe5\x15\x1a\xa2\x57\xaa\x61\xd2\xee\x73\xfa\xcf\xe8\x09\x05\x8a\x69\x4b\xfb\x90\x6e\x99\x5b\xac\x55\xc4\x1c\xf4\x8c\xd3\xa2\x58\x3a\x00\x1b\xa4\xc7\x2d\xfe\x0f\x12\xcc\xe8\xbe\xea\x9a\xcf\xb9\xaf\x7c\x5e\x6e\xf5\x58\x23\xfe\xa3\xfd\x48\xeb\x69\xfc\x00\x79\xb1\x17\x36\xf9\x1c\xab\xf6\x5a\x21\xb2\x3c\x21\xd0\x13\xf6\xfe\xae\x42\xad\x59\x7f\xd7\x72\x74\x0a\x8d\xb0\x1c\x9b\x72\x1b\x98\x91\xd9\xe7\x5e\xd7\xda\x7b\xbb\x46\x70\x23\x93\x1f\x43\x52\xf8\x49\x95\x5a\x92\x5f\xb7\xb1\xf7\x11\x74\x6f\xd1\xf5\xba\xaf\x1b\x20\x68\x8f\xff\xbb\xd6\x09\x02\xc1\x84\x18\xb3\x58\x8d\x56\x0c\x38\x34\xac\x3c\x5a\x3d\x3c\x10\x38\x24\x8e\x2e\x1e\x6b\x94\x6a\x8e\x07\xf0\x15\x97\xdc\x81\x9e\xf1\xcc\x56\x53\x3c\x1e\x1e\xfa\x4b\x2f\x4e\x19\xe5\xee\x0b\xb5\x72\x50\x39\x8f\x93\x0d\xd3\xe8\x8f\xee\xea\xce\x06\x43\x38\x39\xbd\x85\x3c\xad\x14\x45\xd5\x1d\x5e\x40\x3f\x68\x8e\xb1\x8d\x38\xad\x5f\x49\x1c\x1c\x7a\x31\x17\xae\xd8\x10\xde\x6e\xba\x43\x79\xbf\x25\x8b\x75\xf7\x18\x1d\x90\xfb\x94\xd4\xc9\x3e\x49\xc9\x96\x0d\x73\x1e\xda\xf4\xdd\x74\x2a\x79\x23\x26\x78\x53\x1f\x38\x9e\x5d\x75\x61\x47\x79\xc6\x99\x62\xa0\x67\x4c\x07\x89\x39\x10\x7a\x65\x6a\x21\x96\xbb\x39\x6a\x1b\xb9\xb4\xac\xd0\x93\x42\x97\x00\xe4\x04\x49\x77\x41\x88\x2f\xc7\xca\x70\xb3\xb8\xef\x2f\x6c\x09\x5f\xab\xf1\x1e\xa1\xee\xc4\xf6\xff\x22\xc7\x03\xd4\xc7\xb5\xc7\xef\x10\x6b\xb8\x25\x10\x6b\x84\xb8\x9a\x37\x32\x9b\x58\xb0\xe6\x9a\x78\x73\x15\xcc\x75\xc7\xc3\x81\x6e\x15\xae\xe4\x8c\x7d\xec\x96\x55\x51\xa2\x0a\x7f\xa2\x75\x3e\xce\x3d\x11\xae\xe3\x02\xd2\x14\xa0\x1a\xe9\x73\x40\x68\x46\x38\xdc\x21\x6a\x45\x10\xde\x97\x05\x6e\xfb\x08\xc8\x95\xbd\xb7\xb0\xac\x0b\x11\xf7\x3e\x6a\x7b\x62\xe8\x00\xc7\xab\xc9\xf8\x3e\x73\x4c\x9b\x5b\x62\x59\x9b\x69\x8b\xb5\x75\xc0\x33\x41\x55\xa4\xa4\x5f\x16\xd0\x07\xdc\xd1\xb6\xeb\x7b\x7e\x89\x22\x74\xe6\x65\x0f\x9a\xcf\x3b\x15\xdd\xcf\x52\x34\x17\xaa\x70\x49\x71\xf2\xce\x88\x94\x83\x5c\xd6\xa5\x3e\xe6\x0e\x69\xd3\x90\x86\xf4\x4c\x85\x12\xfa\x14\xfa\x34\xf6\xea\x2c\x4d\x19\xef\x8a\x82\x5f\xbb\xcc\x5a\x2a\x6d\xa2\xc0\xca\xcf\x9a\x04\x5f\xea\xfd\x07\x21\x5b\x17\x78\xea\x03\x64\x56\x8c\x4f\x29\xaa\x8e\x02\x63\x3c\x1b\x0d\x5a\x37\x39\x14\xb9\xb2\x8d\xe4\xab\x29\x8d\xef\xb0\x8b\x27\x9c\x44\x1c\x0a\x58\xc5\x0b\xbd\xb7\xce\x07\xb2\xdc\xea\xfe\xc9\x0b\xb7\x42\x25\x8a\x1a\x0b\x36\x55\x6f\xfb\x3f\x56\xe9\xfb\xfb\x37\x71\xd4\x44\x77\xa4\xe4\x43\xfd\x74\xfa\xbe\xcd\xd2\xc5\xdb\xd5\xa1\x7e\x3a\x39\x6d\x96\xe6\xf5\xa7\x77\x0f\x4d\x53\xde\x7d\xf8\xf0\xfc\xfc\xbc\x7c\x5e\x2d\x8b\xea\xf4\x21\xf0\x3c\x0f\x57\x7e\xe7\x1c\x93\x34\xfd\xf4\xee\x6d\xb0\x3a\x1e\x8f\xef\xba\x16\x7d\x7a\xb7\x7b\x47\xdb\x42\x7e\x7d\x4a\xd0\xf3\xef\x8a\xf6\xd3\x3b\xcf\xf1\x9c\x9d\xb3\x7b\xf7\x76\x85\xde\xae\x0e\x65\xd4\x3c\x38\xf1\xa7\x77\x7f\x0c\x97\x41\xe8\x78\xa9\xbb\x76\xba\xff\xfc\x65\xe8\xfa\xcb\xf0\xc7\x35\x2e\x5f\xa7\xc1\x32\x74\x83\x65\xf8\x63\x57\xed\x97\x77\x1f\x3a\x70\x4c\xfe\xed\x0a\xdd\xbf\xb9\xd1\xf7\xe9\x7f\x02\x01\x04\xcb\x2d\x11\x80\xbf\x0c\x71\xe3\x7f\x5c\xe1\xbf\xd7\x29\x6e\xb5\x83\x5b\x4e\xbe\xef\xd2\xb5\x4b\xfe\xb3\x92\x40\x92\xc7\xc9\x21\x6a\x8a\xaa\xd6\x9a\x76\xc1\x89\xe7\x8e\x62\x83\xbb\xb4\xe1\x6c\x4b\x3f\xc9\x6c\x6b\x9e\xda\xef\x9d\xf6\xf0\xad\x1c\x40\xea\x0b\xc9\xb3\x02\xc3\x8e\x29\xb4\x30\x62\xe4\x93\x26\xfd\xe6\x43\x8b\xfd\x6d\x32\x3d\x50\x9e\x86\x7d\xbe\xf1\x5c\xb9\x27\x9f\x2b\xe7\x8a\x86\x63\xa1\xc2\x98\x5e\x0d\xb7\xcd\xd9\x56\x08\xa5\x5d\x2b\xfa\x42\x62\x0b\xb1\xe0\xb1\x70\xdc\xf1\x00\x73\x9f\x4b\x9f\x3a\xb0\xaf\xb4\x89\x49\x8f\x83\x7b\xa6\x74\x7a\x43\x78\x41\x5d\x93\x7f\xde\x40\x35\x17\x6e\x5e\x65\x2a\x04\x3a\xd2\xde\x71\x1a\x61\xb9\x27\x27\x74\xab\xd2\x43\x54\x8e\xd9\x1a\xf4\xa3\xaa\xd7\xc6\x21\xe9\x63\xaf\x13\xbc\xb2\x32\x47\x20\x38\xdd\x27\xfd\x11\x08\x07\x3c\x5c\x09\x99\xd5\x1a\x46\x95\x70\xa9\x2e\x49\x74\xc1\xed\xfa\xb6\x8f\x57\x8b\x09\x44\x18\x37\xa3\x2a\x9a\xa8\x41\xef\x57\x1b\x2f\x46\xa7\xfe\xf4\xb5\xfe\x3b\x90\x62\xe9\x9a\x64\x97\x10\x31\xf3\x9c\x2c\x06\x5c\x87\x02\x31\xef\xbd\x4b\xb2\x3c\x08\x49\x29\x69\x5e\xfe\x6e\x78\x1c\x1e\x2b\x3c\x34\x48\x47\x29\xf7\x8b\x0c\xc9\x2b\x43\x21\x9a\xc2\x64\x6f\x59\x6e\x43\x39\xc5\x0c\xdf\x68\x31\x27\x8d\x1d\x08\x24\xbe\xe1\x10\xbc\xea\xd0\x81\x78\x9f\x69\x88\xa6\x06\x4c\xe6\x52\xb5\x22\x9e\x86\xd0\xb8\xf7\x56\xa3\x0f\xdd\xf5\x64\x0f\xd0\x04\xee\x0b\x39\xbd\x1f\x8e\x98\xb8\x81\xad\x40\xcd\xa4\xc8\x81\x4a\x35\xda\xfc\x9f\x86\xf7\xa5\xcc\xf1\xc5\x06\x84\x34\x2f\x29\x47\x83\xa0\xe9\x82\x77\x3e\x55\xf1\x4f\xfd\x9b\xb8\x13\x01\x64\x01\xd9\xaa\xfc\x8c\x59\x8c\x1f\x5b\x0b\xae\x6c\xec\x1b\xa0\xf1\x6e\xfc\xd8\x3b\x48\xfe\x32\xac\xc5\x94\x4e\xd0\xe7\x2f\x63\xa6\x3e\xec\x60\xef\xa3\x1a\x61\x51\x74\x24\xc4\x3e\x1c\xbe\xfe\x53\x92\x95\x45\xd5\x44\x39\x9b\x21\x16\xc3\x37\xfd\xc5\x52\x11\x14\x7f\x50\x42\x65\x49\x1c\xa7\x0a\x9a\xf4\x9b\x12\x96\x6e\x72\xc2\xfc\x76\xdf\xd4\xdc\xe2\x49\x51\x87\x80\xad\xa0\xc7\xa2\x6e\x78\xff\x15\x80\xdf\x9f\xf8\x77\x64\x95\xa9\x66\x00\xe0\x88\x81\x66\xf2\x65\x8f\x65\xbd\x33\x4e\xdf\x64\x92\x6a\x43\x5f\x18\x17\x1c\xe4\x65\x13\x1c\x0e\x8a\x86\x08\x2f\xb2\x02\xe0\xdd\xab\x37\xaa\xa6\x0c\xf0\x5c\x63\xc6\x52\xb9\x39\x22\x04\xfc\x4d\xdf\xa4\x70\x1d\xee\x37\x81\xaa\x49\xec\xeb\xa6\x00\x70\xb0\x8b\xb6\xeb\x50\xd9\xa0\x0e\x9a\x6f\x0e\x2d\x03\x1a\xc3\xd5\x86\xbe\xe8\x1b\xe2\xa3\x2d\x5a\xad\x15\x0d\x19\xdf\x09\x85\x20\xb7\x51\xb0\xdf\xa9\x5a\x81\x41\xb9\x26\x90\x02\x99\x7f\xa6\x9e\x54\x6c\xe0\xdc\xdf\x46\xbb\xbd\x82\x73\xee\xb9\x4d\xd0\x9b\x39\xf8\xde\x56\xc5\x3c\x85\xe6\xf8\xef\xcb\xe4\x26\xf0\xb5\xa1\x2f\xfa\x86\xc4\xab\x5b\xe4\x79\x8a\x86\xb0\x0f\x57\x42\xb0\x87\x55\xa8\x56\xa5\x0e\x98\x6b\x06\x2d\x92\x5b\xc1\xd5\x05\x3e\xe8\xdb\xb0\x8f\x03\x7f\xa5\x6a\x03\xf3\x02\xa4\x32\xa9\x9b\xaa\x09\x04\x96\x6b\x41\x57\x22\x37\x80\xad\x29\x97\x1b\xba\x20\x42\x1e\x0a\x95\x5d\xd0\xbf\xa4\x08\x3d\x81\xbc\x5e\x45\x6b\x4f\xdd\x01\xd5\x67\x41\xfc\xd5\x67\x50\xf8\x43\x3d\xa9\xd8\x30\x0a\xe2\xc0\x0f\x54\xe3\x97\x9c\x81\xd6\x8c\x81\xa3\x02\x8e\x4d\x87\xf9\x77\xe3\xf3\x7b\x20\x12\xc6\x3b\x92\x4f\x35\xd3\xbb\xe1\x6a\xc0\x71\x5a\xd4\x5e\x2e\xd7\x20\x60\xf6\x36\xd8\x92\x69\x48\xd8\x29\xde\xf4\xa0\x82\x06\xcd\xb8\x3b\xc8\x14\x4c\x43\xe1\xf1\xa2\xf4\xf4\xa2\xe3\xab\xd3\x63\x7e\x26\x61\x09\x40\x7d\x2c\xcf\x28\x1e\x01\x6e\x08\xfb\x19\x04\x22\x80\xd1\xd0\x9c\x06\x88\x5f\xf1\x40\xe9\xf3\x34\xc0\xe2\x2a\x83\x07\x57\xae\x30\x06\x70\x6e\x46\xe7\x81\x95\xb3\x79\x0f\xcc\xcc\xa2\xc2\x73\xa2\xaa\x19\xb4\x87\xe4\x67\x31\x31\x93\xbb\x62\x06\xeb\x81\xb9\x99\x83\x87\x55\xce\x1a\x43\x07\x49\xa3\xc7\x68\xad\x47\xb2\x83\xb5\x14\x9e\x84\x57\x59\xca\xa1\xb5\x8c\xb5\x12\xdb\x0a\xf6\x2d\x31\x48\x28\x1e\x3c\x2a\xf9\x5e\x51\x85\x32\x0d\xa0\x0a\x2a\xd4\x83\x41\xc6\x09\x4c\x6c\xc2\xe3\x30\xa7\x1f\xd1\xd1\x94\xed\x99\x25\x1a\xfd\xeb\x1b\x16\x94\x95\x46\x70\x0e\x75\xb3\x98\x78\xe2\x92\xe9\x9c\x28\xeb\xb9\x64\x4f\x0a\xdd\x58\x19\x00\x0f\x49\x75\x48\x11\x08\x1c\x7a\x6f\x75\x90\x65\x92\xa6\x0a\x38\x03\x4d\x0f\xe6\x15\x02\x21\xe7\xba\x8e\x49\xfb\x3a\xe7\xbf\x62\x37\x2f\x72\xe8\x15\x55\x88\x74\xec\x76\xb1\x20\x30\x40\xa4\x03\xe8\x82\x47\x9a\xb8\x12\x0c\x0c\x41\x69\xaa\x37\xc0\xdb\x83\x5d\x99\xba\xba\x2b\xc7\xbb\xc6\x72\x0d\xd8\x01\xf5\x5d\x2d\xc0\x91\x0f\x20\xe0\x31\x45\xad\xfa\x05\x21\x51\xf9\xb9\x7d\x33\xad\x6c\x15\x78\x99\xaf\x3a\xf4\x2c\x12\x99\x8a\xe9\x81\x1b\x6c\xb8\x19\x0d\xd2\xea\x50\xff\x74\x0a\x81\x61\x15\xc9\xa0\x4a\x00\x1c\xab\x19\x56\x1a\xc5\xe1\x80\x81\x4d\x50\x0d\xfb\xde\x8e\x4e\xbf\x64\x28\x97\x09\xdc\x99\xd4\x0c\x80\x1e\x75\xcd\x42\xdb\x38\xf8\x51\x35\xec\x94\x4e\xab\x76\x50\x3f\x28\x09\xe8\xb5\xcf\x46\xff\xec\x53\x63\xc6\x6e\x16\x4f\x57\xc2\x2c\x9e\xa7\x84\x59\x7c\xbe\x12\x66\xf1\x1c\x25\xcc\xe2\x39\x4a\x98\xc5\xe7\x28\x61\x16\x9f\xa7\x84\x59\x7c\x29\x25\xcc\xe2\xaf\xad\x84\xdc\x1b\x4e\x78\xc1\x31\x5d\x09\xd3\xd3\x3c\x25\x1c\xe0\xce\x50\xc2\xf4\x34\x47\x09\xd3\xd3\x1c\x25\xec\xa1\xe6\x29\xe1\x00\x3d\x53\x09\xd3\xd3\xa5\x94\x70\xec\x87\xaf\xa5\x84\xfc\x6b\x5f\xb1\xdb\xa6\xd3\xb5\xb0\x4d\xe7\x69\xe1\x00\x77\x86\x16\xb6\xe9\x1c\x2d\x6c\xd3\x39\x5a\xd8\x43\xcd\xd3\xc2\x01\x7a\xa6\x16\xb6\xe9\xa5\xb4\x70\xec\x87\x6b\x6a\x61\x59\x25\x7d\x6c\x71\x19\xbb\xe4\xaf\xe9\xaa\xd7\x81\xcd\xd2\x3e\x16\xf4\x0c\x05\xec\xd0\xcc\xd0\xc1\x0e\x70\x86\x1a\x32\x80\xf3\x34\x91\x45\x30\x53\x19\x3b\x14\x17\xd2\x47\xae\x67\xae\xa2\x92\x4b\x94\xed\x51\xec\x56\xa8\x2e\x8b\xbc\x1e\x8e\x6d\x99\xae\x32\xc9\xb7\x50\x87\xb7\x9d\xf9\x63\xe1\xca\x3b\x59\x22\x5d\xe3\x0b\xe6\xb0\x1b\x2e\xb1\x2f\x95\x90\xf3\xef\x0b\xa8\x6a\x42\x0e\x9d\x80\x9f\x48\x01\xf8\xa5\xd8\xff\x0d\x1d\x1a\xf0\xd3\x53\x12\xa3\x62\xde\xf1\x7f\xe0\xf5\x31\x75\x0e\x0c\x29\xdb\x8f\xdc\xe6\xc0\xdf\xbf\xdc\x0a\x37\x8e\xd9\xb3\x70\xeb\x60\xb9\x0b\xb7\xfe\x7a\xf5\x56\x8d\xc3\xdf\xe8\x71\x84\x9b\x65\x10\x6a\xe0\xd7\xfb\x97\x95\x06\x7c\xab\x83\xf5\xf7\x2f\xbe\x06\x96\x7b\x98\x9d\x1c\x89\x1d\xcc\x81\x22\xdb\xb3\xa8\xff\xc6\x2a\x0c\xee\xee\x25\x73\xd3\x53\xf4\x26\x0a\x50\x2d\xbe\x01\x6e\x85\x9e\x50\x55\x23\x6d\x43\x86\x4a\xe6\x06\xc1\x55\xa5\x86\x99\xc9\x0a\xf5\xac\x1a\x6a\x24\xfe\x5c\x45\xa5\x40\x72\x7c\xd8\x19\xa4\xa1\xfa\xcc\x20\xcd\x0b\x25\x5a\xfa\x49\x8d\x18\xaa\x20\xf0\xab\x10\xd5\xc8\x98\x56\x46\xa6\x6a\x0c\xb1\xe3\x10\x10\x95\x9f\xe1\x86\x70\xab\xbe\x32\x28\xc9\xf9\x2b\x4f\x4c\xf0\x45\xec\x14\x49\xaa\x01\xb2\x8c\x81\x14\xe1\xd4\x11\xa9\xaf\x44\xea\x6b\x90\xfa\x4a\xa4\x5d\x52\x0f\x89\x57\x26\x01\x08\x88\x76\xc8\x05\x62\x42\xec\x2b\x11\xfb\x5a\xc4\x20\xc7\xc2\xd1\xfb\xee\x69\x7b\x51\x20\xe4\xbc\x7e\xf7\x45\x20\x00\x3f\x39\x0e\x54\x85\xa9\xa1\x3c\x06\x69\xe1\x72\x2b\x4a\x52\x45\x98\x4e\x77\xfa\x19\x24\x45\x3f\x99\xa8\x41\xd5\x60\x5a\xf4\x81\x7f\x90\x18\xad\x6b\xa4\xc6\xa5\x0a\xb0\x21\x1a\x91\x0d\x05\x90\x66\x9c\xd4\x4d\x95\xec\x1f\x1b\x64\x49\x96\xe2\x52\x9e\x7d\x23\x17\xf2\x40\x45\x61\xdf\x90\x13\x89\x29\xb2\x28\x98\xc8\xc8\x1a\x42\x89\x00\x2a\x22\x93\x40\xe6\x76\x80\xaa\xc1\x1d\x9a\xd7\x92\x51\xeb\x05\x4b\x84\x3f\x62\x29\x92\x81\x8f\x58\x0a\x84\xcc\xe7\x30\xfb\x7e\xa9\x50\x73\x78\x50\xf5\x4c\xf7\x51\x47\x08\xac\xc3\xd2\xd1\x99\x0a\xb2\x60\xd7\xd8\x0b\x0e\x83\x9d\x1e\xa8\x6d\x05\x43\x4c\xa9\x0d\x56\xe6\x82\x27\x04\x6a\x04\x43\x4b\xa7\x15\x16\xf6\x82\x27\x06\x5b\x0b\x86\x9a\xc2\x64\x08\xe4\x8c\x06\x83\xa7\x0a\x9a\x0b\x86\xa8\xda\x66\x80\x74\x4d\x16\x63\xd4\x18\x48\x37\x39\x9d\xd1\xe8\xe7\x48\xd4\xa4\xa1\x35\x4a\x8f\xe4\x0d\x18\x81\x52\x97\x58\xb6\x1b\x0a\xd0\x52\x64\x84\xbe\x53\x2e\x46\x18\x0a\xd0\x00\x60\x49\x68\x46\x40\x47\xc3\x46\xfd\x09\x25\x59\xf7\x59\x3a\x4a\xe5\x67\xa8\x68\x35\x9f\xd0\x00\xd5\x9e\x25\xa3\xd3\xfb\x8e\x92\x49\xe9\x09\x1d\x85\x2d\x64\x29\xe9\x0d\x62\x47\xcb\x6c\x0f\x69\x1f\x41\x2a\xc7\xf7\x92\x46\xe7\x3a\x5a\x6a\x85\x33\xed\x93\x76\x3d\x9c\xb1\xe1\x1e\x4b\x0f\xcf\xc2\xc7\xeb\x03\x2f\x3d\x11\xd6\xd1\x9b\xe2\xea\xd9\x39\x7b\x22\x35\xc9\xe3\x9b\xec\xf3\x4d\xf0\xfa\xe0\xa6\xda\xd0\xd7\x3b\x7f\xd3\xdc\x3f\x91\x8b\xd1\x59\xb3\xf2\x02\x0d\x7e\xa0\x88\x9d\x75\x06\x2d\xdd\x41\xa3\x43\x08\xb5\x40\x29\x45\xb3\x5f\x68\xe9\x19\x8a\x54\x47\xf7\xd0\xc6\x41\xd4\xbb\x88\x22\x6e\xd6\x4f\xb4\xf3\x14\x75\xbe\x22\x88\xdd\xd7\x60\xf7\xb5\xd8\x7d\x3d\x76\xde\x73\xb4\xf3\x1d\xf5\xde\xa3\x82\x82\xaf\xa1\xe0\x1b\x28\x28\xda\x20\x39\x92\x19\x3b\x3f\xda\x79\x93\x13\xfc\x49\x0d\xd9\x61\xb2\xb4\x71\x2b\xad\x1d\x4b\x0d\x41\x76\xe6\xb4\xf4\x2f\x2d\x3d\x4c\x0d\x51\x6e\xe1\x68\xeb\x68\x4e\x73\x35\x35\xd4\xd9\x05\xe4\x04\x8f\x73\x92\xcf\xd9\x93\xe7\xbc\x1b\x95\x56\xe9\x96\x5c\x96\xce\xa7\x82\x1e\xa4\x4e\xea\x85\x97\x95\x17\xaa\xa0\xa4\xd0\x23\xed\xf2\xcb\xc2\x1d\x55\x50\xe3\xd7\x61\xf6\x5e\xa9\x95\x5f\xaa\xec\x3b\x66\x35\x66\xed\x9e\xda\x38\xa8\x3c\x41\xa3\x11\x32\xf9\xa9\xd6\x9e\xaa\x92\x2e\xa4\x36\x7a\x87\xd5\xd2\x65\x55\x52\x54\xa8\x8f\xd1\x73\xb5\xf2\x5d\x95\x54\x55\x76\xc8\xec\xc2\x4e\x71\x62\x95\xe4\x15\x86\xc8\xca\x97\x9d\xe0\xcd\x6a\xd4\x0b\xd6\x68\xb3\x53\x6b\xe7\xd6\xf2\x84\x3b\x97\x26\x63\x7c\xdb\x09\xde\xad\xc9\xbf\x85\x49\xc1\xe3\xc7\xe8\xe6\xda\x39\xba\x30\x49\x68\xe8\x18\xfc\x5d\x1b\x8f\x17\x26\xa6\x18\x35\x66\xc7\xd7\xec\xfa\xc2\x04\x95\x76\xd7\xc6\x03\xb6\xf1\x81\x55\xfd\x08\x2b\xaa\x85\x2b\x6c\xe1\x0c\xdb\x1f\xda\x24\x44\xb3\xf8\x0a\x1e\x71\x16\x5f\xd3\x23\xee\x9a\xf4\x95\x3c\xe2\xa1\xa9\x5f\xd5\x23\xce\xe2\x4b\x7a\xc4\xe4\xac\xef\x85\x3d\x62\xda\x82\x2b\x7b\xc4\x59\x7c\x39\x8f\x38\x8b\x2f\xe9\x11\xf7\xd8\x2f\xe3\x11\x67\xf1\xa5\x3d\xe2\x91\xc2\x15\x3c\x62\x4c\xec\x2b\x78\xc4\x59\x7c\x65\x8f\x18\x1b\xa3\xab\x7b\xc4\x59\xfc\x35\x3d\xe2\x2c\xfe\x6a\x1e\xb1\x52\xab\x2e\xe4\x11\x2b\xd4\xe9\x02\x1e\xb1\x5a\x8f\x2e\xe1\x11\x63\x05\xba\xb6\x47\x4c\xfa\xee\xba\x1e\xb1\x52\x5d\x2e\xec\x11\x2b\xd4\xe6\x82\x1e\xb1\x5a\x7d\x2e\xe9\x11\x6b\xec\xd0\x35\x3c\x62\xb5\x21\xba\x8e\x47\xac\xd1\xe8\x0b\x7a\xc4\xb8\xd5\x57\xf2\x88\x95\xe3\xe7\x72\x1e\xb1\x62\xe8\x5c\xc6\x23\x56\x8f\x9a\x0b\x79\xc4\x3a\xbb\x7b\x41\x8f\x58\xa3\xa8\x57\xf0\x88\xb9\x1b\x64\xdd\xe8\x38\x5d\xc1\x23\x4e\x4f\xd7\xf4\x88\xbb\x26\x7d\x25\x8f\x78\x68\xea\x57\xf5\x88\xd3\xd3\x25\x3d\x62\x72\xf1\xf0\xc2\x1e\x31\x6d\xc1\x95\x3d\xe2\xf4\x74\x39\x8f\x38\x3d\x5d\xd2\x23\xee\xb1\x5f\xc6\x23\x4e\x4f\x97\xf6\x88\x47\x0a\x57\xf0\x88\x31\xb1\xaf\xe0\x11\xa7\xa7\x2b\x7b\xc4\xd8\x18\x5d\xdd\x23\x4e\x4f\x5f\xd3\x23\x4e\x4f\x5f\xcd\x23\x56\x6a\xd5\x85\x3c\x62\x85\x3a\x5d\xc0\x23\x56\xeb\xd1\x25\x3c\x62\xac\x40\xd7\xf6\x88\x49\xdf\x5d\xd7\x23\x56\xaa\xcb\x85\x3d\x62\x85\xda\x5c\xd0\x23\x56\xab\xcf\x25\x3d\x62\x8d\x1d\xba\x86\x47\xac\x36\x44\xd7\xf1\x88\x35\x1a\x7d\x41\x8f\x18\xb7\xfa\x4a\x1e\xb1\x72\xfc\x5c\xce\x23\x56\x0c\x9d\xcb\x78\xc4\xea\x51\x73\x21\x8f\x58\x67\x77\x2f\xe8\x11\x6b\x14\xf5\x0a\x1e\x31\xff\x9c\x05\xa1\xda\xa6\x57\x70\x89\xdb\xf4\x9a\x2e\x71\xd7\xa4\xaf\xe4\x12\x0f\x4d\xfd\xaa\x2e\x71\x9b\x5e\xd2\x25\x26\xaf\xa0\x5c\xd8\x25\xa6\x2d\xb8\xb2\x4b\xdc\xa6\x97\x73\x89\xdb\xf4\x92\x2e\x71\x8f\xfd\x32\x2e\x71\x9b\x5e\xda\x25\x1e\x29\x5c\xc1\x25\xc6\xc4\xbe\x82\x4b\xdc\xa6\x57\x76\x89\xb1\x31\xba\xba\x4b\xdc\xa6\x5f\xd3\x25\x6e\xd3\xaf\xe6\x12\x2b\xb5\xea\x42\x2e\xb1\x42\x9d\x2e\xe0\x12\xab\xf5\xe8\x12\x2e\x31\x56\xa0\x6b\xbb\xc4\xa4\xef\xae\xeb\x12\x2b\xd5\xe5\xc2\x2e\xb1\x42\x6d\x2e\xe8\x12\xab\xd5\xe7\x92\x2e\xb1\xc6\x0e\x5d\xc3\x25\x56\x1b\xa2\xeb\xb8\xc4\x1a\x8d\xbe\xa0\x4b\x8c\x5b\x7d\x25\x97\x58\x39\x7e\x2e\xe7\x12\x2b\x86\xce\x65\x5c\x62\xf5\xa8\xb9\x90\x4b\xac\xb3\xbb\x17\x74\x89\x35\x8a\xfa\xda\x2e\xf1\xf2\x98\x16\x51\xc3\xbc\x99\x4e\xfe\xbe\x23\x2f\x6b\xc1\x0f\xc2\xe0\xea\xcc\xcb\xf2\xb4\x7e\x57\xa2\x04\x18\xdf\xe9\xa3\xf5\x15\x4f\x7e\x9b\xef\x35\x63\x6c\x35\x9b\x3d\x5f\xc3\xf2\xb8\x9c\xa6\x50\x5c\xf6\x72\x35\xe7\x12\x1c\xfb\xcc\xa0\xb2\x01\x53\xce\xa2\x63\xbc\x59\x3c\xa7\x15\x59\x3c\xaf\x15\xc2\x93\xc5\xf3\x5a\x21\x9c\x1f\x20\x9a\x73\x9a\xd3\x8a\xf4\x34\xaf\x15\xc2\x9b\xb7\xf3\x5a\x21\xc6\x7c\x30\xe2\x36\x9d\xd3\x8c\x36\x9d\xd7\x0c\xe1\xd1\x54\x8b\x66\x2c\x1f\x6b\x92\x92\x24\x45\x87\xc6\x8d\x86\x57\xae\x68\x56\x3e\xe6\xe3\x9d\x13\xc9\xaf\x30\xba\x59\xf1\x8b\xb1\x92\xfe\x3b\xc0\xc5\xf8\xd0\x05\xc8\x06\x30\x63\x01\x7c\x80\xb5\x6a\x73\x25\x43\x05\x99\xdd\x51\xe0\x20\xbb\x90\xf0\x65\x76\xe1\x5a\xb5\xb9\x92\xa1\x42\xc7\x6e\xff\xea\x23\x23\xda\xf1\x21\x48\x55\x1b\x07\xa0\xee\xa5\x48\x11\x8c\x96\x02\x80\xfd\x63\x8b\x78\xa6\x6f\x92\x83\xf8\x02\x23\x2d\xd5\x01\xf6\x8f\x5c\xaa\x1e\xbf\xd4\x02\xf7\x2f\x3c\xaa\x5e\x7e\xd4\x02\x1f\x93\xb6\xcf\xc5\x32\x42\x76\x85\xfa\x96\x26\x87\xcf\x2f\x22\x5c\xaf\x0f\xf4\xab\xd0\x73\xac\x44\xe4\xef\x74\x92\xc3\x94\xc7\x1c\x2f\x02\x4b\xe2\x1b\x96\x5c\xca\x73\x38\xc9\xb9\xb7\xf2\x04\xe4\x6c\x4a\x15\x08\xff\xe4\x3c\xea\x0c\x89\xdf\xd4\x8f\x25\x6e\x52\xed\xbc\x7f\xaf\x12\xcb\x8d\x53\x54\xce\x7b\x51\x18\x37\x43\x1e\x51\xf2\xe7\x28\x02\xb5\x7c\x3f\x8a\x9f\xb9\x62\x46\x4c\x1c\xb3\x81\x27\xe4\x8f\xad\xdc\x22\x4f\x5f\xb4\xcf\x86\xf6\xe6\x5e\xc8\x83\xee\xf3\xf9\xac\xf9\xe4\xee\x77\x8e\xdb\x7f\x07\xde\x60\x75\x9c\x2e\x7f\x79\x85\x0e\xcd\x7b\x6f\xe1\xd0\xff\x75\xe9\x72\x49\x2e\x22\x97\x38\x25\x7d\x34\x57\xf1\xee\x28\x65\xde\x25\x69\xda\xa2\x7d\x8a\xee\xba\xdc\xdf\x0b\x07\xf8\xc4\xe4\x72\x13\x07\x27\xdb\xca\x21\xfd\x7b\xdf\xcc\xa1\x60\x6c\xc7\x53\x52\x27\xfb\x14\x31\x0d\x19\x93\xc6\xf3\xcc\x57\x59\x94\x8e\xec\x3e\x44\x31\x93\x84\x96\x64\xa9\x27\x45\x77\x8e\xe7\x90\x54\xbb\x15\xca\x86\x14\x39\xd5\x69\x1f\x31\xb2\x59\x7a\xdb\xf0\x06\x1a\x33\x1d\x0a\x18\x25\x41\xe4\x43\xd8\x7c\x1d\x32\x26\x07\x0f\x8b\x8f\x20\x5a\x81\xd8\xb4\xbc\x31\x53\x06\x8b\x50\x65\xbd\x9f\xdd\x20\xe4\xd2\xf4\x06\xe1\x5b\xb8\x5e\xe8\x71\xf5\x14\x59\x7e\x9e\xdd\x2d\x8f\x6f\xab\xc2\xe7\x7b\x3c\x42\xdf\x53\x61\x1c\x27\x16\x46\x6d\xa0\xaa\x0f\x43\x63\x86\x6c\xcb\x30\xf5\x87\xa1\x35\x7d\x45\x45\x73\x1e\x86\xe6\xf4\x15\xb7\x2a\x8c\x43\x7b\xd8\x37\x7c\xe1\xaa\x63\x83\x58\xbd\x87\xea\x66\x8c\x9c\xb2\xa8\x75\x0d\xb2\xca\x1e\xf8\xea\x26\x56\xf0\xfa\xf2\x89\x25\xc1\xac\x37\x3d\xef\xe9\x59\x09\xf3\xc0\xc3\x30\x74\x9e\xc0\xa7\xc6\x9e\xc0\xfe\x86\x09\x3c\xc1\xb2\x84\x11\x0f\x59\xf9\x7a\x4b\x08\xbe\x08\x9a\x35\xae\xb7\xc0\x3f\x5f\xf8\xea\x9a\x8c\x81\x59\x45\x41\x5a\x01\x44\x97\x2f\x30\xdb\x2b\xe8\x68\x93\x05\x66\xa9\x82\x94\x26\x57\x60\xd6\xef\xaf\x0c\xed\x56\x27\xfb\xca\x1a\xd7\xa7\x5c\xf9\x40\xeb\x35\x80\x15\x05\x6c\x05\xc0\x5e\x06\x1a\xd0\xbd\x82\xe6\x20\x09\x0d\x6c\xaa\x20\x4b\xe5\xa1\x81\x74\x03\x51\x2a\x1a\xa1\x04\x94\xc1\x00\x12\x8a\x46\x26\x01\x65\x2e\x80\x65\xa2\x11\x09\x4c\x71\x14\x89\x46\x22\x30\xd1\x5e\x22\x6a\x81\xac\x78\x81\xf8\x6a\x71\xac\x28\x73\x2b\x59\x1c\xbe\x5a\x18\x2b\xca\xd7\x0a\x12\x86\xaf\x16\x05\x4c\x6d\xc8\x3a\xaa\x16\x04\x4c\x90\x66\x1a\x55\x8a\x61\x2d\x88\x41\xa7\x17\x6b\xca\xda\x1a\x10\x84\x4e\x2f\xd6\x94\xb3\x35\x28\x0a\x9d\x5e\xc0\x14\x07\x61\xe8\xf4\x02\x26\x4a\xc5\xa1\xd1\x8b\x90\x17\xc8\x4a\x2d\x8e\x90\x32\x17\xca\xe2\x58\xa9\x85\x11\x52\xbe\x42\x48\x18\x2b\xb5\x28\x60\x6a\xbd\x28\x56\x6a\x41\xc0\x04\x3b\x41\xa8\xc0\x86\x04\xb2\xe3\xb2\x1a\xac\x46\xa7\x8f\xf2\x45\xa8\xaf\x99\x3f\x4a\x3a\x7f\x94\xad\x08\xa3\x9b\x40\xca\xbd\x8a\x92\x76\x06\x29\x53\x15\x31\xcd\x14\x52\xf6\xd6\x75\x6c\xbc\xda\xb2\x96\x74\x0e\x29\x5f\x04\x28\xe3\x24\x52\xd2\x49\xa4\x6c\x45\x48\xf3\x2c\x52\xee\x55\x54\x2d\xa6\x91\x32\x55\x11\x36\xce\x23\x65\x6f\x66\x19\xd1\x68\x24\x13\x50\x1e\x03\x50\x32\x1a\xc1\x04\x94\xbf\x40\x21\x18\x8d\x5c\x14\x34\xcd\x73\x49\x99\xaa\xc8\x9a\x26\x93\xb2\xb7\xb9\x83\x54\x7c\xb5\x4c\x56\x94\xbf\x15\x94\xd2\x41\x2d\x91\x15\x65\x6d\x05\x4a\xc4\x57\xcb\x43\x41\xcf\x34\xa1\x94\xa9\x8a\xa4\x7e\x46\x29\x7b\x83\x3b\xca\x42\xa7\x21\x6b\xca\xdd\x1a\x92\x86\x4e\x43\xd6\x94\xb9\x35\x2c\x0f\x9d\x86\x28\x68\x9a\x67\x95\x32\x55\x91\x35\x4d\x2b\x65\x6f\x7d\x07\xa9\xac\xd4\x32\x09\x29\x7f\x21\x20\x93\x95\x5a\x22\x21\x65\x2d\x04\x25\xb2\x52\xcb\x43\x41\xcf\x34\xb5\x94\xa9\x8a\xa4\x7e\x6e\xc9\xdc\x5c\x58\xa2\xbb\xfa\x35\x7a\xde\x2f\x98\x73\x60\x95\xee\xea\x97\xe9\x79\xbf\x60\xce\xc1\x85\xba\xab\x5f\xa9\xab\x28\xf7\xa2\x71\xf5\x8b\x75\x15\xf1\x4e\x3e\x5a\x60\x37\x0f\x24\x19\xe9\x44\xd4\x2f\xa0\xf3\x00\x14\x91\x4e\x42\xfd\x02\x3a\x0f\x14\x12\xd2\x09\x48\x41\x97\x11\x90\x4e\x3e\x0a\xd2\x83\x7c\x34\xe2\x11\x96\xef\xae\x66\xfd\x9e\xf7\x4b\xea\x1c\x58\xc1\xbb\x9a\x25\x7c\xde\x2f\xa9\x73\x70\x11\xef\x6a\x56\xf1\x2a\x9a\x83\x60\x34\x0b\x79\x15\x59\x2a\x16\xf5\x5a\x3e\x5f\x8b\x42\xd1\xea\x4c\xbf\xb8\xce\xd7\x90\x58\xb4\x3a\xd3\x2f\xae\xf3\x35\x2c\x18\xad\xce\x28\xe8\x8e\xa2\xd1\xea\x8c\x82\x74\x2f\x1c\x9d\xce\x08\x4b\x7b\x57\xb3\xb6\xcf\xfb\xe5\x76\x0e\xac\xee\x5d\xcd\xf2\x3e\xef\x97\xdb\x39\xb8\xc0\x77\x35\x2b\x7c\x15\xcd\x41\x30\x9a\x45\xbe\x8a\x2c\x15\x8b\xda\x16\x8f\x21\xb7\x5e\x2c\xca\x90\x5b\xb7\x49\x48\x79\x14\xe1\x3a\xc9\x28\x61\xab\x11\xb6\x95\x61\x2b\x43\xb0\x6f\xaf\xa5\xdc\xcb\x47\x09\x9e\x6a\x89\x77\x22\x52\x00\x9b\x8e\x30\x64\x6e\x9d\x8d\x67\x86\x15\xb1\xb6\x7e\xbb\x38\x23\xc7\x0f\xb0\x43\x82\xff\x78\x01\x40\x41\xbf\x69\x00\xaf\x58\xf0\x16\x02\x87\x5d\xa8\x01\xc1\xde\x48\x5f\xe1\x4d\x0d\x18\x52\x23\x0b\xa0\x63\x35\xc0\x63\x08\x5f\x12\x17\x9c\xc1\x9f\x15\x9a\xcf\x32\xed\x83\x42\xd3\x22\xa9\x58\x24\x2d\x84\x44\xe7\x74\xf1\x02\xd4\xf2\xa2\xf5\xbf\x78\x31\x6a\xd9\xd1\xb8\x62\x9c\x30\x03\x59\x98\x26\x59\x06\x2c\xff\x01\x2c\x4b\x93\x28\x03\x96\xf7\x40\x25\x4a\x93\x24\xb5\x9c\xe8\x3c\x36\x5e\x90\x5a\x66\xd4\xce\x1b\x27\xc7\x95\x28\x47\xdf\x20\xc5\x15\xcb\xfb\x0a\x92\xa2\x6f\x90\xe1\x8a\x65\x7b\x05\xcb\xd0\x37\x48\x50\xcb\x85\xda\xc7\xe3\xe5\xa7\x65\x44\xe5\xee\x71\xd2\x5b\x4b\xd2\x33\x6a\xe1\x9a\xe5\x7c\x0d\xca\xcf\xa8\x85\x6b\x96\xf1\xb5\x42\x82\x46\x2d\xd4\x72\xa2\xf3\x0a\x79\x29\x6a\x99\x51\x3b\x88\x9c\x1c\x43\x51\x8e\x2b\x83\x14\x43\x96\xf7\x10\x92\xe2\xca\x20\xc3\x90\x65\x3b\x84\x65\xb8\x32\x48\x50\xcb\x85\xda\x8f\xe4\xe5\xa7\x65\x44\xe5\x52\xf6\x28\x4a\x6e\x2a\x52\x45\x2d\x87\xda\xec\x44\x5c\xbe\x40\xb0\xda\x99\xb8\x64\x67\xe2\xb2\x05\xe1\xf5\x53\x71\xb9\x37\x73\x60\x98\x8b\xcb\xd4\xcc\x84\x76\x32\x2e\xb9\x79\x47\x1f\xec\xe4\x25\xe7\xb3\x7c\xfb\xb0\xe4\xb4\x58\xd8\xe9\xb8\x6c\x41\x2c\x36\xf3\x71\xb9\x37\x73\x63\x35\x21\x97\xa9\x99\x21\x8b\x19\xb9\xe4\x26\x20\x6d\x8c\x94\x17\x68\xc0\x36\x21\x50\x08\xd4\x24\xcf\x80\x65\x3f\x50\xca\xd3\x24\x4e\x3d\x2f\x36\xb3\x72\x99\x9a\xd9\x31\x4f\xcb\x25\x37\x1b\x69\x42\xab\xbc\x28\x57\x2c\xfb\x2b\x50\x94\xbe\x41\x90\x2b\x96\xf3\x95\x42\x90\xbe\x41\x8c\x7a\x3e\xcc\x53\x73\x99\x9a\x59\x31\xcd\xcd\x25\x37\x15\x69\x23\xb2\xbc\x10\xd7\x2c\xf3\x6b\x58\x88\x46\x7d\x5c\xb3\xbc\xaf\x55\x62\x34\xea\xa3\x9e\x17\x9b\xf9\xb9\x4c\xcd\xec\x98\x27\xe8\x92\x9b\x97\x34\x81\x5c\x5e\x94\x21\xcb\x7e\x08\x8a\x72\x65\x10\x64\xc8\x72\x1e\x2a\x04\xb9\x32\x88\x51\xcf\x87\x79\x92\x2e\x53\x33\x2b\xa6\x59\x9a\xac\x71\x72\xc9\xff\x73\x2d\x1c\xc0\x9c\xf3\xba\x72\xd0\x05\x74\x2d\x7c\xc0\x9c\xf3\xba\x72\x85\x17\xe8\x5a\xb8\x81\x06\x8e\xf4\x31\x62\x7e\xe9\x63\x60\x4a\x17\x2f\xe6\x45\x1b\x00\xa2\x35\x4a\x96\xf3\xc2\xf2\x40\x21\x59\xa3\x60\x39\x2f\x2c\x0f\x94\x82\x35\xca\x55\xcf\x8f\x36\xb4\x2c\x88\x55\xcf\x92\x26\xcc\xcc\x4b\x55\xf2\x0d\x5d\x93\x73\x98\x73\x7e\x59\x0e\xba\x87\xae\xc9\x3f\xcc\x39\xbf\x2c\x57\x78\x88\xae\xc9\x45\x34\xf0\xa2\x89\x48\x0b\xd2\xd4\xb3\xa3\x8c\x4e\xf3\xb2\x5c\xcb\xb2\x34\x6b\x28\xe7\xa1\xe5\x6b\x58\x9a\x66\x0d\xe5\x3c\xb4\x7c\xad\x92\xa7\x59\x43\xf5\xfc\x68\x03\xd9\x82\x4c\xf5\x2c\x69\x82\xda\xbc\x54\x25\xbf\xd1\x35\x39\x8e\x39\xe7\xb3\xe5\xa0\xeb\xe8\x9a\x7c\xc7\x9c\xf3\xd9\x72\x85\xf7\xe8\x9a\xdc\x47\x03\x2f\x9a\xf8\xb7\x20\x4d\x3d\x3b\xca\x58\x38\x27\x4b\xf6\x7a\xa7\x3a\x24\xce\x0b\x93\x86\x97\x87\x26\xc8\x38\x54\xe1\x71\x5e\x9e\x0c\x9e\x56\x81\x47\x19\x2a\xe7\x45\x6a\xc1\x91\x3a\x6c\xce\x4b\xd5\x82\x29\x55\x08\xdd\xfe\x12\x5d\xe6\x66\xf1\x94\x38\x3a\xae\x3d\xb4\x4f\x06\x35\xc5\xd1\x19\xf0\x16\x02\x37\xc6\xd1\x4d\xf4\xcd\x71\x74\x13\x0b\x86\x38\x7a\x16\x4f\x8f\xa3\x63\x18\x96\xe9\x59\x71\x74\x06\x49\x0b\x21\xb1\x8c\xa3\x9b\x78\xb1\x8d\xa3\x9b\xd8\xb1\x8a\xa3\x67\xf1\xe4\x38\x3a\x06\x61\xf9\x9f\x13\x47\x67\x70\xb4\x10\x0e\xbb\x38\xba\x89\x13\xcb\x38\xba\x89\x19\x9b\x38\x7a\x16\x4f\x8c\xa3\x63\x00\x96\xf7\xe9\x71\x74\x06\x43\x0b\x61\xb0\x89\xa3\x9b\xb8\xb0\x8a\xa3\x9b\x18\x31\xc7\xd1\xb3\x78\x72\x1c\x1d\x83\xb0\x9c\xcf\x89\xa3\x33\x38\x5a\x08\x87\x5d\x1c\xdd\xc4\x89\x65\x1c\xdd\xc4\x8c\x4d\x1c\x3d\x8b\x27\xc6\xd1\x31\x00\xcb\xfb\xf4\x38\x3a\x83\xa1\x85\x30\xd8\xc4\xd1\x4d\x5c\x58\xc5\xd1\x4d\x8c\x98\xe3\xe8\xec\x54\x64\x11\x47\x1f\xa7\xb1\xf2\x05\x82\x35\xc5\xd1\x19\xf8\x16\x84\x37\xc6\xd1\x8d\x1c\x98\xe3\xe8\x46\x26\x0c\x71\x74\x76\xde\xb1\x8e\xa3\x8f\x33\x57\xf9\x02\x61\xb0\x8b\xa3\x33\x58\x5a\x10\x8b\x65\x1c\xdd\xc8\x8d\x6d\x1c\xdd\xc8\x90\x55\x1c\x9d\x9d\x80\x6c\xe3\xe8\xe3\x0c\x56\xbe\x40\x08\xac\xe2\xe8\x0c\x92\x16\x44\x62\x17\x47\x37\xf2\x62\x19\x47\x37\xb2\x63\x13\x47\x67\x67\x23\xbb\x38\xfa\x38\x99\x95\x2f\x10\xb8\x45\x1c\x9d\x41\xd1\x82\x28\x6c\xe2\xe8\x46\x3e\xac\xe2\xe8\x46\x56\xcc\x71\x74\x76\x2a\xb2\x8d\xa3\x8f\x73\x59\xf9\x02\x21\xb0\x8a\xa3\x33\x48\x5a\x10\x89\x5d\x1c\xdd\xc8\x8b\x65\x1c\xdd\xc8\x8e\x4d\x1c\x9d\x9d\x97\xec\xe2\xe8\xe3\xb4\x56\xbe\x40\xe0\x16\x71\x74\x06\x45\x0b\xa2\xb0\x89\xa3\x1b\xf9\xb0\x8a\xa3\x1b\x59\x31\xc7\xd1\xb3\x78\x4e\x1c\x9d\x40\xb1\x6b\x8c\x99\x71\x74\x16\x4f\x0b\xe2\xb1\x8d\xa3\x9b\x39\xb2\x8e\xa3\x9b\x99\xb2\x8b\xa3\x63\xc8\xc9\x71\x74\x02\xc4\xb5\x63\x56\x1c\x9d\x45\xd3\x82\x68\x2c\xe3\xe8\x66\x7e\x6c\xe3\xe8\x66\x96\xac\xe2\xe8\x18\x70\x62\x1c\x9d\x80\x70\x6d\x98\x11\x47\x67\x91\xb4\x20\x12\xab\x38\xba\x99\x17\xbb\x38\xba\x99\x1d\x8b\x38\x3a\x06\x9b\x1c\x47\x27\x40\x5c\x0b\x66\xc5\xd1\x59\x34\x2d\x88\xc6\x32\x8e\x6e\xe6\xc7\x36\x8e\x6e\x66\xc9\x2a\x8e\x8e\x01\x27\xc6\xd1\x09\x08\xd7\x86\x19\x71\x74\x16\x49\x0b\x22\xb1\x8a\xa3\x9b\x79\xb1\x8b\xa3\x9b\xd9\xb1\x88\xa3\x0b\xb9\xf4\xac\xe2\xe8\x14\x86\x6d\xc2\xac\x38\x3a\x8f\xa7\x55\xe0\xb1\x89\xa3\xdb\x71\x64\x15\x47\xb7\x63\x6a\x56\x1c\x9d\x7b\xc6\x2d\x73\xd3\xd3\x94\x38\x3a\xae\x3d\xb4\x4f\x06\x35\xc5\xd1\x19\xf0\x16\x02\x37\xc6\xd1\x4d\xf4\xcd\x71\x74\x13\x0b\x86\x38\x7a\x7a\x9a\x1e\x47\xc7\x30\x2c\xd3\xb3\xe2\xe8\x0c\x92\x16\x42\x62\x19\x47\x37\xf1\x62\x1b\x47\x37\xb1\x63\x15\x47\x4f\x4f\x93\xe3\xe8\x18\x84\xe5\x7f\x4e\x1c\x9d\xc1\xd1\x42\x38\xec\xe2\xe8\x26\x4e\x2c\xe3\xe8\x26\x66\x6c\xe2\xe8\xe9\x69\x62\x1c\x1d\x03\xb0\xbc\x4f\x8f\xa3\x33\x18\x5a\x08\x83\x4d\x1c\xdd\xc4\x85\x55\x1c\xdd\xc4\x88\x39\x8e\x9e\x9e\x26\xc7\xd1\x31\x08\xcb\xf9\x9c\x38\x3a\x83\xa3\x85\x70\xd8\xc5\xd1\x4d\x9c\x58\xc6\xd1\x4d\xcc\xd8\xc4\xd1\xd3\xd3\xc4\x38\x3a\x06\x60\x79\x9f\x1e\x47\x67\x30\xb4\x10\x06\x9b\x38\xba\x89\x0b\xab\x38\xba\x89\x11\x73\x1c\x9d\x9d\x8a\x2c\xe2\xe8\xe3\x34\x56\xbe\x40\xb0\xa6\x38\x3a\x03\xdf\x82\xf0\xc6\x38\xba\x91\x03\x73\x1c\xdd\xc8\x84\x21\x8e\xce\xce\x3b\xd6\x71\xf4\x71\xe6\x2a\x5f\x20\x0c\x76\x71\x74\x06\x4b\x0b\x62\xb1\x8c\xa3\x1b\xb9\xb1\x8d\xa3\x1b\x19\xb2\x8a\xa3\xb3\x13\x90\x6d\x1c\x7d\x9c\xc1\xca\x17\x08\x81\x55\x1c\x9d\x41\xd2\x82\x48\xec\xe2\xe8\x46\x5e\x2c\xe3\xe8\x46\x76\x6c\xe2\xe8\xec\x6c\x64\x17\x47\x1f\x27\xb3\xf2\x05\x02\xb7\x88\xa3\x33\x28\x5a\x10\x85\x4d\x1c\xdd\xc8\x87\x55\x1c\xdd\xc8\x8a\x39\x8e\xce\x4e\x45\xb6\x71\xf4\x71\x2e\x2b\x5f\x20\x04\x56\x71\x74\x06\x49\x0b\x22\xb1\x8b\xa3\x1b\x79\xb1\x8c\xa3\x1b\xd9\xb1\x89\xa3\xb3\xf3\x92\x5d\x1c\x7d\x9c\xd6\xca\x17\x08\xdc\x22\x8e\xce\xa0\x68\x41\x14\x36\x71\x74\x23\x1f\x56\x71\x74\x23\x2b\xe6\x38\x7a\x7a\x9a\x13\x47\x27\x50\xec\x1a\x63\x66\x1c\x9d\xc5\xd3\x82\x78\x6c\xe3\xe8\x66\x8e\xac\xe3\xe8\x66\xa6\xec\xe2\xe8\x18\x72\x72\x1c\x9d\x00\x71\xed\x98\x15\x47\x67\xd1\xb4\x20\x1a\xcb\x38\xba\x99\x1f\xdb\x38\xba\x99\x25\xab\x38\x3a\x06\x9c\x18\x47\x27\x20\x5c\x1b\x66\xc4\xd1\x59\x24\x2d\x88\xc4\x2a\x8e\x6e\xe6\xc5\x2e\x8e\x6e\x66\xc7\x22\x8e\x8e\xc1\x26\xc7\xd1\x09\x10\xd7\x82\x59\x71\x74\x16\x4d\x0b\xa2\xb1\x8c\xa3\x9b\xf9\xb1\x8d\xa3\x9b\x59\xb2\x8a\xa3\x63\xc0\x89\x71\x74\x02\xc2\xb5\x61\x46\x1c\x9d\x45\xd2\x82\x48\xac\xe2\xe8\x66\x5e\xec\xe2\xe8\x66\x76\x2c\xe2\xe8\x42\x06\x5e\xab\x38\x3a\x85\x61\x9b\x30\x2b\x8e\xce\xe3\x69\x15\x78\x6c\xe2\xe8\x76\x1c\x59\xc5\xd1\xed\x98\x9a\x15\x47\xe7\x13\x89\x64\x6e\x9b\x4e\x09\xa4\xb7\x29\x13\xc8\x96\x41\x4d\x81\x74\x06\xbc\x85\xc0\x8d\x81\x74\x13\x7d\x73\x20\xdd\xc4\x82\x21\x90\xde\xa6\xd3\x03\xe9\x6d\xca\x04\xaf\x65\x04\x76\x81\x74\x06\x49\x0b\x21\xb1\x0c\xa4\x9b\x78\xb1\x0d\xa4\x9b\xd8\xb1\x0a\xa4\xb7\xe9\xe4\x40\x7a\x9b\x32\xe1\x6b\x19\xde\x2a\x90\xce\xe0\x68\x21\x1c\x76\x81\x74\x13\x27\x96\x81\x74\x13\x33\x36\x81\xf4\x36\x9d\x18\x48\x6f\x53\x26\x84\x2d\x43\x5b\x04\xd2\x19\x0c\x2d\x84\xc1\x26\x90\x6e\xe2\xc2\x2a\x90\x6e\x62\xc4\x1c\x48\x6f\xd3\xc9\x81\xf4\x36\x65\xc2\xd7\x32\xbc\x55\x20\x9d\xc1\xd1\x42\x38\xec\x02\xe9\x26\x4e\x2c\x03\xe9\x26\x66\x6c\x02\xe9\x6d\x3a\x31\x90\xde\xa6\x4c\x08\x5b\x86\xb6\x08\xa4\x33\x18\x5a\x08\x83\x4d\x20\xdd\xc4\x85\x55\x20\xdd\xc4\x88\x39\x90\xce\x4e\x45\x16\x81\xf4\x71\x1a\x2b\x5f\x20\x58\x53\x20\x9d\x81\x6f\x41\x78\x63\x20\xdd\xc8\x81\x39\x90\x6e\x64\xc2\x10\x48\x67\xe7\x1d\xeb\x40\xfa\x38\x73\x95\x2f\x10\x06\xbb\x40\x3a\x83\xa5\x05\xb1\x58\x06\xd2\x8d\xdc\xd8\x06\xd2\x8d\x0c\x59\x05\xd2\xd9\x09\xc8\x36\x90\x3e\xce\x60\xe5\x0b\x84\xc0\x2a\x90\xce\x20\x69\x41\x24\x76\x81\x74\x23\x2f\x96\x81\x74\x23\x3b\x36\x81\x74\x76\x36\xb2\x0b\xa4\x8f\x93\x59\xf9\x02\x81\x5b\x04\xd2\x19\x14\x2d\x88\xc2\x26\x90\x6e\xe4\xc3\x2a\x90\x6e\x64\xc5\x1c\x48\x67\xa7\x22\xdb\x40\xfa\x38\x97\x95\x2f\x10\x02\xab\x40\x3a\x83\xa4\x05\x91\xd8\x05\xd2\x8d\xbc\x58\x06\xd2\x8d\xec\xd8\x04\xd2\xd9\x79\xc9\x2e\x90\x3e\x4e\x6b\xe5\x0b\x04\x6e\x11\x48\x67\x50\xb4\x20\x0a\x9b\x40\xba\x91\x0f\xab\x40\xba\x91\x15\x73\x20\xbd\x4d\xe7\x04\xd2\xdb\x94\x0d\x5b\x03\x38\x2c\x03\xe9\x2c\x9e\x16\xc4\x63\x1b\x48\x37\x73\x64\x1d\x48\x37\x33\x65\x17\x48\xc7\x90\x93\x03\xe9\x6d\xca\x06\xae\x01\x14\x76\x81\x74\x16\x4d\x0b\xa2\xb1\x0c\xa4\x9b\xf9\xb1\x0d\xa4\x9b\x59\xb2\x0a\xa4\x63\xc0\x89\x81\xf4\x36\x65\x83\xd7\x00\x02\x9b\x40\x3a\x8b\xa4\x05\x91\x58\x05\xd2\xcd\xbc\xd8\x05\xd2\xcd\xec\x58\x04\xd2\x31\xd8\xe4\x40\x7a\x9b\xb2\x81\x6b\x00\x85\x5d\x20\x9d\x45\xd3\x82\x68\x2c\x03\xe9\x66\x7e\x6c\x03\xe9\x66\x96\xac\x02\xe9\x18\x70\x62\x20\xbd\x4d\xd9\xe0\x35\x80\xc0\x26\x90\xce\x22\x69\x41\x24\x56\x81\x74\x33\x2f\x76\x81\x74\x33\x3b\x16\x81\x74\x21\x6f\xbf\x55\x20\xbd\x4d\xf9\xb0\x35\x88\xc3\x22\x90\xce\xe3\x69\x15\x78\x6c\x02\xe9\x76\x1c\x59\x05\xd2\xed\x98\x32\x07\xd2\x97\x34\x25\x3d\x8a\xdd\x34\xc9\x3f\xdf\xdd\x45\xc7\x21\xa5\xbf\x22\x93\xab\x2a\x79\xae\x4d\x9e\x5b\x9a\xc4\x37\xc9\x1b\x54\xb9\xe8\x09\xe5\x4d\xcd\xe4\x3d\x3d\x14\x79\x83\xf2\xe6\xce\xb9\x7f\x73\xff\xa6\xc3\x19\x1d\x3e\x9f\xaa\xe2\x31\x8f\xdd\x43\x91\x16\xd5\x9d\x98\x35\xf4\x66\x78\x26\xbe\x41\x6d\xe3\x66\x45\x5e\x90\xbc\xa9\x34\xbf\x7d\x91\x37\xee\x31\xca\x92\xf4\xe5\xce\xf9\xe9\xdf\xfe\x58\xe4\x85\xfb\x67\x74\x7a\x4c\xa3\x6a\xe1\xfc\x11\xe5\x69\xb1\x70\xfe\x58\xe4\xd1\xa1\x58\x38\xbf\x2f\xf2\xba\x48\xa3\x7a\xe1\xdc\xbf\xf9\x31\xd9\xa3\x2a\xc2\x6d\xc7\x9f\x8b\xfb\x37\xb8\xf0\xf7\xc5\x63\x95\xa0\xca\xf9\x13\x7a\xc6\x05\x23\x29\xe0\xcd\x7a\xc2\xcc\xdf\x1e\xeb\x26\x39\xd2\xb4\xb8\xa4\x24\x4a\x93\x53\x7e\xe7\xf4\x1f\x54\x80\xcf\x55\x44\x33\xf7\x02\x99\x60\x95\x50\x5d\x96\x5b\x10\x8e\x7c\x50\xc1\x35\xd5\x63\x7e\x88\xfa\xdc\xcf\x60\xa2\x5d\x52\x6f\xfc\x82\xd2\x34\x29\xeb\xa4\xd6\x64\xda\x65\xf0\x8f\xa9\xdc\x59\x19\xc8\xd9\xdc\x19\x10\x26\x8f\x3b\x0b\x03\xa4\x72\x67\x80\x0e\x28\x1f\x54\x97\x85\xa2\xe5\xd3\x93\x03\x10\x24\x75\xc6\xe5\xa2\xd7\x37\xa1\x1f\xa0\x3d\x24\x97\x8f\xde\xd0\x12\x11\x96\x6d\x8e\xb9\x41\xf6\x4f\x35\x75\xe3\x24\x9e\xdb\xaa\x2c\x9e\xdf\xaa\x2c\x7e\xcd\x56\x71\x17\x67\x3a\x4d\x3b\xcd\x6d\x55\x7a\x9a\xdf\xaa\xf4\xf4\x9a\xad\xe2\xb7\x31\x09\xaa\x36\x9d\xdb\xac\x36\x9d\xdf\xac\x36\x9d\xdd\x2c\x2a\x97\xe2\x19\x55\x87\xa8\x46\xcc\x90\x6c\xaa\x28\xaf\x8f\x45\x95\xdd\x39\xe3\x67\xd5\x80\x7e\x2c\x4b\x1d\x82\xf1\xb3\xd2\x22\x44\x65\xd2\x44\x69\xf2\x8b\x02\x03\xf3\x1d\xca\x23\x8f\x27\x8f\x67\x92\xa8\xd7\x4d\x47\x29\x32\xc5\x77\xce\xca\xf3\xac\x40\x7b\x29\x72\xc0\xfd\x17\x03\x02\x6a\xf6\x65\xf8\xb5\x99\xf8\xbe\x48\x63\x00\x72\x6b\x07\x09\x72\x4d\x3f\xa8\xc0\x89\x40\x0f\x0c\x5c\xdd\xbc\xa4\xe8\xce\xa1\xe5\xca\x29\x0f\xcf\x22\x1d\x14\x9d\xe8\xbf\x39\x1e\x8f\xca\xea\x65\x95\x64\x51\xf5\xc2\x03\x78\xde\x76\x0f\xc2\x44\x1c\xd0\xdd\x03\x9e\xc9\x16\x8e\x50\xca\xa4\x76\x1f\x11\x86\x9b\xfd\x4a\xc9\x44\x8d\x0e\x45\x1e\x4b\x6c\x6c\x0e\xdb\x70\x1b\xab\xd9\x18\xc0\x04\x46\xc6\x72\x80\x95\xf5\xed\xfa\x18\xae\xd5\xac\x3c\x1e\x0e\xa8\x16\x60\x82\x5d\xb4\x5d\x87\x1a\x46\x3a\x20\x91\x0d\x5a\x0a\x30\xe1\xdf\x6e\x6e\x03\x75\x1f\x26\xf9\xb1\x10\x00\xb6\x51\xb0\xdf\xa9\x39\xc0\x10\x02\x79\x52\x04\xf5\xc5\x71\xb3\xd9\xaa\x05\xf0\x1c\x55\x79\x92\x9f\x44\x0d\x3a\xf8\xde\x56\x4d\x9e\x02\x09\x1c\xf4\xa5\x00\x13\xfb\x68\xb7\x87\x87\x0e\x81\x8c\xa3\xfc\xd4\x8f\x99\x1e\x24\x3e\xac\x42\x5d\x27\x74\x30\x02\x0b\xb4\x10\xe0\x20\xda\xfa\x71\x10\x29\x39\x60\xec\xd4\x20\x84\xdd\xf1\xf6\x18\xa9\x19\x20\x20\x02\xfd\xae\x0c\x20\x7f\xd8\xc7\xab\x38\xd2\x08\xa0\xfa\xcc\x03\xac\xd6\xab\x68\xed\xe9\x9a\x5f\x7d\x96\x1a\x5f\x7d\x06\xb5\x2f\xf0\xd7\xfe\x46\x49\x7b\x5f\xc4\xc2\x40\x0c\xfc\x20\x0c\x6e\x95\x00\xd9\x63\x83\x62\xcb\xa1\x4b\x49\xa4\xd1\xe1\xf3\x90\x62\x1f\x76\x48\x96\xe1\x8d\xde\xc8\x81\xf0\x41\x18\x2e\x9c\xf1\x1f\x2d\x96\x87\x24\x66\xdc\x9b\x3b\xc7\xfb\xe0\x39\xd1\x47\x06\x23\x99\xe1\xca\xa8\x42\x74\x5a\xee\x86\xf5\x43\x14\xe3\xb5\x7b\x5e\xe4\x48\xe1\x5a\x89\x70\xfb\xa2\x8a\x51\xd5\x39\x71\x6c\x27\xa3\x43\xd1\x39\x47\x2e\x46\xc6\x4c\xad\xe3\x97\x8e\x8e\x5a\x90\x15\x8a\xa8\xa2\x3c\x17\x55\xdc\xfd\x7d\xe7\x90\x1f\x2e\x2e\x11\x57\x16\xa4\x16\x76\x2d\xd4\x95\x58\xf7\x01\xd5\x88\x1f\x05\x49\xfe\x80\xaa\x04\xf4\x1d\x9e\x92\x3a\xd9\xa7\xb4\x19\xe4\x8f\x24\x4d\x9a\x97\x3b\xa7\xff\x00\xc0\x24\xb9\x12\xaa\xf3\x9a\xd4\xde\x46\x59\x25\x39\xe5\xed\x3b\xe2\xbd\x7f\x77\x77\xb7\x47\xc7\xa2\x42\xfd\x5f\x8c\x07\x0e\xf4\x9d\x28\x19\xdc\x4d\xad\xb6\x06\x59\xd3\x45\x77\x79\xd1\xbc\x5f\xee\x9b\xfc\x86\x43\xcd\x76\xd9\x63\x1e\xa3\x2a\x4d\xa8\x7e\x74\x60\xfb\x7d\xf5\x97\x26\x69\x52\xf4\xb3\xc0\x18\xe3\xab\x3b\xef\xef\xdf\x38\x51\xd3\x54\xef\x49\xcd\x1b\xe7\xfe\xcd\x0d\xf5\xdf\x09\x92\xb2\x42\x3d\x14\xe7\x2c\x96\x15\x72\x65\xcf\x74\x04\x22\x02\xd9\xa7\xc5\xe1\xf3\x7f\x3c\x16\xcd\x80\xa3\x57\x4b\xbf\x6c\x9d\xba\x48\x93\xd8\xf9\x26\x8a\xf7\xe1\x3e\xfe\xd8\x6f\x7a\x9c\x50\xa7\x51\x6e\x92\xd7\x49\x8c\xee\x9c\xe8\xa9\x48\xe2\x11\x77\x53\x11\xd4\x49\x76\x1a\x37\x4a\x4c\x30\x25\x01\x79\xe8\x22\xd7\x0f\x43\x90\xb5\xa8\xca\x87\x28\xaf\xef\x9c\x15\xa5\xfe\x9c\xc4\xc5\xf3\xf0\xf7\x17\x10\x88\xa1\x46\x64\x2a\x11\xfb\x0d\xae\xd1\xd7\xae\x93\x5f\x30\x3b\x0c\xc2\xd1\xd4\x39\x8e\xe8\x10\xc1\x2b\x7a\xdc\x5b\x51\x92\x8f\xdd\x67\x07\x96\x47\x4f\xfb\x68\x80\x89\x93\xba\x4c\xa3\x17\xc6\x86\x74\xb5\xf6\x51\x7c\xd2\xf5\x8e\xe7\x79\xac\x73\x11\x0d\xe3\xa6\xaf\x8d\x0d\x50\x1a\x95\x35\xba\x73\xfa\xdf\x14\x8e\x09\x81\x6d\xe2\x05\xfb\xd7\xc3\x80\x4c\xb2\x68\xf2\x1a\x92\xc3\xe4\x76\xe4\x51\xec\x34\x0f\x0b\xb0\x38\xd6\x34\x2b\x46\x28\x40\x1b\x1d\xfa\x71\x3a\x14\x0d\x11\x5c\x95\xe7\xa2\x2b\x8a\xe5\xa2\x07\x14\xc5\x60\x5d\xa2\x17\xdf\xd3\x9f\x92\x84\xbb\xe5\x08\x61\x5a\x12\xe9\x92\x20\xed\xf1\x6b\x78\x36\x20\xfc\x72\x9f\x7f\xf8\xee\x1b\xa7\x2e\x1e\xab\x03\xfa\x63\x54\x96\x49\x7e\xfa\xf7\x3f\xff\xf8\x69\x5f\x14\x4d\xdd\x54\x51\xb9\x3c\xd4\xf5\x32\x8b\x4a\xe7\xbb\x0f\x6f\x16\x6f\x3e\x7c\x70\x88\x7b\x90\x26\x79\xe3\xc6\x49\x4d\x78\x29\xab\xa2\x44\x55\xf3\xd2\x4d\xb7\x69\x52\x37\x0b\xa7\x3e\xd4\xf5\x87\x18\xeb\x46\xe5\x3e\x45\x55\xd2\x35\x1a\x1d\xa3\xc7\xb4\xc1\xc6\xf5\xc3\x07\xe7\xa7\xdf\xff\xf4\x93\xf3\xe7\x7f\xfb\xc9\xc9\x92\x36\x21\x45\xa4\xf8\xb7\x8f\x4d\x91\x45\x78\xa6\xaf\x50\x5d\x16\x79\x9d\x3c\x21\x32\x71\x92\x71\x55\x0f\xf5\x7e\x4c\x0e\x28\xaf\x51\xdc\x59\x41\xe7\x8f\x7f\xf8\x9f\xce\xfb\x87\xa6\x29\xeb\xbb\x0f\x1f\x4e\x49\xf3\xf0\xb8\x5f\x1e\x8a\xec\x43\xf3\xbc\xaf\x3f\x54\xc7\xfa\xc3\x3e\x2d\xf6\x1f\x9e\x76\xcb\xf6\xc3\x8f\x7f\xf8\xfd\xbf\xfe\xe9\xa7\x7f\xbd\xa1\x7c\xfc\xbe\xc8\x8f\xc9\xe9\xb1\x33\xaa\xb4\xec\x77\xd8\x4b\x1d\x88\xde\xe7\xdf\x56\xc7\xda\xdd\x47\x35\x72\x3b\x17\x89\x8c\x70\xbf\xdf\x46\xa4\xed\xfa\x48\xeb\x0d\x55\xdc\xc7\x3c\x69\xee\x1c\xa1\xce\x7d\xfe\x9b\xe4\xe8\x00\x35\x9d\x7f\xfa\x44\xea\x46\x79\xac\xfa\x5c\xb6\x5d\x57\xff\x06\x55\x55\x51\x39\xf7\x6f\xfe\xfa\xcd\xdf\x81\xaa\x5f\xfe\xea\x24\xb5\x93\x17\x8d\x13\x39\x4f\x11\x56\x7e\x82\xe0\x58\x54\x10\xe2\xa5\xf3\xef\x35\x72\xfe\x5a\xb6\x7f\x75\x8a\xca\xf9\x6b\x85\xb2\xbf\x2e\xc9\x74\xf0\xa5\x97\x06\xb6\x7c\x24\x08\xec\x44\x8d\xf3\xfc\x80\x2a\xe4\x0c\x28\x9c\xba\x89\xaa\xa6\x76\x62\x74\xa8\x50\x54\xe3\x35\x7d\x72\x74\xea\x43\x85\x50\xee\x10\x8b\x85\x79\xa9\xb3\x28\x4d\x51\xd5\x4b\x72\x40\xd8\xc7\x4f\x24\x21\x8e\x55\xa8\x14\xf9\x3a\x8c\x10\x85\x9a\x54\x4c\x83\x10\x81\xcf\xac\x8c\x81\xcf\xb8\x0f\x60\x29\x0b\x95\x4d\x62\x16\xaa\x8f\x72\x5e\x38\x7f\x45\x99\x4a\xda\x7f\x46\x44\xac\x83\xf6\x39\x58\xef\x62\xa7\xc8\x7b\xa1\x3e\x10\xc7\x9e\x34\x81\xc8\x97\x4a\xac\x79\x2e\xdc\x38\xc9\x50\x5e\x27\x45\x1e\xa5\x77\xce\x31\x4a\xb1\x5d\x66\x85\xf6\xe1\x83\xf3\x6f\xd1\xa1\x29\x2a\xa7\x38\xf6\x3d\xd6\xab\xf7\x91\x7c\xb8\x73\x7c\x4f\x16\x74\xf3\x52\x22\xb7\x38\xbe\x67\x2a\xde\x60\x51\xdd\xbf\xc9\x1f\xb3\x3d\xaa\xee\xdf\x38\x83\x6e\x75\xf8\xff\xe5\x93\xe3\xab\x74\x95\xd4\x90\x85\xc7\xc2\x2f\x9c\xa4\x71\xb2\xc7\xba\x71\xf6\xc8\x39\x55\x28\xc2\x2b\x99\xe6\x21\xca\x1d\x9f\x97\xd6\xff\x8d\x72\x54\x45\x0d\x72\x50\x4e\x8c\x51\x51\x39\xbd\x5d\x3a\xa4\x51\x5d\xa3\x7a\xe9\xfc\xbf\x45\x4d\xd7\x7b\x09\xaa\xa9\x5c\x16\xce\xfd\x9b\x0e\xa4\xe3\xfd\xfe\x0d\x05\xbb\x7f\x43\xe5\x41\xc0\x55\x52\xf4\x89\x96\x7c\xea\x58\xae\x50\xe6\x3e\x45\xe9\x23\x72\xca\x96\x02\x0f\x45\x77\x0e\x76\x81\x04\xe8\x9f\xa2\x63\x54\x25\x4e\x72\xac\xa2\x0c\x61\x3b\x47\xba\xf9\xf1\x74\xe7\xe8\x2c\x58\x52\xd7\x8f\xa8\xfe\xe0\xaf\x29\x8d\x9a\x60\x71\x3b\x2c\x6e\x87\xc5\xdd\x3f\x9e\xdc\x63\xd2\xaa\xf8\xfe\xbf\xa8\x6c\xb0\xdd\xdd\xbf\x38\x35\x6a\x1a\x3c\x62\xbf\xed\x44\xe1\x8e\x26\x77\xb4\x11\xb5\xd3\x14\x1d\xb6\xfb\x5c\x5b\x0f\x3b\x24\x8f\x32\xc9\xdf\x47\x87\x07\xe4\x00\x16\x94\x8c\x16\xd0\xb6\xd2\x21\x8f\xff\x7d\x0f\x7c\xbe\xe9\xf4\xf2\xf8\x98\x1f\xc8\x96\x4f\x9c\x3c\x25\x31\x7a\xff\x6d\xf7\x33\x8f\x17\x0e\xf9\xb5\xc6\x6a\xf4\x6d\x59\xa1\x43\x52\x93\xf5\xb2\xef\xd1\xb5\xf4\xb7\x35\x09\x8a\x26\xc7\x11\xc6\xf9\xc1\xf1\x3a\xab\x40\x41\x49\x01\x56\xea\xa1\xc6\xbf\x88\x35\xfe\x05\x3b\x90\xfe\xc2\x71\xfd\x1b\x32\x9f\x0e\x55\xc9\x06\xdc\x88\x9b\xf9\x5a\xe3\x11\x36\x7c\xac\x8b\xaa\xfb\x46\x8c\xd9\x40\xe8\xd3\x27\x67\x38\x80\xfa\x9b\x0a\x35\x8f\x55\xee\x30\x2b\xb2\xa1\x32\xe6\x81\xab\xdb\x8f\xb4\xdf\x47\x39\x1e\x58\x1d\x42\xdc\xcf\x1e\xbb\xbc\xff\xb6\x42\x59\x94\xe4\x64\x79\x34\x10\xfd\x48\xbf\xd4\x8f\xe9\xb0\x0d\xf8\xed\x68\x12\x3a\x2e\x9f\x1f\x92\x14\x39\xef\x47\x04\xa3\xd4\x06\x31\x3b\x3f\x7c\x72\xbc\xc1\x67\xf9\x16\x7b\x02\x09\xf1\x3b\x3c\xba\x1e\x81\xb0\x7c\x1a\x1a\x34\x40\x0a\x7c\x8e\x95\xdd\xa1\xee\xc7\xa1\xe6\x48\x65\xf8\xd5\xf9\x9e\xee\x5e\xd2\x56\x33\xad\xa3\xbf\x38\xdf\x61\x5b\xf7\xfd\x08\x42\xab\x0f\xcd\xa6\xbf\x38\xdf\x39\xcb\x1e\x95\x82\xa7\xef\x7a\x11\x39\x9c\xc2\x31\x52\x71\x07\x6e\x70\xf7\xbd\x67\xbe\x0c\x6a\x05\xca\xc3\xf9\xce\x09\x79\x99\xf0\x6d\x10\x5a\xf9\x85\xeb\xc6\xb1\xa1\x63\x53\x88\xee\xf3\xea\xca\x0d\x37\x58\x69\xa5\x2a\x83\xea\x7e\x8b\xcb\xdc\x0c\x7b\xfa\xef\x3b\x46\xee\xdf\x94\xed\xfd\x1b\xb2\xf4\x5e\xf4\x25\x15\xca\x48\x51\x85\xb2\xa1\x8c\x16\x31\x25\x6f\x49\xc1\x5b\xfc\xe7\x38\x2e\xde\xf3\x7c\xe2\x69\x87\xe3\x8a\x08\x2f\x8b\x4a\xf7\x21\xaa\xdd\xcf\xe8\xe5\xfd\xc0\xd1\x42\x68\xe2\xcd\xa8\x96\xb2\x84\x30\x86\x13\x6a\x34\xd0\xcc\x08\xa4\x83\x92\x42\x73\x93\x77\x56\x3c\xe1\x79\xa0\x63\xed\x58\x15\x19\x68\xfa\xf0\x1a\xe1\x10\xa5\x87\xc7\x94\x2c\x3b\x6b\x76\x3d\x23\x9b\x42\x3c\xca\x3b\xa9\x52\xfb\x05\x2d\x47\x7b\x2b\x28\x7f\x5b\x80\x2c\x7c\xe7\x60\xe5\xf7\xe9\x86\xfc\x6f\x10\x9e\x2e\x8c\x3c\x90\x7e\x9c\xc9\x84\xfa\x5b\xcf\xcb\x42\x98\x4f\x6f\x6e\x18\xd1\xb2\xf3\xc8\xb8\x20\x25\xac\x35\x85\x53\x56\xe4\x74\x82\x93\x3d\xa6\x4d\x52\xe2\xd9\x3f\x4a\xd3\x1a\x5e\x4c\xba\x07\x8c\x8a\x9b\x5f\x86\x0a\x37\x1f\xf9\x9e\x14\xbb\x71\xa4\xac\xeb\x42\x88\x1e\xdc\x89\xcc\x4a\x98\x93\xcf\x50\xbe\x90\x08\x6b\x3b\x4e\x4d\xb9\xeb\x3a\xc5\xda\x94\xad\x28\x76\xb1\x05\x8b\x70\xb9\x55\xb7\xfe\x21\x6f\x50\x95\x47\x69\xe7\x06\xe2\x35\x5e\xe3\x44\x71\x5c\x8b\xcb\x38\xdc\xc9\xcd\x03\x72\x6a\x94\x22\x62\xca\x92\xa3\x93\x23\x14\xa3\x78\x79\x9f\xff\xa6\x03\xfe\xff\x30\x19\x0a\xd7\xad\xdf\xe8\x12\xb4\x17\x4f\x57\x46\x5a\x39\x2c\xf7\x7a\x9b\x80\x7d\x4f\x72\xfa\xd6\x89\x72\x07\xb5\x4d\x15\x75\xa4\x9d\x24\xef\xd6\xc9\xb5\x53\x97\xe8\x90\x1c\x93\x43\xd2\xbc\x2c\x9c\xe7\x87\xe4\xf0\xd0\xeb\x5d\x4d\x78\xeb\x22\x86\xff\xf1\x88\xaa\x17\xcc\x6e\xf1\x84\xaa\x0a\xcf\xc0\xf8\x1b\xe3\x4d\x62\x6a\xff\x4c\x8d\xde\xb2\x67\x17\x5a\x52\x0d\xb5\xfe\x59\x5f\x6d\x98\x1e\x7e\x43\xa3\x7c\xd2\x94\xd0\x69\x49\xbf\x4e\x60\x6b\x7d\xb1\xe8\x0a\xba\xb6\x9e\xda\x13\x74\xb1\x68\xe8\x88\x61\x15\x4e\xb9\x5b\x6a\xd6\x98\x8c\x40\x74\xb5\x2e\x23\x8f\x47\xec\x86\x35\x85\x13\xa3\x06\x55\x59\x92\x23\xaa\x02\x6c\xaf\x63\x39\x10\x01\xed\x11\xa9\xcf\x0b\x84\xd4\x74\x49\xcd\xf7\xdf\x66\xff\x41\x47\x83\x20\x1a\xc1\x8f\x1b\x98\xec\x8f\x1e\x44\x6d\x1f\x08\xfc\xe6\xef\x03\x92\x2f\x37\x8b\xee\xd3\x03\xdd\xf5\xe5\xbe\x4d\x16\x88\x81\x96\x11\x1f\xe3\xcb\x4a\x21\x9c\x3e\xde\x43\x05\x53\x1d\xeb\xf7\xdf\x1e\xeb\x85\xf3\xed\x10\x97\xa3\xce\x0b\x25\x33\x9a\xfe\x63\x4d\x5d\x06\xbc\x46\xab\xe9\x92\x24\x39\xbe\x1f\xbc\xd3\x63\x7d\xd3\xe9\x54\xef\x95\x2e\xa8\x8d\x3f\xd6\x37\x0b\x8a\x94\xd8\xf7\x7e\xb4\x33\xc1\x40\xa7\x7e\x3c\x1e\x93\x76\x54\xe6\xc1\x00\x76\x1f\x3a\x77\x61\xa8\x8e\xfd\x47\x06\xba\x3b\x71\x76\xff\x86\x41\xff\x87\x23\xe1\x38\xa9\xf3\x77\xd8\xc7\xed\x58\x72\xde\xa7\xc9\x67\xd4\x47\xe8\x6e\x88\x39\x3e\xd6\xce\x43\x54\x3b\x51\x37\xd7\xbc\xc7\x2b\xf7\xb2\xc5\x5f\xf0\x62\xc9\x21\xf5\xfd\x65\x88\xb2\xae\x36\xf6\x9a\xbd\x05\x39\x92\x46\xf7\x26\xf0\x58\x24\x1d\xd3\xab\x11\xc6\xd0\x0b\x88\x52\x18\x96\x4e\x98\xc9\x6e\xb9\xc9\x15\x92\x69\x49\x2e\x1e\xe7\x8c\x63\xcd\xb9\x1a\xcc\x94\xff\xcd\xdf\xbf\x3d\xd6\x5f\xa8\x6f\xdf\xc9\xea\xcb\x47\x58\xaf\xc0\x69\xf5\x58\x03\x53\x69\xbf\x50\x1e\xd8\x11\x26\xcf\x6e\x9d\x5e\x8f\x33\x12\xd1\xa0\x63\xcd\x4e\x8e\xcc\xd2\x7f\x9c\x24\x39\x7c\xcc\x6a\x06\x44\x38\xfe\xae\x9d\xca\x28\xa1\xa1\x8d\x3f\xa1\xc6\xa1\x4e\xb0\x68\xf6\x3b\x21\x35\x51\x93\x1c\x3a\x85\x02\xe2\x7c\x9f\x3e\x75\x3d\xff\xcd\xdf\xb9\xc6\xf1\x74\xbf\xd0\x2a\x58\xf6\x65\xdb\xab\x1d\x21\xff\xff\xe4\xe9\x0b\xb6\xdb\xd2\x94\x94\x1c\xf9\x99\x08\xab\xd2\x3e\x39\x9d\xfa\xd0\x0a\xa9\x9f\xe4\x49\xf6\x98\x89\x7c\xd3\xbe\x70\xfe\xe5\x13\xb8\x96\x2c\xaa\x4e\xe9\xb4\x61\x84\x41\xce\xbc\xf2\x8c\x12\x81\x94\x48\xe8\xc2\x01\x07\xb1\x0a\x9d\xc6\x20\x98\xf1\x2e\x0e\x77\xac\x99\xde\x75\xb3\x04\x7b\x65\x40\x03\xbe\x67\xfb\xda\x75\xd4\x8b\x68\x1a\xfc\x1a\xe4\x2d\x70\x12\x27\xc7\x23\xaa\x50\x7e\x40\xce\x1e\x35\xcf\x08\xe5\x44\x6c\x78\x64\x69\xa4\xdb\x31\x87\x61\xef\x1c\xca\x40\xc7\x2c\x4f\x66\x88\x4a\x0f\x3e\x44\x16\x91\xf8\xcd\x80\x85\xd9\x25\x9a\xa0\x5c\x98\x92\x4e\xc1\xf0\x77\x4e\xc9\x08\x37\x24\x98\xf9\x94\x25\xf9\x5f\x89\x62\x09\xb3\x56\xd2\xaf\x1a\xe2\x81\xb9\x61\x1f\x60\x30\xdc\xd0\x7c\xb7\x70\x9e\x08\x3b\x4f\xcf\x4a\x21\x77\x06\xaf\x43\x46\x43\xcc\xbd\xb0\x3d\x28\xb2\x2b\x73\x30\x4c\x6a\x8c\x10\xb0\xf8\x89\x23\xef\x49\x4b\xee\x1b\xac\x99\x1c\xfb\x5f\x78\xde\xf0\x88\xc7\x5c\xf5\x46\x0c\xc5\x63\x3f\x8d\xae\x3b\xee\x8d\xf4\x31\x89\xef\x48\xbd\xf7\x78\x4a\xed\xfb\xeb\x8b\xf3\xbd\xc3\xd2\xe8\x0a\x6f\x1c\x69\x44\xb0\xea\xc0\xf9\x22\x92\x2a\xfc\x47\x1f\x80\xec\x05\x2d\x86\xba\x3f\x7d\x72\xca\x76\xe1\x48\xb1\xed\x2f\x5d\xa9\xd6\x1d\x61\xf4\x44\x11\x1b\x67\x7b\xef\x37\x49\x7e\x48\x1f\x63\xa4\x5c\xa0\xcf\xb1\x0b\x8c\xcd\x15\x29\xe8\xd6\x59\x50\x7d\x79\xa1\x0a\xb0\x34\xf6\xdf\xc7\xb1\x06\xc3\x42\x37\xe9\x53\xb4\x35\x14\xe1\x95\x96\x17\xdd\xff\x01\x83\x56\x17\xda\x5d\x38\xef\x3d\xac\xa7\x4f\xcf\x37\x0b\x27\x7f\x4c\xd3\x1b\x56\x20\xd0\x2a\xec\x7f\x3e\xb0\x66\xe3\x9f\x1d\x70\xcd\x4c\x56\x63\x35\x5e\xb4\x92\xe0\x70\x53\xe0\x6a\x87\x28\x95\xbc\x17\xba\x6e\x1b\x20\xf5\xab\xb7\x41\xd0\xc0\x3a\xef\x66\x3c\x6a\xd1\x2d\x05\x01\xbe\xce\xc6\xfe\x66\xf1\xe6\xc3\x77\xff\x74\x9f\x3b\xdf\x39\xbf\xeb\x37\x35\x9d\xa7\xf5\x72\xb3\x0c\x98\x0d\x43\xd4\x30\x3b\x9e\x45\xf6\xe1\x86\x00\xfc\xbe\x28\x5f\xba\x63\xb7\x81\xe7\xfb\x6e\xe0\x05\x01\x11\xe6\x88\xe8\xb7\x8f\xcd\x43\x51\xd5\xea\xda\xcf\x49\xd3\xa0\x6a\x81\x15\x63\x49\x6a\x4d\xd9\xb7\x1c\x78\xea\x76\x2f\xb3\x28\xc9\x99\xdd\x4b\xe7\xbb\x0f\xf7\xf9\x5d\x55\x14\xf4\x78\x8a\xeb\xee\xc9\x78\xa7\xe7\x2a\x3f\x76\x65\x49\x1e\x27\xa7\xe2\xce\xf9\x66\xb3\xf1\xbd\x63\x40\x4b\xcb\xc7\xaa\x4c\x71\xdd\xcd\x71\x1d\x1c\xfc\xbe\x34\xc9\x3f\xdf\x39\xdf\xa0\xdd\x0a\xed\x0e\xb4\xac\x42\xf1\x70\x2a\x8e\x16\x15\x55\x94\x9f\x30\xf0\x31\xde\x22\x7f\x4d\x4b\x5f\x50\x4a\x2e\x1b\xd0\x53\x7c\xb4\xf4\x54\x21\x94\x0f\x67\x1b\x69\x61\x83\xa2\x14\x97\x79\x87\xdb\xdb\xbe\xe2\xe1\x25\xca\x87\x13\x88\xb4\x8c\x9c\x3e\xe9\x4e\x05\x0c\xe8\xa2\x97\xe1\xdc\x17\x53\xd6\x1d\x42\xeb\x8f\xaf\xf5\xcd\xa1\x27\x45\x05\x89\x8c\xe7\x36\x05\x44\xfd\x49\x4a\x81\x5b\x72\xc2\x51\xe4\x8c\x9e\x39\x14\x5a\x4b\xcf\x01\x0a\xf2\x4a\xa9\x4b\xd6\x9d\xec\x1b\xaa\xca\x0c\x33\x36\xb4\xad\xfb\x88\x39\x57\x5c\x67\xf4\xce\x83\xfc\x29\x8b\xe9\xc5\x01\xf9\x53\x7a\xa2\xa7\x46\x00\x3a\x69\xbf\x05\x4b\xbf\x31\x57\x70\xdc\x3a\xca\x6b\xb7\x46\x55\x72\xbc\x73\xdc\xa8\x2c\x53\xe4\xd6\x2f\x75\x83\x17\x06\xbf\x4b\x93\xfc\xf3\x1f\xa3\xc3\x4f\xe4\xef\x7f\x2b\x3a\x8f\xe8\x27\x74\x2a\x90\xf3\xef\x7f\xc0\xee\xd0\x9f\x8b\x7d\xd1\x14\xb8\xf4\x7f\xa0\xf4\x09\x35\xc9\x21\x72\xfe\x84\x1e\x11\xfe\xf6\xdb\x2a\xc1\x33\xfd\xfd\x9b\x3f\x15\x4d\xe1\xfc\x14\xe5\x75\xe7\x40\x31\xf7\x78\xfa\xc2\x91\x07\x5c\xe1\xb7\x98\x09\xe7\xf7\x45\x5a\x54\xce\xbf\x66\xc5\xdf\x92\x0e\xae\xa7\x0b\x96\xfd\xf4\x92\xed\x8b\xb4\x2b\x24\xf4\x38\x70\xa0\xd9\xc3\x4d\xa1\xcb\xdd\x41\xea\x2d\xdf\x77\x8b\xfb\x9c\x3d\x50\xc6\x1f\x27\x23\x27\xc5\x92\x5f\x88\xa2\xd1\x63\x1c\xfb\xa2\xed\x61\x1f\x9a\x2c\x05\xae\x4d\x8d\x02\xeb\xee\x75\x25\x39\x1a\xa2\x02\xfe\xd2\xa7\x4a\xf9\x8c\xf6\x9f\x93\xc6\xed\x8e\xab\xe1\xd9\x25\x8a\xb1\x4b\x79\x87\xd7\x3f\x6f\xf9\x2a\x51\xe9\x3e\x24\xa7\x07\xa2\xc5\xa6\x5b\x5d\x51\xd5\x24\x87\x14\x2d\x9c\xa8\x4e\x62\xb4\x70\x8e\xc9\xe9\x10\x95\x58\x28\xe4\xf7\xc7\x0a\x97\x15\x05\x31\x89\x0f\x28\x8a\xc9\xcf\x53\x55\x3c\x96\x0b\x07\x9b\xb7\x85\x93\x47\x4f\x0b\xa7\x46\xdd\xce\x1e\x69\xdd\x70\x8c\x89\x1c\x2d\xeb\x29\x8d\x67\x66\x86\x07\xbb\x3e\x4a\xb2\xf8\x87\x56\x5a\xf6\x28\x4a\x85\xb2\x8f\xd0\x7d\x03\x48\x05\xc2\x8f\xf2\xa1\xdb\x8f\xd0\x75\x2f\xc5\xb1\x53\x6a\x8e\x49\x2f\xfc\xa5\x89\xf6\xe4\xae\xe0\xa7\xfb\x37\xae\x7f\xff\xe6\xe7\xee\x20\x30\x39\xbc\xd8\xfd\xea\xd2\x93\x97\x74\xc6\x2e\x1e\x1b\xcc\x8e\xf4\x96\x4e\xa7\xd1\x80\xde\xd3\x00\x13\x55\x7c\xc7\xe9\xdb\xd1\x35\x6d\xbc\xe3\x46\xc9\x0c\xa8\xfc\x85\xf3\x10\x2c\x9c\x87\xd5\xe2\xff\x67\xef\x5d\x98\x1c\xc7\x8d\x04\xe1\xbf\xc2\xed\x71\x5f\x75\x79\x44\xb5\x48\x3d\xab\xfa\xeb\x0e\xaf\x1d\xfb\x8a\x6f\x66\xf7\x8b\x9d\xdd\xf8\x2e\x62\x6a\x2e\x4c\x89\x90\x44\x37\x5f\x4b\x52\x55\xac\x71\xcc\xfd\xf6\x0b\x80\xaf\x04\x90\x78\x90\x52\xf7\x78\x7d\x3e\xdf\x4e\x97\x08\x64\x22\x91\x48\x24\x12\x09\x20\xd3\x39\xaf\x66\xce\x79\x3d\x73\xce\x1b\x28\x30\x2e\x78\x17\x89\x46\x4a\xeb\x50\xe5\x96\x50\x1e\x80\x01\xf7\x30\x67\xed\xaf\x30\xa8\x02\x37\x2b\xa2\x53\x94\x06\xb1\xdb\x94\x29\xee\xe2\xf2\x17\x3b\xd5\xc5\x4e\x98\x55\x15\x69\x96\xaf\xc3\xa5\x60\x87\xcb\x67\x12\xe7\xe0\x36\xb0\xcb\xbf\xf2\x14\x2f\x04\x97\x9f\xa3\xdc\x65\xab\x7e\x7b\x47\xb0\xa1\x3e\x0c\x8b\xfe\x75\x02\xde\x4b\xfe\xb1\x48\xf3\xe4\x45\x16\xb6\xe1\x26\x1a\xc3\x9b\xc5\xb3\xa7\xf4\x42\xff\x13\xc6\x13\x98\x9a\xc5\x4e\x8b\xc1\x61\x48\xb2\xf6\xdf\x0b\xfd\x8e\x12\xdb\xdf\x84\x0e\x2b\xfc\x55\x4d\x5f\x1e\xa2\xf0\x9d\x1c\x88\x41\xf0\x7a\x25\x24\x5c\x76\x1d\xe2\x56\x2e\x38\xca\xf7\xb3\xa7\xb4\xac\x8a\xac\x7b\xf0\x80\x3c\xd0\xe9\xaa\xb2\x9b\x52\xf0\x39\x0e\x9b\xe0\x3b\xa6\x94\x9b\x0a\x17\x86\xed\x92\x8b\x8f\x7e\x0b\x12\x07\x55\xf4\x4c\x44\xe5\xb0\x5d\xbf\x95\x47\xa6\x61\xf6\x33\xa1\xfa\x3a\x88\xbb\x59\xbf\x0f\x4a\xd2\xca\x5d\xd7\x56\x37\x23\xdb\xa7\xe3\x73\x7f\x3d\x74\xab\x27\xa2\x79\xe5\x3e\x07\x45\x01\xf6\xd4\xe7\x83\xf2\xe6\xb9\xd5\x0d\xf7\x06\x71\xf3\xfa\x00\x7b\xf8\xf3\xc1\x38\x99\x5a\x0c\x54\x3b\xfd\x78\x2e\xc8\xf1\xa7\xfb\xe6\x6f\xb6\xf3\xfb\xe9\x1e\xbb\x82\xae\xa5\xd9\x80\x0f\x21\xd5\x1a\x6b\x73\x9f\xfa\x90\x85\xf4\x9f\xcf\xfb\x90\x8e\x79\x90\xe4\x5f\xf1\x9d\xb4\xb4\xc8\x00\x95\x58\x90\x71\xf3\x17\x6a\xea\xfe\xf9\xb8\x9b\x94\xfd\x23\xe5\x4e\x93\x94\x87\x22\x8b\xe3\x7d\xd0\xcf\x87\xc6\x6a\xd0\x4f\xaf\xfe\x62\xb8\x28\xcf\x49\x14\x86\x31\x81\xea\xb0\x57\x58\x40\xc8\x9f\x4f\x9a\xa7\xd4\x4a\x94\x0c\x16\x5c\x8e\x56\x5e\x8d\xee\xea\xb6\x86\x50\x3b\x6d\xf9\x90\x64\xdb\x5e\xd1\xc8\xf1\xc1\x86\x32\xfe\xd9\x8b\x7a\xcd\x6e\x5b\x72\x9b\x8b\xf1\x0d\xa6\x9e\xe2\xb3\xfc\xe2\x5a\x12\xca\xf6\x7b\x67\x02\x26\x41\x75\x38\xbb\xfc\x3c\x8c\x83\x3d\x89\x05\x03\x2d\x4a\x99\x8e\xe9\xec\x34\xc3\xba\xba\xbf\x54\x55\xc7\x8e\x96\x79\x45\x10\x46\x97\x12\x2a\x58\x56\xc7\xde\xa8\xe8\x25\x22\xcd\x2f\xd5\xac\x83\xa7\x73\x87\x1d\x56\xd2\x45\x23\xaf\x1a\x7b\xf3\x29\xa5\x5d\x0d\x0a\x12\x18\xcd\x48\xc8\x1f\x30\x21\xe0\x67\xdd\xb2\xd7\x13\xc1\xa8\x12\x65\x4d\x30\x5c\x04\x8a\xf1\x87\xb0\x50\x7c\x7f\x2c\xb2\x98\x7c\x7c\x7a\xd3\x00\x3e\xbd\x69\x8d\x8a\xce\x1e\x68\x83\x37\xf4\xc2\x0e\xb0\x82\x47\x3a\xfd\x02\xce\xd3\xf0\x63\xf5\x9a\x73\xb8\xc1\x37\xf6\x68\x87\xff\x54\x5e\xf6\x49\x54\xf5\x24\x74\xe2\x13\xe4\x39\x09\x8a\x20\xa5\x1b\xaa\x06\x93\x30\xbc\x6c\x60\x5b\xb7\x60\x78\x8f\xb5\xab\xae\xd2\x91\xa1\xae\xd1\x53\x25\x54\xd1\xf2\xa9\xa5\xec\xd1\x4d\xb2\x9f\xdd\x46\xe6\xa2\x34\x25\x05\x4a\x9c\xae\x56\x4f\x9f\xae\xd2\x40\xa2\x54\x8b\x53\x17\x43\xe8\x0e\x95\x32\x63\x22\xd6\xb7\x1d\x84\x51\xd6\x0c\x11\xf7\xfd\x70\x26\x87\xcf\xfb\xac\xee\x47\x4a\xb9\xd1\x14\x5a\x6e\x34\x08\x37\x6d\x10\xbd\xde\xf8\x2b\x1f\x7b\xd5\x39\xa8\x72\x12\x87\xfd\x4b\x2f\xe0\xf6\x5c\x7c\x40\xfa\xc8\xcf\x47\xe9\x6d\x5b\x4c\x4e\x24\x0d\x15\x3b\x44\xc7\xe9\x5e\xe7\x77\xbb\x59\x70\x94\xdd\x7f\x43\x1b\x44\x6c\x3f\xee\xce\x7f\xff\x55\x31\xe3\xd1\x95\x1e\x09\x0b\x32\x2c\xa5\xd9\x69\x30\xb6\x4d\x06\x59\x37\x82\xdd\x01\x37\x15\x98\x76\x96\x31\x69\x71\xcb\x9c\x76\x41\x9c\xbf\x48\xf5\xec\x52\xf1\xd5\x1b\x02\xba\x0e\xb5\x83\xc9\x35\x5a\x92\xa0\x38\x9c\x7b\xa1\x69\xb5\xae\x9b\x1d\x8f\x25\xa9\x1e\x1d\xb7\x77\x30\x21\xf3\x9e\xd3\x58\x22\xbe\x81\xaa\xe6\x13\x30\x8a\xd4\x9a\x04\x62\x1c\x10\x1c\xa3\x98\xb8\x97\x3c\xce\x82\x90\xeb\x57\xf3\xf4\x12\x8e\x89\x59\x3b\x65\x97\xaa\xd7\xd7\xaa\x35\xae\xb5\x83\x93\xe1\x75\x7b\x5f\x33\x8e\xca\xca\x8d\xaa\x6e\xed\xc6\xf5\x4c\x45\x92\x3c\xee\x83\xb9\x88\x2f\xb6\x1a\x76\x35\xd6\xc8\x4f\x48\x15\x6c\x0f\x8d\x6e\x7c\x67\x4f\xe9\x9c\x96\xcc\x69\xd1\x9c\x96\xcd\x69\xe1\x9c\x96\xce\x85\x7d\xb1\xb4\x5a\x0b\xfb\x95\x35\xee\x56\xf0\x21\x05\xf3\xb3\x27\xed\x61\x7c\x6e\xf5\x6f\x08\xf1\xe5\x5a\xb0\x0e\xa3\x73\x29\xd5\xf1\x7a\x9b\xa8\xa9\xc6\x7a\xb2\x42\xaa\x71\xb5\x58\x57\xd7\x48\x2d\x9f\xab\xb6\x01\x1c\x91\x5d\x2c\xcd\x7b\xd2\x98\x04\xa1\x06\x91\x1c\x74\xa2\x87\x6c\x87\xcf\x95\xd9\xb3\xd1\xc0\xaa\x99\xdd\x23\x94\x39\xb9\x9e\xaf\xaf\x43\x29\x33\x7e\x75\x2d\x4a\x79\x90\x96\x13\x51\x76\xbe\x22\x31\x50\xbc\x76\x13\x02\x57\x91\x7e\x15\x6d\x40\xfb\x77\x82\xe2\xfb\x70\xef\x9e\xdb\x9a\xd3\x99\x84\xef\xd1\x17\xf3\xdd\x76\xad\xf6\xc3\x31\x14\x49\x50\x7c\xa6\x18\x92\xfe\xa5\x21\x0c\x17\xdd\x51\x89\xb8\xdc\x0e\xc7\x1d\x59\x0e\xf2\x47\x55\xcb\x25\x65\xeb\x7f\xc8\x6f\x28\x60\x1c\x2f\x56\x0d\x31\x12\x1a\xf8\x46\x93\x5d\x07\xcd\xf4\x9b\x85\x86\x94\x60\x1a\x5b\x2c\x0e\xca\xca\x3d\x9c\xa3\xb8\xb3\xc6\xb0\xc4\x07\xe0\x15\x77\x54\x45\x41\x1c\x95\x89\xc4\xfb\x87\x76\x49\x57\xc6\x9c\xe9\x91\xe0\x2e\x1b\x95\x7b\x0b\xd3\x10\x00\x85\xdb\xf8\xb2\x95\x56\x88\x42\x3a\xa4\x7d\x9c\x02\x6f\x77\x30\xd0\x79\x10\x86\x68\x6b\x4f\xfe\xc2\x5b\x3d\x3d\x2d\x16\x7f\xbf\x18\x9e\x43\xcd\xa3\xe4\xd4\x9c\x50\x77\x5d\x93\x6d\x1e\x6c\x7d\x67\x70\xd5\xf9\x92\xec\xd3\x20\x8a\x65\xb1\xec\x27\xa8\xd2\x17\xac\x79\x6f\xfb\x01\xdb\xde\x01\x9c\xd6\x44\x42\x47\x80\x5e\xd6\x9a\x9a\x6e\xef\x15\x50\xaf\x6b\xbc\x72\x11\x11\x70\x1b\x76\x44\xd8\xf0\x61\x3c\x64\x30\xdc\x43\xe7\xbf\xdb\xce\xd7\x3c\x10\x38\x64\x45\x83\x25\x0c\x8e\xb4\x4f\xce\x80\x52\xb2\x2d\x59\x9d\xcf\xfb\x50\x1e\xb5\x82\x24\xce\x62\xbe\x42\xe4\x59\x26\xa6\x1f\x45\x79\x80\xc1\xf9\x80\x3c\x8a\x60\x56\x50\x1a\x10\x3a\xa4\xb9\xd4\x8d\xb1\xca\x13\x9b\x4b\x63\x8c\x4e\x27\xb9\x0f\x3d\xa1\x3d\x1a\x74\x24\x4c\x96\x3a\x08\x6f\xc1\x1b\xea\xf3\xbc\x20\x6e\xe3\x9e\x1a\x9c\x3e\xf0\xca\xed\x72\xd5\x9d\xa2\xf6\x4e\xad\xd7\xce\xa1\xd5\x23\xe9\x1f\xf6\xcf\xe0\x8f\x66\xd6\xf2\x9f\xca\x84\xff\x9d\x08\xe5\xf1\x89\xff\x5d\xb7\x33\x57\xb1\xcb\xe9\xe3\x84\xaf\x73\x6e\x63\xd7\x05\xec\xee\x3e\xcb\xe1\x31\x65\xff\x37\x9c\x97\xa6\xa0\x7c\x43\x87\x1d\xae\x73\x43\xe4\xcb\x7e\xfe\xaf\x7b\x06\xda\xc6\xc6\x53\x21\xe7\x7e\x26\x21\xd2\xd6\xd6\xb7\x68\x8b\x8b\x58\x67\xd9\x16\xf7\x33\x3e\x21\x4d\x3f\x6c\x2c\x9a\xe6\xc3\xca\x4d\x6b\x9b\xfb\x59\xc7\x08\x29\x9e\x27\xb1\x7c\x5e\x64\x2f\xc2\x04\x3c\xc6\xa4\xa9\x43\xff\x68\x15\x55\x1b\x36\x52\x0e\xfa\x2b\xc8\x51\x17\x79\xb7\xf9\xdc\xb4\x90\x66\xee\xe9\x52\x55\xa4\x28\xd1\x45\x5f\x73\xde\x02\x41\x3f\xd1\xde\x31\x73\x8c\xfb\xd8\xf8\xde\x7f\xfb\xf1\xe9\xcd\x21\x8b\xdd\x7e\xb3\x2a\x66\x6f\xf8\x80\x5b\x3d\xdd\x24\x8d\x5d\x8f\x71\x2f\x76\xfd\xf6\xdf\x65\xfb\xef\xaa\xfd\x77\xdd\xfe\xbb\x69\xff\xdd\xb6\xff\xee\xda\x7f\x1f\xda\x7f\xbd\x45\xf7\x47\x87\xd1\x6b\x51\xce\xda\x96\x58\x5c\xd8\xa6\xa8\x4c\xfa\x76\xcb\xa4\x6f\xba\x4c\xfa\xd6\xcb\xa4\x27\xa0\x4c\x7a\x1a\xca\xa4\x27\xa3\x4c\x7a\x4a\xca\xa4\x27\xa6\x4c\x7a\x7a\x68\x13\x0b\xf0\x37\x68\xcf\x1b\x1a\xec\x68\x2b\x13\x48\x5e\x12\xf6\xe4\x25\x61\x4f\x5e\x12\xf6\xe4\x25\x61\x4f\x5e\x12\xf6\xe4\x25\x61\x4f\x5e\x12\xf6\xe4\x25\x61\x4f\x5e\x12\xf6\xe4\xd1\x26\x16\xe0\x6f\xd0\x9e\x37\x34\xd8\x91\x97\x84\x90\x3c\x96\xc2\xbb\xff\xd3\x1f\xfe\x5c\x0e\x7f\xae\x86\x3f\xd7\xc3\x9f\x9b\xe1\xcf\xed\xf0\xe7\x6e\xf8\xf3\x01\x34\xb1\x00\x7f\x83\xf6\xbc\xa1\xc1\x8e\xbc\x2e\x7b\x5e\xf3\xbd\x1e\x84\xaa\x1e\xe4\xaa\x1e\x44\xab\x1e\xa4\xab\x1e\x04\xac\x1e\x64\xac\x1e\xc4\xac\x1e\x24\xad\x1e\x84\xad\x06\xf2\x56\x03\x91\xab\x07\xa9\x73\xeb\x5e\xf0\xb8\x18\xc4\x8a\x73\xc4\xab\x56\x93\x7e\x36\xb5\xab\x30\x55\x1f\xfb\xa0\x8c\xfa\xbb\x4d\xec\xcb\xa9\xc8\x5e\xba\x50\xc3\xb2\x35\xd8\x2b\x25\x6a\x91\x94\xae\xe7\x7c\x72\x7e\x3b\xa0\x6b\xcf\x82\xd4\x5e\x3e\x01\xdc\xc7\xc0\xd7\x32\xf4\x1a\x03\x5e\x62\xc0\xcb\xe5\x7c\xc9\xfe\x9f\x84\x83\x2b\x11\x50\xad\x30\x54\xfe\x5a\xc2\xd1\x7c\x12\x80\xd7\x28\xb0\xdc\x09\x1f\xeb\xc4\x06\x65\xe0\x66\xbe\xa1\xff\x6f\x2b\xb3\x11\x96\x0c\xda\x71\x90\x9b\x01\x49\x6f\x2b\xb4\xa0\xc0\x76\xc0\x47\x85\x29\x43\x11\xcb\x4e\xc5\xce\x9d\xc4\x4d\xa6\x9e\xaf\xee\xca\x72\xe4\x30\xb0\x45\xe0\x2a\x29\x60\xcb\x87\x88\x61\xe5\xa9\xe8\xe6\x4a\x06\x0c\x9b\x91\x62\xcc\x16\x29\x09\x46\xc9\xee\x35\xce\xef\x9d\x88\x61\xa3\xe4\xf7\x06\xe7\xf7\x83\x88\x61\x2b\xf3\x7b\x2b\xf0\xdb\x5b\x48\x62\xa2\x64\xf8\x0e\x67\xb8\x27\x49\xda\x83\x92\xe3\x0f\x38\xc7\x3d\x7f\xb4\xe2\x69\x76\x4c\xc7\xa8\x28\xbb\x73\xbf\x66\x9b\xec\x7a\x42\x95\x38\x10\x6a\x78\x4b\xa1\xc6\x82\x2b\x5e\x08\xa5\x1e\x0f\x2c\x94\xfa\x5c\xa9\x2f\x94\x2e\xb9\x52\xb1\xdd\x15\x57\xba\x12\x4a\xd7\x5c\xe9\x5a\x28\xdd\x70\xa5\x1b\xa1\x74\xcb\x95\x6e\x85\xd2\x1d\x57\xba\x13\x4a\x1f\xb8\xd2\x07\x91\x1b\x3c\xb3\x3c\x89\x5b\x02\xbb\x44\x7e\x79\x3c\xc3\x3c\xc0\x31\x76\xd8\xd1\xb1\x9b\xb3\x52\xe5\x09\xd3\x56\xf6\x91\xca\x88\x32\x6a\x6b\x2f\x91\xda\x50\xff\xb4\xd5\x56\x48\x35\x44\xd7\xb4\xb5\xd7\x48\x6d\x44\xaf\xb4\xb5\x37\x48\x6d\xa8\x4a\xda\x6a\x5b\xac\x9a\x92\x0b\x3b\xa4\xf6\x46\xc9\x85\x07\xa4\xf6\x56\xe6\x42\x37\xd0\xfc\x40\x28\xd9\xe0\x61\xe3\x26\xcf\x76\xf3\x9e\x36\x06\x3b\x58\xd9\xac\x41\x0c\x1b\xdc\xd1\xd5\x84\x74\xeb\xd7\x66\x6a\x83\x0f\xcb\x33\xaa\x68\x6c\xf1\xf8\x38\x9e\x35\x86\x66\xad\xc4\xb2\xc4\xb1\x08\xab\x9d\x7a\xbd\xc3\x70\xae\x70\x9c\xdd\xaa\x8b\xac\xbb\x18\x96\xb5\x02\x0b\xd6\x3f\x5f\xd9\xbf\x8d\x82\xdb\xfc\x9a\xa6\xb6\x22\x86\x70\x8d\xfd\x56\x49\xc6\xd6\xdb\x41\xb2\x65\xa4\x1b\xcd\x6e\x53\x26\x23\xdc\xa9\xb9\xbf\x43\x98\xdf\xed\x26\x6f\xd7\xcf\xe5\xa4\xe1\xeb\xf6\xaf\x37\x90\xa7\x6e\xff\x2b\xa3\x12\xcc\x28\xb5\x21\x25\xa0\xda\x4c\x9a\x2b\xdd\x8e\x1b\x01\xd6\x0c\xd2\x5a\x33\x4a\x3b\x19\xd5\x46\x33\x4a\x1b\xcd\x28\x3d\xc8\xa8\xb6\xd8\x28\x6d\xb1\x51\xf2\x16\x88\xdc\x69\x86\x69\xa7\x19\x26\x0f\x91\xe1\x07\xcd\x38\x3d\x68\xc6\xc9\xf3\x27\x2a\xc7\xf6\xc6\x4c\x02\x8d\x31\xde\x1c\x93\x6a\x0e\x36\x19\x6f\x95\x49\x15\x17\x42\xad\x05\x56\xc9\x13\x51\x61\x95\x7c\xa1\x92\x8f\x55\x5a\x0a\x95\x50\x9a\x56\x42\xa5\x15\x56\x69\x2d\x54\x5a\x63\x95\x36\x42\xa5\x0d\x56\x69\x2b\x54\xda\x62\x95\x76\x42\xa5\x1d\x56\xe9\x41\xa8\xf4\x80\x32\x53\x64\xb9\x87\xf3\x5c\x62\x3a\xca\x75\x4f\x64\xbb\xc7\xf1\xbd\xb1\x1d\xe0\x38\x4b\xde\x49\xb9\x2e\x9e\x7b\x10\x9b\xf9\x03\x0c\x9e\x58\x0f\xd5\xc4\x03\x10\x9e\x3f\x8e\x57\xbd\x43\x6d\x3c\x33\x1a\xaa\x64\x07\x20\x3c\x01\x18\xaa\x4e\x07\xa0\x0d\x0a\xc4\xeb\xcf\xa1\xf6\x16\xaf\xad\xe7\xd7\x0e\x05\xda\xe8\xf9\xf5\x80\x02\x6d\x15\xfc\xf2\xf0\x31\xdf\xe9\x19\xe6\xe1\xa3\x2f\x2b\x36\xcb\x53\x8e\x18\x1c\x62\xdc\xce\xdc\x4c\xc2\xdb\x98\x9b\x49\x78\x0b\x73\x33\x09\x6f\x6f\x6e\x26\xe1\x2d\xcc\xcd\x24\xbc\x85\xb9\x99\x84\x37\x35\x37\x5b\xd7\xf7\x4d\xcd\x4d\x26\x10\xb7\x30\x37\x99\x44\xdc\xac\x9f\xd3\xcd\x4d\x36\xfe\xb7\x31\x37\x99\x10\xdc\xc6\xdc\x64\x92\x30\xd5\xdc\x4c\xc2\x9b\x99\x9b\x49\x78\x33\x73\x33\x09\xaf\x30\x37\xd9\x99\xcf\x8d\xcc\x4d\x76\x66\x74\x23\x73\x93\x9d\x39\x5d\x65\x6e\x26\xa1\xad\xb9\x99\x84\x96\xe6\x66\x12\x5a\x98\x9b\x70\x22\x2b\xcd\x4d\x38\x49\x95\xe6\x26\x9c\x7e\x4a\x73\x13\x4e\x33\xa5\xb9\x09\x27\x90\xd2\xdc\x84\x53\x43\x69\x6e\xc2\x29\xa0\x34\x37\xa1\x70\x2b\xcd\x4d\x28\xb6\x4a\x73\x93\x13\x4f\xb5\xb9\xc9\x49\x9e\xda\xdc\xe4\x84\x4a\x63\x6e\xc2\x71\x36\x99\x9b\x70\xb8\x6d\xcd\x4d\x38\xfa\xd6\xe6\x26\x94\x06\xb3\xb9\x09\xc5\xc2\xda\xdc\x84\x62\x62\x6d\x6e\x42\xb1\x31\x9b\x9b\x50\x7e\xac\xcd\x4d\x28\x4f\xd6\xe6\x26\x94\x2f\xb3\xb9\xc9\x09\x9a\xb5\xb9\xc9\xc9\xdd\x44\x73\x53\xb8\xe8\x12\x83\x8b\x2b\xb7\x33\x37\xe3\xd3\x6d\xcc\xcd\xf8\x74\x0b\x73\x33\x3e\xdd\xde\xdc\x8c\x4f\xb7\x30\x37\xe3\xd3\x2d\xcc\xcd\xf8\x74\x53\x73\xb3\xbd\xca\x70\x53\x73\x93\x09\xc4\x2d\xcc\x4d\x26\x11\x37\xeb\xe7\x74\x73\x93\x8d\xff\x6d\xcc\x4d\x26\x04\xb7\x31\x37\x99\x24\x4c\x35\x37\xe3\xd3\xcd\xcc\xcd\xf8\x74\x33\x73\x33\x3e\x5d\x61\x6e\xb2\x3b\x3c\x37\x32\x37\xd9\x1d\xa0\x1b\x99\x9b\xec\x0e\xd1\x55\xe6\x66\x7c\xb2\x35\x37\xe3\x93\xa5\xb9\x19\x9f\x2c\xcc\x4d\x38\x91\x95\xe6\x26\x9c\xa4\x4a\x73\x13\x4e\x3f\xa5\xb9\x09\xa7\x99\xd2\xdc\x84\x13\x48\x69\x6e\xc2\xa9\xa1\x34\x37\xe1\x14\x50\x9a\x9b\x50\xb8\x95\xe6\x26\x14\x5b\xa5\xb9\xc9\x89\xa7\xda\xdc\xe4\x24\x4f\x6d\x6e\x72\x42\xa5\x31\x37\xe1\x38\x9b\xcc\x4d\x38\xdc\xb6\xe6\x26\x1c\x7d\x6b\x73\x13\x4a\x83\xd9\xdc\x84\x62\x61\x6d\x6e\x42\x31\xb1\x36\x37\xa1\xd8\x98\xcd\x4d\x28\x3f\xd6\xe6\x26\x94\x27\x6b\x73\x13\xca\x97\xd9\xdc\xe4\x04\xcd\xda\xdc\xe4\xe4\x6e\xa2\xb9\x29\x5e\x6e\x8e\xc1\xed\xe4\xdb\xd9\x9b\x75\x7c\x1b\x7b\xb3\x8e\x6f\x61\x6f\xd6\xf1\xed\xed\xcd\x3a\xbe\x85\xbd\x59\xc7\xb7\xb0\x37\xeb\xf8\xa6\xf6\x26\x77\x37\xf5\x46\xf6\x66\x1d\xdf\xc8\xde\xac\xe3\x9b\xd9\x9b\x75\x7c\x85\xbd\x59\xc7\x37\xb3\x37\xeb\xf8\x66\xf6\x66\x1d\x5f\x61\x6f\xd6\xf1\xcd\xec\xcd\x3a\xbe\x99\xbd\x59\xc7\x57\xd8\x9b\x75\x7c\x3b\x7b\xb3\x8e\x6f\x67\x6f\xd6\xf1\xb5\xf6\x66\x1d\xdb\xda\x9b\x75\x6c\x69\x6f\xd6\xb1\x85\xbd\x09\x27\xb2\xd2\xde\x84\x93\x54\x69\x6f\xc2\xe9\xa7\xb4\x37\xe1\x34\x53\xda\x9b\x70\x02\x29\xed\x4d\x38\x35\x94\xf6\x26\x9c\x02\x4a\x7b\x13\x0a\xb7\xd2\xde\x84\x62\xab\xb4\x37\x39\xf1\x54\xdb\x9b\x9c\xe4\xa9\xed\x4d\x4e\xa8\x34\xf6\x26\x1c\x67\x93\xbd\x09\x87\xdb\xd6\xde\x84\xa3\x6f\x6d\x6f\x42\x69\x30\xdb\x9b\x50\x2c\xac\xed\x4d\x28\x26\xd6\xf6\x26\x14\x1b\xb3\xbd\x09\xe5\xc7\xda\xde\x84\xf2\x64\x6d\x6f\x42\xf9\x32\xdb\x9b\x9c\xa0\x59\xdb\x9b\x9c\xdc\xd9\xd8\x9b\x30\x61\xb1\x1c\x05\x06\x7f\xec\x8d\xbf\x21\xed\x13\x16\xcf\x86\xbf\xe5\x87\xb6\x43\x78\x2e\x31\x78\x4b\x95\xe5\x9a\x38\x03\xc3\xfb\x68\xbe\xb1\x26\x59\xb0\x22\x1c\x4c\x17\xca\x4b\x0a\xef\xe8\x9b\xf0\xca\xb9\x86\x21\x59\x06\x70\xb7\x4c\x20\x1b\xd8\x4f\x99\x13\x4b\xf8\x48\x5e\xc8\xcc\xfc\x67\xd3\x23\x71\x14\x0a\xb6\x29\x25\x79\x9e\x80\xad\x4f\xc4\xac\x28\xe2\x30\xb7\xbc\xed\xcd\x2f\xf0\xa4\x09\x42\xc7\xa4\x2c\x11\xa4\xcd\xe7\x10\xff\xac\x20\xa4\x29\x54\x8d\x14\x97\xd8\xbf\x19\x86\xaa\x88\x72\x4a\x3d\xab\x5a\x15\x8f\x69\x75\x76\xb3\xa3\x5b\xbd\xe6\xe4\x5d\x16\x76\x41\x15\xe4\x57\xdd\x62\x8c\x8b\xc5\xfa\x5e\x40\xdd\x44\x2e\xec\x11\x23\x31\x17\xe1\xc3\x70\x73\x03\x5b\xa9\x85\x36\x3a\xf7\x4c\xfc\xe0\x7c\xe2\x38\x03\xbe\x86\xaa\xee\x7c\xb3\xdf\x85\xc1\x10\x94\x56\x80\xc4\xb0\xc1\x81\x19\xea\x89\xa3\xd2\x97\x28\x27\x4f\x47\xc0\x36\xd8\xcb\x04\x34\x4c\xe3\x71\x41\x4e\x22\x1d\x79\x38\x1e\xc2\x31\x78\x3e\x71\x3d\xd1\x57\x3c\x8f\x6b\xb5\x0f\x93\x3e\x93\x3f\x09\x63\xc4\x7d\x57\x8f\x52\xb8\x09\x77\xe1\x5e\xd5\x8c\x02\x23\xec\x1f\xac\x2b\x8e\x15\x28\x33\x8e\xd6\x7e\xb9\xdf\xee\xf7\x3a\x2e\x0f\x31\xe2\xf5\xe3\x75\xd8\x1d\xf6\x87\xe3\x18\x4c\x9a\x11\x43\xaa\x9e\xc7\xb5\xdc\x46\xb0\x9f\x89\x1f\xc4\xf1\x1a\xbe\xaa\x47\xeb\xb0\x24\x9b\xc3\x1e\x6f\x00\xc5\xc6\x8d\x54\x5f\x4f\x1a\xa7\xae\xc4\x38\x4a\xbb\x63\xe8\x3d\x10\x2d\x6f\xdb\x80\xfd\xfa\x31\xda\x7b\xe1\xd1\x30\xda\x1c\x1e\xdd\x08\x89\x15\xcf\xe3\x5a\x8d\xd2\x63\x36\xe3\x7e\x09\x23\xd3\x7d\xd2\xa8\x3a\x42\xd6\x04\xc3\x2b\xe3\x81\xdd\x68\x6b\x88\xa3\xd1\x7c\x36\x0f\xc5\xe6\x70\x0c\x03\x1d\x0b\x59\x92\x04\xfd\x38\x04\xfb\x30\x24\x6b\x4b\x24\x9a\x41\xe0\x6b\x9d\xc7\xb5\xd7\x26\x6e\x98\x89\x1f\x84\x71\x00\x5f\xd5\x43\x71\x3c\x12\xb2\x0f\xf0\x06\x50\x6c\xb0\x4b\x43\x3d\x71\x4c\xfa\x12\xe3\xb0\x1c\x8f\xe1\x71\xab\x9d\x21\x5d\x9e\x0a\xfd\xc8\x1c\x8f\x64\x17\x78\xf6\x78\x34\x83\x23\x55\x3c\x8f\x6b\xb5\xc9\xa0\x31\x13\x7e\x0b\xa3\x33\x7c\xd4\x0c\xce\xfa\x20\xab\xaf\x16\x10\xc1\x05\x3b\xd4\xd7\x12\x47\xa6\x2b\x30\x0e\x0c\x09\x1f\x36\x7a\xd5\xd5\x66\x0a\x31\x8c\x8b\xb7\x5f\xec\xb7\xd6\x68\x34\xc3\x22\xd6\x3b\x8f\x6b\x93\xe5\x7e\x98\xf1\x3f\x85\x31\xe9\xbf\x69\x86\x24\x3c\x86\x47\x82\xa1\x46\x30\xc1\xae\x74\x75\xc4\xf1\x68\xbf\x9b\xe7\xc9\xfe\x78\x38\x1e\x74\x7c\x6c\x52\xb4\xe8\x47\x83\x1c\xc8\xe1\xb8\xb1\xc5\xa2\x19\x0c\xa1\xda\x79\x5c\x8b\x61\x1b\x42\x6e\xf8\x25\xcd\x8e\xe6\x93\x66\x69\xdf\x1c\x76\x87\x00\xc1\x2b\xe3\xe1\xe7\x05\xab\x21\xcf\x0a\xfa\xd9\x38\x08\x0f\xeb\x87\x87\x87\x83\x5e\x98\x8b\xcf\xa6\xb5\xfc\x61\xbf\xdf\x13\x4b\x24\xda\xf9\x00\x6b\x9d\xc7\xb5\x17\x1c\xaa\xe8\x99\xcc\x84\xdf\xc2\x28\x0c\x1f\x43\xeb\x5d\xd8\x56\xb1\x0d\xe3\x50\xea\x39\x74\x15\x4e\x0d\xc3\xc4\x7a\xe7\xe9\x04\x38\x73\x26\x43\x9d\x38\xf1\xbb\x4a\x4d\x24\x32\x90\x2a\x49\x10\xad\xd5\x7a\x15\xae\xd7\x78\x2b\x9d\xee\xe0\x9b\x59\x3d\xac\x17\xeb\xad\xaa\x25\xf2\x40\x0e\xe4\x88\xb5\x84\x3a\x18\xc2\x3e\x98\xe3\x98\x5e\x5c\x31\xf7\xd0\xf9\x85\x31\x81\x81\x69\x5d\x31\x0b\x35\xc0\x75\xde\x05\x7f\xbd\x9e\x39\xc3\x7f\x30\x1f\x03\x68\xcb\xec\x6e\x50\xb3\x54\xd1\x1c\x90\x3b\x24\x9f\xf1\x7a\xbb\x9e\x3f\x80\x37\x36\x95\x98\xb8\x74\x78\xdf\x8d\x04\xa2\x93\x3d\x8b\x20\xe8\x5b\xcd\x1d\x49\xf6\xf1\x96\xfb\x44\x07\x2c\x20\x1c\x73\x99\x55\xd9\xe5\x70\x06\x2e\x4f\x8c\x88\x4f\x0e\x3a\x7e\x62\x2c\xd3\x5f\xd4\x5d\xdd\x6e\xb6\xfa\xae\x0e\x6f\x8b\x7e\xc5\xae\x26\xe1\x0d\xba\xfa\xf0\xe0\xe9\xbb\x3a\xdc\x6b\xfd\x15\xbb\x1a\x9f\x6e\xd0\x55\xcf\x7b\x78\xd0\xf7\x75\xb8\x53\xf1\x2b\xf6\xb5\x8e\xc7\xf6\x55\xc2\x61\x1d\xe3\x1d\xa5\xdf\x86\x7a\x45\xbb\x0a\xc2\x65\xd5\x79\xcc\x8a\xc4\x3d\x64\x69\x55\x64\xb1\x35\xb5\x5d\xd8\x48\x96\x0b\x96\x25\xf8\x76\xbe\xed\x8e\x13\x9c\x6f\x1d\xbf\x49\xb8\xcb\x3b\xd8\x9b\x42\x78\xe6\x70\x9b\x24\x60\xfa\xe5\x10\x53\xbd\x71\x94\x3f\x82\x5c\x25\xb5\x2a\x08\xec\x81\x84\xab\x30\x30\x05\x81\x65\x11\x7b\xdb\xf0\x63\x70\x59\x73\x16\x73\x6f\x5d\x3a\x24\x28\xe9\xb6\xdf\xcd\x2e\xd5\xac\xc9\x55\x70\x0e\xc2\xec\x45\x2e\x15\x15\x7e\x5e\x90\x23\x29\x4a\xb7\x20\xe1\xe5\x40\x42\x37\xc9\xba\x10\x67\xf4\x77\x37\x73\xe4\xe1\xe3\x29\xea\x13\x14\xfd\x82\x0d\xf8\xe3\xa3\x9b\x94\x2e\xa9\xf3\x20\x55\x5a\x7a\x7c\x1e\x23\x93\x08\x35\x39\x4e\xc6\x18\x2c\x7c\x14\xde\xc1\x6d\xb3\xd8\x87\x6d\x09\x97\x22\xc5\x01\x4c\x6c\x0e\xfd\x17\x5d\xc4\xd8\xce\x7c\xf3\xfc\x65\xbf\x94\xfa\x60\xe5\xe6\x7b\x9e\xc7\xc1\x81\x9c\x59\xfe\x2a\x9e\x5c\x90\xa1\x26\xcb\x83\x43\x54\xbd\x72\xf1\x75\x21\x92\x2e\x1f\xc7\x8c\x1f\x88\x1f\x0b\x12\x84\x59\x1a\xbf\xfe\xa4\xde\x1e\x0d\x66\x9a\xdc\x08\x97\xf0\x22\x0c\x2a\xf2\xf4\xe6\x27\xae\x01\x31\x29\x46\x15\x25\xc6\x3a\x14\x0f\xad\xe7\xc6\xd9\x21\x88\x4d\xb5\x93\x2c\xad\xce\x62\xa5\xa6\x37\xaa\x44\x06\x4d\x7a\x16\x9e\x41\x43\x46\x90\x22\xea\x12\x88\x29\xe4\xaa\x49\xe7\xc8\x8d\xeb\x20\x39\xca\x06\x9a\xec\x3a\x4c\x8c\x59\xa6\xe4\xf1\x92\x27\x0f\x2b\x4b\xc4\x30\x13\x3f\xb2\xc4\xb1\x96\x1a\x72\x88\xbb\xc5\x50\x80\x7c\x43\x5c\xee\x24\xa6\x3e\x7b\xd5\xf8\x2d\xd5\x3d\xf7\x68\x22\x25\x65\x45\x24\x67\x9c\x5d\x9a\x9f\x46\x8b\x62\x74\xf6\x76\x06\x46\xaa\x25\xa1\x62\x35\x45\xa6\x01\x5b\x8a\x3a\x7b\x16\xa3\xc8\xb7\x24\xc9\xd7\xd0\xc4\xe2\x9b\x1b\x89\xe2\xa4\x21\x8f\x83\x88\x65\x93\xb1\x5e\x33\x91\xb5\xd0\x6a\x08\x3d\x0d\x61\x96\x27\x9a\x2a\x15\xde\xac\x73\x78\x69\x6f\xab\xe5\xb5\x42\xd5\x0f\x3c\xe0\x3f\xb3\xd0\xbe\x36\x15\x45\x41\xb3\x8a\x6f\x2b\x34\xc5\x67\x7e\x11\xec\x11\x8d\x39\xe2\xb7\xd6\x08\x66\x8c\x98\xc4\xc1\x10\x4d\x1c\xef\x24\x4a\xa2\xa7\x26\x90\xd1\xa7\x8f\xe8\x6f\x4b\x1c\xbc\xdb\x80\xe8\xd0\x1f\x29\xde\x9f\x66\x0e\x56\x94\x5c\xe2\x2a\xca\xfb\x6c\x9f\x58\x70\xfb\x2e\xa5\x12\xb2\x52\xe0\xb1\xf0\x69\x35\x96\xc6\x4c\x97\xc4\x00\xd4\xd5\xce\x32\x2e\x89\x9f\x90\xeb\x80\x41\x5f\x17\x12\x1a\x8f\x08\x0d\x23\xc4\xf6\x8d\x0c\x31\x9d\xc1\x27\xbb\x88\xce\x78\x20\x5a\xa9\x15\x96\xfa\x4a\x1b\xf1\x16\x61\x90\x10\xdc\x16\x63\x11\xc3\xeb\x82\x04\x6f\x03\xf6\x60\x5f\x66\xf1\xa5\x22\x08\xaf\x97\x68\x7a\x51\xd7\xd4\xc2\x8f\x9d\xcd\xf4\x93\xf3\xbf\x1d\x58\xca\x54\xfd\x0c\x81\xe8\xad\x2c\x0c\x40\x61\xba\x49\x6d\x83\xca\xaa\x3c\xab\x7c\xc3\x43\x7e\x11\x31\x61\x43\x2f\x3f\xec\x62\x13\xcb\x08\x52\x3e\x3a\x07\xd2\xa6\x46\xc2\x13\x92\x88\xc9\x41\xb6\x6a\x26\xb1\x96\x8d\x23\x53\x56\x41\x15\x1d\x3e\x68\x13\x59\xf6\xad\x2d\x3d\xdf\x90\x0d\x76\xfe\x1c\xc4\x51\xe8\x1e\x09\x09\xe9\xfa\x81\xa7\x74\x52\x5e\x4a\x13\xa6\x9f\x31\x79\x48\x9f\xa3\x1e\xb6\x5d\x65\x19\x55\x36\x5a\x11\x6c\xee\xa1\x75\xad\x43\x06\xff\xec\xb2\x5c\xce\xdd\xcd\x55\x99\x74\x7d\x16\x35\x79\x41\x80\x5d\x9b\x7b\x93\x96\x09\x4b\xff\xdf\x8a\xee\x59\x36\xdb\x99\xb3\x79\xa0\x5b\x96\x87\x7b\xfd\x96\x13\xd5\x3b\xf4\x1f\x8e\x8d\x46\x45\x24\x02\x34\x7c\x97\x55\xcf\x4b\xc0\x4c\xeb\x88\xee\x1f\x42\xe7\x91\xfd\x49\x67\x22\x2f\x30\x33\x63\x4d\x40\x57\xd4\xd6\xc3\xd1\xc8\xa5\x1c\x85\x78\x4a\x75\xa1\x71\x7e\x93\xc0\xbe\x0b\x46\xc9\xd0\x0c\xe6\x90\xee\x05\x54\xd2\xd5\x98\xcb\xe3\x9e\xcf\x65\xc6\x0d\x74\x94\x04\x27\xf2\xe8\x5c\x8a\xf8\x1d\xdb\x83\x05\x8f\xec\xcb\xfb\xf2\xf9\xf4\x6d\x9d\xc4\xb3\xb7\xcb\x43\xf9\x7c\x72\xea\x24\x4e\xcb\x8f\x77\xe7\xaa\xca\x1f\xdf\xbf\x7f\x79\x79\x99\xbf\x2c\xe7\x59\x71\x7a\xef\x2f\x16\x0b\x5a\xf9\xae\x99\x7b\x1f\xef\x76\x77\xed\xba\xca\xfe\x7c\x8e\xc8\xcb\xef\xb3\xfa\xe3\x1d\xbb\x96\xef\xec\xee\xde\x2e\xc9\xdb\xe5\x21\x0f\xaa\xb3\x73\x8c\xe2\xf8\xe3\xdd\x5b\x7f\xd9\xf4\xe6\xce\x09\x3f\xde\x7d\xef\xcf\x97\xce\x66\xbe\x5d\x7e\x37\xdf\x38\xab\xf9\x7a\x79\x70\xe7\x2b\xd7\x9b\x2f\x56\xf3\xd5\xc6\xf5\xe6\x2b\xc7\x9b\x7b\xee\x7c\x17\x7b\x73\xcf\xa1\x3f\x97\xf3\x95\xbb\x9c\xef\x0e\xf3\x8d\x3b\xdf\x2c\x1d\x8f\xfe\xeb\x6f\xe9\x42\x32\xdf\xc6\xee\xca\x59\xcd\x37\x14\xc5\x72\xbe\x76\xe7\x3b\x86\xca\x9b\x7b\x3f\xdf\xbd\x6f\xe8\xa0\x94\xbf\x5d\x92\xa7\x37\xf7\x22\x5f\x0a\x92\x93\xa0\xa2\xf3\xb3\xfd\x53\xac\x00\x96\x38\x76\x0c\x32\xec\x81\x5a\xd6\x7b\xbb\x96\xf9\x40\xf5\x02\xf8\x66\x92\xb6\x50\x3d\xd0\xb2\x83\xc1\xbf\xdb\x8b\x53\xb3\xf3\x54\x09\x15\x74\x83\xa8\x45\x4b\xef\xc9\x10\xd4\x02\xf4\x64\xf0\xd4\x61\xfb\xe2\x56\xe4\x91\x22\x41\xf0\x05\xf1\xa6\xab\xba\x46\x9a\xc5\x41\x69\xd2\xd4\x0d\x23\x80\x91\x87\x1a\x88\x1d\x81\x68\xa1\x9e\x44\x74\x06\xaa\x09\xad\xb2\x5c\x23\x3b\x06\xd9\x52\xc9\xc3\xe1\x52\x56\x59\xe2\x36\xec\xed\xf5\x0b\xf7\xf5\x2a\x05\xd3\x4b\xa6\xdf\xad\xdd\x1a\x1d\x73\x4b\xed\xb2\x1a\xb4\xcb\x5a\xd0\x2e\x2b\x67\x8d\x6a\x97\xe6\x54\xb0\xd5\x2e\xce\xe2\xbb\x85\xe3\x9f\x57\x3f\x27\x0b\x67\xfd\xdd\xc2\x59\x9e\x57\x88\x32\x68\xd9\xde\x79\x8c\x1b\xf1\x79\xbf\xcb\x6b\xc7\x5b\xe4\xf5\xa0\x13\x66\x6c\xed\xfc\x9b\xf2\x6c\x39\xd4\x4f\x3a\xc6\xb6\xf7\x23\x75\x1b\xa7\x6a\x6d\xa5\xba\x57\x73\xb8\x6c\x7f\x55\x3d\x27\xef\x0c\x7a\x3b\x41\xda\x47\xc8\x95\x39\xbb\x42\xbf\x8d\x10\xcc\x53\x6b\x2a\x4c\x26\x91\x11\xb4\xb3\x91\x0c\xd4\xcb\xed\x58\x54\x9f\x60\x44\xb5\x63\xde\xb9\x32\x04\x92\x85\xd2\x8e\xef\x18\x10\x47\x0e\x06\x37\x86\xff\xe3\xa9\xea\x72\x11\x4e\xa5\x8e\xcf\x65\xa8\x92\xf3\x91\xc4\x3e\xb2\xe1\x22\x57\x13\x6d\x8b\x07\x25\x7e\xb9\x3a\x10\xb5\x83\xbc\x2f\x1d\xdb\xb5\x46\x2b\x5c\xdb\x31\x2b\x2c\x20\x09\xf8\x0d\x34\x8c\xa9\x4f\x4d\xea\xcf\x96\xe3\xf7\xb7\xe9\xe1\x38\x9c\xd3\x65\x90\xa5\x97\xc6\x67\x0b\x2b\x12\x26\xf0\x50\x1d\x9b\x1f\x03\xc4\xed\x08\x92\x06\xdc\x92\x2c\x0d\xdc\x17\x5b\x99\xa2\xf4\xab\x3a\x4c\xc2\xc3\x72\x0d\xf8\xd9\xb5\xfe\x7f\xad\xcb\xc4\xf7\x17\x33\x67\xbd\xbc\xda\x65\x22\x30\xd2\xc6\x69\x82\xf2\xde\xe8\x36\x69\xa1\xa8\x90\x8a\xa2\x33\xb3\xaa\xcd\xbb\x4f\x0c\xe8\xf0\x1a\xd7\xba\x51\x5a\x3c\xc8\x9e\xb7\x6b\x0c\x9b\x6d\xbd\xe8\xfe\xe5\xb9\x52\x3c\x7f\xd8\x0e\xd0\xbf\x1b\x9b\x9f\x8a\xff\x9d\x53\x56\x45\xf6\x99\xb0\x1d\x40\xd3\x03\x61\xbb\xe0\xf9\x8e\xe7\xb7\x1b\x86\x43\x54\x1c\x62\xe2\x1c\xea\x8f\x77\x9b\x3b\xe7\xf0\xca\xfe\x29\x3e\xde\xad\xe6\xeb\xce\x96\x67\x7b\x8a\x06\xa7\x4b\x05\xff\x4f\x59\x94\x7e\xbc\x63\xfd\x6a\xb6\x16\xeb\xf9\xce\x59\xce\x37\xe7\xf9\xea\xbb\x8d\xb3\x99\xaf\xfb\x5d\x80\x8c\x7c\x37\xf7\x19\xfa\xf9\xe6\x6e\xd8\xa6\x74\x44\x76\x74\xb3\x5e\xfc\x35\x7b\x61\x5a\x99\x53\xfa\x61\xb8\x72\x93\x64\xea\xd7\x01\x41\xdb\x8c\xf3\xc4\xf4\xb3\x46\xe1\x8b\xe1\xe6\xce\xaf\xe5\x8d\xe9\x89\x54\xfa\x63\x74\x64\xfe\xe5\x79\x64\x06\x55\x25\xed\x5b\xaf\xd0\x55\x7f\xf3\xca\x7c\x19\xaf\xcc\xff\x7d\x7a\xf8\x57\x71\xe8\x88\x1a\x53\x35\x35\xbe\xaa\xca\x94\x7d\x22\xc0\x72\xb1\x74\xeb\x68\x20\x78\xc7\x82\x60\x46\x8f\xa0\xc4\x6c\xb4\x59\x81\xeb\x1d\x3c\x86\xf6\x2c\x41\x6e\xe5\xe8\x01\xa8\x47\xba\x7a\x0c\x90\x63\xc6\x64\x0a\x65\x16\xdb\x6f\x4b\x0c\xfa\x39\x30\x9a\xe0\x1b\xb8\x7c\x46\x62\xc2\x5f\x78\xae\x36\x8b\x4d\xa8\x7c\x40\xd4\x95\x8e\xef\xde\xb5\x6e\x9f\x51\x78\x6c\x1c\x3f\xf6\x5a\xc8\xdc\xaf\x9b\xb9\x7e\xae\xc0\x3a\x5d\x1e\x81\xaf\x45\x96\x7d\xb3\x9f\x45\x07\x73\x4b\xa2\x26\xb8\x80\xcc\x90\x5f\x6c\x25\x63\x0a\x19\xbd\x2a\xc4\xdf\x31\x3b\xc6\x14\x75\x91\xbd\x0c\xf7\xcc\xf0\xbb\x43\x32\x5a\xe9\xe6\x17\x72\xd1\xd8\x94\xf2\x13\xe2\x03\x0c\xc1\xc8\x55\x5f\x6a\x72\x9c\x3f\x5d\xca\x2a\x3a\xbe\x32\xc9\x24\x69\x25\x94\xa2\xd7\x58\x7f\x91\xda\x97\xae\xff\xe1\x54\xa0\x31\x33\x55\xbc\xd4\x11\x3d\x8a\x2c\xe1\x1d\x85\x78\xf1\x0b\x79\x81\x04\xa8\x13\xe3\x5d\x25\x51\x18\xc6\xc4\xa6\x3d\xf1\x32\xb1\xae\x65\x04\x15\x9b\x09\x0d\x4b\x67\x72\x29\x67\xe4\x75\xf8\x45\xea\x95\x04\x0e\x72\x77\x5b\x69\x91\xd9\x87\x5d\x9a\xd3\x92\x05\xaf\xc5\x29\x2f\x44\xb6\x42\x53\x9e\x8b\x28\xfd\x3c\x04\xe5\x95\x6f\xcc\xc9\x77\xe6\x06\xdf\xac\x26\xca\x1f\xc6\x6a\x41\x8a\xa6\xb1\xc8\x88\xde\xe5\x66\xb2\x4a\xcc\x1b\x85\xb2\xaf\x52\xfc\x2a\xe3\x20\x57\xe8\xbb\x2b\xe4\x72\x39\x7b\xa5\xd1\x4a\x38\x20\x57\x23\xfc\x97\x92\x14\xdd\x0e\x64\x70\x2d\xdb\x5f\x52\x1f\x1e\x64\x89\x35\xc6\xbf\x2e\xb3\xbc\xcc\x8d\xbe\xed\x52\x3f\xea\x12\xba\x82\x3f\xfc\xfa\xda\x0f\xc3\xfa\x31\x37\xbd\x07\xdb\x57\xa9\x21\x44\x1a\x1b\xf3\x90\x1c\xb2\x22\xe0\x90\x0c\xf0\xdd\x8e\x72\x5f\xd1\xd5\xab\xdf\x3c\xde\xea\xe1\x16\x45\x0b\x9e\x5a\xd1\x16\xfb\x3b\xc1\x7f\xe6\x9e\x50\x2d\xe6\x9b\x35\x47\x19\x33\xaf\xba\xca\xf7\xec\x67\x8f\xaa\x65\xd5\xe1\x52\x94\xb4\xcb\x79\x16\xc1\x65\x38\xe0\x9b\x7d\x4a\x8f\x11\x89\xc3\x92\x80\xfb\xc8\xc1\xc0\xe5\x16\xd8\x25\xcf\x24\xad\x4a\x99\x45\x7d\x3c\x36\xdb\xb7\xf6\x8b\xc5\x76\x8f\xbf\x8c\xeb\x4b\x24\xe4\xe3\xde\x9e\x7f\xb3\x58\x6c\x1e\xc2\x07\xbc\x89\x8d\x7f\x38\xa0\x4d\x80\xa1\xee\xbe\xcd\x91\x37\x7f\xd7\x35\x6b\x92\x95\xe5\x6e\xe6\x78\xab\x41\x58\x78\x59\xe9\xe9\xe2\x65\xa6\xef\x02\x2f\x3b\x5f\x6a\x2c\xb4\x92\xf7\xd8\xc6\xe1\x70\xec\x41\xe6\x43\xe8\x8e\xf2\xdc\x1c\x62\x71\x7d\x2d\xb2\x3c\xcc\x5e\xe8\xa2\x76\x3a\xc5\x64\xcc\x68\x0c\x3c\x17\xfa\xb6\x3e\xec\xa7\xf7\x0d\x93\x14\xab\x1e\xb6\x80\x76\xfd\xe4\x7d\x55\x57\xc8\xcc\x10\x83\xcf\x96\x73\xe0\x9d\xa8\xc0\x39\xe1\x19\x02\x87\x7e\xe4\x1c\x5d\x07\x1b\x7f\xb3\xc3\x1a\x59\xaf\xd6\xfb\x8d\xaf\x68\x04\xf2\xbe\xff\x3a\x72\x9e\x5a\x34\x6d\xe2\xb9\xb7\xa4\x5a\xbd\xe1\xbc\x96\xe9\xe2\x54\x1d\x7a\x32\x7a\xb2\x4e\x1c\x96\x11\xd3\xd5\x12\x48\x31\x61\x41\x9f\x27\x4e\x59\x8e\xfd\x7c\x1c\x15\xb2\x5e\xaf\xf7\x57\xf4\x10\x17\x9c\x2b\xa6\xad\xb2\xb7\xf6\x13\xd7\x28\x44\x6d\x54\x46\x5b\xf6\x71\xd7\x3f\x74\xb7\x56\x00\xf2\x91\xb3\xd6\xf7\x76\xbb\x25\x3a\x75\x3c\xb2\x25\xcb\x15\xda\x04\xc7\xfa\xe6\xdb\xc8\x19\x6b\xd1\xac\x89\xd9\x5b\x7f\xe6\x78\xbb\xc5\xcc\x79\xd8\xaa\x59\x2d\xcd\xd6\xb6\x07\xa3\xe7\xea\xa4\xa1\x18\x33\x53\x6d\x40\x54\xf3\xb4\xeb\xeb\xc4\x59\xca\xb1\x9c\x1f\x8c\xc3\x76\xb5\x5c\x4c\xee\x1b\x26\x28\xd7\xcc\x50\xbc\x9f\xf6\xf3\x53\x2f\x32\x2c\x4a\xa7\x35\xcf\xb6\x81\xbf\xc7\x05\xb8\x2b\xe1\x31\x8f\x9c\x97\xde\x72\xb7\x7a\xd8\xa0\xf8\xbd\x6d\xb0\xdb\xcb\xf8\x21\xaf\xe9\x87\x91\x33\xd2\xa2\x41\x13\x7b\xd7\x54\xf1\x6d\x37\x33\xc7\x7b\x58\x2b\xf8\x2b\xce\x47\x46\xf9\xe8\xc9\x38\x9e\xf9\x23\x66\xa2\xb9\xbe\x62\x1a\x36\xfd\x9b\x3a\x07\x21\x93\xf9\x2e\x2d\xb6\x8b\xed\x71\x5a\x97\x24\xa1\xb8\x62\xf6\x61\xdd\xb3\x9f\x7a\x06\xd9\xe8\xa2\xb1\xda\xc7\x3e\xff\xe6\x78\x3c\x78\x8b\xed\x07\x34\x60\x6b\x5b\x22\xe1\x1f\x1d\x61\xfd\x1b\xb2\x08\x76\x0b\x34\x1c\x5e\xb8\x7c\x20\x8b\x05\xda\x0a\xe4\x7a\xfb\x0d\x9b\x8d\x57\xb7\x6c\x3e\x10\xa0\x0a\x6f\xcb\xfc\x15\x6a\xa6\x8b\x73\xb2\xeb\x05\x3e\x2d\xbf\xc0\xa0\x8c\x98\x9c\x56\x20\x8a\xf9\xd9\x77\x57\x37\x45\xf5\xdd\xe3\x38\xcf\x75\xef\xb0\x79\x58\x2b\xa4\x61\xf4\x44\x1d\xd3\x49\x7c\xae\x2a\xba\x6a\x3f\x5d\x0d\x92\xd3\x86\xe8\xb5\x55\x6e\xdc\x09\x96\xee\xf0\x6d\xc0\x3d\x72\xb9\x3c\xec\xfc\xe5\x72\x89\xb5\xb0\x0f\x7d\x4f\x30\x61\xda\x16\x20\xcb\x9b\x4f\x23\x97\x4c\x8b\x46\xcd\x7c\x5e\xcf\x9c\xdd\x52\x61\x91\xb4\x54\x09\xf3\xb3\x25\x7f\xf4\xaa\x39\x65\x14\x46\x4c\x4d\x1b\x08\xc5\xcc\xec\xfa\x39\x71\xed\xe4\xb8\xcd\x8f\x83\xef\x1d\xfd\x70\x6a\xc7\x10\x09\xb9\x62\x4e\xe2\x9d\x1c\x33\x25\x75\xa2\xd2\x04\x60\x1d\xa3\xa9\x77\xc7\x87\x63\x80\x6a\xea\xae\x44\xc0\x3e\x61\xf1\xf4\xc9\x86\xa0\x6d\x84\x01\x59\x90\x35\xd2\x06\x64\x39\xfb\x32\x61\xe1\x34\xb7\x6a\xe4\xb5\xb7\x99\x39\xbe\xb7\xa5\xff\x79\x50\x71\x5b\x9c\x97\x4d\x07\x26\xad\x9a\xe3\xc7\x62\xc4\xc4\xb4\x00\x50\xcc\xcb\xb6\x9b\x57\xac\x97\x90\xe1\x82\x0d\x13\x3e\x84\xc7\x89\x1d\x93\xa5\xe4\x8a\x79\x89\x76\x72\xc4\xb4\x34\x88\xca\xb4\xb0\xc5\xc8\xf3\x37\x2e\xa0\x71\x87\x79\xac\xb7\x67\xe9\x6f\x7d\x7c\x97\x11\xfa\x9e\xbf\x92\xf1\xf3\x2a\xb0\xf8\x3c\xd6\xcf\x63\x6e\xd0\xc4\xe0\x9d\x3f\x73\x76\xbb\x99\xf3\xb0\x54\x70\x57\x5e\x1f\x8b\xcf\xe3\x57\xc7\xf1\xac\x1f\xb5\x36\x9a\xea\x2b\x57\x46\xda\xbf\xa9\x7b\x4a\xc8\x62\x61\x9b\xec\x05\x5e\x38\xad\x4b\x92\x48\x5c\xb5\x26\xca\xdd\xb3\x9f\x7a\x5a\xc9\x68\x4f\x74\xf1\xd3\xcc\x51\xc7\x64\x02\xa6\xd1\x47\x97\x57\x34\x05\x59\x2d\x94\xcd\xad\xd9\x24\x1c\x57\xeb\xf9\x24\x4e\x26\x91\x22\x7c\x5e\xc1\x4e\x1a\xae\x4b\xa8\x3b\x3b\x62\x3e\x8d\x02\x55\x4c\x2d\xa9\xe3\x93\x8f\x25\xaf\x18\xe0\xd1\x13\x6e\x4a\xcf\xf1\xb9\x67\xe8\xff\xe3\x8d\xe5\x4b\x71\x6a\x39\xea\x0c\x4c\xc2\x35\x72\x2e\x5e\xd9\x18\x36\x0e\xe8\x91\xa5\xe1\x94\x68\xb1\x9b\x39\x1e\xb5\x18\x3c\xdf\x8a\x63\xaa\x39\x69\x3a\x7a\x84\xdd\x1d\x3d\x2b\x27\x9d\x37\x8e\x04\x36\xcc\xcc\xeb\xcf\x1f\xaf\x1c\xf0\xc9\xb3\xf3\x16\xe7\x91\x46\x2e\x3c\xde\x5e\xe2\xb0\xf3\xc9\x51\x27\x5f\x02\xa6\xb1\xe6\xe9\x35\x4d\xa1\xe3\x20\x1f\x4e\x8e\x7a\x47\xaf\xe7\x93\x72\x5e\x6a\x0f\x19\x61\x27\xc7\xcf\xca\xf1\x27\x8b\xa3\x40\x4d\x33\xf2\xca\x93\xc6\xab\x06\x78\xfa\x6c\xbc\xfa\xe4\xd1\xd0\xff\xc7\x1b\xcb\x97\x7c\x12\x39\xea\xc4\x0b\xa2\x19\x7b\xec\x38\xb9\x1d\x8c\xf1\xe2\x31\xa4\x61\x27\xbd\xa4\xbc\x61\x47\xb4\x2b\x03\x73\x54\x33\x4f\x73\x9c\x08\x7b\x36\x7a\xda\x8d\x3d\x43\xb4\x87\x33\x4c\xb8\xeb\xce\x14\x27\x0f\xe6\xe4\xa9\x76\xe5\x19\xa3\xae\xdb\x8f\xb7\x16\x24\xf4\xcc\x71\xd4\x01\x96\x80\x69\xbc\x83\xf4\xaa\xd6\x30\xfe\x23\xa7\x8d\x06\x5e\x51\xa3\xdd\xa3\x3b\xe8\xad\x99\x55\xaa\x69\xa7\x3f\x31\x84\x9d\x1c\x3d\xf3\x26\x9c\x11\x8e\x02\x35\xcc\xbf\x1b\x9c\x19\x5e\x35\xc6\x93\x27\xe2\xf5\x67\x88\x06\x16\x3c\xde\x58\xc4\xb0\x23\xc5\x51\x27\x56\x3c\xa2\x91\xeb\xde\x35\x2d\x61\xec\x97\xcf\x13\x47\x3d\xdd\xd3\xf2\x48\x35\x0b\xb5\xe7\x82\xb0\x83\xa3\x27\xe1\xf8\xc3\xc0\x31\x90\x86\x29\x78\xe5\xe1\xe0\x35\x23\x3b\x79\xf6\x5d\x7d\x58\xa8\xef\xfc\xe3\x8d\xe5\x0a\x39\x3c\x1c\x75\x24\xc5\xe1\x99\xb0\x0a\x4e\x6f\x0b\x63\xbe\x74\x6c\x68\x60\xd1\x6a\x37\x73\xfc\xd5\xc3\xcc\xf1\xd7\x0b\x13\x93\x54\x73\x4f\x77\xf6\x07\xbb\x37\x7a\xea\x8d\x3e\xed\x1b\x01\x68\x98\x78\x57\x9f\xfe\x5d\x31\xae\x93\x67\xde\xb5\xa7\x81\xda\xce\x3f\xde\x5c\xa8\xe4\xd3\xc1\x51\xe7\x50\x10\xcd\xc8\x15\x6f\x7a\x3b\xb8\xc2\xe3\x8f\x06\x0d\x97\x01\xfd\x99\xb3\xde\xcd\x9c\xcd\xca\xc0\x1a\xf5\x52\xa7\x3c\xe2\x83\xfd\x9a\xb0\xd0\x8d\x3b\xd7\xb3\x87\x33\x2e\x72\x57\x9c\xf3\x4d\x1f\xca\x2b\x16\xb8\xab\xce\xfd\x74\xdd\x7e\xbc\x8d\x18\xc5\x51\xda\xce\x2c\xed\x83\x61\x70\x7a\x63\x7c\x3c\xca\x70\x62\xd3\x6c\xb1\x58\x6f\xf6\x4b\x1c\xc9\x25\x0d\x49\x41\x3b\x2b\x63\xe2\x6f\x31\xa4\xdc\x04\x1a\x83\x47\xba\x87\x92\x0e\x13\x47\x79\x22\x60\x7c\x06\x1a\x9f\x5a\x7c\xec\xbd\x7e\x9b\x4e\x75\x78\x45\xfa\xc5\xf3\x3f\x35\x57\xfe\x13\x8e\x88\x26\x53\x2f\x46\xc4\x97\xcc\x92\x45\xdb\x67\xef\xcf\x47\xe5\xd4\x1b\xa0\xbe\x75\x44\x14\x7c\x6c\x55\x18\xfa\x93\x4b\x6d\x58\x5e\xf6\x49\x54\x3d\xbd\xf9\x69\x80\x17\xb3\x1f\x16\xa4\x24\xfa\x1a\xfb\x4b\x55\x65\x29\x57\x45\x19\x9f\x63\x7e\x0c\xc2\x56\xef\xc0\xa7\xd8\xed\xa3\xe5\xf6\xc1\x37\xe5\x60\x50\x4c\x4c\x02\xda\xe3\x37\x26\xff\x0c\x42\xd2\xa8\x14\xaa\x38\xee\xc5\xd7\xd3\x30\x01\x5f\x1c\xe4\xa5\x5c\x57\x0c\x12\xcb\x55\xef\xfd\x3e\x8a\x68\x0c\x9d\x80\x2c\xb8\x94\xb7\x8f\xce\x39\x0a\x43\x92\x4a\x2f\xee\x9b\xea\x54\x80\xdb\x07\xf1\xd3\xb8\x23\x12\x67\xe2\xd1\x50\x7f\xce\x06\x93\x1b\xd7\xc5\x07\x24\xb1\x19\x8f\xb1\x01\xba\x1d\xd5\x90\x0a\x13\xed\x54\xeb\xb3\x30\x20\xec\x2f\x16\xcb\xa2\xfb\x41\x17\x83\xee\xef\x98\x1c\x2b\xcd\x48\x0d\xb8\xa4\x85\xf3\xe5\x1c\x55\xc4\x2d\xf3\xa0\xc9\xfe\xd9\xc6\x60\x41\x01\x1e\x1f\x83\x63\xd5\x29\x75\x75\xe4\x09\x3e\xb6\xc6\xdc\x5f\x77\xb1\x8f\xc5\x98\x12\xb0\xac\x0f\x99\xf1\xf4\xe6\xe9\x0d\x54\x36\x5d\x72\x32\x92\x34\x41\x23\x38\x45\xd4\xa7\xc3\xea\x4a\x55\xb9\x0f\xf9\x38\x1a\xed\xc7\x8e\x42\x15\x34\xce\x04\x92\xe4\xd5\x2b\xc7\x0a\x45\x02\xae\x1e\x30\x21\xe9\xe5\xda\x88\xce\xde\xa2\x5d\x91\xe5\xa0\xce\xc7\x38\x0b\xaa\x47\x06\xd6\xf0\x7f\x88\x1a\xe4\x2d\x3a\x7d\x2e\x2e\x44\x30\xad\x18\xfd\xe8\xb5\x2b\x83\x26\x5d\xa5\x21\x78\x48\xdf\x7e\x1c\x95\x95\x5b\x56\xaf\x31\xd1\x86\x07\xb9\x26\x93\x73\x77\xa1\xa2\xfd\xff\x73\x6f\x6d\x15\x2f\x9a\x1b\x11\x77\x98\x33\x85\x30\xf9\xb5\x23\xd9\x48\x1d\x07\xb8\x00\x50\x30\x35\xa2\x29\x8e\x13\x8f\xb7\x4c\x00\x49\x32\x51\xbc\x60\xfc\x82\x23\x00\xb4\x09\xd4\x09\xf4\x21\xe9\xdc\x07\x22\xb7\x9b\x9d\x8a\xc8\x24\xbc\x92\xc8\x24\xbc\x11\x91\x0f\x0f\xbe\x8a\xc8\xf8\x74\x25\x91\xf1\xe9\x46\x44\x7a\xfe\x62\xa1\xa2\xb2\x8e\xaf\xa4\xb2\x8e\xa7\x50\xd9\x2e\x29\x0e\xa6\x9f\x98\x22\xea\x21\xfa\x0c\x9e\x68\xac\x7b\x34\xd7\xed\xdc\x93\x67\x1c\xd7\xd6\xaf\xbe\x92\x5c\xb9\x7e\xe0\x0b\x91\xfd\x4a\x82\x31\x63\xd4\x8a\xd2\x8c\xb8\x72\xf0\x9a\xfe\xe1\x0a\xcd\x3c\x8e\x5d\x3f\x90\x51\x14\xdb\xfd\x0b\x32\x09\x54\x83\xc6\xcd\x07\xf5\x40\xaa\xc0\xa5\x41\xb5\xe1\xc7\x55\x63\x89\xf0\x54\x62\x10\x87\x80\xe9\x0f\x3b\x59\x10\xcc\x8b\x5e\x34\xcc\xb9\x46\x11\x61\x10\xda\xfd\xfa\xb2\x30\x89\x14\x6e\x87\xa3\x81\x85\xa1\x39\x8d\xfd\x00\xe1\xe5\xbe\xaa\x50\xe3\x8a\xc8\x2c\xde\xa6\xde\x8f\x12\x60\x0b\x06\xea\x05\xb8\x17\xdb\x1f\x6b\x37\x8f\x83\x03\x49\x48\x5a\xfd\xaf\x8f\x4f\x6f\xaa\x2c\x7f\x7a\xf3\xd3\xcc\xd1\xd7\x62\xcc\xb0\xa8\xd7\xb0\xc5\xa2\x22\xed\x50\x9f\xd4\x59\xd4\xa2\x1d\x73\xb9\xec\xd7\x3d\xba\x30\x7a\x8e\xc2\x8e\x67\xfc\xc6\x78\x30\xb3\x81\xed\x8d\xee\x96\xa1\x30\x0c\xe6\xee\x37\xe4\x81\x1c\xc8\x51\x6e\x33\xaa\x48\x32\x25\x5f\x7d\x63\xec\x7b\x83\x1b\xe8\x10\x93\xa0\x78\xa4\x3d\x3c\x4f\x8e\x1e\x18\xa5\x67\x52\x44\x8d\xb0\xe2\xbb\xca\x31\x51\x02\x17\x78\x6f\x1b\xbf\x22\x1c\x46\xf6\x15\x79\x6e\xe3\x6d\xbc\x9d\xb7\xd7\xba\x2c\xf1\x77\x71\x1a\x5e\xcf\x7b\xb7\x36\xdf\x7c\xf3\x19\xf7\x44\x8f\x6a\x5c\xb8\x0b\xcf\x37\x0e\x1c\x98\x7c\xf3\xb8\x17\x33\x08\xf7\xeb\xbd\xd6\x8b\x69\xeb\xfb\xe7\xa6\x4c\xe3\xa1\xd6\xc5\x22\xef\xab\x9f\x49\x10\x4a\x5a\x58\xca\x64\x3e\x38\x47\xa5\xc4\x43\xfc\xb6\x5d\xe5\xab\x44\xdc\xb6\x56\x5e\x0d\xca\x3b\x7d\x32\x7a\xed\x94\x11\x67\xc3\xe0\xcf\xec\x42\xb7\x02\x97\x6c\xa7\x06\xed\xb2\xbd\x8b\x89\xc9\x95\xd1\x38\x85\x36\x5b\xb7\xaf\xa2\x69\xce\x27\x8c\x53\xd0\x84\xe9\xf5\x1c\x8f\x57\x72\x62\x03\xed\x2c\xd4\x35\x03\x0f\x00\x06\x2f\x86\x1a\x23\xf4\xf2\x73\x05\xdc\x49\x12\x2c\x01\x67\x45\x6a\x2a\xfa\x73\x15\x75\x15\x0b\x34\x73\x38\xc1\x15\xbd\xa9\xb2\x2c\xde\x07\x85\x36\x6e\x34\x95\xc3\xc7\x21\xce\xb1\x14\x2f\xb6\x89\x6d\x5b\x05\x45\x85\xa2\x86\x91\x81\x39\x27\xa6\x7e\xb0\xd8\x01\xd4\x31\x2a\xca\xca\x3d\x9c\xa3\x38\xbc\x9f\x21\xb5\x9a\x1f\x72\x5d\xc4\x06\x70\x3d\x90\x16\x0b\x6f\x2d\x0e\x7a\x04\xed\x81\x17\x6f\x23\x18\x49\x00\x08\x38\xb9\x1d\x16\xc8\xc6\x12\x1a\x7c\x3d\xb2\x19\x84\xd4\xf8\x22\x1c\x52\xd0\x47\x99\xa5\x25\x4f\xaa\x80\x3a\x1c\xdd\x32\x8f\xa3\x0a\x4d\xd3\xb3\x98\xaf\x37\xc3\xd9\x91\x10\x70\x19\x94\x69\xf0\xb6\x96\xde\x4c\xbd\x3d\x45\xeb\xe1\x3b\x17\xae\xea\x34\xe3\xb1\x43\x01\x4d\x48\xc1\xd2\x16\x4e\xbe\x9c\x6f\x15\x48\x14\x47\x62\xaa\xea\x0a\x0e\x2f\xb7\x4a\x06\xf7\x45\xf0\x34\xd0\x8e\x9c\xe1\x98\x70\x24\x39\x6a\x6a\x64\x62\xb0\x95\x87\x69\x98\x30\x2a\xc8\xa1\x0f\x82\x7c\x49\x52\x39\x82\x3d\xa7\x89\x74\x91\xad\x95\xcd\x59\x2c\x45\x88\x26\x93\xce\x06\x71\x9d\xad\x9f\xb0\x78\x3b\x06\xdd\xc6\x6c\x6e\x5c\xb5\xe1\xcd\x8f\xd3\x71\x3a\x9a\x0c\xca\x4e\xa9\xcd\x2c\x15\xca\x17\x67\xe3\x68\x05\x88\xab\x6f\x91\xda\xf6\x98\x0a\x13\x24\xae\x88\xd3\xd2\xdc\x98\x42\xfb\x51\x8b\xdd\xe1\x4f\x8b\x83\x30\xca\xe8\x6e\xd1\x16\x80\xc5\xaf\xdf\x67\xb5\x1e\x86\xa7\x73\x6c\x8b\x1a\x68\xd0\xbc\xf6\x9c\xa9\x39\x5e\xa1\x73\x1f\x1c\x9e\xdc\x9b\xef\x39\x48\x66\x87\xc9\x7e\xd5\x5a\x3d\x9c\x9e\x29\xab\x82\x54\x87\xb3\xf2\x7a\x00\x6c\xfa\x13\x9f\x65\x61\xa6\x2f\x1e\x92\x30\x20\x15\xb9\x24\x0a\xea\xf2\x63\xd4\x1d\x93\xda\xda\xcb\x43\x2f\xde\x8a\x87\x71\x8b\x0f\x5a\xc9\xd4\x74\x85\x2e\x12\x23\x7a\x4e\xab\x9b\x3a\xa8\xa8\x4f\x3b\x6c\xcd\xd7\x91\x64\xf1\x80\x63\x08\x44\x21\x15\xa4\xf2\xe9\x31\xcc\x14\x4a\xf5\x2d\x45\x43\x02\xd0\xd3\xc3\x24\xc9\x9a\x9a\xae\xf6\x18\x31\xfd\x16\x91\x5a\xb5\xd9\xae\xe1\xf6\xb0\x67\xd2\xf5\xdc\x54\x8b\x11\x81\xe4\x05\x32\x65\xf5\xe9\x77\x57\x4b\x15\xad\x56\x0d\xf0\xb8\x56\x56\xfd\x46\x57\x43\x2d\x0f\x14\x16\xc5\x0d\x36\x01\x26\x7d\x24\xab\x5a\x5d\x02\x22\x35\x36\xd9\x00\x41\x12\x35\x5d\x8d\x81\xdb\x12\xdc\x64\x0b\x67\xa2\x87\x1b\x14\x43\x06\xa9\x1b\x8d\x53\x63\x04\x9e\x87\xc4\x58\x51\x96\xde\xe3\x42\x06\xb8\x35\xb3\x44\x82\x08\xde\x74\x2c\x13\x47\xfe\x56\x68\xbf\xa8\x38\x08\xf4\xc9\x03\x50\x9d\xdd\x81\xbc\x77\x74\x07\xb6\x14\xf9\x87\xe0\x10\xf8\x7f\x15\x92\x86\x4f\x18\x0a\xf3\x18\xdc\x08\xeb\x17\x1d\x02\x37\x2f\x48\x4e\xd2\x50\x20\xdd\x0d\x72\xfa\x15\x57\x60\x4a\x24\xbd\xf5\x8f\x60\x32\xfa\x33\xfb\x15\xc0\x37\x36\x81\x2e\x68\xb0\x21\x74\x65\x59\x1a\xf1\xb6\xf7\x5a\x67\x86\x2a\xb0\x0c\x31\x5a\x87\xfa\x62\xc5\xab\x81\x0d\xec\xb5\xaa\x61\x22\xa0\xab\x3e\x85\x78\x1d\xac\xb8\xe1\xd3\x5b\x3a\x3d\x1f\x10\xb7\x92\x12\x06\x0a\xad\x5d\x2b\xc8\x91\x82\x61\x95\x36\xa5\xbe\x32\x1d\x87\xf0\xd7\xca\xc5\x73\x3b\xf4\x2e\x77\x9f\x61\xe2\x61\xbd\x58\x6f\x75\xa9\xc0\xec\xcf\xf2\x86\xb3\x33\xec\xd2\xde\x37\x07\x12\xae\xc2\xc0\xe6\xa2\x9e\xc4\x4d\xe5\x66\x59\x5f\x53\xda\x18\x8b\xb7\x1d\xe4\xe6\x1a\xcf\x9c\xb4\x64\x77\x69\xd4\x45\x25\xdf\xd6\x47\x92\xf2\x75\x0c\xe7\x72\xa9\xd3\x81\x72\xbe\x75\xfc\xbc\xbe\xb7\x6c\xdd\xa2\x3d\xbc\x0a\x26\xf7\x9f\xcc\xb3\x4d\x06\x6e\x27\xc0\x24\x58\xd0\x30\xa2\x44\x74\x6d\x7d\xcd\x27\x14\x90\x82\xc6\x51\x6c\x3f\xfe\x4d\x7d\xdb\xf1\x6f\xfb\xa0\x91\x00\xb9\x7d\x8b\x16\xf1\x2a\x13\x25\x40\x06\xb6\x97\x00\x6d\xc3\x88\x04\xe8\xda\xfa\xda\xef\x57\x46\xce\x32\xe5\xc0\x0b\x3e\x7b\x4f\xf0\xcc\x0b\x3b\x17\x6b\x5e\x4d\x1f\x51\xa5\xd9\x2e\xf3\x5d\xe5\x8f\xbe\x31\x46\x03\xc1\x88\x8d\x8b\x21\x46\x4d\x5d\x94\xde\x2b\x11\x1a\xc8\x55\xa0\x1b\x50\x8d\x3f\x36\x18\x8b\x5d\xa4\x50\xe6\xfa\x17\xdb\x7a\x2b\x27\xef\xcc\xb6\xee\x48\xf6\xb6\x82\xaf\x3c\x87\xb8\x06\x7c\x22\x29\x00\x8d\xf6\x68\x65\x3c\x2a\x7c\x60\xbf\x88\xcb\x09\xcb\x76\x6b\xda\x56\x79\x1f\x14\x37\x67\x92\x28\x85\xea\x17\x3f\xb4\x84\x05\x45\x94\x56\x8d\x1d\xe9\x06\xe1\x9f\x2e\x65\xf5\xe8\x90\x3a\x38\x54\x0a\xf2\xf0\x2c\xdd\xe2\xbd\x19\xde\xc4\xf7\xa0\x1a\xc6\x92\xb9\x6b\x0f\x4f\xd0\x67\x39\xae\xc7\xf9\xfc\xbb\xde\x0c\x3d\x1f\xec\x12\xec\x51\x1e\x96\xa3\xbe\x4d\x1d\x6f\x97\x39\x5e\x7a\x4b\xa3\x08\xad\x6a\x73\xd9\x0c\xa5\xe6\x66\x99\xfb\x35\xd9\x60\xd5\x0d\xdf\x20\x99\xfe\x6e\xb1\x0f\x4d\x9d\x14\x5e\x68\xb7\x97\x7d\xa6\x0d\x00\x92\x77\x61\x19\x6e\xf1\xe1\xe9\x4b\xd4\xb4\xfd\xd8\x91\xf5\x93\x8a\x9e\x99\x83\x77\xaa\xbf\x14\xf8\xbf\x75\x99\xa6\x15\x81\x3e\xa7\x91\xd2\xb1\x66\x2a\x49\xc2\x40\x1a\xef\x66\xaa\xbb\xa5\xd0\x5b\xe8\x3e\x5a\xbc\x5c\x57\x65\xb9\xb6\x05\x9e\x4a\xdd\x93\x3e\x98\x79\xba\xf3\x19\x0c\x2a\x4f\x73\x65\x57\xd2\x23\xbd\x9a\x54\x5d\xe4\x44\xee\x95\x6b\x5e\xdc\xc9\x7b\xf3\xfe\xb2\xa8\xae\xdf\xc0\x65\xf8\x75\xbb\xad\xeb\xdd\xa3\xb3\x5e\xbc\x75\xde\xb3\xff\xd2\xff\x4b\x33\x97\x2e\xa5\x81\xbc\x72\xb4\xce\x80\x11\x4a\x44\xe5\x9f\x30\x61\xb4\xd4\xe4\xd0\x05\x3b\x8c\x56\x94\x04\x27\xf2\xe8\x5c\x8a\xf8\xdd\xd3\x9b\x30\xa8\x82\x47\xf6\xe5\x7d\xf9\x7c\xfa\xb6\x4e\xe2\xd9\xdb\xe5\xa1\x7c\x3e\x39\x75\x12\xa7\xe5\xc7\xbb\x73\x55\xe5\x8f\xef\xdf\xbf\xbc\xbc\xcc\x5f\x96\xf3\xac\x38\xbd\xf7\x17\x8b\x05\xad\x7c\xd7\xf0\xf5\xe3\xdd\xee\xae\xe5\x28\xfb\xf3\x39\x22\x2f\xbf\xcf\xea\x8f\x77\x54\x43\xef\x9c\xdd\xdd\xdb\x25\x79\xbb\x3c\xe4\x41\x75\x76\x8e\x51\x1c\x7f\xbc\x7b\xeb\x2f\x8f\xc7\xe3\x9d\x13\x7e\xbc\xfb\x7e\x33\x5f\x6f\x56\xf3\xed\x3a\x76\x97\xf3\xf5\x83\xb3\x9c\x6f\x3c\x9f\x8e\xe6\x72\x47\xff\xbb\xfe\x6e\xe1\xac\xe6\xfe\x26\xf6\xe7\x0f\xdb\x95\xe3\xcf\x1f\x1e\xbe\xdb\x39\xfe\xdc\x7b\x58\xfe\x7c\xf7\xbe\x41\x4c\x49\x79\xbb\x24\x4f\x6f\xee\x47\xb2\x8f\x2e\xb1\x15\x29\x92\x28\x0d\x2a\x32\x49\xf7\x4f\x5a\xfe\x6e\x42\xd4\x57\x1a\xd9\xd5\x30\xb2\x2b\x61\x64\x57\xce\x0a\x8e\x6c\x59\x15\xd9\x67\xc2\x8f\xed\xc2\xf1\xcf\xab\xab\x87\xa9\x53\xea\xe3\x0c\x17\x79\x3c\x0c\x41\xd2\x47\x12\x33\x45\x78\x26\x92\xc4\xdc\x91\x13\x94\xca\x1a\x5c\x73\xd1\xa2\xfa\xcb\xd2\x26\x9e\x3f\x08\x1d\xfd\xbb\x97\x3a\x77\xe5\xb8\x2b\xa0\x51\x0e\x51\x71\x88\x89\x53\x7c\xbc\x5b\xde\xf1\x9a\xc5\x28\x72\x3a\x3e\x7c\x5d\x79\x2b\x5f\xa2\xea\x70\xe6\x1d\x3b\xcd\x9a\xe6\xe3\x6b\x42\x0b\x60\x41\x52\xbb\x34\xfa\x60\xb5\xec\x16\x42\x78\xcd\x53\x58\xf1\x83\x38\xc6\x7d\x59\xe3\x89\x01\x02\xc3\xd6\x6d\xe6\xa9\xec\x7c\x6c\xbd\x8b\xb2\x23\x94\x95\x76\xd4\xc2\xe2\x96\xe8\xc6\xcf\x49\xcb\x5c\x67\xd5\x95\xf1\x4e\x50\xa1\x10\xd1\xc9\xe0\xcd\x8a\xaa\x83\x7c\xc4\x0c\xf6\xf7\x31\x2b\x92\x36\xea\x0a\x09\x4a\xe2\x46\x2c\x74\xd2\x4c\x6a\x00\xad\x03\x96\x0c\xbc\xbc\xdb\xd5\xc8\xa5\x13\x03\x81\x8c\x1c\x1b\x63\x78\x13\x2d\xbe\xab\x94\x87\xf4\x96\xa9\xe3\x76\xcb\xf8\x38\xa8\xc8\xff\x7c\xd7\x9e\x54\xdd\x7f\x18\x43\xd1\x57\x9e\xc6\xc0\x3f\xab\x7e\xd2\x29\xbe\x98\x53\xb8\xf0\xb7\xe2\x0c\x90\x0f\xef\xda\x19\x8c\x9f\xe6\xdd\xfc\xe0\x4e\xf9\x3c\x88\xb7\x93\xe9\x30\x7e\x19\xe3\x63\x2d\x19\x1f\x6b\xd4\xac\x6c\x02\xad\x35\xd6\x87\xef\x2c\xbe\x63\x16\xc8\xcf\xc9\xc2\xa1\x86\xe4\xf2\xbc\x42\x8c\xc6\xe6\x15\x66\xcf\xf5\xe6\x5c\xf2\xfd\x2e\xaf\x1d\x6f\x91\xd7\x9c\xb5\x3f\xf9\xd0\xd1\x71\x82\x3c\x27\x41\x11\xa4\x07\x22\x06\x42\x92\xef\xbc\xe9\xdd\x0c\x8e\xd3\x46\x6d\x1b\x7c\x6f\xd7\xb9\x45\x60\xd3\x8f\x8f\x6e\xc2\x1c\xd9\x17\xc1\xfd\x00\x84\x41\x39\x7d\x11\xac\x3f\x26\x97\xb8\x8a\xf2\x98\xfc\x34\x13\x8e\x32\x7e\xa4\xf2\xf9\x13\xf3\x8c\xb0\x3f\x3f\x3e\xbd\xf1\x9e\xde\xfc\x74\xcf\x9f\x6d\xf5\x97\x5e\x35\xef\x14\x64\x5b\x44\xc3\xe0\x09\x19\x5a\x14\x4e\x81\x16\x21\x63\x18\xa9\xf3\x40\xba\x77\xa2\xa1\xc2\x4d\xb2\x9f\x5d\xc6\xf0\x42\x8c\x7c\x2e\x3e\x57\x65\x67\xe6\xfc\xf0\x0e\x83\x81\xe0\x76\xcb\x64\xc4\xf1\xe0\xc0\x58\x69\x63\x3d\x04\xc9\xe9\x5e\x7c\x6b\x5e\x02\xe9\x4f\xcb\x30\x32\xe3\x93\xf5\x29\xb6\x44\xa4\x86\x46\x95\x23\x58\x7b\xa6\xcb\xd1\x67\xbc\x92\x7d\x7b\xf5\xae\xbc\xb2\x2d\x5d\x3e\xb5\xbf\x8b\x74\x2d\x35\xda\x98\x6b\x6a\x57\xf3\x88\x8b\xb8\x6a\x05\x77\xad\x46\x1b\x88\x40\x5d\x8a\xfc\xd5\x37\x99\x70\xc4\x8b\x28\xd1\x6e\xab\x25\x00\xda\x38\x48\x4f\xef\x48\x7a\x8f\xa2\xe5\x0c\x24\xe0\x8d\xfa\x7d\x91\xbd\x94\x04\x84\xa4\x90\x45\x02\x43\xf7\x23\x5d\x7f\xdd\x3d\x03\xfe\x09\xc7\x1d\x54\x55\xf1\x0e\x54\xc3\xb9\x88\xba\x3c\x11\x8f\xdc\x07\x45\xb4\xaa\x05\x76\x9c\x33\xdd\xec\x81\x7a\x1f\x95\xcc\xab\xcc\x9c\x71\x1e\x4d\xfb\xdb\x46\xfa\xd1\x1e\xc9\x57\xde\xb7\xcc\xdd\x13\x44\x7d\x9f\x3a\x66\xdb\xb0\xd9\x96\x79\xb8\xd0\xda\xdd\xe2\x6a\xb5\x34\x0c\xf0\x20\xb2\x14\xdc\xcd\xf0\xfb\x20\x17\xc2\x9e\x3e\x3d\x11\xec\xad\x1f\x3c\x2e\x5b\xc9\xf1\xea\x2c\xe3\x46\x98\x2c\x38\xd6\x3c\x34\xe0\x38\x33\x4d\x55\xf5\xf1\xd1\x7d\x21\xfb\xcf\x51\xe5\x96\x71\xc4\x0e\x58\xcf\x97\x64\xaf\x3a\xef\xa2\xd2\x47\x45\x72\x36\x49\x2d\xf2\xcd\x52\x13\x84\x7d\xf9\x8a\x4d\x96\x5f\xbe\x2d\x60\x5b\xd1\x1d\x34\x7f\x03\x59\x39\x16\x9a\x51\x30\x9e\x1d\x70\xcf\x3b\xa1\x95\x64\x93\xa4\x52\x0c\x18\xd6\x8a\xbb\x87\xb9\x22\xbe\x82\xb7\x41\x2d\xe6\x93\x5c\x10\x46\xe6\x5a\xba\x1e\x34\x78\xb8\xd0\x28\xba\xc3\x51\x0b\x84\xc5\x25\x4d\xe9\xca\xef\x56\x45\x80\x47\xe7\x05\x81\x77\xa4\x40\x1d\xa2\xc2\x38\x5c\x8a\x92\x7e\x6f\x1d\x6c\xca\xc4\x18\x84\xf8\x64\x83\x9c\xde\xaa\xe2\x33\xf1\x22\xa2\x9c\x02\xd2\xdc\x36\x0a\xf2\xdf\xe4\x55\xcb\xbf\x91\xb2\x2a\xe0\xb8\x4e\x4e\x01\xb2\xff\xee\xa2\x59\x4e\x56\xae\x78\xf4\x38\x5f\xa8\xda\xc7\x7d\xfb\x9b\x58\xeb\x79\x3f\x56\x9e\xcb\x9b\x08\x72\xf9\x35\x25\x58\x21\xa7\xfa\xd2\xee\x35\x35\x7a\xe0\x01\xfa\x71\x8c\xe2\xd8\x8d\xb3\x17\x8d\x5b\x5b\x9e\x40\x96\x53\x84\xe1\xbe\xe4\xb9\x10\xe5\xa4\xbb\x67\xb6\xce\xeb\x0f\x37\x6c\xb2\x77\x95\xeb\x8c\x51\xcd\x59\xca\x18\x94\xd8\x1a\xdb\x0d\x66\x48\x8e\xc1\x25\xae\x8c\x18\x71\xd3\x75\x32\x81\xa8\x72\x1d\x4d\x53\x39\x89\x18\xfc\x7a\x13\xb6\x67\x9c\xe1\x87\x0d\x5f\x59\x33\x4d\x57\x42\xaa\x9e\x3a\xb8\x5f\xc6\x41\xaf\xbe\x9b\x74\x56\x1a\x3c\x8f\x89\x8f\x25\xf8\x31\xd5\x57\xb8\x90\x90\xe3\x7d\x83\x20\xc5\x89\x4d\x0c\x3a\x38\x0b\x3b\xe8\x3e\xe8\x60\xff\x41\x97\x82\x04\x25\x60\x72\xa6\x11\xb5\xa8\x53\xd4\x55\xb0\x2f\x91\x58\x31\x9c\x23\xa4\x57\x39\x02\x98\xc0\x1c\x81\xb1\xed\xeb\xb6\x31\x21\x1b\x87\x36\x15\xaa\x5b\xbe\x9d\x0c\xb7\x63\xca\xbb\xe9\x82\xbb\x46\xee\x00\x37\x3e\x42\x11\x18\xa9\xa8\xcc\xe2\x76\x8c\x9a\x3f\x09\x76\x29\xb3\xf1\x7e\x0c\xff\x1a\xd9\x37\xbf\x3a\xad\xbc\x7e\xe5\x53\xb6\x3b\x04\xae\xe3\x0b\x59\xb0\x48\x16\xa5\x51\x18\xe2\x29\x3e\x35\x61\xe5\x1a\xfe\x85\x87\x4a\x43\xfb\x48\x2c\x62\x24\xbe\xd2\x0d\xc2\x04\xd1\x26\xf3\x28\x8e\x25\x39\x86\x27\x9e\x43\x9c\x4b\x9d\x19\x89\x09\x98\x80\x5a\xe0\x75\x5b\xda\xe5\x6a\xc2\xb9\x7c\xb4\xbe\x7a\x46\xe1\xa9\x49\x01\x71\xcd\xe0\xf7\x7e\x58\x87\x20\x5e\x42\xd4\x19\xf4\xed\xe6\x80\xbd\x89\xdf\x15\x91\x10\x6b\x62\x28\x44\xda\x71\xf7\x41\x19\xf5\x03\xc3\xbe\x9c\x8a\xec\xa5\xf3\x15\x6b\xda\xad\x82\x7d\x17\x2f\x8c\xb6\x4a\x7f\xe6\x81\x74\x65\x9f\xd3\x96\x02\x08\x34\x65\x15\xb1\x46\xd3\xe0\xb9\x0f\xba\x78\xbb\xa8\x44\xe0\xf5\xab\x14\xf9\x8c\x3d\x84\x75\xf7\xa4\x7a\x21\xad\x53\xdb\xb4\x86\xb0\xd0\x8d\x14\x3e\x88\xd2\x26\x84\x9e\xf4\xd1\x3d\xc6\x97\x28\x6c\x34\x98\x50\xc2\x72\x3b\xc9\x9f\x13\xbc\x36\x4b\x47\x25\x7f\xae\xe3\x31\xeb\xee\x64\x5e\xc0\x2e\xbb\xfb\x42\x3e\x74\x95\xce\xe4\x84\xa3\xc3\xa5\xa7\x3b\xe1\x84\xa5\xe8\xd3\x0e\xbb\x47\xa1\xe6\x40\xc5\x72\x3f\xe0\x12\x33\x7c\x1c\x63\x06\x50\x28\x93\xfd\x83\x07\xe6\xbb\x89\x19\xd4\x35\x2f\x28\x2b\xf1\xe0\x5e\xd1\xa0\x8c\x46\x9b\xdd\xa6\xac\x82\x2a\x3a\xc0\xec\x34\x18\x39\xc8\x3b\x79\x93\x7c\x98\x8f\x96\xb9\x16\xba\xac\x57\xb2\x3a\xeb\xf7\xb4\x92\x46\xd3\xc5\xd1\xe9\x08\x67\x0f\xf5\x0a\xe5\xeb\x54\xfc\xaa\x8f\xf2\x8d\xf2\xad\xcd\x2c\xcd\xba\x06\xa8\x17\x25\xba\xfb\x3c\x56\xa6\x5b\x38\x37\x3a\x64\xa9\xed\x05\xab\xf9\x5a\x7a\x28\xa5\x0a\x9e\x0f\xee\x32\xd9\xbc\x02\xa0\xe3\xda\xfc\x47\x7e\x07\x30\x88\xaf\x5b\x1e\x8a\x2c\x8e\x3b\xfb\xa4\xee\xc7\x62\xbb\x7e\x3e\x73\xa7\x97\xee\xab\x22\xa5\x4f\x50\x0f\x29\x7d\xd6\xf3\x07\x90\x30\xa7\x6d\xa6\xb9\x74\xd2\x3d\x13\x06\xda\xdf\x54\x45\x58\x0b\x54\xb5\xc0\xba\xa0\xaa\x92\x98\xb1\x80\xf5\x42\x55\xa5\x5b\x3b\x14\xca\x02\xd7\x4f\xbf\x58\xa6\x40\x92\x9a\x6e\x9b\x62\xd3\xb2\x39\x3e\x2e\xb2\x17\x18\x76\xc2\x14\x36\xb9\xcb\x95\x23\x61\x96\x94\xb0\xac\x74\x8b\xec\xc5\x16\x03\xa6\x00\x95\x87\xc5\x36\xf8\x78\xbd\x8c\xc5\xfa\xed\xb4\x87\xe6\x82\xcf\x2f\x7f\xe5\x12\x08\xac\x15\x20\x12\x66\xf6\x72\x13\x1e\xde\x4d\x78\x8e\xca\x68\x1f\x5b\x8d\x12\xbf\x98\x08\x6b\xb8\xf3\x77\x51\x92\x67\x45\x15\xb4\xaa\x98\x5f\x6d\x60\x12\x26\x5d\x13\xdc\xc2\x82\xe5\x7a\xfb\x45\xad\x86\xb6\x9b\xad\x46\x0d\x25\xa1\x51\x08\x84\x2a\x0a\x21\x10\x6b\x21\x42\x20\x56\x49\xcc\x58\x10\x21\x10\xab\xdc\x5a\x0d\x71\x49\xce\xa4\xa6\xbf\x90\x1a\x4a\xc2\x6b\xd5\x90\x80\xe1\x6a\x35\x24\xe2\xfb\x62\x6a\xe8\xaf\x49\x02\xed\xd5\x10\xcf\xde\xc9\x6a\x08\xa0\xf9\x52\x6a\x08\x34\x71\x8d\x1a\x7a\x78\xf0\x34\x6a\xa8\x8d\xab\xa2\x13\x02\xa1\x8a\x42\x08\xc4\x5a\x88\x10\x88\x55\x12\x33\x16\x44\x08\xc4\x2a\xb7\x56\x43\x5c\x1a\x43\xa9\xe9\x2f\xa4\x86\xe2\xd3\xb5\x6a\x48\xc0\x70\xb5\x1a\x12\xf1\x7d\x31\x35\xf4\xd7\x24\x81\xf6\x6a\x88\x67\xef\x64\x35\x04\xd0\x7c\x29\x35\x04\x9a\xb8\x46\x0d\x79\xde\xc3\x83\x46\x0f\xd5\xb1\x51\x0a\x84\x2a\x0a\x29\x10\x6b\x21\x52\x20\x56\x49\xcc\x58\x10\x29\x10\xab\xdc\x5a\x0f\xf1\x99\x4a\xa5\xb6\xbf\x90\x22\xaa\xe3\x6b\x15\x91\x80\xe1\x6a\x45\x24\xe2\xfb\x62\x8a\xe8\xaf\x49\x04\xed\x15\x11\xcf\xde\xc9\x8a\x08\xa0\xf9\x52\x8a\x08\x34\x61\xad\x88\x78\x14\xc0\xeb\x88\x4e\x19\x9b\xf4\x4f\x3c\xc2\x4f\xe8\x39\x02\x56\x8a\xcb\x8a\x49\x50\x4c\x52\x62\x12\x11\x5c\x3e\xa6\xf8\x98\x5b\x7c\x92\x72\xc0\x55\x83\x09\xd4\x3a\x17\xbb\x11\x91\xde\x7b\x3e\x37\x3d\xc1\xfa\xeb\x19\x54\x6c\xca\x1b\xb8\xc7\xcd\x76\x6c\xae\xeb\xe0\xf9\x69\xae\x9d\xe4\xc8\x14\xd7\x61\xe6\x66\x37\x7e\x2e\xd9\xd6\x8c\x9b\xac\x57\xf2\xf9\x96\xf0\x16\xb9\x4b\x4b\xff\x70\x6f\x81\x41\xf4\xc3\x63\x55\xe4\xf4\x96\x63\x9b\x42\x84\x57\x81\x69\x3d\x06\x93\x9e\x78\xbe\xaa\xb9\x13\xdb\x31\x4d\xe3\xd7\x2e\x44\x94\x4b\x1b\x94\xe2\x39\xfe\x4c\x5b\xbb\x3d\x95\xb6\xae\xdf\x13\x4c\x9b\xb1\xac\x8a\x24\x14\x1d\x3b\xe2\x9c\x58\xeb\xc6\x5a\xbc\xe9\x21\x56\xf2\xec\x1a\x02\x07\x40\x5f\x32\xfc\xc8\x72\x31\x3c\x3b\xa7\x7f\x73\xef\xce\x97\xf4\xff\x63\x61\x6f\x68\x9f\xde\xfa\x3b\xd8\xf5\xb7\xfe\xc3\x5d\x5b\x4e\x79\x4e\x0e\x41\xfe\xf1\x8e\x11\xdd\x7f\x4e\xa2\x8a\x14\x71\x94\x44\xd5\xc7\x3b\x6f\xd1\x7f\x6e\x29\xf1\x9b\x77\xec\x2b\x67\x7b\xf6\xfd\xef\x57\x8e\xb7\x6e\xfe\xf5\x97\x67\xdf\xd7\xc4\x38\xc1\x99\xd8\x9f\x85\x4e\x9c\x96\x0c\x41\x70\x9d\xc4\x30\x14\xfa\x29\xdd\xd6\x99\xa2\x90\xc2\xa0\xf8\xac\x51\x9e\xe2\x85\x22\x1c\x44\xa4\x0e\xa9\x81\xe4\x02\x36\xa1\x36\x68\x47\xf6\xa8\x69\xf8\x0f\x36\x18\x6a\x74\x5a\x8a\xad\x34\xa4\xd4\xfc\x76\x4c\xfb\x1a\x3d\x29\x21\xf6\x6d\x10\x6b\xb4\xa5\x5c\x59\xab\x2c\x35\x44\x0b\xba\x52\x53\x53\x9d\x7b\x59\xdd\x0f\xa5\x6e\xc4\x47\x1a\xd5\x90\x52\x55\xef\xde\xa6\xcd\xff\x0e\x6a\x52\xe6\xc2\xaf\xad\x2c\x79\x4e\xa2\xba\x72\xec\x24\x45\x14\xa6\x59\x6e\x50\x0d\x89\x55\x31\x28\xa1\x43\x50\x84\x53\x2e\xad\xe1\x17\x84\xa4\x24\x73\x2f\x59\x11\xb6\xc6\xf9\xbe\x20\xc1\x67\x97\x7e\x30\xde\xf7\x04\x45\x2c\x51\x60\x7f\xa5\xb8\x56\xdc\x3f\x91\x2c\x05\x9f\x9f\x2e\xca\x07\xd7\xb4\xf7\x9f\x9c\x73\xa1\xca\xef\xaa\xcc\x1b\xdb\x42\xce\xd9\x4d\x27\x90\x90\x10\xe6\xcd\x47\x9e\x29\x77\xb7\x84\x86\x22\x15\x3a\x2e\xfe\xb2\x18\x59\x99\xe3\xb1\xea\x06\x2b\x17\x45\xcb\xa5\xdc\xba\xd7\xdf\x69\xc5\x01\x94\x04\x82\xc0\xdf\x48\x92\x50\x8c\x44\x34\x9e\xb7\x81\x4c\x2c\x54\xb4\x0d\xa1\xf4\xdf\x2e\xef\xfb\xb7\x90\xee\x19\x3e\x7a\xdf\xb6\x20\xc7\x2c\x43\xd2\x11\x89\x43\xef\xee\xb3\xf0\x55\x79\x07\x96\x8b\x39\xdd\xde\x33\xee\x6f\x67\x79\x88\x0c\xba\x55\x54\x09\xa9\xf2\x86\xfb\x64\x5b\xb9\x7a\x79\xd9\xcb\x10\xdd\xc3\xe2\xa5\x36\x5d\x0b\x6c\x94\xd4\x95\x34\x8a\x7a\x90\xc1\x8e\xb0\xb9\x98\xd5\x83\xf4\xdc\x95\x6e\xf9\x77\xf1\xb7\x11\x9e\xc0\xa4\xfd\xe0\x6e\x5b\x17\xd7\xca\xd7\x27\xa5\x51\x07\xe8\xea\x94\xc4\x62\x79\xff\x41\xfb\x60\x41\xa1\x55\x24\x12\x95\x53\x55\x23\xaf\xe8\xb7\x85\xc8\x6e\x28\x8c\x5a\x16\x8c\xee\x2d\x13\x96\x31\x5d\x6d\x48\x51\x4d\x7a\x10\x7e\xc1\xb6\xb7\x18\x27\xc1\x33\x12\x21\x29\xd2\x62\xbe\x51\x0e\xb8\x8b\x64\x28\x6a\x63\x1a\x72\x60\xc2\x40\x2f\x50\x0a\x9a\x1b\xf5\xb6\x24\xc8\xcd\x00\x8c\x51\x72\x72\xe9\x54\x89\x83\xd7\x1b\x44\xf0\x80\xc7\x27\x88\x32\xb1\x11\x3a\x89\xbc\x19\x24\xb5\xca\x72\xee\x77\xd3\x3c\x70\xb2\x95\xe7\x82\x4e\xff\x6e\x69\x47\x92\xe4\xaa\xf0\xea\x53\x03\xdc\x7c\xa1\x92\x48\x80\x5d\xf9\xca\x6b\x11\xd5\x8e\x9f\x1d\x60\x67\x09\xc2\xdb\xbe\xd1\xb4\xba\xa3\x38\xe0\xc3\x8e\x18\x3e\xa0\x27\x63\xe0\x5c\x4c\xcc\x33\xd6\xbd\x0e\x95\xd2\x89\x75\x05\xbf\x08\xad\x82\x5e\x0c\xeb\xde\xc2\x69\x2f\x30\x2b\x5f\x9f\x2a\x34\xb4\xb8\x06\x80\x56\x01\xfb\x86\xcc\x9a\x37\xe3\x20\x30\xd7\xc6\xb1\xf0\x17\x11\xc7\x27\x5b\x96\xf0\x3d\x57\xe2\xf9\x96\xc7\x27\xd9\x9e\xf4\x23\x17\x09\x47\x8f\x4f\x91\x7c\xc5\x98\x7e\xc5\x26\xe1\xbb\x7d\x9b\xa2\x86\x19\x05\x06\x8d\x00\x23\xdd\x53\x68\x6a\xba\x38\x96\x2c\xb8\x30\x5f\xcf\x2d\x39\x8b\x8a\xe9\x5d\x9a\x31\x93\xca\xa8\x26\x47\x8c\x10\x02\xa7\x1c\xa2\x5b\x11\x65\x33\x44\x08\xa8\x6e\x8c\x70\xd2\x80\xda\x69\x36\xb5\xa5\x46\xed\x08\x86\xb9\x95\xe6\xe9\xb0\xb6\x34\x35\x3f\xdd\x43\x76\x49\xab\x2e\x32\x57\xff\xf5\x44\x37\xcd\x70\x7d\x77\x9c\xac\xc8\xcf\x41\x5a\x76\x2f\x35\xd8\x1a\x9c\xbd\xf4\xbf\x7f\x91\x1b\xe2\xd4\x89\xfa\x39\x84\x1c\x61\xa1\xe7\x46\x70\x38\x64\x45\x18\x75\xae\xa2\xfe\x39\x42\x90\x1e\xce\xd4\xce\xe4\x0c\xfe\xa1\x32\xa7\x19\x91\x08\x6c\x8a\xfa\x60\xbe\x65\x47\xb7\x7a\xcd\xc9\x3d\xfa\xaa\xd8\x2e\x4d\x94\x65\xbe\x21\x05\x15\x8d\x48\xa1\x64\x4c\x7f\x2d\x2a\x73\xe8\x13\x32\x8d\x44\xab\xfa\x83\xfa\x5d\x74\x83\x76\x5f\x90\x20\x3c\x14\x7d\x5c\x81\x51\xcf\xda\xc1\x96\x42\x61\x61\x7b\xc3\x7b\x21\xe9\x61\x97\x65\xe4\x36\x95\x0b\x66\xa0\xbc\x79\xef\xf9\xad\x23\x7d\xfa\xb3\xf1\x1c\xdb\x8c\x84\x8f\xde\xdc\xbe\x05\xa3\xb8\x3e\xe8\x8f\xcf\x91\x47\xd4\xe0\xf5\xcf\x7b\x10\x70\xd1\x82\x06\xb6\x71\xe6\x29\x91\x36\xd0\x97\x34\x24\x05\x9d\x9e\xb7\x46\xcc\x4d\x54\x01\x01\xea\xbb\x16\x32\xf1\xe4\xc1\x29\x4a\x9b\xac\x75\x0a\x11\xc3\x2e\x7a\xe1\x02\xa3\x17\x89\x3c\x38\x11\x78\xb7\xc1\xe0\x98\x54\xc7\x50\x50\xef\x0b\x3b\xaf\x8c\x10\xb4\xd0\xe7\xa3\x16\xea\xd3\x76\x68\x42\x3e\x0a\x4f\xf5\xfb\x0e\x41\xd7\x89\x10\x85\x75\x68\x73\xbd\xd9\x2f\x3f\xe8\x86\xd0\x72\xc6\x49\x91\x5e\x44\x62\x54\x69\xa4\x6f\x17\x39\x9a\xb5\xc5\x24\x14\xba\x48\xc4\x01\x46\xcc\xdc\x11\x71\x1a\x50\xdd\x8e\x49\x14\xa3\x03\xf8\x2f\x44\x32\x2c\xe2\x3e\x18\x96\x1c\x55\xab\xdd\xf4\x12\x5b\x14\xb8\x3e\xe6\xbd\xbe\x3a\xc5\x8c\xd8\x76\x7f\xea\x26\xb6\x3e\x25\xf4\x47\xef\xe2\x1c\x1b\xae\x01\x51\x23\xec\x86\xad\x38\xd7\x65\x27\xd7\x7a\x7c\x9a\x5d\x75\x4b\x46\x59\x54\x0b\xde\xd2\x4a\xee\x96\x82\x00\xe0\x14\x4c\x93\xc2\xa5\x9d\x10\xaa\x48\x28\x13\x1d\xbb\xaf\x49\x68\xab\x6e\xea\x0a\x7e\xfb\x76\xf3\xdc\xd4\xd9\x6b\x66\xbd\xe5\xa4\xe7\x2c\x91\x20\x3c\x11\xcb\xb7\xe4\x0d\xdb\x19\xd7\x57\x32\xd3\xb7\xeb\xb7\x72\xa4\xe2\x2d\x1a\xa9\x78\x4a\xd2\x74\xf1\x79\xf3\x3e\x28\x49\x6b\x76\x68\x13\x14\xc0\xb8\x4a\xea\xe0\x50\x7f\x91\x01\xa6\xc0\xd8\x18\xe2\x43\x05\x4d\xdd\xee\x7c\xb5\xfb\x69\xfd\x22\xbd\xa9\x4e\x92\xbc\x7a\xd5\xdd\xe6\xdb\x57\x29\x47\x95\xc2\xd2\x81\x01\x6b\x00\x7e\xe6\xaa\x56\x5c\xff\xdc\x28\x6e\x7f\x6e\x70\x5f\xb1\xb7\x90\x64\xd8\xcd\x8b\x28\x09\x8a\xd7\x89\xa1\x64\x02\x1e\x8b\xc0\xc9\xfe\xb3\xf2\x74\x5a\xd1\xc4\xc6\x3f\x1c\x54\x4d\x30\x5c\x52\x13\x73\x55\xa4\xe5\x91\x66\x0d\xb0\x6a\x1a\xfc\x25\x39\x64\x69\x38\x86\x43\xbc\x41\x1d\x88\x78\x44\x1e\x0d\x05\xe3\xb8\xb4\x5e\xad\xf7\x1b\x5f\xdd\x8c\xc0\xa7\xbe\x60\x32\xa7\xbc\xc5\x6e\xe6\x78\xde\x96\x32\x4c\xc1\xab\xcb\xe1\x40\x4a\xfb\x2e\xf8\xbb\x60\xbb\x5a\x4b\x5d\x68\xb0\x48\x7c\x6a\x3f\x8f\xe3\x92\x47\xb6\x64\xb9\x52\x35\x21\xf2\xa8\xf9\x3c\x99\x43\x2b\x2a\x4c\x9b\xed\xcc\xd9\x3c\xa0\xfc\x89\xd2\x63\x66\x4f\xf9\x36\xf0\xf7\x3b\x91\x72\x8a\x42\xe4\x0c\xfb\x36\x92\x2d\xde\x36\xd8\xed\x51\xe4\x02\x4f\xe8\xb7\xc9\x0c\xa1\x13\xcb\xdb\xf8\x33\xc7\xdb\xad\x50\x8e\xbc\x04\x45\x2a\xa6\x3c\xf9\xc6\xf7\xfc\xb5\xff\xa0\xb6\x3f\x0f\xde\x62\x2b\x92\xde\x22\x12\x59\xd3\x7d\x46\xb8\xa3\x6f\x25\x5c\x3e\x90\xc5\x42\xd5\x8a\xc0\xa3\xf6\xf3\x74\x36\x51\xdd\xe3\x3d\x2c\x67\xce\x16\xe5\x52\x18\xa4\x27\xe1\xf6\x98\x6e\x70\xc3\xc3\x72\x2d\x4f\xab\x06\x89\xc8\xa0\xf6\xeb\x38\xe9\xd9\x87\xbe\xb7\x5c\x28\x1a\x10\x78\xd3\x7c\x9d\xce\x1a\x7f\x31\x73\xd6\x4b\xe5\x94\x6a\x6e\x8b\x8e\x11\x9f\xdd\xf1\xe1\x18\x88\xb4\x33\x34\x22\x6f\x9a\x8f\xe3\x45\x27\x20\x0b\xb2\xc6\x5b\x10\x98\xc3\x3e\x4e\xe7\xcd\x6a\x37\x73\xfc\xd5\x03\x5d\xbc\x16\x0a\xc1\x29\xec\x83\xc4\x35\xc9\xb2\xe4\x51\x2d\x3e\xcb\x42\x53\x7c\x1e\xab\x70\x42\xdf\xf3\x57\x28\x72\x49\x60\x8a\xcf\x93\x59\xb2\xf6\x67\xce\x7a\x37\x73\x36\xa2\xba\xf9\xd3\x25\xd9\x67\x55\xd1\x79\xb5\x7a\xd3\xdc\xd7\xf9\x43\x75\x31\xa3\x75\xae\xcf\xe5\x88\x03\x03\x81\x30\x40\xda\x8a\x92\xe6\x83\x27\x7d\x42\x4f\x9a\xd7\x39\xa3\x9e\x3c\xa1\x2e\xe7\xd6\x63\x1d\x93\x42\x9f\x4f\x68\xcc\xe5\x1c\x8f\xdf\x53\x5d\x11\x44\x8a\xd1\xc5\xbc\xe6\xe2\x3a\x21\x5e\xae\x6b\x6a\x0e\x5b\x3e\x64\x47\x05\x2b\x86\x51\x99\x44\x25\x7b\x0a\x84\xf2\x70\x25\x53\x01\x41\xe6\x87\x38\x2b\xc9\xa4\x0b\x1f\x82\x4b\x50\xcb\x57\x6d\x5f\x51\xdb\x7d\xb1\x58\x2d\x76\x6b\x95\xd8\x1e\x0e\x64\xad\x48\x0e\xbf\x0b\x03\xe0\x59\xe2\x5b\x38\x4b\x57\xe5\x7a\xb8\x87\xe3\x21\x54\xc2\x49\x83\x32\x50\xe9\x6f\xd7\xbe\x00\xa5\xb0\xb5\x97\xbb\x65\xb8\xf2\x94\x13\xd1\x27\x4b\xb2\x46\x5d\x52\x9b\x70\x17\xee\x95\x6d\x68\xfa\x74\xd8\x1d\xf6\x87\xa3\x12\x52\xd9\x2b\x7f\xe1\x2f\xfd\x8d\x08\x87\x59\xc5\xde\x7a\xbd\x65\xfa\x10\x5f\x42\x56\x24\xe4\x73\x09\xf5\x94\x2d\xc9\xe6\xb0\x57\xb4\xa0\xe9\xd1\xde\x0b\x8f\x7b\x15\x9c\x7a\x94\xf6\x3e\xf1\x96\x02\x94\x6c\xc5\x2e\x0e\xeb\xd5\x66\xa1\xec\x8c\x47\x0e\x47\x0f\x15\x39\x42\xd6\x64\x8f\xa1\xd7\xf4\x24\xd8\x87\xe1\xb0\xbc\x42\x20\x75\x37\x36\xfe\x61\x29\x76\x03\x35\x3d\x77\xeb\xcd\x6a\xb1\xd2\xb8\x3e\x97\x87\x10\xeb\xc9\xf1\x48\xc8\x3e\x50\xb4\xa0\xe9\xcc\xf1\x48\x76\x81\xa7\x80\x53\xf6\x67\xbd\x5c\x1e\x17\x62\x7f\x30\x23\x71\xeb\x7b\x07\xb5\x94\x1d\x77\xe1\x16\x97\xb2\xe3\xfa\x20\x4b\x59\xdb\x80\xae\x37\xde\x7e\xb1\xdf\xe2\x60\xca\xce\xac\x1e\x3c\xdf\xdb\x4a\x5a\x5c\x32\xeb\x76\xde\xce\xdb\xf9\xca\xbe\x10\xfa\x3f\xb4\x2f\xe1\x31\x3c\x12\x14\xbf\xa6\x2b\xe4\x40\x0e\xc7\x0d\x0a\xa5\xec\xc9\x66\x47\xff\x27\x75\x5f\x34\xc1\xbc\xbd\x47\x7c\xa5\x3a\x63\x4a\xeb\x01\x9d\xfa\x9b\xc3\xee\x10\x60\xe8\x75\xf3\xfe\x61\xbf\xdf\x13\x0c\x48\x3d\x5b\x56\x8b\xf5\xa2\x9f\x60\xbf\xfb\x4c\x5e\x8f\x45\x90\x90\xd2\xc9\x8b\xec\x54\x90\xb2\x74\xf7\x41\xe1\x96\x55\x11\xe5\xa4\xd5\x6a\xc7\x22\xeb\x23\xe9\x81\x3e\x0d\xeb\xa2\xd7\xa5\xe8\x6a\xaf\x2f\x54\x99\xb6\xfa\x42\xbc\xac\xd1\x35\xad\x3a\x93\x94\x12\x85\xa0\xd9\xe0\x38\x77\xea\x42\x76\x7f\x6f\xd7\x13\x0d\x3e\xe1\x40\x08\xf0\x69\x42\xf8\x55\xe9\x99\x3e\x70\xf3\xa2\xdd\x92\xb2\x26\x8f\x73\x11\xeb\xcf\x9f\xa0\x03\x95\xd9\xaf\xce\x62\xbe\x69\xbc\xb4\xd3\xdc\xb3\x32\x77\x4c\x51\xfc\x11\xb9\x0b\x55\x2f\x9a\xe8\x10\x07\x85\x7b\xa2\x63\x43\xd2\xea\xdd\x6a\x1d\x92\xd3\x4c\xf5\x82\x6a\x7d\xef\xf8\xeb\xb7\x33\x68\x93\xca\x1f\xd6\x8b\xb7\x3a\x04\x86\xe2\xad\x88\x4e\xfc\x20\xe5\x26\x1f\x32\x35\xf3\x91\x9d\x39\x36\x04\x69\x94\x04\x55\xc7\x87\xe6\x57\x33\xd3\xca\x96\x07\x4e\x94\x1e\xa3\x34\xaa\x08\x3a\x6f\xaf\x1f\x3b\x81\x04\x8e\x08\x79\x0c\x9b\x66\x14\x93\x81\x0b\x81\x8b\x04\xa5\x60\xc0\xf2\x5b\x8c\xbe\x5c\x7c\x9d\xf3\x65\xa2\x1d\x1b\x66\xfd\x40\x04\xeb\x89\x1b\x1c\x86\x4b\x14\xe2\xb5\x2b\x24\x30\x3e\x9c\xb4\xa2\xb5\x8f\xa3\xee\x9f\x85\x29\x8a\xb1\x73\x7f\x4f\xdb\xbc\xed\x25\x04\xde\x87\xa2\x6a\x1f\xbb\x6c\xa2\xf7\x9c\x08\x39\x53\x05\xbc\x57\x5c\x13\xb1\x79\x49\xa1\xb9\xe8\xa1\x7d\x36\x21\x50\xa9\x7d\xd0\xc5\x9d\x6a\x22\xef\xc6\xe4\xe3\x49\x83\x28\x18\x5e\x67\xa9\x70\x69\x4f\x5b\x0d\x4d\xf6\x37\x0d\x64\xc9\x7b\x9c\x9e\x74\xc4\x90\x45\x5c\xa4\x01\xca\x96\xe2\x86\xcd\x2d\xae\x57\x88\x12\xf8\xad\x83\x0b\x25\xfe\x66\xcf\x16\x07\xd7\x1b\x53\xf6\x8a\x4e\x95\x80\x63\x42\x80\xee\x9c\x15\xd1\xcf\x59\x5a\x05\xb1\x39\x7c\x0d\x0e\xf6\xc9\xb1\x96\x68\xfd\x95\x1c\xab\x7b\x92\xd6\x34\x28\xe4\x7c\xcc\x2d\x1e\xc5\xb5\x50\x5b\x12\x94\xa3\x34\x1e\xd5\x08\x39\x12\x24\x80\xf5\x41\x27\x62\x63\xdb\xc5\x7a\x25\x5c\x9e\x43\x9a\xf6\xec\x9f\x62\xa0\xb4\x89\x81\xb7\x95\xb1\xd7\x94\xd0\x36\x62\x6a\x2d\xa8\x96\x2f\x0e\xc6\x10\x23\xca\xab\xa5\xc4\x5a\x5f\xf8\x1f\x41\x0b\x37\xc4\x58\x0a\xc5\xd1\x18\x95\xf2\xab\x93\x60\xa5\x0c\xdf\x86\x00\xbc\x97\x82\x28\x6b\x84\xd9\x3e\x76\x33\x4e\xa7\x10\xc3\x79\xa4\x44\x27\xe1\x5f\x90\x44\xe3\xc4\xfc\x3a\x12\x8d\xd2\x72\x95\x44\xa3\x18\xbf\xa6\x44\xdb\x12\xf0\x45\x25\x9a\x0b\x03\x8c\xd3\x29\x84\x03\x1e\x29\xd1\x4d\x14\xd9\xbf\x10\x89\xc6\x89\xf9\x75\x24\x1a\xa5\xe5\x2a\x89\x46\x31\x7e\x4d\x89\xb6\x25\xe0\x8b\x4a\x34\x1f\x50\x16\x27\x54\x88\x20\x3a\x52\xa4\xeb\xf8\x2f\x48\xa4\xeb\xf8\x2f\x47\xa4\xeb\xf8\xd6\x22\x5d\xc7\xbf\xb2\x48\xd7\xf1\xd7\x16\x69\x88\xf9\x18\x5f\xca\xb3\xf2\x8d\x98\xa2\xfa\x27\xfd\xa6\xa2\xeb\xba\xb3\x50\x6d\x1e\x55\x68\xec\x43\xc0\xe0\xfe\xa0\x09\xc7\xd4\xc2\x61\xb4\x02\xe3\x58\xc7\x98\x01\x0c\xb9\xd1\xa2\xa7\x52\x38\xfa\x1e\xd7\x9c\x26\x90\x98\xc2\x69\x31\x90\x22\x3a\x2d\xda\x12\x9c\x8c\x49\xa7\xea\xc2\xd9\xb9\x12\xe7\xd8\x21\x30\x02\x22\x83\xa0\xa7\x54\x38\xab\x1f\xdb\xe0\xd8\x61\x80\xc4\xf0\xc3\xd0\x97\x28\x08\x19\x7f\x0d\x40\x38\xec\x57\x60\x1c\x3d\x04\x7a\x30\x64\x00\xf4\x54\x0a\x57\x0b\xc6\x35\x37\x96\xfd\x90\x14\x9e\xfd\x7d\x09\x4e\xc6\xd8\x5b\x0b\xc2\xdd\x04\x0c\xdd\x58\xc6\xeb\x60\x30\xdd\xa3\xa5\x4f\xb8\x06\x31\xa2\xad\xd1\x8a\x07\xd0\x21\x28\x9e\xae\x04\xa7\x61\xd2\x0d\x0b\xee\x1e\x85\x02\xe3\x58\xc6\x1b\xc0\x10\xde\x1b\xa9\x84\xb7\x36\xc6\x35\x37\x96\xfd\x90\x14\x9e\xfd\x7d\x09\x4e\xc6\x84\x0b\x21\xfc\xb5\x0f\x1c\xe1\x58\xe6\xeb\xa1\x10\xde\x1b\x68\xe4\xef\x98\x8c\x6a\x6d\x2c\xeb\x21\x25\x3c\xeb\xfb\x12\x9c\x8a\xf1\xd7\x57\xf8\x4b\x2a\x28\xbe\xb1\x8c\xd7\x02\x61\x32\xaf\xa5\x50\xb8\x10\x33\xa6\xb1\xd1\x12\x0f\x08\x11\x24\xbe\x2b\x51\x0d\xfe\xb8\xbb\x36\xc2\x8d\x1a\x0c\xdd\x78\x69\x57\xc3\x60\x2b\xab\x96\x3e\xe1\xf2\xce\x88\xb6\x46\x2f\xab\x80\x0e\x61\x59\xed\x4a\xda\xa8\x29\xc3\xad\xd7\x36\xba\x02\xdb\x55\xca\x2f\x77\xf9\x07\xa6\x16\x0f\x1b\x07\x6b\x76\x31\x9c\x48\x0f\x37\xbd\xbd\xbc\x76\x16\x43\x1f\xb2\x3c\x38\x44\xd5\xeb\xa3\x03\x5e\xa6\x32\xda\xe0\xdb\x7b\x14\xa5\x3a\x8c\x21\x03\x67\x31\x41\xba\x73\xcc\x7b\xf6\x73\x3e\xfc\xec\x86\xdd\xa6\x2e\xbc\xc3\xde\x53\xbb\xed\xc9\xdd\x5f\xaa\x2a\xe3\x18\x3a\x1c\x58\x8f\xcc\xd0\x0b\x2e\xed\x33\x74\x42\x08\x66\xc5\xa1\x6b\x9b\x02\x3d\x0b\xca\x4a\xce\x57\xbc\x5c\x2f\xda\xfd\x29\x48\x72\x34\x7c\x54\xbd\x1a\x56\x04\x28\x94\x6e\xc6\xec\xd6\xf7\x78\x0c\xd8\x21\xcf\xb2\x75\x10\xd8\x7b\xec\x5d\x00\x9f\x1b\x59\x05\xd4\x8f\x8b\xd5\x0d\x0f\xc6\x2a\x45\xb0\x2d\x43\x38\x4f\x06\xca\x82\x4c\xf7\x06\x51\xdf\xb6\x87\xd4\x52\xe4\xa0\xd7\x40\x9d\xa3\x50\x9f\xea\x9e\xd6\xe2\xa2\xcf\x18\xee\xe1\x80\x9b\x63\xda\x94\xd3\xc8\x29\xff\x17\x92\x02\x8b\xd8\x9d\x8b\xf5\xfd\xd7\x0b\x96\xdb\xb0\x74\xb8\x96\x24\x5e\x38\x19\xee\x2f\x65\x61\x10\xbb\x59\x4e\x52\x43\xa0\x24\x50\xb1\xf9\x5b\x88\xc6\x54\x73\xf7\xfe\x54\x39\xa3\x21\xe8\x70\x5d\xe6\x18\xd5\x24\x14\xdf\x25\xc0\x4b\x4f\xc3\x25\xa1\xc5\x7a\xf1\x01\x93\x24\xf9\x22\x53\xaf\xc2\xbb\x0f\xe8\x05\x45\xee\x09\x0f\xec\x69\x18\x05\x71\x76\xd2\x5e\xec\x69\x5b\x1c\x82\xee\xb2\x89\xc6\xe7\xbe\xd1\xe9\x37\xd6\xd0\xfc\x18\x84\xc4\x41\x1a\x85\x17\x0f\xd9\xdf\xc7\xac\xa0\xe2\xbd\x6c\xdf\xa1\x37\x8f\xd0\x9d\xa1\xac\xad\x16\x07\x15\xa1\x72\xe7\x52\x8d\x78\x3f\xed\x32\x9d\x9e\x32\xd3\xa5\xc8\x06\x9a\xe9\x0a\x55\xbf\x1a\x7a\x11\x6e\x34\xf5\x9b\xa4\xf9\x06\xe8\xf2\x10\xc4\xe4\x9d\x37\x5f\xf8\xf7\xe8\xd8\xb5\x39\x76\x82\xfe\x15\x8d\xac\x55\x60\xbe\x73\x36\x9d\x58\xba\x74\x97\x5d\x6e\x34\x23\x6d\x0b\xda\xcb\xb0\x72\x06\xf5\x0e\xe3\xf3\x19\xa0\x34\x4e\x31\x65\x3b\x8d\x82\x9c\x99\x2b\xc2\xb0\x73\x52\xd8\x54\xab\xa6\x06\xc5\xa1\x9f\xc8\x1d\x86\x46\x21\x77\x8b\xba\xbd\xf6\x86\x61\xaa\x2d\xf9\xdf\x35\xc5\xc7\x9a\x42\x96\x23\xc3\x28\x74\xc5\x94\x84\x76\x04\xd1\xcc\xfa\x1a\x12\xf4\xd2\x36\xf1\x1a\xb5\xa0\xb6\xa6\x34\x6f\x92\x4b\x79\xda\xd9\xa2\xe6\x99\xde\x93\x8f\x20\xe4\x1a\xbf\x45\x60\x7f\x51\xbd\x8b\x9a\xd5\x2a\x2e\xd0\xf5\x26\x9d\x7f\xaf\x7d\x57\xa9\x59\x50\x68\xe3\x61\xd1\x45\x22\x9e\xb6\xf8\xad\xc4\xc0\xc7\xcf\x2f\xa2\xd0\x3c\x9f\xd5\x5e\x7a\x15\x49\x8d\xa6\xff\xb3\x64\x76\xa2\x75\x07\x1b\x70\xa8\x0b\x76\x3a\x50\x57\x8d\xbf\x54\x8d\xcc\x0d\xf6\x2a\xc0\xdd\x93\xea\x85\x90\x54\x88\x3d\xcd\xbd\x90\x55\x5a\x62\x43\x00\x28\xa3\xf5\xb5\x1c\x69\x7c\x2d\x11\xdb\x8b\xe3\x00\xba\x89\xf2\x90\x97\xbd\x8f\x8e\xcb\x3e\xc3\xff\x22\x0a\x57\x13\xa6\x5f\x1f\x1b\x49\x54\xec\x8a\x39\x89\xe4\x12\xe0\xc8\x16\xf0\xc1\xa5\xc6\x2e\xe2\xa3\x6a\x29\xc0\x33\x40\x92\x34\xfc\xa0\xb0\x5f\x55\x81\xe4\x91\xd1\xd6\x45\xda\x5e\x8e\x0e\xb4\xad\x1e\xf3\x96\x1b\x9f\x9c\xdf\xc2\x11\x92\x77\x6b\xad\x91\xc3\xd4\xea\x3e\x28\xdc\x84\x04\xe5\xa5\xb0\x78\xb1\xeb\x3e\x3c\x3c\x3c\xb4\xfb\xdc\xee\x46\x63\xb7\xef\xed\x06\xbd\xff\x30\xd8\x19\x4d\x4b\xb6\xd7\x22\x31\x83\x0f\xec\xb4\xd7\x8b\x85\x10\x55\x9b\x0a\x5a\xb3\x97\x15\xb2\x88\x6a\xd7\x47\xb5\xf5\xb5\x64\xf6\xf3\xbd\x05\x22\x6c\xb1\xd1\xd8\x60\x06\xc4\xbc\x15\xa3\xb6\x4e\x2c\xd1\xf0\x8b\xa5\xc2\x20\x81\xb8\xd4\x46\x09\x6c\x65\xb8\x9f\x0a\xdd\x1f\xfd\xa0\xd8\x5e\xac\x6a\x90\xc5\xa7\x19\xf8\x35\xdc\x41\x01\xa8\x77\x36\xa8\xf9\x1b\x2e\x1a\x6c\x9e\xb7\x12\xd1\xcd\xab\x2c\x8b\xab\x28\xd7\x8a\x3f\x58\x04\xb7\x0b\xd5\xb3\x8a\x7e\xbe\x0d\x8e\xa0\x63\x90\x44\xf1\xeb\xa3\xe3\x06\x79\x1e\x13\xb7\x7c\x2d\x2b\x92\xcc\x9c\xdf\xc7\x51\xfa\xf9\xfb\xe0\xf0\x03\xfb\xfd\x8f\x59\x5a\xcd\x9c\xa7\x37\x3f\x90\x53\x46\x9c\xff\xfc\x97\xa7\x37\x33\xe7\xdf\xb3\x7d\x56\x65\xf4\xeb\x3f\x93\xf8\x99\x54\xd1\x21\x70\xfe\x95\x5c\x08\x2d\xfb\xfb\x22\x0a\x62\x5a\xf4\xaf\x59\x95\x39\x3f\x04\x69\x49\xbf\x3e\xbd\xf9\x2e\xda\x93\xc6\x7f\xd7\x7f\x2c\x83\xb4\x74\x4b\x52\x44\x47\x5a\xe1\xef\x29\x11\xce\x1f\x58\xc0\xb1\x7f\x48\xb2\x3f\x45\x0d\x5c\xd7\x2e\xfa\xed\x87\xd7\x64\x9f\xc5\xcd\x47\xd6\x1e\x07\x0e\x5c\x5e\x5d\x88\xd3\x22\x09\x62\xd9\xbd\xb9\x5a\x28\x17\x08\xfe\x85\x4f\x1f\x92\x16\x7e\x1c\xd6\x67\xf5\x6b\x1c\xce\x2b\xca\x7f\x95\xf7\x7c\xd4\xc4\xa9\xa8\xfd\x46\x97\x77\xa6\xd9\x01\xe1\x2c\x67\x13\xcb\xd6\xc4\x7f\xe6\x5f\x09\xf2\xd5\x31\x3c\x4d\xd0\xbb\x06\x4f\xaf\x9a\x54\xfe\x41\x75\xa2\x28\xc4\x26\x6a\x45\x16\x37\x86\x1e\xc4\x6a\xce\x3c\x28\x8a\xae\xa2\x42\xc0\x11\x71\xee\x6e\xaf\xcc\x77\x1d\x8d\xfd\x03\xd1\xf9\x8a\x77\xe1\xc1\x66\x78\xbd\xa3\x68\x4e\xdc\xe6\x88\xce\x75\x45\x28\x8c\x56\xc8\xd8\x4a\x3b\x04\x74\x29\xdd\x96\x02\x16\xbd\xdd\x81\x1f\x28\xdb\x7f\xac\xdd\x3c\x0e\x0e\x24\x21\x69\xf5\xbf\x3e\x3e\xbd\xa9\xb2\xfc\xe9\xcd\x4f\x92\x63\x6a\xd5\x3d\xc4\xc5\xb0\xb6\x7d\xb3\x46\x0e\x39\x2e\xa7\x5b\x41\x71\x77\x7c\x1b\xd9\x86\x10\xf4\x78\xb0\xe1\x85\xcb\x4d\x6d\xff\x86\x6e\xa2\x8f\xa2\xa1\x91\x0e\xa8\x60\xa6\x8b\x99\x30\x56\x0d\xe1\xad\x28\x30\x22\x66\x6b\xee\xf6\x0d\x40\xfe\xc2\xcd\x0a\xd7\x5b\x41\x66\x77\x16\x24\xd8\x0f\x82\x40\x0a\x3f\x0c\x42\x16\x1b\xcd\x40\x20\xe3\xd1\xd8\x89\x86\x11\x69\x53\x02\x18\xc9\x6c\xea\x8d\x93\xf7\x36\x59\x8c\xed\xa0\x0c\x4d\xc0\x51\x11\x1e\x00\xa9\xd0\xdb\x33\x5c\x6c\x86\xe7\x38\xfa\x20\x75\xb8\xd8\x07\xb9\x8d\xd8\xd9\x06\x66\x53\x09\x33\x13\x48\x6b\x8d\x13\x7e\x0a\x61\xcd\xe6\x0e\x3d\x64\x32\x27\x67\x53\x64\x1f\x50\x60\x3f\x12\x3c\x25\xfc\x38\x20\x11\x95\x04\xc1\x57\x0f\x06\xdb\xed\x60\x43\xd1\x11\x13\xa5\x29\x29\x06\x87\x52\x8b\xd8\xef\x2d\x44\x5d\x34\x5f\xcb\x50\x00\x4a\xc7\x85\x39\xb6\x41\x96\x0f\xe7\xab\xe6\xb8\x47\x0a\x17\xcb\x46\x63\x5d\x0e\x3d\xa6\xfb\xa5\xbf\x19\x99\x7f\x33\x32\x6f\x67\x64\xfe\xaa\x6e\x4b\x7e\x02\x5d\x65\xad\x7a\xb2\xee\x5b\x8b\x9e\xae\x85\xbe\x65\xa0\x08\xc5\x82\xe0\x58\x19\x66\x38\x42\xd9\x8d\x6d\xdd\x96\xa6\xc1\xd6\xed\x3e\x98\x6c\x5d\xe9\x20\x7e\x2d\x2c\x0a\x00\xb3\xf3\x89\x5b\x97\x2c\x9a\xf8\x84\xda\xbc\xcc\xd9\xe0\xb6\xd9\x28\x04\xa7\x95\xa2\x45\x7e\x1d\x1a\xd1\xf2\x08\x83\x60\x0e\x56\x07\xa5\x31\x2c\x09\xf1\xda\x82\x76\x26\x21\x13\x48\x07\x92\x05\x3c\xc8\x93\x69\xe7\x42\x04\x00\x5a\x80\x21\xaf\x23\x8f\x37\xe4\xf9\xf4\x14\x4a\xb1\x69\xec\x68\x7b\xc1\xe9\x1b\xf9\x84\x98\xf3\xb8\xe0\x00\x23\x67\x2d\x4e\x74\xc9\xa1\xdd\xba\x4a\x17\x66\x5a\xed\x45\x4e\xa2\xd9\xde\xfa\xe1\x86\x0d\x19\x3d\xce\xec\xb7\x94\x3d\xb1\x1b\x96\xd2\x87\xf4\x02\xc8\x5f\x9b\x8d\xd0\x46\xfa\x4c\xdd\x50\x89\x21\xdc\xbd\xe8\x08\x15\x76\x2f\xdc\x4b\x29\xa5\x1c\xb6\xfb\x0b\x7b\x41\x1c\x5a\xf9\x24\x6f\x61\x2c\x35\x98\xd0\xa8\xbd\x44\xc9\x8d\xdb\xee\xe8\xd1\xc1\x50\x6f\x6e\x2c\x45\x4a\xea\x88\xa5\x4c\x61\xfd\x00\x42\xd5\x9d\x92\xdc\xa0\x23\x7a\xa1\xea\x17\xed\x2e\x37\xf1\x84\x91\x50\xa0\x18\x67\xda\xaf\xdb\x93\x62\x0b\x5b\x45\xcc\xa5\x0b\x36\x2d\x0a\xd3\x01\x39\x65\x3c\x6e\xe9\xff\x30\xc6\x0c\xdb\x57\x5d\xf7\xb9\xed\xab\x90\x08\x5e\x39\xd7\xd8\xfe\xd1\x7e\xa6\x75\x6d\x7c\xc2\x76\xb1\x5f\x58\xe5\x73\xa4\xda\x4b\x85\x48\xf2\x08\x47\xcf\xba\xdb\xef\x2a\xc4\x1a\xee\x77\x2d\x67\xa7\xd0\x09\xcb\xb9\x29\xf7\x01\xcc\xcc\x82\x4f\xd3\x7e\x4d\x27\xb8\x99\xc9\xcf\x21\xc9\xfd\xa4\xca\x4f\xc6\xdb\x6d\xf0\xe2\xb4\x2e\x40\x55\x27\xfb\xba\x09\x42\xf6\xf4\x7f\x5f\xeb\x18\x5e\x50\x21\xc6\x54\x28\x83\x16\x43\x2e\x4d\x2a\xaf\x96\xf6\x51\xc3\xfa\xcc\x9d\xd9\xa5\x24\xb1\xe6\x8c\x9d\xaf\x38\xe7\xee\xb1\x74\xaa\xfa\x72\x38\x77\x37\xf3\x9d\x3c\x48\xdd\x57\x09\x0e\xba\x62\xf4\xd7\x13\x75\xf7\x1f\x31\x9c\x9c\x6c\x62\xbb\xa9\x98\x04\xc5\x23\x35\x92\xcf\x9a\x0b\x53\x03\x4e\xeb\xf0\x68\xfd\xa6\x5d\xcc\x8d\x28\x76\x44\xcc\x22\xdd\x7d\xa7\x72\x79\x0c\x0e\xc4\x7d\x8e\xca\x68\x1f\xc5\xec\x38\x06\xdc\xf5\x54\xdd\xa8\xdc\xdc\x20\xb3\x0f\xd2\x5f\xd3\x35\x49\x0e\xa4\x7d\x15\x31\x13\xbf\xbb\x29\xa9\x2b\xf9\x6b\x5e\x90\x67\xc5\x08\x21\xc8\x19\x92\xe6\x0d\x00\xff\x9d\xb2\xf8\x7e\xf6\xd4\xbd\xc9\x10\x4a\x8b\xe1\xa9\x10\x76\xc9\xf4\x7f\xb2\xf3\xf0\x7b\x45\x93\x94\x42\xac\x49\x86\x54\xdd\x26\xd3\xaf\x9a\x26\x5d\x45\x9b\xcd\x5d\x55\x64\x14\x84\x7b\xf4\xc3\x90\xb8\x79\x91\xe5\xa4\xa0\x45\x6d\x9d\x0f\xba\xeb\xa9\xba\x96\xb0\xc1\x43\xaa\xb1\x61\x40\xfa\x6b\x84\xa3\xbc\x54\x8f\x8d\x10\x41\x11\xb9\x86\x2f\x20\x57\x32\x7e\x66\x59\x17\x6b\x7c\xf1\x41\xcb\xed\x9e\xc9\xce\xa2\x64\x53\xee\xca\x69\x66\xee\x89\x65\x6d\xd0\x17\xeb\x09\x4b\x55\x5e\x91\xc5\x6c\x5c\x66\x58\x01\x1d\x68\x5b\x63\x95\x5f\x6f\x85\xc1\xb4\xbf\x4a\xab\xbb\x53\xda\x29\xd0\x36\x9f\x9b\xf0\x98\x67\xb4\x63\x5e\xca\xa3\x2a\x8f\x7e\xe7\xf2\xc5\xc6\xbf\x4f\xa5\x76\xa5\x08\x08\xa3\x80\x15\x0d\xe3\x30\x69\x6c\x87\x37\x55\x68\x69\x93\x1d\x44\x35\xfe\x2d\xb0\xb2\x58\x93\xa4\x44\xed\xfe\x16\x32\x8e\xa0\x97\x0e\x50\x62\x45\xf7\x88\xa2\xea\xc0\x30\x60\x58\x6b\xd0\xba\xd1\x21\x4b\x95\x7d\x64\xa5\xa6\x54\x84\xfd\x21\x92\x70\x8f\xad\xff\x00\x05\x6f\xbd\x78\xeb\xbc\x67\x96\x40\xf3\x9f\x34\x73\x0b\x92\x93\xa0\xb2\x20\x53\x15\x97\xf9\x52\xc4\xef\x9e\xde\x84\x41\x15\x3c\xb2\x2f\xef\xcb\xe7\xd3\xb7\x75\x12\xcf\xde\x2e\x0f\xe5\xf3\xc9\xa9\x93\x38\x2d\x3f\xde\x9d\xab\x2a\x7f\x7c\xff\xfe\xe5\xe5\x65\xfe\xb2\x9c\x67\xc5\xe9\xbd\xbf\x58\x2c\x68\xe5\x3b\xe7\x18\xc5\xf1\xc7\xbb\xb7\xfe\xf2\x78\x3c\xde\x35\x3d\xfa\x78\xb7\xbb\x6b\xfb\xc2\xfe\x7c\x8e\xc8\xcb\xef\xb3\xfa\xe3\xdd\xc2\x59\x38\x3b\x67\x77\xf7\x76\x49\xde\x2e\x0f\x79\x50\x9d\x9d\xf0\xe3\xdd\xf7\xeb\xb9\xbf\x76\x16\xb1\xbb\x72\x9a\xff\x79\xf3\xb5\xeb\xcd\xd7\xdf\xad\xe8\xf7\x55\xec\xcf\xd7\xae\x3f\x5f\x7f\xd7\x54\xfb\xf9\xee\x7d\x03\x4e\x9b\x7f\xbb\x24\x4f\x6f\xee\xf5\x63\xfa\xdf\x80\x01\xfe\x7c\xcb\x18\xe0\xcd\xd7\xb4\xf3\xdf\x2d\xe9\xef\x55\x4c\x7b\xed\xd0\x9e\xb3\xf2\x5d\xbc\x72\xd9\xff\xac\x38\x10\xa5\x61\x74\x08\xaa\xac\x28\xb5\xca\x58\xd8\x43\x72\xd7\x69\xd1\x43\xc2\xb5\x42\x37\xeb\x74\xb0\x26\x96\x73\xb7\x01\x5c\xbf\x95\x9d\x11\xdd\x47\x24\x8b\xb5\xba\xb3\x71\xd4\x39\xb2\x6b\xba\x77\x63\xba\xbe\xa5\xa9\x3f\x33\x6a\x2e\xfa\x2e\xe0\x45\xdf\xfe\x2e\xa1\x30\x13\x97\xfd\x73\x4b\x48\xae\xf0\xb5\x21\xb7\xfb\xc8\x34\x18\x65\x17\xe5\x82\x3b\x5c\x5a\xed\xb2\xf8\xb6\xbb\x9e\x1b\x9d\x7c\xb5\x57\x80\x17\xa6\x44\x3e\xfd\x9e\x54\x5d\x93\x7f\xbc\xab\x5a\xc1\x36\x37\x59\xc0\x90\x11\xb3\xdf\x33\x0c\xb0\xdc\x83\x6a\x9d\xf5\x77\x08\xf2\x21\xee\xb7\x7e\x2e\x74\x62\xd7\xa7\x9b\xea\x64\x82\x97\x4a\x70\x6e\xce\x09\x39\x1b\x0f\x5f\xb8\x15\xe0\x4a\xc8\xac\x2c\x0f\x31\xd5\x43\x99\xb3\x6d\xaa\xdb\x8c\x69\xb7\x63\xe6\xd8\xd7\x98\xef\x45\x56\x05\x15\x79\xb7\xdc\x2c\x42\x72\xba\xe7\xf9\x88\x21\x31\x2f\x51\xa2\xfb\xab\xff\x20\xa6\xb2\x75\x59\x20\x6e\x21\xcf\x54\x9b\x6a\xb7\x91\xbb\xc3\xa5\xa0\x32\xc7\x38\xa0\xf4\xde\x1b\xf2\x51\x75\x0e\x4e\x10\xdd\x7e\xbe\x5d\xcb\x41\xf6\xf9\xce\x7e\xc0\x79\xd0\xdf\x2b\x56\x9d\xe3\x8a\xef\x2c\x7a\x07\x95\x0f\x32\x8a\xc9\xc3\x74\xea\xbd\x8c\x8b\xb7\xc8\x20\x35\x8f\xf8\x16\xe0\x32\xf5\x7a\xa8\xc7\x09\xb3\x00\x28\xcf\x0d\xb9\xc5\x2f\x36\xa2\x92\xc6\x52\x0e\xa7\x30\x54\xc2\xfe\xc8\x76\xe4\x4e\x30\x38\x36\xfc\x68\x3b\x6a\x13\xd4\x14\x2f\x1e\x33\xee\xdb\xc0\x62\xd0\x07\x37\xbc\x74\xf6\xaa\x37\x5f\x97\xfc\xe0\x34\xdb\x96\x2e\xc5\x73\x03\xab\x4a\x00\xed\xfc\x5d\x94\xe4\x59\x51\x05\x29\xcc\x2a\x46\xe1\xab\xee\xf9\x94\x08\x4a\x0b\x94\x50\x49\x14\x86\xb1\xa2\xcd\xb6\x4c\x09\xdb\x9e\x69\xe0\xf4\x36\x65\x6a\x6a\xa9\x3a\xd3\x21\x80\x15\xf4\x58\xd4\x1d\xef\x4a\x11\xf8\xfd\x89\x8f\x6f\xa7\x0c\x37\x8f\x00\x07\x00\x1a\xe4\x58\x3c\x09\xb9\x8e\xfb\x58\x11\x52\x6d\xac\x04\x6c\x79\x94\xb9\x95\x15\x1d\x11\x22\xc5\x29\x73\x1b\xab\xba\x82\xe5\x38\x3e\x49\x29\x89\x21\xd1\x22\x04\x5e\xa6\xef\x52\x93\x08\x59\xd5\x25\x18\x75\x4d\x99\x82\x58\xd9\x21\x29\x15\xf1\x49\xc8\x1d\xcc\x11\xcc\xd5\xc6\x4a\xf4\x1d\x69\x72\x15\x2b\x3a\x32\xc4\x2f\x53\xe6\x0a\x56\xf5\x42\xc8\x19\x7c\x82\x79\x7e\x21\x95\xa0\x9e\xf4\xd9\x40\x39\x4b\x27\xac\xa0\x9c\x0b\x03\xa6\x4c\xe8\xab\x22\x5e\x4e\xec\x7b\x12\xd2\xf0\x42\x5a\xf9\xda\x58\x89\xbe\x23\x4d\xda\x5f\x45\x47\x60\x40\x2d\x65\xda\x5d\x55\x3f\xa4\xf4\xbb\x27\x3e\x61\x2e\xa4\x95\xab\x8b\x14\xe8\xfb\xd0\x64\xe7\x55\xf4\x01\x44\xa6\x52\x26\x76\x51\x75\x41\x4c\x92\x7b\xe2\x92\xda\x42\x3a\x61\x4d\xf9\xbb\x61\x08\x58\xfa\x5c\xe5\x10\x74\x11\x9e\x94\x09\x6c\xd5\x03\xc0\x25\xb2\x3d\xc1\xe4\xb3\x3c\x8f\xfb\x7a\xd2\x67\xc3\x2c\x60\x39\x6e\x55\xb3\xe0\x4c\x6d\x0d\xf5\x1c\x38\x2a\xe0\x60\xea\xa8\x3f\x1b\xc3\x02\xa1\x48\x80\xf9\x2d\x5f\x62\x6c\x5f\x72\xaa\x01\x87\x65\x51\xfb\x14\x54\x83\x00\x78\x7f\xe1\x97\x71\x48\xe0\x12\x6f\x7a\x84\xac\x41\x33\x1c\x7d\x80\x0f\xe3\x50\x2c\x78\x56\x2e\xf4\xac\xe3\xab\xb7\xb7\x7a\x4c\xcc\x12\x80\x3a\xdf\x89\x91\x3d\x02\x5c\xef\x66\x31\x30\x44\x00\x6b\xbd\x27\x1a\x20\xde\xe2\xc1\x52\xe8\x68\x80\x45\x2b\x83\x07\x57\x5a\x18\x3d\x38\xb7\xa2\xf3\xc0\xca\xd5\xbc\x03\x06\xab\xa8\x10\xe6\x4c\xb5\x82\x76\x90\xfc\x2a\x26\x66\xff\x54\xac\x60\x1d\x30\xb7\x72\x08\x49\x6a\x55\xab\x46\x3f\x40\xd2\xec\x31\x6a\xeb\xa1\xd9\x5e\x5b\x0a\xa1\x6a\x55\x9a\xb2\xef\x2d\xd0\x56\x62\x5f\xd1\xb1\x65\x0a\x89\x84\xfd\x56\x49\x7e\x46\x50\x90\x44\x03\xa8\x82\x5a\xeb\xc1\x30\xe5\x84\x06\x5c\xe7\x71\x98\xc3\xa2\xeb\xda\x94\xf5\x99\x25\x1a\xfd\x5b\x79\x8b\x96\x95\x4a\x70\x4a\xeb\x66\x36\xf1\x8d\x4b\xaa\x73\x24\xaf\xa7\x36\x7b\x52\xc8\xc6\xd2\x00\x78\x88\x8a\x43\x4c\x50\xe0\xf5\xe2\xad\x0e\x32\x8f\xe2\x58\x01\x67\x68\x73\x81\xd3\x8a\x81\xb0\x2b\x1e\xc7\xa8\xbe\xcd\x55\x90\xd0\x4d\xb3\x14\x0b\x00\x87\x35\x1d\xba\x8d\xaf\x06\x75\xe0\xe8\x00\x1a\xe7\x8e\xc6\xef\x83\x03\x63\x50\x9a\xea\x15\x12\x4d\xaa\xf9\xa6\xae\xee\xca\xfe\xa8\xe1\xbb\x06\xec\x40\xba\xa1\x16\xe0\x58\x01\x0a\x78\x8c\x49\x8d\x04\xe3\xd0\xf2\x0d\x81\x81\x25\x32\xa8\x29\x7e\x04\xd5\xb4\x60\xc8\xb5\x83\xde\x85\x36\x60\x30\x70\xe4\x0d\x63\x8f\xc0\xc1\xa1\xb4\x12\x01\x0e\x07\x0e\x6c\x82\xaa\x60\x38\x0b\x9d\x40\xc8\x50\x2e\x70\xa1\x99\xe4\x02\x81\x1e\x84\xc3\x42\x3c\x38\xf8\x61\xbc\xb5\x52\x82\x71\x18\x05\x55\x0a\x8b\x7d\xda\xaa\xd0\x4d\xc2\xf1\x12\x93\x84\xd3\x24\x26\x09\xaf\x97\x98\x24\x9c\x22\x31\x49\x38\x45\x62\x92\xf0\x1a\x89\x49\xc2\xeb\x24\x26\x09\xc7\x4b\x4c\x12\x7e\x01\x89\xe1\xa2\x97\xd0\xb5\x77\xbc\xc4\xc4\xa7\x69\x12\xd3\xc3\x5d\x21\x31\xf1\x69\x8a\xc4\xc4\xa7\x29\x12\xd3\x41\x4d\x93\x98\x1e\x7a\xa2\xc4\xc4\xa7\xf1\x12\x33\x70\xf8\x86\x12\xc3\x07\xa5\x09\xdd\x3a\x1e\x2f\x32\x75\x3c\x4d\x64\x7a\xb8\x2b\x44\xa6\x8e\xa7\x88\x4c\x1d\x4f\x11\x99\x0e\x6a\x9a\xc8\xf4\xd0\x13\x45\xa6\x8e\xc7\x8b\xcc\xc0\xe1\x2b\x45\x26\x2f\xa2\xce\x81\x35\x0f\x5d\xf6\x6b\xbc\x9c\x34\x60\x93\x44\x05\x82\x5e\x21\x2d\x0d\x9a\x09\x02\xd3\x00\x4e\x90\x19\x00\x38\x4d\x6c\x20\x82\x89\x92\xd3\xa0\x18\x2d\x3c\x1c\xcf\xa7\xca\xcf\x9c\x24\x7b\xba\xe7\x26\x65\x9e\xa5\x65\x7f\x05\xc3\x3e\x0d\xb8\x14\xd3\x92\xbf\x98\xa9\xbc\xb0\x2f\xb6\x6b\x8c\x85\x8a\x6f\xcc\x24\xf2\xa5\x2f\xec\x9e\xe9\x0c\xab\x1a\xb1\x63\x7e\xb4\x88\x7d\x40\x4b\xb2\xfd\x9f\xc8\xa1\x42\x8b\x9e\xa3\x90\x64\xd3\xae\xcc\x22\xe1\x67\xd4\x41\xa0\xa5\xb8\xf4\x72\x9f\x7d\x6f\xff\xfa\x20\x3c\x39\x83\xf7\x5a\x56\xfe\x7c\xb7\xde\x7a\xab\xe5\x5b\x35\x0e\x6f\xa3\xc7\xb1\xde\xcc\xfd\xb5\x06\x7e\xb5\x7f\x5d\x6a\xc0\xb7\x3a\x58\x6f\xff\xea\x69\x60\xb9\xc0\xb2\x2c\xc8\x62\x3f\x77\x91\xcc\x83\xd8\xd6\x91\x55\x6b\x42\xb3\xea\x42\xdd\x2a\x41\x8b\xec\xc5\x2d\xc8\x33\x29\x4a\xa2\x6c\xb7\xaf\xa0\x6f\x5f\x8f\x47\xa8\xa3\x42\xf5\x52\x04\x39\x40\x30\x04\xac\x54\x42\xa4\x19\x0a\xd3\x7e\xd6\xb5\x83\x10\x3c\xb4\x67\xa4\xf4\xd8\x7b\x7f\xf8\x38\x9d\x4a\x00\x76\x47\x64\x01\x1a\xa3\x1f\x14\x5e\x9f\x01\xc0\x93\x00\x3c\x25\x40\x13\x5b\x9a\x6b\xa3\x0f\x37\x6d\x02\xf2\x10\x20\xb4\x25\xe1\x62\x65\x13\x2e\xb6\x01\xc6\xe3\x86\x36\x15\x2c\x30\x91\x34\xd4\xe1\xa1\xc5\x16\x58\x9a\xcb\x6a\x0a\x44\x6d\xa1\x05\x9a\x36\xc8\xad\x02\x0f\x17\x08\xd7\x06\x5d\xc0\x5c\x7f\x5a\x6c\x6d\x15\xe5\xe5\x13\xf6\xce\x00\xb2\x5b\x11\xba\xd7\x84\xa1\x67\xb3\x0c\x4f\xcc\xed\x43\xf6\x22\xef\x1f\x4c\xe0\xfc\xad\x23\x0e\x81\xf9\xca\x51\xc7\x81\x82\x54\x87\x33\x82\xa1\x2b\x51\x22\x40\x64\x96\x2b\xb0\x63\xa3\x24\xaf\x18\x0e\x2d\x2b\x31\x59\x15\x90\x98\xd8\x89\xca\xa9\x80\xc3\x28\xa5\x3c\x2a\x28\xa3\x28\x26\x93\x84\x0e\xec\x95\x46\x68\xc0\x64\x1a\xa3\x92\xc4\x47\xf6\x70\x17\x82\xd3\x8f\x8f\x4a\xf5\x0a\x00\xa5\x91\x6d\x20\x6d\x86\x95\xc1\x0b\x63\x0a\xa0\xb5\x03\xca\x60\xe5\xd1\x6c\xc0\x4d\x43\xc9\x80\xb1\x89\xd1\x80\x9b\xe7\x45\xdb\x73\x89\xe9\x0d\xbc\x9a\xe3\x26\xef\x71\xc3\xb5\x04\x6e\x28\x8c\x66\x49\x67\xd7\x77\xb0\xd0\x36\xb1\xb3\x4e\x44\x0c\x92\x89\x32\xc2\x48\xc1\xa9\x31\xa1\xd3\xd9\x2a\x22\xc6\xc1\xf8\x30\x98\x2c\x22\x20\xb4\x5b\x8c\x96\x0b\xd6\x2a\xda\x0b\x93\x01\x23\x22\x1a\xac\x18\xbd\x1d\x23\xc2\x41\x63\x46\x67\xce\xa0\x70\x1e\x02\xe7\xe9\xe1\x78\xd3\x46\x6f\xdc\x28\x60\x3d\x14\x56\xd1\xae\x64\xe5\x24\x50\xb5\x8c\x30\x75\x34\x08\x7b\x5d\x63\x6d\xf1\x68\x90\x41\xe5\x63\x69\xf8\x68\xb0\x71\xab\xca\x38\xfb\x47\x83\x15\x2e\x30\xa3\xcc\xa0\x0e\x27\x67\x06\x08\x23\x62\x65\x0d\x29\x10\x81\x91\xb0\x30\x8a\x14\x48\xf8\x11\x30\xda\x46\x0a\x2c\xfc\x3a\x60\x65\x22\x29\xb9\x03\x16\x04\x1b\x4b\x89\xc7\xa3\x92\x7c\x4b\x83\x49\x89\x4c\xe2\xb5\xa5\xcc\x4b\x88\x30\x7e\x5b\xc9\xbb\x84\x49\x90\x76\x7b\x2b\x4a\x89\x91\x97\x74\x6b\x63\x4a\x33\x02\xc8\x58\xea\x6d\x2a\x1e\x57\x63\x22\x24\xc0\xb0\x32\x99\x56\x38\x3c\x22\x0a\x7a\x0b\x0b\x47\x23\x09\x81\xce\xd0\xc2\x51\x60\xc3\xaf\xb6\xb7\x70\x1c\xf8\x64\xd3\x99\x5d\x2a\xae\x20\xc3\xa3\xb1\xbe\xec\x8f\x63\x19\x47\x92\x70\xba\x09\x96\x84\xd7\x9a\x60\x4d\xeb\xb7\x31\xc1\x7a\x6a\x6e\x66\x82\x25\xe1\x44\x13\x8c\x1d\x73\x4f\x35\xc1\xda\x56\xaf\x37\xc1\x92\x70\x9a\x09\x96\x84\xd3\x4c\xb0\x0e\x6e\xac\x09\x96\x84\xd3\x4d\xb0\x01\xf6\x2a\x13\x8c\xa2\xb9\xa9\x09\x96\x84\x37\x34\xc1\xa8\x64\xdf\xce\x04\x4b\xc2\x2f\x61\x82\x25\xe1\x6d\x4d\x30\x71\x44\x26\x9b\x60\xfc\x48\x4c\x34\xc1\xa4\x11\x98\x64\x82\x51\xce\xdf\xc6\x04\x63\xdc\xb9\x89\x09\x86\xf3\x79\xa2\x09\x86\xf1\x7a\x92\x09\xa6\xe0\xf7\x04\x13\x4c\x96\xf6\x6b\x4d\x30\x49\xd2\xaf\x34\xc1\x54\x63\x39\xda\x04\xa3\x84\x5d\x63\x82\xe1\xa2\x30\xda\x04\xc3\x84\x60\xa4\x09\xa6\x18\xfe\x51\x26\x98\x72\xb2\x8d\x34\xc1\x54\xc3\x33\xd5\x04\xe3\xee\x37\x31\x8e\xc4\xa7\xe9\x26\x58\x7c\xba\xd6\x04\x6b\x5a\xbf\x8d\x09\xd6\x53\x73\x33\x13\x2c\x3e\x4d\x34\xc1\xd8\xbd\xb1\xa9\x26\x58\xdb\xea\xf5\x26\x58\x7c\x9a\x66\x82\xc5\xa7\x69\x26\x58\x07\x37\xd6\x04\x8b\x4f\xd3\x4d\xb0\x01\xf6\x2a\x13\x8c\xa2\xb9\xa9\x09\x16\x9f\x6e\x68\x82\xc5\xa7\x5b\x9a\x60\xf1\xe9\x4b\x98\x60\xf1\xe9\xb6\x26\x98\x38\x22\x93\x4d\x30\x7e\x24\x26\x9a\x60\xd2\x08\x4c\x32\xc1\x28\xe7\x6f\x63\x82\x31\xee\xdc\xc4\x04\xc3\xf9\x3c\xd1\x04\xc3\x78\x3d\xc9\x04\x53\xf0\x7b\x82\x09\x26\x4b\xfb\xb5\x26\x98\x24\xe9\x57\x9a\x60\xaa\xb1\x1c\x6d\x82\x51\xc2\xae\x31\xc1\x70\x51\x18\x6d\x82\x61\x42\x30\xd2\x04\x53\x0c\xff\x28\x13\x4c\x39\xd9\x46\x9a\x60\xaa\xe1\x99\x6a\x82\xf1\x17\x86\x19\x4b\xea\x78\xba\x0d\x56\xc7\xd7\xda\x60\x4d\xeb\xb7\xb1\xc1\x7a\x6a\x6e\x66\x83\xd5\xf1\x44\x1b\x8c\x5d\xc4\x9e\x6a\x83\xb5\xad\x5e\x6f\x83\xd5\xf1\x34\x1b\xac\x8e\xa7\xd9\x60\x1d\xdc\x58\x1b\xac\x8e\xa7\xdb\x60\x03\xec\x55\x36\x18\x45\x73\x53\x1b\xac\x8e\x6f\x68\x83\x51\xc9\xbe\x9d\x0d\x56\xc7\x5f\xc2\x06\xab\xe3\xdb\xda\x60\xe2\x88\x4c\xb6\xc1\xf8\x91\x98\x68\x83\x49\x23\x30\xc9\x06\xa3\x9c\xbf\x8d\x0d\xc6\xb8\x73\x13\x1b\x0c\xe7\xf3\x44\x1b\x0c\xe3\xf5\x24\x1b\x4c\xc1\xef\x09\x36\x98\x2c\xed\xd7\xda\x60\x92\xa4\x5f\x69\x83\xa9\xc6\x72\xb4\x0d\x46\x09\xbb\xc6\x06\xc3\x45\x61\xb4\x0d\x86\x09\xc1\x48\x1b\x4c\x31\xfc\xa3\x6c\x30\xe5\x64\x1b\x69\x83\xa9\x86\xc7\xca\x06\x9b\xb3\x50\xff\xe0\xf9\x3e\x08\xfd\x8f\x5f\x1e\xa6\xd5\x41\x90\x83\xb6\x7e\xf3\x45\x09\x30\xbc\xe6\x69\xeb\x2b\x5e\x9f\x9b\xef\xa6\x51\x6c\x25\x8c\x52\xaf\x21\x79\x58\x88\x5b\x28\x2e\xd4\xb8\x9a\x72\x09\x0e\x3e\x46\x52\x76\x60\xcc\xf1\x2e\xc5\x9b\x84\x53\x7a\x91\x84\xd3\x7a\x21\xbc\xef\x9d\xd6\x0b\xc1\x43\xca\x24\xe7\x34\xa5\x17\xf1\x69\x5a\x2f\x84\x37\xa7\xd3\x7a\x21\x6e\x32\x28\xe2\x3a\x9e\xd2\x0d\xba\x3b\x98\xd2\x0d\xe1\x1d\xa4\x45\x37\xe6\x97\x92\x45\xc7\x89\xc9\xa1\x72\x83\xce\x66\x06\x1f\x1f\x9d\x00\x8f\x49\xc0\x01\xf6\xda\x97\x87\x54\xdc\xb0\x85\xa0\x03\xbd\x1c\xa8\x2a\x8a\x44\xf7\x72\x0a\x34\x39\x3c\xa6\x52\xb5\xd7\x03\x35\xaf\xad\x44\xb0\xf6\x2b\x02\xd8\x3d\x58\xa2\x0b\x40\x15\x1d\xc4\x57\x4c\xed\x57\x1d\x60\xf7\x50\x4c\xf5\x80\x4c\x0b\xdc\xbd\x92\x52\xbd\x9e\xd2\x02\x1f\xa3\xba\x8b\x70\x33\x40\x36\x1f\xf5\x3d\x8d\x0e\x9f\x5f\xe5\x9e\xb2\xaf\x98\x1e\xa6\x18\x87\x88\x38\x42\x53\xe2\xfb\x2e\x2e\x20\xb7\x22\x4f\xef\x72\x21\x20\x87\x01\x68\x30\xfc\xa3\xa3\x7c\x83\x26\x7e\x57\x5e\x72\xda\xa5\xd2\x79\x27\xf6\xb6\x0f\x97\xca\x7e\x0d\x5d\x94\xf9\xd2\xc5\xb0\x1d\xfa\xc9\xb5\xe6\x2f\x84\x70\xb6\x85\x9b\xa5\xf1\xab\xf6\x4d\x5c\xa7\x52\x84\x80\xdd\x9e\x94\x8e\x99\x4b\xd2\xe5\x76\xe5\xc8\x03\x43\xc7\x69\x02\x6d\x17\xe4\x50\x81\x74\x58\xf7\x58\x6e\x5c\xba\xcf\x56\x3c\xaa\x6b\x89\x77\x59\x54\xba\x60\x1f\x93\xc7\x36\x45\x8a\x83\x14\x81\xd0\x75\xe2\xac\x81\xbd\xec\xe3\x94\x77\xdd\xec\x3f\x0c\xfd\x60\x99\x7f\x62\x02\x3a\x32\x44\x37\x47\x13\xfb\xb6\xe4\xb2\x84\xc2\x20\x42\x54\xdd\xe7\x18\x5e\x38\x2c\xf2\x6f\x93\xff\xa9\xf9\x57\x4c\x15\xb6\xd8\xae\xef\x31\xa1\x6f\x50\xe0\x28\x19\x22\x0f\xc3\xe6\xe9\x90\x81\x90\x43\x10\x1f\x43\xb4\x44\xb1\x69\x69\x03\x7a\x15\x22\x54\xa9\xd5\x17\xd7\x5f\x73\xe1\x86\xfd\xf5\x5b\xbc\xde\x7a\xc1\xd5\x53\x04\x35\x7a\x71\xb7\x3c\xbe\xad\x0a\x9f\xb7\xe0\x11\xb2\xe4\x0f\x68\xcd\x41\xe3\x03\xb1\xc1\xaa\x9e\xfb\xce\xf4\xc1\x9f\xf1\xd6\xcf\x7d\x6f\xba\x8a\x8a\xee\x9c\xfb\xee\x74\x15\xb7\x2a\x8c\x7d\x7f\xe0\x03\x55\xbc\xea\xd0\x21\x28\xf7\x58\xdd\x04\xf0\x09\x24\x2b\x57\xa1\x4e\xce\x7c\x75\x13\x29\xd4\x86\x79\x86\x4d\x00\x9b\x66\xb1\x78\x7e\x51\xc2\x9c\x79\x18\xd0\xce\x33\xfa\x26\xe7\x19\x1d\x6f\xbc\x81\x67\x9c\x97\x38\xe2\x3e\x08\xe1\x90\x88\x1a\xab\x55\xb9\x8b\x19\xfd\xf7\x95\xaf\xae\x09\x90\x98\x14\x2d\x48\x2d\x80\xe8\xc2\x23\x26\x7b\x45\x3b\xda\xd8\x88\x49\xac\x68\x4a\x13\x1a\x31\xe9\xbc\x7f\x43\x9a\x46\x65\x6c\xb3\xa4\x72\xbd\x96\x2a\x0f\x4b\xfa\xaa\x06\x2c\x5a\xc0\x5a\x00\xec\x73\x58\xaa\x41\xf7\x8a\x36\x87\x54\xd9\x6a\xd8\x58\xd1\x6c\x97\x2d\x59\x0d\xe9\xfa\x22\x57\x34\x4c\xf1\x5b\x02\x7d\x55\x26\x5c\x05\x4f\xfc\x96\x38\x5f\x9d\xd7\x53\xc1\x12\xbc\x45\x3e\x7b\xb8\x82\x23\x78\xa3\x30\x7f\x34\xce\x90\x25\xcf\x10\x4f\xcd\x8e\x65\x4b\xdc\x52\x66\x87\xa7\x66\xc6\xb2\xa5\x6b\x89\x31\xc3\x53\xb3\x02\x6f\xad\x0f\xb2\xaa\x66\x04\xde\x60\x1b\x58\x55\xc9\x86\x95\xc0\x06\x9d\x5c\xac\x5a\xd2\x56\x08\x23\x74\x72\xb1\x6a\x29\x5b\xa1\xac\xd0\xc9\x05\xde\x62\xcf\x0c\x9d\x5c\xe0\x8d\xb6\xec\xd0\xc8\xc5\x9a\x67\xc8\x52\xcd\x8e\x75\x4b\xdc\x5a\x66\xc7\x52\xcd\x8c\x75\x4b\xd7\x1a\x63\xc6\x52\xcd\x0a\xbc\xb5\x8e\x15\x4b\x35\x23\xf0\x06\xdb\x1c\x36\x0a\xb0\x3e\x5e\xee\x60\x56\xa3\xd5\xda\xe5\x23\x7f\x15\xea\x6b\xd6\x8f\xbc\x5d\x3f\xf2\x5a\x84\xd1\x2d\x20\xf9\x5e\xd5\x92\x76\x05\xc9\x63\x55\x63\x9a\x25\x24\xef\xb4\x2b\x48\x8a\xaa\xd4\xac\x79\xbb\x86\xe4\xaf\x02\x94\x71\x11\xc9\xdb\x45\x24\xaf\x45\x48\xf3\x2a\x92\xef\x55\xad\x5a\x2c\x23\x79\xac\x6a\xd8\xb8\x8e\xe4\x9d\x9a\x15\xf3\xc5\xe2\x9c\xf1\x5b\x1a\x7d\x94\x33\x1a\xc6\xf8\x2d\x7d\xbe\x82\x31\x1a\xbe\x28\xda\x34\xaf\x25\x79\xac\x6a\xd6\xb4\x98\xe4\x9d\xce\xed\xb9\xe2\xa9\x79\xb2\x6c\xe9\x5b\x62\xf1\x4a\xd4\x1c\x59\xb6\xa4\x2d\x51\x8e\x78\x6a\x7e\x28\xda\x33\x2d\x28\x79\xac\x6a\x52\xbf\xa2\xe4\x9d\xc2\x1d\x78\xa1\x93\x90\x55\x4b\xdd\x0a\xe3\x86\x4e\x42\x56\x2d\x71\x2b\x9c\x1f\x3a\x09\x51\xb4\x69\x5e\x55\xf2\x58\xd5\xac\x69\x59\xc9\x3b\xed\xdb\x73\x65\xa9\xe6\xc9\xba\xa5\x6f\x8d\xf0\x64\xa9\xe6\xc8\xba\x25\x6d\x8d\x72\x64\xa9\xe6\x87\xa2\x3d\xd3\xd2\x92\xc7\xaa\x26\xf5\x6b\x4b\xe2\xa6\x82\x89\xee\xea\x6d\xf4\xb4\x33\x98\x53\xc4\x4a\x77\xf5\x66\x7a\xda\x19\xcc\x29\x6a\xa8\xbb\x7a\x4b\x5d\xd5\x72\xc7\x1a\x57\x6f\xac\xab\x1a\xef\x73\xef\x6b\xec\xf5\xd4\x97\x78\xa4\x63\x51\x67\x40\xa7\x3e\xca\x22\x1d\x87\x3a\x03\x3a\xf5\x15\x1c\xd2\x31\x48\xd1\x2e\x60\x90\x8e\x3f\x8a\xa6\x7b\xfe\x68\xd8\x23\x98\xef\xae\xc6\x7e\x4f\x3b\x93\x3a\x45\x2c\x78\x57\x63\xc2\xa7\x9d\x49\x9d\xa2\x46\xbc\xab\xb1\xe2\x55\x6d\xf6\x8c\xd1\x18\xf2\xaa\x66\x5b\xb6\xa8\x6d\xf9\x74\x25\x32\x45\x2b\x33\x9d\x71\x9d\xae\x30\xb6\x68\x65\xa6\x33\xae\xd3\x15\xce\x18\xad\xcc\x28\xda\x1d\x58\xa3\x95\x19\x45\xd3\x1d\x73\x74\x32\x23\x98\xf6\xae\xc6\xb6\x4f\x3b\x73\x3b\x45\xac\x7b\x57\x63\xde\xa7\x9d\xb9\x9d\xa2\x06\xbe\xab\xb1\xf0\x55\x6d\xf6\x8c\xd1\x18\xf9\xaa\x66\x5b\xb6\xa8\x75\xf1\xe0\x72\xeb\xd8\xa2\x74\xb9\x35\xa7\x5a\x2d\x8d\x22\x5c\xc3\x19\x25\x6c\x31\xc0\xd6\x32\x6c\x61\x70\xf6\xed\xb5\x2d\x77\xfc\x51\x82\xc7\xda\xc6\x1b\x16\x29\x80\x4d\xc7\xe4\x89\x5b\x26\xc3\x5d\x35\x85\xaf\xad\x3b\x92\x4c\xd8\x11\xf7\xa2\xc9\x2f\x97\xbc\x22\xa0\xe8\xbe\xa9\x07\x2f\x20\x78\x8d\x81\xe3\x5b\xa8\x1e\xc1\xde\xd8\xbe\x62\x37\xd5\x63\x88\x8d\x24\xa0\x1b\xab\x1e\x9e\x42\x78\x12\xbb\xf0\x84\x05\x90\x69\x1e\x24\xda\x43\x99\xa6\x45\x52\x40\x24\x35\x86\x44\xb7\xe9\xe2\x19\xa8\xa5\x45\xbb\xff\xe2\xd9\xa8\x25\x47\xb3\x15\xe3\x98\xe9\xcb\xcc\x34\xf1\xd2\x87\xf4\xfb\x38\x2f\x4d\xac\xf4\x21\xed\xbe\x8a\x95\x26\x4e\x6a\x29\xd1\xed\xd8\x78\x46\x6a\x89\x51\x6f\xde\x38\x3e\x2e\x45\x3e\x7a\x06\x2e\x2e\x21\xed\x4b\x8c\x8b\x9e\x81\x87\x4b\x48\xf6\x12\xe7\xa1\x67\xe0\xa0\x96\x0a\xf5\x1e\x8f\xe7\x9f\x96\x10\xd5\x76\x8f\xe3\xde\x4a\xe2\x9e\x51\x0a\x57\x90\xf2\x15\xca\x3f\xa3\x14\xae\x20\xe1\x2b\x05\x07\x8d\x52\xa8\xa5\x44\xb7\x2b\xe4\xb9\xa8\x25\x46\xbd\x41\xe4\xf8\xb8\x16\xf9\xb8\x34\x70\x71\x0d\x69\x5f\x63\x5c\x5c\x1a\x78\xb8\x86\x64\xaf\x71\x1e\x2e\x0d\x1c\xd4\x52\xa1\xde\x47\xf2\xfc\xd3\x12\xa2\xda\x52\x76\x28\x72\x6e\x29\x52\x79\x2d\xfb\xda\x70\x21\xce\x5f\x31\x58\xed\x4a\x9c\xc3\x95\x38\xaf\x51\x78\xfd\x52\x9c\xef\xcd\x14\x18\xd6\xe2\x3c\x36\x13\xa1\x5d\x8c\x73\x6e\xdd\xd1\x3b\x3b\x79\xce\x79\x90\x6e\x0f\xe7\x9c\x16\x0b\x5c\x8e\xf3\x1a\xc5\x62\xb3\x1e\xe7\x7b\x33\x35\x56\x0b\x72\x1e\x9b\x09\xb2\x58\x91\x73\x6e\x01\xd2\xfa\x48\x79\x86\xfa\xb0\x0b\xbe\x82\xa1\x26\x7e\xfa\x90\x7c\x5f\xc9\x4f\x13\x3b\xf5\xb4\xd8\xac\xca\x79\x6c\x26\xc7\xbc\x2c\xe7\xdc\x6a\xa4\x71\xad\xf2\xac\x5c\x42\xf2\x97\x28\x2b\x3d\x03\x23\x97\x90\xf2\xa5\x82\x91\x9e\x81\x8d\x7a\x3a\xcc\x4b\x73\x1e\x9b\x49\x31\xad\xcd\x39\xb7\x14\x69\x3d\xb2\x3c\x13\x57\x90\xf8\x15\xce\x44\xa3\x3c\xae\x20\xed\x2b\x15\x1b\x8d\xf2\xa8\xa7\xc5\x66\x7d\xce\x63\x33\x39\xe6\x05\x3a\xe7\xd6\x25\x8d\x23\x97\x67\xe5\x1a\x92\xbf\x46\x59\xb9\x34\x30\x72\x0d\x29\x5f\x2b\x18\xb9\x34\xb0\x51\x4f\x87\x79\x91\xce\x63\x33\x29\xa6\x55\x9a\xd9\x38\xa9\xb4\xff\x73\x2d\x36\x80\x29\xb7\xeb\x4a\xd1\x2d\xa0\x6b\xb1\x07\x4c\xb9\x5d\x57\xaa\xd8\x05\xba\x16\xdb\x40\x03\x45\x7a\x1f\x31\x6f\xfa\x18\x88\xd2\xf9\x8b\x79\xd6\xfa\x08\x6b\x8d\x9c\xe5\x76\x61\xa9\xaf\xe0\xac\x91\xb1\xdc\x2e\x2c\xf5\x95\x8c\x35\xf2\x55\x4f\x8f\xd6\xb5\x2c\xb0\x55\x4f\x92\xc6\xcd\xcc\x73\x55\xda\x1b\xba\xa6\xcd\x61\xca\xed\xcb\x52\x74\x7b\xe8\x9a\xf6\x87\x29\xb7\x2f\x4b\x15\x3b\x44\xd7\xb4\x45\x34\xd0\xa2\xf1\x48\x0b\xdc\xd4\x93\xa3\xf4\x4e\xf3\xbc\x5c\xc9\xbc\x34\x4b\x28\xb7\x43\x4b\x57\x38\x37\xcd\x12\xca\xed\xd0\xd2\x95\x8a\x9f\x66\x09\xd5\xd3\xa3\x75\x64\x0b\x3c\xd5\x93\xa4\x71\x6a\xf3\x5c\x95\xf6\x8d\xae\x69\xe3\x98\x72\x7b\xb6\x14\xdd\x3a\xba\xa6\xbd\x63\xca\xed\xd9\x52\xc5\xee\xd1\x35\x6d\x1f\x0d\xb4\x68\xfc\xdf\x02\x37\xf5\xe4\x28\x7d\xe1\x1c\x2f\xe1\xbb\x39\xb5\x4b\x9c\x67\x66\xeb\x5e\xee\xbb\x20\xe3\x50\xb9\xc7\x79\x7e\x02\x3c\xb5\x02\x8f\xd2\x55\xce\xb3\xd4\x82\x22\xb5\xdb\x9c\xe7\xaa\x05\x51\x2a\x17\xba\xfd\x43\xad\xc4\x4d\xc2\x31\x7e\x74\x5a\xbb\xef\x9f\x0c\x6a\xf2\xa3\x03\xf0\x1a\x03\x37\xfa\xd1\x4d\xed\x9b\xfd\xe8\x26\x12\x0c\x7e\xf4\x24\x1c\xef\x47\xa7\x30\x90\xe8\x49\x7e\x74\x80\xa4\xc6\x90\x58\xfa\xd1\x4d\xb4\xd8\xfa\xd1\x4d\xe4\x58\xf9\xd1\x93\x70\xb4\x1f\x9d\x82\x40\xfa\xa7\xf8\xd1\x01\x8e\x1a\xc3\x61\xe7\x47\x37\x51\x62\xe9\x47\x37\x11\x63\xe3\x47\x4f\xc2\x91\x7e\x74\x0a\x00\x69\x1f\xef\x47\x07\x18\x6a\x0c\x83\x8d\x1f\xdd\x44\x85\x95\x1f\xdd\x44\x88\xd9\x8f\x9e\x84\xa3\xfd\xe8\x14\x04\x52\x3e\xc5\x8f\x0e\x70\xd4\x18\x0e\x3b\x3f\xba\x89\x12\x4b\x3f\xba\x89\x18\x1b\x3f\x7a\x12\x8e\xf4\xa3\x53\x00\x48\xfb\x78\x3f\x3a\xc0\x50\x63\x18\x6c\xfc\xe8\x26\x2a\xac\xfc\xe8\x26\x42\xcc\x7e\x74\xb8\x14\x59\xf8\xd1\x87\x65\x2c\x7f\xc5\x60\x4d\x7e\x74\x00\x5f\xa3\xf0\x46\x3f\xba\x91\x02\xb3\x1f\xdd\x48\x84\xc1\x8f\x0e\xd7\x1d\x6b\x3f\xfa\xb0\x72\xe5\xaf\x18\x06\x3b\x3f\x3a\xc0\x52\xa3\x58\x2c\xfd\xe8\x46\x6a\x6c\xfd\xe8\x46\x82\xac\xfc\xe8\x70\x01\xb2\xf5\xa3\x0f\x2b\x58\xfe\x8a\x21\xb0\xf2\xa3\x03\x24\x35\x8a\xc4\xce\x8f\x6e\xa4\xc5\xd2\x8f\x6e\x24\xc7\xc6\x8f\x0e\x57\x23\x3b\x3f\xfa\xb0\x98\xe5\xaf\x18\xb8\x85\x1f\x1d\xa0\xa8\x51\x14\x36\x7e\x74\x23\x1d\x56\x7e\x74\x23\x29\x66\x3f\x3a\x5c\x8a\x6c\xfd\xe8\xc3\x5a\x96\xbf\x62\x08\xac\xfc\xe8\x00\x49\x8d\x22\xb1\xf3\xa3\x1b\x69\xb1\xf4\xa3\x1b\xc9\xb1\xf1\xa3\xc3\x75\xc9\xce\x8f\x3e\x2c\x6b\xf9\x2b\x06\x6e\xe1\x47\x07\x28\x6a\x14\x85\x8d\x1f\xdd\x48\x87\x95\x1f\xdd\x48\x8a\xd9\x8f\x9e\x84\x53\xfc\xe8\x0c\x0a\xda\x18\x13\xfd\xe8\x10\x4f\x8d\xe2\xb1\xf5\xa3\x9b\x29\xb2\xf6\xa3\x9b\x89\xb2\xf3\xa3\x53\xc8\xd1\x7e\x74\x06\xc4\xf5\x63\x92\x1f\x1d\xa2\xa9\x51\x34\x96\x7e\x74\x33\x3d\xb6\x7e\x74\x33\x49\x56\x7e\x74\x0a\x38\xd2\x8f\xce\x40\xb8\x3e\x4c\xf0\xa3\x43\x24\x35\x8a\xc4\xca\x8f\x6e\xa6\xc5\xce\x8f\x6e\x26\xc7\xc2\x8f\x4e\xc1\x46\xfb\xd1\x19\x10\xd7\x83\x49\x7e\x74\x88\xa6\x46\xd1\x58\xfa\xd1\xcd\xf4\xd8\xfa\xd1\xcd\x24\x59\xf9\xd1\x29\xe0\x48\x3f\x3a\x03\xe1\xfa\x30\xc1\x8f\x0e\x91\xd4\x28\x12\x2b\x3f\xba\x99\x16\x3b\x3f\xba\x99\x1c\x0b\x3f\xba\x90\x86\xc1\xca\x8f\xde\xc2\xc0\x2e\x4c\xf2\xa3\xf3\x78\x6a\x05\x1e\x1b\x3f\xba\x1d\x45\x56\x7e\x74\x3b\xa2\x26\xf9\xd1\xb9\x50\x61\x89\x1b\x9f\xc6\xf8\xd1\x69\xed\xbe\x7f\x32\xa8\xc9\x8f\x0e\xc0\x6b\x0c\xdc\xe8\x47\x37\xb5\x6f\xf6\xa3\x9b\x48\x30\xf8\xd1\xe3\xd3\x78\x3f\x3a\x85\x81\x44\x4f\xf2\xa3\x03\x24\x35\x86\xc4\xd2\x8f\x6e\xa2\xc5\xd6\x8f\x6e\x22\xc7\xca\x8f\x1e\x9f\x46\xfb\xd1\x29\x08\xa4\x7f\x8a\x1f\x1d\xe0\xa8\x31\x1c\x76\x7e\x74\x13\x25\x96\x7e\x74\x13\x31\x36\x7e\xf4\xf8\x34\xd2\x8f\x4e\x01\x20\xed\xe3\xfd\xe8\x00\x43\x8d\x61\xb0\xf1\xa3\x9b\xa8\xb0\xf2\xa3\x9b\x08\x31\xfb\xd1\xe3\xd3\x68\x3f\x3a\x05\x81\x94\x4f\xf1\xa3\x03\x1c\x35\x86\xc3\xce\x8f\x6e\xa2\xc4\xd2\x8f\x6e\x22\xc6\xc6\x8f\x1e\x9f\x46\xfa\xd1\x29\x00\xa4\x7d\xbc\x1f\x1d\x60\xa8\x31\x0c\x36\x7e\x74\x13\x15\x56\x7e\x74\x13\x21\x66\x3f\x3a\x5c\x8a\x2c\xfc\xe8\xc3\x32\x96\xbf\x62\xb0\x26\x3f\x3a\x80\xaf\x51\x78\xa3\x1f\xdd\x48\x81\xd9\x8f\x6e\x24\xc2\xe0\x47\x87\xeb\x8e\xb5\x1f\x7d\x58\xb9\xf2\x57\x0c\x83\x9d\x1f\x1d\x60\xa9\x51\x2c\x96\x7e\x74\x23\x35\xb6\x7e\x74\x23\x41\x56\x7e\x74\xb8\x00\xd9\xfa\xd1\x87\x15\x2c\x7f\xc5\x10\x58\xf9\xd1\x01\x92\x1a\x45\x62\xe7\x47\x37\xd2\x62\xe9\x47\x37\x92\x63\xe3\x47\x87\xab\x91\x9d\x1f\x7d\x58\xcc\xf2\x57\x0c\xdc\xc2\x8f\x0e\x50\xd4\x28\x0a\x1b\x3f\xba\x91\x0e\x2b\x3f\xba\x91\x14\xb3\x1f\x1d\x2e\x45\xb6\x7e\xf4\x61\x2d\xcb\x5f\x31\x04\x56\x7e\x74\x80\xa4\x46\x91\xd8\xf9\xd1\x8d\xb4\x58\xfa\xd1\x8d\xe4\xd8\xf8\xd1\xe1\xba\x64\xe7\x47\x1f\x96\xb5\xfc\x15\x03\xb7\xf0\xa3\x03\x14\x35\x8a\xc2\xc6\x8f\x6e\xa4\xc3\xca\x8f\x6e\x24\xc5\xec\x47\x8f\x4f\x53\xfc\xe8\x0c\x0a\xda\x18\x13\xfd\xe8\x10\x4f\x8d\xe2\xb1\xf5\xa3\x9b\x29\xb2\xf6\xa3\x9b\x89\xb2\xf3\xa3\x53\xc8\xd1\x7e\x74\x06\xc4\xf5\x63\x92\x1f\x1d\xa2\xa9\x51\x34\x96\x7e\x74\x33\x3d\xb6\x7e\x74\x33\x49\x56\x7e\x74\x0a\x38\xd2\x8f\xce\x40\xb8\x3e\x4c\xf0\xa3\x43\x24\x35\x8a\xc4\xca\x8f\x6e\xa6\xc5\xce\x8f\x6e\x26\xc7\xc2\x8f\x4e\xc1\x46\xfb\xd1\x19\x10\xd7\x83\x49\x7e\x74\x88\xa6\x46\xd1\x58\xfa\xd1\xcd\xf4\xd8\xfa\xd1\xcd\x24\x59\xf9\xd1\x29\xe0\x48\x3f\x3a\x03\xe1\xfa\x30\xc1\x8f\x0e\x91\xd4\x28\x12\x2b\x3f\xba\x99\x16\x3b\x3f\xba\x99\x1c\x0b\x3f\xba\x90\x4b\xcf\xca\x8f\xde\xc2\xc0\x2e\x4c\xf2\xa3\xf3\x78\x6a\x05\x1e\x1b\x3f\xba\x1d\x45\x56\x7e\x74\x3b\xa2\x26\xf9\xd1\xf9\x64\x15\x89\x5b\xc7\x63\x1c\xe9\x75\x0c\x1c\xd9\x32\xa8\xc9\x91\x0e\xc0\x6b\x0c\xdc\xe8\x48\x37\xb5\x6f\x76\xa4\x9b\x48\x30\x38\xd2\xeb\x78\xbc\x23\xbd\x8e\x81\xf3\x5a\x46\x60\xe7\x48\x07\x48\x6a\x0c\x89\xa5\x23\xdd\x44\x8b\xad\x23\xdd\x44\x8e\x95\x23\xbd\x8e\x47\x3b\xd2\xeb\x18\xb8\xaf\x65\x78\x2b\x47\x3a\xc0\x51\x63\x38\xec\x1c\xe9\x26\x4a\x2c\x1d\xe9\x26\x62\x6c\x1c\xe9\x75\x3c\xd2\x91\x5e\xc7\xc0\x85\x2d\x43\x5b\x38\xd2\x01\x86\x1a\xc3\x60\xe3\x48\x37\x51\x61\xe5\x48\x37\x11\x62\x76\xa4\xd7\xf1\x68\x47\x7a\x1d\x03\xf7\xb5\x0c\x6f\xe5\x48\x07\x38\x6a\x0c\x87\x9d\x23\xdd\x44\x89\xa5\x23\xdd\x44\x8c\x8d\x23\xbd\x8e\x47\x3a\xd2\xeb\x18\xb8\xb0\x65\x68\x0b\x47\x3a\xc0\x50\x63\x18\x6c\x1c\xe9\x26\x2a\xac\x1c\xe9\x26\x42\xcc\x8e\x74\xb8\x14\x59\x38\xd2\x87\x65\x2c\x7f\xc5\x60\x4d\x8e\x74\x00\x5f\xa3\xf0\x46\x47\xba\x91\x02\xb3\x23\xdd\x48\x84\xc1\x91\x0e\xd7\x1d\x6b\x47\xfa\xb0\x72\xe5\xaf\x18\x06\x3b\x47\x3a\xc0\x52\xa3\x58\x2c\x1d\xe9\x46\x6a\x6c\x1d\xe9\x46\x82\xac\x1c\xe9\x70\x01\xb2\x75\xa4\x0f\x2b\x58\xfe\x8a\x21\xb0\x72\xa4\x03\x24\x35\x8a\xc4\xce\x91\x6e\xa4\xc5\xd2\x91\x6e\x24\xc7\xc6\x91\x0e\x57\x23\x3b\x47\xfa\xb0\x98\xe5\xaf\x18\xb8\x85\x23\x1d\xa0\xa8\x51\x14\x36\x8e\x74\x23\x1d\x56\x8e\x74\x23\x29\x66\x47\x3a\x5c\x8a\x6c\x1d\xe9\xc3\x5a\x96\xbf\x62\x08\xac\x1c\xe9\x00\x49\x8d\x22\xb1\x73\xa4\x1b\x69\xb1\x74\xa4\x1b\xc9\xb1\x71\xa4\xc3\x75\xc9\xce\x91\x3e\x2c\x6b\xf9\x2b\x06\x6e\xe1\x48\x07\x28\x6a\x14\x85\x8d\x23\xdd\x48\x87\x95\x23\xdd\x48\x8a\xd9\x91\x5e\xc7\x53\x1c\xe9\x75\x0c\xdd\xd6\x08\x0e\x4b\x47\x3a\xc4\x53\xa3\x78\x6c\x1d\xe9\x66\x8a\xac\x1d\xe9\x66\xa2\xec\x1c\xe9\x14\x72\xb4\x23\xbd\x8e\xa1\xe3\x1a\x41\x61\xe7\x48\x87\x68\x6a\x14\x8d\xa5\x23\xdd\x4c\x8f\xad\x23\xdd\x4c\x92\x95\x23\x9d\x02\x8e\x74\xa4\xd7\x31\x74\x5e\x23\x08\x6c\x1c\xe9\x10\x49\x8d\x22\xb1\x72\xa4\x9b\x69\xb1\x73\xa4\x9b\xc9\xb1\x70\xa4\x53\xb0\xd1\x8e\xf4\x3a\x86\x8e\x6b\x04\x85\x9d\x23\x1d\xa2\xa9\x51\x34\x96\x8e\x74\x33\x3d\xb6\x8e\x74\x33\x49\x56\x8e\x74\x0a\x38\xd2\x91\x5e\xc7\xd0\x79\x8d\x20\xb0\x71\xa4\x43\x24\x35\x8a\xc4\xca\x91\x6e\xa6\xc5\xce\x91\x6e\x26\xc7\xc2\x91\x2e\x24\x44\xb7\x72\xa4\xd7\x31\xef\xb6\x46\x71\x58\x38\xd2\x79\x3c\xb5\x02\x8f\x8d\x23\xdd\x8e\x22\x2b\x47\xba\x1d\x51\x66\x47\xfa\xbc\x4d\x7b\x4e\x42\x37\x8e\xd2\xcf\x8f\x8f\xc1\xb1\x4f\xd6\xae\xc8\xe4\xaa\xca\x7e\x6b\x93\xa8\xb6\xc9\xf5\x9a\x45\x69\x45\x0a\x97\x3c\x93\xb4\x2a\x41\xde\xd3\x3e\x4f\xfe\xd3\x9b\xa7\x37\x0d\xce\xe0\xf0\xf9\xc4\xf2\xef\xbb\x87\x2c\xce\x8a\x47\x31\x6b\xe8\x7d\x1f\x26\xbe\x22\x75\xe5\x26\x59\x9a\xb1\xbc\xa9\x6d\x0e\xf5\x2c\xad\xdc\x63\x90\x44\xf1\xeb\xa3\xf3\xc3\x3f\x7e\x9f\xa5\x99\xfb\xef\xe4\x74\x89\x83\x62\xe6\x7c\x4f\xd2\x38\x9b\x39\xdf\x67\x69\x70\xc8\x66\xce\x1f\xb2\xb4\xcc\xe2\xa0\x9c\x39\x4f\x6f\xbe\x8b\xf6\xa4\x08\x68\xdf\x69\x71\xf6\xf4\x86\x7e\xfc\x43\x76\x29\x22\x52\x38\xff\x4a\x5e\xe8\x87\xa1\x29\x24\x66\x3d\x23\xe6\x4f\x97\xb2\x8a\x8e\x6d\x5a\x5c\xf6\x85\xe5\x9b\x7f\x74\xba\x02\x15\xe0\x4b\x11\xb4\xa9\x79\x91\x4c\xb0\x4a\xa8\x26\xcb\x2d\x0a\xc7\x0a\x54\x70\x55\x71\x49\x0f\x41\x97\x94\x19\x4d\xb4\xcb\xea\x0d\x25\x24\x8e\xa3\xbc\x8c\x4a\x4d\xa6\x5d\x80\x7f\x48\x17\x0e\x79\xa0\xca\x9b\xcf\xea\x80\x5c\xe1\x10\x46\x99\x3b\x9f\x55\x3a\x90\xb4\x17\x5d\x08\xd5\x7e\x1f\x9f\x1c\x80\x21\x11\x52\xe8\xeb\xbb\xd0\x4d\xd0\x0e\x92\xcb\x79\x6e\xe8\x89\x08\x0b\xbb\x63\xee\x90\x7d\xa8\xa6\x66\x9e\x84\x53\x7b\x25\xa6\xd5\x1f\xd3\xab\x24\xbc\x65\xaf\xb8\x87\x33\x8d\xa4\x9d\xa6\xf6\x4a\x4c\xb3\x3f\xa6\x57\xf1\xe9\x96\xbd\xe2\x8f\x31\x19\x2a\x21\xe5\xfe\x88\x6e\x89\x69\xf7\xc7\x74\xab\x8e\x27\x77\xab\xe5\x4b\xf6\x42\x8a\x43\x50\x12\x30\x25\xab\x22\x48\xcb\x63\x56\x24\x8f\xce\x50\xac\x9a\xd0\x97\x3c\xd7\x21\x18\x8a\x95\x1a\x21\xc8\xa3\x2a\x88\xa3\x9f\x15\x18\x40\x39\x96\x08\x9e\x2e\x1e\x2f\x2c\x51\xaf\x1b\x0f\x5c\x04\x9f\x1f\x9d\xe5\x62\x61\x05\xda\x71\x91\x03\xee\x4a\x0c\x08\x5a\xb5\x2f\xc3\xaf\xcc\x8d\xef\xb3\x38\x44\x20\xb7\x76\x90\x28\xd5\x6d\x81\x0a\x9c\x31\xf4\x00\xe0\xca\xea\x35\x26\x8f\x4e\xfb\x5d\xb9\xe4\xd1\x55\xa4\x81\x6a\x17\xfa\x6f\x8e\xc7\xa3\xb2\x7a\x5e\x44\x49\x50\xbc\xf2\x00\x8b\xc5\x76\x8f\xc2\x04\x1c\xd0\xe3\x99\xae\x64\x33\x47\xf8\x0a\x52\xbb\x0f\x08\xd7\x9b\xfd\x52\x49\x44\x49\x0e\x59\x1a\x4a\x64\x6c\x0e\xdb\xf5\x36\x54\x93\xd1\x83\x09\x84\x0c\xdf\x11\x52\x56\x0f\xab\xe3\x7a\xa5\x26\xe5\x72\x38\x90\x52\x80\xf1\x77\xc1\x76\xb5\xd6\x10\xd2\x00\x89\x64\xb4\x5f\x11\x22\xbc\x87\xcd\x83\xaf\x1e\xc3\x28\x3d\x66\x02\xc0\x36\xf0\xf7\x3b\x35\x05\x14\x42\x68\x9e\x7d\xc2\xc6\xe2\xb8\xd9\x6c\xd5\x0c\x78\x09\x8a\x34\x4a\x4f\xa2\x04\x1d\xbc\xc5\x56\xdd\x7c\x0b\x24\x50\xd0\x7d\x45\x88\xd8\x07\xbb\x3d\x3e\x75\x18\x64\x18\xa4\xa7\x6e\xce\x74\x20\xe1\x61\xb9\xd6\x0d\x42\x03\x23\x90\xd0\x7e\x44\x28\x08\xb6\x5e\xe8\x07\x4a\x0a\x80\x9e\xea\x99\xb0\x3b\x3e\x1c\x03\x35\x01\x0c\x44\x68\xbf\xf9\x86\x34\x7f\xd8\x87\xcb\x30\xd0\x30\xa0\xf8\xcc\x03\x2c\x57\xcb\x60\xb5\xd0\x75\xbf\xf8\x2c\x75\xbe\xf8\x8c\x4a\x9f\xef\xad\xbc\x8d\xb2\xed\x7d\x16\x0a\x13\xd1\xf7\xfc\xb5\xff\xa0\x04\x48\x2e\x15\x09\x2d\xa7\x6e\xdb\x44\x1c\x1c\x3e\xf7\x29\xf6\xf1\x0d\xc9\x7c\x7d\xaf\x57\x72\x28\xbc\xbf\x5e\xcf\x9c\xe1\x3f\x5a\x2c\xe7\x28\x04\xdb\x9b\x47\x67\xf1\x7e\xe1\x04\x1f\x00\x46\xb6\xc2\xe5\x41\x41\xda\x65\xb9\x99\xd6\xe7\x20\xa4\xb6\x7b\x9a\xa5\x44\xb1\xb5\x12\xe1\xf6\x59\x11\x92\xa2\xd9\xc4\xc1\x41\x26\x87\xac\xd9\x1c\xb9\x14\x19\x58\x5a\x87\x92\xa6\x1d\x35\x23\x0b\x12\xb4\x82\xf2\x92\x15\x61\xf3\xfb\xd1\x61\xff\xb8\xf4\x8b\x68\x59\xb0\x5a\x74\x6b\xa1\xae\x04\xb7\x0f\xa4\x24\xfc\x2c\x88\xd2\x33\x29\x22\x74\xef\xf0\x1c\x95\xd1\x3e\x6e\xbb\xc1\x7e\x44\x71\x54\xbd\x3e\x3a\x5d\x01\x02\x13\xa5\x4a\xa8\x66\xd7\xa4\xde\x6d\xe4\x45\x94\xb6\xb4\xfd\x96\xed\xde\x7f\xfb\xf8\xb8\x27\xc7\xac\x20\xdd\x2f\xb0\x03\x47\xc6\x4e\xe4\x0c\x1d\xa6\x5a\x5b\x83\xd9\x74\xc1\x63\x9a\x55\xef\xe6\xfb\x2a\xbd\xe7\x50\xc3\x21\xbb\xa4\x21\x29\xe2\xa8\x95\x8f\x06\x6c\xbf\x2f\x7e\xac\xa2\x2a\x26\x3f\x09\x84\x81\xbd\xba\xf3\xee\xe9\x8d\x13\x54\x55\xf1\x8e\xd5\xbc\x77\x9e\xde\xdc\xb7\xfb\x77\x86\x24\x2f\x48\x07\xc5\x6d\x16\xf3\x82\xb8\xf2\xce\x74\x00\x62\x0c\xd9\xc7\xd9\xe1\xf3\x7f\x5d\xb2\xaa\xc7\xd1\x89\xa5\x97\xd7\x4e\x99\xc5\x51\xe8\x7c\x13\x84\xfb\xf5\x3e\xfc\xd0\x1d\x7a\x9c\x48\x23\x51\x6e\x94\x96\x51\x48\x1e\x9d\xe0\x39\x8b\xc2\x01\x77\x55\x30\xd4\x51\x72\x1a\x0e\x4a\x4c\x30\x39\x03\x39\x37\x9e\xeb\x73\xef\x64\xcd\x8a\xfc\x1c\xa4\xe5\xa3\xb3\x6c\x5b\x7f\x89\xc2\xec\xa5\xff\xfd\x0b\x0a\x04\x5a\x63\x3c\x95\x1a\xfb\x1d\xad\xd1\xd5\x2e\xa3\x9f\x29\x39\x00\xe1\xa0\xea\x1c\x47\xdc\x10\xe1\x16\x3d\x1d\xad\x20\x4a\x87\xe1\xb3\x03\x4b\x83\xe7\x7d\xd0\xc3\x84\x51\x99\xc7\xc1\x2b\xd0\x21\x4d\xad\x7d\x10\x9e\x74\xa3\xb3\x58\x2c\xe0\xe6\x22\xe8\xe7\x4d\x57\x9b\x2a\xa0\x38\xc8\x4b\xf2\xe8\x74\x7f\x29\x36\x26\x0c\xb6\x0a\x67\xf0\xd7\xb9\x47\x26\x69\x34\xd9\x86\xe4\x30\xb9\x4d\xf3\x24\x74\xaa\xf3\x0c\xfd\x1c\x6a\xba\x15\x12\xe2\x93\x8d\x0e\xfd\xb0\x1c\x8a\x8a\x08\xaf\xca\x53\xd1\x7c\x0a\xe5\x4f\x67\x12\x84\x68\x5d\x26\x17\xdf\xb6\xff\x4a\x1c\x6e\xcc\x11\x46\xb4\xc4\xd2\x39\x43\xda\xe1\xd7\xd0\x6c\x40\xc8\x34\xdd\xfb\xdf\x7e\xe3\x94\xd9\xa5\x38\x90\xef\x83\x3c\x8f\xd2\xd3\x7f\xfe\xfb\x77\x1f\xf7\x59\x56\x95\x55\x11\xe4\xf3\x43\x59\xce\x93\x20\x77\x7e\xfb\xfe\xcd\xec\xcd\xfb\xf7\xce\x3f\xd3\xd5\xdf\x49\xa2\x3a\x4a\x9d\x20\x0d\x9d\x3f\xfe\x86\xa4\xac\x53\xcc\x2c\x70\x99\xda\x74\xff\xeb\x42\x8a\xd7\x3f\x3a\x41\x41\x9c\x90\xe4\x05\x39\x04\x15\x09\xe7\x4f\xe9\xfb\xf7\xf4\xff\x9c\x7f\x2b\xa2\x53\x94\x06\x71\xfc\xea\x04\x61\x48\x42\x27\xbc\x14\xd4\x1c\xcc\x2e\x85\x13\xc4\xf9\x39\x28\x19\xea\x24\x88\x9a\x79\xd0\x57\xd8\x93\x2a\x28\x67\x4e\x75\x8e\xca\x96\x84\x97\xa0\x64\x28\x43\x52\x46\x27\x5a\xb3\xca\xa8\x32\x7a\x26\x69\xe5\xfc\xb1\x31\x55\xfe\xe8\x94\x55\x74\xf8\x1c\xa5\xd4\xe4\xce\x52\x27\xfa\xb7\x1f\xdc\x20\x75\xa2\xb2\xbc\x10\xe7\xe5\x4c\x0a\xe2\xb0\x7a\x0e\xdb\xfb\x34\xe8\x5e\xb2\x4b\x1c\x3a\x39\x29\xca\xa8\xac\x9c\x46\x95\x46\x69\x54\x45\x41\xec\x54\xd9\xe5\x70\x1e\x3a\xf3\x8f\x59\xc1\x64\xf9\x25\x28\x42\xe7\x90\x25\x79\x50\xb5\xcb\xcb\xcc\x79\x21\x77\xcf\xc4\xf9\x4c\xf2\x8a\xca\x41\x49\x1a\xa2\x9b\xde\x5d\xf2\x90\x72\x85\x16\x24\x4e\x95\x31\x5c\x41\xfc\x12\xbc\x96\x4e\x41\xaa\x4b\x91\xd2\x92\xa8\x70\x8a\xc6\x03\xea\xe4\x25\xb9\x84\x99\x7b\x88\x83\xb2\x24\xa5\x13\xa5\x65\x45\x25\x2b\x3b\x3a\x81\x53\x9e\xa3\x24\x21\xa1\xd3\x2c\x5a\x8c\xfb\x03\x81\xff\x42\x3b\xfa\xe8\x9c\xab\x2a\x2f\x1f\xdf\xbf\x3f\x45\xd5\xf9\xb2\x9f\x1f\xb2\xe4\x7d\xf5\xb2\x2f\xdf\xf7\x43\xfd\x9e\x71\xa4\x7c\xef\xaf\xbd\x87\x75\xb3\x06\x32\x16\x33\xe6\xbc\x6b\x17\xa2\xff\xd1\xf0\xd4\xf9\xb3\xf3\xbb\x76\x4d\xf9\x00\xfc\x23\x43\x7d\x97\x99\x84\x02\xd4\xac\xf9\x1b\x58\x8b\xce\x80\x86\xf7\xb4\x30\x4c\x79\x1c\x44\xa9\x8b\xe1\x9b\x5d\x81\x15\xe0\x73\x83\x43\x15\x3d\x13\x0d\x99\xed\xdf\x4d\x3d\x0d\xf6\x66\x72\x30\x09\x8a\xa3\xb4\x72\xc3\xa8\x64\x53\xb5\x24\x31\x39\x54\x59\xe1\xc6\x51\x59\xb9\x87\x2c\x49\x02\x37\x25\x2f\x74\xdd\x6e\x56\x13\x36\x05\x9b\x81\xfa\x67\x12\x84\x51\x7a\x2a\x9b\x0f\x4f\xe9\xd9\x9b\xd1\xd5\xc8\x39\x2f\x67\xce\x79\x35\x73\xce\xeb\x99\x73\xde\xcc\x9e\xd2\x39\x2d\x99\xd3\xa2\x39\x2d\x9b\xd3\xc2\x39\x2d\x9d\x9f\x37\x68\xb2\xd6\xdf\x9c\x5b\xd4\x2e\x57\xf0\x41\xf2\xba\x0f\x15\xc1\xe7\x0f\x92\x57\x41\xa8\xd6\x7c\x6e\x0e\x12\x68\xc7\xce\x52\x35\xf0\x19\xda\xbe\x43\x05\xf6\xa1\x33\xbe\x9a\xee\x79\x54\xc8\xa2\xf4\x10\x5f\x42\xd2\x3a\x27\xa2\x9f\xc9\xbb\xdf\x9c\x3d\xb7\xff\x75\xcf\xa4\xaf\xe1\x84\xaf\xaa\xef\x4b\xf5\x19\xd3\x96\xaa\xfa\x4b\xa9\x3e\xe3\xef\x4a\x55\x7f\x25\xd5\x67\x43\xb1\x56\xd5\x5f\x4b\xf5\x37\xed\xd0\xe1\xf5\x37\x62\xfd\xa7\x74\x1e\xd3\xb9\xcf\x86\x1a\x03\xa1\xa5\x10\x48\x1e\xc0\xa1\x46\x3f\x78\xcd\x6a\xf0\xde\xf9\x8f\xd7\x9c\x74\xd6\x83\xd3\xaa\x9b\xa7\x74\xde\x7e\xe9\x6e\xf4\x61\xcd\xb6\x55\x3c\x65\xab\x7d\x05\xa5\xc4\x74\xad\xf0\x02\xf3\x0b\x68\xdf\x37\xb6\xef\x9b\xda\xf7\xaf\x69\x7f\x69\x6c\x7f\x69\x6a\x7f\x79\x4d\xfb\x2b\x63\xfb\x2b\x53\xfb\xab\x09\xed\x43\x3d\x95\x15\xd1\xcf\xd4\x44\x8d\x9d\xe2\xd2\xae\x98\x6c\xda\x16\x72\x8e\xea\xdf\x9c\x8b\x4e\xe7\x34\x7a\x44\xd2\x4c\x42\x39\xdc\xc6\xf6\xe6\x4b\x8f\xaa\xfd\xcd\x6c\xe1\xd6\xb2\x03\x9f\x39\x25\xd2\x93\xfb\x0f\x09\xb5\x28\xa2\x9e\xcc\x32\x09\xe2\x98\x6a\x51\xf6\x87\x9a\x9b\xac\x58\x3f\x8b\x64\xc7\x6f\xd7\x7a\x12\x14\x9f\x59\x0e\xec\xde\xa8\xec\xaf\xba\xfd\x86\x7e\x73\xdb\x9f\x8a\xcd\x7d\x53\x67\x7f\x92\x3a\xf3\x5d\x54\x56\x7d\x4f\xe6\x6c\x51\xb9\xa4\x6c\xd9\x11\xd5\x01\x57\xf6\xee\x1e\x4c\xf0\x7f\x49\xe9\xe8\x3a\xd4\xc6\x28\x59\x35\x27\xaa\x48\x42\x4d\x8a\x2a\x73\x22\x56\xe8\xb2\x8d\x5c\xd7\x42\xf3\xcd\x06\x3f\xac\xef\x52\xac\x0d\x50\xbf\x17\x81\xd8\x3f\x50\x72\xe8\xe2\x4a\xf7\xba\x8f\x71\x40\xd7\xc7\x73\x14\x87\xf7\xf8\x59\xfd\x6f\x20\x6a\xc8\xbd\x5f\x44\x1e\x7d\x1f\x95\x87\x8e\x45\xef\xdf\x3b\xbf\xbf\x44\x71\xc8\x2c\xbf\x3f\xd2\x0d\xf2\x1f\x99\x47\x80\x99\x72\x51\x99\x28\x87\xff\x61\xf1\xf6\xfe\x83\xf6\x20\x03\x70\xf4\xf7\xfd\xb6\x97\x6a\x4a\x71\x13\x2c\x8a\x3c\xdb\x50\x17\x1f\x54\x72\x37\x80\xf3\xc2\xd7\x28\x7e\xae\x34\xeb\xb7\xf8\x3d\x87\x3b\xd6\x1a\x71\xa3\xe2\xdd\x89\x9f\x54\xaf\x9b\x5a\xcd\x88\xb5\x3e\x10\xc4\xbb\xf0\xf4\xe4\x2f\xbc\xd5\xd3\xd3\x62\xf1\xf7\x8b\xa7\x37\x1f\x9c\xf7\xef\x1d\x92\x38\x61\x50\x9e\x67\x4e\xba\x2f\x73\xd1\x62\x6a\xe5\x99\x71\xf1\x3f\x3b\x41\xfe\x4c\x48\xce\x49\x26\x23\xc7\x89\xc9\x33\x89\x67\xec\x3c\xde\x29\x48\x92\x3d\x93\xd2\x09\xc9\x31\xb8\xc4\x95\xb3\x2f\xb2\x97\x92\x14\xdd\x2c\x63\x16\x36\x13\x18\x86\xb2\xb7\xfd\x04\xa1\xe5\x66\xa6\x0b\x2f\x41\x0c\xb0\xfd\x06\xba\xa7\xf9\xdf\x49\x99\x67\x69\x49\x0d\xc2\x28\x09\x4e\xa4\x74\xde\x91\xb4\xbc\x14\xfd\xcf\x30\x4b\xef\x2a\xa7\x3c\x04\x31\x71\xf6\xe4\x35\x4b\xc3\xd6\x96\x6f\xdc\x75\xe5\x7d\x2f\xaa\xff\x41\x77\x32\x51\xe9\xe4\x97\x22\xcf\x4a\x72\xbc\xd0\x3d\x51\x96\x53\x39\x77\x9e\xa3\xc0\x09\x52\x87\xd4\x79\x1c\x1d\xa2\xaa\x59\x8a\x9d\x22\xa8\xce\xa4\x70\xaa\x73\x90\x3a\x7b\x42\xbb\x5a\x9d\x49\xcf\x86\x63\x46\x77\x50\xb1\xf3\xc7\xff\x27\x4a\x4e\x9f\xfe\x58\xb2\x5d\x80\xf3\xff\x13\xb6\x27\x8a\xb2\x4b\x19\xbf\x3a\x55\x11\x35\xdb\x0e\xe7\xe9\x4d\x4b\x30\xdd\xa8\x15\x43\xaf\xf6\xaf\x1d\xc2\xa7\x37\x4e\x90\xe7\x45\x16\x1c\xce\x4e\x94\x3a\xbf\xef\xf6\x0a\xce\xb3\x3f\x6b\x76\x2c\x69\xe8\x04\xfb\x20\x0d\x33\xba\xf9\x8a\x2a\xa1\xd6\xd2\xd9\x93\x43\x70\x29\x09\x2d\x62\x3e\x94\xd2\x89\xb3\xaa\xa4\xdb\x96\xea\x1c\x15\xa1\x9b\x07\x45\xf5\xea\xbc\x44\xe1\x89\x54\xa5\xf3\xae\x91\x59\xda\xad\x7f\xca\xb2\x53\x4c\x9c\xef\x83\xbc\xe1\x97\xf3\x72\x8e\x0e\x67\xe7\x85\x14\x84\x72\x97\xd4\x39\x39\x54\x5d\xff\xdb\x7e\xbc\x44\xd5\x39\x62\x1b\xa7\xa4\x24\x31\x95\x8f\x2a\x73\xf6\xc4\x89\xd2\xe7\x2c\xbe\xa4\x55\x50\x44\xf1\x2b\xed\x69\xf4\x73\xbb\x1f\x75\x7e\x20\xc4\x09\xe2\x32\xb3\xdf\x1f\x79\x3b\x6f\xbb\xa3\x4a\x24\x39\xb9\xc7\xf8\x12\x89\x8a\xb7\xff\x3e\x28\xdd\x46\xed\x52\x1a\x9d\xea\x7c\x49\xf6\x69\x10\xc5\x65\x8b\xa2\xff\x20\x2e\x13\x7d\x81\x69\xad\x18\x2a\xee\x4f\xdc\x1a\x0a\x4b\x90\x85\x53\x2a\xed\x26\x39\xe8\x4c\x5b\x52\x04\x61\x74\x29\xdf\xc9\x20\x4d\xc1\xbd\x08\xd4\xf9\x38\x79\x88\xee\xeb\x7d\xab\x48\xde\xbf\x77\xfe\x5f\x42\xf2\x66\x0b\x1c\x54\x4e\x92\x95\x95\xe3\x2d\x16\x6f\xa9\x3c\x10\x13\x53\xbb\xfd\x77\x74\xba\x14\x83\x11\x32\x3f\xb2\xdf\x0d\x33\xe9\xea\xcf\x66\x66\xc9\xa4\xe4\x10\xe4\x55\x94\xa5\x77\x25\x53\xea\x0e\x3b\x1d\x6f\x84\x66\x10\xa2\xb9\x6e\xbd\xfa\x05\xb4\xe0\xf6\x0e\x49\x5c\xbf\x3b\xbf\x75\xe6\x6b\xd9\xc2\xf2\x44\x34\x2d\x51\x6a\x3b\x84\xaf\xa7\xd2\xd8\x42\x2d\x60\x0a\x35\x4a\xab\x91\xbe\xef\x99\xff\x81\xf1\xcd\x95\xf4\x58\xff\xb9\x8a\xd2\xa0\xfb\xd4\x0a\x2f\x56\x97\x15\xb0\x01\x6c\xa7\xdf\xb1\xc8\x12\xa6\xf6\x1a\x5f\x4d\xa7\xf8\x9c\x46\xea\xd8\x94\x07\x5a\x70\x0e\xf6\xe4\x60\x78\xfb\x91\xfb\xff\x82\xa2\x72\xbc\x47\xe7\x07\x52\x39\x81\x93\x04\x75\x94\x5c\x12\xa7\x20\x71\xc0\xf6\xe2\x55\xc6\x70\x37\xc8\x9a\x61\xa8\xfb\x6b\x19\x8b\xc5\xdb\x0f\x10\x8d\xff\xe8\xfc\xdb\x33\x29\x8a\x28\x24\x0c\xaa\x19\x0d\x8a\x83\xdd\xcb\x73\x32\xaa\x54\x5f\xa2\x12\x68\x92\x38\xa6\x9a\xa3\xbf\x70\xd7\x62\x7b\x39\x93\xd4\x29\x49\xc5\x34\x4f\xd0\xf6\x8c\x2a\xc1\x16\x63\x50\x55\x45\xb4\xbf\x54\x84\xda\x1b\x8d\x50\x9d\x1c\x12\x93\x84\xa4\x15\x13\xad\x4e\x0e\xda\x6b\x74\xbf\x00\x0e\x43\xb6\xb7\xdc\xfd\xe1\x9c\x15\x74\xb1\x63\x45\x0d\xab\xa8\x8a\xef\x08\x00\xca\x80\xc1\x31\x4a\x98\x70\x88\xcc\x6d\x50\x50\x61\x8a\x89\xeb\xd5\x33\xa7\xf9\xcb\xa7\x7f\xb1\x4e\x34\x1f\x1b\xea\x5c\xaf\xbb\xd2\x22\x36\xf0\xe8\x5c\x8a\xb8\xc7\x02\xe6\xf1\xdf\x5f\xaa\x2c\x2f\xc8\x31\xaa\xe9\xe2\x14\x7c\x26\xa5\x73\xa0\xab\x4a\x76\x74\xda\x15\xd9\x7d\x21\xfb\xcf\x51\xe5\x26\x51\xea\x86\xe4\x39\x3a\x10\x37\x8f\x6a\x12\xbb\xec\x40\xa3\xa1\x3c\x53\x94\xce\xda\x56\xf6\x97\xca\x09\x33\x52\xd2\x05\xe0\x90\xa5\xcf\xa4\xa8\x9c\x30\xcf\xeb\x8f\x9f\xc2\x3c\x9a\xb7\x95\xfe\xe3\x4c\x0a\x72\x57\x3a\x69\xe6\x94\x97\x03\x9d\xda\x6c\xac\x4a\xe7\x92\xb6\x14\x86\x8e\x82\x88\x32\x4a\x0f\x74\xa9\x62\xd0\x69\x59\x05\x69\x18\x14\x61\x87\xf8\x0f\xd0\xb9\xe7\xb0\xa3\xef\x7e\xd5\x38\x04\x69\x74\x29\x09\x5b\x36\x0e\x65\xd9\xfa\x41\x0b\xc2\x6e\x62\x46\x19\x63\x53\x7b\xa6\x94\xa5\xf1\xab\x53\x1e\x0a\x42\x1a\x0f\x2a\xbb\x4f\x34\xd4\x7c\x74\xbc\x07\x3f\xcc\xa3\xfb\x19\x6d\xf3\x5f\xfe\xe1\xc1\xf5\xbc\xce\xa2\xb8\xe4\x79\xd6\x76\xb9\x3d\xd0\x30\xe1\xf2\x69\xdd\x7b\xe7\xcf\x14\xd7\x0f\x6d\x7f\xe8\xe2\x27\xf9\xe0\xa5\xe1\xf5\xeb\xfb\x0f\x52\xad\xe6\x74\xa3\x97\x18\x20\x30\xe0\x38\xa4\xd3\x61\xbd\xeb\xf7\xdd\xd3\x9b\x3f\x02\x21\xbc\xff\x63\x73\x45\xf3\x79\x35\x5f\xce\x17\xed\xdf\xeb\xa7\x37\xf7\x1f\xb4\xae\xb4\xbc\xc8\x72\x52\x54\xaf\xec\x43\x1c\x67\x2f\xec\x16\x6c\x59\x35\x13\x25\x4a\xa9\xb5\x50\x46\xe2\x9a\xd5\xce\xae\x7f\x26\x71\x4e\x0a\xe7\x78\x49\x0f\x4c\xdb\x56\x99\x53\x90\x3c\x0e\x0e\xc4\x49\xc9\xa9\xd1\x28\xcf\x41\x7c\x69\x8d\x08\x67\xf1\x94\xfe\xae\xaf\xfc\x1c\xc4\x51\xd8\xaf\x81\xed\x92\xd7\x4c\x90\xdf\x34\xbe\xda\x47\xe7\x5d\xbb\x06\x12\x6a\x2a\xfd\x86\xa1\xa2\xb6\x50\x5b\xbb\xf7\x1c\x46\x47\xa7\x7a\xcd\x89\x9b\x1d\xdf\x35\x95\xee\x9d\x8f\x1f\x9d\xf4\x92\xec\x87\xd3\x1e\x80\x35\xc8\x73\x92\x86\xef\xda\xdf\x33\xaa\xe3\x5a\xb8\x99\xb3\xb8\xef\x06\xe8\x17\xe7\x77\x24\x2e\x89\x05\x7c\xdb\x66\x07\x37\x8c\x59\xeb\x72\x6e\x2b\x7e\xe0\x3d\xa6\x82\x11\xd0\xfc\x4b\x77\x09\xf0\x3b\x55\x29\x41\x1c\x53\x61\xe1\x8d\x83\x47\xe7\x18\xc4\x25\xb9\xef\x56\xb8\xa3\xd3\x1d\x19\x30\x99\x22\xc2\xa9\x4d\x0f\x85\x72\x1d\x88\x19\xeb\x32\xc5\x86\x37\xeb\xfc\xdd\xc7\xa6\x61\x05\x7a\x05\x18\xe6\x31\x1e\xbc\x10\xb8\x10\x98\xfb\x44\x41\xe9\xf6\xc2\xa2\x73\x1c\x0c\xdb\xfb\xda\x71\x04\x1b\x30\x00\x3d\x89\x64\xdb\xe6\x7b\xa0\xc6\x06\xba\x92\xec\x0e\xc9\x34\xba\x47\x92\x20\xc2\x59\x8e\x12\x4e\x39\x00\xfe\x2a\x22\x72\x0b\x9a\x85\x76\xbf\x24\xdd\x9a\x69\xf5\xb5\x24\x55\x2f\x71\xd7\x50\x71\x4b\xd1\xbf\x66\x3c\xa6\xc8\x44\xbb\x45\x68\xdc\x7c\x87\x8c\xee\xbd\xe8\x7f\xd5\x7b\x12\x5a\xaa\xda\x89\xb0\xb2\x61\x2b\x89\x5e\x06\x1a\x0c\xc7\x1f\xaa\x82\x04\x49\xe3\x90\x3c\x93\x66\xd9\x6f\xac\xec\xe6\x6a\x87\x13\xa4\x87\x73\x56\xb0\x9d\x3c\xbb\x77\xe1\xec\x8b\xec\x33\x49\x87\xfb\x2f\xcd\x59\x71\x56\xb0\x0d\x63\xe0\x7c\x72\xfe\x87\xfe\x14\xbf\x73\xda\xfd\x67\xc9\x0e\x75\xf3\x4b\x45\x97\xe4\xe8\xc0\xce\xa3\xd9\x4d\x69\x12\x32\xe7\xcb\x67\xf2\xba\xcf\x82\x22\x7c\x4a\x3f\xef\x43\x71\x77\xfe\x79\x1f\x76\xfb\x72\xf7\x95\xff\x59\x2b\xdd\x6f\xb4\x96\x82\x6b\xb4\x68\x60\x1a\xb2\xcb\xa7\x15\xda\xfd\xbd\x6a\x77\xce\xfd\x74\xcb\x44\xb3\x2d\x67\xd8\xa4\x0d\x79\xdf\x4f\x18\x76\xe1\x43\x67\xba\x48\xfd\xa1\xdb\xac\x4e\x23\xf1\x8e\xf1\x94\x94\x15\x09\xdd\xbe\xbf\xe0\xbc\x01\x27\x28\xcd\x52\x72\x2f\x8e\x10\x73\xab\x32\x5f\x51\x23\x93\xfd\xd5\x24\x4b\x6f\xa7\x4e\x4a\xf3\x82\x70\x4e\x4d\xba\x87\x39\x1c\xb2\x4b\xda\x38\xd1\xca\x2c\x69\x66\x82\x93\x5d\xaa\xfc\x52\x95\x4e\x75\x0e\x2a\xa7\xb1\x18\xd9\xf7\x2a\x38\x95\xd4\xc2\xa3\x44\xd1\xbf\x1b\xe4\xe1\x70\x48\x2c\x13\xd4\x0a\x62\xc7\x32\xf4\xc2\x06\xbc\x61\xd7\x1f\x29\x70\x5c\xf9\x87\xb4\x39\x59\x3e\x14\x59\x1c\xb3\x3f\xf7\x02\x9f\xe6\xb4\x73\xa0\xfc\xcf\xdd\xf6\xb8\x3f\xe6\xe1\x2b\xb8\x43\xd9\x07\xf8\xaa\xc8\x7d\x7d\x6c\x9b\x81\x96\xf9\x1f\xfa\xdb\x49\x6c\x1b\x50\x0e\x9b\x55\x52\x35\x6e\x16\xbe\xc2\x8c\x4d\xd0\xac\xdb\x7e\x47\x0d\x83\x9b\x7d\x58\x73\x65\x89\xf1\x71\xb8\xbb\x10\x91\xd6\x37\x00\x74\xdd\xa9\x88\xc2\xfe\xee\x43\xe7\x21\x68\x8d\xfe\xa1\xbd\xc6\x45\xca\x0c\x78\xc6\x42\xf6\x76\x6d\x70\x0c\x94\xfc\xed\xaa\x6e\x57\xd9\x7b\x9c\x00\xa6\xa0\x62\x7e\xd4\x01\x8b\x00\x0b\x3d\x7f\x60\xac\x93\xe0\x33\x15\xab\xb6\xd2\xbb\x5e\xa2\xdb\x96\x80\x17\xa5\xaf\xd4\x4a\x16\xdd\x2c\x0f\x84\x5c\xd2\x2a\x8a\x9d\x00\xb4\x0f\x36\x17\xc3\xc7\x19\xd5\xb6\x1d\x45\x7d\x37\xd9\xbe\x03\xf9\xde\xef\x42\x40\x37\xbe\xf9\x33\x40\xf7\xcb\xb0\x83\xf8\x1d\xa9\x2b\x92\x86\x52\x8f\x87\x9d\x83\xd8\x73\xb6\xe1\x1d\x70\xb9\x97\xfc\x1d\x4f\x29\x1b\x42\xc0\xd0\xfb\xa1\xb5\xb7\x83\xf3\xd9\x35\xd3\xc6\xb9\x7a\xb0\x8e\x7e\xe8\x6a\xf6\x64\x36\xae\xc0\xa6\x4b\x8c\x89\x40\x3c\x1a\xbf\x72\x54\x3a\xec\xa4\x83\x14\x4e\x56\x38\xe4\xbf\x2e\xec\xa6\x4f\x23\xcf\x97\xa2\x20\x69\x25\x0c\x06\xdb\x67\x35\x5c\x02\xbd\x7a\x74\xaa\xe2\x42\x3e\x0c\xed\xb6\x63\x96\x06\x09\xe9\x5c\x2d\x6c\x7c\x44\x6e\xc0\xee\x51\xc1\x7f\x27\xe3\xbe\x87\x75\xe0\x28\x7e\xf3\x67\xc0\xf7\x28\x3d\x46\xf5\xbb\xae\x41\x89\xe9\xbf\xf0\x48\x86\x91\xb6\x19\x83\x0f\x10\x14\x30\xb7\x65\xf0\xbf\xa5\x07\xa2\xe0\x18\xe5\x6f\x41\x59\x41\xc2\x99\x53\x56\x59\xee\x34\xcd\x46\xe9\x09\x22\x69\x7a\x0e\xc0\x3e\x7e\x6c\x78\x77\x2f\x92\x8d\xb1\x9e\x6d\xf7\x44\x1a\xa5\x3f\x7f\xe1\x37\xbf\xc0\x03\x97\xbd\xf4\xba\xec\xdf\xb3\x97\xb2\x9b\xa3\xce\x6b\x76\x29\xa8\xb6\xbe\x24\xa9\x8d\x66\x9a\x17\xd9\x0b\xae\x19\x8a\xec\x05\xd1\x09\x49\xf6\xdc\xb0\xad\xf7\x44\x34\x1e\xe5\xc6\x9f\xda\x1d\xed\x50\xac\x33\x5a\xad\xf1\x2b\x9e\x87\x43\xf8\x76\xa9\x6e\xf1\x31\x20\xaa\xbb\xd8\x95\xb0\x28\xa8\x88\xc3\x8e\x55\x0b\x92\x76\x7d\x70\xde\x81\x5b\x72\xc5\x25\x0d\x5e\x82\xd7\xd6\xf2\x6a\x17\xa3\x20\x3d\x90\xfb\x79\x73\xab\x34\x73\x4f\x97\xaa\xa2\x8a\x0a\x8f\x4f\xf8\x01\x0b\x14\xd8\xcf\x80\x4f\x54\x4e\xe3\x59\xf7\xe3\x47\xc6\xa9\xdf\x7e\x7c\x7a\x73\xc8\x62\xf7\xe9\xcd\x4f\xc3\xb8\x8a\x21\x96\x3e\x88\x05\xf0\x7c\x4e\x18\x3f\xb6\x2c\xb1\xbe\xf5\x23\xf8\x87\x2c\x49\xb2\xb4\xbd\xd4\xd7\xac\xe9\xec\xbc\x9f\x9d\x0c\x06\xc5\x89\x38\x74\xe4\x3a\x96\x98\x47\x95\x1f\xc9\xa6\xbc\x81\x7d\x07\x1d\x57\xef\x9d\x7f\xa2\x68\xcb\xd7\xb2\x22\x49\x4f\xcc\x3f\x91\x94\x14\x74\x28\x4a\x92\x04\x69\x15\x1d\xb8\xc6\xfb\x23\x88\xfe\x86\x20\x74\xdf\x0a\x6b\xca\x6f\x9a\xd1\x78\x6c\xe7\x76\xf3\xab\xd1\x7b\xed\x24\x11\x9d\xe0\x02\x63\x5b\x04\xff\x87\xbd\x77\xe1\x6e\xe4\x38\xd2\x44\xff\x4a\x4e\xab\x2d\x11\x12\x0a\x04\x5b\xa2\x1e\xa4\xdc\x33\x92\x2c\xd9\x9a\xb1\x25\x5f\xb7\xbc\xda\x73\xdd\xde\x41\x02\x95\x00\xca\x2c\x54\xc2\x95\x05\x92\x10\x4f\xef\x6f\xbf\x27\x23\xf2\xfd\xa8\x2a\x90\x2d\xcb\xbe\xbb\x9e\x39\x76\x13\x95\xef\x8c\x8c\x8c\x8c\xc7\x17\xd6\x3e\xe1\xaf\x6f\xf4\x39\x0e\x99\x77\x7f\xb6\x41\xeb\x81\xd2\xc8\x10\xfc\xf0\x80\x8d\x38\xb7\xae\x19\x0a\xcf\xf2\x1f\xea\xd1\xa0\x42\x94\x23\x38\x84\xdc\x38\x15\x3e\x41\xf0\x59\x53\xc9\x37\x92\xb9\xfb\x17\xc0\x54\x1e\x31\xfd\xfe\xd0\x66\x06\xd7\x64\xe1\x88\x05\x55\x43\xa8\xeb\x65\x99\xd9\x24\xe7\xce\x3d\x7b\x6e\xff\x9d\xbe\xad\xc4\xd4\xbd\xd2\xc5\x55\xf6\xa6\x3c\xe5\xfa\x8f\x2f\xfd\x13\x6e\xea\xf4\x25\x3d\xee\xd2\x7d\xd3\xaf\x07\xfe\x61\xcb\xc8\x22\xbb\x58\x0b\x24\x7f\xa3\x1e\xbe\x9c\xbd\x88\xd4\xc3\xe1\x92\xd7\x45\xcb\x68\x79\x1c\x41\x66\x16\x21\x41\x1b\x91\x8c\x8d\x48\xf1\x42\x7d\x1e\x81\x87\x2e\xd9\x8a\xef\xc0\xc0\xcc\x39\x69\x68\x2b\xb9\x3a\x3c\x4c\x69\x67\x44\x05\x38\xc5\x5d\x25\x99\xe3\xf2\xa8\x1a\x53\x4e\xbc\xda\x46\xb3\x70\x8f\xe3\x62\x86\x26\xff\x3b\xde\xde\x08\x63\x1b\xbf\x63\x44\xfe\xcf\x42\x52\xfd\x42\xa9\xa1\x55\x63\x35\x95\x44\x8c\x0a\x6b\x6e\x2d\x58\x95\x30\xee\xc8\xd0\xfc\xec\xad\x9f\xfb\xd4\x4a\x9f\x3d\x97\xcf\x18\xa0\x3a\x58\x27\xbd\xd6\xea\x4f\xb5\xcc\x72\x16\x57\x64\x4e\xe6\x64\xcf\xda\x15\x6b\x3a\xba\x61\x67\x65\x75\x5b\x95\x2c\x6c\x40\x69\xb0\xe5\xdb\xab\x2c\x09\x95\x94\xa1\x48\x61\x21\x27\xac\xbc\x2a\x94\x7b\x89\xb6\xee\xc3\x29\xc0\x06\xc0\x18\x44\x1a\xde\xc9\x27\xd0\x9d\x7c\xaa\xa9\xe6\x42\xab\xa3\x2a\x3f\x23\x5f\xec\xf7\x75\x85\x7e\x01\xdf\x7e\x7d\x31\xff\x00\xae\x83\x6f\xaa\x96\xad\xf9\xfd\x8c\x7c\xb5\x6d\xe5\xbb\x4f\xfe\xf6\x8a\xae\x69\x5b\xa9\xe6\x4a\x0e\x9d\xd0\xfd\x9e\xd1\x16\x6d\x07\x7f\x3f\x54\x2d\xee\xc4\x2c\x30\x3e\x8e\x9b\x75\x92\x92\x25\x1b\x3d\x8b\x96\xd1\xb0\x5c\xd5\x81\xc3\x82\x7d\x8b\xa7\x7a\x62\xb0\x8e\x30\xda\xd6\x95\x47\x9f\x99\x1e\xf9\x7a\x2d\x58\x37\x6e\x63\x9f\x37\x87\xdd\x15\xc9\xcc\x29\x66\xc1\xd5\xfa\x4c\xd6\x90\x22\x1c\x46\xdb\x39\x0b\x23\x3f\x4c\x5c\x9f\xb4\x3f\xf1\x3b\x7b\x15\xeb\xf7\xe4\x9e\xad\xaa\xf5\x51\x52\x3f\x55\x76\x5e\x6d\x4a\x3d\x63\xb3\xcd\x6c\x0a\x32\xd1\x44\xee\xc7\x9a\xb7\x2b\x96\x92\x78\xc0\xa7\xed\xbb\xef\xa0\x3d\xb4\xb2\xc0\x2b\x19\x45\x39\xf2\x0a\x0d\x6a\x02\x2e\x99\x3d\x9e\x75\xd2\xb0\x3b\x30\xd9\x8b\xa9\xb1\x37\xc2\xee\x97\x9c\x50\xf2\x07\x2a\x78\x23\xf9\xbe\x36\x51\xc1\x12\xcf\xcc\xc2\xb6\xfc\x4e\xae\x9a\x38\x7b\x0e\xba\x04\xb5\x72\x2f\xc9\xfb\x9a\x8f\xda\x6d\x55\x0b\x29\x77\x0e\xd6\x51\x16\x37\xb2\x94\xd9\xd8\x6c\x29\x57\x73\xf7\xa5\x15\x98\x6f\x2b\x76\x07\x46\x42\xb9\x3f\x2a\x8e\x22\x78\x59\xab\xe5\xfd\xd2\x79\x7c\x60\xa4\xc6\x1a\x62\x2d\xa8\x00\x73\xfb\x5e\x1e\x9d\x33\x29\x7b\x5f\x91\x5d\xd5\xd8\x5b\x71\x32\x25\xa0\x67\x52\xe6\x7e\x10\xaa\x3a\x8e\x32\xd5\x95\x69\x9d\x10\x72\x76\x2f\xae\xe4\xbe\x8b\x9d\x82\xea\x98\x92\x5d\xa9\xf0\x2d\xa6\xa4\xde\xa8\x60\xa6\x29\xb9\xaf\x0d\x92\x82\xe3\x19\xc5\x60\x10\x7a\x54\xe8\xd6\x43\x16\xd1\xe5\xb8\x20\x9b\x9a\x2f\x69\x4d\x6e\x69\x5b\x81\xba\xa3\x12\x92\x9d\xc2\x44\xb0\x8a\x57\x9a\xb6\x9b\xc3\x0e\x1e\x27\xc6\xcb\x69\xa6\x88\xf0\x3b\xba\x63\x9a\x61\x34\xec\xbe\xf3\x84\x04\xde\x92\xe6\x50\xd7\x20\x49\xca\x02\x35\x15\x6e\x81\x99\x3b\xf3\x97\x2f\x9d\x2f\x85\x6c\xea\x4c\xec\x26\xfa\xeb\xae\xec\x2d\x37\x7d\xd4\xc2\x8d\x6f\xfd\xb9\xfb\x23\xdd\x31\x71\x25\x3b\x24\x62\x47\x76\x25\xa9\x37\xe4\xbe\xf6\x1b\xb3\x76\xd0\xb0\x35\xfd\xc8\xec\x97\x5e\x92\x3d\xee\xe8\xbe\xb8\x61\x47\x71\xe6\x09\x1b\x86\xd1\x5c\x11\xc0\x20\x3a\x8b\x6a\x4e\xd5\x73\xf0\xda\xb5\x5a\x02\xa7\x21\xff\xf6\x6b\xdc\x20\x49\xf2\xcf\x1b\xf2\x39\xa9\x59\xb3\xe9\xb6\x71\x1b\x93\x29\x69\x52\xbf\xcb\xb6\xc9\x07\xe4\x42\x7e\x3f\xd4\xb5\xcb\x9e\xfe\xa0\x0e\x80\xab\x36\x80\x7b\x97\x7c\xe7\xd2\x04\x8a\x05\xa2\x23\x67\xeb\xaa\x15\xdd\x64\x1c\x7d\xec\xaa\xe6\xe9\xdb\x0e\x15\x32\x9b\x25\x3b\x18\xb7\x57\x7a\x03\x76\x55\x83\x7b\xb4\x91\x97\x83\xbf\x99\xe9\xf5\xdf\x55\xb0\x03\xf3\x29\x54\x4e\xac\xa0\x12\xac\x07\x56\x10\xb8\x88\x5c\x40\x79\xbc\xa2\xf5\x53\x5c\x01\x5b\x52\x36\x76\x41\x56\xb4\x5e\x1d\x6a\x08\xa6\x52\x47\x5e\xf3\x2b\xf7\x2c\xf3\x86\x91\x9a\x09\x41\xe6\xb3\xf9\x0b\xb9\x54\x52\x4c\xe0\x20\x89\x11\x0a\xaa\x76\x1c\x40\xb5\xab\x3a\x08\xb1\x05\x85\xea\x62\x57\x35\xc5\x02\x23\xdd\x24\x57\x5e\x10\xe5\x43\x82\xac\x55\x73\x5b\xf5\x84\x5b\xb7\x14\x16\x5f\x8b\x65\xc2\xfa\x18\x6a\x47\x91\xbb\xbb\xbb\xd9\xdd\x87\x33\xde\x6e\xce\x7f\xf8\xd3\x39\xb0\x66\xc5\x99\x8b\x8f\xce\xdf\xd9\xfd\x1d\x3c\x60\x76\xf4\x5e\x9b\x28\xf4\x78\x3d\xc7\xcf\xf9\x6c\x7e\xb1\xbf\x0f\x87\x4f\x8d\xde\x05\xfe\x06\x07\xa1\xc3\x46\x72\x4e\x14\x66\xe2\xc1\x2c\x0f\x1b\x31\x43\xbf\x1c\x18\x91\xd8\xf2\xbb\xff\x5e\x1e\x36\xb3\xd5\xa6\xfa\xf7\xaa\xfc\xf5\xc5\x27\x9f\xbe\xf8\xf8\xa2\x87\x72\xe9\xfd\xd3\x29\xf7\x93\x8f\x3f\x99\x7d\xf6\x69\x9e\x78\xe9\xfd\x89\xc4\x2b\xb7\xfb\x6a\x0c\xb3\x4a\x70\x11\x76\xdf\x4d\xe3\xa3\x03\xbf\xfa\xcf\xa2\x82\xcc\xe6\x2f\x62\x32\xff\x13\x43\xb7\x7a\x4a\x96\x35\x6d\x6e\x88\xe8\x20\x70\xb1\x5a\x5b\xde\xe0\x5d\x2a\xc6\xef\xac\x55\x15\x81\x5e\xe5\x3d\x04\x04\x45\xc1\x75\x9a\xa0\x2e\x48\x1f\x82\x3f\x83\xa3\x30\x1c\x99\x1d\xbd\x91\xcd\x3b\xbe\xbb\x87\xae\xaa\xab\xce\xbb\xe8\xa3\x6d\x43\x15\xe1\xbd\x78\xe2\xc6\xbd\x7e\xf6\xfa\x19\x21\x67\xe9\x29\x4f\xfa\xba\x7e\x32\xcd\xbc\x7e\x56\x88\xdd\xeb\x67\x19\x92\xf1\x55\xa0\xe3\xde\xd6\x96\x08\x86\x19\xa7\xf2\xd9\xa9\xeb\x29\xac\x81\xfc\xef\xe2\x9d\x07\x28\xf8\xc6\x79\xa7\x4a\xae\x87\x1e\x5f\x6b\xf9\x66\xac\x99\x94\x18\x5c\xf6\x94\xe0\x85\x1c\xf5\x0a\xf1\x8d\x12\x72\xc2\x3f\x80\x8f\x9d\x2c\xa2\xa3\x11\xe5\xf3\xa4\x3e\x6a\xa5\xf5\xa6\xba\x65\xee\xa2\x00\xbb\xba\xab\x4a\xd6\x5a\x61\x35\xa9\x09\x38\xfd\x9e\x18\xb1\x60\xd7\xc6\x76\x2d\xef\x09\xad\x91\x88\xf1\xb4\xe4\x67\x47\xe5\xe0\x05\x5a\x6a\xdd\x82\xef\xec\x94\x8c\xf4\x0c\x56\x1e\xfc\x8a\x5d\xed\xce\x88\x85\xd7\x17\xd1\x5b\x59\x77\xd4\x1e\xf4\x2e\x7d\xc9\xef\x4e\xbe\xa4\xe9\xfd\xd5\x08\x4e\xe9\x2e\x3e\xbd\x8f\x16\xdf\xd1\xea\xec\xe8\xfd\xdb\x5c\x7c\xb0\x6b\x89\x3d\x6d\x04\xd9\x1d\xea\xae\xda\xd7\x2c\x5a\x79\x31\xb0\xaa\x4b\xd6\xdd\x31\xa5\xf2\xde\xa9\x90\x73\x39\x0b\xcf\x30\x97\x5b\x53\x55\xf9\xec\x39\xa0\x97\x4d\xc9\x73\x88\xdd\x79\x1a\x71\xeb\xa6\xa2\x05\x4e\x6f\x47\xa2\x47\x6d\x6c\x37\xc7\xc1\x13\x5c\xe5\xe4\xf4\x0f\x43\xe7\x04\x3d\x3e\x1f\xb5\x81\x9a\x1a\x7e\x1d\x74\xd5\xab\x24\x4c\xcd\xfd\x84\xee\xaa\x66\x7c\x77\x78\x1c\x52\xab\x37\xd0\x61\x48\x84\x2e\x01\xd9\x66\xde\x13\x86\x09\x2b\x8a\xb2\xef\x5b\x45\x92\xdf\x71\x53\xa4\x87\x19\xa3\x71\xbb\xe1\xa6\x89\x90\x7f\xf0\x86\x0d\x90\x38\xf8\xf0\x66\xb8\xc7\x14\x34\x0f\x56\xca\xa4\xcd\x11\x99\x38\x3c\x47\x87\xb9\x8a\x6c\xfb\xe7\x64\xe9\xa7\xf0\xa0\x7f\x4d\x9a\x4f\xdd\xfe\x3f\x27\xc9\x9f\xde\x9f\xa3\x07\xfa\xa6\xa5\x3b\x06\x4f\x02\x50\xfc\x6d\xd0\xea\x04\xee\xe7\x4a\x16\xfc\xb3\x60\x25\x52\xdc\xf2\xe8\x04\x6a\x75\x5c\x17\x56\x06\x5c\xde\xb6\x6c\xd5\x69\xc7\x64\xbe\x56\xf6\x2a\x65\x10\x03\x32\x55\xf1\x5f\x47\xf5\x10\x93\x8f\x25\x4f\x6b\xb8\x88\x8c\x58\x9e\xd1\x2c\xa3\x6b\x9c\x92\x1e\x45\xfe\x58\x22\xb6\xe6\x3f\xe5\x34\x5e\x29\x13\x60\xc2\xa7\xe3\x57\x4e\xef\xc6\xf9\x29\x6d\x29\x88\x55\xec\xc3\x4a\xf6\x41\xf3\x9a\xb2\x04\x47\xc6\x1d\xf0\x89\x49\x6a\x49\xf4\x28\x9f\x83\x9c\x7b\x95\x90\x7c\xb3\xd6\x9c\x6b\xeb\xb7\xb1\x36\xba\x5b\xf2\x92\xcc\x2d\x8d\x9d\x9f\x93\x2f\xea\xda\xaa\x63\x25\x6d\xa8\x28\x18\xb2\x96\x84\x8c\x7a\xf5\x25\x93\x65\x30\xa0\x27\x58\x51\x68\x5f\xae\xf6\xf3\x0a\x75\x84\x17\xa4\xdb\xb6\xfc\xb0\xd9\xda\x2e\x1d\x6b\xfe\x6c\xc5\xeb\x77\x1e\x70\x32\x6f\xa4\x1c\x5d\x05\x3e\x0a\xc6\x43\xc1\xd9\xa9\xeb\x5e\xc3\xbe\x71\x73\xb1\x0d\x4f\x13\xbf\x79\x20\xdc\xbd\xfd\x3c\xc6\xdf\x25\x7d\x84\xc1\xda\xc4\x6f\x21\x4e\x81\x8a\x6a\x45\x16\x72\x48\xc5\xc3\x72\xff\x66\x61\xce\xd7\x5a\xbb\xa0\x28\x8b\xde\xba\x66\xf7\x4b\x7e\x6f\x35\xe4\x89\x95\x73\xd7\x0c\xcc\xa7\xb2\x79\xe1\xda\xd1\xd5\xef\x9b\x96\xdf\x69\x70\xef\xc8\xb2\xe7\x50\xb6\xe7\xe1\x01\xf4\x02\xeb\xa2\x34\xdc\x31\xe1\xe4\x37\x3d\xaa\xe7\xfb\xb1\x68\x9d\x79\x2f\x11\x38\x4b\x6f\x75\xec\xd5\x64\x8c\xb7\x47\x72\xb9\x82\xbd\x8f\x7d\xb8\xb4\x35\x26\xbb\x1a\x27\x2e\x42\x7a\xee\x43\xb4\x9f\x18\xd7\xd9\xf3\x2a\xb4\xbb\x8c\x5d\x00\xd0\xdb\xdb\xfe\x40\x49\x49\x1e\x88\x0a\x17\x2d\x2e\xae\xfb\x4a\x83\xc2\xdb\x14\x36\xf3\xf9\x80\xf8\xd5\xbc\xf9\xcf\xfb\x4f\x7e\xd0\x83\x9a\xbf\xe9\xa2\xba\x4e\x4e\xa3\x6f\xf5\xcf\xcf\xc9\xc2\x7c\x2b\xc8\xc5\xc2\x18\x59\xd1\xd2\x85\x61\x73\x47\xdf\x40\x48\x1b\xc2\x9a\xae\x6a\x81\xb4\x48\x05\xe1\x65\x7b\x2e\x00\x33\x30\xb3\xb1\x76\x62\x67\x6e\x77\x81\x9b\x92\x1c\xa9\x14\xe0\xce\x70\x86\x52\x16\x00\xa5\x09\x48\x3d\x15\x58\xc6\x54\x6c\xd6\x17\xe0\xda\xcc\x76\x15\x8e\xf0\x20\x18\xe8\x2a\x67\x38\xea\x62\xee\xd3\x84\xfa\x79\x80\x72\x52\x34\xad\xed\x7d\x59\x12\xf2\x88\x68\xac\x03\x15\x48\x1f\x68\x54\x02\x9e\xe6\x08\x16\x14\xd6\x50\xc5\xe6\x3a\x68\x72\x21\xbf\xe9\x01\x49\x30\x71\xce\xe0\x99\xd3\xeb\x24\xad\x10\xe1\x36\x8e\x29\x54\xee\x5a\xc3\x04\x2c\xab\xb2\x20\xab\x00\x54\x54\xb1\x2d\xc2\x66\x50\x6e\x21\x1a\xb3\xad\x8b\x5d\xa2\xf5\x48\x58\xed\xc7\x66\x13\x72\x2b\x65\x8d\x15\xad\x35\xf2\x76\xc7\xf7\x51\x50\x8f\x1d\x66\x2a\x26\xdb\xfd\x62\xa7\xfa\x46\x0f\x09\xc1\xe4\xf4\x88\xc2\xee\x1c\x58\xa7\x20\x1e\xe0\x8a\x9c\xbd\x20\xef\xa7\x7a\x9e\x8c\xec\xba\x07\xae\x0e\x26\xf5\x84\xf6\x7d\xf8\x8e\xaf\x78\x53\xb2\x46\xca\xa9\x48\x2e\x77\xe7\x64\x4b\xeb\xb5\x75\x73\x73\x89\xa9\xd0\x10\x1e\x27\xed\x56\x21\x76\x51\xdf\xe4\x4b\xb4\x6a\xde\xb2\x56\x54\xdc\x31\x43\x7f\x51\x96\xf2\xb5\x85\x88\x13\x6a\xca\x02\x24\x49\xc7\x6c\x80\x43\x95\xe7\x5a\x3f\x38\xc1\x2c\x6a\x3c\x0f\xd0\xa3\x2b\x44\x2c\x7c\xf0\xa3\xf5\x4f\xa3\x8a\xe4\xac\x1f\xdb\x58\x40\x62\x1a\x74\x74\xab\xc4\x26\xdb\x41\x18\x67\xa2\xce\x71\x66\xf3\x53\x4f\x73\x6f\x11\x6a\x83\x83\x6d\xa6\x32\x75\x29\x7d\x3a\x40\x7b\x5a\xbe\x71\xde\xfd\xff\x2f\x5b\xb6\xb4\x10\x5d\x5b\xed\x0d\xb9\x9c\x9f\x93\xdf\x28\x3f\xca\x9f\xec\x67\xa6\xbd\x03\xcf\x68\xdd\xb1\xb6\xa1\xc0\x24\x36\x2d\x3d\xc2\x4e\x3a\x08\xbb\x0e\xaf\x11\x13\x97\xfa\xa0\x19\xb5\x38\x38\xbc\xae\xbd\x6a\xba\x6d\xc1\xd7\x45\x77\xdc\xb3\xb3\x77\x1e\x9e\x7b\x45\x0b\x18\xf6\x9b\x49\x1e\x06\x53\x95\xa7\xab\x15\x6b\x3a\x1d\xf2\xe1\x51\x2a\x62\x30\xb2\xf5\x9a\xad\x3a\x33\xbf\x3f\xd6\x74\xc5\x4a\x02\x78\x86\x3a\x8e\x99\x6c\x29\xc8\xef\x2b\xf0\x6a\x01\x14\x43\x88\x99\xe7\xf2\x11\x59\xd1\x1a\x17\x83\xd8\xb5\x32\x13\x53\x28\x7f\xee\xb4\xa2\x17\xac\x07\x0c\xe8\x04\x34\x3c\x77\x9a\x70\x08\xac\x77\xb6\x58\x78\xb9\xb9\xce\x39\xe7\xfe\x80\x91\x0e\x76\x1b\x2c\xbe\xd3\x3d\x5d\x75\x06\x68\x4f\xa8\x97\x89\xf2\xd0\x29\x3d\xc7\xa9\x85\xbf\x6d\x68\xd7\x53\x8e\xb0\xd0\x96\xe3\xfe\x8a\xae\x20\xa2\xd3\x7c\x48\xf9\x64\xe2\x33\x0d\x06\x3f\x75\xe3\x7c\xbb\x2d\xdb\xa9\xcb\x29\x74\x18\xed\x54\xb4\xd6\x5d\x01\x2e\x0a\x4d\x77\xa6\xeb\x3b\x95\x0a\x40\xb7\x31\x5f\xcc\x4d\x86\xbf\x4f\xc6\x94\xd5\x31\x88\xb2\xbc\x75\x31\xca\x8f\x02\x41\x0d\xa7\x96\xe0\xe4\x9f\xc5\x72\x83\xaf\x44\x3c\x34\xb4\xbd\x71\x70\x31\xd1\x80\x48\x77\x9a\xdf\xed\x68\x7b\x73\xd8\xa3\x9f\x4c\x05\xe1\xf8\xac\x44\x2a\x20\x62\x25\xc7\x7b\x45\x00\xa4\xd4\x6e\x9b\x02\xe6\x01\xf0\x05\x76\x6f\x3c\x2f\xa2\x68\x6f\xb0\xd9\x01\x0a\x19\x69\x78\x51\x1e\xf6\x75\xb5\xa2\x1d\x2b\xcc\x36\xfb\xd2\x84\x8b\x88\x6a\x78\x57\x8e\x30\x65\xa9\xb1\x74\x59\x1a\x1c\x2e\x8f\xf9\xa5\x0a\x85\x0c\xd5\x52\xb1\x33\xc2\xda\x4b\xf0\x91\x1d\x22\x94\x1d\x7b\x74\x64\xd9\xa1\x21\xf6\x8c\xce\x65\xca\x11\x24\x7c\x7a\xc9\x46\x2c\x57\x9e\xa5\xa7\xb1\x6e\x7b\x97\x52\xad\xe1\xbb\xc9\xfb\x33\x71\x15\xb8\x85\x3d\x16\xfd\x48\x26\x3d\x34\x63\x9f\x57\xfb\x1b\xff\x6e\xcc\x51\x63\x9e\xda\xc7\x55\x93\x7b\x91\x62\xae\x43\xa3\x0c\x78\x6c\x5f\x24\x84\xb5\x27\x23\xef\x4b\x39\xb2\xb7\x15\x43\x17\x09\x35\x41\x27\x7e\xe4\x7d\x5f\x95\xb1\xe2\x0d\xc0\xd3\x68\xb4\x26\x04\xac\xc0\x83\x5f\xfd\x04\xaa\x43\xc4\xe1\x85\x40\x0b\x25\xf5\x55\x75\x6d\x02\xd1\x5c\xe1\xc9\xb1\x75\x3f\x8c\x50\x9c\x65\xa3\x8e\x72\x6e\x02\xfd\x31\x4b\xd7\x43\xaa\x37\xe5\x2b\x90\xaa\x88\x55\xdf\x4d\x68\x6c\x86\x94\xc2\x99\x18\xa0\x44\x18\x24\xfe\x27\xa5\xcc\x71\xc2\xfa\xee\x1d\x1f\x52\xfc\x8f\x06\x67\x31\x45\x30\xec\x0f\xe4\x67\xc0\x3b\xbe\x76\x83\x7d\x1c\x8f\xe9\x92\x1f\xe0\x5e\x46\xd9\x99\x37\x6e\x5c\x0a\xb6\x41\xca\x03\xdc\xa5\xf8\x06\x27\x8b\x60\xd0\x0b\xdb\xec\x4b\x92\x39\xdf\x2e\x5f\xf3\x15\x5a\x43\x6f\x52\x14\x1b\x84\xa3\x88\x4e\x5c\xc6\xa2\xa3\x1d\xe8\xdc\xcd\xe9\x99\x6a\x6c\x8b\x2b\x74\xf0\xb0\x68\x52\x6f\x4b\xd6\x80\xd6\x06\xa4\x0d\x83\x17\xfe\xce\x03\x8e\xd1\x50\xcc\xbb\x26\x9e\xc6\x48\xe8\x2f\x7d\x19\x3d\x66\x04\xf6\xa7\x58\xa7\xb9\xd6\xf3\x0d\xcd\x30\xce\x13\xc0\xf0\x71\xfc\xd5\x11\xcf\x2d\x43\x0b\x44\xf4\x04\x97\xc7\x3f\x73\x1c\x48\xad\xcb\xef\x14\x1c\x37\xed\x14\x03\x59\xb8\x3c\x74\xa1\x4a\x7d\xc7\x3b\x76\xa5\x7c\xe1\xd1\x43\x97\xde\xd2\x0a\x23\x5e\x81\xeb\xb0\xba\x16\xf0\x72\xe3\x77\x06\x1a\x6e\x01\x23\x5f\xc8\x9f\x17\xdd\x9a\xf3\x6e\xe1\x2e\xb4\xc7\xa3\x9f\x2b\x7e\x69\xd6\x0d\x85\x19\x26\xcf\xa3\x43\x29\x97\xbf\xb2\x67\x3b\xb7\x5f\xfd\xec\x3d\xb1\x59\x61\xd7\xde\xf1\x7b\xe9\xee\x04\x12\x41\x70\x52\x46\x35\x38\xfa\x0c\xf5\xa0\x5a\x37\xbc\xf8\xfb\x81\xd6\xd5\xfa\x08\x69\xb8\x8f\x7b\xe6\x3c\xe4\x7f\x60\xf7\xdd\x81\x82\xa3\xd2\x0e\x9c\xf8\x5b\x5e\x3b\x38\x6d\xbc\xdd\x15\xea\xd7\x6c\x54\x77\xc8\xc8\x4c\x00\x33\xc4\xed\xbb\x31\xcb\xf6\xb9\x8f\x9f\x9c\xd8\x7c\xff\x87\xfb\x04\xea\x35\x96\x08\x21\xaf\x53\x21\xe5\x4e\xc9\x1c\x28\xac\x53\x24\x0b\xb3\x8b\x65\x72\xa8\xd8\xf8\xb5\x57\xdc\xc2\x22\xcb\x18\x13\xb0\xae\xf6\x57\x4e\x3e\xf2\x7b\x1f\x10\x50\x55\x4b\x68\x05\xbc\x2f\x41\x60\x3c\x9e\x34\x08\x5c\x91\x0f\xca\x86\xab\xb7\xa7\xe4\xf7\x9f\x23\x2d\xbc\x84\x18\x6e\x88\x9a\x57\x50\x9c\x62\xaa\x39\xbf\x71\xab\x64\x25\xd0\x12\x55\x08\x5a\xf2\x36\xd0\xd5\x17\x50\xff\xab\x57\xaf\x66\x7d\x00\x07\xde\x20\x35\xec\xd0\xdc\x1a\x97\x13\x40\x07\xba\x8a\x0b\x75\xe0\xbe\xcd\xe4\x1b\x1f\x6c\x7d\xba\xa8\xfd\xc5\x81\x37\x53\xd0\xa4\x0a\x45\xb0\x65\x30\xf5\x60\xf0\x10\x4f\x32\x53\x00\xa9\xc5\x4e\x14\xec\x7e\x2f\x79\x7e\xf6\xa1\x1f\x66\xf0\xc9\x08\xb2\xe7\xe7\xe4\xab\x83\xe8\xf8\x4e\x8a\x4a\xe0\xd0\x8e\xd0\xf4\x0b\xe4\x90\x72\x85\xd1\x67\x95\x91\x06\xc3\x47\x7f\x64\xcb\xff\xaa\x3a\xf5\x6e\x9b\x05\xa4\x6c\x4f\x9d\xc2\xd4\x7f\x5e\x6d\x1a\xde\x32\x93\x49\x0b\x22\x98\x9d\xb9\x83\x62\x61\x0b\x79\xe4\xd4\xe4\xf6\xf6\x97\x00\x6a\x43\x9f\x35\x5b\xc0\x93\x51\xcf\xcf\x2d\x0c\x9f\x0a\xba\x79\x4f\x90\x43\x73\x10\x92\x4f\xe8\x48\x57\xbe\xa7\xab\xaa\x3b\x5e\x13\xe1\xb8\xaa\xe6\x61\x39\xf7\x87\xba\x3e\xbf\xb8\xb8\x7c\xf1\xf1\x4c\x81\xa2\x61\x7d\x6d\xe3\xb2\xcb\xf8\x1b\x64\x5f\xf8\x08\x6d\xe5\xb3\x09\x2c\xe1\x30\x66\x15\x70\xa5\x6f\xa0\x1f\xfe\xf0\xfb\x4b\x22\xe8\x51\x45\xe7\x6b\xee\x85\xa8\x23\x84\x92\x75\xc5\xea\x52\xb0\x8e\xbc\x24\x35\xdb\xb0\xa6\xbc\x02\x63\x0a\x22\x18\x93\x3b\x80\x6b\x5b\x32\x1d\x3e\xa4\xfb\xad\xd0\x1f\xd9\x54\xae\x84\xf9\x36\x23\xbf\x39\xa8\xbd\xdc\x63\x8c\x0b\x66\xb4\x2d\xab\xf5\xba\x5a\x1d\x6a\x4c\x27\x61\xe2\x91\x64\xfb\x5b\xde\x80\xb3\x09\xed\x08\x2b\x37\x92\x30\x05\xbb\x26\x77\x1a\x44\x05\x51\x35\x6d\x0f\x84\x36\xc7\x3b\x7a\x54\x14\xaa\x7f\xc5\x04\x07\x7f\x91\xab\x21\x17\xe3\xaf\x3d\x7a\x29\xdc\x5b\x5d\xd1\x3e\x24\xa4\x24\xf3\xfd\x2b\xb2\xae\xee\xe1\xde\x3d\x34\xb2\x31\xb8\x27\x4c\xd7\x26\x57\xc4\xb8\x2d\xd5\x48\xab\x17\x1f\x5f\x5e\x66\x37\x15\xf6\x15\xc6\xf4\x17\x79\xf1\xfc\xfa\xf5\xb3\x92\x76\xec\xf5\xb3\xbf\x4e\x83\x9f\xbb\x6a\x97\xfa\x59\x96\x96\x9f\x8a\x9a\xaf\x68\x9d\x28\xb0\xe3\x4d\xb7\x35\x21\xca\xef\x26\x6e\x2c\xa2\x42\xc2\xa4\x04\xa7\x70\x82\x09\x40\x92\xde\x3b\x1f\x60\x51\x64\x67\x8a\xd0\xac\x43\xb6\x3b\x11\x64\x25\x89\x3e\x6c\x88\x38\x16\x21\xfc\xd0\x81\x5e\x04\xc3\x6f\xf0\xb7\x25\xbf\x97\xcd\x7e\xf3\x0d\x6e\x6e\xb1\xe3\x3f\xe1\xe9\x6e\x4d\x9a\xbd\x6c\xc2\xb1\x20\x6d\xd5\x1c\xfe\x2f\xba\x83\xf4\x6b\x16\x79\x0f\x32\x38\xd4\x7e\x3d\x18\x2a\x78\x75\xd8\xef\x5b\x26\x94\x13\x33\x4a\xb3\xfa\x50\x63\xca\xc8\x0e\x3d\xf1\xc9\x52\x56\x74\xb4\x42\xdb\x6a\xb3\x45\xd5\x08\x7a\x40\x75\xdc\x34\x0a\x0f\x46\x98\x25\x2b\x09\x47\xac\x54\x68\xe6\x4e\x87\xc2\x9f\x89\x4e\x3e\x16\x57\x35\x17\xac\x9c\x98\x1b\x89\xb4\x6c\xc5\xaa\x5b\x10\x21\x57\x07\x61\x69\x55\xb2\x6a\xf4\x23\xc2\xd3\xbc\x62\x2d\x84\xf9\xaf\x78\x53\x02\xe3\x17\x13\xf2\x75\xb9\x61\x53\x79\x7a\xaa\x8e\xd4\x9c\xdf\x08\xb2\xa4\xc8\x37\x56\xb4\x81\x80\x43\x46\x76\x54\x5e\x20\x76\xa4\x3b\xda\xad\x10\x49\xd6\xd9\x7c\x1d\x82\x80\x9c\x19\x71\x8e\x67\x76\xc5\x4e\x3a\x0e\x9f\x7d\xf8\xd9\xa7\xb3\x14\xbf\x75\x79\xec\x90\xb0\xe0\x7a\xc8\xd1\x1b\xc9\x8c\x6a\x43\x99\x4b\x06\xbe\x29\x6a\x22\x72\x91\xf5\x07\x70\x8c\x5d\xa9\x07\xfc\xce\x0b\x93\x9b\x05\xc2\x5c\x21\x5b\x9c\x86\x3f\xb6\xb4\xd9\xb0\x91\x72\x5e\x00\x79\x4f\x97\xcc\xca\x8d\x2a\x86\x1b\xc2\x66\xab\x6e\xeb\xbe\x37\xe5\xee\x28\xa8\x7a\xd9\xb5\x98\x22\x89\x1c\xf9\x81\x34\x4c\x41\x5e\xd7\xb2\x31\x72\xc6\x5b\xc5\xb6\xd1\xa3\x1c\xa6\xda\x71\x44\x04\xb6\x80\xc0\x9e\xe0\x2a\xa7\xb9\x82\x4b\xb3\xdd\x15\xd8\x8c\x87\x1e\x8e\xa9\xe9\xcb\xf2\x2c\x14\x40\xa7\x29\xb1\x6b\xe2\x45\xe0\x9a\x24\xf2\xa7\x55\x0f\x6c\xa6\xf3\x6b\xef\x82\x05\x51\xe1\x73\x18\xe9\xcb\xf3\xcf\x71\xba\x2f\x17\x06\xd9\xbb\xe9\x87\x28\x4a\x35\x95\x68\x62\x58\xac\x45\xf5\xa2\xbf\x72\x45\xbd\x19\xb9\x78\x45\xbd\x79\xe2\xfa\xf5\xb7\x30\x42\xc6\x2f\xea\xcd\x64\x8c\x08\x5f\xd4\x9b\xdc\x74\xb5\x91\x72\x78\xba\x10\xa0\xf7\xa4\xe9\xf6\xb6\x30\x66\xba\x1a\x37\x6c\x68\xba\x60\x43\x75\x75\x86\x28\x41\x58\x59\x89\x0a\xcc\xe0\x04\xc7\xcb\x9a\x53\xc1\xe9\x15\x91\x9a\xe4\x91\x23\x5a\xf4\xd0\x58\x6c\x1c\xbc\x15\x24\xe3\x55\xf1\xd6\x75\x75\xc3\x6c\x1a\x2c\xd9\xa2\x3d\xb4\x67\xf2\xb0\xf2\x43\x07\x8e\x88\x38\xdf\xa9\x7b\xb1\x28\x13\x09\x26\x87\xaa\x9a\xb2\x5a\xd1\x8e\xb7\x93\xe8\x05\x5a\x40\xbb\xd0\xe4\xd8\xb7\x68\xfe\xc5\x39\xcf\x9f\x4e\x64\xad\x5a\x10\x58\xa3\xfa\x02\x17\x63\xc5\x77\x0c\x13\x94\xe1\x57\x60\x43\xfa\xfa\xc4\xc6\xc4\x49\xcf\xd2\xd3\x9f\x9c\x66\x11\x7a\x1f\x9f\xb9\xcc\xa3\xf8\x92\x4c\x7f\x35\xee\xba\x89\x17\xa8\x06\x8b\xf1\x25\x2c\x49\xc8\x89\x5f\xeb\x4d\x60\xe0\x0f\xf1\x62\x52\x68\x31\x9e\x72\xfb\x1b\x87\xab\x13\x51\xfd\xe4\x1a\x89\x21\x57\x08\xbc\xed\xbc\x5e\x17\xb8\x19\x3b\x5e\x56\xeb\x4a\xe3\x8c\x21\x8a\x40\xc9\x56\x2d\xa3\x82\x11\xde\x92\xaa\x51\xff\xee\xb6\x08\xa6\xae\x41\xc1\x9b\xd2\x6e\x96\x94\x08\xc2\x8b\x45\x83\x0e\xb1\x3d\x83\x30\xc6\xaa\x21\x8b\xff\x86\x95\xfa\x6f\xb9\xf4\xfb\x99\x58\x09\xb1\xb0\x10\x88\xaf\x24\xbd\x28\x6f\x45\x14\x0e\x66\x31\x45\x6b\xa6\x93\xd4\x99\x68\x0f\x88\x2c\x11\xcb\xea\xa1\xe6\x44\x57\x7a\xeb\x5c\xe4\xa4\x17\xbf\x6a\xfa\x4d\x3c\x63\x4d\x1b\xe9\x19\xd7\x9b\x81\x19\xd7\x9b\x78\xc6\xf5\xe6\xe7\xb9\x26\x4e\x9b\x31\x36\xfd\xe6\x09\xc6\xd2\xec\xf3\xe2\xdd\xbf\xc8\xc1\xff\x55\x3d\x03\x75\x9c\x8e\x79\x06\x06\x70\xf5\xf6\x28\x49\x2e\x41\x5b\x46\x13\x4d\xa6\x20\xee\xf5\xb9\x03\x72\x16\x8e\x53\x86\x4d\xdb\xb8\x65\xf5\xde\xca\x5e\xbc\xdd\xd0\xa6\xfa\x09\x1f\xc1\xf2\x00\x09\xf9\x00\x6c\x36\xf2\xf8\x68\xb7\x27\x14\xf3\x66\xb2\x65\x3c\x6e\x56\x16\x54\x02\xe0\x01\x0f\x23\xd9\xb7\x4c\x03\x09\xb8\x8e\xec\xce\xa9\x81\x81\xa5\xf3\x39\xd8\xef\x51\xfa\x3c\x87\x08\x7b\xef\x0e\x2f\x25\x96\x29\x5e\xd8\x9f\xaf\x23\x0e\x25\xc7\xe9\x43\x61\xd0\x5a\x63\x96\x03\x7e\x81\x7c\x56\xf2\x83\xc2\xf8\x40\xbc\xa9\xf7\x04\x59\xcc\x5a\x7e\xb7\xc0\x30\x14\xb9\x0d\xac\x45\x6e\x53\xd3\x23\x3f\x74\xee\x8c\x0d\x4a\xd9\xe3\xe0\x97\xd4\xaa\x04\x1e\xfa\x59\x38\xa6\xfe\xe2\x08\x92\x61\x90\xc2\x7a\x70\xc2\x42\x7f\xfb\xa1\x61\x44\xfe\xf7\x43\x15\xbc\xbb\xe2\xab\x2d\x5b\xdd\x2c\xb9\x0e\xf7\x96\xc7\x91\x5b\xea\xfd\xb6\x29\xe5\x46\x98\x77\x05\x5c\x08\x3a\x76\x40\x15\x3e\x5f\x39\x4d\x08\xb2\xa5\xcd\x46\x52\xb1\xc3\xfc\x0d\x17\x93\x05\x7b\x91\x8a\x12\x84\x95\x9a\x1c\x34\x54\x20\x1f\xc1\x39\x06\xec\xd2\x7e\x0f\xbb\xa3\x4b\x48\x1d\xc0\x32\x44\xeb\xb6\x9c\xca\xea\xe6\x6d\x76\x72\x18\x5a\x9f\x2a\x18\xf9\x8b\xd6\x0e\xfd\x15\xd6\xd6\x68\xa4\x80\x76\xef\x78\x7b\xa3\xdc\xeb\xc6\x27\x2e\xfd\xf4\xc5\x47\x9f\x20\x1f\xb3\x4d\xff\x6f\xe2\x4e\x1a\xb6\x69\xea\x6b\xc0\x52\x45\x42\xb5\xa6\x4d\x41\xef\xd1\x48\xa6\x5e\xff\xbb\x4c\x8b\x74\xfa\x6d\xb6\x50\x6e\x9b\xaa\x5a\x72\xab\x6c\xfe\xb5\x30\x35\x8d\x39\xb3\xf0\x76\x85\x9c\x6b\xe2\x8a\xac\x00\xc7\xf8\x3a\x95\xdd\xca\x1b\xcb\x52\x4a\x2b\x4e\x57\xf1\x41\x7f\x1e\x8d\x43\xef\xfc\xbd\xab\x1e\x2f\x39\x89\x89\x4b\xcd\x14\xcf\x0e\x2d\x4b\xb4\x0f\x2c\xdc\x0e\x94\xf9\x2d\x4d\x97\x2e\x65\x8a\x8e\x76\xd5\xca\xc7\x1a\x04\xca\x0c\xf0\x07\xf3\xc3\xf6\xc8\xf6\x3e\x87\x5a\x98\x12\x16\x01\x3e\xdb\x8f\xa3\xd2\x31\x1c\x6b\xc6\x4a\x29\x21\x2b\x0b\x77\x2b\x50\xe7\x00\x2c\x17\xd4\xbc\x3a\xab\x04\x6d\x19\xb6\x83\x82\x22\xfc\x73\x46\x7e\xe4\xed\x0d\xa6\xe3\xd9\xb7\xd5\x0e\xd3\x53\x81\xed\xb2\xae\x18\xc8\x15\x25\x73\x7a\x07\x54\x6a\xb1\xe2\x7b\x56\x92\xc5\x95\x6a\x44\x81\x53\x5c\xe1\x1f\xd8\x96\x9f\x2a\x78\x29\x9f\x47\xb5\xe0\x44\x49\x1c\xf2\x92\xa8\x44\xe1\xd7\x97\xbf\xa8\xbf\x1d\xd7\x0d\x94\x37\x58\x0b\xf6\x58\x7f\x30\xae\x3b\x9c\xb6\xa0\x97\xb4\xa3\xe0\x0d\x07\xab\x6f\xcb\x16\xca\x96\xfb\x10\xdb\x22\xc2\x42\xc6\x1c\x6f\xd0\x47\x64\xa3\x53\x3c\x89\x93\xe8\xe7\x6a\xc5\x9b\x49\x22\xb9\x21\xdc\xff\x36\x23\x20\x28\xba\xe4\x4f\xfa\x4d\x89\x34\x71\x86\x99\x9d\x26\x64\x79\xd4\x69\x6a\x40\xd5\x81\xf4\x88\x65\xd4\x7a\xcc\x54\xcb\xd0\x1e\x36\xb5\x64\x9b\xaa\x91\x84\xb9\xba\x81\xa0\x3a\x29\x91\xb7\x54\x21\x22\x9d\xed\xf8\xb2\xaa\xd9\x84\x60\x9a\x19\x3c\x03\x80\xde\xb9\xd1\x49\x16\x81\x54\xa0\x3d\x1b\xe0\x09\x18\xa9\xe4\x73\x40\x41\x70\x1f\x06\xe0\x60\xe0\xe0\x54\xa9\x37\x22\x82\x59\xc2\xd5\x83\xce\xec\x8e\x30\x83\x42\x00\x06\xc0\x99\x7c\xae\x7c\xad\xd2\x65\x23\x0f\xfa\xdd\x0f\x7f\xf8\xbd\xff\x1a\x41\xb0\xe6\x43\x4b\x56\x60\x73\x0a\x3e\x2a\xdc\x2d\x3c\xa3\x28\xcb\x4d\x9c\x2b\x2c\xc9\xa8\x7c\xa9\x62\x5d\xf3\xbb\x2b\x88\xb3\x30\x92\x45\x8a\x73\xb9\x3e\x26\x62\xcb\x5b\x29\xc7\x28\xec\x2f\x05\xcf\xb7\x69\xf9\x9d\x42\xec\x12\x74\x67\x52\x3a\x51\x81\xa0\x1a\x66\xac\xb8\x1d\xcb\x43\xd7\xf1\x46\xb8\xb5\x10\x5d\x1b\x3c\x90\x4a\xf5\x5d\x35\x32\x31\x8c\xed\x4b\x1f\xa1\x4f\xce\x60\x8a\x69\x9d\x14\xfa\x1e\xbe\x1f\x01\x7a\xdb\xde\xf3\xf2\x49\xaf\x32\xe3\x83\xce\xd8\x58\x6d\x30\x73\x11\x5f\xad\x0e\x7b\x0c\x41\x59\x1f\x6a\x1d\xe3\x75\x66\x70\x88\xef\xb6\xb4\x93\x3d\xde\x51\x25\xe5\xdd\x0b\x0b\xe4\x36\xd1\xa8\xd5\x82\xcb\x32\x08\x7c\x06\x36\xa0\x2d\x6b\x59\xc8\x4d\x35\x1f\x0d\x75\x17\xd6\x26\xf6\x5f\xd5\xea\x46\x83\x6b\x55\x8a\xc2\x07\xc2\xdc\xc4\xce\xb8\x2f\x78\x97\x65\x6a\xcf\xc1\x46\x92\xb9\x99\xe4\x7f\xfe\x76\x10\x5d\xb5\x3e\x16\x26\x85\x64\xf0\x3d\xba\x4a\x03\xdf\x15\x73\xe2\xf1\x24\x1b\xaf\x7b\x48\xfa\x84\xce\x23\xaf\x9f\xa9\x79\x3d\x53\x4e\x1a\xa1\xbc\x9f\x1f\x79\x02\x83\xcf\x84\xd1\x25\x08\x79\x68\xb2\x23\x26\x83\xa1\x97\x6b\x5e\xdf\x80\x30\xf9\x7e\xc3\xbb\xf7\x11\x1c\xd2\x3d\xd9\xee\x44\x02\x83\x54\x3e\x79\x9d\xe7\x1a\x06\xf3\x71\x0f\x99\xe2\x22\x68\x54\x92\x2c\x0d\x92\x66\x2d\xf9\xad\x6b\xb6\x4a\x0c\x22\x0e\x42\xd9\x55\x65\x59\xb3\xc4\xdc\x80\x0b\xe3\x3d\x6e\x39\xca\x92\x6d\xe9\x2d\xf3\x75\x7c\xbc\x61\x22\x31\xc5\x50\x47\x37\x34\x59\x1b\x08\xaa\x84\x50\x39\x6c\x13\x07\x0a\xec\x4d\x3d\x91\x6d\x7b\x21\xc4\xa2\x3f\x03\x65\x88\xf3\x95\x72\x24\x29\xeb\x77\x78\x88\x5b\x86\x58\x74\x80\x3f\xac\x96\x75\xaa\x79\x82\xb6\x6f\x41\x32\x0b\xf4\x93\x58\xd7\x1c\xa3\x10\xf8\x5a\x35\x8a\x46\x27\xa7\x61\x8e\x4a\xc4\x99\xb7\x42\xee\x61\xff\x39\xce\x61\xbc\x2e\xbd\xb8\xcc\x3d\x22\x5d\x4f\x74\xb5\x3a\x59\x62\xdb\x56\xcd\x8d\xeb\xe8\x97\x92\xf7\xfa\x25\xbe\x84\xa8\x97\x14\xf6\xbc\x70\x61\x24\x89\xe8\x40\x3d\x7e\xdd\xde\x24\x5b\x2e\x02\xae\x99\x67\x0b\x43\x7e\x58\xf9\x94\x68\xda\xdb\xd1\x71\x6f\xb1\xff\x9e\xcd\x66\x4e\x3a\x19\x0d\x93\xe7\x38\xbe\x40\x64\xa2\xf1\x83\xb3\x1f\xae\xdc\x3f\x8a\x25\x55\x68\xeb\x6f\x2c\xb8\x43\xaa\xb1\x97\xe4\xc2\xc4\x8e\x84\xe9\xd1\x6c\x39\xd7\x57\x6e\xad\x8b\x68\xf0\x04\xde\xba\xbf\xf0\x86\x79\x11\xb7\x77\xb4\x6d\x08\x62\x0b\xdf\xb0\xe3\x1d\x6f\x4b\xf2\x9e\x2c\xf4\x9e\xac\xf7\x9e\x6c\xe0\x3d\xb2\x3b\x08\x30\xda\x6a\x64\x48\x4a\x04\x66\x8f\xd0\x78\x90\xb3\xd7\xcf\xfa\xdc\x12\x5d\x70\x70\x3b\x68\x2f\xb1\x5b\xe3\x4f\x7c\x4a\x2e\x26\x09\x7f\xca\xf4\x62\x26\x7d\x32\x55\x77\xfb\x96\xad\x59\x2b\x8a\x96\x95\x87\x15\x2b\x8b\x1d\x87\xe5\xc7\xab\x19\x51\x8b\x00\x84\xa4\xa7\xfb\xbe\xef\xde\x6a\x6a\xdc\x8d\x74\x9f\xf2\xc4\xca\xbf\x3d\xf7\x45\x77\x46\x2a\x55\x72\xbf\x3f\xa1\xa7\x80\x47\xcb\x0c\xc8\xfc\xb1\x93\x39\x55\x52\x28\x88\x68\x4e\x49\xa5\x51\x6f\xc1\xea\x83\xdc\xc5\x28\x0e\x05\xa0\xc6\x56\x3a\x10\x65\xea\xe4\x0e\x36\xef\x51\xe5\x94\xb6\x30\x3a\xdc\xd5\x41\x78\xbe\x6f\x0b\x83\x26\x6a\x85\xf0\x1f\x19\xba\x29\x1c\x09\x6b\x56\xfc\xd0\xd2\x0d\x38\xac\xa3\x28\xd9\xd9\x91\x7a\x09\x99\x55\xae\x3e\x0c\x90\x11\x1d\xa3\xa5\xa4\x40\xb4\x5f\x6d\x2b\x1c\xc9\x1d\xa3\x37\x44\x45\x0e\x81\xb2\x93\x50\x51\x34\x8c\x95\x52\x2e\xa5\xa2\x12\x0a\x34\x9a\x32\xd1\x6d\x19\xdc\x9e\x5b\xb0\xa6\x57\x02\x1e\xf0\xf2\xed\xa1\x46\xb8\xfc\x2f\x48\x5e\xa9\x7b\x47\x0f\x30\xec\x9e\xee\x41\x2d\x2c\xd9\x06\x98\xdd\x10\x46\x06\xcd\xf2\x7c\x6d\xbc\xf6\x66\xe4\x5b\x4c\x30\x4f\x0e\x42\x3b\xea\xc1\xf3\x7d\xb5\x62\x42\xe8\xe4\x97\x62\xcb\x0f\x75\x29\xcf\x53\x47\x6f\x34\xcc\x2e\x55\xf9\x73\x10\xb9\xae\x39\xaa\x61\xce\xdc\x48\xad\xdd\xbe\x96\x67\x10\x72\x4d\xaa\x59\xb8\xcb\x85\x7e\x21\xe8\x8a\x0c\x4a\x5f\x70\x4a\x01\xa0\x43\xf0\x1f\x91\x7b\x8e\x4e\x0a\xd0\x20\x10\x11\x15\x1d\xa1\x1b\x2a\x97\x17\xf0\xf2\x00\xfd\x84\x1e\x1d\xc3\x95\x05\xc8\x19\xe3\xfe\xe6\x66\x2b\x54\xee\x2e\x69\x2f\x37\x24\x9b\x51\xbe\x17\x8a\xc2\x36\xd7\xc9\xd0\x97\x1c\x15\xaa\xd2\xca\xe1\xc7\x4d\xc5\x64\x99\x03\xae\x90\x48\x78\x1a\xf7\x79\x41\x4e\xc3\x4e\x7d\xf7\xc8\x44\x4a\x49\x13\xa3\x7e\x90\x7c\x53\xe5\xa2\xc5\x37\xc8\x8a\x36\x64\x0f\x16\x4c\xfd\x64\x84\x83\x8a\x5b\x87\x57\x54\x7d\xb4\xd1\x49\xf7\xc6\xd5\x28\x33\x86\x13\x90\xe4\x13\xfb\x39\x09\x41\xe4\x3f\x72\x73\x8c\xca\x89\x7b\xfb\xed\xea\x0e\xe0\x94\xe1\xcc\x0e\x02\x9e\xec\x64\x51\xad\x65\x8b\x1d\x5b\x6d\x9b\xea\xef\xe8\xa1\xb7\x64\x64\xa5\x52\xc1\xd6\xca\x0b\xe5\x37\xb4\xed\xc0\x2a\x17\x41\x6c\x3a\x5a\x4b\x41\x85\xc0\xff\x32\x99\xc4\x3f\xf9\xf0\x1d\xf8\xf7\x8a\xef\xe4\x1d\x54\x5c\x5c\xbe\x78\xf1\xd9\x87\x9f\xbc\xb8\x44\x74\x47\x0e\xb0\xcc\x1d\x66\x0b\x77\x49\x38\xd4\x9a\x18\x53\x8f\x52\x9f\x38\xd7\xbb\xfa\x05\xb1\x07\xa0\xde\xeb\x67\x70\x9f\x3a\x3f\x2b\x55\xd0\xeb\x67\x86\xb1\xcf\xee\xa8\xd0\xbd\xb0\x92\xbc\xf3\x50\xad\xcf\xde\x95\x8b\xf8\x2e\xae\xe5\xeb\x67\x93\x37\x57\xc6\xcf\x5d\x09\xd5\xc9\x52\xb3\x4a\x24\x1d\xe2\x87\xd1\xe5\x9e\xdc\x9c\x8f\x79\xde\xaf\x6e\x32\xc1\x94\xa0\x51\x52\x51\x85\xa6\xa3\xc2\xe8\xf9\x54\x8f\x46\xc2\x76\x6e\xbc\x38\xea\x26\xd6\xa0\xeb\x76\x7c\xd3\x4f\x26\x5f\x58\x50\x25\x30\xef\xbb\x19\xf7\x02\x2f\x3d\x67\xe0\x1d\xe7\x75\x57\xed\x63\x85\xaa\xa7\xea\x27\x04\xc6\xe8\x0c\xdd\x17\x92\x7f\x2a\x00\x8f\xf9\x8a\x68\xa3\x4a\x6a\xfe\x29\x38\x7a\x95\x2c\x0c\x0c\x23\x18\x49\x0d\xfa\x51\x1f\x5d\xc3\x9a\x64\xfd\x09\xab\xb1\xbb\xbe\xfc\xfd\x05\xee\x13\xeb\x3e\xbb\x68\xd9\x6e\xf4\x1a\xeb\x16\xa3\xb5\xf6\xad\xba\xe9\x4a\xa1\x73\x85\xd9\x21\x8c\xda\x3d\x56\x7f\x57\x31\xbb\x93\xec\x7d\xd1\x6e\x96\xd4\x06\xf6\xa6\xbb\x51\xae\xb0\x93\x38\x9d\x9e\x67\x48\x4e\x57\x8e\xf2\xf6\x9f\xe8\x8b\x08\xde\xd6\x1f\x5e\x5c\x5e\x7e\xe2\xe8\x2c\xaa\x8d\xdc\x61\x24\x34\x44\xe3\xdf\x19\x6d\x9d\xfb\x1c\x6c\xf9\x9d\x32\xf3\x91\x97\x26\x88\xc9\xfd\x14\x9b\xfd\x9c\x74\x8e\x9a\x28\x47\xd8\xfc\x7c\xc9\xbd\x4f\xdf\x9c\xe1\x9c\x84\xfc\xef\xd4\xf1\x9f\x26\xbe\x05\x27\x2c\x13\x96\xe7\xc5\x02\xa7\x14\x37\x8f\x1c\x66\x24\x4c\xb8\xb1\x1b\xa1\xb0\xe0\xb4\x2a\xd9\x9c\x07\xc6\x13\x1a\x56\x3d\xdf\x89\xaa\x69\x58\x4b\xfe\xad\xda\xed\x79\xdb\xd1\xa6\x83\xb3\x1d\xfb\x21\x80\xf6\xb7\x64\xab\x9a\x22\xec\x5c\xd1\xf0\xc2\xd4\x49\x06\x3c\xa9\xb4\xe3\x4c\xac\xe8\x9e\x15\xe2\x76\x73\x86\x0c\x38\x1d\xd4\xda\x82\x83\x8c\x64\x3a\xea\x9f\xe9\x62\x8e\x82\x01\x74\xc2\x89\xb9\x14\x7f\x3f\x50\x50\x2a\x07\xef\xf9\x54\xb6\xf3\x44\x6d\x00\x24\xc9\x7d\x48\x21\x46\x05\x82\x64\xcf\xbe\xd9\xcf\xf7\x69\x9f\x6c\x14\x97\x90\xe4\x3d\x76\x31\x7b\x71\x39\x19\x88\xac\xeb\x73\x1d\xe9\x0d\xea\x22\x24\xeb\x41\xf2\x04\xd2\x7d\x1a\x6d\x1a\xae\x4f\xde\x27\x1f\xfd\x1c\xc4\x99\xa1\x23\xb7\xdf\x17\x21\x01\xbd\xf5\x75\xef\x71\xb4\xf9\xc5\x56\xde\x25\xf9\xa1\x23\xd8\xf1\x7d\xef\x01\x1c\x3c\xa2\x7d\x4b\x9b\x56\xe3\xfe\xb3\xb1\x52\x6f\x90\xf6\x4a\x96\xf5\x0a\xaf\xec\xcf\x40\xc4\x51\xf7\x5e\x94\x73\xf0\x69\x13\x33\xe2\x81\xd1\x6b\x67\x97\xf3\xfe\x72\xe0\xf8\x18\x73\xed\x7f\x32\x06\x99\xd5\x59\x3f\x9a\xa0\x7a\x5c\x4b\xd2\x02\x7c\xb0\x2a\x7d\x42\xc8\x90\x18\x92\xc5\x07\xe8\x39\x47\xfa\x29\xfd\xd6\x66\xdf\xaf\xf9\x8e\x57\xc0\x7e\x79\xf7\xea\x6a\xc9\xd6\xbc\x65\x29\x14\x80\x2c\x51\xbc\x49\x92\x16\x2c\xbf\x8f\x27\x90\x19\xdb\x98\x4e\x21\x50\x89\x35\x86\xac\x2e\x6c\x16\xec\x40\x05\xb3\x91\x62\x36\x22\x83\x9c\xa5\x6a\x4d\x06\x47\x1e\x1d\x8a\x13\xc7\xfd\xa4\x23\x12\xe4\x78\x7d\xf7\xaa\xe1\xdd\x99\x5e\xcc\xc9\x53\x96\xb0\x77\xdf\x12\xf7\xa7\xd6\x2c\x55\xf8\x64\xd4\xfd\xca\xbf\xdf\x3a\xad\x42\xa3\x11\xa1\xf6\x8e\x7f\xec\x96\xa5\x9b\x1e\x5c\x9c\xb7\xb3\x91\xfd\x4a\xf9\xdf\x2a\x52\x75\xb1\x32\x5c\xf2\x55\x0f\x57\xab\x57\xb2\x99\x52\x55\xc5\x38\x72\x54\x4f\x05\x1e\xcf\xb4\x35\x45\xcf\x2e\x3e\x9d\x97\x6c\x33\x25\x3b\x00\x2b\xe6\xe5\xb1\x58\x6e\xac\x0a\xe6\xe2\xf2\x57\x13\xfd\xd7\x84\xe0\x95\xa1\x9e\xf6\x81\x86\x28\xa1\x6f\x8d\x81\x05\x01\x50\xc2\x38\x06\xeb\x31\x4c\xd1\xd4\x2d\x5f\x94\x90\xd0\x4f\x9e\x4e\x0b\x41\xd8\x32\xf0\x57\xea\xee\xb8\x86\xb3\xea\xf8\x5e\x4c\x89\xe8\x68\x8b\xfe\xfc\x4c\xde\x9f\xcb\xa3\x32\x37\x1c\xc1\x5a\xae\xca\x02\xd0\x87\xbe\x18\xd7\x3a\xe1\xa8\x6d\x67\x16\x2f\xf0\x3d\x10\x64\xdb\x99\x69\x6c\x5a\x7a\x2c\x3e\x99\xcf\xa7\x72\x9d\x4b\xff\xe7\x4f\xe1\x67\x2c\xaf\x72\xea\x5d\x11\x48\x0f\x27\x8b\x9a\x5f\x20\x3b\xbf\x82\x18\x8c\x1e\x5c\xe1\x8e\xe8\x25\x30\x0d\xe3\x70\xfd\x5e\xdc\xc1\x78\x9d\x4d\xc2\x48\x11\xfd\x50\x73\x36\x4f\xef\xc5\xff\xd0\xce\xdb\xc1\x4e\x48\x39\xb1\xe3\xca\x17\xf2\x97\xdb\x89\xe3\x3f\xc1\x4e\xe0\x1a\xfc\xcc\x5b\x11\x4e\xbc\xac\x5a\xa6\x92\x57\x9d\xbe\x04\x25\xdb\x5c\x91\x8f\x2e\x4b\xb6\x19\x3d\xcf\xe7\xc0\x01\xdc\x9e\xdc\xe6\x47\x4e\x23\x3a\x47\x45\xb7\x6d\x99\xc6\xe1\x0b\xe7\xb1\x04\x5b\xdc\xf3\x5d\x65\xe7\xb0\x3f\xb4\xfb\xda\xa8\x7f\x0b\x01\x2a\xc3\x4b\xb3\x85\xba\x58\x2b\xef\xbb\x27\x1d\x25\xb7\x5f\xb7\xb7\x51\x93\x76\x25\xe7\xc4\xac\x8f\xff\x04\xb3\xfe\x47\xcd\x55\xfe\xaf\xa4\x50\x7c\x22\x26\x28\x94\x1f\xba\xf0\xc3\xa7\xf3\x79\x76\x1e\xd8\x9e\x9d\xc7\xaa\x6a\x57\xb0\x34\x4e\x07\x7e\xab\x8f\x1d\xb9\x02\x82\x52\x37\xa9\x56\xf5\x82\x5d\x73\x4a\x66\x17\x97\xf2\xce\xa3\xcd\xa6\x66\x27\x9f\x24\xa8\xa5\x77\x93\xbc\xb8\xfc\xd5\xd4\xc3\x2e\x8d\x7e\xb8\x54\xb9\x44\x65\x69\xf7\xdf\x9f\x84\x05\xc3\x1f\xdc\x44\xe7\x8f\x86\x05\xfa\x92\x0a\xe6\x61\x4a\xbe\x6e\x66\xcb\xae\x49\xbb\xb7\xdb\x97\x8b\x8f\xd8\xb3\xec\x9a\x08\xaf\xc7\x87\xe1\x31\x25\xee\xe2\x68\x47\x10\x39\xac\xa4\x00\xde\xfd\xca\x7b\xcd\x51\xe7\xc0\xcf\x25\x5b\x71\x7c\x6a\x63\x46\xdb\xba\x6a\x6e\x9c\x1f\xb5\x3f\xca\x54\xe5\x03\x93\xff\x46\x02\x81\x8d\x2d\x00\xc6\x5a\x8d\xc6\xf9\x05\x4a\xf4\x38\xce\x1d\x04\x6b\x95\xb0\xea\x98\x58\xc6\x87\x62\x42\x7f\x09\x98\x9f\xb0\xbc\xb5\x1d\x80\xff\xab\x32\x89\xc8\xca\x6e\xfc\xb9\xfb\xf7\xfd\xd4\x59\x5a\x95\x03\x58\xfe\xed\xd8\x3e\xa6\x5e\xf7\xd6\xd2\x90\x81\xdd\x91\x65\x63\xd0\x9d\x1c\x60\x56\x66\x0b\x13\xbb\x65\x96\xcd\x87\xae\x30\x41\xa5\x8e\x94\x1e\x59\xd8\x3d\x2b\x35\x4e\x37\x61\xa3\x4e\x20\xcb\x60\x10\x2f\x02\xeb\x0b\x4e\x10\x53\x15\x2d\xe4\xca\x10\x4e\x5a\x06\xc4\x8f\xc3\xf0\x61\x58\x6c\x4c\xca\x43\x80\x7a\x02\x83\x30\xd0\x2b\x1a\x21\x27\x32\x00\x19\x8b\xbf\xa5\x43\x33\x7b\x78\xbc\xe9\x26\x26\xf0\xa7\xe9\xde\x2e\xef\xa1\x15\x72\x7d\x25\xa9\x6b\xf7\x23\x5e\x35\xc0\xfc\xe0\x53\xb1\xe6\x6d\xa1\xbc\xa9\xa7\x44\x7d\xb3\x79\x10\x15\x3e\xdd\x95\xc2\x96\x55\x7f\xce\xd4\x3a\xf4\x3b\x29\xc8\x29\x6a\x10\x5a\xcf\x21\xa1\xe7\x6d\x95\x6d\x28\xdc\x30\x45\x94\xc9\xf6\xf3\x68\x98\xe7\xe7\xe4\x9b\x43\x77\x68\x59\xb1\x6f\x39\x5f\x2b\x40\x1b\xed\xf1\x5d\x57\xab\x1b\x81\x48\x50\xf4\xe5\xc2\xb1\x78\x51\xc9\xd0\xdc\xbd\xd5\x88\x3f\x76\x83\xa9\xe5\x79\x7a\x81\xc1\x11\x57\x18\xc2\xf5\x51\x30\xbe\x50\x08\xd5\xfa\xa8\x1a\xde\x79\x02\x22\xb1\xec\xb2\x78\xe7\x01\xcb\xbe\x89\x9e\xcc\x8a\x07\x18\x5c\x44\xe5\xbb\x84\xff\x3b\xf1\xde\x54\xa7\x76\xaa\x0e\xd8\x70\xe7\xba\xa0\x3f\x88\x49\x1a\x29\xfe\xf7\x55\x73\x13\x2e\x87\xf6\x33\xa6\xda\xa5\xbf\xe6\xfc\x46\x01\xb3\x5b\x4f\x63\x2a\x2f\xd1\x1b\xbc\x78\x24\xeb\x52\x76\x7d\xff\x06\x71\xfe\x2a\x30\x58\xc0\xbb\x44\xe0\x26\x08\x2e\x11\x97\xff\x84\x57\xc5\x48\xc6\x06\xb5\x62\x78\xd7\x4c\xf3\x58\xd0\xeb\x64\x0c\xc3\x7b\x54\x6b\x3e\xaf\x9a\x85\xbc\xca\x70\x66\xb5\xa4\x96\x5d\xb9\xf3\xc8\x10\xbb\xcb\x4c\xbf\xe3\x88\xd7\x82\x0e\x7e\x9a\x87\xa2\xbb\xca\x96\xb5\x2c\x24\x83\x2f\x71\xa3\x5f\x55\x3f\xf9\x12\x85\x89\x07\x1f\x71\xcb\x21\x4a\x88\x77\xd1\xd9\x9f\xdc\x18\xef\xf8\xba\xb3\x3f\x66\x83\xb6\x61\x34\x3a\x1e\x7f\xcc\x68\x30\x4f\xb7\x37\x1a\xf3\x93\x1b\x63\x9f\x18\x8d\xf9\x31\x1b\x34\x6f\x17\x0e\x42\x26\x70\x18\xde\xc2\x61\x2c\xc5\x38\x20\x0c\xb5\x69\xfa\x59\x5f\x1f\x21\x52\x9b\xc9\x3b\xd5\x49\xfb\xe8\xf4\x04\x1e\x01\x1f\x90\xb0\xa3\xc0\x5b\xc6\x7c\x2d\x54\xe0\xb7\x8a\x34\x75\x38\xf3\x2b\xf4\xf4\x5c\x01\x96\xa0\x8a\x68\x14\x01\x86\x97\x38\x2c\x77\x55\x97\x00\xf7\x6a\x99\x60\xa9\xdf\xd5\x6a\x58\xd4\xaf\x68\x98\x89\x58\x1a\x9b\x88\x1f\x49\x51\x71\x2f\x07\xa3\x9e\x8a\xaa\x3e\x92\xfd\x61\xb7\x87\x85\x09\x1d\x34\xa9\x20\x77\xac\xae\xe5\xff\x5e\xc1\x21\x9c\x12\x75\x78\x89\xbd\x4a\x21\xdd\x5a\x69\x41\xd5\x10\x0c\xcb\x49\x6c\xa6\x97\xd7\xbc\x3d\x42\x8e\x9e\x40\xb8\x9d\x8e\xc5\x39\xfd\x64\x86\x6a\x39\x55\x5a\x09\x9a\xa6\xa4\x6a\xec\x62\x0e\x85\xf4\x35\x3b\xd0\x66\x50\x3a\xd7\xe6\x0b\xd9\xf5\xc4\xc3\x25\x77\x3c\x6a\x6c\x83\x81\x90\xe9\xa9\x2f\xc3\x52\x79\x5c\xda\xac\x48\x11\x0b\x25\x03\xbc\xdc\x19\x64\xb8\xc6\x91\xf3\x8e\x37\xd8\x5c\xe9\x60\xd0\xee\x56\x8c\x64\xfc\xbf\xd4\xc8\x1e\xe3\xb4\xea\xaf\xf9\x54\x2b\xbe\xad\x74\xe7\xa8\xbd\x77\xd5\xfd\x59\x9a\x26\x1c\x4a\x47\xc5\xf2\xec\x72\xf2\x0f\xf5\x72\x7d\x7b\xc3\xbe\x4e\xda\x46\x7e\xae\xb7\xc7\xf0\x49\x1b\x87\x33\xdd\x87\x00\x6d\x63\xaa\xbe\x7a\xf5\x8a\x58\x53\x02\x02\x65\x1e\xdf\x6b\x19\x41\x92\x29\x63\x22\x8a\x0c\x0f\x29\x5d\x89\xe3\x9e\xf8\x66\xfc\x6b\xc8\x7d\xbe\x0c\x14\x9d\x39\x45\x67\x62\x0b\x5e\x6c\xef\xce\xca\x96\xef\x4b\x7e\x27\x2f\xb3\xcd\xa6\x66\xf9\x25\x8d\x18\x65\xcf\xca\x46\x65\xaf\x9f\xb2\x28\xce\xda\x43\xe6\x59\x55\xd1\x24\xb0\x05\x24\x47\x56\x9e\xbb\xe2\x97\x17\xd5\x14\xec\xab\xc7\xc4\x9d\x97\x60\xf0\x64\x4b\xb1\x01\x48\x87\x96\x7c\x9d\xc5\x01\x2a\xa7\xbc\x1d\x7f\x0e\x96\x91\x60\x1a\x6f\x8f\x6d\xfc\xcc\x8c\x23\xfd\xc6\xf5\x65\x85\xe8\x01\xa6\xdf\x78\xd8\x1b\x30\xf6\x84\x43\x6b\xfa\xce\x37\x95\x83\x1b\xde\x33\x26\xc6\x96\xbb\x1e\x37\x9c\xa1\xd7\x93\x33\xca\xd3\x0f\xd2\x00\x45\x8f\xb9\x5f\xc7\xee\x9f\x31\xd3\x5e\xfa\x5a\x9a\x91\x4c\xf9\x79\x7f\xd4\x49\xa8\xe6\xfb\xff\x23\xd7\xfb\x57\x67\x3f\x0e\x05\xfc\x93\xf1\x96\x90\x36\x7b\x94\x63\xea\xbd\x23\xf0\xe9\xed\x73\x12\x7c\xd7\xba\x7a\x64\x57\x87\xec\xea\x8f\x03\xdd\xb1\xa7\x37\xf6\x80\x33\xaf\x6c\x1b\x47\xa7\xb9\x2c\x44\x5b\x2f\x20\x62\xe8\xad\x0f\x9a\xa3\xe6\x00\x4f\x58\xf4\xb0\x83\x68\x9f\xbd\x42\x7a\xa1\x8d\xcd\xed\xa1\xe2\x07\x55\xcc\x5c\x12\x52\x35\x70\xc6\x4f\x61\xd6\xe3\xab\x71\xb6\xa6\x25\x0b\x33\x86\x25\xc3\x76\x0b\x59\x52\x3f\x3d\xf0\x80\xc2\xd9\x9b\x44\xda\x62\x1f\xc8\x66\xa6\xc1\x28\x74\x4c\x5b\x5c\x33\x0e\xe7\x08\x2b\x1b\x1c\xe9\x4c\xf4\xb6\x5e\x56\xec\x5a\xe7\x91\xb9\x22\xdb\xaa\x2c\x59\x73\x3d\x66\x7a\x7a\x98\x66\x8a\x33\x24\x4a\xff\xdd\xad\x55\xf4\x11\x32\xdd\xf8\x0e\x5c\x44\x54\x2f\x59\xcc\x96\x11\xcd\xc3\x10\x6a\x85\xb5\xe4\x6c\xf1\x79\x59\xdd\xbe\x5c\x4c\x5e\x37\xc0\xe0\x00\x42\x00\xfe\x85\x56\x5e\xf5\x87\xac\xa3\xff\x0d\x4e\x25\xf9\xc5\xc2\x75\x4d\x32\x4b\xcf\x68\xd4\x70\x85\x2c\xa1\xa8\xf3\xb7\x5e\x86\x76\xc8\x42\x20\x27\xbf\xa3\x4a\xf1\xe2\xad\x31\x7c\x3f\xf3\xa3\xdb\x9c\xd9\xed\x58\x73\x70\x07\x21\xff\xee\x05\x03\xf3\xe3\x83\xdc\xe8\x20\x13\x1b\xf4\xfc\x27\xf8\x47\xa1\x1b\xf5\x31\xcb\x8c\xd0\x09\x0c\x75\x79\xd4\xa7\x06\xa3\x53\x51\xc3\xc2\x1b\xf2\xfa\x19\xdf\xb3\xe6\xf5\x33\x0d\x9c\x8d\x03\x25\x08\x8c\x70\x05\x1d\x23\xe2\x58\xd5\x18\x4c\x51\x3b\x0b\xfd\x63\x80\xf4\x68\x0a\x38\xdc\x23\xfa\xed\xde\x41\x32\x73\xeb\x60\x26\x5a\xc9\x2f\x61\xf8\x3c\xc4\xf1\x3a\xd4\x39\xf6\x63\x9a\x08\xf8\x90\xbe\xb3\xcc\xf7\xb4\x29\x12\xe6\x0a\x59\x87\x1a\x71\x68\x99\xd0\x58\x3e\xf0\x19\x20\x00\xab\xb5\x8e\xaa\xda\x22\x54\x39\x86\xd4\x96\x1a\xfb\x66\xc7\x4b\xc0\x42\xe4\x1d\x6b\x27\xc8\x01\x45\x57\xc0\x13\xb0\xd7\xac\x68\x47\x76\x72\x86\x11\x5b\x33\x91\x64\x24\xfc\x68\xe7\x9d\xe3\x9b\x61\x8d\xa4\x35\xd1\xbd\x89\x9d\x0a\xae\xb6\xc6\xb5\x5a\x9c\x98\x2a\x6c\x6c\xca\xf7\x53\xf3\xf2\xe7\x53\x84\xf9\xc7\xd2\xc9\xc0\x6d\xf8\x8a\xfc\x4f\x1b\xf1\xbf\x30\x6a\xef\xcd\x50\x83\xad\x9b\x8d\xd0\xb4\x38\x0f\x9a\xf3\xc1\x50\xbc\xfb\x5f\xc3\xd5\xb4\x86\xb3\x40\x48\xfb\x46\xfb\x30\x91\xc3\x9e\x9c\xd1\x1b\x3a\x25\xc8\x3a\xa1\x7f\xc4\x5c\xff\xcf\x83\xe8\x00\x14\x4e\x71\x55\x27\x3f\xa9\xe8\x68\x53\xd2\xb6\xb4\xe3\x56\x10\xc9\x52\x52\x3b\xf2\xc3\x7b\x2d\x23\x02\x60\xf4\x75\x5d\xb4\x34\x25\xb8\x99\x62\x5c\xce\x14\x34\xcc\x46\x26\x4c\x33\x80\x93\x33\x20\xa0\x01\x3b\xf0\xa2\x2d\x33\x72\x6f\xc0\x8b\x0f\x7b\xdf\x8c\x65\xef\x90\xc1\xe1\xeb\x41\xc5\x5b\x8e\x3b\x34\x6e\x2e\x2a\x7a\xee\xe9\x33\x81\x61\x68\xd9\xf0\xdd\xab\x2b\xdc\xb9\x87\x1c\x20\xd0\x3c\x99\x70\xd2\xbf\x28\xc7\x4f\x3e\x8a\x51\x75\x56\x63\x04\x2e\xe0\xd3\x67\x2f\x7b\x75\x26\x1f\x3a\x3b\x8f\x9a\xfd\xf9\x39\xf9\x71\xcb\x1a\xf2\x47\x0e\x32\x46\x25\xb4\x9a\x6b\x4a\xc0\x30\x81\xe2\x25\xe4\x52\x37\x47\x40\x5f\xcc\x8f\x4f\x98\x9a\x58\xe3\x77\xff\x72\x5f\x18\x48\xd9\xff\xf5\xeb\xd7\xcf\x3a\xbe\x47\xab\x48\xe2\x1b\x3a\xc9\xe6\xbe\x2a\xcf\xcd\xdc\x67\xb9\x6c\x0e\x8e\x6b\x4c\xca\x06\xd5\x3e\x84\x1a\x06\x1d\xa7\x94\xc1\x5b\x41\xce\x60\x51\x40\x46\xa7\x0d\x59\x7c\xbe\x6d\x5f\x2e\x26\x3a\xb9\x5b\xe7\x48\x38\xee\x74\x4b\xac\x1d\xb0\xf3\x86\xde\xea\x2f\xce\xb5\xa1\x7e\x41\x87\xe4\xe8\x57\x0d\x7a\x3a\x35\x49\x92\xf4\x08\x7f\x5f\x35\x37\x88\xb4\x81\x9e\x11\x92\x55\x41\xfc\x7e\x62\x6c\x4a\xa8\x51\xb6\xa1\xc5\xe7\x58\xe9\xe5\xa2\x50\xd8\x25\x2b\x9d\x97\x9a\x42\xfc\x7f\xc3\x3b\x56\x2a\x7c\x3f\x95\xfe\x42\x57\x11\x0b\x77\x9e\x55\xc7\x76\xa3\xac\x76\x44\x35\x63\xbb\x16\x19\x81\x49\x36\x99\x94\x9a\xbc\x0f\x28\x03\xac\x6a\x46\x5b\x48\x42\xbf\xbd\x3e\xd9\x9a\x6e\x1a\x4e\x99\xd5\xd5\x51\x52\xc9\x29\x72\xc3\x7f\x8b\xfe\x5a\x4a\xf4\x26\x00\xcc\xa9\x00\xd2\xe4\x06\xa3\xab\x72\x4b\x9b\x92\xef\xea\x23\xde\xf0\xe0\x0d\xd2\xb8\x19\x51\x86\x7d\xb5\x32\x33\xb0\xf9\xbf\x92\x05\x74\x42\x2e\x9d\x7b\x53\x93\x93\x7e\x6d\x29\xb5\x79\xcb\xde\x83\x24\x6d\x26\x61\xfe\xa9\xe1\xdd\x2f\x3e\xf9\x64\xfe\xa1\xf1\xf3\x4f\x08\xcf\x2e\x3c\xd4\xbb\x5e\xe6\xab\x94\x45\x07\x04\xb7\x8e\xef\x63\xa1\x0e\x7d\x2c\x13\xa2\x9d\x23\xbb\xbc\x7b\x55\xd3\xe1\xe6\x55\x36\xfa\x13\x7b\x88\x63\xc4\xd1\x70\xa5\x90\x44\x42\xa5\x9b\x4f\xa3\x23\x7c\x34\x1c\xeb\x43\xda\x9c\x96\x6a\x71\xb9\x09\x54\x82\x9e\x5a\xce\xf7\xa4\x4a\x8f\x4c\x69\xa2\xde\xe6\xd0\xbc\xe4\xe0\xa7\xab\x2b\xfd\xc6\x4e\x73\x0c\x19\x97\x3a\xef\x97\xb0\x24\x05\x0f\x79\xc9\xd5\x51\x19\x9a\xe6\xc1\xe6\x32\xd3\xe7\x56\xa0\xc3\x3d\xd9\x32\x2a\x2f\x37\xb7\x2d\xfc\x29\xcb\xcc\x13\x9c\x1a\x6b\xe8\x43\x9a\xcf\x40\xb2\xf6\xb2\x27\x31\x0a\xa8\xb7\x2e\x58\x43\xaf\x22\xcd\xe4\x75\x88\x76\x56\xf5\x6f\xb7\x34\xc7\x50\xa9\xc2\xaa\x7d\x49\xea\x8a\xbc\x24\x34\xb1\x30\x98\x30\xc6\xbf\xd8\xfa\x01\xf6\x9f\x7a\x75\xf5\xde\x42\xa8\x20\x52\xda\x4d\x10\x02\x31\x2f\xb3\xf6\xd0\x36\x1c\xee\x8a\x3c\xc7\xcf\xce\xab\xd7\xb5\x68\x98\x80\xe0\xb0\x50\x2e\x6b\x8a\x8f\x09\x68\x32\xfc\xaf\xc7\x34\xe2\x1a\x77\xb0\xec\x61\x9f\x1a\xf2\xfc\xad\x8c\xb0\x7f\xe2\x8f\x1e\x32\x8c\x67\xdc\x42\xe7\x46\xe8\xbd\x6a\x07\x47\x9d\x6b\x25\x37\x83\xe4\xa8\x65\xe1\xb7\x32\xe8\xfe\x55\x1d\x3d\x8b\x68\x84\x67\xcf\x4d\xb8\xcf\x15\x91\xb4\x9c\x08\xec\x43\x0d\xe3\x43\xee\x95\xd7\x0f\x33\xeb\x3f\x39\x71\x7c\xca\x91\xeb\x3a\xf7\x52\x52\xc5\xfc\x9f\x4d\x69\x83\xb0\xf9\xfa\x99\x83\xd4\x88\x12\x8a\x9e\x8b\x14\x4c\x80\x81\xa4\xec\x35\xee\xc1\x8d\x0c\x2e\x51\x33\x87\x7d\x4f\x23\xf2\x20\x0d\x37\x11\x68\x57\xa2\x56\x14\x6d\x27\x6c\x2c\xce\x15\xe5\xb5\xe8\x2b\x80\xe2\x3d\x49\xe3\x32\x05\xf1\xa9\x89\xf0\xdc\xfe\xbd\x8c\xde\xd0\xe9\xed\x3c\x75\x43\x73\x5b\x1a\xad\x13\x9e\xa6\xec\x32\xbd\x7b\xc5\x76\xfb\xee\x18\x2d\x46\x0e\xed\xd5\xd7\xf9\x3b\xa1\xa1\xea\x91\xe7\x64\xa7\x49\xbf\x3a\xb7\xad\x79\x71\x5a\xad\x17\x20\x6c\xd2\x5b\xd0\xb0\xba\x2e\x78\xde\x2b\x53\x5f\x33\xce\x8f\x36\x62\x4a\x3d\x2d\x83\xcf\xf6\xc5\xd9\x0b\x54\xe8\x9b\x5f\x8c\x12\x5b\xd7\xee\x33\xcb\xb8\x0c\xea\x62\x7f\xaf\x75\xb5\x09\xdd\x6c\x04\xbf\xe7\x4e\xee\x71\xb8\x7b\x8f\x0e\x25\x42\x2f\x6f\x78\x55\x57\xb7\x81\x6f\xb7\xf6\x68\x05\xdf\x4d\x8d\xfa\x6c\xff\x30\x04\x39\x2e\xd9\x4a\x98\x68\x23\x13\xb6\x63\xb3\xbb\x81\x67\xbf\x55\xd2\x63\x46\x53\x9b\xff\x6b\x4b\x57\x37\x88\xac\x6d\xf2\xde\x98\x50\x80\x1e\x70\x64\xc4\x22\xbf\x20\x17\x5a\x41\x62\xe4\xde\x2f\x5b\x9d\xb8\x40\xb9\x8e\xc2\xf3\x85\x95\xa8\x84\x78\xfd\x0c\x65\xf7\xd7\xcf\x0c\x08\xbe\x32\x5f\xae\x5b\xde\x40\xf0\xb3\xac\x55\xd3\xa3\x97\x72\x15\xa9\x42\x04\x66\xe4\x7c\x1a\x7b\x63\x05\xba\xf0\xb1\x8f\x5d\x5f\x89\x11\x81\x21\xe9\x66\x1c\x4d\xd0\xf7\x7b\x8c\x51\xbd\x22\xbf\x05\x04\x77\xeb\x62\x8c\xa6\x68\x4c\x4a\x40\x3a\xbe\x61\xf2\x29\x8c\xce\xb1\x00\x4e\xb6\xa4\xad\xa2\x02\xf5\xd7\x29\xd9\x8f\x22\x9c\x67\x44\xaa\xee\x68\xdb\xa9\xad\x70\x41\xc6\x03\x93\x65\xa4\xd1\xb2\xb4\x68\x72\xfc\x9a\x47\x3d\x3f\x48\xfa\xd7\xcb\x0f\x68\x79\x7a\xdf\x68\xcb\x48\xa3\x52\x95\x82\x29\x03\x32\x1d\x58\x1a\x42\x9f\x0d\xe7\x39\x3e\x99\xda\x8f\xd8\x5f\x5c\x24\xf0\xbe\xd6\x29\x7c\xc2\x00\xb2\xc0\x47\xff\x4f\xa0\xa5\x84\x07\x12\x78\x1e\xb6\x0d\x30\x4e\x7f\x24\xf6\xe1\xae\xfd\x47\x7c\x05\x6b\x6e\x78\x4e\xbd\xe0\x74\x44\x66\x22\x50\x27\xa9\x57\xff\xdc\x7b\x9b\x3e\x65\x49\xfa\x3b\x95\x4b\x14\xf7\x69\xbc\xd2\xfd\x8c\x82\x7f\x62\xbb\xea\xde\xc7\xb8\x35\x3e\x13\x90\x08\x4a\x25\x5b\xa9\xb4\x06\x89\x37\x98\x7a\x85\x30\x2a\x2a\x48\xc6\xdb\x54\xfb\x43\x6d\x73\xae\x38\x8c\x4c\xec\xcc\x50\xc9\x7f\xa8\x7c\x80\x2a\xd6\xe0\x5a\x8e\xc9\x29\x5a\x6f\x32\x45\xeb\xcd\x35\xf1\xc3\x02\x5e\xed\xeb\xca\x0c\xd3\xdc\x70\x26\x40\x20\xd8\xc4\x42\x40\x71\x2f\xbf\x69\xeb\xc4\x60\xba\x68\x59\xb3\x4f\x2e\x53\x59\xab\xd2\xc5\x54\xb2\x79\xb8\xd5\xa7\x46\x3f\x7f\xd8\x27\x7e\x44\x49\x2b\x94\x87\xd2\xb9\x7d\x4c\x25\x10\xa6\x22\x71\xc8\x17\x75\xe6\xf1\xb1\x15\x3b\xf2\x01\x79\xf4\x22\xc8\xea\xe3\xd6\xc1\x2d\xf9\xc6\x0d\x69\x79\x4a\xef\xf5\x66\x6c\xef\x4e\x49\x9b\x0d\x49\x5e\xfa\x10\xf5\x06\x77\xb4\xa2\x10\x70\x18\x95\xe3\xd0\xb7\x90\xd6\x6e\x93\x57\xca\x90\x01\xf9\x59\xaa\x46\x72\x0c\xe5\x9c\x44\x31\x47\xf8\x95\xef\x5c\x6a\xc9\x15\xd5\x28\x69\x83\xcc\xe9\xb1\x83\x72\x28\xb2\xbd\x86\xeb\xfe\xe5\x98\x17\x26\xf8\x6b\x41\x44\xd5\xac\x20\xe5\xec\x96\x82\xea\x14\x18\xab\x39\xa9\xa0\x8c\x9f\xd9\x70\x10\x1b\x30\x36\x22\xf8\xd2\x3f\x5b\x06\xfd\xc2\xbb\xae\xbc\xe0\x9b\x94\x8c\x02\xb7\x8d\xf3\x64\x5b\xf1\xfa\xb0\x6b\xe2\xec\x39\xde\xad\xd4\x97\x9d\xc0\x32\xc1\x88\x1f\x0e\xe4\x8c\x79\x7b\x57\x0d\x48\x9c\xff\x2a\x37\x8d\xaf\x60\xfe\x47\x5d\x35\x8e\xd6\x7c\x3e\xc9\xa7\x27\xb4\xc9\x09\x75\x50\x90\x93\xa3\x90\x20\x9c\x7a\xc7\x89\x38\xec\xf7\xbc\xed\x5c\xdf\xb5\xf7\x04\xa2\xb5\x3a\x49\xc6\x0c\xcc\x18\xd9\xf3\x3b\xd6\xb2\x92\x2c\x8f\x26\xa3\xed\xa2\xc5\x54\x54\xe5\x82\xd0\xae\x6b\xab\xe5\xa1\x63\x53\x72\x27\xa5\xda\x5b\xf0\x8b\x7b\xfd\x6c\x5b\x95\x52\xd8\xc4\x84\x42\x90\x39\xe6\xb6\xa2\x64\xb1\xaa\xab\xfd\x62\x46\x7e\x64\x3a\x83\xbe\xc6\xc1\x5f\xf8\x6f\xd6\x05\x91\x67\xf3\xb6\xd2\x58\xf3\xe6\xad\xb2\x40\xae\x41\x55\x32\x33\xd9\x0d\x72\x91\x3d\xdf\x4b\x69\x74\xa6\xae\xdf\xdd\xbe\x3e\x92\xdb\x4a\xa0\x27\xdf\xb6\x32\x69\xbd\xdc\xd1\x28\x57\xb9\x05\xb9\x03\x20\xfb\x9a\x51\xf4\x83\xdf\x39\xfc\x4d\xe5\x99\x5e\xb1\x16\x20\x8c\x57\x54\xde\xd3\x26\x4b\x93\xb2\x0b\xe1\xf2\xa0\x6f\x26\xce\x11\xf3\xa9\xf9\xea\xec\xc5\xcc\x02\x8c\xdf\xd1\x23\xac\x18\x03\xaf\x1e\x42\xc9\x6f\xbe\xff\x83\x56\xc0\xca\x86\x61\xea\x88\xd2\x6f\xb0\x6b\x9c\x69\x82\x09\xca\x62\xea\x9f\x60\xd6\xb9\x78\xf1\xc9\x67\x1f\x61\xee\x99\xf3\xf3\xd1\x95\x3e\xba\xbc\xfc\xcc\xa2\x91\x57\x8d\x24\x97\xa4\x30\xe2\xf2\xe8\x1c\x6b\xf1\xa9\xfd\xd4\x3c\x89\x10\x0b\xac\x1f\x3e\x7e\x34\x9f\xa4\x7d\x6d\x7a\x0e\xbe\xe9\xdc\x39\x8e\xf1\xb9\x07\x07\x9b\x10\x74\x70\x92\xac\xf6\x6c\x3e\x25\xea\xff\xad\xfa\xa1\xc7\x4e\x31\x22\x63\xcb\xe3\x21\x32\xa2\xe7\xc5\xd0\xbb\x35\xfb\x9e\xd1\xb6\xc5\xdc\xc1\x8f\x6e\x15\xd1\xb5\xac\x5b\x6d\x33\xc1\x9f\x2f\x7d\x3c\xe3\x69\xe2\x37\x9b\xb9\x49\x7f\xf5\xc0\x22\x83\x1f\xd7\x95\xf5\xbd\x48\x4c\xd2\x0e\xdf\xe4\x03\x79\x4f\xe8\x87\x63\xe6\xad\xec\xde\x67\xc6\x53\xc6\x7a\x10\x22\xe5\xe9\x13\x01\x79\x9a\xb4\xaa\x04\x0e\xc6\xdf\x0f\x4c\x00\x5b\x3d\xff\xf0\xe3\x17\x1f\x7d\x72\xf1\xd1\xfc\xfc\x6e\x7b\x2c\x4a\x00\x20\x91\xab\x0b\x0b\xa5\x12\x17\x15\x7b\xb8\x54\xf0\xca\x85\x27\x7f\x86\xda\x35\x25\x7f\x90\x58\x40\xf8\x35\x5e\x24\xf7\x67\x77\x99\xa2\xe7\x5b\x9c\x66\x3d\x1d\x3c\x66\x75\x07\x8e\x9e\xc0\xcd\xf9\xa7\x95\x05\x1d\xdf\x13\xbe\x26\xe2\xd0\xc2\x55\x1c\x1a\x8d\x82\x0d\x77\x1e\xfd\xe1\x66\x27\x3f\xc1\x5c\x62\x54\x3f\xe5\xbd\xdf\x07\xa0\x67\x14\x06\x1f\x5e\xe7\x66\xe6\x80\x07\xaa\x64\x31\x98\xd7\xcc\xe4\xed\x3d\x65\x2c\x61\xb7\x1f\x05\x82\x40\xea\x28\x24\x41\x6a\xdf\x4d\xc9\x47\x43\x6f\xcd\x70\xfb\xbe\x0a\xa7\x26\xf0\x22\x06\x5e\xbd\xe2\xbb\x7d\xcd\xee\x25\x69\xdc\x1c\xf6\x53\xd2\x6d\x0f\x82\xe0\xfd\x2d\x97\xa6\xac\xd6\x6b\xd6\x32\x84\x8d\x3d\x3f\xf7\x3d\x2f\x6d\x40\xf5\x2c\x7f\x38\x53\x69\xc6\xd2\xc9\xb2\xbc\x29\xbb\x42\x57\xbc\xb1\xd3\x13\xca\x9a\x07\xdf\xa0\x62\xc0\xaa\xa3\xe2\x55\x4f\x11\xd7\x49\x1b\xa1\x3c\xea\xb7\x36\x65\x46\x65\x72\x48\xc4\x47\x23\x9c\xd7\xd4\x14\xf3\xcf\xc9\x60\x39\x39\xde\x13\x56\xf4\xf4\x8a\x91\x4a\x7d\x8c\xfa\x25\x08\xb4\x0c\x56\x25\xbb\x28\xdd\xb6\xb0\x83\x39\x6b\xc8\x07\xe4\xc3\xfc\xca\x8c\x2a\x8c\xb3\x4c\x15\x1d\xbf\x46\x23\x6b\x3f\x71\xa1\xac\x40\xff\xc7\x96\xed\x59\x53\x62\xc6\xa5\xbd\xfc\xa7\x4d\x3f\xb5\x85\x43\xde\xa9\x13\xcc\x04\xe1\x0d\x53\x29\x67\x6b\x7a\x64\xad\x64\xcf\x3a\x9f\x2b\xa8\x07\xa7\xa4\x64\x25\x78\x01\x96\x52\x5a\xd5\x0d\x23\x90\x00\x34\x6e\x53\xaa\x42\xf6\x38\x72\x00\xdd\xf0\xc5\x84\x2c\x19\xa9\x99\x10\x64\x55\x33\xd0\x28\xbf\x98\x10\x21\x05\xeb\x6a\x7d\x84\xe4\xb0\xc6\xab\x70\x6a\x5a\xfc\x70\x62\xde\x17\x72\x14\x97\xa1\x78\x31\x0b\xa5\x98\x42\x8d\x69\x1a\xfc\xac\x86\x96\x54\xce\x2a\x56\x85\x0e\xf1\x9e\x5e\x94\xd6\x77\xf4\x28\xfc\x8c\x95\x46\x6a\x35\xaf\x81\x7d\xcd\x28\x88\xea\x4a\xbf\x3a\x53\x0d\x82\x60\x5e\x41\x76\x56\x95\x78\x0b\x35\x04\xee\xb8\xa4\xf8\xe2\x68\x0a\xc4\x96\xb6\xea\x01\x02\xfa\x0d\xd7\xa5\x5d\xb5\x4a\x05\x2c\x16\x8e\x66\xa6\xc1\x70\x06\x35\xfd\xe6\x6e\x79\x91\x8f\x63\x0b\xae\xbd\x00\xcd\x59\xf6\xf2\x81\x15\xc1\xf5\xdf\xe1\x6c\xa6\xa1\xde\x1a\x7d\x2c\x4e\x2a\x19\x8b\xf3\x03\x22\x88\x51\xa6\x25\x48\x81\x3c\x04\xfa\xb7\x64\x2b\xa0\xd9\x4c\x51\xcc\x88\x11\x10\x47\x99\xc5\xee\xbb\x03\xad\x09\x2d\x4b\xf7\xc1\xfc\x8a\xb5\xb7\x98\xab\x9f\x92\x15\xed\x56\xdb\x82\xd6\xb5\x79\x9f\xe9\xa4\x73\x30\x7d\xde\xe2\xa3\xdb\xe4\xfd\x54\xe2\xc5\x91\x1f\xc8\x5d\x25\xb6\x98\xe6\x8d\x9b\xc3\x27\xeb\xe2\x50\x3b\x4e\x68\x83\xa5\xe3\x73\x91\x70\x74\x19\x9b\xe5\x3d\xca\x8d\x70\x8c\x92\x16\xe4\x3d\x83\xbe\x50\x3c\x00\xf2\xc1\xa9\x47\x97\xe5\x10\x4b\x03\xb2\x02\x0e\x8f\x87\x36\x48\x83\x5a\x68\xe4\xd6\xb4\x07\x91\x86\x2b\x36\x81\x30\x18\x6f\xd7\xc9\xc7\x34\x9c\x8f\xd1\x1e\xa3\x7e\x14\x1f\xb6\x1b\xc6\xf2\xf9\x99\xd5\x14\x95\xc8\x7d\x1e\x46\xfd\x4b\x87\x60\xf5\xe4\x76\x73\x5b\xd7\xe1\x32\x3a\x1a\x26\xa6\x40\x6d\x5e\x4d\xd4\x1d\x1b\x13\xe3\x35\xea\x27\xf2\x39\x3f\x27\xdf\x1d\x6e\xc2\x0c\xb5\xca\x6d\xd5\x49\x22\x6b\xf4\x45\xc0\xf0\x6f\x2d\x76\x0f\x2e\x84\x32\x6f\x03\xcb\xca\xbf\xb3\x87\x5e\xd9\xb1\x37\xbe\x77\xd7\x0d\x1a\x4a\xbc\x67\xc8\x48\x73\x09\x34\x15\x9b\x4c\xdc\xd5\x46\x4b\x48\x24\x92\xe9\x3c\x1b\x93\x69\xb2\x7c\x42\x86\x0f\x68\xd0\xa0\x41\x5d\xa7\x38\x5c\xdc\xeb\x88\x7e\xd2\x45\x52\x8c\xf3\x65\x92\x67\x0f\x54\x56\xcc\xe8\x51\x75\x9d\x8e\xf1\x9a\x19\xdd\x97\xc5\xbd\xcb\xf1\x2c\x59\x3d\x64\x5b\xb8\xae\xa3\x78\x8b\x42\xde\x1a\xe4\x14\x51\x93\xc3\xe7\xcc\x03\xf5\x72\xa7\x87\x96\xb8\xf1\x44\x85\xe5\x47\x13\x95\xd8\x8d\xec\x75\x44\x3f\xe9\x22\x8f\x24\xaa\xb8\xf2\x78\xa2\xea\xed\x38\x41\x54\x7d\x7d\x8d\x20\x2a\xb1\x8b\x89\x4a\xec\x46\x13\x95\x76\x7c\x1d\x22\xaa\xb0\xc9\x11\x44\xe5\x60\xb3\x9d\xca\x11\xb2\x74\xd4\x9f\x83\xc6\x5a\x5b\x3f\x08\x3f\x55\x0d\xbc\x19\xb8\xeb\x4a\xdc\xf7\x40\x89\x4d\x33\x8a\xa1\xff\xb0\x65\x82\x91\xf6\x50\x33\xc1\x3a\x81\x09\x98\x57\x7c\xc7\xdc\x40\x3f\x64\xea\xc0\xc3\x31\xd4\x1e\x61\x8a\x4c\x8c\xad\xd8\x41\x4f\x35\x5c\x13\x81\x86\x02\xb4\xc1\xca\x43\x02\x0d\xda\x55\xb3\x99\xc9\x6e\xc1\xdb\x1b\x04\x7f\x13\x50\xd3\x6d\x69\x43\xee\xd8\x7b\x25\xf8\x08\x61\x4e\x60\x9d\x31\xd8\x13\xf3\xc9\xcb\x05\xd9\xd3\x56\x85\x25\xcb\x32\xfc\xd0\x91\xaa\x9b\x2a\xc0\x85\x86\x77\x0e\x0e\x80\x99\xc3\x0c\x57\xc8\x6f\xe9\x04\xe2\x7e\xfc\x11\x4c\xeb\x1e\x92\x07\x25\x67\xf3\x7a\xcb\x2d\x0e\x0c\x38\xd4\x08\x64\x1a\x4e\x3e\xbd\x93\xe3\x7d\x62\x83\x03\xc3\xcd\x34\xe7\x04\xa5\x9c\x6a\x88\x3c\xb9\xf5\x70\x84\xf1\xaa\x3f\x24\x59\x4e\xa4\x74\x78\x33\x44\xa3\x1e\x43\x9d\x8e\x2d\x7b\xe2\x0a\x2a\xda\xce\x1a\x43\x9f\x52\xfd\x91\x43\x71\x43\x98\x7a\xac\xb9\x8f\x68\x2a\xbd\x77\xb1\x55\x7c\xd0\xc9\xc8\x18\x95\xbe\xde\x2d\x59\x29\x19\x2e\xe6\x1d\x03\xd1\xfe\xfb\x3d\x6b\xc8\xb7\x2b\xde\x54\xab\x99\x92\xa6\x6b\x06\xa9\xc1\x25\x6f\x6e\xc9\x1f\xbe\xfd\x01\x18\xe9\x8a\xef\x8f\xe8\x2c\xf3\x62\x7e\xf1\x11\xf9\x91\x1e\x97\x87\xf6\x38\xf3\x0c\x82\x07\xc1\x2a\x6c\x69\xc5\x77\xe7\x80\xc6\x10\xda\x9b\xbd\x17\x84\x6f\xb5\xc2\x40\xed\x8e\xde\x30\x01\xee\xbb\xf2\x2d\x29\x1f\xd0\x1d\x26\xe7\x47\x4f\xcd\x8a\xb7\xf2\xe1\x2d\xb9\x33\x28\x46\x5e\x37\x41\x26\xa1\x5e\x0b\x57\xe0\x23\x98\x88\x06\xd9\x55\x8d\x9b\xab\x55\x5f\xe1\x4b\x39\xc0\xf7\x3d\xe4\x17\xf8\x2d\xe5\x0d\x13\x64\x36\xc2\x44\xa3\xce\x6d\x69\x33\x65\xe9\xeb\x52\x76\x81\x2d\xb5\x55\xa3\x32\x21\x14\xb4\xfc\xdb\x41\x74\x57\x84\xdd\xd3\x15\x86\xfd\xfd\x17\x63\x7b\xb0\x34\x33\xbc\x41\x69\x4b\x9b\x15\x66\x36\x87\x8a\x06\x77\x25\xec\x07\x62\x7b\x1f\x7a\x5d\x53\x43\x3f\x6d\xbf\x09\x8c\x78\xb6\x19\x40\x7a\x92\x7e\x65\xcc\xa3\x49\xd8\x8f\xe2\x02\xe6\xf5\xc7\x43\x67\xad\xec\x72\x9b\xab\xa6\xb4\x26\x16\x22\x38\xa9\x3a\x52\x72\x06\x4a\x36\xe5\x71\xaa\x02\x7d\x8c\x6d\x6e\xc4\xe2\xea\x6d\x3d\x1b\xb1\xaf\x83\xdb\x35\xb1\x39\x63\x3d\xec\x1c\x54\xea\xeb\xac\x61\x23\xf3\x5c\x19\x68\xae\x5c\x8f\xaa\x3d\x3f\x63\x7c\x00\x75\x36\x54\x37\x91\x1e\x3e\x1d\xbe\x37\xdc\xd2\x66\xd2\x83\x1f\x3f\x66\x24\x3e\x84\xba\x8f\x8d\x36\x76\xd1\x94\xb7\x31\xfa\xca\x57\x82\x28\xc7\x90\x12\x80\x9e\xa5\x4c\xb8\xa3\x37\x8c\x80\xb6\x17\x22\x5b\x65\x19\xd7\x4e\x3d\x80\x2b\x9a\xc8\x36\xef\x41\xc2\x67\x67\x99\xcb\x49\x1f\xe2\x73\x79\x1d\x9c\xdc\x5a\xbc\x6e\x8f\x4b\xb1\x36\x96\x8a\xf4\x38\x02\x1a\xca\xc1\xc3\x29\xef\xbc\xb7\x45\xff\x89\xb0\xd4\x54\x02\xaf\x81\xea\xcb\xcd\x89\x47\xc7\x43\x86\x4b\x9f\x9c\x51\x84\x9f\x49\x1d\x60\x8d\xb1\x7f\x16\x8c\xfc\x45\xaf\xde\x5f\xe1\x86\xb4\x01\xb1\x1d\x27\x77\xbc\xbd\x21\x14\x66\x3b\xc2\xfb\xa6\x12\xe2\xc0\xc4\xf9\x8b\x4f\x5f\x7c\xf4\x09\x02\x2a\x98\xa6\x33\xc1\xb6\x83\xe9\x16\x33\x4b\x05\xa5\xe2\xa0\xdc\xde\x88\xa1\x53\x36\xce\xb4\xbc\xdc\x0c\xe1\xc9\x29\x7b\xb6\x96\x02\x4c\x1b\x8e\x90\x71\x90\x82\x95\x63\xd6\x57\x65\x05\xe0\x6a\xf3\x35\xd9\x0b\x76\x28\x79\xa1\xf5\xd6\x29\xe9\xc2\x5d\x97\x8c\x8c\x91\x70\xd6\x18\x58\x3f\x4b\x58\x61\x80\x88\xce\xf1\xaf\x73\x6b\x84\xf5\xf1\x77\xab\xc1\xfd\x32\x58\x5b\xa0\xa4\x33\x7c\xe7\x36\x2a\x5d\x87\xe6\xf5\xca\x49\xda\xdf\xa0\xfe\x24\xff\xa3\x6e\xce\x62\xfc\xcd\xa9\xc5\x82\xe2\xec\x91\x42\x93\xbe\x87\x92\xe9\x4a\xc7\x4b\x06\x8e\xee\x6c\x4c\xe1\x1e\x3f\xae\x54\x5c\xda\x29\x04\x1f\xb0\xa8\xde\xa2\x09\xd3\xc0\x50\xe1\xc7\xb3\xb0\x3c\xef\xfa\x86\xb7\x0c\xa7\x47\xce\x20\xef\xaf\xeb\x7d\xff\x7f\xe9\xea\x04\xba\xea\x27\x1e\x48\xb3\x46\xce\xc9\x3b\x0f\x7d\xe4\x03\xed\xbd\x09\x12\x26\x27\x3d\x7f\x99\xa3\x6f\xbb\x63\xf4\x06\x5c\xbe\x09\x25\x6b\x76\x47\xba\x6d\xd5\x6c\xd0\x38\x62\x4d\x3f\x3e\x3f\xd4\x76\xcb\x87\x54\x12\xe0\xe4\x2d\x9f\xd3\x6b\x06\x2d\xc6\x54\xeb\x82\x6f\xf4\x65\x1d\x1e\x12\xbb\xf3\x11\xc9\x31\x66\x83\x9b\xcd\x3a\x3f\x40\xc8\x50\xad\x45\xae\xeb\x91\xc9\x91\xaf\xe4\xeb\xa7\x63\xed\xae\x82\xa4\x3c\xc3\x83\x0d\xef\xd0\x8c\xf8\x92\x18\x9e\xdb\x51\x8a\x07\x0c\x3d\x01\x06\x9b\xdc\x4c\xae\x7b\x81\xf8\xc7\x8f\x2d\xcc\xaa\xf4\xe6\x67\xd9\x2b\xaf\xd7\xf1\x3b\x16\xca\x4b\x27\xbf\xf0\x1e\xfd\xd6\x72\x24\xa0\x68\x65\x46\xd1\xd1\xcf\x3e\x12\x47\x06\xfb\x93\xaf\xd5\xe9\x63\x2b\xa8\x00\xf2\x58\x0a\x46\x21\x8c\xe7\x27\x03\x58\x66\x68\x12\xe8\x8e\xf0\xa9\xae\xf9\x1d\x2b\x8b\xba\x12\x9d\xf7\x04\x40\xd6\x62\x0f\x11\x8c\x21\xc7\x81\x7e\x69\x06\x14\x0e\xee\x71\xdc\xe7\x9f\x8f\x96\xbd\xeb\x49\xdc\x55\xdd\x6a\x1b\x5d\x4e\x11\x01\xd9\x72\x96\x82\xf0\x37\xdf\x8a\xe5\x2b\xe5\xb0\x84\x12\x9a\x3e\xc8\xe8\xea\xae\xd3\xcb\x37\xc4\x96\x43\x99\x63\x54\x5f\x96\x7f\x06\x62\x85\x5b\x3b\x1b\x41\x40\xeb\xfa\xda\x49\x40\xf2\xf8\xe3\x90\x3d\x10\x6a\x18\x7d\x27\xc2\x03\x54\x08\x09\x1b\x31\x34\xcb\xf2\xec\x2d\xca\x78\xd3\xb1\x52\xf1\xfb\xe4\xc5\x24\x44\x24\x2d\xcb\xb3\x53\xb7\xe8\x71\xfd\xa5\xf7\x33\x29\xf8\xc5\x72\x62\x7f\xe9\x93\x5e\x14\xa9\x5b\xff\x17\xa4\x95\x34\xd6\x36\xfc\x13\xbc\x76\x66\x17\x97\x82\x30\x2a\x58\x51\x41\x4a\x09\xbb\xf8\xf2\xb3\x08\xf2\x7d\x8e\x63\x79\x6f\x83\x2d\x8f\x7f\xba\x11\x62\x66\xa3\xe0\xc6\x6a\xda\xb1\xff\x99\x26\xba\x62\xe4\x4b\xe4\x5f\x9e\xaf\xbf\x02\x1f\x01\xc7\x67\x0b\x20\x3e\x45\x0a\x0d\x5f\xf9\x08\xa3\x99\x9d\x6a\x6d\x0d\x40\x2f\xee\xb8\xe8\x20\x1b\x5a\x2d\x67\xba\x6e\x31\xdf\xbb\xd1\x89\xed\xdb\x6a\xc7\xda\x99\x52\x8d\x55\xfc\x7c\x66\x82\xa0\x12\x8e\x0e\x79\xec\x9a\x30\x80\x35\x3a\x9e\xe8\xf0\xe0\xb8\x0d\x5a\xe7\x91\xb4\xbb\xc4\x91\x9c\x3d\xc1\x91\x62\x92\x6f\x36\xd7\x6a\x22\xf3\xb1\x5f\x32\xcc\x81\x9c\xf2\x64\x49\xd4\xb0\x44\xe9\xbb\x5c\x26\x8a\x3a\xe9\x93\x7d\xd7\x17\xbf\x6c\xce\x03\xd3\x2f\x95\x57\x92\x39\xc9\x8f\xfd\x0c\x32\x5e\xfd\xe5\x26\xfa\xc5\xcf\x0b\x12\x6a\x5c\x74\xa9\xbc\x9a\xc5\x2f\x31\xec\x7d\x99\xac\xe6\xe5\x75\xe8\x7f\x45\x99\x8a\xfe\x5b\xc9\x9a\x02\x8d\x2a\xca\x35\xa7\xf4\x2a\xfa\xcd\x76\x25\xb5\xfb\x89\xf4\xc6\xa7\xe7\x62\xcb\x0d\x7e\x9a\x1b\x44\xf4\x12\xfc\x47\xa4\x5a\x1b\x18\x4b\x42\xd0\x29\x76\xe0\x3a\x72\xf0\x07\xf6\x0d\x6f\x55\xcc\x00\x59\xf1\x46\x54\xa2\x63\xcd\xea\x88\xac\x0c\xa1\x01\xf6\x35\xed\xe0\x2a\x3b\x57\x6c\x4f\x23\xdc\xe0\xb5\x7c\xd8\x43\xfa\x2c\xcf\x9d\x15\x1c\x8b\x95\xe3\x78\x43\x96\xb2\x4f\x4b\xbc\x64\x5b\x6d\xb6\x35\x58\xe6\x11\x2f\xa8\xe3\x4e\x7b\xe0\x67\x04\x73\x32\x69\x1f\xb1\x21\x50\x0a\xcb\xaf\x67\xa2\xab\xea\x9a\xac\x6a\x2e\x58\x39\x21\x9f\x63\xe9\x97\xa4\x65\x2b\x56\xdd\x82\x8b\xec\xea\x20\x9c\x26\xab\x86\x7c\xfb\x35\x6a\x96\xd1\x45\xc0\x84\x39\xf3\xa6\x84\x9b\x59\x4c\xc8\xd7\xe5\x86\xcd\x9c\x4a\xe3\x82\x8d\x95\xe5\xe2\xe2\xb3\x0f\x3f\xfb\x74\x16\xda\x1e\xd0\x08\xe7\x0b\x32\x59\xd7\x6a\x73\x1b\x7b\x96\xb2\xbf\x68\xcc\x1f\x8d\x34\x2d\xb9\xd9\x5f\xc1\x78\x05\xff\xfc\xf5\xeb\x67\x17\xaf\x9f\xfd\xd5\x04\x60\x25\x32\x85\x8c\xf4\x8e\x8b\x75\xbf\x21\x18\x68\x94\x1c\x37\x63\x0d\x53\x2d\x27\x91\x4f\xf3\xf2\x49\x58\x4b\xad\x87\x55\xdb\xfe\xce\x04\xc1\x6b\x2a\x43\xd4\x3e\xd8\xdd\x8b\x0b\xa5\xc4\x95\x44\xce\xee\xf7\xb4\x29\x7b\xf3\xbd\x18\xc0\x05\x80\x51\x55\x4c\x03\xfd\x4b\xd4\x85\x8b\x21\x0e\xe4\x9b\x6f\xb0\xe1\x62\xc7\x7f\xc2\x43\xd6\x9a\xf4\x30\x66\xe6\x31\x44\x2b\x38\xdc\x07\x09\x88\x72\xd7\xc3\x9b\xc0\x47\x41\x15\xd0\x39\x74\x7b\xaf\x72\xed\x82\xa9\xb7\x51\x41\x2f\xa6\xaf\xde\xb0\xb0\xc5\x54\x1c\x57\x3e\x78\x99\x06\x04\xd4\xe7\x60\x9a\xb9\x96\x3d\x6f\xd0\xe0\x8e\xdd\x8c\x99\xbd\xf2\x6a\x1e\x37\xfb\xa0\xf0\xe0\xec\x83\xf2\x03\xb3\xef\xf1\xd9\xce\xcd\xde\x71\xb0\xc6\xf4\xeb\x55\xcd\x8c\xbc\x19\x85\xbb\x7a\xaa\x27\x1b\x9a\x3a\x12\xd2\x6d\xbc\xa8\x08\xa1\x7e\x8e\x74\x93\x30\x0f\xbe\x09\x87\x92\xf6\xa7\x49\x7b\x32\xbd\x78\xc2\x28\x7a\x73\x2e\x25\xdc\x5a\x86\x63\xaa\xd3\x52\x06\x94\xcb\xca\x18\xa9\x6b\xd8\xab\xe1\x5d\xc2\xbf\x80\xd1\x3c\x39\xe3\xd0\x92\xde\xbb\x2a\x59\x36\x0d\x65\x33\x4c\x5a\xe5\x9c\xa9\x69\xb3\xf1\x12\xe5\xbb\x55\x6d\xc0\x17\xc2\x9d\x37\x9b\xb3\x77\x1e\xa0\xca\x9b\x49\x72\x48\xd1\x13\xd7\x18\x9d\xb0\x87\xc4\xad\x99\x6a\xe6\x2f\x25\xed\x68\x81\x02\xcc\x5f\x83\x36\x4d\x8b\xb4\xeb\xda\x33\xa7\xe0\x24\xc9\x9f\xc3\xe5\xea\xcb\x22\x85\xe4\xea\x21\x6c\x25\x1d\xcb\x2e\x46\x1d\x82\xe8\xcd\x06\x05\xe2\xa7\x95\xf7\xf3\x7d\xfe\xc4\x24\x5f\x5b\x8a\x92\xfd\xb7\x56\xf2\xe9\x64\x4b\x0e\x3d\x9c\x70\xc9\xfa\x9f\x4d\x50\xc6\x49\x8c\xd9\x4f\x82\x61\xf4\x99\xf7\x2d\xff\x02\x72\xbf\x8f\x7e\xff\xb8\x95\x06\x93\x32\xf9\x75\x42\x78\xae\xd3\xcc\xcc\x41\x3a\x98\x79\x90\x3d\x64\x7e\x9d\xc4\x85\xc8\x58\x81\x7b\x88\x0b\x53\x07\xf8\xf2\xe2\x63\x88\xec\x94\xdd\x4f\xef\xbf\xca\xa7\xe8\x72\x5b\xc7\xc8\xfc\x25\x9c\x4a\x63\x6a\xee\xd5\xfe\xb8\xcd\x59\x35\x8f\x87\x70\xad\x73\x6c\xf4\x5a\x7b\xe7\x24\x4f\x06\x7d\x9f\x62\xb4\xc4\x3f\xd1\x66\x63\xef\xf7\x57\xdd\xb1\x66\xa4\x95\xbf\xe9\x18\x6e\x13\x5f\x4d\x57\x2d\x17\x42\x6b\x99\xc4\x8c\xfc\x0f\xd6\x94\xbc\xb5\x39\x53\x20\xd2\x04\xfd\x68\xc1\x05\x08\x5a\x34\xe1\xab\x2a\x74\x63\x09\xbe\x86\xac\x9c\x91\x2f\x04\x11\x87\xd5\x76\xaa\xfc\x0a\x01\x5b\x93\x63\x54\x77\xa9\xf3\xaf\xac\x0d\xcc\x0c\xc7\xc8\x42\x17\xaf\x4e\xc8\x67\xdc\xbe\x65\x6b\xd9\x9e\x8d\x88\x0f\xac\x61\x72\x2a\x0f\x7d\x97\x3b\x2d\x4b\xc7\x36\xd4\x6c\x58\xd1\x6d\x0f\xbb\xa5\xcd\x87\x99\xf8\x16\xde\xa9\xa1\xe6\xda\x90\x2b\x06\xf6\x7e\xc7\xf0\x2e\xc5\xd4\x42\x4e\x5a\x90\xe1\xc4\x0a\xe3\xd4\x12\x9e\x82\xc1\xd8\xf5\xfe\xe8\x7b\x62\x61\x04\xd0\x92\x11\x44\x2b\x54\xfb\x69\xf0\x5b\x4d\xa0\x50\xc7\x11\xc3\x84\x36\x84\xad\xd7\x6c\xd5\xcd\x4c\x8b\xdf\x71\x97\xad\x4c\x94\xd2\xc0\xee\x12\x5d\xad\x98\xd0\xc0\x61\x33\xfb\xc8\xbf\x63\xcb\x9b\xaa\x2b\x44\x0d\x90\xca\xb0\x86\xe4\x21\x29\xb2\xf4\xad\xb2\x03\x22\x82\x4f\x1f\xa7\x30\xdc\xc2\x4f\x6d\x52\x38\x6d\xa9\xff\x3c\xba\x49\xf3\x30\x75\x5e\x69\x05\x3f\x38\x6c\xd6\x26\x9b\x09\xca\x27\x57\x2b\xe9\x35\xe3\x8e\xc3\xb5\x71\x85\xcc\x2e\xa6\xeb\x44\xc2\xae\xf0\x14\xb4\x74\x75\xa3\x4a\x3b\x0a\xf6\xb8\x29\xe5\x32\x24\xe9\xe3\x47\x18\xb9\x89\xfa\x1a\xc1\x11\xdd\xe6\x42\x8e\x98\x1e\xbf\x97\xbf\x7e\xe0\x92\x8c\xeb\x05\x39\x68\xfa\x6e\x4b\xbf\x72\xa8\x4f\x4b\xe6\x3a\x1d\xb0\xb1\x64\x0e\x73\x9c\x56\xe6\x84\x45\x0b\x12\xc3\x90\x88\xfa\x7c\x6a\x6a\x0f\x0d\xaa\x1d\x61\x7b\xfb\xc9\x0a\x08\x60\x04\x59\x39\x84\x72\x9d\x55\x41\x00\x79\x6c\x8f\xff\xae\x0a\x04\xae\x98\x6e\x4b\xc6\x1d\xb3\x5f\xe8\x77\xab\x64\x7c\x92\x63\x15\xc8\x38\x7a\xc1\x36\x1f\x49\x2f\xaa\x72\xc6\x39\x3f\x66\x5c\x3f\xd3\xc9\xfe\xbf\xa7\xee\x17\x3d\x75\xce\x2e\xff\x83\x0f\xda\x2f\x75\xc0\x40\x6f\x5f\xb5\x6c\xcd\xef\xcd\x05\xf0\xef\xff\x3c\xa7\x4e\xfc\xe3\x2e\x52\x14\xfa\xbe\x2e\x37\x2c\xb8\x09\xd3\xe1\x61\xc3\x82\x25\x32\x4f\xde\xde\x28\x3d\x0c\x80\xb0\xea\xc7\x33\x2b\x9d\x65\x21\x95\x50\x6f\xe9\x59\x2a\xf5\xe8\x09\x3d\x3e\xbe\xcb\xff\xcb\x79\x7e\x59\xce\x23\xfe\xf5\x58\x4e\xdc\xd8\xd0\x45\xee\xaa\x53\xfa\x8e\xa7\xeb\xce\xfe\x76\xd8\xc8\xba\xaa\xeb\x42\x1e\x82\x76\x58\x31\x99\x64\xa1\x4f\xe3\x86\x89\xc1\x1c\x20\x87\x6d\x12\x3f\xff\xe2\x72\x7f\x8f\x49\xdf\xda\x65\xd5\xb5\xb4\xd5\x02\xd8\x2f\x33\xe6\xd8\xbb\xa6\xf7\xb5\x33\x62\x98\xb0\xd5\x71\x80\x93\x67\x62\x1e\x23\x01\x5b\xf2\x55\x86\xbc\xa4\xad\x3a\x2d\xba\xbd\xa5\x61\x66\x44\x86\x71\x23\x13\x6f\x71\x48\xb1\x76\x39\xe9\xf1\x34\x4d\x69\x9f\xa7\x69\x27\xa1\x53\xb9\xa7\x09\xb6\xb7\x31\xed\x46\x49\xf5\x5f\xd5\xea\x06\x20\xf6\x01\x08\xae\xa1\xb7\xd5\x06\x71\x27\x56\x7c\xb7\xe7\x0d\x6b\x8c\xcf\x93\x60\x10\x91\x26\x50\xab\x05\xda\x8d\x19\x5c\x6a\x98\x01\x51\x65\xff\x6d\xe8\xed\xcb\x85\x98\x92\xc5\xe7\x87\xfa\xe5\x42\x00\xfc\xf9\xe7\x5c\xfe\x13\x55\x49\x0d\xbd\x3d\x25\x53\x8d\x6f\x9a\x9b\xe7\xa3\xd9\xea\x4a\x74\x05\x8c\xcd\xdc\x0e\x6f\x74\x87\x4e\x8a\x83\xde\x64\x8b\xba\xa8\xab\x0a\x8d\x7e\xbb\xbf\x7e\x6a\x76\xde\xe1\x14\xad\xf9\xfc\xa6\xd6\xd4\xf4\x1b\x7d\xfa\x41\x7d\x47\xc0\xdb\x82\x35\xc2\x04\xa1\xdb\x6c\xa6\xa1\x11\xdf\x4c\xe9\xd4\xcc\xa5\xa9\xa3\x63\xb5\x9f\xe8\x19\x4d\x97\x16\xe4\x5b\x76\xd4\xd1\xa5\xf0\x52\x07\x1a\xa3\xac\xfe\x9a\x54\xe6\x87\x1f\xdd\x30\xce\x60\x4b\x23\x82\x28\xd2\x4d\x9f\x7c\x5f\x0e\x8c\x71\xf8\x3d\xec\x66\x09\x0e\x5b\xf2\x91\xee\x86\x08\xc2\x4d\xaa\x24\xb4\xde\xd6\xae\x43\x47\x97\x0a\x84\x60\xbf\xaf\x9a\x8d\xd6\xf2\x2a\x9f\x07\xbe\x06\x78\xff\x8a\x1f\xc4\x39\x24\x5c\x32\x15\x75\xe3\x95\xe0\xb5\xa6\x63\xf8\xa7\xe3\xd7\xeb\x5b\x4f\xcd\x34\xdc\x14\xbf\xb1\xfd\xd4\xb2\xd3\x88\x0a\xc7\xd2\xe1\xb8\x9d\x1a\x96\x6d\x3c\x2f\x55\xdd\xa5\x9b\x85\x18\x7e\xac\x3a\xb6\x53\x69\x5a\x42\xea\x4a\x4f\x7d\x5c\xf8\x77\xb2\x4e\x2e\xe6\x3b\x5d\x38\x13\xde\x9e\x4a\x7f\x4f\x88\xce\x24\x67\x92\x69\x63\x75\x4d\x1c\x40\x28\xf8\x53\x2a\x77\x49\xdf\xb1\xb1\xae\x34\x1a\x3f\x3d\x40\xca\x42\x8c\x03\x04\x94\x35\xe0\x06\x94\x6c\x69\x5b\x12\x26\x5f\x6f\x16\xa6\x1c\x53\xea\x9c\x9e\x21\x04\x31\xbb\xaa\xba\xf6\x59\xcc\x5e\xfe\xa2\x82\x74\xc2\xcd\x73\xbd\x2f\xdd\x1c\xcc\x9e\xb6\x38\x2f\x91\x99\xe6\xfb\xe2\xfe\x92\x44\x05\xb4\xf4\xb2\x9f\x9a\xb0\xe5\x13\xc9\x29\xae\x64\x4d\xf4\xfe\x4a\xfd\x27\xe4\xcb\xa9\x58\x49\x6e\x69\x5b\x51\xc0\xb6\x77\x96\x4d\x4a\xbb\x26\xbf\x85\x1e\xa6\x7f\x22\xf4\xa0\x93\x19\x08\x32\x88\xa3\x6f\xdc\x8b\xf7\x6f\x66\x08\xe3\x3b\x2a\x96\x54\x54\xc2\xee\x0d\xfc\xb6\x69\xf9\x9d\x4d\xa3\x37\xd0\xb5\xbe\x89\x96\x90\xa4\xa2\x33\x57\x92\x72\x31\x93\xbf\xe0\xa7\x3d\x55\x58\x6d\x20\x01\x4d\x09\x6c\x1a\xe4\x4d\x01\x57\xc4\x85\xda\xd1\x05\xcc\xa7\xa3\x4b\x9d\x07\xc1\xcc\x46\xfe\x26\x1b\xe9\xf5\x44\x83\x92\xfe\x13\x35\x21\x86\xb8\x99\x36\xbe\xc2\x6e\xec\xb0\xbf\xa3\xb7\x90\xf0\xcf\xfc\x93\x2c\x5b\x0d\x55\xad\x7e\x68\xe8\xad\xfb\x27\x8a\x01\xf6\x6f\x95\xd8\x52\x39\xba\x8b\x3d\x6f\x84\x1c\x4f\x13\x35\xac\xed\xd5\x5e\x63\x5b\xb6\xc3\xb0\xa6\x60\x34\x0a\x45\x8f\xcb\xb6\xa5\x88\xd8\xd1\xae\x5a\xa9\x46\xd1\xd7\x0e\x33\xcc\xdc\x31\xa2\x5c\xf6\x3a\x4e\x56\x2d\x93\x12\xcb\xfa\x50\xd7\xc8\x62\xa6\x04\xac\x8e\x16\x7d\x1b\xbd\x52\x55\x33\x40\xbc\xe0\xc2\x69\x24\x48\x93\xee\xf0\x49\x59\x43\x5c\x94\xf0\x12\xf3\x42\xc0\x7d\xb9\x6c\x19\xbd\xc1\x40\x63\x5e\xd7\x74\x0f\x1e\xbd\x6a\xe7\xfb\x50\x8b\xa3\xfc\x54\x00\x51\x54\x2c\x59\x77\xc7\x58\x03\x5d\xc2\x2f\x80\xed\x00\xfb\x87\x4b\x54\xf3\x0d\x8f\x04\xd1\x25\x6d\x03\x31\xd4\xfd\xc5\x41\x0f\xff\x92\xad\xe8\x41\x30\x98\xa1\x8e\x92\xa9\x18\xc0\x88\x37\xef\x75\xda\x02\x2e\x57\xf7\x8e\x01\x1c\x38\xda\x4e\x4b\xb6\xaa\x29\xe2\xd0\xc8\xca\x55\x2b\x74\xe6\x84\x35\xbb\x73\xdb\x11\x1c\xd5\x55\x9a\xf4\x1b\x26\x3a\x56\xea\x94\xb1\x2a\x55\xa9\x76\x63\x06\xa5\xd5\xaf\x64\x51\x5a\x35\x52\x8c\x91\xcb\xee\x34\xd6\x93\x6a\x21\x25\xfd\xe7\xd7\x7a\x70\xb5\xbd\xd8\x14\x3d\x9e\xa9\xff\x67\xb1\xae\x0f\x95\x11\x4c\x74\x1e\xc1\xfc\xf0\x13\x9e\x50\x40\x2b\x20\x32\x4f\xc9\x73\x5b\x71\x47\xef\x95\xac\x08\xde\x51\xf1\xef\xc2\x49\x1d\x60\x3e\xbf\xf3\x60\x9b\x2b\xaa\x66\x5d\xdd\x9f\x0d\x76\x20\x26\x6f\x1c\xbd\xd7\xb8\x29\xa4\x62\x61\x42\xb6\x02\x3f\xfe\x59\x28\xec\x78\xf8\x79\x2a\xb7\xf9\x6f\x6c\xd5\x4d\xe5\xab\x4e\x54\x9d\x64\x1f\x3b\xe6\x1d\xcb\x02\xe9\x7a\x20\x96\xc5\xf7\xe6\x74\x6b\x5a\x9a\x4f\x7b\x72\xf6\x94\x0d\xf4\xc1\x89\x13\x93\xf6\xdd\xf4\x9a\x0c\xe2\x49\x3c\x67\x17\xd7\x99\x24\x8d\xab\xfd\xc4\x97\x5d\xb4\x1b\x8a\xa7\xbb\xde\xa2\x8d\xf9\xa2\x1f\xea\x67\x1a\x86\x4c\xa5\x52\x20\x0b\xb9\x17\x0b\x84\xfc\x94\xdf\x10\x75\x4a\x21\xa1\x2f\xcc\x0d\xbc\x98\x78\x1b\x37\xf4\x30\x8f\xf3\xf5\x49\x66\x61\xb3\x9f\x91\x85\x5a\x9f\x85\x64\x30\x1b\x95\x2c\x71\xa1\x9a\x5f\x08\x9d\xef\xea\x69\x6f\xfa\xa4\x90\x17\xf8\xbf\xcf\x03\xb7\xf8\x5c\xca\xcc\x48\x7a\xb6\xb7\x09\x5e\x64\x86\x33\x71\xda\x0d\xec\x94\xbe\x6e\x5d\x09\x4b\xae\x6a\x02\xfd\x7e\xf8\x34\x04\x4a\x88\xec\x49\x88\xcb\xd9\x71\x25\xef\x78\x97\x90\x1c\xa7\xa0\xd6\x96\x75\x6e\x3c\xbc\xad\x55\x26\x4c\xbe\xd6\x94\xa7\xf8\xad\x40\x98\xc5\x3f\x7a\x49\xf5\x74\x75\x46\xbe\xd4\x4e\xac\xe4\x3f\xe9\x2d\x7d\xb5\x6a\xab\x7d\x47\xf6\xf5\x61\x53\x21\x86\x39\xd8\xaf\x59\x63\x2a\x00\x73\xc1\x9c\xc1\xf8\xbe\xd8\x6c\x6a\x06\x32\x5a\xd0\x2d\x5e\x99\x68\x0b\x90\x03\x53\x69\xed\x3c\xa4\xf5\x9a\xdd\x2f\xf9\x3d\x69\xf9\x1d\xe1\x6d\xc5\x9a\x0e\xb1\xd3\xc9\x9f\x74\xae\x11\x59\x5a\x9f\x87\xe0\xde\x59\xa0\x00\xd2\xf8\xd4\x4b\xf0\x49\x39\xb3\x1b\x6b\x66\x6a\x33\x5a\x2a\xb9\xd5\xf8\x44\x45\x82\xab\x8a\xc5\x51\xc9\x3d\x50\x20\x62\x90\x48\x01\x13\x9f\x48\x89\x48\xcd\x57\x4c\x75\x46\x3d\x7d\xef\xc2\x4d\x28\x48\xd5\x09\x56\xaf\x55\x6b\x06\x62\xd8\x62\xde\xcf\xc8\x57\x54\x5e\xcb\x80\x20\x6f\xc1\x87\x4b\xd6\xa0\x1e\x0f\xc4\x84\x43\x57\xd5\x95\xbc\x0e\x66\x79\x79\x46\xfb\xb4\x7d\x99\xc9\x8b\xaa\xf6\x05\x04\xe5\xaa\x91\xe3\xb2\x9b\x69\x52\xa0\xea\x53\x00\xdb\xd9\x86\x98\xd6\xfe\xd7\x84\xb8\x13\x7e\x19\x64\xe2\xba\x42\x1f\x1b\xbf\xb8\x1e\x76\x16\x93\x8b\xdb\xe2\x73\x37\x4c\x74\x2c\x8f\x8d\xe7\x97\x3a\xa0\x1a\x1a\xd1\x54\xcf\xeb\xd3\x9d\x54\x52\x73\xf4\xd4\xeb\x46\x63\x78\x42\x86\x10\xc1\xf6\xb4\x95\xb2\xb9\x4e\x10\x22\x38\x59\xf3\xfa\x06\x1c\x0e\x03\x8a\x82\xb4\x31\xa8\x1a\x6e\x50\x5e\xaf\x56\xea\xd5\xc0\x5b\x02\x91\x45\x18\xda\x40\x85\xca\x42\x33\x8b\x08\x02\xe0\x22\xc6\x06\xbe\xce\x2e\xd9\xce\xf3\x35\xb4\xbf\xf4\x84\x5f\xc6\x00\x46\x31\x7c\x91\x3c\xb1\xf8\x5f\x2e\x46\xd1\x9b\xe0\x76\x2c\xc4\xaa\xe5\xfa\xc9\x2c\xe5\x2f\x63\xe4\x8b\xca\x14\xf6\xb3\xe7\x9a\x5d\x1c\x4d\xdc\x96\x5e\xfc\xdf\xb2\x86\xc1\x92\x0b\xd6\x4a\x09\x59\x5f\xd1\xb2\x41\xe4\x10\xc5\xfb\x0b\x8f\x43\xab\x9c\x11\xf8\x3e\x69\xd6\xd5\xe6\xd0\xaa\xcc\x13\xf2\x30\xb6\x8c\x1c\xf9\xa1\xb5\x6c\x13\x8f\xa4\x70\x16\xdf\x0d\x9e\x8a\xc4\x58\x79\x96\x77\x74\x5f\xdc\xb0\xa3\x38\x7b\xbe\x69\xab\xb2\xb0\x1f\x85\x21\xac\xe7\x0d\xbb\xef\xae\x88\x23\xaf\xca\x1f\x02\x71\x35\xaa\xad\x2e\xd4\xe7\x20\xdb\x7a\xb5\x95\xb4\x2b\x1b\xc9\x54\x54\xfa\xc4\x77\x1e\xb0\xf6\x9b\x84\xb5\x77\xc7\xca\x8a\x3a\xf5\x0a\x79\xc3\xbb\x63\x9a\xb8\xa0\x7f\x8e\x90\xec\xaf\xf7\x3b\x0f\x4e\x95\x37\x6e\x95\xac\xa8\xe1\x7f\x74\x05\x0e\x03\x10\x68\xff\x78\x19\xbe\x48\xe2\x9f\xfd\x97\x49\x56\xb8\xef\x1b\x77\xae\x77\xb5\xe3\x92\x39\x3e\xf2\xc9\x12\x0f\x37\xf5\x70\xc9\x77\xe0\x3d\x59\x9e\x3a\x37\x83\x3d\xe4\xfd\xd3\x99\x71\x9e\x3a\x0e\x7b\x24\x38\x8f\x2a\xe0\xd2\xc6\x30\x8a\x16\x92\x6c\x3b\x8f\xd1\xe4\xb3\xd3\x4b\x52\x6d\xcb\x45\x62\xb5\xd7\x81\x23\x4c\xb7\x10\x44\xe4\x96\x48\x0b\xa7\x86\xc8\xf2\xb9\x5e\xa3\xbd\x4e\xc8\xca\x19\x42\x76\x79\x58\xc2\xdc\x95\xa3\xf1\x91\xd5\xde\x64\x68\x51\x09\x44\x0d\x13\x9d\xd6\xb1\xc0\xe6\x8b\xa9\xc9\xc0\x6c\x35\x15\x90\xac\x4a\xf2\x77\xb8\x99\xf6\x87\x76\xcf\x05\x13\xe9\xf3\x8c\x0d\xf6\x9e\x64\x47\xee\x8b\x36\xf9\xe7\x3a\xae\xc9\x61\xfd\xcb\x1f\xd4\xa1\x59\xe5\xf7\x3f\x77\xbb\xea\xff\xd8\x90\x26\x95\x46\xfa\x7a\xa0\x21\x5f\x2a\xd7\xff\xf1\x5e\xb4\xe4\xdf\xaa\xdd\x9e\xb7\x1d\x55\xb2\x59\x0c\x3a\x03\x4a\x40\xa4\x3a\x90\x9a\x8a\x86\x17\xa6\x8e\x7f\xbc\x00\xbb\x90\x36\x1b\x79\x1f\xab\x27\x00\x2a\x94\xe5\x2d\x4f\x96\x4a\x35\xc7\xd7\x84\x42\x08\xf3\x9c\x2c\x0f\x9b\x88\x08\xd5\xbb\xc1\x51\xad\x67\xe7\xe7\x09\xd2\xd1\xf4\x1c\x03\x47\xc8\x0d\x7b\x95\x3e\x5a\xbd\xeb\xc6\xad\xb8\x88\x56\x90\x62\x10\xf5\x6a\xfa\x79\x82\x92\x1f\x86\xf8\xf3\x96\x94\xb4\xbd\x71\x04\x2b\xfd\xc4\xfb\x8d\xfc\x59\xf2\x05\x41\xe8\x86\x56\x0d\xa0\xae\x61\x25\x5b\xd8\x0a\x26\xf8\xc5\x18\x72\x02\x75\x92\x67\x3b\x31\xc5\x95\xde\xc6\x87\xf9\x1d\x32\xa6\xf6\x34\x84\x35\x02\x5b\xa6\x67\xeb\x09\xb8\x7a\x82\xc3\x26\x9b\x0f\x81\x88\x87\xc6\x98\x69\x26\x1e\x9f\x47\x2a\x29\x7b\x6b\xa6\xa5\x8c\xd5\xf5\x4d\x60\xc1\x8d\x2c\x59\x8a\x07\x6a\x8b\x46\xe2\x8b\x31\x88\xc9\xaa\xd1\x8f\xa1\xb3\x5e\x72\x70\x09\x7b\x58\x6a\x1f\x82\xf3\xd0\xbb\xf0\x69\x8b\xab\x2d\x17\x3c\xb3\x62\x8b\x6b\xf6\xed\x32\x84\x95\x97\xec\x06\x90\xf2\xb4\xe3\x61\xd8\x85\x13\x42\x3b\x38\x27\x7a\xda\x52\x3e\x91\xfe\x12\x1b\x93\xc5\xbf\xfe\x11\x30\x42\xc2\xf3\x1f\xf0\x0a\x7b\xfc\xe1\xc3\xe8\xd3\x2f\x4b\xbf\x8d\xc3\xef\xb4\xf3\x33\x9c\x7d\x68\xfd\xc9\x4b\x0f\xad\xbc\x8d\x93\x0f\x0d\xfd\x93\x1e\x7c\x18\xdb\x5b\x39\xf7\xde\xa2\xe7\x8f\x3d\x14\xfb\xd9\x4f\xbd\xd7\xcb\x23\x0f\x7d\x34\x21\x7a\xd2\x2a\x3e\x8d\xee\x46\x9e\x78\xb0\x5c\xdb\xcc\x39\xa8\x5e\xb6\x50\x67\xb4\x2d\x1f\x63\xb2\x8d\xad\x0e\x3a\x23\x8e\x52\x0b\x61\x78\xc0\x38\x28\x9f\xfd\xa1\xae\xcf\x5f\xbc\xf8\xe4\xa3\xf9\x3b\x00\xad\xb0\xe2\x3b\xf9\x96\x28\x3e\x9c\x5f\x7e\xfa\xf1\xa7\x17\xf3\x8f\xfd\x08\x7d\xda\x96\xae\x12\xe7\x8e\xb7\xa5\x7a\x30\x80\x9c\x5b\xc8\x1f\xb2\x81\xec\xb2\xb2\x8e\x60\x77\x3e\xd7\x95\xac\xae\x3d\xe1\xee\x83\x08\x77\xa8\x94\x0a\x6d\x77\x3e\x8c\x88\x69\x77\x4a\xfb\xca\xc2\x97\x64\x9b\x71\x6d\x9e\x5f\x27\x22\x1c\x3c\x93\xc9\x4b\x32\x03\x7b\x0c\xa6\x8b\xf2\xb1\x35\xc0\x72\xe1\xc7\x5a\x07\xde\x7e\xf6\xa3\x49\x01\xed\x64\x96\x0a\x61\xa4\x3b\xbe\xb7\xfb\x9b\xcb\x42\xee\x7a\xd7\xc1\x94\x21\xc4\x3d\x1d\xa9\xe0\xb8\xf7\x3a\xc9\xc8\xa2\x7e\x71\xb4\xc3\x5d\xab\x72\x27\xf4\xee\x79\x6e\x1e\xe0\x65\xab\xa3\x59\xaa\xee\x28\x5f\x08\xdd\x56\xbb\x48\xe9\xe0\x6b\x72\xb6\xc0\x73\xe3\x2d\xfd\x62\x02\x96\xfc\xdd\xc1\x18\xec\xe5\x13\x83\x12\x9c\x92\xa9\xab\x33\xce\x68\xab\x4a\xc9\x0f\xcb\x9a\x79\x99\xc2\xe5\xc3\x10\x69\x9c\x96\x00\x40\xef\xf4\x32\x8d\xb7\xfc\x03\x55\x7c\xcd\x79\x14\x77\x9b\x4a\x8b\x3b\x53\x74\x58\x1e\xb1\x2c\x64\x3a\x07\x93\xce\xc2\xb5\x8c\x2c\xe0\xa1\x51\xb2\xd5\x0d\xa6\xe1\x82\xce\x1c\xb7\x03\xb9\x00\xa0\x0c\xc6\x3c\x5c\xe4\xb0\xb7\xf9\xc8\x77\x87\xd5\x56\xf9\x54\x50\x21\x39\x0b\x3c\x12\x95\xe9\x04\x1d\x21\xe5\x58\x75\x4e\xf5\x6a\xd3\xa0\xfb\x03\x00\x3c\xc2\x1e\xce\x34\xa7\x09\xdc\x9b\xfc\x78\x1d\x30\x7e\x6c\x99\xd2\x6a\xcb\x07\xb3\x7c\xc8\x21\x2e\x95\x2a\xfd\x8a\xb1\xab\xd1\x2c\xe8\xd3\x4f\x2f\x2f\xc3\xcc\x5e\x17\xfb\xfb\x10\x01\x44\xae\x9f\x93\xe6\xca\xc1\x53\x90\x5f\x34\x23\x70\x16\xbb\xab\x3a\x0d\x1a\x14\x18\x54\xbd\xc6\x8e\x7e\x2d\x71\x58\xc6\x15\x95\x4b\xa0\x57\xcd\x86\x7f\xe4\x11\x83\x60\x18\xec\xbe\x73\xcf\xd9\xc3\x70\x15\x2b\x44\xf9\x97\xd4\x09\x3e\xd1\x9a\x3e\x13\x9e\xc1\x3a\x60\x2b\x5a\xd0\xc0\x7b\xf9\x7b\x00\xa3\xa3\x35\x74\x06\x78\x79\x74\xef\xdf\x61\xfa\xb0\x3c\xe4\xb7\xea\x98\xea\x28\x99\xa2\x1c\x1d\x2a\x7d\xc4\x33\xaf\x20\xa4\x2e\xdf\x7e\xf7\x32\xde\x7b\xba\x1f\x00\x52\xd1\xa5\x3c\x14\x95\x80\x1c\xc6\x5e\x35\x0a\x23\x21\x66\xd8\xbd\x37\x50\x82\x21\x92\xfc\x97\x79\x08\xa7\x11\x33\x9b\x13\x96\xfb\xad\x2c\x96\xc2\x1a\x3b\x7d\xa5\x42\xd2\xef\x41\x1e\x99\x93\x47\x2c\x56\xc6\x33\xf6\x77\x48\x9a\x0d\xbd\x4d\xd2\xac\xe3\x8a\xef\xdf\xfd\xfe\x29\xbf\xcf\x9e\xf2\x22\x62\x22\xc1\x01\xcb\x36\x14\x50\x5f\x70\xf6\xd5\xf0\x1c\x37\xde\xd3\xc6\xd7\xdb\xb9\xc9\xc5\x24\xef\x11\xe0\xdf\xba\xdb\x6a\xb7\x29\x74\xe6\xbe\xc7\xa0\x3c\x05\xbe\x2a\x8e\xc4\x14\x10\xaa\xd3\x91\x93\x85\xf8\xf4\xd3\x33\xf1\x97\xad\xda\x6d\xa6\xee\x5c\x3a\xbe\xf7\xfe\x56\x2c\xc4\xfa\x27\x88\x6d\x5b\x35\x37\x9a\xf9\x7c\xc3\x5b\xf2\xed\xd7\x57\x27\xc0\x90\x7d\xf6\xe1\x67\x1f\x87\xd8\x2f\xc8\xc6\xc0\xad\xa2\x34\xfa\xce\x3b\xf4\xae\xd0\x7e\x18\xe0\x48\xb2\xad\x04\x0a\x81\xac\xe9\xea\x23\xa1\xfb\x7d\x0d\x5e\x8a\xe0\x7b\x20\x58\xbd\xbe\x22\xa2\x6b\x59\xb7\xda\x0e\x4d\x32\x9d\x61\x74\xac\x34\xd8\xd3\xb6\xbb\x60\x4f\x90\xf8\x9c\xb4\x36\x92\xe6\xa4\x64\x63\xfb\x94\x7f\xe9\x7c\x12\xe6\x49\x94\xb9\xad\x65\xd9\x02\xbf\x78\x9e\x87\x7d\x06\x2d\xb1\x9b\x0c\x3a\x59\x5a\xeb\x96\x63\xf6\x48\x1e\xb9\x70\x04\xe9\x23\xe7\x97\x52\xaf\x7e\x77\x76\x68\xe8\x91\xd4\x70\xd8\x08\xf2\xce\x47\x49\xa2\xdb\x6f\xab\xba\xda\xdf\xd1\xba\xe3\xcd\xf9\x5a\x15\x7e\x47\xfd\xa3\xf8\x48\xb7\xa4\x65\xb5\x39\x51\x5e\x36\xa9\x50\xf0\xf4\xd8\x33\xb7\xf0\xf7\x6e\xfe\x6b\x75\x0d\x07\x15\x5c\xf9\x21\x6e\xf7\x4d\x92\x1b\xc3\xe6\xa3\x30\xeb\x73\x63\xe7\x01\x85\x79\xc5\x43\xd1\x1d\xfc\x92\x85\x76\xb4\xc5\x37\xc0\x42\x3b\xdc\x2e\x9c\x46\x16\xaa\x8d\x8e\xeb\xcd\xf6\x1d\x71\x5f\x8e\x20\x32\xcc\xe5\xfb\x8f\xa2\xb2\xb7\x31\xe1\xde\x29\x47\x93\xfe\x47\xd1\x9e\x7b\x1b\xe8\x4f\x1f\x84\x43\x49\xbe\xaf\xbd\x17\x68\xf8\xc1\x51\xf0\xc9\x1b\x9e\x36\x65\xcd\xe2\x1c\xf5\xfa\x95\x6a\x71\xb0\x75\x11\xa7\xeb\x77\x33\x89\xb6\x8d\x69\x6f\x30\xe1\xb6\x67\x58\x0e\xee\x9d\xf0\x8b\x2b\x27\x7b\xf6\xb2\xa7\x24\x79\x88\x94\x04\xee\x18\x43\x6f\x8c\x37\xe9\xe1\xe2\x46\x25\x46\xec\xbf\x6b\x7f\x8e\x11\xeb\x4b\x64\xdc\xa0\x3d\x03\xe0\xbb\xb9\x4c\xdb\xb9\xdd\x8b\x32\x6e\xff\xf3\x6d\x9e\x33\xc4\x7f\x99\xbd\x1b\x37\xe6\x41\xcb\x2b\xde\x10\xa0\xd0\x0c\x6e\x07\xd4\x72\x8a\xb1\x32\x82\x2a\xfe\x04\x06\x8e\x2d\x14\x2b\x7e\x68\xba\xb0\x55\xf8\xf1\xda\x2b\xb7\xa1\xfb\xb0\xd4\xc6\xb0\x77\xde\xee\xb7\xb4\x11\x36\x50\xeb\xae\x2a\xf9\x9d\xfa\x3b\x29\x18\xa4\xdd\xfe\x40\x4b\xc6\x9b\xf7\x3a\x52\xa3\x1f\xf9\xce\xf1\x70\x25\x62\x4f\x1b\x8b\xb4\xb7\xd2\xab\xe8\xa5\xb8\x31\xc2\xa9\xd7\x4c\xd5\xe2\x77\xb2\xda\x22\x52\x63\x7e\x73\xbe\x58\xad\x78\x5b\xaa\x38\x28\xd8\x1e\xaa\x7f\xc1\xd1\x1b\x9f\x3e\xda\xac\xb6\xf2\x19\xe9\x78\xa8\x07\x77\x50\x02\x99\x55\x6b\x23\x2d\x4b\xe6\xeb\xa2\x3b\xee\xd9\x24\xa3\x94\x1c\xaf\x8e\x9c\x27\x94\x9e\x0e\xf3\x88\xfb\x19\x0e\xc2\x74\xda\x7a\x99\x61\x11\xb9\x17\xee\x24\x77\x51\x16\xf1\xcb\xfa\x3a\x65\x54\x98\x49\xca\x2d\x57\xad\xc1\x63\x38\x09\x38\xe0\x0a\x7d\x1b\xb1\xbe\xeb\x61\x9c\xf8\x35\xa9\xa9\x71\x0b\x7a\x9f\xb2\xae\xc8\x4e\x85\xc8\x0d\x39\x8a\x67\x48\xea\x23\x9c\x16\x96\xfd\x4f\x45\xb7\x64\xfa\xa5\xe3\x94\xb0\x81\x96\x4a\x0c\x53\xee\xbe\xbc\x35\xde\x1d\xb6\xb4\x20\x67\xcb\xa3\x16\x87\xa7\x84\x92\x35\x6f\xef\xe0\x81\x5d\x53\xb1\xbd\x22\xaf\x9f\x9d\xbf\x7e\x36\x51\x7a\xb7\x64\x27\x91\xaf\x58\x50\xca\x79\x0b\x67\xf3\x97\xa9\xd0\x0b\xd9\x00\xda\x79\x74\x2a\x0a\x64\x17\xa0\xfb\x85\xf4\x6b\xf2\x8d\x09\x99\x1f\xea\xaa\x51\xf1\x0a\x9d\x3b\x43\x93\xad\x2c\x70\x7b\xcb\x8f\xc9\x37\x88\x39\xe5\x54\x24\x65\x60\x10\x33\xfe\x80\xae\x09\x30\xae\x95\x31\x09\x7c\xfb\xf5\x67\xc5\xc5\x05\xd9\xd2\xd5\x0d\x2a\xed\x95\x5f\xff\x16\x05\xbe\xed\x71\x0f\x33\xbb\x31\x73\x54\xfe\x39\xee\x7e\x2d\x0f\x55\xad\x4d\x02\x52\x76\xe6\x87\x4e\xa3\x70\xcc\x60\xbb\x17\x7a\x7d\x17\x41\x5a\x69\xb2\x51\x4e\xc8\x02\x60\x4a\xf1\x47\xd5\xd2\xfb\x28\x86\xbf\x0f\xcb\x19\x6d\x34\x3e\xed\x59\xcb\x96\x47\x6d\xe2\x41\x75\xe6\x22\x50\xd7\x2e\x66\xd8\x9e\xa6\x3e\x4e\xba\xb6\x5a\xdd\x90\x6f\xbf\x26\x55\xd3\x71\x93\x63\x44\x47\x17\x98\x79\x82\xb1\x63\x53\xa9\xc8\xf1\x60\xdc\x54\xaf\x9f\x29\xae\x47\xd4\x90\x6a\x07\x17\x5f\xc7\xea\xa3\xf6\xbf\xaf\x10\x7c\x35\x26\xd8\x2b\xd0\x35\x87\xe4\x17\x69\x9c\x4d\x2f\x36\xb2\x77\x40\xc4\x68\x78\x51\x1e\xf6\x75\xb5\xa2\x1d\x2b\x0c\xa8\xee\x93\x06\x11\x25\xeb\x08\xec\xea\x09\x8a\x8d\x2c\xb8\x96\xb9\xee\xe9\xa6\x6a\x30\x8e\x2c\xc3\x5c\x0d\xeb\x01\xee\x75\x68\x60\xba\xe5\xd9\xa4\x8f\x2f\x59\xf6\xb3\xa7\x1b\xe6\x68\xe4\x87\x8c\xbf\x29\x54\x16\x3b\x44\x97\x7f\x27\x7e\xbd\x4f\x29\x05\x9d\x72\xd1\x55\xe3\x43\x59\x3b\x25\x73\x38\xe6\x4e\x11\xbb\x98\x4f\x81\x82\x49\xb2\x7f\x77\xc8\x01\x06\x7a\x66\x36\x5a\x25\x1d\x7f\xf6\x15\xd3\x40\x61\x9a\x50\x82\x74\x0d\xc9\x59\xc6\x3e\x27\x79\x7a\x1c\x9a\x8b\x02\x0b\xc9\x80\x5f\xc4\x05\x33\x0e\x19\x01\x58\x73\x84\x8c\x6e\xd0\x9b\xdd\x26\x0d\x60\xb0\x39\xbd\x41\x8e\x87\xa8\x6c\x9c\xe2\xc1\x21\x68\x7b\xc9\x25\xcd\x22\x21\xd5\xf7\x3c\xfc\xfb\x9e\x6d\xcf\x7b\x8d\xc9\x69\x43\x43\xaa\xeb\xde\x87\xfd\xf3\x41\x8b\xb5\x61\x30\x71\xdb\xd1\xe2\x27\x76\x73\x1c\xb2\x45\x5c\x61\x04\xa1\x0c\x40\xa4\x38\x1e\x51\xf1\xd0\x13\xcd\x9d\x0a\x87\x04\x06\xc3\xaa\xa9\x78\x43\x3b\x56\x5e\xe9\x5b\x46\xde\x53\xaf\x9f\xc9\x9b\xfb\xf5\x33\x05\x99\x04\xd8\x59\x1a\x83\xa7\x3e\xc2\xd5\x6d\x87\xe4\x83\x2b\x39\x6e\xc0\xfd\xeb\x14\xa3\x8d\xe5\x57\xca\x96\x4d\xac\x95\xff\xf0\x79\x55\xfd\xa4\xc2\x89\x34\xbd\x1b\xae\xb8\x09\x74\xe3\xce\x37\x14\x7d\x53\xac\xba\xa8\x37\xd3\x34\xbb\xc6\x2f\x6e\xb2\x9c\xa9\x9f\x7f\x35\xac\xe9\x91\xaa\x9b\x5b\xc7\x1d\xa5\xd8\x3d\x6a\x94\x62\x97\x1b\x25\x7c\x71\x13\x1a\x05\xa3\x0c\x6b\xfa\xa3\x34\xf9\x8f\x10\xd9\xe3\x8f\xa6\x9c\x1c\xf7\x7f\x20\xe4\x7b\x62\x84\x6a\x58\xd0\xb2\x1a\x88\x3b\x0a\x7f\x08\x53\x12\x9c\x62\xa5\x3d\x88\x88\xde\xbd\x54\x9d\x9b\xd4\x0f\xd9\x48\xbd\x69\x82\x87\x4c\x78\x75\x86\xf7\xa5\xf6\x6c\x0b\x98\x65\xd6\xed\x27\xc5\xb5\x1e\xc3\x1b\x7d\x85\x4b\x9a\x43\x8e\xed\x6d\x04\x97\xcc\xba\xc1\xa5\x80\xf6\x4c\xf0\x31\x47\x48\x2e\x0c\x97\x6e\x94\xa7\xc1\x14\x19\x12\xd9\xf1\xb2\x5a\x57\xac\xf5\xc2\xfc\x16\xf0\x6d\x61\xe0\x51\x16\x21\x63\x58\x60\x24\xff\x92\x96\x3a\x3f\xc3\x60\xb4\xb9\x94\x10\x65\x71\xef\x4d\xec\xfd\x90\x0f\xb6\xc5\x72\xbd\xa9\x37\x9d\x22\xb9\xcc\x31\x17\x56\x7a\x8a\xa1\x7c\xd2\xf8\x0a\x71\xa4\xe7\x92\x0a\x66\xee\xf4\xec\x2b\x19\x06\xd3\x97\xde\xc5\x05\x52\xc4\xd2\x3e\x82\x22\x14\xa6\x5d\xd1\x72\xde\x11\xfa\xce\xc3\xbb\x6f\x22\xcb\x7e\xc6\xa7\xb2\x4f\x5e\x0a\x1e\x81\x5f\xef\xf6\xdd\x91\x40\xf7\x36\x96\x1a\xee\x83\x1d\x55\xba\x2f\xbc\xf6\x19\x14\xec\x83\x1c\xd2\x56\xef\xff\xe7\x20\x1f\x59\xeb\xea\x1e\x5f\x8b\xd8\x74\xd5\xa8\x08\x64\x21\x69\xa6\x6b\x88\x4b\x38\x19\x09\x1d\xdd\x81\xd0\x47\x49\x37\xfe\xc7\xaa\xae\x55\x9b\x86\xca\x01\x7d\x0c\x14\x76\x18\xd2\xae\xed\x10\x0a\x43\xd2\x90\x37\x44\x76\x41\xba\x5d\x72\xfb\xe1\x7b\x42\x35\xe3\x90\x31\xb8\x03\xf8\x69\xd3\x5b\x8f\xb6\xe4\xf7\x80\x56\x43\x7d\x43\xae\x5c\x3f\x9d\x40\x85\xb4\x36\x05\x95\xb6\xf0\x82\x33\x3a\x5c\x7d\x82\x1d\x9c\x22\x72\x26\x99\x0b\x2b\xf5\x82\x6f\x58\x07\x5e\xef\xac\x25\xbc\x21\x28\x85\x23\xf8\x86\x8a\xf1\x82\x43\xec\x25\xd4\x82\x90\x1c\x3c\xdc\x5a\x17\x8c\xa3\x7b\xe7\x01\x4b\xc7\x04\x88\xdf\x15\xd4\xd7\x19\xb6\x35\xf1\x9f\x7b\xea\xbe\x09\x4a\x2e\x37\x8a\x5e\x95\xe0\x00\xff\x53\x1c\xab\xbf\xc3\xa7\xac\x92\x6a\xf3\xa4\x73\x91\xef\x2b\x2d\xf9\xc0\xfa\xc9\xd3\xb9\x99\x92\x8b\xf9\xaf\x12\x3a\x4e\xe8\x62\xaa\x61\x07\xbd\x47\x42\x22\x69\xac\x2f\xff\xab\xfc\x8d\x9a\x6b\xc9\x07\x00\x3e\xac\xda\xcd\x92\x62\xa7\xb3\xcb\x49\x5a\x3f\xf9\xb7\xc3\x6e\xc9\xbb\x56\xbf\xa0\x2d\x7f\x35\x1f\x34\xf9\x91\xb3\xc4\x6f\xef\x9b\x96\x43\xcd\x63\x54\xd6\x7b\x8b\xda\xaf\xbd\xbe\x4d\xb6\xd8\x90\x2a\x31\x21\x5c\x9d\x62\x47\x30\xf3\x4e\x4f\xf2\xc5\x24\x37\x21\xf3\xb4\xb2\x9f\x9d\x70\xca\x64\xc0\x75\x2a\xd0\xba\x4f\x01\x3d\xe8\x9e\x4e\x6b\xd6\xf6\x27\x37\xb4\xdb\x0a\x65\xdd\x6b\xd3\xff\x21\xad\x45\xc6\x32\xb1\x02\xd9\xbc\xec\xb1\xc0\x08\x98\xd1\xdc\xfe\x79\x0d\xc4\x7c\xeb\x77\x8c\x96\xa0\x29\x95\x17\x41\x4d\xdb\x0d\x6b\x09\x54\x11\x7a\xfa\xa0\xd2\x37\x99\x4f\xe5\x4b\x00\x1d\x94\xd1\x65\x56\xfb\x11\xaf\x78\xb3\xae\xab\x55\x07\x48\x05\x60\x46\x91\x55\x9e\xab\xba\x02\xe9\xce\xa1\x53\xeb\xf8\x6d\xae\x0d\x05\x17\x07\x12\x0e\x0e\x07\x22\x84\xc0\xdd\x77\x47\xbb\xd5\x36\x1c\x98\x15\xd5\x7c\x21\xc3\x7e\x0d\x24\x0d\xeb\x82\xf3\x9b\x4a\xec\x2a\x74\x0b\x36\xad\x2a\x3a\xf8\x5a\x01\xd2\x6d\x19\xfa\x75\xe9\x2d\x06\x15\x22\x5d\x81\xed\xcb\x78\xfe\x42\x2a\x62\x75\x6d\xbe\x27\x0c\x91\x54\xcd\x66\x66\x09\x48\x3e\xb3\x4c\x6f\xc9\xab\x0b\x9a\xb1\x92\x13\xf9\x20\xa2\x1e\x79\x54\x2c\xb8\xdb\x17\xe5\xdf\x0e\xa2\x53\xbd\xc3\x32\x58\x78\x3e\x42\x66\xf8\xfb\x53\x12\xcd\x45\x4a\xa0\x13\xe9\x3c\xb1\xcf\x41\x8c\xe9\x17\x75\xc7\xda\x06\x10\x2e\x9c\x33\xe7\x22\x5f\x58\x29\x38\x2d\xfe\x42\x0f\xf0\x2a\x45\x27\x79\x39\x8c\x93\x6f\x4f\x1c\x7c\xfe\xf6\xc4\xef\xfa\x4e\x74\x1a\x28\x6a\x76\xcb\xea\x33\xd3\x8b\x3a\x67\x1b\xfc\x7d\x32\x25\xc3\x65\xf5\xf3\x65\x64\x79\xe7\xd3\x24\x7d\x81\xfb\x83\x7d\x6e\xd9\xbe\x79\x09\x4e\xd5\xb2\xf8\x37\xfb\xf3\x44\xf0\x88\x97\x22\xc1\xb6\x34\x71\x1d\x37\xcd\x9d\xaf\xb3\x47\x40\xa0\x4c\x22\x06\x20\xba\xad\xd5\x60\x2e\x7f\xe5\x87\x3c\x85\xe7\xda\x8c\x50\x57\x54\x2b\x62\x6e\x7a\xf7\x71\xa5\x90\xaf\x09\x6d\xaa\x1d\x6a\x57\xab\xb5\x23\xc1\xa3\xb7\xbf\xd6\x78\xbc\x6e\x5c\xb7\x18\xb7\x14\x6a\x09\x6e\xd8\x71\xdd\xd2\x1d\x13\x64\xdf\xf2\x4d\xcb\x84\x28\x96\xb4\x2d\x44\xd7\x56\x7b\x0b\x58\x08\xa0\x53\x0f\xee\xfd\x6a\x4f\xdb\x73\x53\x51\x25\x49\x98\x9b\x3c\x68\x1d\xcf\x55\x9a\x9b\x52\x56\xb3\xa8\x9a\xc9\x29\xe2\xad\xa2\xda\xef\x2f\x9d\xfc\x13\x90\x1c\x79\xbb\x8a\xbc\x85\xc8\xf2\x48\x56\x2d\x47\xa0\xe8\xaa\x8b\x9e\x65\xf3\xec\xb3\xcf\xf4\x1b\xbc\xfc\x52\x6a\x2a\xb3\x96\xfd\x42\x87\x2d\x37\x32\xf7\xa6\x53\xc1\x4d\x2b\xe1\xaf\x60\x61\xf0\x41\x4f\x8a\x2a\x8b\xa0\x3d\x9c\xf7\x68\x32\xb9\x6a\x3c\x5b\xda\x86\x86\x81\xf1\x4f\xdb\xde\x65\xa4\x6d\xb4\x94\xee\x9b\xd5\x2b\x18\x81\xff\x07\x4b\xa3\x88\xbb\x0c\xf4\x64\x86\x11\xa8\xcf\x67\xd1\xee\xca\x2d\x4f\xd0\x7b\x82\x20\xa1\xd3\xde\x83\xe7\x8f\x08\x8f\xb2\xf5\x57\x33\x47\x3b\x5c\x04\xf3\xa1\xe8\xaa\x9d\xa4\xe0\xd4\xa9\x75\x42\x81\xed\x08\xf6\x2d\x5b\xb3\x56\x14\x2d\x2b\x0f\x2b\x56\x16\x3b\x0e\xcd\xa0\x54\xfb\xf7\x03\x6b\x8f\x8e\xc6\x1c\x7e\x25\x67\xe9\x3a\x52\x32\x94\x7f\x7b\x1e\x58\xce\x88\x3d\x18\x86\xa4\x86\x68\x86\xed\x67\x48\xd4\xc3\x63\xf3\xe0\x65\x70\x2f\x95\x20\x6e\x02\xab\x94\x5b\xe2\x40\xa2\x87\xaf\x11\xbd\xeb\x80\xbc\x93\x37\xe4\xf3\x43\xfd\x72\x4a\x3e\xe7\xf2\xbf\x79\x4b\x3e\x2f\xab\xdb\x97\x28\xcc\x84\x71\x7e\x27\x9c\x22\x25\xb7\x7c\xc7\x0d\xd4\xac\x60\x5d\xec\xf8\xa0\x70\xc2\x9d\x9e\x50\x4d\x58\x09\x34\x01\x12\xb8\xfd\x52\xa2\x3e\xc2\xa9\x39\x99\x3f\x8d\xd7\xf9\xa1\x06\xc9\x8d\xd7\x59\x3c\xc9\x1c\x17\x72\x46\xd1\xe3\xcd\xfd\xad\x3c\xc1\xca\x14\x22\x6b\x10\xd8\x21\x17\x2b\x95\xa0\x2b\x90\x5c\x4d\x05\xf1\x66\xb2\x85\x56\x8d\xe8\x18\x2d\x01\xde\xab\xae\x54\x5e\x8c\xb2\xba\x5d\x08\x07\x11\xb9\xb2\x3d\x40\x93\xb6\x97\x19\xf9\x16\x87\x8e\x16\x7a\x50\xad\x18\x74\xea\x40\x6a\x42\xe0\x0e\xb0\x35\xb3\x52\x55\x0f\xb6\x15\x7d\x1d\xe8\xca\xda\x7d\x43\xb7\xa9\x6f\x20\x6f\x07\xce\xe2\xe5\x42\x90\x33\x9c\x9a\x90\xab\xcd\x77\x0c\xd1\xd2\xac\x83\x08\xe9\xb6\xfc\xb0\xd9\x4e\x5c\xae\xe8\x74\x87\x3d\x65\x58\xa3\x96\x1c\x7b\xbb\x55\x85\x26\x86\xc2\x7e\x07\xa6\x4c\x85\x33\x38\xa4\x6e\x70\x92\x70\x43\x22\x05\xd0\x3b\x41\xc9\x73\xd4\x13\xc0\x2a\x59\x84\xfa\xaa\x25\x52\x88\x37\xef\x25\xf4\xc7\xd0\x60\xfa\x92\x90\x55\xca\xd9\xbe\xd9\x3e\xd9\x76\xea\x34\xe9\xd9\x4e\x8d\x21\x34\x6d\xf8\x8f\x47\x32\xce\x04\x97\xad\x97\xc0\x97\x27\xdf\x36\xe0\xd0\x22\x65\xf6\xcc\x59\xe0\x4d\x44\xe9\xca\xa3\x1b\x91\x35\x9d\x88\x56\x8b\xae\x19\x53\xe9\xe3\xfd\x06\x42\x72\x77\x5e\x32\xb9\x4f\x7e\xf0\x98\x53\xea\x67\xb4\xf6\xbb\xcc\x27\xb0\xf6\xc7\x7c\xc9\xb3\xf6\xc7\x9f\x4f\x0e\xd8\x73\x5c\xfd\xf4\x09\xf3\x49\x6c\x38\x94\xcd\x77\x3e\x4c\xb6\x62\xec\xb0\xd3\x74\xe2\xaa\xc4\x52\x9c\x6a\x8b\xed\x5f\xd8\xd0\x54\xea\x38\x5e\x99\xc9\x74\x5b\x8c\x99\x06\x83\xcb\xe7\x54\x72\x1f\x79\x9d\x38\xdc\x28\xe5\x6d\xe3\xbc\x9f\x2d\x67\x51\x45\xde\x3a\x53\x39\xf9\x0c\xf7\x98\xd1\x13\x25\x73\x66\x74\xf2\x01\x79\x37\xf1\xd4\x73\xa2\xe4\xb5\xd2\x35\x44\xf8\xf0\x63\x89\x33\xe4\x7c\x9d\x0f\xfe\x1f\xa8\x12\x03\x5a\xfd\x8e\xb7\xd5\x4f\xbc\xe9\x68\x6d\x35\xf4\xe0\xea\x8b\xe8\xfe\xf4\xc8\x0f\x90\xc4\x0a\x78\x16\x4a\x38\xb8\x4b\xf0\xc0\xd3\xc6\x25\x72\xa6\xae\xb5\x09\xa4\xef\x36\x6d\xba\x4a\x87\x13\x11\x33\xfb\x51\x08\x13\x08\x95\x79\x8c\xcc\x41\x88\x4d\xe5\x09\xe2\x5d\x1f\x7a\x0a\x09\xf8\xcc\x7e\x40\xc2\x97\x24\xcd\x91\x75\x58\x42\xd2\x9e\xdb\xc3\x27\x3c\x23\x6e\x9f\xe0\x95\x6f\x29\x0c\xfc\x70\x9d\x8c\xa3\xb0\x89\x94\x01\x78\x54\xa3\x8f\x1c\x5c\x62\x9a\x3d\xc3\x8b\x4e\x4c\x9c\xfd\x34\x53\xf5\x83\xde\x7d\x79\xc4\x61\x8a\xc2\x90\xe2\x03\xde\x37\xe8\xc8\xf1\x6e\x4c\x6f\xc9\xfe\x46\xd5\x3c\x25\xd8\x82\x7c\x53\x1f\xc4\x36\x25\xa7\xa8\x8c\x46\x0a\x14\x03\xf8\xbd\x1f\x82\xdd\x71\x72\xc3\xd8\x3e\xe6\x17\x0c\x6c\xc4\xbc\x90\xff\x3b\x23\x7f\xe0\x02\x93\xad\x1c\x04\x5b\x1f\x6a\x2d\xe8\x20\x2c\xb2\x49\xa4\x27\xc8\x19\x9b\x6d\x66\x53\xc0\xb4\x10\x93\x48\xdc\x59\xc3\x30\x1f\x86\x8c\x19\x11\x32\x87\xb7\xfb\x7e\x2a\x4f\xb0\x6a\xe5\xd7\xb3\xcf\x4b\xa2\x17\x12\x25\x5e\xe3\xd0\x10\xea\x66\xaf\xf9\xa2\x2c\x63\xcd\xae\x7c\xf6\x28\xd6\xcc\xee\x3b\x5c\x7b\x73\xa1\x29\x6f\x08\xde\x90\xca\x0a\x9a\xfa\x29\x73\x7e\x4e\xbe\x6f\x37\xb4\xa9\x7e\xa2\x08\xd7\x50\x1f\xa7\x18\x60\xbc\x03\x65\xb9\x7c\x9f\xd0\x75\xc7\x50\x73\xbf\x40\x7b\xeb\x02\xdf\x0a\xe2\x54\xc5\xb1\xef\xfe\xea\xc8\x8c\x46\xfb\xaa\x5a\xc9\xab\x75\x8b\xcf\x7a\xb5\xbe\x1f\x4f\x3c\x0f\xa1\xdf\x4b\x52\xfb\xad\x8a\x1b\x35\x2e\x42\xd9\xde\x61\x56\x53\xe2\xeb\x80\x5d\xd5\x6f\xf4\xec\x7b\xe7\x01\x2b\xbd\x09\xc5\xaf\x01\xd9\xc2\xfe\xe4\xdc\xf8\x7d\x6f\xca\xd3\x20\xa7\x7c\x77\xfa\x5e\x13\xb0\x33\xd5\xcb\x5f\x4d\xd2\x60\x68\x31\x8f\xd2\x1d\x81\xfe\xad\xb7\xa3\x78\x2c\xbe\xec\x34\x02\x0a\xcb\x35\xcd\xa8\x20\x86\xd6\x28\x6b\x53\xca\xd5\xc0\x32\x94\xf2\xa9\x71\x8a\xf4\xfb\xd4\x98\x71\x42\x85\xe0\xed\x62\x5c\x5e\xf1\xab\xf3\x1b\x2a\x3a\xf7\x74\x55\x75\xc7\x2b\x44\x4f\x50\x52\xb2\x09\x91\xfe\x9c\xbe\x7c\x4f\xe0\x5e\x26\xe0\xeb\x03\xc4\x96\xdc\x30\xc6\x38\xb5\x63\xc4\x92\x96\xdb\x27\xf0\xa7\x79\x46\x4c\xc6\x3a\x19\xd8\xc9\x7c\x72\x79\x9d\xc6\x28\xfc\xa2\x2c\x2b\x05\xfa\xe2\xe4\x29\x5a\x5b\x15\xce\x2d\x6b\x85\x4e\x87\x55\x7d\xff\x4a\x67\x59\xc1\x30\x07\x5f\xcd\xe3\x6a\x79\x68\xa3\xb5\x41\x1d\xdd\x20\xd3\xfa\x76\x4d\x8e\xfc\x40\xee\xa8\x4a\x72\xa1\xbe\xab\x0e\xa6\xa4\xea\x6c\xe3\x8b\x6d\xcb\xd6\xbf\x7e\xfd\xec\x9d\xd7\xcf\x16\x58\xdb\x85\x38\x2b\x25\x03\x91\x83\x9d\xed\xf8\x4f\x55\x5d\xd3\x19\x6f\x37\xe7\xac\x29\xfe\xfc\xea\xbc\xe4\x2b\x71\xfe\x23\x5b\x9e\x7f\x0d\xaf\xa4\xf3\x55\x5d\xad\x6e\xde\x79\x45\xd7\xb4\xad\xfe\xfb\x0f\x7c\x59\xc9\x4d\x83\x16\xfb\x02\x17\x74\xac\x42\xd1\xf0\xe2\xef\x07\x5a\x57\xeb\x23\xa4\x28\x39\xee\xd9\xeb\x06\x67\xed\x92\xb8\x79\x75\xcf\x47\x24\x57\x70\xdf\xb8\x73\xc7\x30\xfc\xcd\xa1\x3b\xb4\xac\xd8\xb7\x9c\xaf\x95\xfd\x46\x85\xf2\xc0\x1c\x04\xa8\x14\xe4\xcb\xcc\xa8\xd5\x9e\x3a\x11\x8a\x73\x08\x90\x13\x33\xcf\x4c\x75\xb0\x3b\x4e\x45\x67\x6c\xe4\x26\x27\x27\x3c\x20\x10\x61\x03\xd3\x92\x90\x6f\xbf\xbe\xb8\x98\x9a\xfc\x18\x14\xc1\x87\x0d\x6c\xb2\x85\x8d\x3a\x01\x81\xe3\xd3\x0f\x3f\xba\x08\xd3\x8d\x3c\x87\x01\x59\xd0\xe6\x6b\x9d\x9e\x40\x8b\x53\xa9\xef\x29\x0e\x84\xe5\x02\x0e\xa4\xcf\x30\x7e\xec\xf5\x34\xc1\x22\xe1\x87\x34\x02\x9e\xcd\x66\x13\x40\xe0\xa9\x46\x12\xda\x0e\xef\x8b\xd3\xb4\xeb\xc5\xaf\xcb\xdc\x27\x39\x5a\xbf\x12\xd8\x6b\xdf\x87\xcd\xcb\x47\xce\x87\x6e\x1e\xd8\x88\xaf\x4e\x32\x5a\x10\xb1\xe5\x77\xc6\xbf\xc2\x19\xd7\x45\x5c\xac\x27\x4f\x60\xbe\xe2\x56\x72\xe8\x41\xaf\x40\x24\x60\x2f\x7e\x73\xc0\x04\xe1\xd8\xae\xac\x76\xcd\x9f\xe9\x31\x3d\x75\x9f\x34\x14\xce\xcf\x08\x22\x52\x25\x9f\x42\x4b\xe1\x9e\xe4\x49\x4a\x77\x36\x04\xaf\xe8\xe8\xca\xc4\x61\xd9\xb5\x74\xd5\x25\xa9\x66\x9a\xea\x72\x62\x4d\x71\xfa\xa3\x36\xdf\xe4\xd6\x54\xa5\x9a\xdf\xef\xeb\xa3\x14\x96\x41\x43\x65\x34\x14\x52\x5c\xde\x3a\xca\x0e\x23\x3e\xce\x76\xbc\xa4\x75\xc1\xf7\x4c\xdd\x81\x05\x81\xae\xac\x69\xe0\xa6\xaa\x4d\x12\x1f\x04\x5d\x07\x26\x8a\x15\x9d\xa7\x59\x61\x99\x15\xd8\x71\x10\x9f\x1d\x9f\x36\x4e\x8d\xa2\xac\x68\xcd\x37\x58\xc3\xf1\x8b\x21\x62\xcb\xea\xda\x38\xd0\xd0\x95\x76\xf0\xa0\x6e\x7f\x26\xa3\xa6\xac\xed\x96\x21\x77\xe7\x64\x89\xbe\x38\xda\x70\x2d\xff\x2d\xba\xc3\x7a\x8d\x8f\x0e\x77\xa6\x9a\x1d\xff\x57\x55\xd7\xce\xc4\x74\x1e\x27\xb9\x02\x19\x2b\x2e\x88\xc8\xd8\x63\x10\xad\x5d\xdc\x7b\xc6\xde\x64\x16\x17\x4f\x94\xf8\xca\x2e\xd7\x96\xe2\x15\x8f\x0d\xe3\x60\x84\x59\x3b\xb7\x3f\xab\xd9\x86\x1c\x98\x21\xe2\x94\xeb\xe1\x66\x74\x8d\xcf\x7f\x82\x7f\x14\xd0\x8c\xaf\x08\x37\xc7\xdd\x35\xe8\x78\x49\x73\xf4\x0f\x49\x8b\xb6\xbd\xd1\xc8\x57\xdb\x56\x3e\xa4\x78\x43\x7e\xac\x9a\x92\xdf\xe9\xcc\x5b\xca\x47\xca\xcf\x31\x3d\x03\xcb\x4d\xc9\x3a\x5a\xd5\x62\x4a\x04\x63\xaa\xb5\x91\x88\x88\x17\xf3\xcf\x2e\x2f\x20\x38\x33\x70\xd4\x3c\x3f\x27\x3f\x32\x52\xb2\xba\x5a\x82\xb3\x50\x7d\x24\x25\x44\xf4\x43\xc6\xb9\xe2\x8e\x2d\x6f\xaa\xae\x30\x3b\x83\x2b\x0d\xa7\xa9\xe3\x87\xd5\xf6\x7a\x41\x4a\x44\xdb\xa4\xaa\xb5\x4d\x43\xdb\xfa\x08\x92\x1c\xca\x44\x64\x79\xd8\x58\x50\x98\xe5\x61\x23\x66\xd8\x2a\xc8\x54\x92\x19\xff\xf7\xf2\xb0\x99\xad\x36\xd5\xbf\x57\xe5\xaf\x2f\x2e\x3f\xfd\xf0\xa3\x17\xce\xe5\x4d\x6b\xc1\xc7\xdf\xe0\x17\x9f\x7c\xfc\xd9\xa5\xa5\x98\x57\x70\x44\xca\xea\x16\x3c\xec\x14\x25\x38\x84\x03\x5e\xd3\x0a\x96\x4a\xb1\x05\x43\xf7\xea\xd8\xf5\x99\x47\x14\x0d\x18\x5a\xc5\xdb\xea\x8a\x3c\x77\x5b\x70\xa1\x23\x4c\x52\x54\x25\x70\xc9\x51\x49\xb6\xd1\x6d\x5b\x7e\xd8\x6c\xd1\x1b\x0b\xd3\xc7\x41\x09\x8c\x4f\x06\x66\xc2\x95\x93\x9a\x3a\xe0\x59\x29\x4a\x6f\xaa\x14\x8b\xd6\xe8\x6f\x58\x39\x53\x9e\x2a\x43\x3a\x64\x97\x92\x5c\xa7\x96\x97\x5a\xc9\xef\x9c\x83\x3a\x5b\xd3\x92\x59\x95\x74\xd2\x21\x02\x67\xe8\x7b\x42\xc0\xcb\x43\xfe\xb2\xe6\xed\xce\xac\x82\x6c\xac\x30\x3f\xdb\xc8\x5e\xd5\x17\xdc\xc6\xa6\xaf\xb8\xba\xfc\x1e\x57\x77\x67\xd9\xb5\x47\x77\x85\xec\x0c\xf1\x04\x01\x6b\xa5\xf8\x92\x52\x7d\xaa\x96\x31\x99\x6e\x5f\xdf\xb2\x5e\xdc\xf9\x1b\x87\x3b\xaa\x3d\xc6\x73\x41\x8d\x5f\xa2\x7f\xe3\x63\x04\xfa\xc5\xfc\xfc\xe2\x22\xcc\x6d\x65\x6e\x3a\xc9\x37\xa6\x49\xca\x01\xe7\x5e\x8f\x93\xfa\x69\x92\xf3\x0d\xde\x6e\xfb\x5a\x0c\x46\x95\xe1\x58\x6f\xbc\x8e\xf1\x2e\x9f\x3a\xbf\xf8\xc8\x30\x01\x0e\x5e\xdc\x80\xbd\x96\x07\xf8\xbd\xbf\xbe\x28\x22\xb1\xf2\x54\x79\xca\x05\x80\x3d\x71\xa9\x01\x4e\x17\x32\x04\x2e\x92\x43\x59\x10\x4c\xd5\x82\x0f\x55\x48\x2d\xa8\xfc\x75\x54\xf0\xd1\x6d\xc5\xee\xc8\x99\x5a\xe1\x09\xca\xb9\x41\xf0\x79\x20\x7e\xea\x1d\xc1\x8f\xa7\xef\xa8\x5f\x4f\xce\x5d\x11\x8a\x82\x11\x14\xac\xd3\x63\xec\x38\x99\x13\x76\xbf\x62\xfb\x4e\x5e\x41\x08\xb3\x9b\xca\xe6\xf6\x26\x5a\x0d\x67\x27\x17\x90\xd1\x5b\xa8\x0b\x78\x49\xdb\x60\xbe\xfd\x87\xa4\xd7\x59\xac\xdf\x5d\x2c\xba\x6f\x95\x4d\x26\x79\x3c\xfc\x03\xe2\xc7\x07\x65\x91\x31\x4c\xaf\x89\x78\x22\xa3\xdb\xf0\x64\xae\x54\xe7\x6f\x03\x8c\x3d\x74\x1d\x09\xf6\x41\xf5\x97\x20\x47\x94\xc5\x15\x35\xa2\x6e\xc0\xd4\xc2\x2d\xd1\x00\x77\xe0\x8b\x0d\xae\x31\x58\x36\x75\xb5\xe8\x6b\xc4\x6b\xc0\x7d\x84\x78\xc3\x71\xe4\xfc\xb0\x35\x73\xd4\x13\xcf\x13\xbf\x8d\x1c\xbe\x7b\xf6\x75\x1b\x54\x4f\x3c\x49\x92\x25\x86\x21\xdf\x93\xd5\x06\x9d\x29\xc3\x5a\xfa\x4b\x71\xaf\x6a\x59\x13\x89\x27\xed\xa1\x24\x28\x05\x6f\x56\xda\x0b\xdf\x93\xdc\x34\x09\xfe\x01\xe4\x18\x2f\xdb\x87\x3a\x9e\x74\x75\x53\xb6\x1a\xcd\xf3\xc9\x52\xb0\x69\x2f\x20\xc9\xdb\xbb\x50\xfa\xbd\xdd\xf6\x6f\xae\x6e\xa8\x30\x01\x4e\xe7\xe7\xe4\x1b\x5a\x32\x15\x42\x87\x5f\x91\x7d\x80\x20\xf2\xe0\x6a\x18\x54\x64\xbe\x7a\xc4\xdb\x2f\x61\xe3\xea\xc3\xb5\x7b\x5c\x71\xad\xf0\x0a\x83\x1f\x7e\xe0\x7b\x22\xf0\xc4\xe9\x63\x62\xde\x46\x88\xd8\x2d\x9f\x44\x2a\xe8\xc0\xac\xec\x09\x2f\x7b\xc7\xb9\x10\x90\x4c\xb8\x1b\xeb\xd0\x35\x3a\x53\xad\xe8\xe4\x7f\x2b\xc9\xf4\xb0\xdf\xb3\x56\x45\x4c\xe0\xcb\x6c\x64\xee\xfb\x3f\x1e\x3a\x35\x7c\x35\x42\xe3\x1c\x77\x16\x4d\x66\x22\x7b\xe3\x7b\x20\x0b\x46\x24\xdb\xf0\x5f\xca\xee\x4c\xbd\x60\xa2\xf0\xf1\xef\x15\xcc\x1f\xb8\x47\xe8\x00\x82\xd3\x93\x01\x83\x4d\x84\x69\x0c\x4f\x02\x05\xf1\x43\xc7\xf5\x9a\x4b\xfa\x57\xde\xdc\x90\x7f\x44\x41\xd8\xe3\x26\x48\xbe\x85\x6a\x46\x40\xe2\x21\x95\x20\x0d\xd7\x6c\x10\x56\xd6\xd5\x55\x5d\x91\xb3\x22\xd9\x73\x71\x9c\x64\x3f\xdd\x4f\xfa\x6a\xa5\xde\xc2\x3f\xc0\x8e\x82\x65\x4f\x19\x43\x35\x5d\xbb\x03\xcb\x22\xc3\x87\x01\xe6\x4e\x9d\x00\x9c\x25\x60\x34\xf0\xd0\x47\xc9\x1b\x20\xff\xb5\x36\x41\xdf\x7a\x2d\x13\x55\xc9\x04\x39\x53\xae\x38\xf2\x5c\xf9\xe7\x46\x52\xa1\x27\x3b\x4e\x2c\xcf\xb2\x3a\x9b\xf4\xbd\x99\x4d\x71\xa0\xb3\x19\x68\x65\x84\x4e\x65\x90\x4f\x62\xa0\x81\x9c\xec\xbe\x8a\x2d\x3f\xd4\x25\x59\x32\xf9\xf8\x96\x5c\xd2\xc8\x73\x4d\x78\x6d\xe6\xb2\x1a\x84\xb4\x87\x44\x6b\x49\xcf\x68\xe2\x51\x68\x3e\x83\x94\x8b\xc0\x7f\x84\x5d\x05\x57\xa2\x1e\x87\xc5\x96\x92\x7e\xe5\xe4\x1c\x4c\x3f\xfc\x35\xc9\x49\xa0\x45\xd6\x94\x28\x24\xc2\x8c\xa1\x41\x1d\xc4\xec\xe4\xb5\xd6\x88\x8e\xc6\x27\xd8\xfa\x99\x12\x9d\x25\xff\x8e\xb7\x37\x72\xc9\xa0\x82\x72\x07\x18\x58\x19\x52\x98\xc7\x22\xcc\xdd\xc4\xf1\x29\xd4\xb4\x10\xe7\x1c\x81\xe3\xbd\x1a\x79\xd6\xe3\x17\xc8\xb3\x9e\x00\x81\x7a\x34\xf7\x31\x5e\x69\x4a\x12\xd7\x83\x56\xdb\x68\x4d\x29\x0a\x16\xae\x12\x04\xa2\xc7\x20\xae\x46\x90\x35\x6d\xf1\xba\xaf\x4a\x26\x0f\x98\x4d\x69\x88\x30\x5d\xd5\x2d\x6b\x05\xad\x2d\x98\xef\x41\xd0\x0d\x9b\xaa\xe6\x96\x87\x0e\xf8\x11\xe4\x7f\x96\x6c\x6b\x5d\xdd\x9f\x60\xef\xf8\xe8\xd3\xf9\x1c\xdd\x1d\xde\xf7\x35\xee\x57\x23\x37\xc4\xbd\x5d\x19\x05\xb9\xd4\xbe\x05\x70\x33\xc0\x15\x4f\xbb\x92\xcb\xa3\x59\x62\xea\x10\xa5\xba\xdb\xf2\xbb\xf3\x6d\x55\x32\x43\xfe\xa6\x7e\xb1\x53\x2d\x0e\x82\xc7\x17\x9f\x7d\xf6\xd9\x67\x2a\xbd\x87\x12\x4d\x2e\xe7\x7b\x3f\xaa\xc7\xfc\x60\x5f\xb9\xd8\x93\x73\x2c\x5f\xc9\xf7\xbe\xe4\x1a\x46\x12\x78\xdd\x8c\x0b\xcf\x95\x8f\x01\x17\x47\x00\xbc\xf2\xa1\x85\xf7\x84\xb3\x0e\x2a\x2e\x54\xbe\x0c\xf7\xbc\x45\xa2\x48\xa8\x9b\x7c\xfb\x12\x7e\xdf\x95\xd7\xc9\x0d\xf2\x9e\x81\x80\xb3\x52\x48\xb6\xe7\x5c\x19\x51\x27\x89\x87\xd8\x89\x2a\x09\xd3\x8f\xf3\x5e\x1e\xf7\xfa\x1a\xf3\x98\x0d\x5b\x8f\x92\x94\xf5\xa8\x06\x4e\x7e\xf2\xa7\xa7\x92\x78\x10\x3e\x75\x06\xe9\x87\x79\x76\x76\xc1\x2a\x9e\xf6\xbe\x80\xce\x27\x09\x02\x10\x3b\xf2\x90\x20\x2e\xb1\xb3\x82\x72\x2f\xc1\xd7\x1a\xca\x40\xb5\x57\x6f\x5c\x5d\xd0\x7d\x9d\xa7\xdf\xda\x77\x72\xef\xed\xe5\xbe\xf6\x7b\x91\xed\x26\x9a\xbc\xaf\xaf\xb3\xa0\x30\xb3\x8e\xf3\xba\xab\xf6\xbd\xcc\x23\x7a\xea\xa8\x4a\x39\xdf\x77\x73\xf4\x54\xb9\x40\xb5\xfb\xfd\xa1\xd5\xcf\x6c\xed\xb0\xb0\xa2\x0d\x08\x14\xed\xb2\xea\x5a\xda\x1e\x55\x5c\x8e\xaa\x8f\x91\x94\x4e\x94\x47\xd5\x08\xd6\x76\xac\x94\x82\x0a\x25\x8e\x08\x85\xee\xcd\x9d\x64\x1f\xa6\xf1\x99\xd6\x92\x73\x15\xb0\xc3\x0f\x2d\xd8\x9b\x11\xa3\x51\x8a\x86\x8e\xc7\x45\xc7\x09\xbd\xe5\x55\xa9\x23\x3d\x64\xc3\x77\xac\x6a\x4b\x02\xde\x59\x98\xb1\xca\xec\x0a\x34\x08\xbe\x2b\x21\x10\xa1\x67\xd0\xc6\x55\x08\x4c\xda\x10\x93\x5c\xf3\x3b\x74\xad\x95\xfd\xdc\xb2\xf6\x48\x6a\x2e\x7b\xe4\x6d\xa9\x72\x4f\x31\x6d\x69\xd0\x0c\x19\xb8\xae\x6a\xf3\x3d\x41\x96\xf2\xed\x28\xfa\x13\xc3\x79\xa6\xe7\xcc\xc3\x50\x8f\xd2\x7d\x11\x62\x8c\x6c\xdb\x5a\x43\x70\x36\xb8\x3b\x69\x21\xb6\xa6\x7f\x6c\x1b\x9a\xf2\xbc\x28\x8d\x64\xed\x17\x31\x62\x75\x96\xcd\xf4\xa4\x1f\x8f\x95\x73\xb1\xef\x54\xe8\x07\xe2\x94\x50\xf1\x61\x20\x1c\xa5\x14\x5a\xb3\xa5\xd0\x07\xc0\xa6\x01\x71\x8d\xa7\xf1\x44\xcc\xba\xfb\x8b\x19\x63\xf5\x27\x26\x1a\xb8\xdf\xfa\x7e\x95\xe9\xde\xce\x52\x0b\x8e\x00\x1f\x71\x4b\x4e\xb4\x74\x50\x2d\x95\xfc\x32\x5a\x81\xd6\xe6\x4a\xb6\xce\x37\xbd\xdb\xe9\xaf\x81\x0f\x44\xd8\x37\xad\x7e\x8a\x09\x5d\x49\xa3\x75\x0c\x00\x07\xc2\x95\xec\x5b\xb3\xb7\xb0\xca\xad\x4d\x97\xfb\xb8\x75\x76\x93\xc2\x3c\x8a\xd8\x0c\x1d\x65\x57\x28\x06\xf8\x0e\x9d\x78\x4f\x5e\xa4\xeb\xb4\x17\xef\x13\xd6\x01\x54\x10\x8f\x27\xb7\x80\x0a\x7e\x46\x7a\x0b\x11\x36\xc7\x93\xdb\x5b\x58\x67\xf0\x63\x7f\xc2\x2a\x83\xd2\x07\x81\x45\xff\x72\x5f\x00\x3e\x96\xbc\x4a\xff\xd7\xaf\x5f\x3f\xeb\xf8\xfe\xf5\xb3\xbf\x1a\x79\x0b\xb5\xe9\x24\x60\x8a\xd6\x7c\x19\xd5\x87\x1d\x18\x68\xa1\x75\x11\xfc\x12\x6d\x20\x19\x0d\x34\xe2\xa0\xdb\xa4\x5b\x91\x8b\x34\xd0\x06\x00\x7e\x87\xd9\xa4\x5b\x0a\xaa\x47\xed\x51\xa2\x25\x28\x75\xed\x58\x99\x0a\x5f\xc3\x5a\xb7\x74\x1f\xf1\x6c\xdf\x15\x2e\x3e\xd4\x9e\x53\x93\xff\x53\xe8\xd6\x84\x5f\x07\x43\xfe\x93\x8e\x4e\x6a\xb5\x36\x03\x5e\x69\x7a\x51\xe3\xb8\x64\x8b\x07\xe2\x8a\x43\x0e\x50\xce\x9a\xee\xaa\x5a\xca\x18\xce\x5f\xc5\x92\x0a\x96\x77\xad\x20\xdf\x7d\xff\x83\x12\xd7\x2c\x4a\x0d\x6f\xad\x8c\x33\x33\xad\x9b\x78\xee\x76\xa7\xbc\x50\x7c\x77\x65\xe7\xaf\xc2\x29\x94\x45\x8e\xb4\x23\x73\x57\xd1\x40\xbf\x7f\x43\xe5\xab\x7b\x75\x03\xfb\x7f\x07\x1a\xb1\x05\xa8\xae\x17\xa8\xf1\xec\x00\x43\x9c\x4b\xf1\x34\x6c\x43\x87\xcf\xf7\x39\x1e\x7b\xbe\xd1\xfe\xaf\x8e\xe1\xdd\x7c\xa8\x59\xd7\x49\x99\x05\xf1\xe7\xbd\x55\x80\xa5\x02\x41\xd0\xff\xd9\x87\x7d\xf0\x8b\xa7\xda\x41\xdc\x46\x6c\x47\xbd\x97\x35\x68\x37\xdf\x5b\x20\xe7\xe1\xac\x75\xbd\xd6\x13\xd5\x56\xfe\x49\x61\xcf\x8f\x2a\x1a\x9c\x9f\xff\x03\x1f\x16\x7a\x21\xde\xe6\xc3\x42\xb5\x39\xf2\x61\x91\xc2\x0a\x51\x83\x3a\xd9\x28\x69\x2a\xa6\x00\xc5\xfd\x6f\xc3\x86\xc8\xa0\xc2\x30\x9e\x8b\x29\xef\xc2\xb9\xbc\xad\xf7\x8f\x6e\xbd\xe7\xfd\xe3\x17\xf1\x6e\x75\xfd\x9c\x9e\x93\xf4\xb4\x62\x29\x64\x6a\xfe\xc6\xf8\xa3\x31\xaf\xa6\xe4\x04\xfe\x21\x8f\x29\x3d\x29\xf3\x98\x0a\xbd\x99\x33\x6b\xa3\x02\xd0\x92\x4f\x2a\xa3\x7d\x2a\x92\xb5\xa7\x69\x72\x9b\x3c\x45\x3c\x4e\x76\x44\xce\x52\x9b\x3f\xe6\x2d\xe6\x57\xe3\x87\x2e\x00\x71\x70\x9d\x32\x82\x5d\x8e\x16\xae\x2f\xcc\xf9\x1f\x31\xfa\x5e\x99\x53\x17\x75\x5e\x92\x7e\xba\xc3\x13\xb6\x1f\x6b\x3c\x7e\xf3\xf3\x87\x36\xfd\x26\xc8\x1f\x6c\xa3\x03\x4b\x1e\x59\x05\x20\xb3\xa3\x37\x8c\x80\xee\x1e\x5c\x93\x61\x26\x25\x67\x28\x46\x80\xe3\x68\xc0\x93\xa3\x8c\x7b\x8f\x7e\x7e\xe4\xf7\xf5\x2d\x50\x82\xff\xda\x7d\x02\x25\x07\x14\x30\x82\x8e\x7f\xc1\x99\x8d\xa2\x72\xf7\x1d\xef\x06\x58\x9f\x42\xe5\x50\xe1\x67\xe0\x70\xbd\xaa\xa6\xf9\xdb\x5d\xda\x01\xcd\xc0\x13\x68\xc6\x5f\xce\x11\x24\xf3\x4b\xce\x2c\x45\x33\xae\x09\xf4\xae\xaa\x6b\x37\xa1\x83\xae\x8d\x4e\x02\x20\xa5\x01\x6c\x07\xc0\x73\x2e\x99\x96\xe2\xa0\x71\x84\x37\xf3\x2a\x84\x7b\x3e\x0e\xab\x13\x4f\xe1\xa5\x49\x36\xfa\x48\x59\x27\xcc\x88\x93\x59\xc0\xeb\x9c\x8b\x65\xec\x55\x33\x46\x64\xd4\x2e\x35\x01\xc8\xaf\x73\x24\xad\x4a\x29\xc8\xdf\x7b\xc2\x91\x6c\x03\xa3\xd7\xff\xc1\x37\xcf\xa0\xa2\xb5\x87\xdd\x9e\x7e\x12\x7b\x35\x5f\x4f\xe0\x22\x21\x0d\x3c\xf1\xea\xf9\x79\x67\x36\xea\xe6\x79\x94\x4e\xcf\x91\xcd\x1f\xa9\xd3\xf3\xc4\xbb\xc7\xea\xf4\xfc\xdb\xf3\x71\x3a\x3d\xf7\xb8\xc7\x40\x62\xdf\xaf\xd7\x82\x75\x2e\xd1\xc3\x8b\x3d\x80\x5f\xd6\x9f\x14\x7f\x0d\xb8\x6b\xa8\x9d\x0f\x58\x90\x9b\xeb\x24\xfd\x25\x89\xd9\x3d\x77\xbc\xd2\x9d\xd4\xe0\xe8\x0d\xf3\x27\xb6\xe4\xbc\xcb\x29\x08\x6c\xb6\x98\x25\x15\x41\x24\x6d\x30\x84\xde\x68\xc8\x34\x2f\x3d\x81\x1b\x6b\xc8\x84\xa8\x21\x8b\x9c\xd0\xe7\xe2\xa8\xab\xf5\xb8\x17\x8d\xce\x46\x31\xb3\xc3\x8c\x23\x1f\xdd\x6f\xa9\xfd\xf2\x7e\xbf\x4f\xae\x27\x14\xd1\xab\x69\x6c\xee\xdf\xf1\x8e\x19\xd7\x55\x05\x3d\x72\x65\x80\x49\x2e\x66\x90\xcd\x94\x1f\x04\xab\x67\x9e\x1f\xb8\xf6\xb6\x03\xaf\xa7\xfa\x48\x96\x8c\xec\x69\x53\x1c\xc9\x99\xa4\x4e\xd0\xf2\xac\xc1\xd9\x89\xb5\xc2\x89\x8e\xb4\x1e\x6d\x13\xe8\x80\x10\xdf\x3d\xb3\x6a\x75\x49\x05\x94\x01\xaa\x49\x56\xca\x11\x52\xa2\x87\x32\x05\xbf\x29\x84\xbe\xde\xed\x69\x57\x2d\xab\xba\xea\x8e\xe4\x0c\x3c\xdd\xbe\xa9\x5a\xb6\xe6\xf7\xa6\x83\x3b\xf6\x5e\xcb\x34\x3e\x3b\xc4\xe6\x99\xe6\x0d\xee\x24\x94\x7d\x81\x69\x20\xcd\x8c\x11\xb1\x03\x6e\x61\x70\x7a\xf4\x7f\xc7\x67\x61\x25\xe4\x1c\xc1\x75\xab\x6a\x4a\xc8\x63\x88\xca\x57\xdd\xbb\x8a\xed\xac\x6e\x99\x8a\xd5\xaa\x04\x51\x60\xf0\x88\x5b\xf0\xe1\x8c\x28\x30\x0e\xbf\x03\x59\x10\x36\xe5\xd0\x82\xe6\x10\x6a\x63\x95\x8f\x32\x55\x9c\xb1\x26\x3f\x9b\x21\x3b\xed\xea\x71\xaa\xc1\x35\xa4\x02\x34\x4e\x27\x34\x0c\x81\x61\x66\xe4\xfb\xa6\x3e\x3a\xc9\x79\x04\x23\x7c\xb5\x3a\xb4\x82\xd0\x8e\x50\xd2\x55\x3b\x35\xba\xcb\x59\xb8\x54\x0d\xbb\xef\x46\xae\xaa\xdc\xa6\xd4\xa8\xf5\x30\xd5\xe0\x0f\xfb\x15\x07\x78\x5b\x33\x6c\x3b\xde\x99\x4e\x16\x0d\x6d\xf4\xf8\xa3\xbe\xf1\x0a\x06\xf4\xfd\x80\x4a\xe2\xc3\x6a\xab\x30\x5b\xae\x90\xc0\xa3\x7a\xae\x35\xa5\x3f\xce\xb0\x3f\xb4\xd4\xf0\x99\x55\xcd\x68\xbb\xae\xee\x9d\x2c\x91\x3e\x61\x8c\x8a\x4c\x31\xfc\xc5\x4d\x11\x9b\x1a\x8c\x2f\x5b\x16\xe6\x77\xc9\x6e\xd7\x74\xc5\x8a\xdb\x4a\xa8\x03\x96\x1e\xaf\x1b\x56\x68\x06\x9a\xc2\x58\xf6\x66\xa1\x28\x74\x1a\xfe\x0e\xc4\x12\xff\x2a\xe9\x22\x70\xa9\xd5\x42\x7e\xa2\x71\x68\x04\x31\x51\x62\xb2\x9b\x4c\x21\x59\x75\xf6\x7c\xe0\xce\x5b\x9b\x06\xfc\xb3\xa6\x1d\xfb\x9f\xe0\x86\x96\x99\x0f\x8c\x30\xd5\x25\x34\x9a\xef\xd3\x0a\xf9\xe9\x2e\x0b\xaf\x4f\x0b\x19\x65\xb2\x06\x38\xc8\xd1\x6e\xa6\x74\xec\x02\x03\x30\x74\xaa\xf4\x90\x86\x22\xec\x07\xe2\xb4\x56\x68\x67\xe1\x2b\x5d\x2a\x0e\x11\x0d\x61\x69\x72\x5b\x4c\x46\x72\x84\x54\xd1\x1c\x47\x48\x60\xd7\xf6\xc1\x3f\xe4\x57\x7f\x9a\xff\x9c\xee\x68\x7e\x9d\x59\xbc\xd4\x91\x50\x85\xc8\x5c\x90\xd4\xe9\x28\xca\x03\x9a\xda\x26\xe9\x6c\x83\xbf\x67\xeb\xee\x5c\x07\x93\x34\x5d\xcb\x6b\x04\x29\x68\xe8\x6d\xbc\xdb\xaa\x04\x2c\xd9\x34\xf5\x41\x2e\xfb\x58\xab\x98\xaf\x56\x0e\x56\x59\x61\xd8\x82\x8f\x38\x38\xc1\xd7\xd5\xa6\x01\xc3\xd6\xd9\x45\xf1\xe1\x24\x1d\x42\x7b\x31\xd3\x92\x81\xac\xa6\xb3\x5d\xe4\xdd\xdf\x5f\xcc\x62\x0f\x78\xfd\xfc\x16\x7d\x80\xf4\x04\xaf\x55\x8b\xff\x90\xae\xae\x9f\xb5\xd1\x32\x25\x8c\xdf\x73\x1f\x38\x2a\xac\x71\x82\x85\xdb\x4d\x6d\xee\x80\xfc\x38\xe4\x14\x37\xef\x1e\xc0\x7e\xbe\xab\x6b\xc4\xe9\xd9\x34\x26\xb4\x42\x74\x1e\x89\x0c\x3d\x62\xc6\xfd\xb8\xcd\x51\x62\xa9\x9e\x69\xe2\x08\xdc\xc9\xe2\x79\x48\x53\x38\x0e\xd1\x4f\x71\x64\xe1\xec\x35\x5a\xbf\x49\x51\xe1\x3c\x1f\xaa\x1d\xdd\xb0\x2b\x30\x20\xd3\xd6\x94\x3c\xfb\x6c\x5e\xb2\xcd\x54\xa7\xb4\xaa\xe9\xea\x66\x4a\x66\x2f\x2e\x27\xe1\x4f\xf3\xf9\x85\x97\x77\xa4\xef\x9c\xb5\x7e\xd2\x88\x27\x8d\xef\xc5\x27\x8f\x1c\x20\xa2\x6b\xad\xa4\xbc\x0b\xce\x01\x1a\x66\x23\xb9\xac\x45\xb5\xe2\x4d\x96\x7b\xc0\xd7\xa1\x14\x8a\xd9\x83\x25\x2b\x3b\xa7\xcb\x28\x8d\x86\x0a\xba\xa7\xe7\x72\xfe\x2b\x72\x8e\xf8\xea\xf0\x5f\x0d\x2f\x5a\xb6\x67\x54\x05\x3b\xf5\x4c\x0a\x87\x1d\xaf\xb3\x9b\x91\x3e\x5f\xbb\x58\xea\x7c\xaa\x83\x2b\x73\x62\x17\xa6\xb6\xed\x42\x3f\xfe\xf7\x0a\x7a\x4d\xbd\x2d\x78\x4b\xf6\xd5\xde\x07\x8e\xa4\x0d\x01\x36\xc2\x4a\x44\xe1\x84\x37\x10\xc4\x10\x73\xc9\x6c\xa5\x90\x8c\xd8\x36\x90\xb6\x49\x56\xb0\x48\x9f\x40\x0e\x8c\xae\xb6\x08\x13\x06\xb2\xf4\x91\x1f\x5a\xf3\xd2\x22\x5b\x5e\x97\x62\x16\x0a\xbc\x6a\x30\xa2\xf7\x2e\xf1\x48\x3f\x08\x5e\x4b\x79\x5c\x5c\x5c\x66\x62\xab\xfb\x02\xc9\x53\xe9\x0f\xb8\x41\xe3\xe3\xf5\x4b\xad\x96\x70\x6e\xad\xce\x7b\xe4\xa9\x5d\x30\x71\x1e\x54\xe8\x48\x20\xc1\xc9\x1d\x73\x7c\x11\x6a\x7a\x24\xdd\x96\x0b\x96\x50\xc9\xf6\xdc\x21\xbe\xd1\xb0\xa7\x60\x94\x05\x02\x19\x77\x5d\x59\x23\xf2\x7d\x21\x20\xd1\xd3\x15\x71\xa2\x06\xae\x6d\x30\xfe\x15\x99\xbb\xf1\x6c\x89\xa3\x68\x36\x2f\x6d\xee\x4f\x94\x4b\xd8\xfc\xe3\x69\xdb\xe2\xe0\xc1\xd3\xa6\x54\xeb\x83\xa5\xe1\x1e\x91\xd4\x20\x37\xb9\xb0\x31\x41\x36\xf9\xb3\x7a\xa3\xe5\x41\x38\x13\x5d\x44\x40\xdf\x43\x9e\x1f\x96\x50\xac\xff\x80\xc1\xc0\x85\x87\xfe\xaa\x65\x54\x11\xd2\xb6\xea\x08\x6d\x19\x25\xcb\x23\xb9\x98\xef\xef\x41\x97\xc2\xf7\x0a\x2b\x57\x12\xfd\x2c\x44\x06\xcf\x2c\x73\xd5\x15\xb2\x21\x6d\xc9\x49\x67\xb7\x8b\xb5\x5b\x4f\x68\xca\xc7\xb2\xcc\x62\xc5\x24\x7a\x08\x81\x63\x7c\x21\x3b\x8f\xe0\x96\x60\x6d\x2b\xba\x77\x1e\x2f\x91\x48\x8b\x5f\xc7\x30\x1a\x78\x9d\x91\xc2\x3d\x62\x58\x59\x19\x33\xdc\x30\x44\x5c\xbb\x17\x3a\xa6\x0c\xe9\x73\x7c\x03\x96\x67\xf9\xf9\x16\x61\x73\x4d\xab\x96\xae\x82\xee\x62\xa1\x4a\xf5\x33\x20\x46\x7a\x3e\x8d\x56\x4d\xa0\x33\xed\xfb\xa6\x82\xa4\x31\x0c\x2a\x5d\x01\x56\xda\x75\x0f\x62\x88\x97\x0f\xf2\x4f\xbc\xa3\x1d\x46\xff\xb5\x2a\xf2\x1e\x22\x80\x6c\x66\x30\xb1\x77\x15\xa0\x5a\x75\x42\x1e\xdc\xa7\x62\x2b\x5b\x61\x67\x1f\x7e\x2c\x65\x98\x89\x0d\x57\x9a\xa5\x2a\x0f\x8b\x16\xba\x56\x42\x98\xd0\x9f\x1c\xbe\x15\x66\x45\x36\x65\xfc\x0f\xbe\xdf\x97\x3f\x30\x4f\x6d\xac\x74\x67\x2e\xca\x62\x6c\x85\x0f\xcf\xdb\x00\x10\xa7\x7e\x6e\xc3\x27\x79\x73\xb3\xb2\x90\x37\x82\xdb\x3c\x68\x96\xad\xc5\xd3\xc9\xa9\x34\xfb\xe4\x52\x28\x81\x91\x54\xcd\xba\x6a\xaa\x8e\x05\xfb\x72\x9d\x5e\x71\x93\x10\x3e\xb9\xb4\x85\xd8\xf5\xad\xae\xfe\x1c\xf8\xec\xa4\x96\x0e\x8b\xbe\x71\xde\xb6\xbf\x6d\x95\x78\x52\xb5\xab\x9a\xf5\xd0\xd5\xc6\x18\x34\xe7\xbf\x4a\xa0\x3d\x01\xcc\x93\x46\x91\x07\xf3\xcb\xa5\x2d\x17\xf0\xa0\xac\xfa\xc2\x5f\x1a\xdb\xe3\x2f\x4a\x8a\xd1\xfd\x16\x11\xde\xdb\x27\xaa\x40\xab\x31\x96\xc6\x36\x98\x16\x21\x5e\xc6\xb7\x40\x5f\x51\xb6\xb4\xb1\xb9\xca\x4e\xcc\x53\x16\x9c\x8c\x69\xf0\xeb\xc6\xb1\xab\x3b\x0b\x63\x54\x38\x57\xe4\x62\x76\x29\xae\x33\x29\xef\xa3\x6d\x22\x25\x5b\xd5\x14\xab\x16\x0d\x2f\xaa\xdd\x9e\xb7\x1d\x6d\x3a\x95\x30\xb5\xda\x34\x85\x4e\xdf\x2e\x5b\x7c\xc8\x26\x77\x27\xff\x66\xea\x5e\x93\x37\x92\x26\xbe\x6c\xf9\x9d\x60\xad\x15\x7e\x55\x7b\x52\x32\xd1\xff\x89\xdb\x93\x5f\xbd\xa6\x4c\xbd\x5d\x55\x96\x35\xcb\xd5\x53\x5f\xd3\x55\x95\x63\x51\xa6\xaa\xfa\x9a\xae\x0a\x97\xa0\x76\x4c\x8a\x47\xeb\x7c\xed\xa9\xaf\xa6\x9c\xa9\x9f\x98\xf2\x63\xb6\xcb\x07\xf8\xb7\xe7\xd6\x85\xa8\x5f\x6e\x2c\x2a\x3d\x5e\x0b\x53\x0b\xb1\x5f\x6d\x1a\xde\xb2\xe2\x8e\xb6\x0d\x88\xf7\x6b\x5a\x0b\x4d\x98\xef\x3c\xa8\xf2\x6f\x12\xba\x02\x0f\x73\xdd\x9d\x8a\x61\x86\xd4\xd6\x07\x8a\x46\x58\x88\xb8\xd1\x21\xb0\xf0\x3c\xe0\xbc\x93\x8c\x34\x1c\x81\x3d\x08\x4e\x07\x25\xdb\xb7\x6c\x25\xc5\x81\xd7\xcf\x7e\xd8\x32\xb2\xb0\x4b\xb3\x20\xb0\x58\xaf\x9f\x4d\xc9\xeb\x67\xb7\x1f\xcd\x3e\x9a\xcd\xd5\xbf\x2f\xe5\xff\x06\xeb\x64\x5e\xcb\x76\x89\x4d\x96\xc6\xb7\xbf\xd6\x66\x95\x43\xc5\xcc\xc5\xa7\xa8\x98\xd9\x41\xfa\x19\x5e\x1e\xc1\x80\x6c\x96\xe5\xf2\x57\x13\x9b\x73\x00\x75\x15\xc5\x7d\x72\xab\x7a\x57\x28\x9c\x59\xb8\x54\x97\x63\x96\xea\x31\xc4\xfd\x98\x6c\x10\x0e\xb1\xbf\x7e\x36\x5b\x6e\x6c\x66\x61\x18\x1b\xb4\x31\x25\x5d\x8b\x29\xf8\x23\x06\x1f\x68\xc7\x4e\x18\x81\x3f\x86\x88\x1a\x70\x30\xe6\xe7\xde\x51\xb9\xee\x2a\x9b\x02\xe2\x53\x22\xfd\x8e\x97\x34\xc1\xdf\x53\x53\xd3\x7d\x46\x3e\x0c\xc2\xbf\x47\x8d\xe4\xb6\x2c\x77\xb7\x4f\x07\x38\x15\x26\x79\xf7\x64\xf9\x99\x12\xbe\xed\xd5\x60\xa4\xe0\x94\x0b\x9b\xeb\x65\x1f\xb1\x5e\xfb\xce\xf5\x9a\x52\x0f\xdf\xc7\x36\x87\x26\x10\xa7\x39\xad\x81\x78\x6c\x83\xfa\x5a\x7a\x88\x1e\xd4\x8f\x6d\x11\x2c\x79\xee\x10\x95\xd6\xe3\xd4\xf6\x6c\x8b\xf3\x78\x3f\xe6\x3d\xeb\x8d\xe5\xfd\x05\x9f\xf7\x2e\xa8\xac\x11\xae\xe8\xbc\x7f\xc5\x8a\x79\xbc\x64\xf3\xbe\x25\x81\x51\x05\x6b\x32\x8f\xe7\x7c\x4a\xae\x72\xd5\x56\x94\xac\x3c\x48\x43\x82\x6d\xc4\x7c\xd6\x5b\x63\xf7\x58\xfb\xd5\x73\x47\xda\x3b\x41\x4a\x7c\x36\x07\x49\xb9\x23\x1a\xa1\x37\x10\xb2\x9f\x7b\x7f\xcb\x52\x09\x96\xa1\x5d\x1a\x87\x1b\xe8\xa9\x6d\xa3\x56\x1c\x02\x71\xb2\x6e\xf5\x37\x45\x72\x69\xbf\x4e\x19\x81\x63\x3d\x7d\x54\x6b\xa1\xa7\xf2\x63\xc7\xe1\xba\xb6\x3f\xb6\x45\x92\xcf\x5f\x76\xca\x50\xac\xb5\xff\x49\xbb\xf2\xc4\x41\x6c\xc6\xd0\x66\xbd\xe9\x6b\x03\xdf\xec\xc9\x76\xe4\xe3\xbb\xa7\xe6\xbe\xaa\xeb\x74\xff\x5e\x89\x9e\x16\xe6\xc9\xea\xf3\xd1\x17\xe7\x88\xeb\xf1\xcf\x5d\x55\x57\x26\xd3\xcd\x8a\xef\x76\xbc\x21\x0b\xa5\x0b\x58\xa8\xc8\x48\xa3\xb1\xf8\x17\xc9\x78\xa8\xc6\x69\x59\xab\x9a\x8f\xb0\x32\xfe\xac\x34\x09\x10\x25\x7b\x85\xa2\x6f\xc8\x83\xd5\x82\xc4\x4c\x35\x9b\x56\x2e\xb1\x90\x1d\xdf\x6c\x20\x72\xd5\x2e\x65\xd5\x90\x7d\x5b\xa1\x1f\x1a\x4a\xf2\xf0\x64\x87\xdf\x3c\xe1\x2f\x3f\xec\x59\x59\x40\xf1\xd3\x46\xec\xbe\xcd\xbf\x6a\x59\x59\x75\x57\xe4\xbb\x6a\xc5\x6b\x2a\xc8\x6f\x69\x5d\xd3\xcd\x56\xa1\x1d\xbe\xfa\xf3\xb7\x3f\x90\xaf\x5e\xbd\x42\x33\x18\xdb\x2d\x25\x6f\x63\x62\xcf\x1b\x61\x94\xdd\xe3\x13\xf0\x86\xfe\x57\x81\x8b\x41\x26\x05\xc3\x10\xf4\xf4\x00\xfc\x73\x34\x6a\x70\xb7\x80\xe7\x60\x05\xca\x36\xf8\x27\x14\x82\x7f\xf1\xe5\xdf\xd8\x0a\x3d\x63\x6e\xab\x92\xf1\xd3\xe2\x32\xc2\x88\xc4\x24\x96\x8a\x59\x80\x44\xee\x85\xd0\x35\xc2\xa0\x4e\x21\x29\x44\x93\xa1\x62\xcf\x56\x92\x15\x76\x15\x07\x12\xe9\x2d\xa1\x08\xa7\xbf\x50\x71\x7f\x45\x9a\x6e\x7b\xd6\x5f\x6a\x4a\x2e\xf0\xa5\x30\xd0\xd8\x71\x5c\x63\x16\x27\x3e\x2a\xf8\xce\xc3\xd0\x78\xdf\x2c\x8f\x83\x85\x8e\x46\x56\x4a\x41\x17\xb9\x56\x8c\x3d\x6b\x57\xac\xe9\xe8\x86\x9d\x41\x82\x41\x76\x36\xd4\xf4\x74\x70\x45\x27\x93\xb7\xa3\x1c\x83\x94\x95\xec\x1e\x13\x29\x76\x2a\xf9\x18\x2a\x61\x30\xf9\x02\xfa\x16\xa1\x67\x92\xcd\x5f\x06\x6e\x47\xd6\x53\x89\xa3\xdd\xe9\x5f\x2b\x69\xad\x9c\x83\x65\xd1\x2d\xbf\x73\x93\x85\x3e\xa4\x72\xd5\xa6\x78\x75\xd0\x0c\x82\x95\xf7\x34\xa3\x0a\x0c\xb7\xd4\xf2\xbb\xa2\x65\xb7\xac\x15\x2c\x3b\x20\x53\x60\xec\xc0\x4c\x85\xdc\xc0\x72\x2d\x26\xdb\xbc\x6b\xe9\x3e\x9c\xaa\xc5\x63\x1d\x31\xa8\x86\x3b\x4d\x78\x0d\xa8\x2f\xc3\x4d\xc8\x62\xe1\xac\xec\x18\x4e\x58\xa0\xb5\x14\x95\xfc\xc9\x58\x48\xdb\x11\xf5\x41\x41\x3f\xf7\xe7\x82\xa0\xbc\xf3\xb1\xb5\x2f\x52\xb5\x2f\x46\xd4\xc6\x34\x13\xaa\xf7\x87\x20\xf5\xc4\xf8\xfa\x17\xa9\xfa\x17\x19\x52\x08\x5c\x49\x9c\xc6\x3a\xda\xa2\x7e\x21\x8d\xaf\x8b\xdf\x53\x83\xca\x36\xc9\x9a\x52\x0d\x2d\x0b\xd9\x7b\x5a\x83\xca\x85\x31\xd5\xa0\xfa\x74\x52\x73\x1a\x0c\xf6\x61\x00\x9c\xfc\xb4\x56\x29\xe6\xa7\xcd\xb7\xaa\x0a\xa4\xf7\xc7\x71\x05\x8d\xf7\x86\x3c\xe4\xd0\xd9\x93\x43\x4c\xb6\xa5\x37\x25\xd9\x56\x6e\x47\x92\x2d\xe9\xdd\x08\x5b\xea\xd9\x8a\x64\x3b\xc6\x88\x13\xb4\x93\x36\xee\xf4\xaf\x53\xcb\xba\xd5\x36\x1a\x91\xfe\xbd\x6f\xc9\x7b\x0e\x84\x57\x60\xe4\xaa\xf7\x1c\x86\x54\x73\xfd\x0b\xdf\x73\x10\x82\xc6\x06\xd7\xbe\xe7\x10\x04\x4d\x0d\x1f\x81\x4c\x8b\xf6\x00\x24\x5b\x4c\x93\x7f\xff\x4e\xe0\xf6\xc5\x0d\x8e\xd8\x57\xc1\xea\xb5\x33\x36\x79\x2b\xb8\xdb\x20\x3f\x5f\xe5\x2f\x8b\x54\x1b\xd1\x69\xc4\x36\x46\x91\x85\xdf\x52\x74\x16\x9d\x96\xfa\x29\xc2\x6f\x27\x3a\x89\xd8\xce\x20\x31\xf8\xad\x44\xe7\x10\x5b\x19\x71\x0c\xc3\xf5\x09\x4e\x21\xb6\x93\xd9\xac\xa7\x88\xc1\xff\x42\x42\x2b\xa7\x0e\x41\xa3\xa2\xfc\xc1\x8d\x4c\xca\x5c\xf7\x5e\x35\xa5\x4e\xf4\xd2\x45\x8f\xa9\xd7\xf0\x86\x39\xdd\xc1\x9f\x6f\x7f\x17\xac\x7a\xe2\x20\x58\x5b\x20\xdc\xbb\x56\x58\x3b\x3f\x79\x4a\x0a\xe7\xf7\x9c\xa2\xe2\x6d\x8d\x4a\xeb\x15\xf4\x90\x4c\xf2\x2e\x77\x3c\x56\xf9\xf0\x56\x07\x03\xd6\x71\x50\xa1\x69\xc5\x99\x1a\x9e\x49\xe9\x27\x47\xa8\xff\xd0\x23\xd4\x7f\xcb\x11\xea\x7f\xcb\x41\x5a\x1d\x84\xad\x1f\x8f\x53\xe5\x0f\xe4\x6d\xb7\xa5\x4d\x09\x9a\x1b\x48\x0a\xe1\x40\xe3\xf6\xe7\xd4\xf1\xdc\x97\x7b\x21\xe2\x74\xf5\x37\x4e\x2f\x1e\x2c\x6a\xa2\xa3\x53\x9d\xa3\xd3\x7d\x89\xae\x5a\xdd\x1c\xed\x94\xfe\x43\x41\xfc\x09\x72\x66\x3b\xc5\x42\x93\x58\x85\x83\x1f\x52\x0a\x9c\xa8\x5b\xa7\x68\xe8\x1e\xf8\x6a\xd5\x32\xd6\xb4\x10\x38\x6d\xed\x20\xa2\x2d\x78\x53\x1f\x03\x96\xa3\x7e\x75\x22\x1b\xd5\x2f\xe8\x6d\x60\x11\xed\xc3\x1a\xf6\xfb\x99\x67\xc8\x86\x98\x54\xa5\x0a\x33\x39\x4c\x30\xdc\x58\x5e\xdb\xde\xa8\x30\x21\xa5\x4d\x65\x79\x77\x77\x37\xa3\x17\x17\xc7\x7d\xcb\xff\xc6\x56\x1d\xe4\x59\xd8\x73\xd1\x89\xf3\x17\xf3\x8b\x0f\x8b\xf9\x45\x71\x71\x51\x40\xf6\x42\x5e\x6c\xab\x92\xe9\x8b\x37\xd1\xd4\x4d\xd5\x75\xc7\x4d\xd5\xd2\x43\xc9\x6a\x68\xe8\xc5\xfc\xe2\xe3\xf3\x8b\xf9\xf9\xc5\x87\xe7\x2b\x21\xb0\x3e\x6d\xca\x42\x30\x76\x73\xee\x78\x2c\x98\x15\xe9\xf5\x70\xd5\x2a\xb3\x20\x27\xc2\x85\xef\x68\xaa\xf7\x4f\x03\x6d\x14\xf2\x3b\x40\x43\x56\x18\xa5\x35\x3e\xb1\xc4\xe5\xc7\x9f\x7e\x9c\x8d\x54\x45\xaf\x69\xf9\x06\x3f\x9b\x4f\x89\xfa\xff\x49\x0a\xc4\xd1\x64\x38\x49\xa5\x33\xff\xb3\x00\xce\xb4\xe2\xcd\xdf\x0e\x0d\x46\x7b\x43\xec\x82\xa1\x1d\xc8\xef\x93\xd8\x5f\x4c\x19\xde\xbd\x27\x30\xeb\x16\x2b\x67\x56\xdd\x2c\xd8\xfa\x80\x49\x75\x5f\x3f\x7b\x75\x53\xed\x65\x23\x3b\x8a\xdd\x00\x0a\xea\x33\x52\x57\xcd\x8d\xb8\x26\xc2\xc9\x2c\x2e\x49\xe1\xee\x43\x48\x68\xfa\xc3\x9f\x60\xfb\xcf\xbf\xfb\xfe\x87\xaf\x8b\x1f\xbf\xfa\xe2\xb7\x2f\xe6\xc5\x0f\x5f\x7f\xf5\xbb\x57\x85\xfc\x79\xfe\xd9\xfc\xf2\xfc\xb7\x17\x56\xdf\xa4\x14\xc7\xbf\xfb\xe1\x0f\xbf\xbf\x24\x5f\xf2\xaa\x66\xed\xbe\x86\xc8\xaa\x70\x8b\x5d\x12\xd6\x1e\xbb\x4e\x80\xe4\xbb\x57\x18\x97\x95\x38\xa5\xb4\xab\x56\xbe\xee\xd4\x71\xf0\xd7\xb4\xe0\xfc\x64\x37\x0d\x42\x77\x6b\x66\x9c\x7f\xe5\xbe\xb9\xc1\x01\x19\xc8\xcd\x27\xb8\xad\x99\x04\x06\x60\xf2\x75\x52\x8f\x7b\xd9\x0d\x22\x7b\x31\x7e\xc9\xd7\xc9\x54\x00\x53\x56\xb6\x1f\xdf\x82\xe5\x56\x03\x19\xc0\xaf\x98\x12\x0b\x1e\x79\xd7\xfd\x88\x71\x24\x8d\x4e\x40\xe4\xdc\xc7\xfb\x96\xef\xa7\xe4\x39\x5d\x2e\x5b\x76\x2b\xa9\xff\x4c\xed\xe8\xdd\xd4\xec\xe4\x76\xe2\xd9\x3d\x44\xf5\x13\x9b\x92\xe7\x35\x6b\x36\xdd\x16\x2e\x4a\xf9\x8b\x35\x7e\xbc\xf3\xa0\x9a\x03\x8b\x8d\xfc\x26\x2f\x49\x79\x67\xb6\x7c\xff\xe6\xca\xd4\xcc\x88\x3c\xaf\x9b\xd9\xee\xae\xb8\x98\xcf\xfd\x14\x0d\xe0\x0a\x1f\xae\xde\x6e\xeb\x14\x74\x95\xf6\xf1\x13\xe4\xfc\x9c\xfc\x0f\x95\x25\xc5\x55\xc1\x6e\x59\xbd\x57\x28\x3d\xb3\x5d\xd5\x14\xb7\xa6\xeb\xaa\x29\xdc\xac\x74\x71\xdf\xb2\xf4\xd6\x29\xed\xa5\xac\x4b\xf8\x50\x98\xa6\x7b\x9b\x35\x4d\xf6\x36\xf7\x48\x42\xf8\x03\xc6\x11\x49\x4a\xf8\xa3\xce\x4e\xfc\x2f\x67\x2e\x8c\x49\x56\xdf\x2f\xbb\xa9\xbd\x79\xf6\x8e\xa3\x60\x9e\x70\x21\xd8\xc7\x31\x37\x7a\xe4\xeb\x59\x1e\x4f\xa0\xe3\xa8\xa1\x2e\x6e\x69\x9a\x2c\x78\x4c\x75\x69\x4b\x12\xd3\xbb\x72\x5e\x8a\x47\x60\x0b\xa7\x87\xd2\x8e\x1d\xca\xfd\xe8\xa1\x68\xc7\xa7\xd3\x07\xb3\x7c\xfb\xeb\x62\x9c\xa6\x4e\x1f\x4d\xfd\xf6\x97\x46\x39\x5c\x8d\x1a\xcb\x9b\x00\x69\xeb\xfc\x9c\x7c\xc7\x36\x60\xb9\x55\x02\x94\x20\x67\x6c\xb6\x99\x4d\x35\x98\xf6\x6c\xb7\x2c\x9a\x0b\x44\xd3\xd6\x25\x6f\x59\x2b\x54\xf6\x49\xf8\x7e\xb1\x98\x78\x87\x67\xc4\x19\xf8\x8f\x6a\x4d\x5e\x3f\xd3\x33\x7b\xfd\x8c\xfc\xdb\xaf\xc9\xeb\x67\xf3\xd7\xcf\xbc\x63\xb2\x73\xde\xb3\xce\xf1\x30\xa2\xde\xd0\xe9\xd8\x75\x89\x06\xdc\xf5\xde\x1d\x93\x3d\xb8\xeb\xec\xc2\x42\x16\xa3\x77\x7c\xd7\x0e\xf5\x7c\x3f\xb6\x67\x8d\x51\x32\xbe\xef\xe5\x5b\x9b\xb5\xa6\xf4\x13\x3a\xaf\xdf\xda\xc4\x35\x34\xe1\x63\x29\xfb\x15\xdf\x31\x22\xf6\x6c\x55\xd1\x5a\x47\xb7\x1e\xba\xaa\x16\x3a\xf1\x57\xa0\x22\xb4\x84\x95\x55\x0d\xba\x04\x25\x0b\xe9\x60\x09\x77\x45\x2d\xb2\x5b\x48\x3e\x61\xb3\x8e\x59\x38\x20\x19\xaf\xed\xfb\x81\xb6\x5b\x2b\x0b\xf7\xb4\xbe\x7c\xe4\xc8\x35\x09\x0c\x34\x5f\x3f\x72\xf0\xb8\xc9\x3d\x8d\x47\x2f\x6f\x54\x29\x42\xe0\x77\x73\x63\x9f\xde\xfa\xe7\x42\xfe\x9c\x0e\x0e\x1c\xe7\xc7\x11\x20\x26\xf6\xbb\x75\x44\x38\x2c\xe7\xe7\xe4\x3f\x0f\x02\xa4\x9b\x15\x15\x8c\x2c\x52\x69\xa9\x81\x9d\x02\x46\x7d\x43\xa8\x02\xc9\xd7\x43\xcc\xa4\x9d\x4e\x43\x70\xaa\xd4\xeb\x64\x79\xd8\xac\xab\xfb\xa9\xf7\xbc\x13\x1d\x5d\xdd\xe8\x57\x11\x3c\x7b\xff\x7e\x60\x02\x74\x4d\xe7\x17\x1f\x7f\xf6\xd1\x27\x9f\x7d\xfc\xc9\x79\xc5\x2e\xe6\x0a\x81\x62\x2f\xd8\xa1\xe4\x05\x84\xcd\x17\x90\x17\xb3\x2b\xee\x78\x7b\x53\xc8\xf7\x29\x3f\x74\x45\xe8\xc0\x9d\x8b\xca\x00\x58\x86\xf0\x8d\xfc\xe6\xa9\xce\x69\x3f\xb0\x7b\xe3\x2e\x35\x83\x28\x96\x1d\x6f\x38\x66\x48\x7d\xe8\xc9\x6c\x61\x4b\xa5\xc4\xf5\x2f\xb4\x63\x84\x6d\x56\x59\xf0\x08\x79\xf0\xe2\x51\xf5\xcf\xa1\x2c\x0d\x65\x8c\x6d\xfc\x21\xf5\xbc\x4c\xd7\x31\x16\xf5\x87\x94\x02\x21\x5d\xa7\x6b\x0f\x0d\xa0\xad\x3d\x38\x41\xcb\xee\x87\xb3\x89\x9d\xdb\x9f\xac\xb7\x16\x75\xa7\xf9\x2f\xa3\x41\x97\x33\x0b\x15\xe8\xc1\xae\x64\xd5\xe8\x7e\x5d\xe5\x48\xef\xd7\xcd\xeb\xd2\xfd\xca\xca\xa4\xf2\x90\x08\x4f\xce\xbf\x2f\x25\xc5\xea\x98\x4b\xe5\xad\xa3\x37\xb1\xe6\x77\xac\x05\xe6\xa0\xdb\x74\xa2\x33\xed\xc7\x24\x01\x40\x9e\xed\x5c\x5d\xfb\x31\x59\x77\x45\xf7\x55\x47\xeb\xea\x27\x96\xa8\xeb\x7c\x4c\x9d\x93\x1f\x31\xa6\x5e\x3e\xea\xa0\xd8\x0a\x5f\xb3\x6e\x36\x97\xda\x04\x2b\xe4\x33\xbe\xd4\xa9\x25\x8f\x5b\x81\xd5\x1e\x68\x25\x5e\xfc\x59\x9c\x5b\xa6\x7f\x34\x99\xd3\xe9\x16\x59\xf2\xba\x24\x03\x93\x82\x32\x43\x8d\xa0\xe5\xb6\xbf\x91\xdc\x94\x70\xc5\x5d\x8f\x17\x27\xd3\x8e\xfa\x98\xda\x34\x27\x38\x0f\x23\x09\x2c\x0d\xaa\x00\x80\xff\x8f\xb6\x6b\xe9\x8d\xdb\x06\xc2\x7f\x85\x75\x8b\x20\xeb\x7a\x57\xeb\x1a\xbe\xac\xe1\x4b\x9b\x00\x0d\xd0\x43\x80\xb8\xed\x21\x76\x2b\x4a\xe2\x4a\xac\xb5\x22\x4d\x6a\x13\x2b\x80\xff\x7b\xc1\xe1\x5b\xe2\x3e\x5c\xbb\xbe\x78\x21\x89\x43\x72\xf8\x9e\xe1\xf7\x0d\xda\x79\xed\xff\xd9\xf8\x84\x78\x3e\x22\x1b\xde\x60\x49\x65\x08\x41\x82\x17\x87\x11\x51\x0b\x03\x71\xac\x86\xa0\x7c\x9e\xc7\x33\xdd\xb7\x37\xdb\x9e\x54\xc1\xf7\xc1\xc3\xa9\x91\x44\x67\xd0\xe2\xf2\x7e\x7e\xb9\xf4\x89\x62\x3a\xa1\xcb\xd9\x8e\xa9\x1e\xe6\xea\x69\x3a\x78\x9e\x4c\xa7\xad\x22\x54\x96\x3e\xf3\x86\x56\x24\xa5\xb6\x06\xae\x1c\x8e\xa1\x7a\x09\xf5\x78\xde\x29\x6b\xd6\x4b\xd2\x51\xed\xac\xbc\x9a\x6f\x0d\x40\x39\x08\x4c\xe4\xe3\xc9\x44\x09\xb3\x0c\xbd\xb3\xd0\xbc\x4a\xd3\x90\x42\xf0\x1c\x89\xb4\xe5\x3c\x88\xb5\xad\x36\x29\x98\x6a\x4e\xea\x1d\xa1\x6a\xc6\xa2\x7f\x97\xa4\xb2\x8c\xa4\x70\xa4\x74\x4e\x3a\x95\x32\x07\xb3\xf6\x87\xf7\xe8\x0d\x7a\x5f\xd5\x04\xfd\x46\x6a\x5c\x0e\x7e\x92\x05\x26\x5e\x5f\x31\x1d\xfa\xc7\x35\x8d\x89\xee\x93\xb6\x6c\xa9\x1d\x05\xb2\x0b\xa7\x11\xf6\xb0\xa5\x82\xc8\x08\xf6\x8e\x98\xd0\xd7\x8d\x75\x50\x68\xc0\x9f\xc1\x16\xc6\x5a\xb6\xb4\xc1\x7b\xb4\x0c\x6b\xe5\x26\x3d\x09\xf0\xa5\x7f\x43\xda\x96\x72\x49\xe5\x1e\x57\xc2\x7f\x37\xc6\xdd\x0c\x9c\xd5\x02\xf3\x66\x18\x17\x75\x32\x42\x5f\x0a\x19\x3d\x8c\xc9\xd5\x58\x47\x9d\xef\x37\xb3\x53\x37\x9b\x4f\x0d\xaa\x9d\xfb\xfb\xb7\xe8\xbb\x6b\xb4\xb4\xa2\xf1\x34\xb7\xc3\xc8\x5d\x57\xa2\x11\x60\xf7\xd8\x12\xcc\x52\x27\xce\xa7\xa3\xe0\xbd\x79\x5a\xc3\xb3\xfc\x79\x08\x5f\x73\x4d\xff\xd3\x27\x04\x84\x5a\x48\x10\xc7\xae\x1d\xb7\x65\x7a\xda\x08\x9b\xeb\x00\x63\x42\xb8\x61\xee\xd8\x7c\x43\xa5\xa4\x5d\x3d\xaf\x49\x47\x04\x2d\xed\x9b\x7b\x32\xa8\x01\x6c\x83\xba\xad\xd0\x32\x5b\x22\x1c\x92\xbb\x8c\xd9\x3f\xd2\xf1\xd3\xf6\x22\x41\x27\x9e\xb3\x03\x5a\x86\xba\x07\x9a\x3d\xff\xbf\x00\xc1\xe6\x1c\xf2\x87\x23\x86\x05\x63\x02\xc0\x3c\xdc\xb9\xc4\xb8\x9e\xb4\xce\x43\x0a\x59\xfb\x22\x01\xf0\xa1\xdd\xce\x54\x7a\xd2\x78\x31\xc4\xe7\xcc\xc5\xe1\x57\x8f\x1f\xb6\xb8\xa5\xeb\x01\xee\xbc\x0f\x9c\xd8\x4b\x03\x6c\x2b\xca\xc0\xb9\x1b\x78\x4b\x9b\xcb\x82\x67\x1b\x4c\xbb\x45\x29\x65\x56\xb4\xac\xc8\x36\x58\xf6\x44\x64\x52\x94\xd9\xdf\x80\x42\x51\xaf\x8c\xa4\xeb\x57\xfb\x03\x71\x1f\x01\x13\xa3\xef\xb6\x6b\xaa\xe5\x0f\x30\x39\x57\x3e\x86\x1b\xb0\x4d\x7b\x77\xcb\xaf\x37\x37\x1f\x91\x20\x70\xda\x05\x56\xef\xc8\xe3\xc9\x1b\x4e\x49\x05\x15\xab\x48\x8b\x87\x79\xcb\xb0\x26\x16\x67\x5b\x61\x20\x35\xaa\x9e\xaf\x5e\x97\x31\x99\x07\xb5\x7b\x38\x19\xd1\x76\x04\x18\x20\x84\x4e\x8d\x1d\xe5\x74\x14\x4b\xec\x74\x12\x21\x01\xb0\x99\xc6\xa1\xad\x8d\x5e\x6b\x5a\x5e\x01\x88\x0b\xae\xfd\x6f\x7b\x94\xc3\x60\xcb\x61\x13\x9f\xfb\x31\x98\x7b\x11\x6e\xb7\xa5\xf6\x40\xe3\x75\xfa\x67\x78\x08\xc5\x93\x68\x0d\x1d\xc0\x05\x79\x19\x0f\xf3\xd4\xd4\x99\x65\x21\xa9\xc0\x4e\xec\xb7\x8d\xb2\xf0\x78\x40\xa0\xb3\xf4\x61\xaf\x84\x37\x9a\x8a\xb8\xe8\xbb\x68\x1d\x98\x6c\x8d\xb6\x5d\x45\x84\xea\x44\x57\x7b\xcc\x87\xfb\xd4\x19\x33\x0d\xda\xd1\xa5\xb4\x6c\x93\xe3\xcf\x8d\x20\xeb\xbb\x51\x3b\x65\x59\x64\xc7\x41\x6f\x6f\x4f\x10\xee\x7b\xf1\x56\x7d\x3c\x43\xb7\x27\xb3\xc0\xb4\xe3\x6b\x58\x14\xe2\x73\x4f\xfb\x96\xdc\x4d\xda\x3d\x29\x0d\xbe\x8d\xc5\xbd\x5e\xcd\x9c\x98\x77\xc0\x11\x08\xa1\xcb\xe1\x76\x01\xea\x1b\x0c\xb4\x70\x68\x2d\x70\x0d\xd2\x68\x45\xba\x9e\xae\x29\x11\xf2\xcc\xa5\xd3\x0c\xf9\x90\x53\xfe\x0f\xfe\x82\x65\x29\x28\xef\x57\x39\xd2\x16\x28\xb5\xc5\xea\x59\xc9\x5a\x9f\x61\xac\xd4\xbf\xae\x6f\x4f\xbe\xbf\x3d\xb1\xba\x38\x9b\xbe\x0d\xa4\xfa\xef\x82\x36\x48\x9b\xd2\x9c\x8a\x78\x88\x0f\x8a\x76\x64\x5c\xad\x24\x23\xeb\x4c\x64\x08\xe5\x6e\x88\xc2\x96\xf1\x61\xcb\xfa\x28\x68\xdd\x1e\x7e\x81\x5a\xe0\x61\x7e\xb9\xd4\x6c\x8e\xbe\x89\x4a\x0d\xee\x29\x59\x45\xae\xd0\x56\x02\x8e\x30\x4a\x9f\x87\x9b\xe7\x73\xfe\xe8\x81\x4d\xb5\x89\x14\x3a\xa7\x9d\xa4\x15\x59\xe9\xe9\x72\xdc\x21\x7a\xab\x41\xba\xa9\x43\x58\xd4\x71\xa9\xb9\x49\xdc\xfc\x64\x7f\x5c\x78\x21\x4c\xf0\x06\x77\x72\x85\x2e\xdc\x40\xfb\x4a\x2b\xf6\x35\x78\xe2\x04\x25\x05\x04\xa5\x80\x36\xdc\x51\x88\x64\x9f\x46\x65\x83\xbb\x9a\x48\x1d\x4d\x21\xf4\x0b\xc0\x07\x03\x84\x14\xfd\x46\x60\x3a\x74\x8e\x78\x7d\x73\xe6\x9e\xe8\x79\x4e\xd3\x88\x32\x49\x04\xc2\xa5\x60\x52\xa2\x42\x53\x0c\xc9\x85\x93\xf6\xa7\x25\xcb\x54\x07\x0f\xe3\x65\x00\xd7\x59\x41\x4a\xac\xfa\x39\xed\xf5\xe1\x47\xa2\x5c\xe5\x07\xe0\xcf\x5f\x1a\xc1\x36\x64\xa1\x12\xe3\x56\x32\x27\x4c\x4b\x52\xa9\x72\xdf\xc3\x72\xc4\x3a\x9b\x16\xcb\x40\x9e\x17\x64\xdc\x6f\x4a\x5d\x5e\x79\x2a\xc5\x0a\xfd\xa0\x57\x1a\xd0\xa4\x7a\x12\xf7\x57\x1f\x76\x03\x6c\xf2\xfe\x3e\x82\x49\x06\xe7\x6e\xaf\x9d\x9d\xf6\x7f\x77\xee\x7b\xa1\xb0\x44\x7b\x96\x6c\xc3\x59\x67\xe9\xab\x11\x5a\x74\xf8\x4b\x81\x83\x8c\xa6\xec\xff\xbe\x5c\x05\xae\xea\x63\x07\x20\xac\x7a\xe3\xa2\x2c\x7a\x7f\x3f\x2f\x66\x5b\x68\x31\x97\x04\xc0\x58\xf0\x2b\xae\x8e\x5b\x19\x2b\xe7\xfb\xea\x9b\x70\x4d\x3a\x8e\x4d\x25\xbd\x38\xe9\x32\x19\xbe\x2e\x4b\x99\xa0\xb3\xf0\xb9\x55\x51\x6e\xa6\xde\xe7\xfc\x31\x9a\x6e\x2e\x96\xcb\x67\x64\xa8\x8e\x48\xe1\xca\x13\x1e\xb1\xc3\x3a\x87\xa5\x08\xaa\xaf\xa6\xa8\xf0\x1d\xf4\xbd\x1f\xcd\xff\x49\x61\x7d\x4c\xec\xa0\xb2\x11\x01\xf7\xae\x72\xa2\x05\xe4\xa5\x8b\x1b\x6a\x7d\x52\xe2\xe7\xe5\x77\xe4\x74\x43\xba\x2a\x70\x78\xdc\x3d\xfd\x1b\x00\x00\xff\xff\x93\xc0\x6a\x54\x01\xfd\x09\x00"), }, "/static/lib/elm-datepicker": &vfsgen۰DirInfo{ name: "elm-datepicker", @@ -150,9 +150,9 @@ var Assets = func() http.FileSystem { "/static/script.js": &vfsgen۰CompressedFileInfo{ name: "script.js", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), - uncompressedSize: 110586, + uncompressedSize: 110990, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xdc\xbd\x0b\x7b\xdb\xb8\xae\x28\xfa\x57\x1c\xed\x6c\x2f\x72\x0c\xab\x76\x5e\x6d\xe5\x70\xf9\xa6\xef\xf7\x23\x49\x3b\x99\x66\x72\x72\x28\x99\x76\xd4\xd8\x94\x4b\x51\x71\xd2\xd8\xfb\x6f\xdc\x1f\x74\xff\xd8\xfd\x08\xea\xed\xc7\x74\xf6\x5e\xfb\x9c\x73\xef\x5a\xf3\xa5\xb2\x04\x82\x20\x09\x82\x00\x08\x82\x5b\xc3\x44\x06\x3a\x8c\x24\x91\xf4\xde\x49\x62\xd1\x88\xb5\x0a\x03\xed\xf4\xb2\x0f\x0d\x45\x24\x28\xd0\xf4\x5e\x09\x9d\x28\xd9\xd0\x2e\x67\x12\xb4\x3b\x64\x0a\xf4\x22\x07\x1b\x93\x02\x44\x91\x1d\xd0\x90\xa3\x56\xf9\x87\x72\x6d\x19\x3a\xa2\x40\xd2\xc5\x82\x16\xa8\x06\x44\x94\x50\xed\x82\x28\x50\xe9\x65\x54\x1b\xb1\x0b\xa2\xc1\xe2\x2f\x57\xa0\x49\x52\xaa\x60\x0f\x92\xa2\x02\xb1\x8c\xed\xef\xd6\x99\x10\x01\x79\xad\xe5\x6a\x03\xc2\x4b\xd5\xee\x03\x2f\xaa\x4d\x96\x11\xfe\x0b\x28\xe1\x24\x81\x32\x2d\x65\x62\x04\x09\x4a\xc4\x1c\x40\x50\x10\xc3\x97\x71\xfe\xf7\xd0\x17\x10\x0e\x35\x0a\xcb\x24\x26\x24\x2a\x91\xf8\x10\xa2\x82\xc4\x60\x19\xed\xff\x32\xaa\x23\x12\xc0\x32\xdd\x65\xc2\x39\x09\x4b\x84\x3f\x82\xb0\x20\x3c\x5a\xc6\xfc\xbf\xb3\x2d\x21\x89\x60\x65\x6b\xca\xcd\x89\xc8\xb0\xd4\x9c\xc7\x30\x2c\x9a\x13\x2e\x23\xff\x3f\xac\x85\x43\x12\xc2\xba\x36\x96\x1b\x39\xab\x89\xb9\x1d\xc6\x98\x74\x79\x5f\xba\x43\x62\xde\x7b\xa6\x1e\xa2\x4b\x25\xee\x6c\x09\x28\x88\xdc\xad\x96\x01\x91\x97\x22\xa2\x54\xf0\x36\x2b\x08\x45\x93\xf7\xea\x45\x21\x29\x17\x26\x49\xa9\xfc\x4d\x51\x1e\x8a\x7e\xdc\x5f\xc6\x00\xbc\x86\x83\xf0\x12\x9a\x61\x19\x0d\x14\x63\x74\xb0\x0a\x11\x04\xcb\xa8\x48\x50\xc2\xe6\x57\xb1\x41\xc1\x06\x0f\x57\xe3\x83\x68\x25\x46\x12\x95\x90\xc6\x75\xa4\x50\x30\xdc\xa3\x75\x68\x21\x5c\x87\x98\x84\x74\x71\xc3\x55\x23\x64\x03\x52\xb0\x8a\x1d\xf6\x61\xa4\x88\xf9\x26\xd8\x91\x52\xfc\x8e\x48\x0a\x09\xeb\xf4\x92\x43\xd9\x4b\x5a\x2d\x2a\xce\x93\x0b\xa6\x89\x6a\x25\xb4\x97\xad\x2d\x0b\x0a\xdb\x6c\x5c\xc1\x54\xe0\xd1\x05\x1e\xc1\x3a\x3d\x71\x28\x9b\x4d\xe5\xfa\x3d\xd1\x6a\x51\x7d\x2e\x2e\x98\x72\x39\x28\x66\x5e\xe5\x0b\xeb\x58\xc8\x91\xbe\x62\x02\x2e\xcd\xb2\x45\x17\x14\x26\x8c\xd4\x2b\xc8\x26\xe2\xb9\xbc\x58\x50\xd8\xd4\x90\x0c\x21\x24\x29\x2d\x82\x02\x67\x9d\x1e\x3f\x14\x3d\xde\x6a\xd1\xe4\x9c\x5f\x30\x7d\xce\x2f\x32\x0a\x92\x73\x79\xc1\x14\x24\x0b\x0a\xeb\x9b\xa5\x32\xac\x59\x4f\xe9\x56\x37\xeb\x2b\x5d\xf4\x95\x3a\x4f\x72\xbc\xe2\x5c\x5f\x30\x09\xe2\xd7\xe9\x35\xc8\x04\x22\x53\xcc\xcc\x4c\x7d\x9e\x5c\x80\xca\xbb\x5e\xfd\x22\xa6\x76\xb7\xd7\x39\x64\xa2\x27\xda\xed\x1c\x91\xa8\x21\xa2\xbd\xbf\xd3\xd6\x15\x2d\x95\xc4\xb4\xb5\xc2\x16\xff\xe5\x51\x41\x69\xd4\xe2\x60\x46\x27\xc7\x9c\xac\xc4\x9c\x73\x4f\x3c\x0e\x03\x81\x2d\xf8\x0b\x0a\x54\x41\x81\x6c\x0b\xe0\x19\x1d\x2d\x92\xe4\xd4\x1d\x26\xfd\xec\xd1\x4b\x28\x85\x80\x75\x7a\xc1\xa1\xe8\x05\xad\x16\xe5\xe7\x81\x19\xdf\xe0\xa2\x67\x70\xda\x2f\x49\xf6\xa5\x25\x0c\x4f\x05\xf9\xd8\xf3\x15\xcc\x54\x1a\xc5\x35\x9f\x82\x48\xc6\xd1\x58\xb8\xe3\x68\x44\x64\xcb\xf1\x1a\x4e\xeb\x8a\x50\x0a\x6a\x41\x0b\xcd\xf4\x8a\x64\xf0\xce\x61\x28\xb5\x50\x92\x8f\xe3\x7f\x3a\x85\xf8\x98\x9a\x75\x40\x5f\xa9\x68\xd6\x78\xae\x54\xa4\x88\x73\xa5\xf5\x34\xf6\x1e\x3c\x18\x85\xfa\x2a\xf1\xdd\x20\x9a\x3c\x10\xe3\xc9\x83\x20\x52\xe2\x81\x3f\x8e\xfc\x07\x5d\xb7\xe3\x76\x1e\x5c\x85\x52\xc7\x0f\x9c\x96\x6c\x39\xee\x64\xe0\x94\x24\xd2\xa8\xc6\x22\x20\xd8\xf9\x05\x24\xec\x1a\xbb\xb9\x03\x82\xf6\x92\x66\x93\x68\x26\xdc\x69\x34\x25\x94\xf6\xcc\x37\xed\x72\xd0\xae\x8f\xdf\x4b\xc3\x99\x63\xbd\x2e\x96\x92\x70\x48\xba\x9d\xce\xa1\xa6\x19\x3b\xb9\xd3\x24\xbe\x22\x97\x58\x2f\x85\xad\x4e\x2f\x1c\x12\xc9\x18\x53\x29\x84\x7d\xe3\x44\xfe\x77\x11\x68\x67\x8b\xe9\xbb\xa9\x88\x86\x0d\x39\x9f\xcb\x64\x3c\x36\x42\x32\x7f\xca\x8a\x38\x59\xc5\x0e\xcb\xc1\x9b\xcd\x29\xd9\xa7\xb0\xd5\xed\x65\x6d\x4b\x1a\xa1\x6c\x48\x77\xfb\xb0\xd3\x6c\x12\xc9\x7c\x6d\x64\x99\x32\xff\x1a\x42\x24\x0d\x87\x64\xeb\x9a\x48\x9c\x99\xe6\x8f\x6e\x75\x4d\xf3\x52\xaa\xba\xbd\x8c\x3c\x14\xb9\x47\x6c\x4c\x46\x14\x4e\xd8\xea\x01\xdf\x1a\xa5\x8c\x5b\x8c\xee\x69\xc6\xb8\x2b\x5b\x97\x75\x0f\xf6\x44\xbf\xe3\xc9\x43\xd5\x6f\x77\xbd\xae\xe9\x8b\x2d\xe9\x6e\xa7\xdf\x89\x66\xa7\x44\x1a\x49\xeb\x72\x4a\xe7\xf3\xf4\xb7\x0f\xca\xf5\x29\xed\x6b\xcf\xfc\x0a\x40\xb9\x01\xc5\x76\xf7\xa4\xeb\xa3\x9c\x6e\x36\xb7\xaa\x65\x7b\x92\x61\x39\x23\xb1\xf3\x21\xd4\xf3\xb9\xc1\xd6\xef\x7a\xca\xf5\x4d\xfd\x1d\xbb\xc0\x3c\x5f\xd3\x4c\xdb\x28\x7a\xd8\x59\x50\xf8\xb6\x56\xb4\xa7\x40\xdd\xf5\xd3\xa3\x73\x78\x9a\x4d\xf4\xb5\x10\x2c\x03\xa1\xf0\x7d\x99\x9c\xf4\x6b\x2e\x07\x0f\x3b\xfd\x1b\xed\xa9\xfe\x40\x7b\x63\xbd\xa0\xf0\x94\x75\x8a\xa1\xb8\x2c\xa3\xbe\xe7\x9e\x04\xdf\x53\x8b\x82\x7d\xdf\x54\x65\x51\x06\x01\x81\xa7\x4b\x50\xef\x2c\x96\x6c\xda\xdc\x2f\xb0\xc7\x35\x72\x19\xb5\x4b\xc4\xb9\xbe\x28\x5e\x2a\xfb\x52\x99\x97\xb9\x6c\x35\xa5\x3f\xb0\x31\x79\x55\xe2\x94\x57\x16\xb1\xe1\x13\x63\xbd\xca\x51\x89\xad\x73\x3e\x69\xa9\x94\x35\xfc\xec\x95\xea\x59\x21\xff\xda\x0e\x72\x3a\xc2\xbd\x92\xa4\x36\xdc\x60\xdf\x52\xc1\x84\xeb\x17\xa0\xd9\xf8\x23\x3d\x67\xec\x7e\xdb\xeb\x2c\x0a\x82\x5e\x57\xfa\x6b\xdb\xeb\x42\xde\x67\x06\xfe\x23\x1b\x93\xd7\x25\xfa\x8f\x8d\x98\xca\xaa\x55\xec\x0c\x34\x93\xa9\xec\xed\xe9\x76\xbb\x47\x95\xa9\xf8\x5c\x57\x17\xae\xbc\xf8\xd7\x6a\xf1\xf3\x8b\x12\xd9\xca\x4a\x0f\xe9\xf2\x52\x49\x03\xf7\x73\xa3\x0a\x74\x7e\xd1\xc3\x39\xa0\x8d\x76\x62\x38\x1e\x34\xd3\xa6\x17\x2c\x3a\x5c\x9d\x50\xa4\xf1\x42\x9c\x1d\x1b\x1d\x97\xc2\x33\x46\x74\x0d\xb3\x11\x6b\xb9\x50\x29\xe3\x6e\x36\x45\xb5\x02\xc0\x6e\xa6\x89\xad\xe6\xae\xa8\x06\x44\xb5\xaa\xc4\x54\x15\x2c\xd5\x63\x14\xea\xac\x26\xbe\x54\x53\xb3\x99\xac\xaa\x0e\x12\x96\xb8\x3e\xe5\xb6\xd2\xdb\x6a\xa5\x90\x54\x2b\xe6\xa6\x62\xb1\xa2\x62\xa3\x89\x67\x55\x07\xab\xab\x6e\x36\xf9\xfa\xfa\x81\x33\xee\xfa\x34\xb0\x54\xdc\x2c\x53\x01\xbc\x4a\x49\x50\x9b\xfd\x1a\x0a\xa3\xe7\x98\x18\xa6\x70\xe3\x48\xe9\x75\x22\x06\xa5\x39\x8a\xf2\x05\xfe\x07\x2f\x2b\xf2\xe8\x17\xb1\xb1\x99\x81\x2c\xf3\x25\x63\x6c\xac\xfb\x1d\xcf\x3c\xdc\x68\x94\xc9\x58\xc1\x3a\x41\x25\x5b\x46\x07\x83\x17\x6b\xa5\xa1\x6c\x6f\xd0\x13\xe4\x6f\x58\xfa\xf3\xfa\xd2\x0f\x36\x95\x7e\xa0\xe6\x1d\xfc\xfc\x9e\xeb\x2b\x77\x1a\xcd\xd6\xeb\x2a\xff\x2e\x57\xe1\xf9\x77\x26\xb3\x96\x77\xcc\x52\xdb\x9f\x92\x6e\x97\x7a\x9d\x43\xd5\x6c\xca\xc3\xce\x7c\xae\xcc\xea\xd9\x39\x94\x7d\xd5\x92\x5e\xaa\x6d\x62\x65\x5c\x73\xb9\x43\x51\x04\xbd\x67\xf8\x26\x10\xe1\x18\xbe\xd8\xe7\xe1\x38\x8a\x14\x3c\xb1\x3f\x54\x94\xc8\x01\xfc\xb0\x3f\xc6\xd1\xa8\xb7\xae\x39\xcd\xe6\xa6\xc6\xce\xe7\x9b\xbe\x6e\x31\x66\x94\x2b\x43\xcf\x27\xb6\x69\xac\x7a\x7f\xeb\xe3\xaf\xe9\xd2\x76\x55\xe0\x4c\xb9\xc1\x15\x57\x4f\xa3\x81\x38\xd2\x24\xa1\x3d\x7e\xb8\xbf\xbf\xf3\xf8\x60\x3e\xdf\x3f\xd8\xed\x3e\x3e\xe4\x7d\x52\xd6\xb8\xc1\xa8\xe0\x5e\xf9\x55\x4b\x9d\x27\xad\x2e\x7e\x61\x3b\x74\x91\xab\x50\xdf\xa3\x50\x12\xc7\xa1\x1b\x0d\x9b\xf3\x0b\xa8\xe8\xc6\xd6\x06\xc9\x49\x33\x2a\x4e\xb0\x44\x61\xd2\x6a\x41\x50\xa5\x32\x98\xcf\x09\x6f\xd9\x02\x86\x42\x90\x84\x53\x23\x0a\x70\x66\xf3\x9c\x2c\x5d\x22\xab\xf7\xb7\xec\xa2\x8c\x26\x6d\x69\xd2\xbf\x4c\x93\xce\x69\xb2\xd6\x90\x59\xcb\x16\x85\x36\x8e\xa3\xff\x96\xfd\x0a\x2d\xc6\xa4\x4a\xe9\x48\x18\x1a\x55\xbc\x4a\x87\xa0\x3d\x5b\x47\xc2\xf8\x3f\xd9\xfe\xc1\xee\x4e\xa7\xd9\xdc\x7f\xb8\xbb\xb7\xfb\x4f\xc6\xfb\xfa\xbc\xdd\x16\x17\xad\xc4\x4b\xaa\x14\xc0\xef\xeb\x78\x4f\xb9\xf1\x74\x1c\x1a\xa9\xb5\xa0\xf0\xc7\x7a\x28\xec\x53\x04\x92\x92\xfd\xa2\xb5\xf4\x0b\x5c\x6b\x17\xe2\xfb\xd4\x80\x32\x6b\x71\x52\xe5\x05\x4d\x51\x31\x27\x82\x25\xf5\xe6\x26\x7d\x75\xde\x6e\xeb\x8b\x96\xf0\x0a\xfd\xb8\xb3\xc8\x14\xe5\xb4\xdf\x95\x64\xff\x32\x32\xb6\x7e\x9d\x8e\xee\x22\x27\x88\x82\x96\xeb\xf4\xf3\xad\xff\x50\x6e\x28\x07\xe2\xf6\xe3\xd0\xf6\xae\x58\x07\x6a\x04\x61\x0d\x36\x59\x0b\x9b\xe9\x39\x87\x79\x0b\x8d\xf6\x3d\xe6\xb1\x7e\x9d\x23\x60\xf9\xb7\x76\x06\xbe\xa0\xc0\x97\x71\xda\xae\xca\x55\xa7\x70\x48\xf4\x61\x37\xd3\xf6\xce\x4a\x8a\x5d\x07\x50\x0d\x69\x77\x0f\x89\x28\xd3\x8a\xd6\x59\xa6\x7d\x08\x0a\xa2\xc5\x74\x55\xe7\xc0\x91\x0a\xd6\x35\xc7\xa8\x7a\x1d\x18\x64\xba\xde\x3a\x51\x69\xc0\xba\x20\x0a\xb0\xc2\xd3\xba\x04\xb7\x0b\x43\x4f\xc2\x28\x53\x1d\x87\x9b\xaa\xde\x43\xa5\xfb\xca\x93\x8b\x94\x50\x7f\x6d\xbf\xe3\xcf\x73\x75\x61\x46\x27\xde\x30\x4f\x52\x38\xd0\x08\x39\x96\xab\x95\xbb\x3a\x30\x88\x8b\xf5\xfa\xd9\x32\x30\x24\x17\x9b\xb4\xaa\x55\x05\x80\x63\x91\x64\x65\x91\x92\x2f\xb3\x56\x08\x02\x2c\xc6\xd7\x14\x2b\x39\x2d\x97\x0a\x42\x84\x45\xa3\xb5\x45\x4b\xae\xc9\x15\x85\x21\xbc\x58\xb5\xfa\x68\x75\x97\x15\xba\x31\xaf\xde\x9c\x7c\xfc\xe0\x4e\xb9\x8a\x05\x6a\x66\x01\xd7\xc1\x55\xc9\x99\x3d\xd1\x64\x46\xae\x34\x38\xa7\x57\x61\xdc\x08\xe3\x86\x8c\x74\xe3\x86\x8f\xc3\x41\xc3\x94\xdc\x6a\x38\x2d\xe9\x4e\x44\x1c\xf3\x91\x00\x83\xc0\x28\x47\x03\xc3\x05\x37\xb2\xc4\x66\x37\x69\xed\xf1\x2c\x44\xfc\xee\x36\xbd\x0f\x78\x2c\x1a\xbb\x5e\xea\x20\xf0\xa3\x68\x2c\x78\xc9\x3f\xa0\xfa\x33\xa3\x2c\x7a\x57\x92\x38\xbc\xf1\xe4\xe3\xc7\x77\x8e\xd1\xfa\xb0\xd4\x4e\x56\x4a\x26\x13\x5f\xa8\xc2\x4a\x57\x7d\x04\x97\x8d\xd7\x1f\x4e\x0d\xb8\x47\xd4\x21\x6b\xef\x74\xf7\x1e\xee\x3d\xda\x3d\xd8\x7b\x38\x9f\x17\xcf\x87\x4c\xcd\xe7\xa4\x33\x57\xd4\x68\x22\xb4\xd9\x24\x5b\x61\xfc\x22\x94\xa1\x36\x5d\x31\x9f\xab\x7f\xef\xd2\x3a\x3a\x24\xc9\xd2\xb0\x57\xa3\x61\x0d\xe1\x2f\xde\x7d\x3c\x3a\x2d\x28\x3f\xc8\x4a\xd5\xed\xc6\xac\x94\x6a\x84\x32\xd6\x5c\x06\xe6\xe5\x09\x02\xe1\x97\x96\xe3\x64\x28\x4f\x4e\x8f\x5f\x7f\x78\x59\xe0\x7c\xec\x65\xb2\x2d\x75\xba\x98\x02\xd2\x0d\x2c\xbc\x79\x59\xc0\xee\x67\xb0\xa5\x96\x3c\xcc\xde\xa1\x96\xe4\x86\xb1\xd5\x96\x14\xed\x6f\x4b\xeb\xba\x80\xe3\xac\xee\x77\xaf\x4f\x4a\xad\x79\xf4\xd7\x25\x27\x32\x2d\x2a\x1b\x47\xc7\xc7\x47\x7f\x14\x85\xbb\x1d\x2f\x93\x9f\x83\x95\x0e\x25\x55\xb8\x91\xe6\xf3\xad\xcc\x44\xcf\xc4\x6b\x8a\xf4\xe3\x93\x37\xcf\x9f\x9e\x36\x66\xa1\xbe\x6a\xf0\xc6\x30\x14\xe3\x41\x43\xf2\x89\x18\x34\xfe\xa7\xd3\xd2\x2d\xe7\x7f\x62\x85\x56\x0a\xdf\xa4\x44\x9d\xeb\xc2\xc5\x19\x0a\x22\x68\x5f\x78\xc8\xe8\x53\x6d\x66\x10\x5a\x3d\x96\xc4\xae\x67\xc8\x13\xb8\xc2\xd5\xdb\x58\x23\xa4\x68\x5d\x38\x24\x2a\x5f\x65\x74\x05\xac\xf1\xee\xe3\x87\x97\xcf\x8f\x1b\x1c\x71\x35\x3e\x08\x31\x68\xe0\x62\xd0\x40\x62\x1b\x7e\xa2\x1b\x91\x1c\xdf\x35\x62\x21\x1a\x4e\x2b\x43\xd3\x72\x1a\x42\x6a\x15\x8a\x18\x2b\xf8\x85\x96\x8c\xea\x2d\xd9\xf1\xfe\xb2\x8b\xff\xa2\x81\xb6\xa7\xf3\xee\x4c\x80\x33\xbb\xc4\x25\x76\x60\xb0\xd9\x57\x3c\xfe\x38\x93\x9f\x54\x34\x15\x4a\xdf\x91\x84\xd2\xfb\x12\xb5\xc9\x85\x55\x16\x90\x54\x5a\x16\x31\x53\x0d\x49\x4a\x2f\x67\xaf\xc9\x25\xb1\xbf\xa0\x50\x5e\x67\x9a\xbc\xd6\xa4\x68\xd0\xae\x57\x18\xbf\xd2\x1d\x42\xc4\xa4\x3b\x82\x90\x75\x7a\xe1\x61\x94\xaf\xc8\xad\x56\x4a\x40\x74\x1e\x5e\xa4\x83\x53\xad\x5e\xf4\x02\x16\x10\x53\x59\xa9\xa6\x20\xab\x65\xcf\x2b\xc8\xaf\xf5\x34\xbe\xbe\xc2\x92\x46\x34\x88\xb4\xc4\x7e\x4e\xd7\x90\x9d\x81\x6f\xa8\xea\xf9\xae\xdf\xf3\x99\xef\xfa\x29\x31\xbe\xf5\xe9\x84\x43\x52\x23\x65\xc8\x5e\x1b\x84\x30\xcc\x89\x99\x68\x72\x87\x2d\x1f\xd2\xbc\xe9\x5e\x4d\x38\x5b\x17\x51\xfa\xb5\x53\x9a\xe1\xd2\xb4\xaa\xf0\xdb\x6c\x6f\x76\xcd\xaf\xdc\x1c\xb8\xb7\x3d\x6c\x05\x38\xee\x0d\xa4\x3d\x18\x54\x07\x70\xa4\xcd\xb2\x83\x03\x88\xfb\x09\x81\xcb\x4b\xfd\x69\xac\x84\x92\x4f\x7b\x52\xde\x42\x9d\x91\x48\x40\x4e\xc6\x8a\x0d\x55\xbb\xf1\x54\x94\xbe\xaa\x6a\x16\xf9\x12\xf5\xfc\x76\x2a\x02\x1d\xca\x91\x59\x94\x70\x31\x2a\xfc\xf2\x32\xf7\xd8\x2d\x7b\xb2\xa5\xbb\x6d\x56\x80\xdc\x85\xbb\xd5\xed\x2d\xad\x53\x1d\xaf\xda\xf5\xd2\xe5\x06\x8f\xcb\x7b\xe9\x32\x96\xae\x4b\xe9\xd2\x90\xca\xfa\x8a\xc8\xdd\xea\xd4\xc5\xb5\x1b\x20\x8e\x20\x13\xc3\xa9\x4c\xcd\x26\x6c\x0a\x36\x95\xb9\xff\x38\x17\x9c\x39\x86\x01\x62\x18\x34\x9b\xcb\x50\x25\x5a\x05\x42\x89\x55\x50\xbb\x05\xd4\x10\xa1\x86\xcd\xe6\xc8\x40\x8d\x40\xb9\xa3\x62\x1a\xe4\x50\x57\x08\x75\xb5\x0a\x57\xbe\xb8\x94\x10\x94\xd8\x6f\xb4\x5e\x6b\xde\x2a\x54\xee\x62\x10\x4a\xea\x73\x4f\x1c\x6a\xdc\xc8\x34\xcc\x67\x2a\xc6\x4d\xb5\x73\x71\xb1\xce\xfb\x3f\x5b\xab\x88\xa2\xc2\x63\x57\xdf\x70\x78\x47\x14\x18\x01\x08\x92\xb6\x1c\xa7\xac\x18\xdf\x95\x39\x50\x22\xce\xdb\x4d\xe6\x9d\xdd\xc8\xd4\xa9\x1e\x7c\x2d\x99\x41\x5b\xa0\x3b\x2a\xa1\xbb\xdf\xf6\x3a\xc0\x8d\xd2\x9c\x7f\x3e\xa9\x7e\xee\xd6\x3e\x9f\x56\x3f\xef\x80\xef\x49\x08\x3c\x53\x85\xd5\xd2\x9f\x6f\xd0\xd2\x77\x11\x7a\x80\x8a\x3f\x7c\xdb\x00\xb8\x57\x02\xc4\x56\x7c\x97\x65\x9f\xfc\x53\x24\x42\xa2\xeb\x19\x84\xf7\x5d\xb6\x5a\xa9\xa9\x80\x3d\x78\xe5\x9d\x5f\x2c\x32\x09\x79\x66\x60\x41\x16\x2d\xb8\x2c\xcf\xf8\x53\x49\xca\xd3\x5c\x92\x23\x49\x9e\x1a\x00\x4a\xcb\xf3\xfc\x4d\x4a\xa0\x74\xaf\xac\x81\xa4\x28\x20\x62\x6c\xf2\xbb\x4a\x4b\xca\x63\x51\x43\xff\xc6\x7e\x05\x5b\x0d\x56\x61\x9b\xf7\x41\xb2\xad\x2e\xbc\x92\xc6\x32\xcb\x2b\xc5\x0a\x8c\x9c\x78\x25\x53\x4f\x36\x85\xad\x0f\xa9\xbf\xdb\x94\xe8\xf4\x24\x7b\x25\xdd\xf8\x2a\x1c\x6a\x42\x7b\x74\xab\x1c\x15\x82\x3b\x3a\xca\x1d\xa6\x16\xb3\x34\xf3\xc9\xdd\x36\x2c\xde\xb1\xfb\x62\x5d\xf3\x4f\x0e\x37\x32\xb6\xe7\x08\xc5\x8f\xec\x51\xe5\x8e\x98\xf9\x19\xa2\x88\x35\x93\xc7\x36\xc8\x20\xc4\x0f\x3e\x31\xe8\xcc\x72\x93\x41\x2e\xc4\x38\x16\x86\x5a\x0c\x1e\xc9\xf7\x19\xdc\xa1\x1b\x60\xd5\x7e\xa5\x27\x0c\x1e\x69\xba\x10\x5d\x10\xe1\x90\xec\x5b\x6a\x52\xf2\x94\x7b\x55\x9d\x83\x69\xc5\x43\xac\xf8\x2a\x6b\x32\xc5\x4a\x1b\x86\x06\xc3\x5d\xe8\x84\xec\x78\x5d\x63\x0a\x1a\x50\x08\x3d\xe5\x8e\x16\x90\x95\x1d\x2c\x16\x0b\x22\x69\x0f\x7b\x7b\xb1\xd8\x60\xcd\xbd\x36\x03\x25\x40\xba\xc1\x33\xf3\xe7\xb1\xf9\xb3\x57\x2c\x08\xcb\x31\x37\xf4\x7e\xb1\xa8\xec\xe0\xbd\xae\x19\x72\x76\xed\x9a\x91\x81\x04\x09\xaa\xaf\xdc\xe1\x98\x8f\x62\xef\x26\x0a\x07\x8d\x0e\xed\xe1\x2a\x36\x9f\x4f\x49\xea\x16\x8d\xd8\xfd\x02\x42\x46\x02\xa6\x09\x2e\x65\x66\x25\x66\x9c\xf8\x10\x9a\x45\x71\x85\xed\x0f\x02\xa5\x94\x30\x1a\xd0\x47\x99\x79\xa7\x3e\x1a\xf1\xd4\x4b\x5c\xde\x6c\x12\xa2\x99\x9e\xcf\xef\x17\xf4\x5c\x5c\xb0\xc4\xe5\x04\xcd\x24\x30\x10\x2b\x10\x0a\x76\x3f\x42\x8b\xda\x92\xb8\x80\x84\x49\x37\x00\x6e\x74\x64\x30\x7a\x8e\x40\x3d\x67\x98\x6f\x4f\xb9\x57\xec\xa9\x24\x33\xf2\x5c\xe6\x1d\xd5\x28\x87\x2c\xe1\x17\x09\xf7\xdb\xde\x3e\xf8\x5e\x99\x19\xec\xde\x8d\x74\x79\xc5\x9d\xec\x6e\xf7\xef\x08\x07\x81\xc2\xcd\x0b\x9a\xcd\xa8\x7f\x8b\x31\x7d\xca\x0d\x41\xb9\xdf\xcd\xdb\x3b\x7c\x11\xf4\x95\x6b\x86\xda\xbc\x32\xc3\x00\xd2\xf5\x29\x5d\x90\xb2\x7f\x4d\x2f\x48\x04\x7e\x69\x80\x7c\xdb\x54\x33\x26\x02\xa4\xe9\xd6\x21\x09\x8d\xae\x00\x8a\xc2\x4b\x49\x22\x08\x5c\x1f\x12\x12\xd2\x1c\x47\xf5\x2d\xf0\xfe\xfd\x34\x52\x3a\xf6\xf8\xc2\xbb\x4f\x77\xb7\x24\xbb\x5f\xe0\x00\x1e\xff\xaa\x4c\x50\xee\x88\xd4\x45\xc2\x9a\xf5\x62\x46\xde\x49\x90\xee\x15\xa4\x62\x5b\x55\x59\xee\xeb\xe6\x68\x30\x14\xe6\xd7\x9e\x82\xb1\x11\xe8\x85\x6c\xfb\x59\x97\xe8\x13\xf3\xdd\xb4\xe1\xd9\x46\x51\x2e\x3d\x09\x51\xcd\x87\xf3\x32\x5f\x8c\x90\x85\x20\xc9\x76\x3a\x91\x2d\x5f\x48\xb2\xd5\x01\x05\x09\x2e\x74\x14\xcc\xef\x2e\xe8\xfc\xb7\xa4\x6f\xd2\xf5\xf4\x7e\xdb\x73\x86\xb7\x0e\x70\x2f\x39\x17\x17\xf3\xf9\x7d\xe8\x9d\xc1\x77\xef\xac\x12\xb5\xf6\xa2\x34\x6f\x53\x2d\x49\xe5\x5a\x52\xd7\xb3\x13\x40\xb9\xd7\xc0\x19\xe1\x2c\x81\x88\x09\x98\x11\xd9\xff\x28\xcf\xf9\x85\x2b\x3c\xfb\xef\xb0\xa2\xe7\x15\x5b\x89\x51\x4f\xe1\x76\xd5\x0f\x6a\x44\xe7\xd4\xc8\x8d\x7c\x09\x36\x3a\x62\xb1\x1d\x65\x26\x08\xd1\xe7\xc9\x85\xa9\x86\x43\xc2\x48\x82\xce\x66\x5a\xa2\x1b\x64\x3f\x71\x43\xf6\x9a\x70\x48\xdc\x90\x7a\x89\xfb\x3d\xfd\xf1\x9d\x42\x42\x73\x67\x42\x61\x48\x28\x77\xd2\x0b\x5c\xdf\x98\x04\xae\x4f\xb1\xad\x86\x39\x4d\x6b\xd3\x8a\x7b\x15\xb7\x05\x92\x91\xf6\x89\x1b\x81\x86\xfb\xa9\xa7\x5c\x09\x3f\x3c\xb1\xb0\xcb\x14\x87\xa8\xe8\xbc\xcf\xd8\xdc\x8f\xf2\x5c\x5e\x34\x9b\x53\xb2\x5b\xea\xd7\xf7\x55\xae\x43\x48\x40\x48\x76\x2f\xbc\x2f\x12\x94\xa7\x80\x7b\x4f\xe4\x02\xbe\xe6\x6b\xe0\x97\xb5\x5a\x4e\x25\x6c\xe5\x49\x3e\xe1\x35\x04\xec\xfc\x02\x22\x86\x98\x5d\x65\xa4\x9d\x66\x1d\xa8\x4d\x0f\x3b\x18\xb1\xd0\xa7\xe1\x44\x44\x49\x49\x66\x67\xab\x35\xa5\x0b\xd0\xf9\x60\x94\x3e\x07\x63\xc1\x55\x56\x4c\xa1\x3f\x28\x83\xb2\x75\xfa\x2c\xb4\xed\x72\x83\x35\x7e\xff\x9e\xca\x36\x2d\x69\xa1\x02\x06\x90\xb0\x88\x28\xb4\x09\xad\x79\x92\xe9\x8f\x1c\xc3\xa2\xf8\x05\x29\x02\xe5\xc2\x05\x85\xfb\x38\xf1\xe3\x40\x85\xbe\xa8\x88\xbd\x20\x5b\xd5\x17\x90\xc8\xd5\x20\x44\x9a\x25\x20\x48\x1d\xf6\x94\x96\x5c\xcb\xf4\xb0\x33\x9f\x07\xb8\x31\x80\xbe\xfc\x2e\x5d\xd8\x59\xfb\x43\xf6\xd6\x48\x9e\x55\x06\x0d\xee\x85\xd2\x4c\xcd\xfa\x24\x99\x93\xc8\x81\x18\x86\x52\x0c\x0a\xdb\x7c\x10\x05\xc9\x44\x48\xdd\xcf\x1e\xbc\xfb\xd2\x8e\xff\xdb\x5c\x39\xe2\xd3\xa9\x90\x83\xa7\x57\xe1\x78\x60\x3a\x7c\xd5\x02\x2b\x98\x70\x65\x34\x10\xc5\xb2\x31\xe5\x4a\x48\xfd\x21\x1a\x08\x57\x89\xe9\x98\x07\xc2\x22\xd8\x56\x44\x96\x97\xdc\x05\x05\x41\xe1\xbe\x22\x6f\x7e\x5f\xa9\xcb\x9a\x96\xfc\x51\xe1\xc7\xb2\x5b\xf4\x2f\x36\xc1\x3a\xa5\x31\xbf\xcf\x64\x08\xef\x89\x16\x4b\x5c\x7f\x3e\xef\x40\xba\x97\x95\x14\x5b\x6c\xad\x62\x97\x0a\x85\x6c\xe0\x05\x30\xf0\x06\x0a\xe3\x1f\x3d\x0d\x43\x8f\x83\xef\x09\xd4\x10\x48\xba\xe2\x83\x54\xff\x1d\x04\xfe\x1a\x89\x3b\xbf\x44\xa2\xdd\x99\x51\x9b\xb4\xf4\xef\x9e\xc4\x25\xc5\xf7\xba\x2d\xa2\xb0\x72\x5a\x19\x20\xad\x6a\x65\xf6\xcd\xf2\x03\x13\x4f\xc1\x75\xa6\x59\x2c\xd6\x08\x0e\xad\xc8\xb9\x04\x75\xb1\x42\xef\xb2\x7a\x63\xca\xb4\x42\x6d\x30\x86\x2c\x0e\xd0\xab\xb0\x64\x61\xcf\x0b\x74\xa7\x2b\xb6\x41\x21\xcc\xf1\x80\x58\x85\xa9\x08\x87\x46\x5c\x5c\x31\xb2\x71\x03\xa0\x84\x0e\x92\x55\x08\xcb\x61\xd2\x8b\x5f\xd8\x20\xa8\x20\x04\xbe\x0a\x65\x35\x72\x7a\xf1\x4b\x5b\x08\x35\xb4\x10\xac\x42\x5c\x8f\xa5\x5e\xfc\xe2\x36\xc3\x12\x72\x88\x56\xa1\x5f\x0e\xae\x5e\xfc\xf2\x66\xc4\x8a\x2a\x20\x5c\x55\xc9\xaa\x60\xeb\xc5\xfa\xc8\x0d\xa3\x9f\xf0\x8e\x53\xd2\x81\x28\x04\x1b\x66\x8a\xc3\xbb\x65\x60\x88\x36\xc2\xee\x54\x60\xc3\x8d\xb0\xbb\x65\xd8\xde\xba\x79\x80\xa0\x7b\x06\x54\x41\xe4\xdd\x0f\xb1\x84\x5e\x54\xa6\xea\x50\x15\xb2\xd4\x31\x6b\xd1\x54\x3b\xc6\xa0\x72\xa6\x8e\x27\xd7\xcc\x51\xd3\x09\x68\xae\x6d\xf7\x67\x84\x2b\x30\x0a\x07\xd1\x4c\x82\x64\x63\x81\xfb\x8b\x11\x35\x02\x47\xb8\xdb\x46\x34\xf7\xef\x88\x2f\x40\x1e\xee\xf6\x63\xe5\x8d\x15\xc4\xc2\xa8\xbe\xc2\xe5\xd4\x9b\x91\xa1\x48\xfd\xc4\x0b\x4a\xbd\x34\x3e\x0d\x44\xb6\x9b\xa7\x20\x5e\xd7\x0f\x8d\x4b\x22\xed\x72\x6c\x44\xa2\x19\xb3\xb5\x3d\x16\xbc\xf3\x0c\x68\xf0\x8e\x02\x7f\xe2\x29\x97\x3f\x01\x7e\x63\xfe\xbd\xa9\x74\x05\xca\xc5\x92\x2e\x78\xbf\x28\x85\x95\xe5\x4e\x23\x0e\x82\x69\x77\x1b\x12\xa6\x5d\x89\x21\x00\x51\xcf\x0c\xde\x16\x63\xa2\x4f\x34\x53\xa8\xba\x12\xf3\x0f\x33\xab\x97\x19\x2c\xc6\x98\x68\x36\x9d\x60\xcc\xe3\xd8\xfc\x48\xfa\x37\x8a\x68\x7b\x5a\x01\x55\x48\x4e\x3d\xfb\xf5\x03\x9f\x88\x1c\x42\x59\x08\x85\x10\x8b\xe5\x30\xb8\x1b\x55\xd1\xbb\x99\x3c\x57\x17\x3d\xf3\x87\x89\xbe\x68\x39\x0d\xa7\xa5\xbd\xd2\x79\xb5\x6d\x55\x75\x7f\x6d\x67\x16\x78\xbe\x45\x60\x20\xdc\x6b\x8c\xf0\xbc\x66\xd2\x9d\x60\xfc\x31\xcd\xbc\x07\x39\xd8\x27\xe9\x06\x4a\x70\x2d\x4e\xc5\x2d\x2e\xe1\x36\xda\x2e\x1c\x92\x3d\x04\x2b\x79\x77\xa5\x7b\x8d\x26\xe4\xf7\x9e\xf9\x24\xdc\xed\x1e\x5d\xda\x03\x48\xfa\x09\x3b\x4f\x40\xb8\xdf\x2f\xbc\x6c\x27\xda\x28\xc8\x46\x69\xb8\xee\xd9\xb8\x8f\xfb\xef\x5e\x02\x53\x4f\x65\x0e\x1e\x12\xb0\x6d\x45\x04\x18\x1b\x59\x8c\x27\x97\xe2\x46\x48\x7d\x69\x54\x8c\x4b\x25\x86\x8c\x43\xb0\x08\x87\x64\xb7\x4c\xf5\x44\x11\x63\xc0\x5e\x11\xe9\x8e\x28\x28\x90\xee\x80\x42\xd0\xcb\x1d\xf8\xfd\xbc\x59\xcf\xc7\xc2\xa8\x3b\x1f\x4e\x88\x74\x87\x80\x1b\x59\xf5\x6f\xb8\xbd\xd5\xfb\x21\x9b\x4d\x87\x9b\xf9\xe2\x06\xcd\x66\xe0\xf2\xc1\xe0\xb9\x21\xe4\x5d\x18\x6b\x21\x85\x22\x4e\x30\x0e\x83\x6b\x07\x7e\x48\x12\x50\x0a\x86\x84\xb4\xe6\xdc\xb9\x18\xa1\x51\xbd\x62\xdb\xe0\xad\x24\x01\x6c\x2b\xd2\x35\x8d\xe8\x47\xe7\xe1\x85\x67\xfe\xe0\x46\x40\xae\x68\x06\x25\x9f\xb6\x5a\x72\xae\x1b\xf3\x4b\x97\x43\x56\x7a\x46\x24\x99\x81\xe8\xaf\xf4\x25\x30\xe9\xc6\xfa\x6e\x2c\x56\x46\xa4\x2e\x88\x84\x84\x7a\xe9\xe4\xaf\x62\x28\xdb\x7e\xd2\x0c\xc8\x8b\x18\xb9\x08\x9f\xcc\x34\x28\xcc\x41\x5d\x84\xf2\x88\x0b\x08\x98\x31\xf5\x0c\xeb\x70\x74\x03\x05\xf6\xaf\xfb\xc3\xdd\x66\x8c\x71\x34\xec\xdc\x1f\x8c\xf7\x82\x48\xea\x50\x26\x62\x21\x5d\x25\x26\xd1\x8d\xa8\x76\xb4\x30\x2b\x50\x50\x38\x34\x42\x30\x53\xb9\x74\xee\x27\xb3\x29\x86\xee\x0f\xd0\xec\x06\x45\x07\xc8\x6c\x0b\x44\xd3\x52\xaf\x41\x62\xc4\x98\xa2\xa0\x98\x76\x39\x70\x96\xf4\x93\xc3\xdd\xbe\x72\xb9\x67\x84\x88\xa7\x40\xb3\xae\x99\xa2\xca\xf5\xbd\x5d\xc6\x92\x66\x13\x65\x4a\xc0\x88\x6e\x36\x4d\x17\x46\xd3\x4f\x2a\x9a\xf2\x11\xb7\xcb\x0d\x90\x9d\x25\xf0\x1b\x6a\x40\xa7\x0a\x19\xf7\x99\x18\xf2\x64\xac\x09\x85\x90\xf6\x04\x0b\xdc\xef\x3d\x1b\xdc\xbb\x1c\xb5\x2e\x28\x67\x82\x70\xda\x43\x1f\x58\xc1\x44\xb9\x35\x12\xb5\xdb\x3d\x03\x73\x1e\x5d\x18\x30\x63\x47\x4c\x17\x01\xe1\xe8\x25\xc9\xd6\x6e\xf7\x07\x93\x30\x5c\x10\x05\x9c\x82\x5c\xe6\x5b\x01\x01\xf8\xaa\xd9\xbc\x9f\xf2\x38\x0e\x6f\x84\x37\x36\x75\x1e\xee\x18\xed\xc1\x08\xb6\xc0\xba\xe0\xd6\x8f\x85\x05\xcb\x54\x3d\x64\x11\xe4\x9d\xdd\x55\xdc\x97\xab\xba\x96\xe3\x4a\xb1\x3e\x3d\xd1\x97\x6e\x2c\xf4\x91\xd6\x2a\xf4\x13\x2d\x88\x3d\x62\x96\xd6\x5b\x7a\x4d\x17\x39\x7f\xee\xfd\xbd\x3a\x20\x61\xc2\x1d\xa2\xb4\x89\x96\xea\xfb\x70\x42\x12\x58\x5d\xa7\xfd\x54\xd4\x7b\xc3\xc7\x89\xc8\x45\xfd\x95\x08\xae\xc5\x20\xfd\x89\xce\x36\xc6\x12\x33\x27\xd0\x0d\x47\x17\x0b\xad\xee\xee\x67\xa1\x1c\x44\xb3\x15\x62\x43\x3b\x76\x57\xe0\x23\x8a\x4a\xd7\x9a\x66\xf9\xa6\xe6\xfd\x02\x9c\x74\x60\x1c\xb8\x1f\x09\xed\x95\x54\x1b\x5f\xb1\xad\x8e\x51\x4d\x8a\x50\x8a\xd2\xce\x55\x65\x09\x38\xcf\xa3\xcc\x47\xa9\xec\x80\x0e\x2d\x9f\x70\x9e\xaa\xb2\x09\x77\xbf\xed\x29\x50\x9e\x86\xd8\x13\xa0\x53\x3d\x1e\x92\x4c\xa1\xcf\x1d\x25\x45\x30\x51\x69\xeb\x45\x55\xce\x7b\x60\xec\x65\x26\x98\xa4\x51\x13\x8c\x36\x61\x26\x63\xb2\xc5\x98\x15\x05\xdd\x2d\xec\xb1\x1d\x7c\x51\xf6\x76\x4c\xcd\xda\xd9\x01\x81\x1b\xa2\x6c\xb5\x1f\xc7\xc8\xd4\x5f\x3c\xcc\x64\x96\xd7\xfc\x48\x5a\x6a\xc9\x49\xd7\x18\x4a\xd2\x1d\x80\xf0\x04\x0c\x3d\xb3\x0e\xf8\x9e\x74\xfd\xc5\xc2\x08\x06\xce\xba\x8b\xd4\xf7\xc4\x53\xcf\xd3\x7e\x65\x37\x78\x0c\x91\xa9\x1c\x42\x16\xe4\xfb\x8a\x2c\x64\x8c\xe5\x12\x7e\xd8\x6c\x86\x66\xa6\x0e\x59\x70\x1e\x1a\xe6\x30\xb2\xdd\x74\xc0\xb0\xdc\x56\xa2\x70\x21\xbe\xa6\x3d\xf3\xa0\xcc\x8a\x6c\x15\xa3\xda\xd8\xb9\xd7\xa0\xdc\x6b\xf0\xcd\xf8\x61\xb9\xce\xa1\x9f\x47\x97\x61\x7f\x75\x41\x80\x4f\xf3\xd0\x91\x8c\xd8\xd8\xac\xcd\x30\x66\xca\xfd\x0e\x03\xb6\xd5\x85\x1b\x53\x1d\x2e\xd6\x37\x66\xb1\x1e\xb0\xad\x0e\x2c\xad\xd8\x71\x3f\x66\xe7\x31\xdc\x98\x15\x3b\x4e\xc3\xb7\xcd\x8a\x7d\xc3\x6e\xdc\xeb\x7c\x65\xdb\x66\x2a\x45\xb5\xbd\x1e\xd5\xb8\x3f\x66\xe7\x63\xd8\x36\xa8\xc6\x16\xd5\xb6\x41\xb5\xcd\xb6\xdd\xeb\xac\x89\x83\x66\x33\x4e\x9b\xb3\xc5\xd8\x38\x7d\xec\xd7\xb9\xc1\x23\x64\xb0\x6e\xda\xb3\x4e\x4f\x1f\x16\x67\x0c\xec\x4e\x9e\x3c\xd7\x17\x86\x13\xcf\xf5\xc5\x8a\x6d\x3c\x12\xc3\x98\x7a\x31\x63\x6c\x4c\xe7\x73\xac\x67\x07\x04\x8c\x6d\x17\x9b\x7e\xbf\x81\x6d\xc3\xd2\xad\xee\xd2\xde\x37\x0e\x82\x74\x39\xee\x2b\xf2\x74\x0c\x76\xd1\x8d\xcd\x97\xb6\xd1\x11\xdd\x2c\x9f\x21\x70\x5b\x0f\x33\x5a\x82\xb8\xce\x20\x76\x3d\xdc\x3f\xbe\xc2\x7a\xae\xd6\x4e\x13\x9f\xdd\x19\x2e\x19\x80\x32\xaa\x87\x9f\xd2\xb3\x87\x3c\xd1\xf3\x99\x72\xc3\x62\xc3\xb5\xdc\x82\x0c\x72\xdf\x72\x4f\xd9\x81\x5c\xa2\x26\x49\x97\xf4\x5e\xbe\xa1\x6c\xd6\xb6\x74\x37\xb7\x4f\x08\x2f\xd7\x4e\x4b\x95\x73\x63\x8c\x66\x72\x81\x7a\x25\x8a\x4b\x67\x8e\x55\x4d\xc1\xc8\x2c\xb5\x22\xf4\x43\x52\xa3\xd6\x6c\xe1\xd2\x6a\xd4\x93\xec\x69\x37\x7f\xda\xc3\xa7\xbe\x0d\x14\xe9\x93\x88\xc9\xf3\xe4\x82\x32\xc6\x88\x0d\x73\xa6\xcd\x66\x2a\xbf\xd3\x12\x99\xfc\xb6\x32\x28\xd5\x79\x74\xb3\x49\x48\xc0\x22\x6a\x94\x13\x12\x31\x4e\xdd\x6d\xdc\x86\x0e\x5c\x0e\x51\x7a\xdc\x8a\x08\x26\xec\x7e\x8b\xd5\xeb\x2b\xbf\x75\x3f\x55\xc0\x74\xdf\x71\x32\x55\x4a\x9b\x0a\x76\xed\x5b\x2b\x4b\xd1\x56\x33\x62\x69\x08\x51\x26\x5e\xbd\xe5\x93\x3e\xe7\xc9\x85\x41\x63\x56\x0a\x2f\xed\xe4\xec\x68\x9a\xa9\x11\x12\xd3\xd9\x75\x82\xb0\xdb\xc2\x34\x62\x06\x7b\xaf\x42\x74\x68\x04\x62\x58\x3e\xdb\x59\x1c\xe2\x2e\xc9\xf0\x4c\x72\x0b\x94\xdc\x02\x24\x4b\x32\x41\xa7\x18\xcf\xa6\x99\x3a\x94\x7d\x1c\xd4\x03\x10\x70\x7f\xe3\x29\x08\x3d\x3c\xdc\xe0\xc9\x43\x95\xf2\xc1\x43\xfb\x49\x82\xf0\xf8\xa2\x50\x8b\x03\x26\x0f\x55\x1f\x2d\x57\xd6\xe9\x45\x87\x41\x2f\xca\x82\x41\x42\x96\x9c\x47\x17\xbd\x91\x22\x21\xf0\xf3\xe8\x02\x34\xb4\x5a\x36\x76\x35\x44\x67\x54\x89\x4b\xaf\xd5\xea\x03\x39\xc0\xd9\xfd\x22\xf3\x45\x5b\x05\xdc\x34\x63\x98\x0b\x68\xf0\x59\x98\x3d\xc6\xac\x03\x63\xd6\x81\x01\x13\xbd\xf8\x70\xd8\x6c\x8e\x0f\xfd\x74\x83\xf5\x06\xb6\x19\xb9\x61\xd1\x79\x7c\x41\x5d\x0e\x13\x46\x9e\xb3\xf0\x7c\x8c\x3f\xae\xd8\x8d\xeb\xc3\x94\x3d\x77\x7d\x23\xd8\xb7\xb7\x18\x9b\xd8\x52\x23\x98\xc1\x1d\xdc\xc2\x35\x1c\xc1\x89\x29\xdc\xea\x5e\xc0\xa9\x29\xd8\xea\xe2\x22\x70\xd2\x6c\x92\x19\x3b\x71\x7d\xb8\x63\x13\xc3\xa6\x23\x76\x62\xf8\x0b\x4e\x9b\x4d\x72\xcd\x4e\x5d\x1f\x8e\x98\xd1\x90\xc9\x2d\x3b\xc5\x0f\x47\xcd\xe6\x1d\x1d\x29\x72\x05\xd7\x90\x40\xab\x35\xa0\x70\xa2\x30\xd9\xc4\x36\x4c\x61\x6c\x54\xb2\x41\x8b\x5d\x59\x4f\xe1\x69\xf6\x65\x66\x21\x07\x2d\x36\xb3\x5f\xe2\x16\xdb\x81\x71\x8b\xed\x58\xfd\x32\x1c\x92\x23\x3a\x68\xb5\x32\x5c\x93\x0c\x57\x5e\xd3\xa0\x8c\x37\x6e\xb1\x6e\xb5\xf4\x1d\xcd\xeb\xba\xca\xeb\x4a\xa1\x47\x8a\xcc\x60\x9a\x51\xbb\x4c\x43\xb7\x97\x6d\x2e\x6f\x9d\xcc\xe7\xa3\x2d\xc6\x6e\xa9\xaf\x04\xbf\xee\xd5\x71\xd6\xa9\xab\xd5\x71\xbd\xbe\x8e\x9d\x85\xd5\x64\xb1\x3d\x65\x5a\xf2\x16\xb5\x60\xdc\x6a\x2d\x70\x5b\x20\x3e\x1c\xf6\xb2\xf6\x94\x06\xdd\x8e\xf3\x72\x41\x7b\xbc\xb2\xe0\x95\xe7\xf0\x8d\x7d\x9b\xcf\xcf\x2f\x7a\x29\xbd\x25\x5e\x79\xee\xfa\x90\x2a\x54\xdf\x28\xd6\x48\x3a\x87\xd9\x94\x9a\xcf\x3b\x87\x41\xfe\xfc\x2d\x93\xa0\x8f\xcc\xcc\x99\x79\x09\xdc\x7a\x01\xdc\x79\xdf\xd2\x0d\x9f\x23\xc5\x9c\x4b\x31\x9e\xfc\x7e\xf0\xe4\x5d\x29\xa9\xcd\x89\x5a\xb5\x35\x8d\xe7\x0f\x4d\x0f\x07\xd9\xda\x91\x1e\x0a\xbb\x57\x5e\x02\x47\x5e\xc0\xee\x03\xaf\x03\x3f\x3d\x01\xe6\x45\x9c\x7b\x6f\x53\x3d\xc3\x94\x67\x01\x9a\x51\xc6\x4e\x0d\xdc\x80\xde\xd7\x30\x2c\x28\x04\x6e\xc0\x76\xd2\x1d\xee\x8a\xe2\x12\xb8\x3f\x41\x40\x04\x81\xab\x0c\x94\x62\x89\x45\x1b\xb8\xb1\x1b\xb3\xfb\x99\x17\x59\x0c\x8b\x8c\xfa\xd6\x91\xca\x5c\x99\x45\x70\xca\xf2\x4a\x94\xb7\x8b\xe7\xc1\x05\xdc\x92\x96\x11\x12\x54\x09\x11\xc0\xdd\x9f\x10\x40\x92\x2e\xee\x53\x45\x14\x3c\x86\xc4\x74\x70\x00\x47\x46\x34\x2d\x4e\xab\x34\xd8\x30\x84\x7b\xc5\x72\xd8\xcc\x83\x8e\x9d\x72\x1f\x78\xdd\x52\xbf\xa9\xf2\xda\xf9\xbc\x24\x95\xb6\x4a\xdb\xe6\x35\x8f\xa9\x15\x76\x46\x49\xed\xd9\x70\xbe\xd0\x55\x96\xa9\xcc\xda\xca\x53\xb6\xf2\x21\x66\xa1\x55\x9e\xcd\x10\xc4\xfd\xe7\x86\x1e\xed\x5e\x43\xe8\xc6\x10\x51\xef\x11\xbe\x25\xa1\xab\x99\x82\xd0\x4d\x58\x04\x9d\x43\x62\xe4\x5b\xec\xce\x68\xae\x26\xda\xea\x7d\xe8\xa4\xd5\x53\xef\xf1\x72\x41\x62\xea\x8a\xcd\xb2\x12\xbb\x47\x6e\xcc\x94\x45\xb5\x19\x11\xf5\xca\x38\x28\x6c\x11\xd3\xaa\x56\x0b\x37\x4b\x09\x36\x8b\xfe\x33\x67\xc0\x04\xb9\x78\xcc\xb4\x6d\xd3\x1e\xea\x5f\xb9\xf0\x1e\x30\x9d\x2a\x95\x03\xab\x54\x0e\x0a\x35\xd1\x54\x3c\xb0\x1d\xd8\xea\x42\x00\x6a\x85\x6b\xc8\xce\x91\x1b\xa6\x5d\xd1\xcb\x94\xd4\xe0\x2a\x1c\x0f\x3e\x44\x03\x11\xe7\xcb\xcf\x84\x75\x7a\x93\xc3\x9b\x6c\x21\x9b\x64\x6b\xcf\x95\xb1\xfc\xd9\xb8\x7f\x73\x3e\xb9\xf0\xcc\x1f\x94\xf0\xad\x16\x6f\x11\x3b\xf1\x71\x2a\xf0\x43\x36\x6c\x36\x87\x87\x6c\xda\x6c\x92\x84\x49\xb2\x7d\x3e\xb9\x80\xab\x74\x6c\xa7\x90\xf7\x41\xad\x07\xf2\x2e\xe8\x71\x36\x5d\xe4\xfd\x91\xd9\x66\xd0\x01\xe5\xfa\x50\x4e\xac\xf2\x4d\x2d\x6d\x5a\xa0\xab\x2e\x53\x91\xa5\x47\x4a\xcc\x06\xdf\xcd\xb3\x2e\x07\x26\x7e\x57\xab\x14\x65\x55\x56\x94\xeb\xb6\xb2\x06\x51\x8b\x1c\x59\xda\x87\xcf\xf5\xe0\x95\x4e\x22\x26\x4b\xdb\x7f\xa0\xd9\x36\x32\x2c\xed\xe9\x15\xe3\x35\x9f\x93\x55\xaf\xad\x97\xa9\x3e\xb6\x3d\xd1\x6c\xea\x2d\xc6\x64\xb3\x59\xdb\x56\xd4\x20\x4b\x47\x98\x71\xb7\x3c\x06\xe5\x26\xb5\x58\xfa\xd4\x89\xe6\x26\xe6\x3b\x85\xfa\x66\xbb\xcc\x90\x3e\xe3\x9a\x93\x0e\xc8\x5c\xe7\x29\x41\xe7\x6a\xbd\xed\x5a\x37\xae\x2b\xf3\xab\x48\xef\xaf\x7a\xe9\x7e\x67\xca\x8d\xbd\x55\x9f\xd8\xfd\x77\xcf\x34\x61\xea\x29\x37\x59\x64\x55\x1f\x78\xe5\xf3\x53\x71\x9a\x86\x45\xbb\x21\x86\x2e\x66\x1e\x0c\xdb\x23\xb2\xc4\xf6\xe7\xda\xbd\x29\x54\x3e\x99\x85\x83\x16\x0a\x13\x41\x7c\x14\xd5\xbd\x4a\x41\xc1\x4c\xd1\x9e\xc8\xd7\xaa\xb4\xa6\x50\xc6\x42\xe9\x27\x62\x18\x29\x41\xb6\x15\x49\x30\x5e\xd2\x4d\x28\xf0\x7a\x3d\x8f\x8d\x09\xb3\x95\xd6\x40\x0b\x27\x42\x79\x83\xb8\x44\xb6\xe9\x67\x2b\xc0\xb5\x7b\x54\x36\x56\x1a\x9d\x2d\xb3\x00\x29\xf4\xab\xad\x2d\x1c\xb8\x31\xb3\xb3\xc0\x9d\xe5\x43\xf6\x68\x15\xbb\x66\x5e\x12\xdb\x91\xd5\x2f\xe1\xb0\xec\x6e\xd0\x2c\x77\x0f\x3f\x4b\xb7\xca\x5f\x28\x3e\x42\x3f\x71\x9e\x0b\xa7\xdc\x3f\x99\xfa\x7c\x2e\x2e\xdc\xa3\xde\x5b\x69\x2c\x4b\xc6\x58\xe2\x06\xfd\xc4\x8d\x3d\xd3\x5f\xee\x4f\xec\xae\x52\x24\xd3\x82\x68\xf7\xce\x1e\xda\xcf\x1b\x50\x64\xae\x60\xda\xbd\x4d\x03\x13\x92\x72\x60\x42\xba\xce\x27\xe7\xdc\x68\xba\x81\x7b\x04\x11\xdb\x41\x47\x44\xd0\x8f\x6c\x5d\x51\x5a\x57\xaf\x36\x6c\x11\x54\x86\x3a\x70\xd5\x05\x5d\x88\x66\x13\x77\xfe\x45\x29\x30\xc6\xe6\x55\xa8\x1e\xef\x50\x6e\x4c\x24\xed\x0d\xac\x67\xd3\x9b\x92\x6e\x87\x2e\x16\x24\xc1\x74\x21\x0c\xa7\x28\x91\x4c\xe4\xed\x2b\x85\x6a\x3e\x55\x69\x04\xa4\x4d\x2e\x65\x58\xfe\xf4\x6e\x2a\x32\xd6\xf8\x5d\x12\xe9\x6a\x71\xab\x9f\x46\x52\x0b\x69\x8f\xff\x75\xb7\xd6\x80\x3a\x4e\xd1\x49\x59\xa2\x01\x9e\xb9\xf0\x62\xa8\x1f\xef\x2c\x9d\xee\x54\xec\x35\x99\x91\x50\x41\xe2\x4a\x3e\x11\x90\xb8\x68\x21\xe2\x8e\x48\x71\xe2\x5e\xba\x9a\x8f\x3e\xf0\x89\x70\x75\xf4\x2e\x9a\x09\xf5\x94\xc7\x82\x50\x08\xd8\x19\x5a\x16\x45\x07\x82\x28\xbc\x3f\x58\x57\xc0\x5e\x93\xa7\x8a\x44\xe7\xe2\x82\x42\x90\xf7\xe7\x1d\xf9\x03\x8f\xa9\x42\x50\x89\xa5\x50\x20\x41\x97\x36\x69\x31\xd4\x10\xf3\x78\x3c\x33\x7f\x1e\x9b\x3f\xa5\x60\x45\x3c\xcd\x9e\x45\xd8\x0f\x7c\x48\x58\x80\xdd\x03\x9c\x3d\x55\xa5\x48\x95\x77\x95\x78\x8b\xdc\x4d\x2e\x70\xa2\xb1\x2b\xa3\xa8\x2a\x33\x62\xdf\x14\x31\x6b\x97\x59\x3d\x8c\xc9\xb7\x28\x36\xe2\x2f\x2b\x5b\xe8\x96\x4c\x51\x25\x53\xac\x25\x53\x80\x2c\x85\x33\xdc\xa2\x6b\xfc\xd6\x1e\x01\x40\xb2\x03\x33\xb5\x74\xa8\xc7\x02\x22\xf3\xe8\x47\x83\x3b\x08\x4d\x13\xa2\xf5\x4d\xf8\x21\x59\x62\xc3\x18\x18\xc7\x33\xff\xec\x0f\x49\x1c\x53\xd4\xa1\xe4\x8c\x12\xe5\x06\x3c\x6d\x5d\x68\xd6\x9d\xc8\xb4\x2e\x82\x10\x0c\x5b\x43\xc8\x34\xfc\x90\xac\x03\x01\x3a\x55\x82\x83\x66\x93\x64\x44\x30\x3c\x0e\x7d\x40\x6d\xf3\xe1\x8d\x5a\x19\x38\xa3\xc4\x8f\x44\xc4\xfa\x48\x86\x13\xdc\x01\x78\xa1\xf8\x44\xf4\x57\xbe\xad\xc4\xfd\x94\xe2\x9d\x24\x74\xc5\xee\x83\x83\x0e\x2d\x45\xdc\xbc\x53\xc4\x7a\x62\x89\x4e\x4f\xc0\x94\xa3\xa3\x39\xa1\xf7\x09\x6a\x27\x49\xbf\xe3\x91\x37\x8a\x70\x0a\xb8\xd3\xda\xcd\x27\x59\xed\x24\x1e\x93\xa0\xfa\x04\x61\x50\xfc\xa0\xb2\xd2\x35\xea\x5a\xc7\xfe\xb4\x48\x12\xb6\x53\x8e\xa2\xff\xa0\x8a\x0d\xf4\xe7\xc2\x74\xcd\x38\x0a\xb0\x45\xee\x95\x59\x84\x5d\x3e\x9f\x4f\x49\x97\x2e\xd6\xc6\x33\x46\x11\x7c\x13\x95\x90\x2f\x7a\xaf\x9a\xcd\xab\x30\xd6\x91\xba\x73\x47\x11\x51\x14\x24\xb1\x69\x1a\xb0\xa5\xaf\xd6\xee\x02\xaf\xc6\x96\xa1\x32\x86\xc8\x89\xe6\x5a\xa0\xcf\xdc\x81\x12\x5e\x38\x53\x6b\x53\x28\x6c\x46\x9a\xea\x00\xeb\xf0\xde\xd7\xdd\xf9\x65\xef\xfc\x02\x56\xec\x98\x78\xd5\x80\x62\x78\xbd\x9a\xad\xec\x6e\x41\xdf\xfe\xe3\x9d\xa9\xf2\xbe\x7f\x35\xd0\xe4\x52\x92\x5a\x40\x5d\x39\xb7\x29\xbd\x7f\x2a\x49\x82\x01\x60\x45\x82\xd3\xe5\x1d\x20\x55\xdd\x01\xc2\xd3\xd2\x25\x42\xf5\x9a\xbd\x1f\x1b\x72\xb7\x2a\x86\x22\x3d\xc3\x53\x3e\xc5\xa4\x68\xff\x5a\xe3\x2e\xbe\x77\xa4\xcb\x7b\xf1\x1f\x53\x5e\x5f\x11\x3d\xab\xe8\xfd\x1b\x55\x1e\x17\x1b\xe8\x9e\x05\xa9\xb9\x23\xa1\xd3\x4d\xda\x27\x77\xaf\x07\x66\xae\x28\x22\xfb\x47\x92\x18\x99\x46\xbd\x13\x49\x06\xb8\xe1\x67\x27\x31\x46\xed\xaa\x6a\xd4\x6e\x11\x28\xf7\xb1\x2e\x5a\xb2\xd5\xea\x5c\x5d\x10\x0a\x4f\x37\xc5\xed\x6a\xb6\x1c\x70\xf2\x5a\xb9\x71\xa0\xa2\xf1\x18\x21\xe1\xe9\xa2\x1e\xf8\x58\x6d\x19\x86\x3a\x6a\x42\x4b\x67\x06\xf4\x86\x78\x8f\xf5\xe4\xa6\xb5\xbe\x13\x43\x63\x86\x65\x3f\x4f\xa3\x29\xd3\x69\x23\x0c\xee\xaf\x8a\xfd\x55\x82\x99\x5c\xe3\x0d\x98\x6a\xf1\xc3\xc2\xeb\x17\xb1\x4e\x2f\x68\x36\xa3\x43\x6e\x17\xd1\xd0\x68\x33\xc5\x21\x7d\x63\xde\x33\x79\x1e\xb5\x5a\xb8\x11\x76\xae\x5a\xad\x8b\x66\x93\x74\x3b\x8c\x85\x7d\xa2\x5b\x2d\x10\xac\x4b\x3d\x22\x5a\x2d\xc0\x34\x0e\x8c\x91\x83\xdd\xbd\x47\x8f\x9a\x21\xed\xd7\xca\x79\xdd\x62\xff\xfb\x0d\x09\xfa\xca\x6b\x77\xd3\x28\x2c\xf8\xb9\x21\x2a\x4c\x1d\xe6\x66\x51\xb5\x0a\x5d\xa5\x94\xf6\x25\xd1\x6e\x9c\xf8\xb1\x36\x86\xc9\x0e\xa5\x7d\xd5\xda\xf1\xda\x5d\x4f\x12\x7d\xae\x2e\x68\xdf\xf9\x53\xa2\xbb\xf6\x5c\x5d\xf4\xdb\x3b\x9e\x6a\x75\xcd\xd7\x76\x77\x41\xe1\xd9\xa6\xb0\xb4\x6a\x3d\x46\xbb\x59\x50\x78\xa9\x56\x66\x41\xe8\xc9\xc2\x0a\x93\x99\x22\xa7\xab\xa9\x0f\xec\xfe\xb5\x3e\xdc\x7b\x34\x9f\xef\x3f\x2c\x32\xa8\xc9\x42\xab\xa2\xf0\x42\x6d\x4c\x6f\xd1\xe9\x15\xfd\xd2\x53\x85\x72\x5a\x23\xb6\xbd\xf7\x08\xb7\xe7\x0e\x3b\xf3\xb9\x3c\x64\x49\xea\x89\x13\x4c\xfe\x26\x5a\xc9\x22\x8f\xc9\x51\x76\x1c\x3e\xab\x0d\xa9\x1d\x3a\x2b\xdb\x26\x56\xb5\x6d\xef\xd1\x3f\xc5\x7c\x2e\xfe\xb9\xff\x90\x86\x43\x72\xb0\x6f\x7f\x3d\xec\xa0\x7e\x28\x0e\x1f\x3f\x9c\xcf\xbb\x9d\x9d\x43\x91\x92\xa3\x59\xf7\xe0\x37\xdd\x12\xed\x47\x0f\xad\x5f\x2f\x7f\xb1\xbf\xdf\xab\xbe\xd8\x7b\x54\x10\x2d\x31\x1c\xb0\xf7\x57\xcc\x9f\x94\xf2\x26\x20\x43\xf3\xc3\x4e\x3f\x9b\x01\x1e\x6f\xc9\xc2\xef\x1d\xa4\xce\x99\xa8\x36\x0d\x5a\x2d\xda\x33\x4c\x1f\xf5\x89\x60\x5d\xd0\x36\x9d\xcb\x12\xd3\x47\xb4\xd9\x34\xb0\x8b\x9c\xcd\x79\xca\xe1\x36\x7d\x4e\xa5\x77\xcb\x11\x81\x35\x41\x69\xe3\x3a\x24\x93\x62\xd6\x38\x7b\xff\xee\x95\xd6\xd3\x63\xab\x86\x98\x91\x83\xd3\x21\xd1\x8c\x53\x63\x2d\x2f\xef\x41\x4f\x55\x34\x52\x22\x8e\x9d\x8a\x44\xc9\xda\xf8\x34\x9a\x4c\x13\xcd\xfd\xb1\x68\x36\x9f\x9a\xf9\xc2\xc9\x7d\x10\x78\x46\x19\xe0\x03\x31\x80\x60\xe0\x49\x57\x47\x9a\x8f\xed\x6a\xb0\x22\xc8\xc0\x11\x4a\x45\xca\xa9\xc4\xe5\x91\x13\x49\x8e\x86\x6b\x4b\x68\xab\x1e\x2d\x97\x39\x59\x5f\xc6\x10\x54\x2b\xb0\xca\xcc\x5b\x71\x74\x62\xc0\x71\xd7\x3f\x9e\x46\x32\x16\x5f\x8e\xdf\x81\x7f\xe2\xdd\x07\x57\x9e\x74\x63\xcd\x75\x12\x43\xf0\x2e\x7f\x3e\x15\xb7\x7a\x01\xc1\xcf\x15\x47\x5c\xb6\x23\x9b\xa0\xa4\xc8\xc2\x56\x4c\x05\x99\xe6\x78\x71\xfe\x54\x7f\x4a\x87\xc2\xea\x74\x33\xc0\x21\xb0\x46\x89\x31\xe1\x32\x26\x74\xbc\x86\x43\x7b\x9d\xc3\x08\xf5\xb6\x20\x95\x58\xa1\x1c\x91\x0e\x44\x46\x83\x2e\xbf\xda\x69\x45\x14\x14\xbb\x23\x1f\x86\xe5\xe4\xdf\xc5\x1a\x71\xad\xc9\xa9\xb1\x6a\xfb\xbc\xe5\x00\x66\x55\xe0\x1e\xa7\x0b\x3c\xc6\x9a\x87\x9e\x11\x69\x96\xd7\xa3\xf1\xf8\x38\xed\x95\x57\x82\x0f\x84\x8a\x09\xa5\x10\x94\x7b\xcb\x1e\xb9\xc2\xbd\x49\xdb\x3f\x87\x3b\x9d\xce\x7c\xbe\xdb\xe9\x1c\xb2\xec\x15\xcd\xc5\xa2\x51\xcd\x59\x51\xd8\xf4\x25\x9c\x48\x72\x3b\x34\xeb\x74\x4f\x31\x45\x74\x4d\x6b\x38\xb2\xb1\x7f\x1e\x59\x5b\x78\x46\xee\x86\x36\xa1\x98\x59\x3e\x89\x84\xc4\x0d\x70\xf3\x75\x41\x7b\x5a\xdd\xdd\x4b\x37\x9a\x0a\x49\x12\x37\x78\x0f\x89\x3b\xe0\xb0\xd5\x59\xce\x3e\x81\xbc\x75\x3d\x24\x06\xc0\xa0\xd9\x5a\x9f\xad\x26\xf8\xd9\xd3\xae\xdf\xb3\x59\xe3\x30\x88\x24\x9d\x69\xb6\x8b\xcc\x0c\xb1\xd9\xcd\x5c\xdf\x58\xda\x39\xb9\x77\x53\x14\x7c\xca\xf5\x41\xba\xb3\x50\x5f\x3d\x55\x62\x20\xa4\x0e\xf9\x38\x36\x36\xd0\xc0\xcc\x52\xe5\x06\xfb\xd4\x58\xcc\x6e\x3a\x03\x4c\x91\x7d\x97\xdb\x86\x65\xe9\x05\x12\x37\xe0\x45\x14\x46\x2c\xe4\x80\x3c\x1f\x12\x41\xfb\x64\x05\x3d\x4e\x6a\x3e\xb7\x0d\x05\x8e\x3d\xec\x2e\x5c\x9f\x7a\xf8\x54\x56\x42\x5c\xee\x47\x4a\x13\xba\xa8\x6b\x3b\xd5\x50\xd3\x0e\xf8\x9e\x76\x7d\xe0\x95\x29\x20\x99\x11\x0d\x85\xf3\x6d\x46\xbe\x0d\xf3\xfc\xf4\x48\xf7\x17\xb5\x26\xad\x8d\x33\x72\x7a\xd2\x0d\x3e\x36\x9b\x44\xb7\x98\x33\x71\xcc\xfc\x0e\x44\xfa\x33\x74\xec\x38\x16\xec\x7b\x2c\x46\xcf\x6f\xa7\x48\xd5\xf2\x48\x1e\x69\xa3\x59\x3f\x59\xaf\xf3\xcb\x64\x3c\x46\x83\x6f\x92\x96\xdc\x9c\x52\x16\xd2\x5d\xc4\x8e\x99\x99\x36\xd4\x24\x4b\xe1\x03\x11\x6b\x77\x7b\xbc\xd5\x3a\x94\xcd\x26\x86\xc3\x8a\x5b\x11\x90\x80\xd2\x66\x33\xda\x2a\x43\xf6\x0a\x84\x61\x1e\xc1\xd5\xee\xc2\x30\x0d\x57\x09\xcd\xf4\x0e\x33\x3f\x3f\x13\xe7\xe1\x45\x6f\x78\xde\x6e\x87\x17\xcc\x37\x8a\xb3\x8f\x6a\x73\x92\xa5\xf1\xfb\xee\x83\x38\xef\x5c\x80\xb0\x22\x02\x38\x1c\xe3\xa9\x7d\x1b\x8c\x92\x55\x9a\xcf\xe6\xe2\x15\xd3\x90\x26\x18\xd4\xe5\x65\xc5\x66\xcb\x4a\x3d\x48\x9d\x3c\xdf\x5d\x66\x00\xd5\x74\xcd\x70\x48\x82\x56\xeb\x9f\x2c\xc9\xb5\x90\x92\xe3\x85\xab\x11\x6a\xe7\x59\x18\x47\x7b\x17\xb2\x74\xd1\xca\x34\x52\xe5\x29\x9e\x72\xc8\x73\x75\xd1\xd3\xe7\xed\x36\x86\xb3\x5e\x6b\x22\xb0\xb1\x79\x9e\x7f\x6c\xae\x84\x02\x7c\xa9\x8a\x9d\x0b\x08\xe0\x38\x57\xf5\x29\xfc\xd8\xac\x09\xe9\x6c\x4c\xcb\x63\x59\x19\xd9\x9e\xcc\x65\x72\x90\x0d\xab\xa0\xe9\xfe\x99\xd5\x40\xf2\x00\x56\x7b\x78\x87\x43\x2a\xaf\x29\xad\x22\xce\xbd\xfb\x35\x78\x4a\x61\xe5\xc0\x7c\x5a\x6b\x01\xcb\xe6\xa6\x14\x75\x1b\x33\xe0\xfd\x8f\x0d\x25\xd5\xe1\xa1\x5c\xd0\xde\xd9\xda\x7a\xd5\x3f\xff\x29\x37\x64\x3a\xfe\x27\x7e\xee\x55\x12\x2c\x8a\x75\xc7\x21\xf3\xf3\x5e\xaf\xa5\x16\xea\x86\x8f\xcb\x56\xd0\x53\x49\xc4\xc6\xd3\x5e\x79\x21\x45\x6b\xe7\x71\xdf\x96\xa2\xdb\x1b\x33\xf2\x5d\x83\xf3\xa7\x6c\x34\x1a\x0d\x07\x66\xe4\x29\xfe\x72\x40\x96\xf7\x43\x7e\x2f\x97\xb8\x23\x97\x7a\x6d\x03\x5b\x46\xdd\xef\x18\x49\x96\x17\xfe\xa3\x5c\xf8\xf1\xc3\x43\x46\x24\x3b\xc3\xa3\x56\xcd\xa6\x3c\x64\xdd\x9d\x9d\x02\x56\xea\x02\x36\x07\x3b\x64\x8f\x3b\xcd\xe6\xc1\xfe\x21\x2b\xf9\x43\xd5\x6a\xc8\xfd\x87\xcd\xe6\xde\xa3\x0a\xa4\x2e\x41\x5a\x62\xe6\x73\xac\x67\x3e\x47\x24\xa5\xbb\x30\x74\x25\xbb\x40\x71\x01\x45\xe5\xbd\xcb\x4b\x37\x3c\xac\x29\x11\x94\xde\x3b\x0e\xda\x34\xa8\xf8\x6a\xf6\x11\x42\xcd\x26\x30\xd4\x8c\x54\x3c\x15\xa5\xc3\xc6\xca\x0d\x30\xbf\xf0\x00\x92\x75\x6c\x76\x47\x42\x0d\xd2\xdd\xee\x6b\x2f\xc1\xd8\x69\x6e\x46\xb8\xfc\x31\x01\xfc\xc7\x22\xb6\xe6\xc7\x9a\x73\x7d\x36\xaa\xb6\xbd\x83\x3b\x64\xdb\xd5\xac\xb8\x46\xf3\x32\x64\x48\xe0\xec\x0e\xdd\xeb\x3e\x68\x37\x80\x3b\x32\x44\xcc\xa0\x5d\x81\x39\x91\x13\x50\x8c\x83\x66\x02\xcf\x7f\xf8\xab\x34\xc7\x06\x16\x5a\x6b\x07\xce\x48\xa4\xc1\x66\x18\x46\xc3\x03\xce\x0c\x17\x41\xbc\x12\x95\x64\x12\x7e\x01\x9d\x2c\x63\x1a\x6b\xd6\x85\x81\x66\x3b\x70\xa3\x59\x07\xb6\xf5\x5a\xd9\xb1\xa0\x30\x59\xa9\xfb\xe6\x39\x20\xe0\x4a\x6f\x3a\x0f\x9c\xa7\xf9\xa5\x30\xdd\x00\xd8\x29\x03\x8e\x36\x00\x76\xcb\x80\xb3\x35\xa4\xa5\x27\xfe\xe0\x6e\xcd\xf7\x9d\xf4\xfb\xad\x66\x2f\xe1\xfa\x2f\x90\x1c\x69\x66\xea\x5d\xc0\x89\x66\x4a\xc2\xa9\x66\x1f\xe0\xb9\x66\x33\x09\xdf\x56\x0f\x48\xcb\x71\x16\xf0\x5d\xaf\xf7\x48\xfe\x01\x12\xbe\xda\x3c\xb3\xf0\x74\x2d\xdc\x31\x99\x91\xdf\xc1\xe6\x89\xa1\x70\xa9\xd9\x46\xa6\xdd\xd2\xf5\x34\xce\x02\xf3\xe9\x5a\x86\xc5\x3c\xff\x59\x4a\xe7\x32\x83\xc2\x1b\xcd\x7e\xc2\xbb\xbf\x40\xde\xcd\x52\x67\xe7\x2a\x79\x5a\x83\x84\x84\xa9\x76\x17\x6b\x88\x34\x96\xeb\x49\x26\x40\xb1\x04\x34\xe3\xa6\x82\x0f\x7a\xfd\xcc\x7d\x67\x67\xce\x99\x69\xe0\xab\x0d\x70\x6f\x0c\xdc\x8c\x7c\xd0\xd0\x81\xdf\x15\x51\xb4\xdd\xa5\x36\xd7\xf7\x59\x75\x08\xb2\xe0\xde\x92\x49\xdd\x29\x65\xf4\xae\x24\x00\x55\x7d\xe5\x75\x3b\x3b\x7b\xbf\x11\xd5\xc6\x0f\xb4\x55\x29\xd8\xa5\x6d\x4c\x16\xd9\x3a\xd8\xdf\xdf\x3d\x58\xc0\xeb\x35\x33\xf9\x52\x43\xa4\xd3\x89\xf5\xf1\xef\x90\x83\xae\xcd\x3a\x4d\x97\x44\x1a\x15\x4d\xa6\xeb\x7d\x97\x52\xcf\xbe\x6a\xc9\xf3\x6e\xf1\x7e\x87\x52\x54\x77\xe0\x78\x5d\xb7\x39\x7f\xca\x3f\x25\x71\x5a\xdf\x34\x91\xad\x2e\x6d\x11\x87\x36\x9c\xd6\x5b\x45\xbe\xea\x34\x91\x09\x7c\x5d\xd9\xa2\x19\xf9\x69\xba\xfb\x8c\x2e\xe0\xe7\x32\x72\xe9\xa5\x7c\xb1\x22\x03\x51\xf9\x08\x94\x44\xde\x5b\xf2\xc2\x7e\xcc\xf2\x71\x76\x6d\x32\x87\x22\xac\x36\x4f\xf7\x00\xb2\x74\x05\x08\xf9\x43\x11\xb3\x00\x70\xbb\x52\x29\xb3\x52\xce\xc8\x89\x06\xad\x4d\x87\x13\xa3\x35\x19\x5d\x1b\xd9\x2f\xe9\x3b\xae\xd3\xd2\x9e\x73\xfe\x0f\xcc\x56\xf6\x8f\x0b\xc7\x72\x3c\x37\x0c\x99\x1f\x11\x69\xe4\x1b\xf1\x59\xb4\x81\x0f\x01\x73\xce\x6d\x5f\xb9\x9c\xb6\x9c\x0b\xa7\x8c\x37\xd8\x84\x65\xc7\xcb\x4e\xe9\x70\xd3\xae\xc8\xf5\x71\xca\x44\xae\x9f\x9d\x0a\x0b\x19\x51\xae\xdf\x77\x4e\xaf\x44\xe3\x4d\x1c\x49\xf7\x99\x08\xa2\x81\x70\x23\x29\x3e\x0e\x1b\x5c\x37\xbe\xc7\x91\x74\x5a\x56\xfd\x70\xe0\x35\x36\xd3\x73\x96\x40\x1d\xda\x72\x1a\x43\x1e\x8e\x31\x27\x5b\x43\x5f\x89\xc6\x30\x1a\x8f\xa3\x99\xcd\x28\xf5\x4d\x93\xdf\x15\x89\xa8\x81\x9a\xf1\xbb\xd8\x73\x7a\x35\xc5\xc6\x28\x33\xd8\xa0\x10\x66\xe4\x95\x86\x63\x8d\xd1\x37\x0b\xc9\x38\x13\x2c\xc2\xdb\x57\x12\xa6\x4a\x4d\x4c\xb5\x50\xe7\x98\xcb\x46\x28\x75\xd4\xe0\x2b\x5a\x80\xa9\xed\x64\xd4\x98\x46\x71\x1c\xfa\xe1\x38\xd4\xa1\x88\x9d\x96\x6d\xf4\xfa\xf6\x6d\x39\xc5\xf6\x6f\x80\x03\x1f\x61\xb6\xf9\x74\xe0\x43\x86\xe5\x3f\xa9\xc8\x1f\x8b\x89\xad\xc4\x34\x19\x37\x59\xd7\x61\x6d\x39\x9e\x69\x26\x6a\x70\xde\x72\xd9\x51\x78\x23\xa4\xc5\x80\x70\x0e\x6d\x91\xb7\x8a\xcc\xc8\x73\x0d\x7b\x80\x5d\x97\xbe\x0e\x8c\xe8\x7a\xa6\x37\x1c\xfe\x2d\x2f\x5a\x10\x78\x1a\x06\x78\x50\x1a\x5e\xe2\x81\xec\x17\x9a\xbd\x87\xcf\x6b\x45\xda\x0f\xa2\xe8\x83\x1f\xd6\x88\x7c\xaf\xd9\x0b\x4d\x66\xe4\xb3\x86\x1d\xd8\xdd\xa1\x14\xbe\x68\x76\x4b\x9e\x19\x61\xf7\x5e\xc3\x4b\xf3\x1f\x85\x27\x9a\x85\xf0\x63\xfd\x42\x8d\x47\x9f\x21\x5c\xab\x8c\xdb\xba\x3e\x69\x76\x04\x6f\x35\xfb\x02\xbf\xaf\x5e\xbb\xb2\x6c\xb2\xf0\xc7\xda\xaa\xb2\x9b\x16\xfa\x98\xbd\x1b\xa4\x60\x2f\x40\x09\xb6\x0d\x5a\xac\x76\x54\xf7\x32\x83\x7d\x46\x94\x80\xdd\x1d\x90\xd6\x8f\xe5\x83\xb6\xf3\x2b\xed\x4a\xed\xf2\x45\x96\x01\x4f\x14\xab\xd9\x6b\x14\x19\x76\x55\x41\x23\x5d\xfc\x55\x3d\x2f\x34\x51\x0f\x76\x77\x72\x39\x93\xfb\xbd\x0b\x02\x5c\xde\x93\x6c\x46\xb4\x40\x49\x97\x61\x4e\x96\x31\x63\xd2\x40\x91\x61\xde\xdd\xf9\x4d\xb9\x02\x04\x7b\x9b\x8e\xd8\xee\x0e\xe8\x76\x97\x52\x90\x4c\xf6\x0d\x0f\xba\x23\xea\x29\x77\x04\x06\xbb\x30\xd8\x4d\xe9\x5e\x7e\x7e\xfb\x99\x86\xdf\x0d\xd4\x90\xb6\x34\xcc\xc8\x1f\x18\x3a\xff\xdb\x7b\x4d\x11\xb2\xc8\xaa\x57\x86\x4c\xb9\x00\x3f\x53\xe0\x82\x3d\x87\x40\x6c\xd8\x89\x49\x17\x6d\x75\xd8\x29\xda\x9d\x08\xd8\xea\xc2\xfd\xc8\x13\x20\x3c\xfd\x60\x77\x67\xde\x81\xa1\x97\xa4\x2e\x16\xce\x52\xcd\xea\x8e\x3c\xc1\x36\xa1\x03\xa6\x67\x54\x4b\xc5\x54\xdb\x34\x92\x69\x10\x76\xb4\x38\x08\x0a\x09\x4b\xf0\xc4\xf2\xca\x0e\xeb\x1c\xca\xfc\x14\xe9\xbf\xef\xee\x80\x60\x88\x57\x83\x6c\xeb\xd2\xfe\xde\x0d\x09\x84\xa9\xa9\xad\x4d\x0d\x12\xce\xa0\x08\xf7\xf8\xa2\x0d\x37\x8b\x15\x3c\xba\x25\xdd\xed\x05\x0c\x05\xf3\x25\xf8\x82\xc5\x12\x62\xb1\x59\x81\x1b\x57\xbf\xaf\x58\xb8\x32\xce\xae\x05\x68\x75\x6b\x81\x59\x3b\xb9\xbc\xca\x6e\x37\x5b\x2c\x60\x20\x18\xd7\x70\x23\xd8\xe6\xb3\xf8\xf7\xfc\xc0\xe3\xe0\x07\x9e\x02\x9e\x78\x02\xfc\xc4\xd3\xe0\xdf\x79\x12\x82\x53\x0f\xfb\x72\x5b\x30\x2d\x61\x22\x36\xcf\xcb\x2b\xc1\xa4\x84\xa9\x58\x2b\x08\x0e\xbb\x7d\xe5\xdd\x91\x2b\xc3\x7b\x13\x7b\x4c\xd1\xb0\xcd\x48\x30\x2e\x61\xb6\xb1\x9c\xe3\xd8\x82\x1d\x48\x6f\x52\xb9\x13\x6b\x8e\x4f\x75\x30\x4e\xa6\xa2\xd6\x80\x60\x7b\xbb\x78\x58\x61\x6f\x9f\x31\xdd\xef\x7a\x1d\x48\x98\xe8\x25\x45\x68\x53\xab\x55\xc4\xdf\xd6\x12\xb4\x63\x50\x64\xba\x4d\x95\x9f\xe6\x3a\xd2\x3d\xc5\xba\x9d\xdf\x54\x8b\x97\xb6\x63\x12\xc6\x44\xff\x48\x7b\xd7\x9a\xd8\x9a\xda\xca\x53\x74\x01\xb7\xeb\xe6\x44\x38\x24\x81\xa9\x64\x3e\x9f\x91\x6d\x01\xce\xff\xe5\x40\x42\x4b\x75\x58\x8a\x66\x64\x24\xc0\xf1\xcc\x37\xa4\x26\x5d\xc7\x39\xae\xe3\x55\xe0\x80\x71\x3c\xf7\x79\x27\xc8\x8c\x4c\x05\x04\xad\x2e\x66\xeb\x49\xc5\x0d\x2f\x4c\xc7\x23\xdd\xe3\x2c\xf7\xb9\x5e\x6b\x32\x24\x37\x02\x75\xd9\x99\xb0\xd1\xc4\x3c\x3b\xdd\xb2\x58\x02\x4a\xe0\x48\xe7\x5f\x29\x5c\x8b\x95\xab\x91\x6d\x9d\xa8\x37\x28\x49\x1b\xf4\xc0\x01\xeb\x81\x4a\x4c\x83\x12\x96\x14\xf9\xb4\x6e\xc8\xad\xa5\x65\x6a\x38\x55\x50\xc4\x88\x94\x25\x65\x82\x52\x30\x83\x29\x4b\x66\x01\x47\x62\x85\xc1\x60\x29\xd1\x75\x4a\x44\x4a\x49\xdf\x01\xab\xfa\x09\x9b\x66\x54\x14\x94\xdc\x92\x6b\x53\xc5\xb5\xb6\xfd\x29\x5a\x5d\xd0\xd4\xd0\x83\xd4\x08\x74\xd8\x56\x41\x6d\xcf\x18\x52\x4e\x56\x8a\xa0\x40\x97\xf2\xc3\xa6\x84\xe8\x94\x90\x7f\xcb\x92\xe0\x1a\x93\xe9\x5e\x33\x5d\x10\x72\x47\x8e\xca\x84\xe8\x56\x17\x93\xa1\x21\x19\xba\xbc\xd5\x91\x02\x1e\xa5\x97\xd2\x9d\x0a\x26\x24\x3c\x17\xab\xf5\xe9\x53\x01\x78\xcd\x96\xf7\xe0\x81\x03\x92\xf6\x67\xe4\xc4\x4c\x32\xac\xe2\x21\x48\x4a\xbd\x02\x26\xae\x00\x75\x2d\xd0\x23\x04\x32\xea\xfe\xb7\xe5\x19\xd9\xeb\xd1\xce\x02\xbe\x0b\x76\x24\x41\x4a\xf6\x5d\x98\xc9\xf8\x74\x2d\xb3\x88\x22\x41\x8c\x40\x2e\x16\xf6\xf8\x09\xcf\xde\x5b\xee\x8e\x18\xb7\xef\x23\x3b\x5a\x11\xc2\x46\x25\x58\x0b\x51\x4a\x9a\x92\xc0\x0c\x43\xce\x66\x18\xd1\x85\x97\x29\xb8\x1c\xf6\x3b\x9d\x43\xdd\x47\x33\xc9\x90\xf1\x5a\x1b\x15\xd5\xbb\x25\x4f\x85\xf5\x9a\xb4\xba\xa8\x84\x16\x5d\xbb\x8c\x4a\xad\xf9\xaa\xea\xaf\xab\x17\x27\x5c\x8a\xf5\x5b\xed\x79\xfd\x1d\xcb\x45\x6f\x2a\x5c\x54\xbe\xea\xe5\x8e\x5c\x0a\x58\x1f\x07\xa4\xc1\x5e\x02\x96\x3b\x57\x28\xbc\x13\xec\xb9\x84\x0f\x62\x5d\xd0\xc8\x8c\xbc\x13\xab\x76\xd8\xbe\x0b\xa2\x30\xea\xc6\xa2\x79\x55\x21\x5f\x63\xf0\xd9\x6a\x14\xea\x57\x50\xcf\xd2\x7b\x7f\xe9\xc2\x4c\x61\x5b\xc5\x99\x60\xc7\x12\x5e\xaf\x5d\x14\x2e\x25\x41\x8c\x67\xc2\xb6\x91\xda\x5b\x06\x36\x78\x9a\x3e\xac\xac\xbe\xb3\x00\xa2\xd8\x8c\xbc\x11\xf0\x3a\x45\x05\xd8\xaf\xaf\x04\x89\x34\x85\xef\x82\x9c\x51\x48\xad\x52\xb1\xa1\x02\x64\xee\x05\x85\x63\xb9\xde\xbb\xf2\x41\xa4\xcb\x57\xef\xa3\x74\x4f\x79\x7c\xcd\xee\x7d\x4f\x4a\x08\x3c\x2e\x8d\x92\x2e\x41\x78\xc7\x12\x86\xf9\xb9\xe4\x22\xa8\x48\x94\xf4\x07\xfe\xce\xdb\xea\x82\xff\xdd\x73\x1c\xf0\xaf\x2b\xd9\x4e\x8f\x2b\x70\xc2\x9b\x46\xe0\x7f\xab\x40\x7c\xad\x40\x9c\x7a\xc7\x82\x38\x0e\x05\xfe\x35\x7b\xba\xf1\xee\xf9\x77\xef\x48\x03\xbf\x36\x7f\x83\x5b\x4f\x02\x9f\xe2\x0b\x85\x7f\x7f\xe2\xdf\x23\x9c\xf4\x71\x5e\xfe\x2c\x7b\xf2\x07\xe6\xbb\xff\x39\xfb\xfd\xc6\xdb\xea\x96\xb3\xf7\x95\xea\x27\x33\x72\x1b\xa1\xf8\x46\xa9\x72\x17\x41\x17\x24\xf5\x24\x6d\x39\x0f\xf8\x34\x7c\x70\xb3\x53\xba\x1f\xf0\x99\xd8\x98\x06\xf6\x65\xf5\xf3\x7e\xed\xf3\x0b\xb1\xca\xcd\x56\x64\x97\xab\x7e\xde\xad\x7d\x7e\x2f\x36\xe6\x98\xfd\x52\xfd\xbc\x57\xfb\xfc\x64\x73\xdd\x3f\x36\xd7\xfd\x69\x33\xf2\xb7\x9b\xdb\xfd\xfb\x66\xca\xff\xd8\xdc\xa9\x32\xd9\x48\xb9\x4a\x36\x96\xd6\xc9\x46\xca\x45\xb2\x91\xf2\x24\xd9\xd8\x2d\xbc\x46\x5a\xbd\x65\xc1\xe6\xe2\x51\x52\xde\x2b\x47\x23\xc3\xb6\x0e\x56\xae\x93\x9f\x23\x63\xa4\xcc\xc8\xef\x51\xea\xf6\xb4\x4e\xa1\x02\x5f\x98\x6c\xbe\xd9\xf8\x8e\xbc\x47\x14\x76\xff\xb8\x48\xef\x91\x54\x12\x8e\x3e\x89\xea\xfb\x92\x23\x32\x41\xb1\xa4\x69\xe6\xb3\xbb\x13\xa5\x3d\x69\xe5\x6e\xf7\xa3\x84\xfc\xe3\xb5\xb4\x17\x4b\x84\x52\x8b\x91\x50\x5e\xc3\xf9\x47\x4b\xb6\xfe\xe1\xfc\x83\x7a\x41\x88\xf1\x06\xd9\xf2\x13\x25\x24\xcd\xf6\x2d\x06\xd6\x35\xa3\x69\x8b\x38\x8d\x41\x38\x0a\x75\x0c\x98\x46\x7f\x14\x69\xfb\x09\xeb\x36\xb2\x0f\x92\x90\xe8\x90\x28\xdc\x91\x2c\x52\x92\x26\x65\xe3\xa7\x74\x13\x70\x42\x64\x71\xd0\x96\xe3\xc9\x0b\x1f\x02\xb6\x85\xca\x6e\x6f\x45\x2f\xd9\xa6\xdd\x90\x69\x08\x09\x48\x0c\x28\xf0\x5f\x82\x74\xf9\x09\x6e\x9b\xe0\x5e\x26\xc7\x1b\x9f\xec\xad\x8e\x41\x7e\x00\x8e\x68\x68\x77\x8d\xf4\xa8\x0c\x11\xa7\xd4\xc3\x2e\x0f\xa0\x03\xf7\xfc\x04\x1d\x21\x45\x6a\x04\xdf\x58\x38\x2f\x3d\x61\x46\xdc\xe5\x8b\xf2\x88\x8c\xcb\x8c\x31\x0a\xc9\x8c\x5c\x85\x36\x0b\xec\x23\xe4\x8f\x72\xfb\x07\x65\x58\xd3\xb1\xd9\x30\x0c\xf8\x9d\x67\x7b\xb0\xb2\x43\x77\x53\xee\x2f\x32\x23\xb3\x10\xf6\x40\xd2\xf9\x7c\x0b\x9f\xbb\x9d\x0e\x48\xf4\x22\x9a\x0f\xf8\xa3\x54\x78\xbb\x54\x98\x10\xd9\x66\x5d\xfa\x60\x6f\xde\xa1\x6d\x22\x1f\x74\x3b\x9d\x79\x87\xb6\x88\x7c\xb0\x87\x4f\xa5\xd4\x3a\x7f\xc9\x97\xd7\xa6\x79\x6f\x23\x8c\x7e\x2d\xb2\x6d\x24\x15\x98\xe7\x61\x65\x40\xfc\x9b\x72\x7e\xf8\xa4\x32\x53\x9e\x86\x70\x1a\x56\xb6\x16\x47\xc9\x2f\xee\x4b\xde\x91\x57\x21\x26\xe4\xb7\x57\x06\x18\xc3\x33\xaa\x60\x9a\x95\x31\xc9\xbe\xa3\x55\x22\x1c\xcf\x19\xf2\x71\x2c\x4a\x2b\xc5\x5d\x05\xcc\xdd\x9e\xcf\x1d\x67\x2b\xbd\x7f\xda\xac\x5a\xc5\xb1\xf0\x32\xe0\x67\x33\xd6\x97\x11\xbc\x0f\xe1\x54\x13\xd9\x72\x98\x53\x61\xf6\xeb\x64\xed\x0e\xa5\x73\xe9\xd8\x14\xd5\xb5\xad\xca\xa3\x0a\x21\xac\x60\xa5\xc7\x96\x95\xaa\x13\x83\xc9\x4a\xf8\xca\xbf\x60\x56\xcc\xe7\x9d\x43\x76\x47\x64\xb8\x4a\xa8\xe9\x0a\xed\x0b\xc0\xbb\x10\xfe\xcb\x13\xa9\x97\x47\x7d\x95\x32\xb4\x57\x39\xe4\x93\xe9\x04\xa7\x7c\x4f\xef\x69\xb2\x71\x91\x7a\xbe\x79\x99\xf9\x56\x9e\x18\xd2\xdd\xee\x9f\x26\xde\xf3\x84\xda\x1b\x1c\x8a\xd3\x82\x9b\xeb\x78\xba\xb9\x8e\xcb\x6a\x13\xd4\x10\x24\xc8\x61\x39\xe1\x7a\x15\x20\x1b\x68\x8b\xa7\x04\xf7\xae\x0c\x17\x27\xe4\x4d\x52\x15\x11\x1f\xca\xf3\xf5\x28\x24\xc7\xe4\x7c\x46\x06\x21\x04\x21\xf9\x9e\x90\x0e\xa5\xf0\x2e\x21\x27\x09\xee\x93\x00\x7e\xc9\x3e\x3f\xc5\x97\x70\x99\x90\xe5\xc1\x76\xfe\xfc\xd3\x8e\xf2\x3a\x80\xad\xce\x22\xc3\xf7\x0b\xa8\xec\x39\xc5\xfc\x1a\x60\x7a\x51\x6e\xc1\xab\xda\xec\x4b\x1d\x22\xd5\xd1\x38\xab\x02\x61\x48\x90\x4c\x63\xe9\x8b\x94\xe4\x35\xa0\xe2\xcb\xc7\xa4\xbc\x87\xe5\x7f\x2b\x42\xc7\x82\x57\x2d\x63\x20\x0f\xc1\x71\x60\x46\x3e\x87\x90\x68\x38\x4b\x8c\x14\x1f\x02\x4e\xef\xd7\x09\x7c\x32\x75\x7d\xa4\x14\x7e\x84\x66\x71\xc3\x65\xb2\xa5\xcc\x3f\x25\x45\xba\x5a\xc3\x4f\xf4\x2a\x7d\xc1\xdd\xa3\x13\xcc\x14\x76\x8a\x93\xf7\x18\x33\x8b\xbf\xc2\xfd\x01\xce\x41\x2e\x6f\x2b\x4d\x86\x39\x3d\x01\x4d\xe3\x0a\xb7\x8b\x7b\xce\x64\x39\x8d\x38\x9a\x21\x48\xe5\xc7\xc4\xfe\x7b\xad\xe1\x4b\x48\x9c\x61\x38\xd6\x42\x19\x79\x94\x6e\x2d\x45\x6c\x46\x5e\x84\xab\x75\x95\xdb\x24\x13\xa2\x74\x01\xaf\x88\x84\x63\x72\x7e\x49\x9c\x38\x1c\x0b\x19\x88\x81\x83\x3e\x84\xc4\x52\xb5\x85\xee\x0c\x33\xd6\xc4\x09\xe5\x55\xe8\x87\x7a\x19\x42\x64\x10\x93\x64\xc5\xd7\x24\xfb\xca\x03\x8d\x69\x9d\xca\x9f\x3b\x46\x80\xd8\xcf\x4a\x04\x22\xbc\x11\xca\x81\xbb\x94\xbd\x88\x33\x52\x51\x32\x75\x20\x32\x1c\x94\xeb\x05\x9d\x43\xdc\x2c\xea\x3b\xfd\x6c\x0f\xa5\x69\x40\x3c\xa7\x24\xe2\xbf\x26\xa9\x7e\xd4\xb6\xc7\xe7\xb6\xe7\xf3\xf4\x69\x50\x7a\x16\x45\x4f\xcb\x5e\x01\x2c\x2c\x90\x7d\xe0\xc5\x28\x0f\x70\x90\x05\x64\xdb\xd3\x1a\xd3\xc7\x6b\x4c\x1f\xaf\x5d\x51\x38\xa7\x2e\x43\x63\xa8\xa0\x3c\x0e\x00\x7f\xda\xe3\xcd\x18\x13\x82\xc9\x62\x04\xcd\xde\x67\x49\x46\xf3\x94\xd6\x58\x51\x98\x56\x14\x62\x45\xa1\x1b\x80\x66\x84\xb3\xd0\x1d\x50\x53\x9e\x71\x57\x40\xc0\xc2\x5a\xa5\x1d\xe0\xae\x0f\x3c\xab\x74\x89\x86\xc8\xf5\x21\x72\x03\x88\xdc\x01\x44\x86\x06\x4d\x33\x48\x43\x86\x42\x32\x0a\x4b\xec\xbf\xd2\x87\x83\xac\x0f\x07\xcb\x7d\x68\xba\x40\x60\x03\x13\xbc\x32\x97\x33\xe1\x06\x10\x30\x61\xc8\x62\x62\xa9\x27\x43\x5c\x05\x87\x6c\x45\x6f\x6a\x5c\xdd\x8a\xde\xcc\x12\x0c\xd8\xde\x2c\x17\x14\x8c\xe0\x75\x58\x14\xab\x25\x66\x5e\x09\x8a\x95\x4b\xac\x5c\x62\xe5\x72\xa9\x47\xb3\x60\x99\x94\x16\xa2\xcc\x80\xd3\x95\x83\xd9\x85\x10\x86\x20\x96\x68\x29\xf5\xe9\xb3\x25\x5d\xe7\xcb\x10\x26\x55\x2d\xe6\x65\x15\x66\xe2\xe7\x9b\xf4\x85\xb5\x5a\xd3\xa9\x7c\xb8\x0f\x84\x31\xfa\x83\x8f\xc6\x9a\xae\xc0\x7e\xae\xc2\x7e\x43\x2d\x21\x32\x0d\xc1\x7f\x8d\xda\x31\x1d\xc2\xa5\x0f\x2f\x12\xe2\x9c\xb7\xcf\xff\xfc\xf3\xe2\x7e\x41\xe8\x6f\xad\xbe\x0b\x7f\xfe\xf9\xe7\x9f\xff\x63\x7b\xfe\x6f\x7f\xfe\x19\x5f\x38\x94\xc2\x1d\x79\xe3\xa3\xdf\xf5\x32\x5a\x7d\x18\x27\x78\xbb\x30\xda\x91\x59\x04\xa8\x75\x8b\xd4\x0d\xa1\xf7\x75\xc9\xee\xdc\x67\xd3\x18\x30\x76\xed\x8d\x30\xd2\x4d\x52\xda\x72\x16\x4e\x65\x52\x7f\xd9\x6c\xb2\x3d\xa9\xad\xe0\xf5\x25\xfc\x47\xcd\x22\xac\xaf\xe1\x9f\xaa\xdf\x1f\xd7\x0d\xe9\xea\xe7\x47\x75\x43\xfa\xd7\xb5\xd8\x5b\x59\xd5\x62\xef\xab\x03\xf6\x47\x19\xd3\xef\x09\xb1\xe2\x59\xf2\x89\x70\xe0\xcc\x27\x66\xd4\xac\x74\xb4\x69\x9d\xd2\x77\xdf\x52\x21\x1d\x1f\x8b\x91\xb8\x75\xe0\xad\x59\x48\xfc\xab\xec\xed\xf3\x1f\x09\x1f\x9b\xee\x9d\x0e\xe1\x99\x6f\x97\xbe\xb7\x43\x43\xc3\x88\xd6\x16\x68\xc9\x57\x87\xc3\x29\x5e\x2c\x79\x33\xf2\xd2\x30\x42\x77\x6f\xaf\x43\x5b\x0f\xbb\x8f\xf7\x0e\x1e\x19\x09\xa5\x0e\x3b\x7d\xd5\xee\xee\x1d\x74\x1e\x1f\x78\x8a\x3e\xc0\xa7\x87\xf3\x8e\x99\xa5\xf6\xf5\xc3\xdf\xb4\x99\x7e\xa2\x4d\x04\x7e\x45\xb3\x44\x3c\xd8\x3d\xd8\xdf\xb1\xc6\x8a\x7d\xfd\xf8\x60\xde\xa1\xd4\xbc\x9e\x67\xd1\xb9\xf7\xfc\x77\x8f\x48\x26\xda\x64\xf7\x60\xff\xb7\xa4\x45\x92\xd4\xbc\x49\x52\xf3\x86\xd2\x36\x21\xdd\xfd\xdd\xdf\x88\x62\x64\xff\x37\xd9\xda\xa1\x0f\xba\xfb\xbb\xa6\x86\x1d\xfa\x60\xdf\xfc\xdb\x05\x3e\xf5\x04\x53\x2d\xa2\x0e\xbb\x9d\xfe\xae\xd7\x7e\x4c\xc1\xdf\xf5\x92\xd6\x5e\xa7\xf3\x9b\x6e\x91\x9d\x43\xd1\xef\x78\xdd\xb2\xa9\xa3\x79\x65\xfe\xc8\x18\xf6\x60\x46\x74\x0c\x22\x46\x2e\x25\x4e\xdb\x30\xb0\x8c\x61\x07\x56\x6d\xd6\xd5\xb7\xea\xba\xb5\xad\xba\x9d\xda\x56\xdd\x6e\x2d\x33\xc3\x5e\x2d\x8f\xc3\x7e\xed\x38\xfa\x41\xf5\xf6\xc3\xc6\xc3\xda\xcd\x83\x8f\x6a\x89\x00\x1e\xd7\xae\xca\xea\x76\xea\x57\x5f\x75\xbb\xf5\xdd\xc2\xee\xce\x62\x41\x66\xe4\x93\x9f\x36\xba\xda\xea\x19\x79\xef\x17\xbd\x71\x5a\x7a\xff\xa5\xf4\xde\x2b\xbd\xff\xb1\xe6\xbd\x2a\xf5\xaa\x9b\xbe\xdf\x85\x19\x79\x92\x57\x8c\xff\x6b\x39\xdf\x4a\x62\x41\xf0\x8a\x2a\x76\x65\x73\x98\x5a\x71\xef\x8f\xa8\x59\x86\x8a\x7d\x92\xfb\xe0\x95\x87\x72\xef\xa3\xb7\xa5\x9a\x4d\xbc\xdc\x7c\x3e\xd7\x7d\x7c\xde\xf1\x76\xbd\x2e\x3a\x44\x5d\xff\x5b\xd9\xd5\x54\x99\x11\x87\x9d\x54\x65\x1d\xc7\x64\xe5\x44\xaf\x07\x13\x49\x34\xc3\x54\x29\x36\xa8\x71\x49\xd4\x03\x31\xef\xf4\x65\x8b\x7c\xd3\xf6\x99\xb6\x88\x6e\x39\x0d\x87\x52\x0f\x77\xd9\x42\xbb\x7d\xb0\xc0\x09\xec\x00\x0f\x8d\x21\x00\x83\x98\xe2\x49\x8f\xc2\xcf\x55\xa2\x6d\x2b\x77\x19\x34\x9b\x5b\x65\x9f\x41\xe6\x41\xb0\x4e\x83\x92\x13\xac\xdc\x30\x33\xad\xac\xdf\xc0\xa8\xc8\x93\x18\x24\xec\xd1\x76\xfa\xd4\xed\x74\x68\x2b\x7b\xdb\xe9\x94\x29\x88\xf8\xff\x1f\xd9\xbd\xf0\xdc\x95\x9b\x87\x71\x0f\x5d\xc3\x89\xf7\xd5\x66\x75\x6a\xcd\xea\xd6\x9a\xb5\x53\x6b\xd6\x6e\xad\x59\x7b\xb5\x66\xed\xd7\x9a\x75\x50\x6b\xd6\xc3\x5a\xb3\x1e\xd5\x5b\xf5\xb8\x7e\x55\x5d\xb7\xb3\xd4\xcc\xb2\xdf\x7d\x58\x9a\x45\x44\xb0\x19\x99\xe1\xb0\xa3\xcc\xc6\xdb\x9a\xa4\x99\x51\xf8\xda\xe8\x6c\x28\xb0\xf1\xbd\xce\xc1\x8d\xaa\xd4\xdd\x3b\xe8\xe2\x6b\x51\x81\xcd\x95\x77\x23\x67\x55\xab\xdb\xe9\xfc\x26\x5b\x7b\xbf\xe9\x96\x70\x79\x8b\x08\xd7\xef\x77\xbd\xb2\x5b\xca\x2f\x53\xa3\x98\x21\x8e\x29\x26\x29\xdc\x73\xed\xc9\x76\xc0\x89\x42\xc1\xad\xca\x01\xd3\xa3\xd8\xe8\x85\xbb\xa8\x1e\x72\x5d\xc2\x16\x97\xd9\xfc\xd1\xc1\x9e\x40\x46\x7f\xd8\x7d\xdc\x3d\x28\xdf\x13\x33\xe6\x95\x25\xfc\x4d\x0c\xdd\x5d\x2b\x77\x4a\x2e\x3d\x5e\x8f\x09\xef\x4f\x34\x71\x4e\xae\xa2\x64\x3c\xc0\x1b\x7c\x7d\xd1\x10\x93\xa9\xbe\x73\xa8\x37\x23\xaf\x63\xd8\xd6\xc4\xf9\x5d\x45\x72\xd4\x78\x7d\xf2\xf1\xd1\x41\xa7\xdb\x18\x46\x6a\xc2\xb5\x43\x61\x5a\x33\xee\x6f\xca\x04\xbc\x23\xd7\x11\xdc\x1f\x1b\x41\xb3\xd5\xa1\x70\x92\x3d\x9c\x66\x0f\x5f\xb2\x87\x57\xe6\xe1\xbd\x31\xa9\xde\x08\x10\x1c\xe5\x64\xd9\xa7\xb0\x5d\x46\x1b\xa0\xdc\x92\x94\x6e\xa2\xbb\xea\xa6\x9a\x54\x04\x6c\xf0\x0a\xcd\xa0\x8f\x56\xb8\x7d\xab\x86\x4a\xa6\xd3\x44\xd7\xa5\xc0\x25\xd9\xea\xc2\x56\xa7\x9e\x1e\xd4\xbe\xee\xd6\xd3\x08\x5d\x92\xad\x0e\x42\xd7\x18\xd6\xbe\x37\xab\x33\xa1\x98\x97\x31\x97\xea\xfe\xc8\xf4\x41\xe2\xfa\x14\xfc\x2b\x4f\x82\x1f\x79\xca\x08\x72\x51\xf6\x59\x56\xd7\x89\x2c\xb7\x56\xea\xfb\xf3\xbf\x63\x87\x7c\x1a\x0b\x43\x4a\x10\x4d\xa6\x63\xa1\x45\x83\x0f\x06\xa1\x1c\x61\x08\x1e\x9e\x9e\x32\x56\xb6\xa7\x5c\xbf\x3f\xd3\xb6\xbf\x27\x78\x3f\xa8\x67\xca\xbe\xb7\x00\x71\x83\x2b\x81\x99\x32\x42\x25\x06\x65\x3f\xd6\xb4\xca\x60\xbf\x9b\x45\x4f\xc4\x70\x4b\x7e\xc4\xd0\xed\x1a\x2b\x2c\x06\xe4\xbb\x9d\x6c\xb9\x2b\x79\x49\x97\x99\xb3\x5b\x67\xce\x19\xdf\xb8\x1d\x73\x57\xed\x00\x6b\xce\xf2\xaf\x76\x20\x3f\xa3\xd7\x82\x9f\xa1\x41\x14\xa3\x41\x74\xd3\x2b\xb6\x01\x67\xe4\x6a\x0c\xdb\x46\x69\xe5\xa7\xb8\x1b\x98\xbd\x30\x26\xa4\x17\x40\x6c\x5f\xdc\x8c\x81\xe3\x66\x1f\xfe\xfa\x1c\x9b\xa9\xfd\x8d\x42\x82\xdb\x7e\x0a\xfc\xcf\xf6\xc3\x00\x23\xb1\x6a\x3b\x7f\xb7\xe5\x16\x1a\x2b\x92\x48\x86\x63\x46\xdd\xed\xfe\x64\xec\x99\xd6\x55\x9c\x44\xd7\x7c\xe3\xfe\xd1\xd1\xe6\xde\x38\x29\x57\x77\x35\x24\x47\xe3\xea\x64\x3c\xdd\x5c\xfc\x39\xdf\xec\x74\xdc\xfc\xf9\x7b\x45\xa3\xa8\x26\xd8\x29\x39\x1d\xab\x52\x10\x95\xf7\x33\xab\xbb\xcf\xc8\xe7\xb1\x8d\xb1\xc8\x6d\xb7\x3f\xff\xec\x5b\x0f\x90\xcb\x0f\x28\xa5\xae\xdf\xbf\xc4\x54\xf0\xca\xf5\xad\x03\x2d\x0b\x38\x55\xae\x8f\x31\x19\xd4\xbb\x24\xce\x03\x07\x8e\xf2\xf3\x47\x58\xc9\xf1\x18\x5e\x8c\xe1\x1d\x91\x70\xcf\x0f\x70\x2f\x37\xf1\x0c\x9e\xe0\xd4\x30\xfe\x82\xe2\x78\x7c\x8b\xcc\xbb\x92\x03\xb4\x44\x2a\x92\xdd\x5b\xca\x9c\x96\xad\x7d\x99\x6d\x66\xca\x57\x57\xc1\xd4\xac\x2a\x3e\xec\x78\x15\x73\xac\xf8\xb0\xeb\x95\x2f\xe9\x2f\x7f\xe9\x14\x5f\x0e\x2a\x1f\xf2\xa5\xf5\xc9\xb8\xb6\x96\x7e\x19\xd7\x16\xdb\x1f\xe3\xba\xe4\x79\x3f\x2e\x0d\xde\x1b\xbe\x71\x63\xf2\x1d\xdf\x6c\x87\x7e\xa8\x7e\x7f\x58\xfb\xfc\x8a\x6f\xb4\x33\xcf\xaa\x9f\x0f\x6a\x9f\x5f\x97\xc6\xe1\xa3\x2e\xed\x04\x76\xd3\x6b\x4d\xa4\x67\xcc\x23\x54\x49\xa9\x6b\x0c\xc1\x4f\x21\x44\x98\xd0\x99\x56\xef\xf5\xfd\x58\xb5\x7b\xf4\x00\x8e\xc9\xb9\x1c\x10\x87\x8f\x85\xd2\x0d\xfc\xdb\x9e\x71\x25\x43\x39\x72\xe8\x05\x35\x9f\x93\x01\x41\x02\xaa\x06\xe5\x71\x19\x93\x4a\x88\x36\x4b\x95\x3f\xc0\xb0\x4e\x54\xc7\x39\x7c\xf4\x3a\xa9\xde\xbd\xa8\x48\xbd\xaf\x55\x22\x06\x03\xc8\xee\x9d\x88\x45\x75\xba\xfe\xac\x42\xfe\x31\x06\xe7\x4a\x89\xa1\x03\x0f\xfe\xc7\x77\x7e\xc3\xed\xfd\x2f\xde\x83\xd0\xd5\x22\xd6\x84\x48\x26\x69\x7e\xda\xf3\xc1\x9f\xf1\x83\x11\x38\x0e\xa5\x98\x74\xb8\xec\xaf\xa9\x62\x7d\x23\xea\xfb\xaf\x25\x67\x6d\x62\x7b\xb1\xee\xb2\x9d\x62\xc7\x21\x79\x70\x3b\x20\xce\xa5\x3f\xe6\xf2\xba\xd4\x63\x12\x7b\x0b\x5e\x9b\x09\x3a\x1b\xc0\x1d\x26\x73\x3b\xab\x74\xc3\xcb\x8a\xe4\x36\xba\x98\x2c\x07\x30\x9d\x0c\xe0\x0c\x70\x27\xe0\x28\x1f\x25\x2d\x6e\x75\x5b\x46\x33\xc5\xa7\xa5\xba\x54\xcb\xf1\xcc\x4f\x0a\x33\x72\x9d\xc3\xce\xda\xdd\x4e\x07\xa1\x9e\x2d\x8f\xde\x0b\xbe\x29\x22\x6c\x3e\x5f\x19\x00\x36\xcd\x71\xfb\x5a\x36\x7c\x2d\xdb\x51\xa2\xc7\xa1\x14\xed\x50\x0e\xa3\x86\x1f\xa9\x81\x50\xed\x8e\x43\x01\x3b\xc6\xd2\x37\x23\x71\x5e\x6c\xc8\x1b\x43\xde\xc6\x12\xc1\x15\x57\xba\x31\x51\xed\x1d\x24\xf1\x8c\x42\x32\x20\xce\x49\x94\xa8\x40\x60\x5b\x3c\xf3\xbb\xbc\xce\x7e\xde\xdc\x5d\xba\x4c\x5c\x1b\x7d\xcc\x88\xbe\x31\xf1\xd3\x3a\x90\x18\xb1\xd4\x86\x78\x92\x51\xae\xc2\xd1\x95\x6e\x77\x1a\xd8\xcb\xd6\xed\x6d\xba\xf4\x66\x00\x4e\x12\x0b\xd5\x8e\xc5\x58\x04\xda\x01\x27\x94\xa1\x0e\xf9\x38\xff\xda\x9e\x44\x3f\xdb\x7f\x01\x32\x13\xfe\x75\xa8\xff\x02\x2a\x25\x24\x88\xc6\x91\x72\xc0\xf9\xb7\x20\x08\x2a\xe3\xfc\x0f\x96\x6f\xf1\xdb\xe1\x1e\xae\x6c\xce\xa8\x3d\xe4\x03\x31\xa8\x0c\x51\x2c\x82\x48\x0e\xb8\xba\x73\x28\x7c\xe5\xe4\x98\x93\x4b\x8c\x02\xa3\x14\x26\x03\xe2\xbc\xc0\xcd\x86\x86\x7f\xd7\xd0\x57\x61\xdc\x18\x73\x5f\x8c\x4b\x55\x3b\x2d\x1c\x94\x0a\x0f\xbd\x2f\x6b\xcd\xff\xf6\x20\xdd\x6a\x88\x1f\x48\x31\xeb\xdb\xbd\x0b\xe6\xb4\xde\x87\xe4\x7d\x4d\x21\xfe\x52\x1a\xc8\xb3\x84\x48\xd7\x3f\x71\xfd\x8f\x95\xe8\x86\xbf\xc9\x6b\xef\x39\x59\x9a\xc6\xb9\x52\xf5\xc4\x6e\x2f\x77\xd2\xbd\x11\x5f\x9b\x1a\x71\x0f\x68\x1d\x83\xfa\x62\x3c\x6e\xc7\x63\x1e\x5f\xb5\xa3\x65\x16\xb5\xcd\xb4\x3c\x6a\xcf\x02\xc1\x26\x72\x07\x5c\x8e\x4c\xc7\x56\x08\x2e\x77\x97\xd3\x52\xbf\x40\xc9\x3a\x3a\x06\x48\x48\xa9\x77\x9f\x54\x67\xf6\xf7\x41\xed\xcc\xef\x8f\xea\x77\x51\x5a\x01\xc2\x91\x34\xac\x39\x6c\x07\x42\x1a\x66\xc8\xab\xb4\x3c\x70\x69\x44\xa1\xff\xb9\xc6\x05\x9f\x56\x08\xf3\x2b\xd3\x66\x07\xf0\xb6\x2c\x09\xc7\x83\x32\xfc\xdb\xcd\x1a\xd8\xef\x7c\xa3\x3b\xf8\x8f\xd5\x56\x8b\x2c\x6f\x08\xa6\x76\xc3\x96\x9e\xcf\xf1\xe4\x2c\x5a\x0f\x3b\x36\x71\x3d\xde\xb0\x94\x1b\x12\x95\xa8\xa7\xa0\xd4\x8e\x55\x0c\x55\xf1\x45\x49\xd7\x1f\xa5\x2e\x29\x5d\xf5\x45\x65\x1c\xe7\x47\xb0\xce\x17\x85\x8e\xdd\x45\x35\xd0\x43\x95\xab\xbf\x24\x12\xd3\x7b\x14\xee\xca\xa0\xba\x99\x3e\x30\xa2\x63\x9a\xe8\xb4\x8f\x55\x90\xf5\xf5\xdb\x41\x85\x19\x44\xb0\x34\x38\xd7\xe2\x6e\x10\xcd\x64\x3e\x3a\xbf\x57\x46\x27\x59\x59\x20\x99\xae\x01\xe7\xc1\x1a\x75\x22\x88\xc6\x8d\x20\x1a\xb7\x79\xa2\xa3\x42\xf8\xfe\xa2\x8c\x1e\x6e\x9c\xfb\x56\x7e\xcd\xc8\xcb\x01\x6c\x61\xb4\x4c\xce\xa0\xb8\x41\xbc\x56\x30\x56\x27\x64\x19\x4b\xb7\x82\xc5\xf9\x7f\xfe\xef\x4c\xd6\x55\x18\x3d\x08\x36\x6a\x78\x51\xb0\x51\x7f\x0c\x97\x3b\x76\x12\x25\xb1\xc0\x99\xb6\xac\xf8\x0c\xd7\x80\x8f\x05\xbf\x11\xcb\xe0\x7e\xb0\x51\x7f\x8c\x83\x8d\x36\xd5\x38\xd8\x38\xe7\x06\xc1\xc6\x19\x7b\xb3\x4c\xaa\x3f\x4e\x56\xb4\x69\xfb\x7f\x23\xb3\x04\x37\x75\x66\x91\x7f\x93\x51\x0c\x86\x5f\x63\x94\xc9\xe6\xee\xbc\xda\xcc\x28\xd3\xcd\x63\x35\x0a\x36\x46\xb4\xcc\x36\x33\xc2\xdd\x66\xe4\xb7\xc1\x46\xfb\xf6\xba\x56\x77\xfd\xfb\x51\xf0\xbf\xd6\x67\x5c\x33\xe7\x1e\x96\xfd\x00\x41\xdd\xb1\xb2\x53\xf7\xab\x9c\xae\x63\xc7\x01\xd7\xa2\xa2\x03\xd6\x94\xfa\xc2\x5b\x10\xe4\xeb\x02\x1e\x1d\x9c\x0e\x61\x18\x92\x0e\x1a\xeb\x53\xba\x4a\x35\x0d\xf8\x58\x18\x25\xec\xb2\x31\x89\xa4\xbe\xca\x50\x13\xc5\x34\x94\xe1\x54\x34\xb3\x10\xed\x2b\xcc\x7e\xb4\x6a\x56\x4c\x95\xb8\x69\x23\x50\x63\xd0\x1e\x8e\xc5\x6d\xba\x6c\x5b\x86\xfd\x79\x93\x17\x79\x79\x93\x2f\xf1\x4a\x45\x33\x67\xad\xb6\xc1\xe5\x68\x2c\xda\x63\x31\xd4\xe6\xd7\xee\x6d\x23\x48\x54\x1c\xa9\xf6\x34\x0a\x2d\x62\xd4\x3e\x2e\x32\x11\x5b\x90\x62\x49\x35\x5d\x56\x27\x25\xef\xba\x6f\xc6\x10\xb2\xfb\x6b\x69\x14\xd3\xb3\x1b\x38\x4b\x95\x99\x5f\xd8\x61\x73\xde\x70\x99\x18\xed\xb5\xca\x45\xce\x0b\xe1\xab\xd2\xfb\x8c\x9b\x9c\xf7\x5c\x05\x57\x4e\x95\xa5\x9c\xa3\xa9\x0a\xc7\x4e\x95\xaf\x9c\xf7\x3c\x2b\xbc\x9f\xd7\x95\x48\xe1\x54\x1d\x0c\xce\x9b\x64\x9c\xc1\x3d\xcc\xf1\x25\xa3\x24\xd6\x4e\xd5\xf3\xe0\x9c\x88\xa9\x16\x13\x5f\x28\xa7\xea\xce\x77\x3e\x06\x3a\x2a\x5e\xe7\x5e\x7d\xe7\x43\x74\x93\xc2\x57\x39\xda\x79\x26\x02\xfb\xa1\xb4\x51\xa7\xe8\x72\xff\x4b\x64\xd6\x75\xac\xf0\xf5\x3f\xcd\x0a\x68\x10\xfd\x35\x2f\x5c\xd8\x01\x3d\xbe\xc1\xac\x1e\x95\x29\xf2\xad\x3a\xc9\x42\x05\xce\x84\xdf\xda\xf3\x77\x0e\xd4\x43\x65\xbf\x07\x15\x07\xda\x9b\x3e\x36\xf2\xac\xce\xf9\x93\x68\xc0\xc7\x0d\x63\xe2\x34\xe2\x2b\xd3\x8a\xd4\x7a\x1a\x84\xf1\x74\xcc\xef\x1c\xb3\x00\x45\xc1\xf5\xaa\x49\x83\x45\xdb\x83\x90\x8f\xa3\x51\xa3\xfc\x23\xed\xb1\x62\xba\x2f\x97\x0a\x6c\x02\xb2\xf5\x00\xf5\xb9\x5a\x2c\x2d\xc1\x38\x8a\x45\x63\x92\x2d\x71\x66\x54\x6e\x03\xf2\xfc\xa6\xbc\x9a\xdc\x3a\xab\xa7\x96\xc1\x6c\x73\x41\x67\x78\x83\x01\x5c\x07\x80\xd1\x2e\x37\x15\x60\x34\xf9\x1b\x86\x4e\x1e\xca\x82\x12\x94\x53\x15\xc0\xa9\x6e\xef\x35\x8c\x90\xf9\x9e\xc4\x3a\x1c\xde\x65\x6d\xab\xcd\xdb\x19\x79\x62\xc6\xb4\x63\x0a\xe3\x53\x37\x1b\xee\x35\x74\x0e\xa3\x48\xaf\xee\x81\xc9\xb8\xbd\xd3\xa8\xaf\xb0\x71\x12\x04\x22\x8e\xcd\xb2\xbe\xa1\x63\x9e\x72\x19\x58\x63\xb4\xba\x5e\x57\x50\x4e\x55\x38\xc9\x8d\xdb\xdb\x80\x7c\xab\xa0\x38\x11\xba\xf1\x8c\x6b\xf1\xe0\x34\x9c\x88\xd2\xa2\xbd\xbe\xc3\x79\x70\x3d\x50\xd1\xb4\xcc\x65\x19\xc7\x7b\x19\xb8\xe5\xba\x60\x1c\x4e\x1d\x70\x94\x08\x34\xe9\xe0\xa5\x17\x1d\x9a\xb3\xe4\x34\x8a\x43\xbc\x10\x13\x9c\x61\x78\xbb\x81\xbb\xb0\xa2\xcc\xbe\xfb\x0b\x7a\x0a\x52\x4a\x5e\xe5\xcd\x2b\xfb\xe5\x66\x1d\xee\xcd\x66\xad\xe2\xdd\x66\xbd\xe0\xc3\xf2\x24\x57\xd1\x2c\x5e\x9e\xdf\xaf\x36\xe3\x39\x0b\xca\xb1\x28\xdf\x35\x1e\x12\x3a\x26\xe7\x25\x6b\xd9\x01\xdc\xe3\x70\xc4\x20\xd4\x8e\x19\x3a\x74\xa0\xff\x1d\x5f\x81\x2a\xb1\xc5\x73\x83\xc5\xf4\x63\x11\x4a\xea\x9f\xb8\xfe\x71\x5f\x79\x7f\x13\xeb\x8c\xcc\xb6\x0d\x69\xd7\x76\x2f\xa5\x54\xc7\xb1\xb0\x37\x2d\x38\xd5\xf1\x7a\x5d\x6a\x2b\x06\x36\xa8\x22\xb0\x41\x95\x3d\x8d\xdf\x35\x6c\x19\xa3\xb3\xd9\x54\x7d\x87\x39\x9e\x79\x9e\xcf\x55\xbf\x78\xf7\x1f\x8e\xe7\x6c\xe1\x1f\x86\xdd\x65\x23\xc0\x5c\xff\x5b\xa5\xc2\x8f\x9b\x2b\x04\xc5\x3e\x0b\x72\xcd\x6b\x4e\x5c\x1b\x53\x91\xd5\xd5\x59\xaa\xbd\x1a\x5c\x51\x8a\xe7\x9c\x91\x1f\x37\x70\x8d\x89\x94\xb1\xa9\x65\xcf\x71\x90\xba\x59\xab\x39\x57\x1a\xff\xe7\x4c\xab\x22\xf9\x8b\xeb\xff\xb0\x1b\x6a\x6e\x60\x03\x3f\xb8\xcb\xf7\xd0\xdd\xc0\xdd\xe0\xa0\xa2\xe2\xfd\x7f\x76\x99\xba\xdb\xae\x7e\xc7\x9b\x03\x9c\x4d\x96\x12\x2e\x67\x56\xd4\xaa\x95\xf6\xd0\x5f\x2c\x61\xfa\x57\x56\x0f\xf1\x5f\x10\xd1\xa5\xbd\x86\xcd\xd6\xd6\xcf\x55\x26\x4b\xae\x5c\xa6\xc1\xcd\x35\xd5\x72\x2a\xe4\x20\x94\xa3\x25\x6d\x4d\xdc\x4e\x71\x6f\xb8\x84\xfe\x59\x55\x32\x3e\x5f\xc1\x25\xc5\x38\x7c\xdf\xae\xbf\x33\x9d\xfa\x81\x4f\x84\xd7\xb0\xab\x1f\x6e\x46\xf8\xd1\x52\x87\xfc\x15\x8e\xa3\xc1\x40\x89\x38\xae\xa0\xe1\xaf\x96\x0c\xd7\x97\x41\xc5\xcf\x15\x59\x3f\xd7\x89\xdd\x4a\x8e\x7b\x65\x9f\x61\xda\x8c\x37\xdb\xf6\x09\x97\xe9\x71\x12\x6b\xa1\x1a\x27\x98\x2c\xd7\xd6\x54\x0a\x22\xc0\xc4\x25\xe5\x6d\x15\xc7\xb1\xf3\x0c\x77\xad\x56\x19\x4b\xc3\x48\x4d\x52\xbb\xbf\xa2\xab\x16\x6d\x0c\xa2\x71\x3b\x9e\x54\x9c\x94\xb6\xbf\x9c\xa5\x2e\x4a\x41\xbb\x9d\x3a\x63\x9b\x1e\x20\x55\xd8\xff\x5c\xc5\xb6\xdd\xbf\x52\x75\xe6\x75\x25\x92\xd9\x30\x50\x9f\x0f\x46\xc2\x81\xad\x4e\xa5\xc7\xd6\x87\x5d\xd8\x02\x99\xfa\xe4\xac\x8c\xc1\x48\x61\xb2\xbd\xbc\xd5\x91\x17\x29\x50\xea\xe9\x40\x9f\xe3\x82\x18\x2a\xe5\x20\xdd\x58\xce\xa2\x77\x13\x63\xa0\x5e\x0d\xe1\x75\x92\x46\xec\xe5\x0d\xff\x15\xe3\x4d\x09\x3e\x58\x32\xdd\x62\xa1\xcd\x7a\xba\x3c\x91\x06\x61\xcc\xfd\x31\xce\x24\xa2\xcb\x42\xa0\xca\x4e\x62\x0d\x3b\x89\x7f\x25\x3b\x7d\x12\x42\x15\x83\x7a\xb5\x66\x50\xb1\x8b\x9e\x05\x20\x33\x7e\xaa\x6e\xb6\x2d\x79\x1a\xd2\xe9\x33\xbb\x29\xa6\x4f\x79\xda\xfc\xd7\xc9\xfe\x32\xd5\xe1\x2f\xcf\x83\x0f\xb1\x11\x2b\x7f\xe4\xdd\x6c\xe4\x80\xcb\x8f\x69\x1a\x4e\xbe\x0d\xeb\xa6\xfc\x57\xa1\x62\x54\x66\xa4\x8d\x7e\x32\x2b\xf2\xbf\xa8\x01\x4f\x14\x97\xc1\xd5\x2f\x36\x40\xb9\xfc\xc3\xaa\x85\xe2\x3f\x59\x75\x12\x8e\x07\xc6\x5a\xf8\xf5\xda\x3f\xfe\x8b\x6b\xff\x12\x0b\xf5\xeb\xb5\x7f\xfa\xd7\xd5\xfe\x32\x4a\xc7\xf4\xd7\x6b\x7f\xfc\xaf\xab\xfd\x58\xdc\x84\x7f\xab\x72\xff\xc5\xbf\xae\xf2\xbf\xdb\x70\xff\xb2\xec\xfe\x40\x6b\x9c\x7f\x71\x7d\x05\xe5\x19\x5e\x59\x20\x23\x39\x0c\x47\x19\xfa\x0f\x39\x31\xd3\xf6\x5e\xb1\x01\xcc\x83\x6b\x43\xb9\x1c\x38\xe0\xfc\xdb\xf0\xe1\xf0\xe1\xf0\x71\xfe\x71\x18\x49\xdd\x1e\xf2\x49\x38\x36\xca\xe3\x24\x92\x51\x3c\xe5\x81\x28\x1a\xf8\xae\xa8\x4d\x96\x88\xbb\x58\x3e\xb0\xf1\xb9\xec\xba\xb4\xc7\x95\x98\x74\x83\xb3\x2c\xc0\x87\xe7\x01\x3e\x79\x40\x0d\xfa\x1d\xde\x70\xc0\x33\xab\xc1\x37\x58\xad\xf4\xca\xa8\x3d\x4a\xb4\x16\x2a\x2e\xc8\xfa\x88\x5f\xaf\x6f\x88\x33\x0c\xc5\x78\x10\x0b\x5d\xee\xf7\x17\xa1\x8a\x75\x63\xc0\xef\x1a\xd1\x10\x43\xf2\x66\x42\x5c\xe7\xa3\x70\x8b\x1e\xab\xf7\x83\xe5\xb2\x77\xe4\xe8\x06\x9c\xf7\x91\x1c\x18\x5d\x7a\x2b\x71\x83\x5b\xe0\x9a\x82\x7d\x7f\x92\xd8\xf7\x5d\x7b\x4f\x1d\x7e\xb2\x18\xe5\x4d\x85\x4f\xd0\x6b\xb9\xd2\xdb\xeb\x7c\x88\xb4\xf0\x1a\xa7\x57\x61\xdc\x30\x6b\x55\x28\x47\x0d\xf3\xc8\x6f\x6c\xc2\xc3\x71\x14\xf0\x71\x23\xd6\x91\xe2\x23\x61\x88\xbf\x8b\x12\xd5\xf0\x8d\xe9\x6b\xb5\xd8\xdc\x59\x52\x8b\x55\x9a\x91\x70\x00\x2f\x02\xb0\xd6\xe6\x69\xfd\x2a\xba\x95\x9b\x8e\xef\xad\x19\xf2\xc6\x1a\x21\xcf\x30\xae\xcf\x7f\xbb\x1c\x8f\xb5\xeb\xd9\xf4\x51\xaa\x9c\xcd\xe8\x72\x1b\x04\x68\xe0\xb0\xb5\x95\xe4\x37\xbf\x57\x15\x06\x3e\xa8\x6b\x07\x1f\xb9\x4d\x21\xb0\x20\xd2\x0d\xba\xf5\x0b\xe3\x67\x64\x74\x63\x1a\xb0\x0f\xdc\xe5\xf5\x5b\x29\xb5\xb5\x2e\x83\x0e\x75\xf9\xb6\x3d\xaa\xfc\x15\xf0\xc6\xb4\x3b\x1b\x31\xff\x76\x0d\xf7\x4c\x7c\x33\x17\xaa\x7c\x93\xbe\xdf\x71\x28\x58\x16\x1a\x6b\xa1\xda\x3e\x57\xed\x3c\x76\xb3\xcc\x4c\xe3\xd4\x84\x30\x43\x1d\x0c\xd2\x03\x95\x1c\x3e\x0b\x9c\xd3\x37\x70\x1f\x5c\xe2\x69\x2a\xab\x58\xc0\x1d\xb9\xd9\x86\xd3\x6d\xcc\xcc\x05\xb7\x64\x7b\x1b\xae\xb7\xc1\xde\x97\x7b\x41\x69\x6d\x4b\x02\x31\xbe\x10\x70\x4b\x06\xdb\x70\xa4\x31\x9f\x90\x74\x03\x63\xf4\x07\xdb\xb4\x1e\xf0\x5a\x81\xbe\xd6\x84\x63\x34\xd6\x00\x1c\xa7\x02\xff\x70\xfd\x10\xdc\xdd\x94\xd3\x91\x54\xb5\x88\x57\xb9\xfc\x90\xfc\xc6\x37\x8a\x0f\xfe\xd3\xd6\xd1\x68\x34\x16\x46\x7f\x6a\x4f\x06\xd9\xcb\x31\x3a\x72\xf3\xb8\x90\x89\xdf\xde\x6f\x4c\x75\x7b\xb7\x31\xf5\xdb\xbb\xf5\xe8\x13\x3f\xd2\x3a\x9a\x38\xe0\x74\xa7\xb7\x8d\x38\x1a\x87\x83\x86\x1a\xf9\x9c\x74\xa0\x61\xff\x73\xbb\x3b\xfb\xb4\x18\xa6\xb3\x92\x58\xad\x79\x1e\xcb\x5e\x94\x94\x14\x5f\x71\x39\xc8\xa2\x20\x2a\x46\xca\x58\x28\x3d\xe1\x92\x8f\x8a\x01\xbc\xaa\x97\x96\xfc\xa6\x50\xb8\x5e\x6e\x13\x49\xe1\xc5\x36\x5d\xa5\x36\x17\xf9\xf4\x76\xbc\xea\x28\xa6\xca\x62\xad\xaf\x97\x16\x90\x50\x8e\x43\x59\x72\xda\x2e\xb7\x68\xcd\x86\x63\x2d\xbe\x43\x8a\x59\x45\xa8\x88\x59\xa3\x1c\x43\x62\x34\x45\xab\x30\x56\x74\xc6\x2f\x35\x8f\x5c\x7d\xbb\xf9\x49\xed\x7b\xfd\x60\xdb\x8f\xda\xf7\x7a\xc4\xe1\xa7\x32\x37\xfd\x21\xc9\x50\x55\x9d\x34\x6f\x83\x4a\x1a\xa7\xca\x64\x4d\x9f\xbe\x6c\x03\x86\x1c\x06\xaf\x69\xcb\x19\x87\xfe\x03\x3f\x8a\x74\xac\x15\x9f\xb6\xf7\xdc\x8e\xdb\x69\xf3\xf1\xf4\x8a\xbb\x07\xed\x41\x18\xeb\x07\x41\x1c\x17\x00\xee\x24\x94\x6e\x60\x4c\x97\x2f\x81\x19\xcc\x2f\xdb\x20\x2d\x0e\x5c\xe3\xf8\x4c\xc4\xd1\x44\xb4\xf7\xdc\x87\x6e\x07\x4b\x96\x5f\x17\x85\x7f\xd4\x0a\x8b\xf1\xa4\x3d\xe0\x5a\x4c\xc3\xe0\x5a\x28\x2c\x58\x7d\x65\x8b\x3d\x09\xea\xd6\x84\x35\x1c\xde\x10\xe5\x06\x78\x06\xf4\xce\xfc\x91\xb4\x97\x67\x17\xbe\x57\xf9\x93\x5e\xca\x38\xcc\x4b\xd2\x37\x7f\xe9\xaf\x7a\x19\x94\x5e\x2e\xf5\xed\xfb\xc0\xd4\x7f\x56\xd7\x3d\xd2\x29\x65\xa6\x6a\x2e\x1b\x3f\x07\xe8\x78\x29\x44\xd4\x8e\x87\xd7\x39\x34\x54\xce\xd6\xf6\xb7\x5e\x54\x3e\xcb\xfc\x73\x38\x24\x3b\xe8\x7e\x33\x24\x65\x65\x6b\x65\x8a\x44\x38\xdb\x36\x93\xbd\x91\xf4\x4b\x08\xfc\x1c\x01\x1e\x15\x5e\x8f\xb5\x32\xfd\x16\x75\xe4\x41\x29\x5d\x4d\xfe\xd2\xc7\x2b\x63\x72\x05\xc6\xa6\xea\xff\x3d\x80\x3f\x02\x90\x11\xa8\x08\x74\x04\x22\x82\x24\x02\x1e\x41\x10\xb1\xaf\x92\x38\xa7\x3c\xbe\x76\x28\x44\xd1\xba\x94\x5c\x41\x44\xf2\xac\x5c\x69\xf2\xae\xfa\x1d\x54\xc8\xd6\x9f\x71\xc9\x0a\x8e\xa1\x72\x33\x1e\x5e\x0f\x43\x3e\x28\xbc\xe5\x2e\x3f\xf9\xa5\xc8\x3d\xbf\x2d\x2e\x92\x11\xa5\x3b\xd4\x38\x13\xf0\x5a\xad\xba\xb0\x2a\x9a\xc6\x9a\x6b\xe1\x80\xa6\xf0\x1f\xaf\x95\x2b\xf9\x4d\x38\xe2\x3a\x52\x6e\x12\x0b\x75\x34\x12\x52\x17\x97\x27\x9d\xaa\x70\x80\x6e\xbd\x66\x73\x25\xb6\x2b\x1e\x5f\x65\x81\x57\x9a\xae\x3e\xbe\xd6\x53\x6e\xa0\xd5\xf8\xad\xb8\x9b\xcf\x95\x3b\x11\x9a\xa7\x8f\xf1\x55\x38\xd4\xf8\xdc\x3d\x34\xeb\x73\xa2\x75\x24\xe7\x73\xe9\x6a\xae\x46\x42\xe3\x91\xef\x68\x26\xc7\x11\x1f\xcc\xe7\x44\xb9\x53\x85\xd7\x3b\x3f\xb3\xbc\x40\x28\x2a\x27\x57\x4a\x0c\x41\x31\xd3\x35\x20\xd9\x73\x41\x34\x1e\x19\x22\x09\x91\xcd\xa6\x72\xfd\x3b\xcb\x2e\x77\xf8\x23\xb0\x3f\x02\xfc\x91\xb8\xdc\xfe\x4c\x5c\xde\xcf\x37\x06\xbc\x74\x27\x42\x2f\xec\xd1\x17\x08\x9e\x79\x2b\x23\xfc\xf0\xb2\x56\x09\x58\xb1\xa6\x0b\x18\xf8\x9e\xbd\x8c\xf5\xb1\x87\x57\xb8\x06\x7b\xe6\xdf\x3d\x83\x22\x8c\xd2\xe4\xf9\x43\x7c\xd8\x5d\x80\x1f\xb1\x81\x84\x38\x62\x81\x84\x31\xbe\xec\x2c\xe0\x06\x1f\xda\x3b\x0b\xd8\x8e\xd8\x4d\x04\x93\x88\x6d\x47\x70\xb5\x8e\xa5\xee\xf9\x73\x6f\x12\x01\x7f\x81\x81\xf5\xaf\xbd\x71\x04\xfc\x8d\xf9\x1b\xfc\xf0\x14\xf0\x6d\xef\x23\x26\x94\xf3\xb9\x97\xa6\x71\xe3\x97\x9e\xe3\x40\x70\xe3\x9d\x01\xdf\xc5\x23\xde\xaf\x3c\x09\xc1\x1b\x83\xc5\x1f\x7b\x67\xe0\x4f\x30\x9f\xda\x73\x54\x55\xf0\xa3\x7f\xe4\xdd\xa7\xc5\xf0\x27\x42\x3d\x31\x7f\x9e\x63\x62\xb8\x37\x58\xe0\x1d\x16\xf0\xbf\x7a\x1d\xbc\xe1\x20\x6b\xcf\x68\x3d\xe5\xcf\x90\x66\xa4\x36\x27\x94\x77\xbc\x69\x04\xc1\xad\x21\x7e\xdf\xfb\x8a\x59\x5b\x6d\xad\x1f\xbc\x71\x84\x37\x1d\x44\xec\xde\x3f\x35\x3f\xe0\x2e\xfa\x85\xdc\xaf\x1d\x68\xa7\x39\x5c\x6f\x23\x96\x48\xb8\x8e\xd8\x3d\xbf\xc2\xae\xe0\x48\x38\xe6\x97\x3b\x36\x7f\x4e\xcc\x9f\x53\xf3\xe7\x8b\xf9\xf3\x0a\x53\xce\x1d\x61\x4b\x0e\x16\x70\x82\x0f\x3b\x0b\x38\xcd\x06\xf0\x79\xb4\xfe\x76\x86\x83\xf2\xed\x0c\xdf\xb2\xb1\xff\x8e\x0f\x8f\x16\xf0\x34\xc3\x7a\x19\x6d\xb8\x86\x91\x48\xa2\x51\x50\xbc\x89\xd8\xca\x1c\x87\xcb\x97\xaf\x4a\x7a\xaf\xd5\xdd\xfd\x6b\x95\xdf\x35\xcb\x54\x71\xc5\x53\xf9\x0a\x5a\x25\xcc\xa4\x22\x78\xfe\x89\xd2\x05\xbc\x8b\xd8\x33\x09\x1f\x22\xf6\x53\xc2\xab\x88\x7d\x88\xcc\x78\x9c\x45\xec\x95\x82\xd7\xeb\x89\xbc\xe7\x6f\x3c\x0d\x7e\x68\x1a\xfb\xd3\xb6\xf6\xe3\xda\x61\x51\xae\xdf\xc7\x6c\x87\x91\xcd\xc0\x88\x49\x89\x8e\xd7\x83\xdb\x44\x89\x32\x4f\x92\xf8\x31\x82\x33\x3b\x96\xcf\x24\x8b\x56\x66\x19\x86\x00\x22\x08\x0b\xea\xde\x7a\x1a\xf8\x99\x17\x01\xef\x7a\x09\xf0\x87\x9e\x4a\x89\x7d\xe2\x09\xf0\x3f\x7b\x1c\xfc\x13\x2f\x04\xff\xcc\xc3\x44\xe7\xaf\xd4\xa6\x44\xe7\xbe\x30\x6d\x95\xa6\xe4\x47\x83\xe8\xd8\x28\x36\x14\xbe\x46\xab\xd3\x2e\x3f\x04\x1f\xd3\x2e\xff\x8c\x98\x2f\x48\x48\x21\xdc\x94\x30\xf2\x67\x04\x33\x12\xdb\x84\x6f\x36\x15\xe7\xb3\x88\x0d\x25\xbc\x8c\x36\xdf\x3a\x32\x94\x6c\x46\x9e\x45\x1b\x0e\x8b\x3b\x89\x9c\xaa\x28\x10\x71\x2c\x06\x4e\xb6\xb6\xc6\x82\xa4\xbe\xdb\x6c\xb3\xa1\xf4\x25\x35\xba\x9c\x38\x99\x4e\xd5\x52\xb9\x9d\x25\x15\xf6\x65\x44\x9c\x2f\xf2\x5a\x46\x33\xd9\xd0\x77\x53\xe1\x35\x9c\x96\xa4\x0b\x33\x7b\xb0\x4f\xef\x48\x08\x36\x9d\xcb\x93\x3b\x07\xbe\x46\xc4\xbc\xc7\x97\x79\x16\x98\xfa\x87\x2c\x7f\xcc\xd2\x7b\xbb\x70\x0d\x25\xc4\x82\xbc\x52\xe8\x11\x86\x17\x91\xad\xc2\x66\x35\x38\x8a\xcc\xb7\x15\x9d\xe6\x47\x38\x60\x14\x3e\x47\xbf\x78\xaf\xca\xfb\x0d\x9c\x5f\x4b\x7b\x6f\xc0\xbf\x44\xd5\xeb\x26\x65\x9e\xe5\x79\x7d\x16\x3a\x9e\xde\xff\x97\x9e\xa8\xa1\xe5\x24\x80\xe9\x79\xab\xf4\x42\x5b\x8c\xf8\x46\x05\x01\x24\x4b\x88\xf9\x50\x2a\x8b\x66\x47\x76\x8f\x43\xc9\x0f\xfd\x39\x02\x3d\x9f\x0b\x1b\x84\x5e\xf9\x86\x89\xb6\xb2\x6f\x46\x11\xa2\x78\xf3\x5b\xc4\xbe\x44\xf0\xe3\x57\x7b\xe8\x53\xb4\x69\xc6\xd8\x0c\x5e\xa1\x99\x31\x37\x36\x77\x17\xce\x98\xb7\xd9\xf2\xf0\x7b\xb4\x3e\x7d\xe9\x8f\x08\xde\x46\x70\x4b\x3e\x45\xa5\x44\x64\xa8\xb0\xa1\x4c\xfc\x23\x62\xe4\xf7\x00\x05\x6b\x67\x65\x1a\x45\x9b\xcb\xd0\x98\xbe\xa6\xe9\xfd\x2c\x25\x62\xc7\x08\x9e\x5a\xda\xb1\xdf\x2d\x4a\x19\xb2\x9f\x0a\x54\xf8\x17\x29\xe5\xed\x90\x62\xa2\x33\xf3\x35\x31\xca\x29\xe6\x4e\xe4\xd0\xee\xe6\xb9\x96\xb1\xbe\x53\x92\x60\x5a\x8e\xc3\x4e\x9a\xcf\x4c\x40\xe0\x25\x98\xcf\x2c\xc1\x7c\x66\xca\xf4\x89\x06\xee\x25\x2e\x5f\xd0\x5e\xc2\x88\x60\x88\x68\x87\xf6\x49\x9a\x76\xbe\xd5\x05\xcd\x74\xab\x0b\x5d\xea\xa5\xef\xb8\xcd\x43\xdf\xea\x52\x48\x70\xd4\x7e\xaa\x55\x2b\xc4\x8a\x5e\xb9\x21\x2a\xb4\x1a\x6e\x39\xbd\x9b\x99\xab\x1a\x5b\x2f\xc2\xff\x66\x16\xf6\xd1\x2d\x13\x54\x98\xd0\x1e\x65\x48\xc0\x66\x6b\x37\x20\x48\x1e\xc7\x94\x42\x02\x1b\x98\x84\xab\x53\x4a\x8b\x10\xb6\xf1\x06\x14\xe0\x21\x7b\x02\x41\xc8\xc2\x04\xa2\x95\xc0\x1d\x3c\x99\x6b\x43\xc0\x9a\xcd\xad\x07\xe7\x7f\xc6\xb7\x7e\x74\xf1\xc0\x9e\xe1\x92\x78\x6d\x24\x6b\x49\xca\x98\xc4\x04\x61\x36\xd1\x74\x18\xb2\x55\x99\x32\x1f\x1f\xda\x6c\x95\xab\xf2\x5c\x72\xdd\x98\x44\xb1\x6e\x3c\xde\x98\xe6\x32\xdd\xeb\x8f\x42\xe2\x74\x5c\x23\x2f\xd7\x65\xd9\x1c\x8e\x23\xae\x6b\x39\x36\x79\x48\xba\x62\xf7\x37\x7b\x4f\x67\x39\x5d\x26\x0c\x43\xc6\xcd\x8a\xfc\x17\x69\xf8\x1b\xc3\x90\xc8\xd6\x41\xe7\x37\xf5\xdb\x41\xe7\xb7\xae\xd8\x35\xcf\x44\xb7\x39\xc5\x1f\x06\xb9\x68\xe1\x85\x7a\x71\x65\xd9\xe2\xc5\xad\x64\x01\x93\x10\x31\xb5\x9e\x2f\x82\xbf\x27\xda\x6c\x66\x41\xb3\xb2\x2b\x37\x58\x96\x6b\xc9\x2a\xb9\x96\x58\xb9\x66\x13\x7f\xa2\xeb\xaf\x2e\xdd\x12\x98\x11\x0e\x56\xfe\xd9\x3b\xd7\x61\x1c\xae\xbf\x61\x29\xb6\xfc\x64\xd5\x8c\x41\xc8\xc6\x21\xdc\x6c\x06\xff\x91\x83\x6f\x87\x4b\xb9\xb3\x53\x81\xbc\xbe\x8f\x44\xda\x47\x6b\xfb\x47\xae\x9c\x2d\x1a\xc5\x3f\x4e\x5c\x0a\x93\x90\x6d\x87\x70\x15\xfe\xe2\xad\x62\xd3\x90\x7d\x55\x30\x0a\x59\x9c\xc0\x2c\x64\x9f\xe1\x2e\x64\x27\xf0\x55\x2d\xf3\x79\xbe\x9c\x58\xaf\xaf\x75\xd5\xdb\x2b\x0a\xf2\x2b\x35\x06\x09\xe1\xa5\x8b\x04\x55\xd1\xb4\xdd\xee\xfe\xee\x81\x38\xf8\x8d\x88\x76\xf7\xf1\xc3\x8e\xb1\xd5\xd2\x6c\x09\x24\x39\xdc\x9d\xcf\xb7\x6e\x12\x22\x68\x9f\xb7\xbb\x1e\xa7\x2d\xb2\x6d\x7e\xb5\xb7\x13\x82\xc0\x45\x40\x4f\x60\x18\x55\xb5\x34\x5d\xa4\x6a\x4d\x52\xcf\x96\xb1\xdb\x3d\xe4\x7d\xa4\xc3\x53\x99\x56\x53\xba\xac\xe2\xf1\x21\x9f\xcf\x77\x1e\x33\xc6\x78\xb3\x99\x56\x9a\x41\xef\x1c\x3c\x7c\xb4\x27\xf6\xeb\xfe\xd6\x0a\xc6\xfd\xce\xe3\x87\x07\x39\x4c\x91\x73\xa3\x53\x82\x79\xf8\xf0\xe1\x81\x38\xa8\x3b\xd4\x2b\x68\xba\x9d\xdd\x83\x47\x39\xcc\xc1\x4a\x34\xdd\xdd\xce\xde\x41\x41\xcf\xc3\xd5\x88\xf6\x0f\x76\x4b\x44\x3f\x5a\x0d\xf4\x68\xb7\x7b\xf0\x28\x07\x7a\xbc\xb2\xba\x9d\xce\xe3\xc7\xfb\x3b\x39\x50\x91\xee\xa3\x82\x6a\x67\x77\xff\xd1\xc3\x12\x54\x77\x35\xae\x83\x9d\x83\xfd\xa2\x9b\xba\x3b\xab\x71\x3d\x7a\xb4\x6f\x3b\xb3\xa6\x42\x96\x05\x1e\x06\x14\xa3\xc0\xfb\xa6\x49\x62\x33\x26\x2e\x16\x30\x23\x37\x61\xe9\x4f\x10\x92\x01\x79\x93\xe5\x91\x1c\x26\x64\x8f\xc2\x38\x21\x4e\xdb\xa1\xa5\x97\x3b\xe5\x97\xf8\x9b\x52\xb8\xdd\x30\x55\x76\xca\x53\xe5\x3a\xfc\xf5\xcb\xe6\x32\x9d\x42\xa5\xb7\x0c\x63\x4a\x3f\x33\x67\x48\x07\xb4\xcb\x33\x5d\x6d\xab\x74\x2b\x86\x60\x78\x55\x16\x11\x8c\x53\x37\xbf\xed\x43\xa4\xf7\xcd\xcc\xc8\xad\x59\xaa\x85\x99\xe8\xda\x5e\x33\x73\x14\xb2\x49\x02\x27\x1b\x0c\x09\xf9\x1b\x31\x42\xbd\x85\x16\xc4\xe9\x8a\xb5\xab\x96\xec\xb3\xd2\xa5\xe5\x3f\x36\x37\xa7\x6f\xf3\x04\x99\x2e\x3c\x75\x96\xbb\xd5\x5b\xd5\xd7\x5e\xa9\xaf\xa1\x52\x8f\xc5\xc9\xb5\x85\x73\x0d\xc2\x30\xa4\xe6\x5d\xc7\x6e\x66\x66\xd0\x93\x70\x4d\xf6\x7c\x53\xee\x9b\x25\xa4\xce\x0c\x27\xe1\x5f\x95\xef\xda\xf2\x2d\x5b\x7e\x25\x4c\x3b\x85\x31\xfc\x72\xf1\x17\x6d\x2b\xbe\x07\x21\x19\x12\xdf\xa8\x83\x9d\xec\xff\xd4\x68\xa8\xf6\x28\xf6\x57\x45\xe1\x79\xb8\xc1\x84\x36\x4a\x72\x45\x3f\xfe\x16\xfe\xad\xeb\xe6\xf2\xdb\x0e\x4b\xb7\xb9\x61\x04\x95\x3d\x3c\x8e\xac\x14\x69\xbc\xb7\xa3\x7c\x6b\x5b\x36\x03\xeb\xa0\xdf\xc2\x3a\xa8\xa1\xe9\xfb\x8a\x39\xc3\x24\x31\xd4\x77\x21\xf0\xce\x60\xe0\x75\xc1\xf7\x3a\xa6\x11\x98\x8f\x61\x51\x51\x68\x26\x9a\x20\x66\xb3\xc4\x9f\x51\x4c\x0a\x63\x56\xb0\x05\x85\xa7\xab\x10\xcf\xc8\x77\xd4\xae\x97\x71\xbc\x11\x70\x95\x00\x2a\x3e\x16\x09\x37\x48\x3e\x2f\x1b\xc1\x76\x11\xc2\xa4\x38\x65\x24\xc6\x56\x2d\x12\x67\xeb\xd4\x56\xf5\x62\x61\x51\xa1\xc9\x7a\xb9\xce\x04\xc8\xa5\x44\xbb\x5b\xbf\xf2\x0c\x84\xbd\xbd\xe8\x4d\xb8\xfe\xf6\x1d\xcc\x66\x99\xb8\xdb\xf3\xb9\x31\x1a\xf2\x37\xc2\xbc\x11\x2e\x4f\xb3\x60\xa6\x09\x43\x6d\xba\xd0\x72\xfa\xc8\x02\x59\x7a\x55\x8f\xc0\x64\xa1\x62\x29\xcb\xa4\x40\x15\x3a\xcf\x32\x99\xa5\xf1\xe4\xee\x00\x78\x29\xbf\xa4\xc1\x16\x40\x92\xa6\xb7\x8c\x98\xb1\x55\x42\x96\x60\x1e\xd2\x04\xef\x78\x4d\x5c\xd1\xab\x53\x59\x23\x29\x82\x30\x4f\xa3\x89\xd4\x71\x9a\x11\x18\xd4\xc8\x32\xdf\xb3\x04\xa1\x29\x85\x79\x0b\x72\xa2\x0c\x3e\x8e\x44\x51\x78\x17\xb2\xef\xf0\x21\x5c\x7d\xc5\x4e\xfd\x76\xda\xb4\x12\x03\x70\x13\xc1\x4d\x44\xf3\xcb\x3f\x79\x2e\x8a\x35\x26\xe7\xd4\x98\x9c\x53\xbb\xa2\x97\xe7\xe1\x7a\x67\x9a\x92\xd0\xfa\x94\xba\x21\x6f\xc2\xd4\xb1\x74\x47\x3e\xd8\x11\x08\x28\x44\xf5\xa8\x37\xac\x3b\x4d\x7a\x6a\xbe\xd6\x16\xb7\x12\x9a\xa0\x40\x14\x51\xd4\xde\x5e\xad\x6a\x9f\x66\x39\x98\xbd\x2b\x08\x87\x20\x3b\xf1\x5b\xdc\x3e\x5a\x4d\x6d\x9a\x65\x17\x35\x0d\xd4\x2e\x5e\x50\x74\x16\xae\x71\x1f\xed\xa4\xde\xa9\x93\xd5\x76\xd5\x50\xc0\x28\x81\xb3\xd0\xde\xc3\xf2\x7a\x0d\x96\xc7\x10\x20\x92\x8f\xeb\x6a\xd9\x87\x11\x02\x7c\x55\xab\xaa\xf9\x88\xe2\xfa\x75\x48\x8e\x34\xb5\xe7\x7c\xaf\x8d\xd6\x8c\x52\xf3\x38\x34\xb6\xfd\xfe\x02\xbe\x56\xfa\xa7\xe2\x5f\x68\x2c\x4d\x7a\xc9\x66\xc4\x8f\xd0\xbb\x58\x4b\x7e\x1c\x0b\x22\xd2\x6c\x1a\x90\x42\xd9\xea\x35\xbc\x0e\x89\xc0\x8d\x39\x59\x8a\xc7\x47\x49\xf1\xd5\xe6\x89\x46\xf1\x80\xd9\x82\xe0\x38\x34\xbd\xfa\x7d\x83\xd3\xc3\xfa\xf2\xee\xc8\xd7\x30\x73\xe8\x1d\x87\x78\xa5\x54\x7a\xe5\xf2\xcf\x90\xe5\x9e\xac\x24\x76\xe0\x95\xb2\x9e\x2d\x21\x07\xf1\x91\x76\xe0\xb3\xfd\x99\x4c\x8d\x74\x1a\x94\xde\xc4\x9a\x2b\x5d\x06\x19\x86\x72\x24\xd4\x54\x85\x52\xa3\xd7\x0b\x5f\x66\x89\x8f\x63\xf4\x9b\xbd\xc8\xfc\x66\x5c\xca\x48\xa3\xe7\x37\x76\xe0\x04\xfd\x69\xb7\xe4\x3b\x38\x23\x21\x85\xe2\x3a\x52\x5f\x8e\xdf\x39\xf0\x55\xe1\x97\x23\x6d\x0b\x61\x32\x86\x1c\x3e\x16\xe4\x59\x9e\x34\x91\x52\x78\x96\x36\x04\x73\xb7\xd8\xea\x7e\x86\xb4\x4a\x85\x03\x2f\xa2\x35\xb8\x5e\xe3\x6d\x47\xf0\x72\xe5\xca\xc8\x24\xa9\xca\x7e\xed\xd9\x8b\x75\x8d\xed\x63\x7a\xf1\xc5\x06\xa3\xec\x52\xc0\xcb\x10\xd3\x9e\x58\xbb\xec\xf3\xfa\xdb\x20\x8b\x84\xe1\xc4\xda\xd2\x14\xde\xaf\x74\x1e\x08\x19\x44\x03\xf1\xe5\xf8\xf5\xd3\x68\x32\x8d\xa4\xc0\x5c\xfc\x0b\xf8\x62\x50\x5f\x52\x78\xb2\x61\x7d\xc7\x0d\x8c\x8f\xf6\xe0\x3f\xba\x09\x7f\x84\x69\xf8\x2d\xfb\x0f\x07\x76\x30\x23\xe3\xd6\x7f\x38\xb0\x8b\x4f\xcc\x81\x8e\x7d\xc5\x1c\x3c\xf6\x04\x9f\x42\xf6\x09\xde\x86\x2b\x59\xae\xec\x93\x4a\x98\x26\x8a\x92\xec\x96\xb3\x6d\x7a\xcf\xcb\xb7\x9c\xa1\x7e\x2a\xe7\x73\x0e\x89\x59\x78\xed\x0a\x92\xb8\x1c\x02\x14\xfc\x46\xd8\xa3\x6d\x17\x14\x73\x06\xcd\x4d\x2c\x12\x18\x21\x8a\xd3\xc7\xfc\x52\x2c\x70\x53\x17\x94\xd5\x4b\x7f\x0f\xab\x77\x3c\xe9\x4d\x2e\xa8\x5b\xf2\x36\xb4\x97\x93\xe8\xd4\x80\xfd\x23\x5c\xef\x06\xfc\xdd\x48\xc1\x95\x22\x6a\x12\xc2\xb7\x04\x6c\xf8\x00\xba\xef\x86\xe8\x0d\xec\x2e\x40\x0d\xd9\x9a\xeb\xf4\x97\x15\x04\xf4\xe3\xe9\xd4\x21\xc6\x69\x71\xa7\x81\x5a\x75\xd3\x87\xa0\xd4\xc3\x4f\x3b\x99\x47\x31\xf3\xec\x75\x6b\x37\x15\x48\xd7\x6f\x75\x51\xa3\x73\xfd\x97\xad\x6e\x76\x65\x81\x57\x2d\x25\x5d\x7e\xd2\xaa\x17\x55\x59\xb1\xe2\xc2\x10\x0a\x1a\x5b\xf7\x70\x01\x62\xb8\x5e\x39\xcc\xd7\x45\x55\xb9\x7a\x2f\xf3\xb1\x04\xe8\x63\x19\xe0\xf6\x72\x7d\xf1\xc3\x34\x5e\xd9\xf2\x67\x0d\x10\xb1\xe2\xa6\xe0\xe2\x72\x3e\x5d\x2c\x73\x16\x3c\xa9\x68\x8c\x0b\x0a\xc9\x70\xcd\xb0\x6e\xcd\x88\x18\xa2\x7a\xe7\x6e\x2f\x28\xf0\xe1\xfa\xe1\x4f\x86\x99\x77\x25\x18\xb2\x64\xcd\x9e\x4f\x75\x1e\x44\x25\xdf\x6c\xea\x99\x8d\x4a\x9e\xd9\xcc\x0d\x6b\xfa\x9b\x57\x5c\xb0\x8b\x5e\xc0\x08\x67\x24\xf5\xc2\x46\x7f\xe5\x85\x8d\xca\x5e\x58\xa3\xf7\x58\x0f\x7a\x34\x64\xcb\xd6\xc9\x93\x90\x02\x51\x11\xbb\xe7\xdf\x3c\x3d\x84\xe0\xb9\x47\x64\xc4\xee\x83\xe7\xde\x75\x02\xc1\x57\xdc\x7f\xfd\xe4\x5d\x27\x0b\xea\x06\xcf\xcd\x0b\x19\xb9\xc1\x57\xf3\x4e\x46\xae\xff\x69\x01\x6b\x38\x57\x99\xaf\x05\xf7\x62\x6b\x55\xd9\x0f\x5d\xbf\x4d\x28\x72\xf9\x37\x9a\xb9\xdd\x32\x56\xf6\x49\x30\x34\x9f\x82\xe7\x60\xf9\x36\x65\xda\x6e\x9a\x5a\x7a\x80\x6e\x77\xaf\x04\xa6\x0a\xf7\xf1\xff\xcb\xdd\x9b\x68\xb7\x8d\x63\x0d\x83\xaf\xa2\xf0\xd3\xa4\x81\xf2\x95\x22\xd9\x4e\x52\x61\x8a\xbf\x8e\xb3\x3a\x8e\xb3\x78\x89\xe3\xb8\x3a\x9f\x0f\x48\x82\x36\x6d\x8a\x54\x40\x50\xb2\x9c\xe8\x5d\xe6\x59\xe6\xc9\xe6\xe0\x02\x5c\x44\x91\xb2\xab\xba\xbf\x9e\xef\x4c\x9f\xae\x98\x22\x16\x62\xb9\xb8\x1b\xee\xb2\xb1\x5c\x0b\xd4\xc8\x8c\x1e\x57\xd6\x4e\xd5\x8c\xb0\x00\x04\x76\x71\xb2\x72\xb6\xcc\xd0\x8a\x13\xa2\xf3\x1a\xa2\x50\xd7\x1a\x13\xa5\x82\xdd\xb4\x1c\x86\x6a\xbe\x1d\x0c\xf9\xbf\xd0\x19\x17\x80\x7c\xf3\x9c\x7f\x58\xff\xd0\x22\x1f\x9a\xe5\x4d\x38\x19\x52\x98\x27\x64\x48\x29\x64\xaa\xfb\x4a\x66\x8b\x41\x9e\xf4\xe2\x9b\xa7\x05\xbc\x6f\x21\x7c\xf3\xe0\x63\x66\xc8\x5e\xd0\x0a\xad\x62\x41\xc1\x0d\xd6\x2a\x0b\x83\x02\x9c\xd3\x60\xad\x8c\xd1\x99\x11\x57\x2d\xd5\x38\xd3\x12\xad\x1b\x60\x2a\x41\x7c\x37\x23\xdd\x46\xf9\xf6\x75\x46\x90\x48\x22\x27\x8b\x86\x86\xb4\xb5\xee\x71\x46\xde\x49\x92\xe9\x24\x7b\xdf\x75\xc2\xb9\x28\x58\xc7\xd6\xe4\x23\xb9\xeb\xdb\x5c\xf5\x39\x23\x51\x88\x23\x8d\x42\x8c\xf0\x1e\x21\x8e\xa5\x77\x8f\x08\x5b\x87\x98\x7b\xe4\x3b\x0e\xca\x6f\x5b\x27\xc5\xc4\xdd\x63\x6e\xcf\xef\x5e\xcf\xfb\xce\xcc\xac\x2a\xc4\x68\x5b\xab\xff\x2c\x28\x4c\x97\x46\xb8\xaa\x69\xcf\xbb\xff\xd2\x78\x49\xcb\xea\x32\x07\x92\xbc\x43\xf2\x67\xfc\x5d\xb1\x68\x69\x50\xcc\xb8\x2e\x74\x2c\x57\xf4\xab\x15\x57\x4c\x0c\xa3\x50\x4f\x56\xea\x3f\x59\xf9\xab\xec\x63\x4e\xa2\x20\xef\x81\x52\xad\x2c\x07\xde\xbe\x61\xa7\x0b\x10\x66\x93\xba\x81\x73\x2b\x9a\xd2\xb7\x74\x4c\xaa\x22\xeb\x9f\x71\xf1\x24\x4c\x72\x18\xb8\x15\x4e\x8e\x1e\x99\x34\xaa\x14\x22\x15\x56\x4c\xec\xbd\x8c\xe4\x8f\xd6\xc2\x02\xef\xad\x9d\x04\xe0\x7d\xb3\x2d\xb0\xc0\xdb\xb4\xbb\x81\x42\x8d\xd6\x4f\x0b\xbc\xa7\xf6\x40\x21\xcd\x84\xaa\x4a\x32\xe9\x7b\x6f\x55\xbd\xbd\x8c\xa8\xe7\x6f\x54\xd5\x56\x4f\x9b\xaa\x81\x7e\xeb\x7e\xa6\xaa\xd9\x7d\xc2\xab\xaf\x66\x42\xae\x2d\xed\xe6\x62\x81\x1f\x7a\x8a\x40\xef\x06\x90\x16\x9f\xd0\x4b\x8c\x9f\x9e\x92\x69\x5e\xa2\x06\xaa\x5f\xea\xb1\xa6\xc5\x40\x75\x37\x54\x6b\x8e\x28\x8c\x15\x19\x39\x4f\xe0\x65\x48\x6e\x05\x85\xdd\x8c\xc2\x65\xf0\x77\x92\x73\x2a\x4e\x75\x64\x40\x58\x50\xcc\x55\x6e\x12\x74\x4e\x82\x75\x8c\x71\x8c\xe1\x2e\x29\x5c\x04\xe6\xb6\x76\x16\x38\x51\x0c\xf3\xa0\x5d\x79\xba\x5d\x55\x9e\xde\x04\xcd\x42\xa1\x89\x4b\x03\xd7\xc1\xfa\x74\xd5\x3b\x81\xb1\xb8\x39\x0a\x8c\xfd\xcc\x71\xd0\x9a\x07\xfb\x75\x53\x51\xc7\x5c\x20\x2d\xe0\x6c\xed\x4c\xc7\x5a\x8f\x84\x91\x8a\x0b\x39\xe0\x6a\x1d\xbf\x91\x4b\xe4\x4c\x49\xe4\xac\xcf\x0a\x1e\xac\xa7\x3e\xe9\xf5\xbb\x0f\x1f\xea\x07\x66\x98\x32\xfd\xcb\x57\x5c\x79\x18\x10\xd5\xd4\x43\xfd\x4e\x6e\xc0\x68\x46\x73\xab\x28\xd7\xa2\xe9\x87\x58\x54\x65\x7d\xb9\xa4\xd4\xa9\x26\x7f\xe9\x73\xd0\xb7\xd9\x2f\x97\x57\xa4\x25\xf3\x4a\xa1\x3d\x49\x4a\xdf\x63\xed\x7e\x89\x06\xff\x1e\xde\xfc\xf8\x46\x21\xe4\x61\x46\x13\x33\xfe\xac\xa6\x0a\xd2\xeb\xf3\x32\x20\x99\x62\x84\x9e\xaf\xae\x90\xe6\xcd\x30\x97\x4e\x51\x9a\x2c\x8d\x20\x76\x92\xaa\x2e\x6b\x2f\x84\xa4\xcf\x8a\x3c\x33\x2f\x03\x92\xf4\x7d\xbc\xf4\x6a\xff\xee\x02\xce\x83\xa6\x3c\xc8\x75\xae\xd8\xcc\xb7\x7a\xf3\x88\x46\x97\xc0\x90\x43\xf6\x90\x43\x0e\x03\x72\x4c\x14\x45\xfb\x63\x50\xdb\x72\xfd\xb0\xbc\x00\x1a\x3c\x66\xe4\x3c\xc0\x4c\x66\x6a\x11\xf4\x94\x59\xdf\xaf\x4e\xf8\xd7\xaf\x24\x5f\x8e\x50\x2d\x87\x28\x97\x23\x5c\x19\x60\xb0\x9c\x96\x67\x2f\x84\xb0\xcf\x20\xec\xbb\x10\xf6\xbd\xfc\x63\xa1\x5a\x96\x80\x2e\xd6\x8f\xa6\x34\x72\xdd\x53\xef\x5c\x72\x15\xc0\x32\x58\xa3\xad\x59\xf3\xf2\xa9\xd1\xfd\x8d\xe5\xbb\xc0\xe5\x53\x02\x7d\x43\xb6\xe6\xbb\x60\x32\x46\x75\x8d\xbf\x58\x10\x2f\x27\xe3\xf9\x38\x46\xd3\xc4\xc6\xd5\x90\x45\xf2\x1e\xa6\x60\xc0\xab\xa6\xeb\xde\x0b\x8b\xb9\x99\x75\xd0\x53\xdc\x0f\x1a\x35\xce\xe7\x9a\x37\x7b\x5e\x99\x2e\x46\x28\xa0\x85\x7e\x7d\x59\xdb\x56\xcf\xc1\xb4\xa0\xf0\x31\x68\x54\x66\x08\x62\x04\x1e\x49\x6b\xd1\x26\xf7\xf5\x5b\x5b\x27\x23\x2c\xd5\x1b\xbb\xad\xb8\xd1\xb5\x31\x18\xab\x65\x90\xe4\x69\xe0\x30\x09\xef\xee\x60\x26\x4f\x03\xf2\xd3\x63\x4a\xec\x11\x36\x61\x4e\x06\xbb\x01\xa9\xab\xcd\x66\x01\xa0\x53\x49\xc9\xad\x9b\xad\x19\xcd\x4c\xb6\xb4\xb1\x2c\x14\x62\x8a\x2f\xf7\x6e\x6d\x01\xde\x07\x3b\x06\xef\xb1\xbd\x23\xc1\x67\xb6\x04\xdf\xb7\x1f\x0c\x17\x46\x41\xbd\xa0\xf0\xa9\x15\xf1\x4e\xc9\xbb\x00\xac\xb7\xaf\x8f\x2d\x45\x8e\xe0\x22\xd0\x7c\xf1\xa1\x21\x7b\xb3\x80\xa0\xfa\xcc\xe2\x42\x24\xc2\x82\x1d\x45\x13\x15\x11\x3c\x09\xd6\xdc\x7e\x11\x61\x4c\x26\x6f\x03\xe7\x2c\x86\x57\xc1\x5a\x5b\xec\xdb\x00\x66\xe4\xc4\xfc\x73\xc5\x21\xa6\x30\x46\x46\x64\x9f\xaf\x14\xcc\x64\x91\x98\xf9\xed\x1a\x79\xf5\x55\x80\xfc\xee\x07\x01\x02\x76\x70\x28\xa4\x89\x2e\x99\x95\xf5\x32\xbd\xb2\x71\xd6\xe8\xcd\x5c\xdc\xf1\x14\xae\xcb\xc7\xe1\x98\x27\x99\xec\xf0\x1b\x8f\x73\x9f\xfb\xf5\x10\x01\x1f\xb9\x9c\x25\xe2\xba\xa3\x17\xed\x79\xc5\x33\xab\x26\x2d\x4d\x02\x38\xc3\x2b\x98\xa3\xbe\x77\x49\x37\xac\x8e\xb5\xa1\x7f\xec\xc3\x61\x40\x84\x02\x83\xda\x85\xb7\xf5\x25\xe6\xb9\x85\x8b\xe0\xe9\x24\x89\x53\xde\x09\x44\x32\xee\xb0\x49\x88\xb7\x28\x7d\x56\x77\xa8\xfe\xc0\xa2\x20\x11\x63\xee\x77\x32\x11\x99\x3a\xe8\xd7\xa5\x49\xec\x9b\xe6\x83\x58\x06\x60\x89\x4b\xed\xa2\xce\xde\x96\x5a\x1b\x87\x99\x76\x41\xc8\xe7\xf2\x56\x01\xca\x27\xc5\xfd\x9e\x24\xe4\x55\xa8\xb7\xe8\xe0\xfe\x3d\xaf\xef\xf0\xd6\x74\xf8\xc1\x80\x65\xc3\x66\xe6\xf5\xe3\x0d\xeb\xd1\x8a\xf6\x55\x9b\xd6\x92\x75\x8c\x0e\xa5\xf0\x65\x8d\xd4\xb8\xab\xef\x15\xf1\x70\xbc\xf8\x5b\x0c\xe0\x9c\x7c\x0c\x74\x76\x76\x9c\xc2\x41\x48\x12\x8c\x8f\x63\x84\xe1\x80\x68\x01\x80\xc2\xb5\xa4\xb4\x9a\x0a\x95\xc2\x8f\xd5\x81\x55\xaf\xbf\x45\x71\xfd\xfd\x60\x58\x5a\x78\xa1\xe6\x5d\xf3\x51\x79\xbe\x47\x73\xa5\x8d\xea\xcf\xcf\x41\x7b\x42\xf8\x1f\x41\xb3\x29\x1f\x0a\xcd\x7a\x48\xef\x03\x67\x1e\xc3\xd7\xc0\xf9\x10\x13\x6b\xc2\x45\x1a\xa6\xf2\xad\x82\x8d\xd7\x37\x13\x16\xfb\x3b\x51\x64\xc1\xfb\x80\xc2\xb7\x35\xa7\x74\xbf\x10\xc3\x63\xb7\xad\xd6\x3e\x11\xf0\xd3\x9b\xda\x35\x26\xaa\x16\x3b\xe6\x90\xfc\xa9\x01\x09\x6d\x4f\xbf\xaf\xc4\xeb\xce\x13\x41\x8e\x39\x30\x8e\x19\x35\x67\xe4\xa5\x04\x25\xc6\xc4\x94\xe2\x51\x60\x5a\x7d\x29\xdc\x3b\xb4\xd4\x71\x7e\xd9\x29\xd7\x8f\xd9\xbd\xb6\x8b\xd8\xfe\xc2\x85\x71\x00\x71\x7f\xd7\xe8\x48\xf9\x6a\xd3\x62\xdb\x6e\x91\x90\xb3\x4b\xa4\xe4\x47\x48\xc9\x8f\x91\x92\x1f\x42\xe2\x88\xfe\x2e\x84\xaa\x58\xe7\x62\xb9\x57\x36\xc8\xf5\x99\x20\x45\xff\xcb\x9d\xb9\x20\xb3\xb5\xb9\x20\xd9\xfa\x5c\x90\x5e\x5e\x6c\xf2\x59\xc2\x3c\x23\x49\x43\x76\x48\xb9\x94\x1d\x32\xc4\x1f\x5e\x96\xca\x64\x8c\x60\x85\x41\x2c\xf8\xe8\x5a\x12\x9d\x01\x18\x73\x1d\x7c\xaf\x25\x90\xe4\x74\xb4\x4b\x62\x58\x4a\x22\xc9\xa9\xb6\x70\xcf\x5c\x25\xbe\x6c\x2f\x80\xb9\xce\xa1\x20\x56\x90\x78\x59\x6a\x51\xf0\x56\xf7\xa2\xfd\x72\x7f\x8f\xe8\xbd\xbd\xb2\xe3\x3e\x1b\x59\x96\x2d\xfa\xee\x15\xe0\x56\x7f\x0e\x0c\xc3\x2e\xfa\xee\x35\x1d\xa9\x7f\xed\x5d\x85\xda\xaf\xf3\x90\x37\x0b\xaa\xd6\x03\x89\x53\x57\x92\xcc\xa5\xc0\xdc\x66\x87\xd6\x52\xc9\x50\x1a\x11\x34\x8e\xe0\x93\x5a\xb7\xca\x20\x2e\x03\x98\x87\x44\xd1\x48\x35\x88\xbf\xfe\xc1\xad\xc6\x89\xaa\x7e\x86\xb0\x9b\xd4\x6d\xba\x4c\x25\xb6\xbf\x5c\xa9\x26\x9b\xef\x11\x61\x4a\x50\x2d\xeb\x1a\xe7\x8b\xd0\x6d\x64\xd2\x74\x8f\xcc\xc6\x9c\x8c\xde\x94\xf6\xdd\xd1\x05\x11\x50\x3f\xe0\xd4\x5c\x18\x99\x24\x83\x16\xe6\x6b\x51\xc0\x61\xd1\xd2\xe2\xe1\x9c\x48\xf8\x98\x68\xb5\xcf\x69\x02\xb2\xef\xed\xc2\x8c\x70\x57\xbb\x7e\x15\x0b\x93\x98\x85\x41\xd0\xeb\xb9\xf3\x1e\xba\x9a\x1b\xd3\x93\x05\x85\xc0\x5d\x87\x7d\xe3\x3f\x9c\x41\xc9\x9b\x2e\xa3\xe3\x8e\x50\x88\xa8\x37\xd4\x5e\xcf\x6a\xfa\xae\xbb\xde\x94\xa9\xda\x9b\xac\xf7\x26\xcd\x5d\xba\xe8\xb3\x6a\xbf\x18\x7c\x34\x51\xac\xa6\xc4\x25\x4e\x5b\x11\xd3\x3b\x49\xe6\xc4\xc5\xf9\xc3\xa9\x56\x36\xba\xcd\xd7\xfa\x83\x3f\x44\x6e\x78\x78\x8e\x37\x49\x8d\xbe\x90\x6a\x7c\xbc\xef\x56\x47\x58\xbc\xea\xbb\x05\xa2\xe6\x15\x09\xdb\x78\x05\xe6\x56\x84\xaa\x28\x67\xae\xf2\x2a\x06\xc8\xf4\x65\x1a\x2f\x41\xff\x90\xfc\x99\xf5\xf1\xde\xac\xcf\xbe\x17\x00\x8b\x91\x60\xdc\xfc\x8b\xb9\x45\x86\x0b\x9e\xc3\x96\x9a\xb2\xbe\xbe\x3f\xf3\x74\xf3\x45\xdd\x61\xb2\xda\xcf\xc3\x87\xc5\x63\xde\x69\x82\x9d\x86\x4e\x62\x92\xb7\xba\x28\x8c\xeb\xcf\x30\x60\xd5\x8f\xe1\x66\x24\x68\x4c\x9d\x48\x14\x14\xf1\x21\xcb\x1f\x3c\x18\xf2\xad\x3f\xe2\xd1\x8c\xa4\x2e\x88\xde\x36\x30\x25\x79\x44\x2e\xc4\x1b\x43\xf3\x1b\xf3\xef\xe7\x4b\x95\x8b\x52\x85\x0b\xe5\x21\xf9\x93\x9b\x59\x14\x4a\x40\x0a\xbe\xdb\xce\xbd\x44\xae\xb6\xc9\x40\x45\x69\xd3\x96\x17\x46\x1a\xab\x34\x53\x27\x4f\x96\x7d\x57\xdb\x59\xb9\xc0\x37\x14\x6f\x1d\xb8\xc0\x7b\x08\x83\xfa\x94\x74\x5b\x3f\xaf\x33\xd6\xc4\x68\x69\xa4\x6a\x8e\x5d\xe7\x3d\x5c\xb6\x93\x40\x23\xca\xe6\x23\xf9\x2a\x74\x26\xe7\xc6\xb8\x08\xa6\xd2\x83\x0b\xa2\x53\x99\x3f\x7c\x78\x41\xb8\xe1\x52\x50\xb7\xb6\x66\x51\xf6\x24\xe0\xad\xb1\x59\x97\x0b\xb7\x49\xe4\xd6\x4c\x0f\x2d\x14\x8f\x7a\x90\x63\xf4\x89\xe3\xda\x35\xaa\xeb\x92\x53\x94\x57\x26\x2e\xcc\xc8\x47\x09\x43\x90\x14\xde\x9a\x7c\xdd\x99\x83\x96\xe6\x20\x1c\x9d\x68\x2e\x03\x49\x1f\x6d\xfe\x1a\x50\x3c\xbe\x33\x72\x98\xc0\x8c\x4c\x5d\x10\x5a\xc9\xdb\xdc\x5f\x86\xfd\x69\xcd\x7d\xec\x7c\x15\xea\xeb\x99\x13\x3f\xca\x14\xcd\x79\x24\xc1\xa4\x12\xca\x33\x49\x5f\xba\x84\x1b\xbe\x92\x4b\x88\x39\xe9\x3f\xd6\xaa\x64\xc0\xdc\x86\x37\x12\x39\xd9\xd2\xcc\x62\x34\x7c\xb4\xf5\x1b\xc9\x36\xe4\x06\x89\x7b\x82\x3e\x8a\xa9\x3d\x58\x50\x98\xad\x43\x56\x39\x72\xc8\x85\xf5\x07\xbc\xcf\xfa\xee\xaf\x5f\x75\x84\x90\x1f\x63\x06\xcb\xf7\xdc\x68\x7b\xa4\x9e\x73\xaf\x8d\x4c\x71\xaa\xb1\xe3\x81\x70\x38\x48\x67\x97\x48\x85\xf5\x99\xa2\xf1\x3c\x4a\xb9\xc6\x4a\x5f\x51\xb2\x2c\x3a\x37\x37\xa4\x20\x15\x4f\xbb\xa0\x30\x77\x9b\xf4\x8f\x27\x24\xa6\xfd\xab\x24\x8c\x91\x3c\xc0\x4d\x1b\x4c\x58\xb9\x72\x5c\xfd\x15\x8a\xbc\xeb\xdd\x1f\xc5\xf6\xdc\x25\x73\x32\x73\xf5\x2e\xe8\xbd\x35\x18\xf4\xba\x05\x83\x2e\x77\x46\x0b\x4d\x76\x03\x4c\xe5\xd3\xd9\xe8\x6f\x3e\xfe\x6d\xcc\xc9\x8c\xdc\x18\x1a\xf5\x1b\x19\xf6\x50\x13\xb1\x73\xcf\x31\x0f\xf2\x21\x0f\xed\x39\xb9\xd6\x98\x7e\x46\x2e\xdc\xc2\xdb\xf9\xc8\x75\x5e\xc1\xb1\xdb\x78\xc5\x94\x47\x1c\x2b\xf8\x9e\xa7\x65\xa8\x30\x5e\xa5\xa4\xbc\x42\x49\x35\xc1\xbe\xb4\xa5\x62\x01\xee\x4b\x55\x6b\xd1\x44\xe6\x24\xd4\x43\xdd\x27\x1c\x7e\xb2\x73\xd5\x99\x5a\x7e\xde\x67\xe7\xe0\x4d\xed\x5d\xc2\xfb\x1e\xc6\x6d\x41\x13\x32\x25\x24\xb9\x91\x7d\xba\x58\xe6\x93\xb0\xec\xf9\xba\x2e\xb3\xa2\xc7\x9c\x55\xca\xa8\x9a\xcc\xb4\xd6\x5f\x25\x69\x1d\x36\x77\xc7\x7a\x7a\x25\x0f\xb4\x5d\xab\xc1\xb6\x54\x0d\xed\xb7\x5b\xad\xf7\xb8\xde\xd3\xeb\x7a\x4f\x5b\xf5\x9e\xf6\xeb\x35\x0a\x23\x75\xe6\xe4\x93\x51\x53\x65\x98\x45\x74\x9f\x30\xf8\xe9\x46\xb6\x87\x01\x46\xce\xe9\xe8\xd4\x9e\x91\x2e\xc7\xc8\x6d\xfa\x05\xeb\xbb\x91\x8d\x88\x7b\x38\xd0\x09\x89\x8e\x5c\xd8\x71\x75\x75\x28\xf1\x7c\xa3\x24\xf1\x19\xf5\x96\x6a\x85\x16\xe0\x66\x14\x52\xf5\x19\x6f\x4f\x5f\x4d\x55\x67\xbb\x12\x5b\x8e\x23\xc7\x97\x2b\xa0\x5e\xbb\xc6\x6e\xe2\xac\x0d\x90\xd1\x2f\x10\xbc\x2f\xfa\xd6\xe2\xca\x5d\xe7\xd0\xe6\xbd\xb4\x05\x78\xef\x55\xfd\xcf\xb6\x04\x6f\xcb\xe6\xaa\xd1\x4b\xd7\xf9\x22\xe0\xdc\x75\x1e\xf5\xff\xfb\x11\xec\xb9\xce\x0b\x41\x86\x8f\x06\x14\xf6\xef\x09\xef\x95\x18\x7b\x5b\x68\xe8\xc7\xfa\xdd\x11\xb7\xf5\xce\xbd\xb0\x11\xc1\x1e\x64\x20\x31\x14\x42\x75\x8b\xea\x00\xa3\x3d\xb5\x71\xdd\x13\x09\x6a\x6a\x16\x4a\xc4\xde\x17\xdb\xb2\x16\x90\xef\x06\xef\xbb\x2f\xd4\x3a\x16\xce\xdb\x88\x75\xcd\x01\x7a\x6d\x0e\x50\x2e\x25\x15\x07\xe8\xde\xa0\x55\x1e\x0b\xf6\x7c\x65\x7c\xd9\xdd\xc3\xcb\x81\xa5\x3d\x35\xb8\x9b\x2c\x14\x28\x65\x94\x9a\xb9\x50\xda\x08\xb9\xf9\x10\xd1\x3f\x7d\xcd\x31\x72\xf7\x56\x8f\x47\xd3\xf8\x8d\xd3\xbb\xe9\xae\x19\x27\xb9\xb7\x36\x22\xc5\xcc\x88\x0a\x19\x5d\x60\x30\xa6\x16\x48\x5d\x50\xf8\xb8\x5e\xa2\xcf\x53\x72\xe6\x96\x4e\xbb\x6e\x8b\xba\x37\x0f\xc1\xe4\x32\x14\xdc\xd9\x1e\x4a\xee\xac\x8b\xa2\xbb\xbb\x03\x81\xfa\xf5\x0e\x5c\x27\xdb\xb0\xfe\xeb\x51\xae\x5a\x4b\x1d\xee\x12\xb7\xc8\xb1\xb7\xaa\x76\xc4\xc9\x2b\x64\xfb\xce\xc8\x5b\xc5\x22\x0d\x70\xa3\x23\xbc\x35\xf2\x1b\x52\x77\x46\xb5\xf8\x50\xb1\x13\xa1\x95\x39\x22\x0f\x6f\xcf\x7e\x65\xf2\x8c\x62\x94\x47\x64\x48\x5a\x37\x3c\x5c\x80\x2b\xa9\x49\x47\x8a\x26\x9c\x6d\x79\x72\x4a\x4c\xfc\x2e\x81\x0b\xad\x62\xd5\xb0\x96\x69\x27\x65\x6b\x81\x8c\x9a\xab\xa0\xec\x45\x70\xc7\x47\xb1\xd4\x95\x70\x19\x90\x56\x44\xa5\x78\x0c\x44\x55\xc8\x26\x55\x9c\x97\xce\x89\x87\x74\x5b\xd4\x09\xcf\x39\x89\x12\x60\xab\xd1\x33\x43\x7c\xbb\x02\x29\x71\x46\x22\x35\x0b\x0c\x8b\x45\x9f\xaf\x6c\x8b\xaf\x46\xb0\x67\x47\xe0\x32\xdb\xef\xbb\xcb\x18\x42\x2d\xcc\xd4\x99\x91\xd8\x05\x09\x8c\x42\xd7\x99\x11\xa9\x9e\x93\x95\x9e\x96\xc3\x49\xc8\x3e\xbb\x1c\x05\x76\x88\x51\x25\xf0\x47\x98\xd8\x1e\xb0\xae\xdd\x55\x1f\x9a\x2a\xc8\x45\xda\x8c\x65\x33\xb2\x6f\x36\xf0\x1b\x07\x91\xa9\xd3\x71\x10\xa0\x6c\x48\xed\xb2\xec\x6b\x5e\xf6\xc6\x94\x41\x59\x96\x65\x58\xf6\x21\x20\xbc\x4a\xad\x2b\x87\x59\xe8\x23\x27\xd4\x91\x4b\xc9\x3e\x91\xf0\x13\x13\xd7\xa2\x71\x6e\x19\xf1\xec\xe9\xda\x16\x47\x0d\x2d\x7e\x5f\xdb\xe2\xb8\xa1\xc5\xb0\x7e\x3a\xdc\x93\xfa\xe9\xd8\xc6\xa5\x1f\x3b\x33\xe2\xa1\x1d\x14\x24\x6a\xf1\xc7\x78\x56\xc6\x7d\x17\x2e\x9d\x71\xdf\x83\x89\x53\xae\x80\xd4\x2b\x70\x49\x61\xec\xa4\x64\x46\x3e\xba\xd0\xed\xbb\xd7\xb8\x4e\x13\xc7\x1f\x55\x58\x21\x1c\xdf\x98\xc2\xe4\x3b\xa5\xf6\xa4\xbe\x91\xb8\x45\x27\xc8\x4c\x4f\x0a\xb4\x3d\x71\x6e\xc8\xb1\x0b\x2e\xda\x3b\x32\x05\x0a\x97\xce\xa4\x9a\x46\x5c\xcf\x83\xd9\x53\x67\x82\x33\x29\x07\xc6\xf3\x81\x15\xd8\x71\xea\xdc\x90\xfd\xb2\xb3\x50\x75\x36\x5d\xed\x6c\xc7\x9e\xd6\xba\xca\x6a\x5d\x3d\xab\x63\x99\x37\xf5\x75\x1c\x6a\x34\x73\x51\x55\xad\x96\x10\x8b\x46\x65\x17\x20\xfa\xec\x35\x1d\xcd\xc8\xb7\xe2\x87\x3d\x23\x5f\x8a\x1f\xe0\xfd\xd0\x38\xfb\x6b\x40\x1e\x0c\x2b\xd8\xf8\x12\x91\xd7\x85\xb3\xe5\x38\x0e\xb9\x70\xce\x49\xa0\x86\xa6\x08\xf0\xc3\x87\x17\x7d\x77\x84\x28\xea\xa3\x12\x5c\xbe\x0a\x72\x81\x04\x98\x52\x7b\x9c\xac\x0e\xe4\x42\x7d\xe3\xb2\x38\x14\x5f\x03\x72\xa9\xe6\x9d\x24\xc0\x32\xb8\xe2\xe4\xd2\x28\x76\x16\x14\x4e\x5d\x67\x1e\xc3\x3b\xb7\xaa\xc4\xc6\x78\x84\xaf\xd8\xfc\x53\xf0\x95\xf3\x6b\x0b\x4e\x5d\x0a\x9f\xda\x84\xd5\x18\x78\x7b\xa6\xe4\x3c\x38\xe1\xb2\x15\x4b\x1e\x9a\xb0\xd5\x96\x65\x60\x32\x21\xf3\x51\x51\x35\xef\xa9\x36\x59\xef\xc6\xe6\xc5\x3c\xf5\x0c\xa5\x9a\xe1\x1b\x4e\xb4\x6f\x01\x53\xe5\x94\xc2\x3b\x97\x14\xe6\x65\x87\x6b\x39\x2b\x93\xd8\xaa\xea\x52\x83\xc1\x35\x5c\x63\x04\xf2\x45\xac\x35\xf8\x4e\xb5\xd1\xff\x82\xc2\xad\xeb\xcc\xc8\x17\xad\xb8\x33\xba\xe7\x77\xaf\xac\xef\x14\x3d\x7b\x5e\xb9\xce\x75\x0c\x6f\x5b\xc9\xed\x7b\x49\xe2\x47\x28\x94\xbf\x71\xef\xef\xfa\x27\x36\xe2\xba\xb3\x89\xb6\x1d\xe0\x7d\xf7\x33\xba\xff\x97\x35\xb9\xf6\xb5\x02\xe1\x88\xdc\xab\xef\xa0\x75\x93\xab\xb4\xec\x8d\x46\x21\x33\xf2\xd6\x85\x18\x33\x96\x3f\xe1\xdb\x26\x54\xc8\x87\xf6\xbb\x03\x46\x66\xe4\xc0\x48\x61\x7d\xf6\x75\x41\xe1\x8b\xdb\x7e\x31\x32\x0b\x61\x73\x5b\x7f\xa3\x68\x06\x4f\x06\xb8\x7f\x2f\xd6\xb7\x1b\xf2\x2d\x3d\x2e\xbc\x37\x5a\x5f\xf7\xc9\xa0\xec\x5e\x55\xff\xdc\xaa\x0a\xaf\x8d\x7f\xf2\xff\x97\x4c\xf9\x14\xde\xbb\xed\xf7\xd8\x83\x3f\xe2\xd1\x9c\xbc\x77\x21\xfe\x3f\xff\x67\x08\xbb\x44\xa8\x6d\x18\x3e\x8c\x47\xbb\x44\x82\xa0\xb6\xa4\xb6\x12\x7f\xbe\xae\xd1\x31\xbd\xd7\x42\x28\xaa\xa5\xe1\xdb\x9a\x6f\xed\x92\x19\xf9\xea\x42\xdc\x1b\x73\x22\x29\x1c\xa1\xf6\x48\x83\x55\x9c\xb6\xf7\xff\x4d\xf5\x6f\x0d\x30\xd7\x86\xde\x44\x91\xde\xbd\xe7\x05\xec\x0e\xf9\x16\x36\x92\xe9\xfd\x20\xd7\xdd\x52\x10\x28\xee\xe9\xe2\xce\x53\x67\x46\x5e\x08\x18\x60\x9e\xa7\xd4\x91\x0c\x98\x7a\x75\x12\xc0\xa9\x0b\x59\x4a\xc1\x5b\x33\xb5\x73\x09\x44\x61\xd8\xd6\xeb\xb8\x49\x96\x5e\x12\x7d\x85\x2a\x16\x94\xc2\x9f\xdf\x73\xaf\x5f\xb5\x2b\x49\x7a\xcf\xd8\x29\x61\xda\xbe\x2b\xda\x3a\xe2\xf3\xa7\x23\x63\x1e\xa1\x8d\xa1\x21\x58\xed\x3b\xae\xdf\x6b\x17\x29\x4b\x74\x9a\x92\xaf\x68\x7e\x7a\x4e\x2c\x73\xe7\x92\x5a\x30\x23\x5e\x0a\xdf\x32\x20\xc2\x11\xb4\xef\x5e\xeb\x0b\xb0\xd2\xbf\x88\xa5\x44\x60\xc2\x4d\xf5\x3a\xf7\x4b\xc2\x97\xec\x54\xbf\xd4\xa9\x45\x30\x3a\xcf\xa9\xab\xde\x9f\x98\xf7\xc9\x78\xcc\x63\x99\xbf\x3d\x36\xf7\x7b\xbe\xa5\x73\x8b\xbf\x72\x75\xbe\xf1\x53\xbc\xac\xf2\x4d\x3a\x1f\xf4\x4f\x4d\xc1\x62\x93\x49\x14\xea\xf0\x54\x8f\xae\xd2\x04\x53\x45\xbe\xae\x69\x0c\xdf\x06\x64\x4e\xc2\x14\x57\xe4\x56\x6b\x75\xdd\xd6\xf5\x66\xc7\x8a\x93\x38\x06\x86\x9c\xd9\x09\x4c\x6d\x01\xa9\x1d\xf7\x53\x60\xa7\x36\xa6\xa7\x77\x7d\x1b\xf3\xba\xb8\x07\x36\x66\xad\xdf\x53\x92\xf0\x82\x42\xda\x0a\x1e\x41\x48\x10\x82\x37\x98\xf6\x8d\xa3\x10\xa5\x4e\xa3\xf0\x20\x45\x38\x26\x74\x01\x7e\x6a\xdc\x7d\x66\x16\x3c\x19\x6c\xff\xce\x1f\xe3\xa2\xf8\x16\x60\x38\x04\xfc\x71\x69\xc1\xd6\x13\xf3\x3c\xb6\x34\x66\x57\x5b\x62\xe1\x41\xf9\x4e\x61\xba\xfe\x70\x3d\x5d\xf1\x82\xc3\x97\x15\x87\xb6\x5f\xbf\x9e\x2e\xd4\xb0\x9f\xf6\xee\x63\xf7\xfa\x9f\xc8\x99\x67\x96\xaf\x9b\xb6\x50\x3f\xc6\x48\x4c\x47\x43\x7b\x50\x04\x1b\xbe\xcb\x3a\x77\x6b\x58\x1b\xe6\xe3\x67\x1b\xb2\x36\xd2\x67\x83\xfc\x55\x31\xd8\xe1\x66\xf1\xae\x18\xf0\xf0\xf1\x30\x7f\x57\xd0\x86\xe1\xef\xc5\xbb\x82\x3e\x6c\x0e\x37\xf3\x77\x05\x8d\xd8\xdc\xde\xca\xdf\x15\x74\x62\xf3\x69\xf1\xae\x12\x66\x61\xb0\xbd\x21\xeb\x2b\xb3\xb5\xb5\xbd\x81\x76\x12\xe3\xf4\x6e\x2e\xe5\xb2\xb5\x8e\xa7\x56\x6f\x63\x46\xba\x78\x56\xe8\x86\x62\x7d\x27\x69\x2b\x99\xad\x2f\xed\x56\x1d\x02\xf4\x6e\x6c\x3e\xb3\x37\x7f\xaf\xc3\x42\x9d\xe6\x6e\x0d\xea\x44\x77\x58\x0f\x8c\x31\xc8\x97\xb6\x1e\xe7\xa2\x1e\xd3\x62\x50\x8f\x5f\x31\x5c\x5d\xc4\x95\x15\x44\xfa\x7a\x91\xde\x79\x87\x30\x23\x13\xbd\x3a\x90\x39\x09\x33\x86\x98\xc3\xcd\x3f\x9c\xec\xd7\xaf\x63\xf4\x1b\x2b\x2f\x45\x7f\xb2\xaf\xb6\x04\x36\xb1\x05\xb8\x5b\x76\xbc\x30\x4c\x5c\xc8\x48\xb6\x31\xa4\x20\x1d\xd9\x43\x86\x75\x96\xb6\xdf\x46\xcd\xc8\xd8\x7c\x0f\xcf\xa7\x30\x57\x45\xf3\x54\xdb\x16\xb9\xac\x59\x0b\xc1\x26\x0b\x0a\x37\xa6\xd2\x3c\x6d\xa8\x44\x12\xdc\xed\x4d\xfa\x68\xeb\x97\x12\xf9\xae\x5b\xce\x14\x70\x47\x3c\x6f\x3b\xf3\xd2\x09\x90\x34\x7b\x8c\x48\xba\x31\x5c\xf1\x36\xb8\x4c\x41\x57\x20\xd2\xb9\x49\xd5\x43\xc8\xc8\xd6\x6f\xb2\xb7\x49\x1b\x42\x50\x17\xb5\xe7\xaa\x6a\x21\x35\x2e\x03\x06\xef\xcd\xc8\x34\x45\x0c\x5f\x83\x10\x53\x32\x2c\x4a\x9e\xd4\x4a\x36\x8b\x92\xa7\xb5\x92\xad\xa2\xe4\xf7\x5a\xc9\x76\x51\xf2\xac\x56\xf2\xb8\x28\x29\x01\xcb\x14\x3d\x51\x45\x35\x08\x43\xf2\xbd\xb3\x86\x7c\x1f\xa3\x71\xd6\x1f\x83\x51\x6c\x0f\xfe\x38\x46\xa6\x6d\x24\x90\x67\x3b\x5a\xd3\xaa\x7e\x66\xe7\x64\x47\x2d\x41\x09\xa6\x3a\xaa\xc7\x1a\xd6\xe5\x28\x05\xcc\x76\x69\x80\xec\xb3\x9b\x3f\x7d\x28\x99\xed\xd7\xe9\x3a\x37\x1f\x45\x86\x7e\x8b\x37\x9e\xf0\xed\xdf\x04\x86\x81\x92\x1b\x4a\xd4\x3b\x6b\xfd\xe8\x0d\x79\xad\x3e\xfa\xa5\xf8\xd4\x8f\xe2\x49\x14\x03\x79\x51\x7e\xfe\xaa\x0d\xdf\x23\x59\x35\xf4\x8a\xa4\x8a\xfb\x3b\xd6\xed\xd5\x92\x9c\xe9\xc7\x9e\xa4\x8f\x9e\xf0\x6d\x04\xf2\x97\x69\xeb\x75\x72\x8a\x14\x5a\x42\xa6\x78\x23\xd5\x32\x08\x09\x47\x4e\x43\x3d\xf4\xd4\xe4\x32\x8a\xd6\x0b\x57\x69\x61\xf4\x7b\x41\x32\x28\xaf\xf8\xc4\x73\x5e\x56\x96\x15\xbf\x50\x09\xa6\x15\xa7\x74\xc4\xd1\x9d\xe2\x7c\xcd\x9e\xce\xc9\xcb\x14\xaf\xc2\xae\x53\xb4\x0c\x3d\x4e\xb1\x98\xc2\x00\xad\xad\x9b\x5a\xd6\xb3\x42\x15\x87\x22\x27\x20\xdb\x76\xbd\x73\xd3\x2b\x94\x9b\x81\x3f\x71\x33\xcc\x93\x30\x55\x06\x85\x02\x6b\xeb\xaf\x77\x33\xa8\x34\xdf\xbc\x6f\xf3\xc1\x52\xb3\x61\xd9\xec\x3c\x85\xe1\x50\x87\x38\x58\x46\x1f\x58\xb4\x59\x29\x19\x2c\x95\x0c\x2a\x25\xb5\xee\x2a\x25\x5b\x4b\x25\x5b\x95\x92\xed\xa5\x92\xed\x4a\xc9\xe3\xa5\x92\xc7\x95\x92\x27\x4b\x25\x4f\x2a\x25\x4f\x97\x4a\x9e\x56\x4a\x7e\x5f\x2a\xf9\xbd\x52\xf2\x6c\xa9\xe4\x99\x2e\xa9\x07\xe1\xc7\x09\x19\x3f\xc8\x05\x85\xfd\x76\x78\x47\xa6\x3a\x62\x25\xbf\xf7\x93\x5d\xd9\x02\xd8\xb5\x9d\x97\x28\xbc\x7e\xa3\x09\x58\x0c\x4c\xa0\x82\xf7\x56\x3d\xee\x68\x3d\xcb\x47\x14\x92\x76\xd3\xb5\xd1\x1c\x8f\xed\x43\x34\x3f\x60\x27\xea\x21\xa6\x30\xb5\xe7\x64\x3f\x05\xf4\x06\x46\xeb\x3b\x92\xa6\xf0\x74\x93\x3f\x46\x08\xe7\x14\x52\x55\x11\x59\x7f\xcb\x82\x8c\x11\x8c\x23\x45\xa9\xe2\xbf\x0f\x39\xf9\x98\x2e\xb7\xa0\x8a\x1f\xdf\x91\x8a\x1b\xd7\xa5\xaa\x97\x3d\xfb\x01\xd2\xf3\xd3\x56\x0c\x84\x88\xa3\x17\x2b\xe4\xb9\xa0\xf0\x2e\xbd\xc3\xd5\xc7\x98\xa6\x56\xa2\xc7\x7c\x4a\xdb\x15\x30\xbe\x4e\x7c\x71\x82\x8e\x30\x4a\x96\x70\x50\x50\xf0\x1c\x94\x1f\x12\x67\x37\x23\x3e\x23\x59\x4a\x98\x36\x91\x28\x7e\x7b\xe5\x35\x80\x59\xb9\x2c\x5f\x39\x5e\xac\x9c\x89\xf7\x5a\x5f\xa6\x19\x39\x4d\xb5\x47\x46\x75\xad\x3c\xbd\x40\x7a\xb5\x8b\x35\x62\x95\x35\xba\x8e\x1d\xd6\x1a\x17\xb7\xba\x8f\x99\x1a\x09\x57\x5d\x4b\xd5\x25\x03\xf7\x5a\xc9\xa5\x07\x8a\xbb\x39\xb2\x3d\x70\x4f\x6d\x0c\xb7\x7c\xb6\x36\x1e\xee\x85\xcd\xc1\xbd\x54\x5d\x24\xaa\xf5\x99\x09\x09\x2a\x1c\x0c\x2d\x11\xa6\xaf\x7f\x64\x2c\xc2\xa8\x12\x41\x82\xf0\xf1\x60\x90\xc7\x7d\x4d\x0f\xf9\x05\xbf\xb1\x20\x30\xe1\x21\xa6\x2c\xca\x78\x19\xc5\xa2\x1a\xc9\xf5\x4c\xdf\xf9\x9e\x0a\xa7\x1a\x01\xf6\xae\xa0\xb7\x79\x52\xbc\xbf\x14\xf0\x36\xcf\xb0\xf7\xf7\xa3\xdd\xb6\x44\x9e\x3d\x34\x86\xde\x87\xa9\xd3\x1e\xdd\x03\xc3\x81\x9c\x9a\x70\x20\x4a\x66\xce\x57\xa3\x90\xaa\x8b\x17\xa5\xf8\x9d\xbf\xaa\x85\x0f\x59\x09\x16\x52\x4a\xff\x27\x09\xf9\x2c\x70\xa4\xd7\x65\x38\x0f\x38\x69\xa4\x61\x2d\xba\x05\x0b\xc4\xf7\x6a\xca\xcd\xfd\x04\x24\x94\x76\xf3\x87\xa9\xd6\xf8\xde\xa6\x0e\xe1\x89\x13\x84\xf5\x18\xd5\x31\xd9\x89\x09\x4f\xc8\x2b\x26\x79\x3f\x4e\x66\x44\xdf\xdf\x52\x78\x95\x56\x35\xe2\x26\xcc\xfb\x4b\x35\xdb\x44\x68\x8d\xf8\xdb\xf4\xae\xc8\x96\xb9\x8b\x90\x89\x98\x33\x32\xc1\x8b\x46\x26\xf8\xd2\xc8\x38\x71\x8d\x66\x92\x4c\x89\xf1\xb9\xe9\x33\xe0\x68\xe1\xc7\x30\xad\x0c\xfa\xba\x30\xe3\xf3\x92\x99\xbf\xdc\xfc\x95\xe6\xaf\x41\x1e\x2f\x84\x12\xef\x6f\xc8\x99\x3a\xbb\x96\x05\x0f\x86\x06\xd2\x95\xd8\xfe\x26\x75\xd4\x71\xb3\x2c\x75\xde\xd4\xbf\xa7\xb6\xce\xd4\x6e\x10\xdd\xb5\xfd\x42\xa8\x63\x87\x2f\x17\x70\xd0\xa4\xde\x39\x57\x08\x25\xa6\xe0\xa3\x72\x55\x87\xb5\x41\x27\x34\x9d\x02\xa1\xbc\xac\x7c\x8e\xb7\x9f\xe5\x15\x89\xe2\x3c\x15\x56\xc4\x3b\x0b\xa3\x9b\x55\x08\xd0\x7a\xc9\xe2\x7f\xc8\x8e\xcb\x3b\x61\x8c\x89\x8f\x26\x2c\x95\x96\x46\x88\xa8\x4d\x6e\x46\x87\x78\xb1\xec\x03\x1a\xca\x1d\x6b\x5b\x71\x9d\x5c\xc7\x3d\x40\x73\x50\x76\x9a\x7f\x78\x37\x23\x01\x79\x9b\xc2\x5a\x9f\xa4\x7d\xf2\x26\x05\xb5\x38\x42\xad\x0d\x86\xe9\xce\x96\x71\x11\xc7\xcb\xee\x4b\x9c\x7c\x97\x11\xd9\x77\xcf\xf0\x81\xe3\x83\xc2\xb2\xf8\x30\x23\x07\x29\xa8\x47\x10\xea\x37\x42\xde\x97\x56\x22\x70\x8c\xbf\x90\x33\x57\xac\xdb\x8b\x76\xa2\x2a\x5b\x25\xa5\x39\x79\xa1\x58\x8d\xe1\xe6\x6f\x02\x78\xcd\xe4\xc1\x65\x0a\xbd\x33\x67\xb8\xf9\x9b\x1a\xdf\x56\x6f\x48\x37\x94\x78\x96\xf5\xd9\x84\xaa\x1f\x02\x3c\x25\x35\x6a\x9d\xf9\x26\x30\xaa\xc4\x47\xe6\xa0\x6c\xc8\x60\xb8\xa9\x44\xaf\x52\x1e\x60\x46\x1e\x50\xc4\x60\x63\x46\xbe\xa8\x99\xb2\xaf\x5a\x24\x40\x02\x51\xe3\x9c\xf8\xc6\xd3\xdf\x44\x1d\x63\xf1\x0d\x44\xcc\x3f\x9a\xa9\xfb\x4a\x68\xb9\x15\xbe\x53\xeb\xbc\x38\xdd\x28\x84\xa4\x6d\x3b\x76\x86\x8f\x41\x38\x18\x85\xd6\x84\x82\x69\x88\x17\xb2\x95\xd7\x43\x79\xa2\xbd\xde\x66\x5e\x0f\xc5\x8f\x35\x15\x87\x4b\x4c\xa7\x04\xdc\x8a\xad\x9c\xfb\x54\xf3\x51\x00\x71\x66\x1e\x57\xd8\xca\xb2\xcd\x70\x7d\x9b\x81\x1d\x3b\x9b\x6a\x7e\x9b\xeb\x46\x63\x2a\xad\x5b\x02\x5c\x81\x21\x08\xe7\x69\x73\xa5\x32\x86\xca\x9a\x5a\x48\x56\xd7\x48\x60\x3f\x52\x05\x4a\xb1\x4e\xd3\xbf\xa0\xf0\xfe\x8e\xba\x5b\x95\xba\x5f\xdb\x4f\xc0\x9c\xec\xa5\x79\x0c\xb2\x42\xfe\xe1\x20\xe9\x48\xda\xd8\x51\x8c\xcb\x88\xae\x8f\xdf\x1a\x50\x57\xcf\x41\x21\x00\xbf\xf4\xbc\x75\xb0\x71\xd4\xdc\xf2\x47\x63\xcb\xea\xd0\x45\xad\x65\x96\x1b\x81\x34\x28\x7e\xf2\x00\xb5\x7c\xc9\x78\xe3\xa0\xc5\x8f\x45\x27\x28\x58\x54\x7c\x8d\xe3\xd1\xb9\x3a\xc3\x3b\xc0\xd5\x9f\x6b\x4a\xed\x73\x82\x8f\x3b\x14\xf0\xc5\x42\x0b\x94\x93\x00\x34\x86\xc7\x03\xff\xbc\xdd\xa3\x63\x9f\x64\xf0\x93\x4d\x14\x3b\x37\x61\xda\x6b\xb1\x26\xd1\x54\x6a\xe0\x4e\x6c\xaa\x89\xeb\x55\x18\x42\x6f\xa8\x7e\x95\xef\xa5\x26\xa1\x35\x88\xd7\x5d\x88\xd2\x7c\xa1\x26\x00\xe5\xe5\x3b\x72\x41\xab\xde\x82\xbc\xc9\x22\xb9\xe2\xff\x7b\x81\x31\xbf\x0b\xbb\xe9\xe7\x25\xa2\x20\x42\x09\xf2\x58\x8e\xd9\x59\x18\x51\x2f\xf1\x01\x07\x3b\xc4\x71\xc7\x8e\x62\xed\x91\x65\xef\x21\xe3\x2f\x36\xb4\xdf\x26\x6b\x65\xf2\xfb\xdd\x91\xd0\x8e\x17\x1c\x2f\x42\xb5\x36\xc1\x73\x56\xb2\x29\x65\x7d\x26\x6a\xc1\xdf\x70\xeb\x6e\xd5\x96\x5c\x55\x72\x6c\x83\xa2\xad\x95\x82\xc2\xbb\x8b\xe5\x6e\xfa\x45\x9e\xa1\xa2\x1f\x9d\x59\x7c\x47\xe6\x93\x5f\x22\xb8\x79\x31\x72\xe8\x74\x61\x1c\xe5\x5b\x7b\xd0\xf9\xbd\x2b\x86\xef\xfb\x21\xe8\xb5\x13\x7a\x71\x2e\x10\x2e\xe8\x08\x1b\x69\x09\x4b\x20\xe0\x2d\x7d\x86\x50\x48\x30\x20\x97\xe7\x78\xe5\x85\xb1\xde\xd9\x2b\xdb\xd3\x52\xa0\x92\x00\x10\x4c\x95\xd8\x97\x28\xb1\x4f\xbd\x4b\x00\x01\x78\x51\x48\xbf\xda\x29\x5d\xad\x4d\x80\x2e\x45\x2e\xc6\x00\x68\x97\xa8\xfe\x18\x8c\x06\x36\x92\x32\x63\xcb\x9e\x38\x73\x22\x20\x84\xa0\xed\xf6\x2c\x1e\xcd\x48\x1c\xc1\x8c\xa4\xf0\x64\x00\x18\x93\xdb\x9e\x91\x6f\x29\xbe\xd9\xdc\xd6\x6f\x16\x25\x73\xa9\xe7\x71\x6d\x27\x7d\x57\x8d\x3a\xc1\x38\xf9\x45\xae\x29\x1c\x5e\xa0\xbf\x59\x19\xf6\x8a\xd7\x4c\x7e\xfa\xe5\xb2\x57\x61\x6d\xb1\x15\x3b\x8c\x7c\x41\x11\x39\x63\x46\xe2\xd1\xfb\xd4\xfe\x9c\x82\xab\x01\x6e\x65\x5c\x81\x1e\x57\x50\xc4\xe9\x8a\xda\x75\x41\x75\xce\x74\x86\x1f\xc8\x39\x50\xda\xc4\x5d\x9e\x99\x28\x88\x3c\x72\xde\x08\xc8\x22\xe7\x40\x00\x8b\x5a\x2f\xbc\x8e\x6c\xd1\x67\x47\x68\x4c\xdf\x77\x29\x78\xb6\xc0\xb8\x62\x42\x87\x24\x03\xf7\xad\x2d\x74\x5c\x31\xd1\x67\x6a\xb4\x5e\xe4\xbc\x15\x90\x44\xce\x2b\x01\x61\xd4\x74\xe8\xe7\x24\x89\x60\x38\x18\xe2\x06\xff\xfa\x85\x3f\x9f\x3c\xd3\x7a\xb9\x5c\x4a\xc6\xd8\x58\x58\xb2\xbd\x85\xb1\x63\x4d\xbd\xed\xc7\xf8\x6b\x24\x37\x86\xb6\xc4\x6b\x3e\x2f\xd2\xb1\x65\x2b\xda\x34\x41\x47\x3d\x51\xae\x79\xbc\xa0\x10\x44\xed\x1a\x4e\xd5\xed\x13\xfc\xfc\x68\x46\x42\x05\x48\x5e\xa4\xfd\x57\x0c\x28\x85\x51\x0e\x8b\x6e\xb4\xd6\x4c\x92\xa3\xbf\x07\xd7\xb6\x1a\x4d\x31\xea\xd1\x85\xed\x6b\x02\x26\xdc\xec\x73\x51\x45\x75\x6a\xe8\xcc\xc4\xb0\xd2\x69\x1e\x24\xfd\xa3\x68\x10\x57\xe3\x58\x69\x97\x08\x16\x15\x71\x4d\xd3\x68\x7d\xfc\xc8\x6a\xea\x0b\x53\x88\x17\x8d\x51\xab\xe8\xa3\xe3\xf1\x2b\xf1\x25\x71\x66\x24\x88\xc0\xd3\xe9\x31\xc3\x80\x24\xa5\xf5\x49\x3e\xab\x1b\x92\x46\xc0\x10\x10\xfa\xec\xa8\x47\x92\x0d\x86\xd1\xe4\x81\xf5\x3d\x9a\x27\xb3\xe8\xbb\x90\x34\x47\x11\x43\xdc\xab\x6b\x79\x95\x3a\x53\xe2\xaa\xa5\xd7\xa1\x49\xd4\xa8\x9e\x17\x5e\x58\xcd\xeb\xca\xd4\x32\x3d\xcf\xcc\x46\x24\x21\xc1\xb8\x61\xf8\x61\x2d\x85\x3d\xaf\x84\x71\xe1\x18\x2f\xa1\xde\xba\x58\xe4\x0c\xc5\x33\xbd\xcc\x09\x68\xf7\xf2\x56\x73\x81\x0e\x77\x7e\xb2\x0f\x78\xca\x28\xb0\x33\x3b\x06\xb6\xa9\xa4\x1f\x26\x29\xb8\xae\x79\xef\x06\xea\x15\x97\x14\xbc\x37\xb6\x00\x77\xa2\xdf\x2f\xea\x99\x20\x34\x48\xfe\x5e\xc4\x60\xab\x18\xa2\xe2\xb9\x10\x25\x3f\xaf\xcf\xd2\xe6\x40\x27\xb5\xa3\x23\x5c\x31\xde\xf7\xde\x00\xef\xbb\x2e\x86\x63\xca\x22\x6d\x4f\x47\x21\x56\x93\x53\xf5\x51\x45\xba\x5a\x7f\x82\x9c\x2c\x8f\xe0\xf7\x7a\x8b\x67\xbf\x37\x35\x60\x1f\xf2\x06\x9b\x95\x06\x01\x89\xca\x1a\x67\xaa\xdf\x40\x3d\x6d\xc2\x39\x11\x30\xa8\x06\x5b\x69\xad\x89\x7d\x0e\x07\xc5\x02\xa8\x36\xda\x1c\x6a\x41\xe1\x8d\xd0\x96\x18\x67\xa0\x44\xb6\xc8\x59\x0a\x8a\x17\x73\x55\xe1\xef\x44\x78\x8b\x4c\x84\x37\x3f\x55\xcc\xc3\x41\x43\x20\x29\xf3\xcf\xb7\x10\x06\xd0\x90\x1a\xa5\x12\x97\xdc\x0b\x9b\x0c\x7b\x5f\x66\x24\xde\x40\x34\x82\x3d\xf9\x11\x74\x03\x8a\xb1\xca\xaf\xf0\xdb\x79\xe0\x2b\x13\xad\x69\x1a\x15\xd1\x9a\x0e\x04\x85\x77\x29\xe9\x4a\x62\x7d\x15\x49\x7c\xd1\xf1\x33\x81\x46\x0d\x1d\x9d\xac\x1c\x43\x88\x77\xa3\xb5\x16\xdf\x8c\xdb\x93\x04\xdc\x33\x3b\x46\x19\x78\x1c\x99\x08\x48\x97\x77\x36\x23\x18\x3b\x15\x05\x61\x75\x62\x74\x2e\x5d\x7b\x1c\x61\x3f\x93\x5a\x73\xd9\xe8\x72\x6c\x78\x68\x46\x98\x83\xfb\xc9\xd5\xb3\xec\xb3\x53\x14\xb7\xb3\x55\x8e\x6b\x4e\x64\x04\xa7\x29\x8a\x02\x35\xce\x4b\xf6\xd3\xbe\x7b\xf6\x3c\x76\x32\x54\x44\x2c\x05\xd8\xd5\x65\x68\xec\x49\x2a\x74\x55\xc2\xcf\xd4\x9e\x91\x6e\x04\x19\xc8\x7e\x8a\xaa\x4e\xfc\xa9\xa8\xa4\x7b\x50\xe1\x93\x4d\x66\x1a\xb4\x28\xc7\x21\xba\x07\x38\x44\x1c\x30\xfb\xff\x62\xa8\xec\xb4\x1c\x2a\x3b\xad\xf0\xe3\x6d\x43\xf5\x9c\x69\xa4\x87\x4a\x32\x3d\xb8\x34\x05\x0f\x4d\x9e\xd4\x57\x71\xcd\xed\x8f\x29\x2a\xa1\x9a\xbe\xcb\x96\xbf\x9b\x2d\x7f\x77\xcb\xae\x37\xb9\x8c\x60\x1a\x55\xda\x5c\x46\x70\x90\x96\xc3\xc1\xd6\x7a\xc1\x2f\x23\xf0\x6b\x2b\xbe\xbd\xd4\x1d\x3b\xd1\xdf\x8c\x35\xfb\x72\x52\x61\x23\x57\xaa\x5d\x46\xd0\xad\xd5\x7a\xb2\x5c\xeb\x78\xa9\xb3\xe3\xa2\xda\xd3\xd5\x6a\x45\x67\x65\xad\xdf\x6d\xed\x2a\xbb\xb2\xdf\xe7\x44\xf6\xa7\x4a\x6c\xc3\x3f\xd7\xad\xea\xb3\x3d\x5c\x03\x9c\x3f\xae\x4e\x29\x25\xa0\x9c\xb0\xc4\xe6\xef\x91\x7c\x75\xb4\x06\x5e\x68\xef\x33\xbd\x94\xfa\xb7\x29\x89\x8b\x92\x69\x04\x0d\x2a\x7e\x01\x46\x03\xbb\x0a\x55\x9e\x93\xf4\x3d\xb5\x47\x1c\x3d\x7f\xdd\x03\x5b\x38\x49\x9f\x69\x55\x7f\x71\x8b\x94\x38\xc4\xab\xc2\x93\x86\x1a\x35\x61\x25\x2a\x79\xea\xf4\x7a\xe6\x4a\x22\x3f\xc0\xcb\x1f\x2a\xee\x21\x3c\x5c\x21\xef\x86\x6a\x1b\xa8\x15\xad\x37\xd6\xd6\x1f\x47\xeb\x8a\x68\x9d\x63\x53\xd5\x85\x44\xab\xc5\x66\xe4\x43\x0a\xe8\x8a\x22\xfa\xec\x71\x11\xa2\xb8\x66\x43\x3d\xb0\x6f\x10\x61\x75\x29\xb0\xc7\xf6\x1c\x9f\x1f\x53\x70\x3f\xda\x71\x46\xac\x97\x49\x16\xf9\x9d\x38\x91\x9d\x34\x73\xc7\xa1\x44\xdd\xa5\xc2\xa9\x90\x27\x36\xee\x84\x29\x96\xcf\xb9\xec\x60\x88\xff\xbe\x95\xbb\x05\x65\xd5\x58\xc8\xb9\x71\xfa\x47\x3b\x4c\x2a\x76\xcc\xb9\x85\xfa\xe7\x0c\xde\x20\xcf\x16\xa4\x3a\x1c\x22\xbc\xc2\x13\x78\x62\xcc\xb9\x7f\xa0\x39\x37\xbe\xa8\xb8\x29\x3c\x33\x87\x7c\xeb\x81\xa3\x76\x45\xa1\x90\x7e\x77\xb4\x9b\xd8\xa5\xb9\xbe\xdc\xa8\x26\x68\xb6\x36\xbc\xca\xa9\x2e\xc7\xe4\x29\x39\xb8\x38\x25\xac\x6a\x06\xac\xbd\x13\x12\x33\xce\x39\x39\x74\x8d\xf3\x89\x7b\xad\x58\xa6\x63\x8a\x03\xbf\x4d\x1b\x1c\x21\x1a\x32\x6e\x22\x29\x2d\x73\x6e\x62\xb6\xfa\xc7\xf6\x0d\xd9\x4d\x4d\x14\x0f\x0f\xa3\xba\x0a\x04\x0b\x6f\xd7\xc6\x39\xe8\x54\x9c\x8d\x8e\x86\x02\xe6\xe4\x44\x2d\x19\xce\x5e\x8f\xf1\x3d\xae\xe5\x8a\x9b\xc5\xd6\x03\x23\x68\x8f\x54\xb3\xdd\x44\x49\xb5\x0d\x23\x44\xb6\x80\x9b\xdc\xff\x8a\x27\xd4\xd6\x8a\x2b\x63\x9e\x91\x4f\x29\xf2\xe9\xb5\x91\x8a\xbe\xfb\x71\x01\xcb\x16\xea\x27\x2e\xad\x18\xac\x68\xce\xb9\x01\x3c\xbd\x55\xf0\xdc\xd3\x60\xc8\x62\x04\x32\x3f\x4c\x27\x11\x9b\x77\x58\x10\xe8\xa8\x48\x98\x48\x3c\x5d\x0b\x8c\xd0\x02\xe2\x05\x90\x7a\xab\x1e\x0e\x7b\x1a\x48\x4b\xf0\xfc\x92\x83\x27\xba\xd7\x4c\x51\x0f\x7e\x4d\x57\x43\x69\x54\x86\xbd\xc6\x87\x54\xd5\x78\xb5\xea\xd7\xb5\xd2\x87\xda\x13\xb5\xd0\x13\x8d\xa4\x8b\x93\x19\x25\x0d\xae\x1a\x4a\x0a\x11\x65\xc5\xfe\x74\xc5\xd3\x48\x75\xe5\xe2\x9a\x3f\x86\x64\xc9\x77\x6f\x38\xb4\xb3\xd2\x65\x46\x2f\x55\x82\xd1\xc9\x57\x7c\x5c\xf0\xbe\x46\xc1\xc2\xd2\xfa\xbc\xd0\xeb\x93\x34\xb9\xdc\xe5\xee\x0b\xc5\x7c\xd1\x66\x2b\x5a\x1f\xa4\xec\xd5\xeb\xfd\xd7\xc7\xaf\x97\xe3\x94\xcd\xa3\x8a\x9b\x81\xbe\xbb\x33\x3e\x06\x37\xd1\x5f\xbb\x49\xeb\xbb\x7e\xcb\x65\xda\x2c\x02\x01\xf3\x48\x5f\x69\x5c\xff\x95\x6e\x1b\xc2\x5a\xad\xdc\xd2\x9d\x24\x04\x2f\xea\xd0\xcb\xbb\x75\x05\x2e\x74\x90\x30\xf7\x50\x7b\x57\x1c\x45\x8d\x06\xc8\x47\x4c\xe7\x5c\xc8\xdd\x64\xaf\xec\xaf\x82\xc4\x14\xd8\xdc\x8e\xc1\x3d\xd1\x17\xc3\xc7\x51\xab\xf9\xe1\x6a\x7a\x72\x2f\xcb\x2f\xea\x6b\x10\x19\x25\x35\x35\x69\x98\xd4\xb7\x39\xce\xb4\xfa\x64\x41\xe1\x75\xe4\x1c\x92\x3f\x87\xb0\x09\x83\xef\x14\xce\xda\x34\x02\x0d\xb9\xfb\x6b\xc0\x36\xb7\x67\xe4\x38\x6a\xd6\x16\xef\x71\x38\x8a\xd4\x74\x5f\x47\x74\x01\x71\xcd\x45\x77\xe5\x3c\x76\x6d\xe3\x7f\xa7\x61\xdb\x7d\x8f\x58\x6f\xae\x8f\xf9\x9c\x5c\x23\x1b\x07\x3b\xab\x53\xcf\x49\xc4\x7b\x45\xdc\x0d\x77\xde\x77\x7d\xba\xea\x7a\xab\x59\x4d\x6f\x99\x74\xe4\x8d\x2b\x5f\xd3\x94\x6f\x4e\x6e\x22\xb4\x12\xe8\x4a\x72\xac\xa4\x19\x6f\x54\xd2\x2c\x5e\xa5\x59\x16\xb5\x77\x93\x92\xe4\x6d\x17\x87\x7d\xe9\xb4\x86\xc8\xa9\x30\x64\x5c\x3c\xed\xdd\x76\xcd\x20\xe9\x7b\x14\xd5\x13\xdc\xad\x75\x0a\xe8\xe8\x16\xe6\x8e\x6e\x9e\xc3\x56\x1c\xdd\x12\x0a\xde\x77\x4a\xed\x06\x24\x10\x2e\x30\xd6\x66\xf3\x51\xaf\x3a\xe5\xa1\x7b\x77\xb4\xc6\xe0\xaa\x7d\xf7\x57\x50\xe8\xf0\x4e\x14\xba\xbd\xba\x6b\xe8\x65\xbd\x8a\x63\xab\xb4\xb0\x82\x6d\xdd\x0f\x36\x9a\x9e\xe8\x36\x76\x95\x1c\xa8\x32\x2f\x23\xdc\x10\xc5\x1c\xfb\x1d\x33\x4d\x14\xa4\x22\x0a\x3c\x27\x0a\x28\x8a\x57\x95\xfb\x59\x83\x1f\x9d\x1a\xdd\x10\xc1\xef\x24\x05\x09\x19\xbc\x66\x15\xf4\xb9\xae\x45\xb9\x47\xcb\xbc\x4d\xa6\x3d\xdd\xde\xae\x4d\xa9\xcc\x0e\xed\x18\xd8\x17\x5b\x82\xfb\xcd\xe6\xe0\x76\x35\xa6\x78\x65\x6c\x3d\x12\x11\x5e\x84\x31\x8b\xd6\x25\xf5\x15\xc6\xb4\xe2\x85\x68\x4f\xc1\xa1\xed\x53\x52\xf5\x99\x23\x93\x93\xbb\x55\x85\xba\x6b\x0b\x30\x99\x82\xe1\x8d\x19\x07\xf3\x7d\xc1\xd3\xb4\xdd\x3e\x45\xab\x20\xd6\x5b\xa4\x08\xce\xfc\x79\x93\x3d\x4a\xca\xa5\x8c\x6a\x66\x27\xb9\x45\x8a\x1f\xa6\xcc\x8d\xfe\xa5\x04\xcc\x67\xda\x1c\x67\xc2\xb5\xf5\x87\x20\x27\x09\x79\xa3\x64\x94\x3c\xcd\x4b\x6e\x7a\x72\x20\x74\x4e\x18\x3d\xb9\x32\x17\x4c\xca\xc9\x0b\xa1\x13\x2d\x8b\x3b\x8c\x2f\x7e\xb2\x8f\xb6\x04\xf6\xc9\xce\x80\x7d\xb6\x39\xb0\x67\x36\x03\x17\xf5\x67\xe7\x7a\x49\x0f\xcc\x92\x5e\x24\x27\x5c\xa4\x61\x12\x97\x8b\xea\x66\x61\xe4\xbf\x42\xeb\x9e\xa5\x57\x5f\x52\x2e\x2a\xaf\x04\x8b\xbd\xcb\x6a\xc2\x9b\x69\xb8\xdc\xcf\xb4\xd2\x71\xca\x71\xae\xda\xc6\xe5\x65\x94\x5b\xdf\xc8\x50\x4d\xf1\x20\x37\xaf\x89\x83\xf0\xc2\x82\x57\x62\xa9\xfd\xbb\x38\x48\x70\x51\x74\xa5\x28\x4b\x31\x8a\xdc\x99\xea\xf3\xad\xc9\x3c\x7d\x1e\xdd\xc3\x1f\x27\xe7\x0e\xb4\xd7\xfa\xa7\x00\x62\x78\x19\x2d\xd3\x65\xa1\xe8\xb2\xb6\x06\xdf\x8b\xd6\x5d\x81\x69\x01\xe0\x3c\x82\x82\xc1\x3e\x63\xf0\x45\x31\xd8\x39\x82\x70\x8f\xec\x9f\x2e\x3a\xbe\x2c\x0c\xda\xa3\xb0\x1f\xb5\x87\xfd\x7b\xa6\x83\x1e\x3d\x59\xbd\xaa\x7c\x62\xb0\xc5\x94\xec\xba\x70\xa4\x0e\xb9\xfb\xd8\xb0\xf6\x1c\x24\xd5\x71\xa8\xea\x58\xe1\x31\x32\x65\xde\xcc\xf6\xc0\x3b\xb5\x5f\x71\xe2\xd1\x8a\x38\x33\xd4\xe4\xc9\x83\xc4\x99\x92\xb3\x08\x8e\x11\x75\x0c\x4c\xaf\x0a\x33\x68\xb2\x51\xf7\x37\x35\xdd\x7d\x56\xdd\x81\x37\xd0\xd7\x40\x1a\xe9\x1d\x70\x60\xab\x36\xa9\x79\xc3\x53\xfb\xa5\x66\x0e\x0b\x09\xe0\x8b\xf6\x51\xcd\x5d\x54\x6b\x0a\x04\x74\x65\x76\xe6\xe4\x2a\x02\x13\xaa\x3c\x59\xa8\x21\x0e\xf5\xd0\xc2\xd5\xa1\x9d\xda\xef\x39\x51\xe4\x69\x68\x87\xe5\xa8\x3e\x54\x47\x35\xb0\xc3\x06\x04\xea\x9d\xda\x3f\x38\x09\x69\x3e\x3c\xdc\xcd\xd7\x98\xfd\xf6\x5a\xcb\x71\x57\xaa\x78\x59\xbc\x0c\x9a\x3b\x7a\xc1\x49\x40\x97\xe7\xf9\x86\x93\xb7\xea\x6d\xa3\x57\x7c\xde\xee\x6c\x99\x79\xdf\x6e\xf6\x82\x8f\x4b\x36\x6c\xb8\x24\xee\xed\x25\xa4\x5a\xd6\xe2\xa8\x2f\x2b\xc1\x26\x56\x8d\x8f\xcb\xc1\x5c\x25\x8d\xf4\x73\x46\xf6\x8c\x24\x51\x10\xce\x40\xc3\xa4\xe6\x38\xdc\xc7\xea\x33\xb3\x1c\x26\x83\x26\x98\xc4\xeb\xb9\x02\x0a\x35\x19\x74\x35\x08\xea\x4e\xbc\x81\xee\xc4\x80\xa0\xbb\xba\xcf\x03\xdb\x6d\x06\xba\xc7\xb6\xab\x8e\x75\x3e\x1c\xef\xac\xa5\x83\x33\xd3\x01\x5b\xe2\xd4\x52\x0d\x6c\xa6\xad\x01\xb3\x74\xb5\xf5\xd0\x4e\x9b\xa1\x6b\xd3\x4e\x9d\x1b\x72\x51\x74\xd1\xcd\xe7\xd0\xd0\x49\xd7\x74\x52\x0c\x61\x05\x24\xdc\x15\x46\xe7\xf7\x7a\x95\xf9\x4a\x95\xba\x07\xbf\x17\xd7\xab\x6c\xd6\x79\x58\xef\xba\x52\xa5\x45\x4a\xfb\xb1\xcc\xba\x7d\x8c\xd6\x67\x65\x9c\xd9\x1c\x6e\x6d\x09\x99\x4e\xb5\x95\xc1\x8e\xa6\x38\xbb\x51\xb3\x7f\x9e\xfb\xf0\x21\xb1\x2c\xcd\x7b\x69\x6d\xa0\x9b\xe7\x49\xe8\x33\xd8\x8d\x50\x3d\x42\xed\xd3\x05\x9c\xb6\xa2\xe4\x6b\x99\xdf\x1c\x8e\x74\x10\x5d\x3b\x4f\xb4\x60\x42\x1c\xbf\x5b\xfe\xb8\x14\xf3\x4a\x53\x9f\x37\x24\x15\xa3\x0b\x8f\x19\xb6\xa1\xc8\xe0\xb4\x58\xc0\xa7\x36\x14\xae\xe3\xc9\x3a\x96\x49\x79\x27\xd5\xbc\xa4\x8e\x25\xf8\x40\xe6\x81\x04\x63\x47\x3d\x32\x90\xce\xbb\x08\xaf\x98\xf3\xbb\xb9\x4a\x02\x45\xf1\x5c\xa2\xff\x7a\xac\xea\xc4\x4b\x97\x6f\xda\xf8\x42\xc7\x11\x86\xd3\x48\x47\x54\xa9\xe6\x26\xa0\x70\xd8\xba\x46\x2d\x91\xdf\x1f\xc4\xa5\x03\xbd\xc9\x51\xb5\x9c\x7d\x40\xf4\xb3\x3c\xa8\x23\x2d\xd7\x0c\xaf\x36\x9e\xe7\x61\xce\x78\x9f\x3d\x7c\xb8\x1c\xf8\xad\xa8\x13\x3b\x72\xb1\x20\x31\x99\x92\x8f\x11\x9c\xae\x38\x48\xbe\xd4\x34\xba\x9c\xa8\xde\xf1\x87\x0f\x75\x60\xb3\x3e\x1b\xc5\x7d\xd7\x8e\xe9\x42\xc9\x92\x19\x05\xb5\x0e\x04\xb3\x71\x1f\xd3\x7e\x77\xd4\x4d\x6c\x0c\x3c\xf0\x29\x82\x6e\x62\x82\xfa\x3e\xb4\x34\xaa\x54\xbb\xff\x04\x98\xd4\xb2\xf5\x49\x74\x2f\xa3\xec\x4b\xc5\x38\x31\x05\xbb\xb7\x36\x87\x43\x3b\x81\x23\x9b\xc1\xb1\xed\xc1\x17\x3b\x83\x5d\x0d\xcb\xb7\xd1\x5f\x48\xb4\x26\x49\x11\x07\x98\x07\x46\xd7\x8c\xdc\xf5\x1a\x75\xc7\xc7\x08\x44\x7f\x07\x44\x3f\x03\xd1\xbf\x05\xd1\x9f\x41\x7e\x9d\x84\x79\x0f\xa3\xa5\x54\xf0\x45\x22\xf8\xf6\x04\xe7\x71\x7f\x07\x77\x34\x43\x3b\xfa\x5b\x34\xa3\x9f\x3d\xaf\x8a\xce\xaf\x70\xdd\xcf\x28\x78\x7a\xab\x4a\xa6\x52\x0f\xb7\x39\x77\xe4\x8c\xdc\x46\xe8\x50\x73\x9e\xc0\x69\x06\x07\x21\xc1\xc7\x2b\x06\xf3\x90\x58\x01\x8b\x52\x6e\x69\xd5\x3a\xbc\x8d\xd6\x04\xd1\x68\xcc\x5f\x5f\x7c\xe3\x30\x51\x64\x05\x4f\xe5\xda\x0b\xe5\x19\x79\xab\x46\x43\xa4\x23\x1a\x6f\x31\x6f\x2b\xf1\x40\x71\x92\x6a\x59\xd4\xa2\x08\x88\xfb\x33\x20\x78\x7b\x7a\x46\x09\x1a\xf8\xd0\xef\x68\x68\x92\xfb\x93\xbf\xa9\xcc\xdf\x5b\x93\xc9\xae\x71\xa5\xb5\xbf\xc2\x99\xc1\x0c\x1a\x11\x60\xea\xbe\x92\x38\x5c\x90\x18\x3c\x3a\xca\x47\x56\x64\x8a\x29\xb6\xe1\xbb\x42\x82\x45\xbc\xcf\x05\x1c\xac\xd9\x8f\xc6\xfc\x2c\xae\x41\xaf\x79\xae\x45\x14\x59\x17\x4a\xca\x9b\x91\x2b\x38\x51\xdf\x7c\x21\xee\xf3\xcf\x1b\x41\xf2\xb0\xed\x14\x0e\x8a\xc8\xce\x14\x7f\xe8\x00\xce\x78\xe1\x72\x1b\xc1\x4a\x08\xe7\x1c\x52\xe6\x98\x6e\x94\xea\x36\x45\x20\x68\xaa\xe0\xac\x12\xac\xda\xfc\x2e\x23\x53\x9b\x17\x3a\x10\xb5\xf9\x61\x1c\x09\x8c\xfc\xa7\x06\xa7\x44\xb9\x30\xbe\x50\xc3\xab\xe5\x34\x4c\xfe\xd5\x9d\xd3\x27\x4d\x23\x68\x4c\xf4\xea\x24\xc4\x33\x28\xbf\xc0\xe1\xa7\x1a\x87\xd7\xa1\xcd\x44\x7f\x15\x14\x62\xbd\xa7\x44\x22\x94\x95\x9b\xaa\xc4\xc4\x99\x92\x73\x8e\x8e\x0f\xdf\x7d\x7c\x6b\xc1\xb5\x44\xd9\x1d\x01\xfb\x4d\xb9\x32\x6a\x66\xf8\xee\x0c\xdf\x72\x3f\xd4\xf7\xd9\x27\x62\x39\x4b\x6b\x5c\x5a\x91\xc6\x90\x39\x72\xed\x29\x13\x80\xde\x44\x59\x7e\xce\xc2\x35\x0e\xfd\xf9\x15\x9a\xa0\xe0\x5e\x2b\x14\x9c\x80\x70\xc9\x38\xa0\x30\x09\xc8\x29\x35\x19\x25\xc3\x96\x81\x1b\x18\x8a\xf9\xcc\x42\x5d\x87\x80\xb0\x0a\x47\xea\x39\x77\xb6\xd0\x20\x82\x10\xda\x30\xe8\x94\x9c\x28\x70\xdf\x91\xf0\x60\xa8\xfe\xad\xfc\x1f\x33\x41\x99\x0f\x55\x3e\x5e\x05\x57\xbd\xda\xab\x03\x3c\xc3\xd3\x8e\x2f\xb5\xd0\x48\xe1\x4d\xe4\x90\x2c\x71\x50\x19\x76\x05\x9f\x39\x1c\xa8\x79\x5c\xc1\xcb\x04\x4d\x27\xd4\xe3\x55\x02\x07\xe6\xf1\x07\x87\x50\x3f\xbd\xe7\x70\xa6\x9f\x5e\x70\x78\x6b\x8a\x5f\x71\x78\x65\x1e\x75\x50\xc4\x86\x99\x69\x3e\x66\x41\xbf\xd3\x26\xbb\x09\x44\x89\x4d\xec\x14\x9a\xc6\x64\x28\x6d\x1e\x44\xce\x0f\x01\x1f\x22\x13\x78\xf1\x8b\x36\x5e\xd8\x5a\xc0\x0b\xfd\xb4\xb9\x80\x1f\xfa\xe9\xc9\x02\x3e\x47\xf7\xc9\x41\x75\xd5\x62\xa3\x3c\x06\xee\xbc\x64\x3a\x28\xed\x8c\x7c\x8e\xb4\x8d\x92\x9b\xe8\xd4\xbb\xd6\x44\x24\x7e\x86\x8d\x2c\x08\x12\x0c\xcd\xa6\xa4\xd6\x91\xa2\xe8\xb6\xa2\xfe\x5e\x53\xab\x8b\x5a\x36\x81\xbc\x65\xe2\xe4\x71\x91\x1c\x47\xb7\xcb\x7f\x57\x5b\x07\xb5\x30\x4e\x3b\xba\xf5\x68\x68\x0f\x20\x6c\x88\xd9\xc4\x2b\x96\x17\x35\xef\xe8\x95\x84\x1a\x9d\xeb\xc4\xc4\x68\xd2\x9f\x5f\xfa\xb0\x5f\xf3\x96\x31\x1f\x86\xcc\xb9\xe5\x24\x9f\xf3\xa5\x94\x13\xfb\xd1\xa3\x28\xf1\x58\x74\x99\xa4\xd2\x7e\x36\x78\xb6\xf5\xc8\xaa\x6a\x23\x22\x38\xd7\x6e\xde\x63\xe7\xa7\xbe\x85\x3b\xc5\x3b\x35\x59\x6a\xaa\xa3\x04\xdc\x13\x7b\x58\x81\x9f\xee\x2a\x7a\x9b\xae\xbe\xf2\x57\x5f\x45\xab\xaf\xd2\xd5\x57\xee\xea\xab\x60\xf5\x55\xb8\xfa\xaa\x01\xed\x36\xd0\x50\xb6\xfa\x2a\x5b\x7d\xd5\x90\x46\xb6\x81\xff\x12\x6b\x58\x32\x25\x8a\xfa\xe0\x3e\xb1\x43\x70\x9f\xd9\x01\x78\xae\xed\x81\x77\x6d\x73\xf0\x62\x3b\x03\xef\x87\x2d\xc1\x9b\xd9\x29\x78\x73\x9b\xe1\x3d\x26\x78\xef\xec\x04\xbc\x53\x3b\x02\xef\xcc\x8e\xc1\xeb\xda\x53\xf0\x06\xf6\x18\xbc\xa1\xdd\x05\xf7\xc8\x76\x17\xf5\xff\x2d\x5f\xa4\xe6\x3b\xf7\x60\x08\xee\x07\xbc\xad\x23\x33\x72\x91\x60\xf8\x3f\xf5\x78\xa9\x1e\x3d\x4a\x09\xa7\x24\xa4\x64\x96\x50\xcd\xf0\x92\x8c\x12\x46\x49\x98\x94\xff\xc5\x94\x78\x94\x48\x4a\x7e\x7a\x37\x76\xb2\xd0\xec\xed\x0f\xe1\xdc\xc6\x0a\x44\xde\xb7\x9e\xe4\x52\x84\x10\x1b\xc4\xb2\xad\x8d\xb3\x22\x8d\x10\x7c\x5d\x67\x2f\x6b\x44\x2b\x69\xef\x12\x09\xbb\xa4\x14\xab\xbe\x45\xed\x9c\x58\xa2\xa8\xcf\xa9\x6b\xa2\x12\xc5\xbe\xf3\x2d\x22\x96\x17\xb1\x34\xfd\xc8\xc6\xdc\xa2\x20\xfc\xdc\x29\xcb\xbd\x56\xe2\x9d\xf4\x9d\x6f\x31\xb1\xfc\x70\x6a\x51\xe0\xfa\x47\x3a\x61\xb1\x45\x21\xf3\x9d\xaf\x31\x30\xdf\x99\x11\xe9\xc3\x29\x20\x1a\xe6\xe6\x29\xf3\x89\xb5\x9f\x30\x3f\x8c\x2f\xfa\xfd\xbe\x45\xbf\xeb\x70\x36\x9e\xef\x08\x01\x89\xdf\x12\x15\x26\xf9\x32\x99\x70\xf1\x92\xa5\x9c\xd0\x05\x84\xfe\x5f\xb8\x13\xd3\x17\x62\xb9\xf6\x60\xf9\x12\x81\xf9\x75\x5c\xf1\x89\x15\xb7\x60\x81\x9e\x94\x9b\x49\x99\xa8\x69\xb9\xfe\x3d\x03\x29\xa5\xba\x61\x68\x51\x88\x7c\x87\x09\xf0\xfd\xf6\x85\x8f\x7c\x88\xc1\xf4\x20\xd0\xde\x6c\xea\x3b\x9e\x80\xae\xdf\xb0\xc5\xb1\x13\x8f\xac\x80\xf5\xc6\x61\x9c\xa5\x96\xad\x1e\x27\x51\x96\x5a\x25\x22\x0a\x7c\xb5\xc8\x27\x88\x8b\x62\x9f\x58\xae\x8c\x3b\xae\x8c\x7b\x49\x26\xa3\x30\xe6\xbd\x30\x0e\x92\x8e\x9b\x08\x9f\x8b\xde\xa0\x33\x16\xbd\x61\x67\xec\xf6\x86\x48\xe7\xa7\x3e\x58\x63\x26\x2e\xc2\xb8\x17\xf1\x40\x5a\x60\xf5\xb6\x04\x1f\xab\x3d\xd2\x7b\x98\x62\xe7\xaa\xdb\x80\xa1\xb2\x1c\x3f\x31\x16\xbd\x4d\xac\x73\xaa\xb6\x5e\xf1\x5d\x89\x31\xf4\x1b\x6b\x30\x92\xa1\x8c\x14\x08\x5d\xea\x75\xc9\x22\x8b\xc2\x44\x3f\x33\x8b\xc2\x85\xaf\xad\x00\x5b\x97\xe8\x98\xe7\x61\xea\x5a\xab\xfc\x08\x4c\x15\x72\x48\xfe\xcc\xf1\xb5\x05\xf8\x94\xaa\xc7\xef\x68\x54\xe4\xaf\x4d\xcc\x13\x57\x33\x41\x98\xd0\x1f\xda\x83\x19\x8c\x3d\x89\x73\xe1\x93\x0c\xb3\x85\x8c\xf4\x31\x63\xfd\xee\x88\xa0\x37\x47\x91\xd2\x2d\x76\x4c\xe2\x80\x99\x24\x18\xb3\x33\x91\x30\x96\x44\x6e\x58\x1d\x75\x52\x28\xc5\x54\xc8\x8d\x75\xb0\x86\x68\xaa\x21\x28\xe6\x0d\xa9\x7e\xb5\xf6\xb5\xb1\x24\xf9\x40\x74\x66\xaa\x0c\x3f\x56\xe9\x49\x7f\x60\xc3\xf4\xb6\xf4\x5e\xbf\xc3\x90\xec\x8d\x27\xf0\x90\xe4\x91\x99\xfa\xe9\x24\x0a\x25\x79\xf4\xcf\x74\xe3\xd1\x85\x92\x13\x6f\xcc\x1e\x33\x71\xc1\xa5\x45\xe1\x5a\x6f\xac\xf4\x2d\x0a\x3b\xe6\xf9\xd2\xa2\x70\x64\x9e\x15\xc3\x78\xec\xb7\x5f\x9c\xc7\xe8\xb0\xd1\x67\x43\x4a\x47\x15\x70\xde\x91\xf7\x81\xe7\x5c\xb6\x68\x04\xd8\xfc\xdc\x74\x6a\x00\x6b\xe1\x9d\x85\x02\x59\x3b\xff\xe0\x9d\x5f\xb2\x28\x9c\x30\x52\x8c\xb4\xed\x7b\xea\x70\xb6\x7f\x6e\x41\xe1\xb5\x5e\x95\x48\xe1\x8a\xb3\xa5\x55\xe1\x50\x48\x3a\xed\x99\x17\x44\x35\xf3\x82\x12\x07\x46\xe7\x79\xde\x5d\xcc\xbc\x66\x9f\x63\xe4\x0d\x23\x9b\x56\x72\xad\xa0\x16\x46\xc0\x39\x39\x05\xcd\xfe\x53\xb8\x5a\x7b\x38\xea\xa9\x20\xe3\xc2\x8f\xc9\x7f\x8e\x97\x37\xbe\xf6\x27\xe8\x73\x9a\xa7\xac\x7a\x69\x76\x9c\xb9\x78\xfa\xcf\x7d\x47\x32\xd8\xf3\xdb\x1c\xe7\x20\x76\x76\x09\xe1\xce\x8c\x9c\xf9\x26\xe6\xa9\x84\xcf\x92\x54\x12\xc9\xd0\x6a\x00\xf4\x56\x5c\xf0\xb9\xc0\x05\x31\xc5\x28\xe8\x2e\xe6\xc3\x08\x95\x6c\x82\x2e\xcb\x6e\x85\x71\x7b\xed\xeb\x9d\x53\xb8\x6f\x92\xa4\xa1\x66\x7b\x51\x92\x08\x3d\x4b\xc3\x1c\x8b\xc2\x8b\xb8\x17\x4a\x3e\x4e\x7b\xe8\x22\xde\x89\xc2\x54\xf6\x74\xa8\x7c\xf5\xba\x04\xc0\x89\x42\xaa\x6e\x6f\xbb\x04\x41\x59\x80\xc4\xac\x37\x1c\x60\xe9\x66\xc7\xef\x05\x11\xbf\xe9\xac\x74\x9c\x37\xfb\xa1\x64\x4d\x18\xfc\xf1\x02\x2d\x10\xdf\xab\x93\xe0\xf9\x4d\x12\x84\xc8\xc8\xcf\xae\xfd\x0c\x73\xa2\xa1\x08\x75\xec\xeb\x48\x29\xb6\x82\x34\x8b\x02\xc1\xf0\x9a\x4f\x69\xbf\x3b\xd2\x6f\xec\x37\x4c\x5b\xfd\x7f\xc1\x6f\x9c\x66\x6a\x6d\x8e\xfa\x2e\xaf\x54\x41\x6a\xdd\x72\x0c\x7c\x16\x5f\x70\x51\x39\x08\x6d\xb0\xcf\xe7\xbc\x97\x46\x2c\xbd\x6c\x38\x00\x85\x7e\x40\x91\xfe\x62\x08\xf1\xbf\x7b\x08\x2e\x8f\xa2\x96\x31\x7c\xc8\x8a\xef\x2f\xeb\x38\x8b\x5b\x97\x91\x16\x3c\x1d\x6b\xe3\x43\x48\x3e\x64\xab\xc6\xf6\xa5\x5f\x73\x88\xca\xef\x81\xc9\xe0\xe5\x2a\x3e\x4d\x83\x5b\x25\x75\xe0\xbd\xf1\xca\x2d\xc3\xe8\xaf\xcd\x33\x8a\xc2\xf8\x7a\x65\x2e\xfb\x61\x7c\xad\x11\x0a\xc1\x24\x5b\x70\x41\x04\xfa\xb9\xe5\x58\xf4\x65\xd1\x0b\x1e\xc6\x4e\x01\x89\x43\xec\x06\x67\xf6\x96\xe9\x73\xc2\xde\xd3\x12\x7a\x0c\x03\xa7\x23\xe9\xa3\xef\x88\x46\x5b\xfb\xfe\x9a\x34\xbf\x45\xfe\x9d\x51\xbb\x7f\x82\xb6\x0e\x2e\x97\x47\x56\x97\x47\x9f\xac\x2a\x73\x92\x2f\xc7\x32\x4c\x48\x7e\x23\x7b\x46\xb7\x64\xd8\x97\x2c\xe5\xa2\x97\xf2\x88\x7b\x8a\x7d\x09\xe3\x50\x86\x2c\x2a\x4a\x7b\xe3\xe4\xb6\x77\x47\x95\x19\x77\xaf\x43\x79\x47\x2d\xb3\x5d\x5e\x12\x29\x99\xd1\xfa\xaf\xc7\xae\x37\xf0\x0b\xba\x93\xf9\x44\x6c\xfc\xc3\xb1\xfe\xb1\x11\x6f\xfc\xc3\xfa\x07\x6e\xc9\x5d\x94\x45\x13\x94\x43\x46\xce\x89\xd6\x39\xc3\xd8\x27\xd6\x1b\x04\xc1\x8e\x3b\xef\xc8\xcb\x30\xed\x44\xcc\xe5\x51\xe5\x2b\xd6\x46\xce\x3f\x2f\x80\x53\xbb\x61\x89\xd4\x67\x52\xee\x25\xb1\xcf\xc4\x7c\x75\x45\x55\x1f\x1f\x13\xd9\xc1\x05\x37\xe7\xe1\xbb\x42\xe0\xde\xaf\x5f\x18\x21\x1a\x63\xe0\x30\x67\x3d\xfa\x19\x0e\x72\xfc\x33\x27\x5d\x85\x7f\x18\x5a\x24\x49\xe7\xab\x20\x18\x31\x0a\xef\x4c\x46\x67\x92\x48\xc5\x9a\xe0\xf1\xb2\xec\xa5\x9f\xa9\x05\xd2\xa9\x8d\x7f\x1c\xe9\xd1\x0e\x8a\x65\x9f\x5d\x86\x92\xf7\xd2\x09\xf3\xb8\x05\x56\x9c\xcc\x04\x9b\x54\xa6\x22\xf5\xf0\x97\xa0\xea\xb4\x8e\x85\xc7\x6e\x6f\xcb\x40\x7d\x22\x81\xc1\x2e\x49\x74\x14\x1d\x31\x9a\x91\xcb\xa2\x5a\x89\xe1\xcd\x10\xf2\x73\x32\x23\x7b\x3e\x60\x72\xd3\xac\x38\x27\xfa\x50\x7c\xf4\xdb\x6f\x08\x30\xf7\xad\x3a\x27\xd3\x04\xa6\xda\x72\xd3\xaf\x9a\xf8\xe8\xe3\xa3\x7d\xa3\x62\x93\x8b\x2b\xae\x5e\xd0\x54\xa7\x30\x89\x7a\x8f\xcd\x80\x76\x65\x1b\x1d\x74\xc9\xbe\x8f\xa7\x12\x93\x14\xba\x78\xbf\x13\xe2\x25\xcb\x1e\x66\xe5\x5f\xa0\x9e\xa3\x62\xb1\xef\xde\x22\x97\xcb\xb0\x82\x83\x48\x8c\xa9\x26\xcf\x97\x3b\x9c\x91\x8f\x3e\x86\xa6\x52\x44\x16\x14\xd6\xcb\x0a\x95\xe8\x27\xa6\xc0\x49\xef\xa8\x86\xa9\xb4\x13\x24\x59\xec\xa3\x41\xb9\x27\xee\x10\x3f\xdf\x07\x46\xfc\x3c\x55\x12\x10\xb1\xbc\x4b\xee\x5d\xe3\xe1\x7e\x67\x24\xaa\x78\x92\x29\x1e\xf3\x93\xe1\x9a\xf4\x71\x80\x43\xbf\xb4\x2a\x35\x7c\x28\x14\x8d\xbf\x53\x54\x45\x9d\x18\x36\x75\x3e\x51\xbc\xc8\xad\xdf\x2e\x3f\xe7\x3c\x81\x5a\xe9\x98\x4d\x91\x3c\x97\x18\xe8\x53\x09\x48\x52\x81\xa7\x82\x51\xad\x34\xef\x79\x49\x2c\x45\x12\x15\x3f\xd5\x00\xdc\xe4\xa6\x6c\xfb\x4e\x33\xb3\xbe\x99\x19\x96\x21\x83\xb1\xdc\x41\x2f\x9f\xe6\xa9\x5f\xe6\x7d\xa4\x14\x3e\x33\x7d\x5b\x23\x41\x64\xd4\xa0\xff\xea\x79\x59\xe9\xc5\x0f\x3d\x54\x6a\xdd\x5d\xd7\xe7\xa9\x27\xc2\x09\x32\x3f\xe5\x79\x8a\x0d\x72\xd1\xe0\xfd\xca\x5f\xef\x7f\xd9\xbe\x6a\x26\xc7\x51\xf5\xfb\xaa\x0a\xd2\xb2\x0a\xc7\xce\x4b\xfe\xdb\x60\x59\xe6\x5d\x2b\x28\x8a\x7d\x0b\x2c\x29\x58\x9c\x4e\x98\x40\x2d\xb3\xc1\x07\x41\x12\x6b\xec\x7c\xc9\x45\x58\xbe\xf6\x32\x91\x22\x5e\x9e\x24\x61\xac\x55\xd4\xba\xc0\x20\x5c\xc4\x1d\x31\x37\x8b\x9f\x0f\x45\x63\x60\xbc\xb6\xc2\xc1\xe8\x59\xbf\xf5\xef\x19\x97\xf8\x8d\x86\xd9\xc2\xf4\x8c\xc2\x81\xef\xfc\x83\xc7\x53\xa7\xaa\x50\xfd\x07\x7c\xd0\x80\x18\xaa\x1a\x5f\x7c\xe7\x77\x78\xe1\x3b\xc3\x2d\xf8\x81\x42\xb0\xd4\xac\xed\xb5\x84\xae\x44\x77\x77\xf8\x7c\x0f\xd5\xc1\xb0\x50\x1d\xbc\x6f\x3a\x09\x3a\x4a\x94\xb1\xb3\xfe\xaa\x6a\xa4\x09\x58\xd7\x7c\xfe\x32\xf1\xb9\x05\x18\x29\x1e\x4f\xa7\x71\x33\xf4\x0b\x9f\xc0\x6e\x50\xf5\x0b\x4c\x82\xd2\x73\xef\x9b\x5f\x78\xee\x79\x42\xa7\x98\x8e\xa7\x5a\x07\x34\x66\x91\x3a\x94\x62\x8a\xf3\xd4\x1f\xa7\x20\xa7\xad\xd1\xc2\xbc\x73\x2d\x39\x5f\xeb\xb8\x38\x57\x98\x44\x95\xed\x83\xe7\x7c\x53\xd2\x36\x24\xce\x09\xd3\x07\x21\x33\x91\x90\x5d\x1f\x83\x62\x79\x0a\x6d\x87\xce\x0f\x9f\x70\x0a\x81\x73\x41\x3c\x5c\x32\x93\xe5\xe4\x1b\x03\x94\x45\x4c\x56\x19\xcb\xb2\xbd\x7e\x77\x64\x5d\xb2\xd4\x30\x90\x96\x8d\x3f\xd2\xcc\xf3\x78\x5a\xd5\xa1\x94\x98\x56\x24\xb3\x4e\x9c\xf4\x2e\x32\x29\xb9\x48\x5b\xf8\xf5\x5d\xcd\x1a\x32\x4f\x7d\xaf\x46\x6d\xbc\x24\xea\x58\x1b\xa2\xd0\xae\x84\x71\x6f\x16\xfa\xf2\xd2\x02\x39\xb2\xb6\x06\x83\xc9\x8d\x65\x5b\x9b\xf8\xb7\x41\x62\x68\xfc\xbc\x3a\xb3\x3c\x96\xbd\x54\x0a\x2e\xbd\xcb\xa6\x76\xea\xab\x88\x44\x7a\xe6\x7a\x6f\x19\x03\x7d\xf0\x9b\xd3\x8a\xe2\x71\x08\x12\x51\xe0\x05\xdc\x46\x4c\xba\xe5\x91\x9a\x03\xaf\x3a\xd3\x2f\xfc\x8a\xab\x73\xe3\xf6\xe4\xe9\xd3\xbe\xf8\xd4\x64\x59\x7b\xe0\x38\x59\xde\xe8\x3d\x53\xf5\x9e\xc7\xce\x39\x61\x10\x56\x5c\x07\x8d\x65\x49\x77\x94\xb9\xf6\x8c\xbc\xf5\xe1\x01\xf2\xd6\x7d\x56\x50\x9a\xcc\x5d\x50\xc8\x3c\xd2\x92\xf7\xf8\x8b\x4f\x47\xaa\xf7\x21\xb5\xb1\xa6\xf4\xc8\x57\xd6\x80\x06\x2b\x8b\xd4\x73\x65\x5c\x2e\xd4\x2a\xb3\x36\x11\xe1\x98\x89\xb9\xa5\x4e\x3a\x09\x28\x24\x0d\x5c\x98\x62\xf4\xe4\xa8\xbe\x13\x5e\x12\xf5\x58\x26\x93\x4e\xed\x6b\x8a\x78\x6c\x36\x6d\x5f\xe3\xd6\x4d\xee\x62\x1f\x95\xdc\xe0\x19\xec\x75\x87\x34\xd4\x4b\x56\x64\x08\xe3\x7e\x53\x99\x49\xc9\xdb\xc0\x8c\xc4\xd3\xa2\x2f\x05\x1f\x8a\xf3\x5e\x62\xbf\xcb\xc5\x78\x89\x94\xa5\x63\x80\x0a\x3a\xbc\x7f\xd1\xb7\x9a\xf9\x5f\x24\x00\xc8\xa1\x8e\x0d\x6c\xbb\x2c\xe5\x88\xa1\x11\x17\x7f\x65\xe4\xc0\xa7\x65\xdf\x07\x7e\x39\x3a\x93\x1e\x83\x4f\xef\xa9\x93\xcd\xa6\x0d\x36\xa7\xb9\xb6\x89\xd2\x51\x11\xdf\xce\x5a\x51\xa6\xaa\x21\xfb\x22\x99\xf8\xc9\x4c\x1f\x7e\xad\xfa\x44\xa4\xc4\xa7\x18\xac\xa0\x32\x48\x61\x08\x07\x9b\xae\x63\x31\x4a\x36\x22\x78\xd2\xf1\x43\xb7\x33\x76\x37\x3b\x63\xd1\xa8\x19\xf0\xb8\x26\x62\x6b\xd9\x88\x53\xf5\x65\xc5\x22\xc8\x06\x30\x9f\x54\x00\x4d\xed\x11\x4e\xa0\x20\xec\xde\xf4\x9e\x24\x2e\x99\x3a\xbf\x43\x38\x75\xb6\x07\x10\x4c\x15\xd1\x72\xa7\xce\xd6\xef\x90\x4e\xef\x99\xee\x3c\xb7\x58\x2a\xf2\x9d\x5f\xe8\x54\xa3\x05\x16\x39\xcd\x88\xa4\xd5\xac\xe7\xd1\x74\x25\xeb\x79\x4e\x35\xd8\x39\xde\xfb\xbb\x11\x6a\x68\xdd\x31\x32\xaf\xde\x54\x1b\xc5\xee\xa3\xcb\xc4\x24\x00\x4d\x1b\x74\x3c\xcf\x36\x32\x9a\x4e\x73\x7d\xd1\x3b\x89\x01\x6f\x33\x34\x3a\x16\xa3\x44\x61\x1f\xbd\xc3\x52\xdf\x8e\x4f\x02\x38\xcd\xfe\x4a\x8f\x1c\x7b\x6b\x22\x2d\x77\xe0\xe7\x7a\x1e\xc6\x16\xdc\x2c\xdb\x70\x73\x38\x2d\x56\xd5\xf7\x48\x58\x60\x62\x77\xe9\x7d\x52\xbc\x0f\xca\xf7\x4a\x10\x9a\x04\x90\x18\x6c\xce\xa7\x88\xcd\x33\x54\x8f\xe6\xab\x91\x37\x4b\xa6\x15\xc4\x2e\xf3\x1e\x22\xaf\x40\xec\x3f\x7c\xc2\xd0\xd3\xa4\x44\xee\xc6\x8d\x58\x2f\xaf\x37\xd5\xc8\x9d\x55\x90\x7b\xb2\x1e\xb9\x27\x53\x3a\x52\x5f\x18\x52\x3b\x31\xc8\xdd\xf5\x50\xd3\x95\xe2\x77\x15\xb7\x82\xcc\xa1\x97\xa5\x16\xa4\x5c\xed\x29\x85\xa9\x47\x52\x6c\xf4\x6f\x24\x03\x02\xb1\x40\x4c\x9b\x49\xc1\x82\x82\xdf\xce\xf5\x18\xf8\xf5\xa6\x90\x39\x0f\x50\xd6\x96\x10\xf7\xbd\x3d\xaa\x24\xef\xcf\x41\x6e\x8f\xea\x29\x29\x59\x31\x2f\xd9\x1a\xd6\x05\x63\x68\x35\x88\xb8\xe8\xa5\xc4\xa6\x60\xbd\x8e\x51\xef\xa3\xb9\x7e\x2d\x99\xa1\x79\x8f\x00\xcf\xab\xba\xbb\x89\x51\x29\x34\x4b\xf8\xbb\x9c\x50\xb7\x9d\x13\x62\x0d\x9c\x50\x9d\xff\x89\xa6\x28\x0a\x03\x2e\x43\x45\xfb\x0b\x5c\xc9\x10\xf7\xa7\x44\xfb\x4a\x3c\xec\x5c\xf3\x79\x27\x48\x44\x31\xe9\x5c\xdf\x60\xf4\xfd\xff\xa6\xee\xfe\x25\x3a\xe7\x7a\xcb\x4a\xee\xf2\x9b\x95\xb7\x86\xbd\x20\xdc\x21\x99\x13\x53\x85\xf1\x62\x27\x53\xf8\xaf\xba\xca\x8a\xcf\xf0\x92\xf1\x24\xe2\x92\xf7\xc6\x3c\xce\x3a\xd6\x06\x21\x59\x9f\x6d\xfd\xfa\x95\xf5\xdd\xd7\xf4\xe1\x43\x75\xf4\xac\xf4\x32\x99\x29\x5a\xa7\x18\x68\x8f\x24\x78\x6e\x28\x04\xfa\xb1\x72\xa1\x21\x57\x29\xa0\xea\xb5\x54\x87\x64\x53\x85\xe3\xb4\x62\x30\xa7\xcb\x6a\x65\xe5\x82\xc2\x74\xea\xfc\xec\xda\x4f\x16\xd0\xbd\x83\xf8\x36\x12\xd9\x52\x32\xb4\x9b\xca\xd7\x49\x7b\x27\x8c\x8c\x3d\x22\xfa\xde\x97\x15\x7d\x50\x9c\x93\xe9\xca\x2d\xe5\xd4\x64\xcb\xba\x6c\x20\x84\x1a\xe9\xc7\x0a\xed\x97\x09\x9b\x5b\x93\x6b\x5e\xcb\x3b\x52\xb4\xc6\x7d\xef\xcb\xa2\x10\xf2\x3e\x4b\x1d\xec\x40\x2c\xeb\x8a\x57\x25\x69\xc5\x2a\xaa\xad\xc5\x49\x87\x02\x2c\xc9\xdc\x77\xb1\xcf\x6f\x30\x93\xd0\x90\xe6\x6b\x51\xb9\xc1\x10\x3c\x62\x7a\x01\x5b\x84\xdf\xe5\x2d\x56\x4b\x36\x35\xf7\xb9\xa8\xd8\x10\xbd\xed\x35\x4b\x5c\x82\xe8\xa1\x31\x06\xb4\x3b\xd6\x86\x36\x33\x43\xf3\x1f\x51\xc1\x82\x93\x69\xbb\xb5\x92\xbb\xff\xeb\x97\xe8\xbb\xaf\x47\x0a\xb0\xa5\x23\xa8\x42\x8c\x98\x0c\x6c\x0f\xf5\x8e\x9a\x86\xa3\xe9\x65\xf4\x97\x08\xb9\x34\x84\xdc\x2b\xc8\xb6\xbc\x7f\x7b\xa9\xdb\xae\xdb\x0a\x5c\xa1\xce\xea\x79\xc3\x93\x85\xa7\xea\xb2\x3c\x55\x97\xfa\x54\xfd\x0b\xbb\x54\x72\x06\xf5\x04\xb3\x8a\x0d\xe0\x48\xdf\xa6\x53\x24\x86\x17\xde\x0a\x53\x50\xa1\x9e\xe1\x94\x8e\x26\x1e\xf1\xa8\x6d\xd8\x01\xf5\x8b\xe9\x5f\xc1\x94\x8e\xc6\x9e\x96\xb5\x39\xb4\x05\x7a\xd4\x30\x9c\x51\x4a\xed\xd7\xee\xa2\xb0\x01\x28\xc1\xc5\xf8\xf8\x5b\x60\xb9\x51\xe2\x5d\x97\xea\x5b\x83\xef\x87\x83\xc1\xff\x55\x2a\xa5\x5a\x50\x4c\x67\xe9\x57\x4f\x84\x17\x97\xb2\x44\x3b\x5d\x14\x4b\xa5\xc6\x37\xf6\x8c\x5c\x4e\xd1\x7d\xc0\x7d\x41\xcb\x8b\x7b\x60\xe0\x2d\x28\x5c\xac\xa1\xc1\xef\x34\x0f\xc9\xf4\x2d\x7f\x57\x5f\xf3\xef\x68\x17\xe0\x13\x40\xc7\xa6\x37\x3a\x46\xde\x6b\xbc\xb1\xf0\x7e\xac\x57\x2e\x7b\x4c\xf8\x9d\x2a\xf9\xad\x17\xf6\x2e\x39\xf3\xab\xcc\xfc\x65\x15\xc0\x3a\x0a\xc8\x24\x73\xd3\x4e\xa5\x2e\xbe\xc8\x1b\xdc\x90\x57\x3e\x0c\xc0\xd3\x28\x64\x9f\x61\x52\x48\x73\x12\xdf\x18\x43\x49\x45\x26\xb0\xde\xb0\xb1\x9e\xe8\xb3\xcb\x91\x85\x26\xbe\x1d\xa2\x39\x02\x6a\xd9\xfa\x45\x2e\xee\x79\xfe\x52\xd6\xc9\x19\x99\x4c\xb5\x1e\x99\x51\x0a\x73\x72\xeb\x43\x2e\x30\xfa\x16\x88\xfe\x17\x38\x65\xf9\xfb\xf2\x72\x0f\x44\xff\x08\x3e\x16\x05\xfa\xc6\x0d\x44\xff\x18\x76\x59\x4e\xce\x56\xd6\xc7\x40\x8c\x9e\xad\x37\x2a\x87\xc2\xf3\xa1\xf8\x53\x54\x6a\xb3\x4b\xdc\xf8\xbc\x58\xe6\xc5\x72\x0a\x3f\xbd\x73\xfb\xc1\x00\x41\xb4\xfa\x99\xd3\x36\x9e\x2e\x17\xa4\xcb\x8b\x92\x15\x03\x99\x2d\x4d\x55\xcc\x7d\xc7\x26\x30\xfb\x41\xbc\x30\x64\x32\x1e\xad\xb3\x34\xd8\xaa\x4a\xd9\x2f\x93\x28\x62\x93\x94\x77\x58\x14\x19\x05\xb9\x45\xbf\xdb\x6b\x2c\x07\x96\x9a\x6b\xf3\xca\xe5\xc6\xf9\x04\x43\x1f\xe6\x64\xd7\x87\x04\x42\xc5\x3c\x49\x83\x7b\x67\x5a\x2b\x77\x39\xb4\x28\xcc\xa7\x4b\x16\x59\xb3\x69\x69\x91\x15\x27\x32\xd7\xd4\x9b\x1e\x6f\x74\x43\x44\x32\xa9\xb6\xec\xd0\x1a\xbd\x4b\x39\x8e\xde\x24\x8a\xcc\xee\xdc\x53\xc4\xbd\x4b\x53\x2e\x98\x1f\x26\xff\x92\x9a\x5c\x20\x16\x8c\x11\xfd\xc9\xff\xa4\x6a\x7c\x41\xe1\x68\x6a\x4c\x76\x8f\xa7\x26\xec\xe4\x6b\x7c\x18\x0e\x16\x70\x86\x4f\xbf\x2f\xe0\x0a\x1f\xb6\x17\xf0\x72\xda\xea\x0c\x5c\x11\x9a\x07\x7f\x38\x18\x85\x5c\x47\x20\x57\xf2\x8b\x59\xd6\x77\x92\x64\x1a\xc5\x79\x4e\x0c\x89\x23\x20\x74\x24\x04\x0e\x07\xd7\x31\x17\x5a\x19\x85\xd4\x31\x81\x86\x05\xe6\x2e\x7e\x1e\x3b\x1e\x08\x27\x01\xe9\x84\xc0\x9d\x00\x32\xc7\x05\xe6\xa4\x4a\xc2\x3e\x9f\xae\xf5\x0f\xeb\x04\xe4\xe5\x14\x3d\x46\xbe\x49\xcc\x2b\x84\x6e\xee\xa7\x30\x27\x5f\x53\x0c\x5b\xa8\x83\x2c\xee\x4d\xdb\x0c\xf2\x4c\x4e\xb5\x5a\x72\xcc\xe1\xf6\xf6\x80\xd2\x95\xf4\x59\xb5\x28\x01\xdb\xf5\xc4\x64\xb5\xd0\x10\x4f\x6a\x3e\x8f\x83\x7a\x3a\xb2\xba\x71\xdf\x26\x66\x04\x69\xa3\x07\x13\x8c\x99\xce\x9d\x29\x39\x9f\xc2\x70\x08\x18\x73\x57\x02\xc9\x9c\x1d\x45\x13\xf7\xa6\x26\x62\x70\x11\x4d\xf8\x69\x4f\xfb\xb1\x8d\x32\x7b\x88\x3a\xe6\xa7\x76\xd6\x1b\xd2\x3c\xb0\x30\x64\x4e\x19\x69\x38\xa6\x10\x3b\x24\xae\x76\xa5\xd5\x0c\x45\x68\x62\xd3\xd7\x53\xc7\x71\xe2\xd1\xc0\x8e\xb1\x4f\x7c\x32\x7d\x66\x14\x96\x86\x16\x57\x55\x0b\x72\x79\xd8\x19\x48\x8a\xb6\x9f\xbb\x24\xdf\xa3\x8f\xad\x5c\x18\x46\x1d\xf9\xe3\xe9\x48\xd8\x33\xf2\x71\xaa\x44\x18\x17\xd3\xe0\xc1\x8c\x7c\x4a\x40\xe8\x53\xe9\xeb\x77\x46\xef\xb6\x8b\xf0\xbc\xb5\x80\xd3\xe9\x9d\x96\xa8\xbf\x7e\x19\x9f\x39\xe3\xc9\xb2\x14\xbd\x75\x41\xe1\xdd\x52\x17\x12\x93\x04\x19\x4b\x81\x0b\x72\xe4\xa9\x4d\x39\xf2\xd4\x21\x18\x59\x78\x0d\x3e\x4e\x62\x79\xa9\x84\x17\xc8\xda\xef\x46\x8a\xa8\xc0\x71\x11\xa8\x56\xd0\xb5\xc1\x92\x1f\xc4\xfd\xee\xc3\x87\x43\xb4\x52\xcf\xd0\xa0\x83\xd3\x91\xb0\x2d\x6b\xa1\x99\x48\x1c\xf0\x15\x58\x1d\xae\xb0\x24\x2a\x98\xf0\x95\x00\xab\x33\x4e\xb2\x94\x27\xe8\x12\x83\x7a\x22\x2c\xb8\x05\xab\x63\x64\x63\x88\x9b\x83\xac\xb1\x5b\xec\xb4\x2d\xc0\x9a\x65\x15\xf7\xb3\x2e\x5a\x7b\x9d\x13\x33\x36\x1c\x1d\xa8\x1f\x02\xc3\xaf\x63\xa0\x69\xf6\xeb\xd7\x26\x06\xcb\x75\xcb\xf6\xe6\xa1\xe3\x72\x39\xe3\x3c\xb6\x16\x84\xe6\x7c\xf5\x39\xc1\xdc\x0b\x8a\x3e\x9f\x4e\xa1\x35\xff\x5a\x08\xe8\x8c\x5e\x0e\xb6\x51\x9d\xe5\x33\xc9\x3b\x2e\xf3\xae\xad\x0d\xc2\xfa\x4c\xfd\xe3\x6e\xc4\xb4\x51\x92\x54\x55\x03\x91\xc4\xd2\xda\x48\x36\x48\xb8\x41\xbc\x0d\x13\x0d\xce\xf7\xc1\x2a\xd7\x12\x52\xf4\x3a\xcf\x13\x23\x2b\x02\xbc\x3b\x2d\x71\xf0\x99\x02\xa5\x0f\x18\xef\x9c\xd3\x8a\xb8\xf1\x69\x2d\x59\x5a\x62\xdb\x4e\xf3\x3b\xfd\x77\xd3\x3c\x57\x98\xe9\xe4\x70\xda\xea\x39\xba\x8f\x62\x02\x06\xcd\x52\x3f\x3f\x4e\x41\xc2\x29\x6d\xbb\x3e\xba\xca\x52\x19\x06\xf3\xe2\xda\xa6\xae\xcd\xad\xd8\x87\x71\x7e\x5d\x61\x0f\x71\x64\xc7\x1e\x1c\x9a\x88\xda\xde\xcd\xe8\x4f\xeb\x28\x53\x52\xc3\x07\x94\x1d\x8e\x33\x25\x26\x7c\x55\x4c\x95\x75\x7c\x99\x59\x60\xbd\x11\xa1\x05\xd6\x11\x93\xd6\x77\xfb\xcf\x7b\xd4\x42\x57\x0c\x63\x1a\x5b\xdb\x20\x1c\x2f\x0b\x63\x73\x7b\x5a\x6e\x4c\x26\x71\x5f\xae\xa6\xb4\x62\x12\xf1\xa9\xbe\x7c\x27\x88\x1f\x06\x0b\xb8\x9d\x9a\x20\x9c\xaf\x34\x3f\xe1\xaa\xfe\xde\xea\xe7\x89\x45\xe1\x4d\xfb\x66\xfd\xec\xda\x4f\xaa\xd9\xad\x31\x10\xc6\xda\xea\x8f\xeb\xd5\x3f\x98\x3b\x49\x29\x92\xf8\xc2\xa2\x6b\xf2\x61\xaf\xc4\x21\x31\x29\xd5\xe2\x7e\x77\xf4\x36\xb1\x53\x4e\xb5\x07\x9e\xc2\x8e\xbc\x48\x42\xd8\x6e\xd2\x90\xa7\x4d\xaa\x64\x4c\x22\x96\x57\xc4\xe2\xf3\x92\x78\xca\x85\xec\xa4\x52\x84\x7a\x64\x53\x7d\x73\xfb\xde\xf0\xb3\x73\x0e\x9e\xa0\x14\x5e\x4c\xdb\x7c\x57\xeb\x80\x26\xc3\x31\x9f\x84\xde\x75\x15\xb8\x3e\x14\xda\xad\x34\x73\xaf\xb8\x27\xab\xd6\x32\x23\xeb\x75\xec\x5b\xb6\x75\x94\xeb\xef\x96\xa1\xe0\x32\xc9\x44\x93\x26\x34\x9b\xf4\xb4\x49\xbc\xb9\xab\x28\x20\x5a\x9d\xcf\x39\x79\xa3\x8e\xc3\x00\xd6\x18\xc5\xb2\xf8\x22\xe2\x3d\xa3\xf6\x3e\x35\xdf\x7d\x67\xee\xfd\x15\xa0\xb9\x51\x26\x2c\xbd\xd0\x33\x72\x80\xfd\xa9\x05\xa2\xc8\xe4\x55\xf0\x68\x18\x10\x99\x63\x53\xd1\x67\xd7\xd5\xd8\xa3\xd6\x00\x2d\x8c\xf2\x54\x0a\xda\x71\x02\xab\xed\xdc\x59\x8d\x50\x0a\x67\x1e\xd9\xd4\x5c\xe7\x34\xe4\xb3\xfa\x54\x73\xae\xb1\x72\x41\xa4\x24\xd5\x7b\xac\x4b\xef\xce\x85\x51\x3d\x95\x4b\xb3\x22\x24\x25\xd1\xea\x17\x4a\x6d\x8c\xbd\xba\x8f\x4a\x12\x91\xfc\xef\xee\xe4\xf0\xdf\xbc\x93\xc3\xbf\xbf\x93\x3f\xee\xb7\x93\x3f\xd6\xee\xe4\xdf\xdf\xbb\xe1\xbf\xbc\x77\xea\x84\xb6\x40\x93\xde\x3e\x12\xb7\xa3\x27\xed\xc0\xd9\xa6\x93\x51\xe8\xc6\xb2\xec\x19\x99\x27\xf0\x3b\x48\x64\x7b\x16\x06\x49\xc9\x91\xe1\xb8\xae\xd5\x3f\x57\xa8\xf5\x56\x4f\x3b\xea\x9f\xdb\x82\x72\x22\xab\x11\x2f\x28\xfc\x98\x36\x85\xb4\x37\xee\x48\xe5\x85\x7f\x83\xa1\xe1\xb8\xe3\x5e\xf4\x02\xe6\x73\x7f\xd5\xf0\x70\x13\x2d\x9f\x5b\x0c\x35\x25\xbf\x91\xeb\xac\x34\x97\xcb\x1b\x4d\x34\x75\x95\xe5\x6b\xd8\xe7\xf1\x72\x2c\xec\xe0\x6f\x0e\xf9\xa4\x6a\x92\x5b\xce\xbb\xf1\x9e\x40\x94\x8c\xc8\xe7\x69\x6b\x42\xd9\x36\x63\x62\x1d\x05\xc9\xd1\x51\x90\x30\x9a\xa8\x8b\xd6\x9d\xbb\x84\xc8\x3b\x2c\xe3\x73\x13\x3f\x34\x72\x97\x7d\x77\x95\x4f\x5b\x6f\xe5\xfe\xf7\x6c\xd8\x2b\x16\xeb\xc2\x58\xac\x0b\x63\xb1\x7e\xec\x23\x53\x50\x58\xa2\xa3\xcb\x42\xcd\x12\x5d\xc9\x00\xda\x62\x79\xd9\xef\xe3\xfe\x16\xcb\xa2\xdd\x62\xf9\xc7\x14\xdd\x46\x78\xbe\x1f\xef\xa7\xed\xc7\xab\x62\x5d\xc9\x06\xfa\x73\xe5\x97\x3e\xa3\x6e\x41\xdb\x26\x7e\x9d\xde\xc7\xf7\x6c\x25\xc9\xcb\xca\x22\x9a\x85\x93\x7d\x77\xf4\xe7\x8c\xbc\x9d\xe6\x5c\xe9\x87\x8a\x56\x66\x27\x0f\x92\xaa\x2f\x99\xec\x0e\x3a\x01\x7e\x15\x98\xe0\xa4\x40\x30\xef\xa7\xe8\xee\x81\x6a\xa4\xe6\x7e\x3e\x26\x65\xbc\xd5\xca\xf5\x97\x39\xf7\xcb\x42\xb8\x5e\xc7\x7a\x1e\xeb\xd2\x4f\xae\x75\x56\xda\xea\x13\xff\xed\xcd\x98\x88\x91\xaf\x59\xb6\xcd\x55\x2c\xd9\xb7\x69\x7b\x2c\xc1\x06\xef\xbd\xea\x70\x06\x65\x70\x23\xcf\x87\x97\x1e\xcc\xc8\x57\x3d\xf7\x7a\x06\x1f\xe3\xc5\x57\x97\xff\x99\xaf\x46\x10\x77\x1d\x6b\x2c\x7b\x8f\x2d\x10\xdd\x15\xf3\x82\xd5\x89\xed\x92\xb8\x0b\xc6\xfb\x65\x64\x75\x96\x2e\x61\x2d\x5a\x33\x0c\xbd\x9e\x36\x9b\x56\x55\x18\xb2\x62\x57\x3e\x98\xe4\x82\x1d\x4d\xb3\x71\xc3\x71\x73\xca\xcd\xca\x0d\xbf\xd3\x8a\x75\x8e\x56\xcf\xbe\xc8\x2a\xba\xce\x21\xa2\x7a\x58\x26\xa8\x5a\x14\x2c\x10\xb6\x59\xc8\x82\xc6\x36\x6d\x61\xd5\xbe\xa0\x17\x70\xee\xa3\x40\x57\xd3\x7a\x2d\x88\x39\x4e\xb2\x6b\x58\x7b\xde\x75\xd6\xaa\x55\xcd\x2d\x35\xe2\xd1\x13\xb7\xc2\xad\x7c\x16\x9a\x1e\xee\x94\x30\x09\x59\xf7\x3e\x87\x54\xe1\xa7\x8e\xb5\x11\x77\x4d\x6f\xbc\x5b\x73\xe3\x40\x96\x00\xbd\xba\xb9\x65\x5b\x5f\x30\x73\x64\xa3\x65\xcf\x38\xea\x6d\x76\x56\x6f\xf7\x4f\x18\x91\xdd\x95\x99\xc7\xcb\x8c\xc3\x52\x5b\x03\x14\x5a\x4f\xbc\x74\x41\x86\xea\xd3\x82\x2a\x30\x5c\xb6\x67\x0b\xf0\xba\x46\x87\x92\x74\xef\x48\x51\xc2\xfa\x8c\xe7\x91\xe6\xbc\x4a\x94\xf0\x26\x39\x5c\xdb\x0f\x69\xfe\x22\x89\xb2\xb1\x4e\xa0\x60\x4c\xd9\x2b\x46\x03\x1d\x6b\x43\x56\x81\x77\x15\x6d\x88\x12\xc5\xe0\xad\xa9\x98\x2a\xa1\xfe\x0c\x95\xac\xfa\xc2\x29\x5b\x35\x4b\xe9\x2c\xc1\x50\xb1\xf5\x39\x4b\xb4\x72\x90\xef\x3b\xf2\xff\x99\xd1\x56\x06\x96\xa3\x0a\xed\xbd\xe2\x35\x1f\x90\xbb\x57\xd7\xf8\x26\xfd\x27\x16\x37\x07\xb8\xd5\x8b\xb4\xbb\xce\x71\x92\x43\xe3\x82\x42\xd8\xbd\x43\x5b\x52\x11\x31\x2b\x07\x2e\x20\x49\x17\xde\xf9\x60\xa4\x47\x50\x82\x49\x2f\xba\xe8\x6d\xa3\xb9\xe3\x13\x13\x39\x66\xdf\x83\x1b\x8f\xc2\x8d\x47\xbc\x2e\x85\x98\x42\xd1\xec\x95\x49\xef\x51\xb6\xdc\x5a\x6a\x79\xbe\xd4\x52\x56\x5a\xbe\x46\x73\xf0\xc6\xcf\xed\x2d\x35\x12\x0d\x8b\xa2\x37\xca\x34\x1e\x9a\xc6\x2b\x3b\xa5\x8e\xed\xff\xf3\x7f\x5b\x2b\x8e\x3b\x4b\x7b\x51\x47\x73\x06\x77\x74\xf4\x65\x79\x6f\xc9\x1a\xe1\xc6\x23\xac\xdb\x2e\x3c\x78\x2c\xe2\x8a\xeb\x5c\x12\x1d\xbe\xd3\xbb\x9c\x26\x42\x01\x8f\xfe\x9b\x24\xf1\x2f\x35\xae\x1d\xac\xd1\xa5\x8f\xc2\xbe\xe4\xa9\x24\xb1\x13\xd3\x91\xe5\x33\xc9\x7a\xd6\x46\x6c\xc7\xf0\xe8\xbf\xff\x99\xfe\x46\xae\xd8\x94\xe9\x0b\x0d\xfb\x97\x2a\xb4\x15\x13\xfb\xcf\x47\x97\x72\x1c\x15\x4d\x85\x23\xd0\xe4\x08\x43\x76\x07\x0a\xb9\x7b\x02\x74\x57\x17\x82\x8d\xc7\xe7\xdc\x0f\x31\x58\x46\x1e\x31\x0a\xdc\x6e\x9b\xd7\x70\xee\x2e\x2c\xfe\x19\xff\xfa\xa7\xf8\xf5\xcf\x58\x7b\x0d\xa7\x5d\xed\x1b\xca\x6f\x24\x13\x9c\x59\x14\xa2\xee\xda\xbc\x53\x98\xd5\x7f\x0b\x86\x8f\xe1\xab\x20\x6e\x57\x67\x31\xc5\xeb\xfd\xec\x7f\x06\x39\x8a\xf5\xe7\x37\x2e\xcf\x6f\xda\x35\x07\x38\xcb\x0f\xb0\xc4\x03\xcc\xef\x8d\x1d\xe1\xa3\x47\x98\x5a\xea\x7f\x03\x9a\xfc\x1f\x19\x77\xd3\x10\xff\xdd\x08\xf3\x3f\xb0\xe0\x05\x89\x5e\x9a\xcc\xdf\x46\x9d\x7e\xb7\xd1\x23\x46\xc7\x7f\xe5\x7d\xf6\x18\x30\x5f\x5a\x17\x3c\xf5\x67\x00\xe8\x14\xf9\x11\x42\xf5\x6b\x0f\xb3\xa8\xb1\x57\x18\xc2\xaa\x3b\x3a\x27\xd6\x47\x3e\xcb\x93\x20\x28\x74\xf6\x1a\x1d\x7d\x30\x42\xad\xf5\xda\x0f\x65\x59\xf6\x96\x13\x13\x30\xaf\x1a\x90\xac\xe5\x66\x37\x17\xb0\xe6\x24\xec\x42\xd6\x77\x0f\x20\xeb\xb3\x53\xc8\xfa\xa9\x9a\xb7\xe8\x82\x07\xac\x82\x5c\x8b\x38\x38\x71\xd7\xe8\x21\x0b\x94\x7a\x3c\xc5\xf4\x9c\x27\x14\xa6\x24\xea\x82\xf5\x32\xcf\xaf\x9d\x57\x9d\x15\x55\x8f\x74\xd5\xe3\xa5\xa5\x2d\x48\xc7\x9c\x7c\x9b\x02\x87\x44\x07\x5d\xca\xba\x28\x25\xaa\x31\x5e\x29\xa2\xa7\xd1\xde\xb4\xeb\x70\x01\xdd\xae\x93\x09\x18\x37\x22\x97\x58\x90\x40\xa0\x9a\xc3\x44\x94\xb8\xec\xde\xd3\x8c\x79\xd2\x5a\xd1\x63\x28\x46\xee\x08\xde\x99\x27\x59\x27\xcd\xcc\xc3\x8c\xc5\xb2\x23\x93\x8e\x4e\x8f\xbe\xc4\x92\x8f\x2c\x0a\x6c\xdb\x5e\x6f\x2a\x7a\xc2\xc8\x01\x27\x33\x72\xa9\xe7\x5a\xb5\xf0\x7b\x99\xc4\x41\x28\xc6\x9a\xd6\xb8\x3f\xec\x03\x4e\x8e\x13\x0a\xde\x13\xdb\x7a\xad\xbf\x96\xef\x3b\x26\x90\x59\xc3\x1c\x37\xe9\x25\x8c\xb9\x61\xca\xa3\xc0\x68\x9b\x4a\xc3\x7f\x73\xac\x36\xd0\x1c\xfc\xdc\x37\x31\xf4\xd0\x66\xa0\xf5\x2b\xe8\x60\xb0\x41\xac\x87\x26\xde\x97\x76\x8e\xd6\x82\xf1\x5c\xa3\xf4\xcb\xc7\x16\x85\x9b\x35\xe3\xfc\xdf\xe9\x71\xbf\x1a\x62\xca\x64\x70\x58\xa5\x27\x17\x5d\x64\x42\x52\x0b\x44\x9f\x9d\xd6\x45\x4f\x5d\x8e\x5c\x11\xd6\x70\x0f\x56\xc4\x50\xd3\x85\xc9\xb5\xaf\x7b\xc1\x08\x55\xa8\x22\x71\x7d\xf8\x8b\xee\xe2\xcb\x21\xe4\x65\x05\xba\x4e\x8c\xc6\x93\x52\x38\xf5\x88\xa0\x8d\x91\xd6\x97\xe6\xb9\x5e\x0f\xb0\x4e\xcc\x5b\xf1\xca\x37\x60\xbf\x8b\x4e\x29\x95\x41\xe9\x89\x5b\x4b\x44\xe4\xdf\xd9\xff\x2b\x1e\x71\xad\xf0\x56\xab\x2a\x56\xd4\xb0\xa5\x5e\xe7\x93\xa7\x36\xe8\x9a\x52\x38\xf4\x48\x3c\xc2\xbb\xe9\x49\x17\x04\x3c\x18\x52\x6a\xef\xc8\x42\x2d\x2a\x17\x14\xae\xbb\x0d\xc1\xfa\xcc\x1a\xca\x9a\xea\x87\x57\xe2\x09\x62\x48\x0b\x13\x51\xb4\xcd\xa0\x8e\xcd\x17\xda\xc2\x74\xad\xe9\xa8\x7b\xb2\x30\x26\xa3\x78\xe1\x49\x29\xba\xd8\x8f\xbb\xab\x3e\xcb\xe5\x14\x1b\x3a\x3a\x57\x5b\xae\x80\xec\xa6\x9b\x47\x0a\x50\x2f\x28\x9a\xf1\x2e\x30\x68\x8c\x71\xe4\xcd\xa1\x2a\x37\x0d\x5a\xd5\xb2\xc8\x56\x2d\xcb\x4e\xb7\x9a\x43\xe4\x68\x8d\x94\x81\xb6\x6a\x32\x0f\x4b\x7a\xe2\xc1\x01\xaf\xeb\x32\x44\x71\x39\x50\x09\xd2\x98\xf9\xe4\x1d\x23\xb7\x1e\x6a\xc3\x96\x4c\x78\x5c\xe6\x5f\xf0\x0e\xfe\xdb\x9b\x84\x51\x94\xcc\xcc\x0f\x33\x52\x83\x06\x10\x4f\xca\x64\xb2\xe4\x88\xa5\x2f\x96\x63\xc3\x82\x2f\x5a\x3e\xf7\x1d\xef\x16\x16\x14\x8e\x57\x55\x48\x61\x40\x74\x72\x8a\x8a\xb2\xbc\xc5\xcc\xaf\x40\x5c\xe6\x1e\xf5\x48\x01\xdf\x40\x2d\xde\xaa\xf2\xfa\x5e\x5d\x34\xc6\xa7\xc0\x5e\xe3\xbe\x77\x05\x0a\x86\x8a\x7b\x81\xd7\xff\x9b\xe9\xe0\x07\xbc\xfa\xc7\x0b\xdd\xbe\xeb\x2f\x5a\x29\xe2\x59\xd7\x18\x56\x5d\x69\xf2\xe3\x5a\x14\x5e\xde\x4b\x85\x54\xe1\x43\x45\x32\x6b\xf2\xf0\x56\xd2\xe1\x26\xca\x88\x58\x77\x29\xfa\xc2\x8c\x5c\x75\x9b\x78\xd3\xa5\x9b\xba\xde\x70\x70\xb7\x43\x97\x28\x64\xbd\xf3\x66\x7e\x52\xb4\x86\x5f\xf8\x50\x44\xe5\x37\xd1\x5f\xbe\xea\x7b\x78\x7a\x07\x53\x58\x7a\xfb\x41\x2d\xe0\x42\x61\xb8\x7a\x8a\x4c\xf5\x7f\x9a\x5c\x7c\xe0\xe4\xac\xfb\x3f\x45\x2b\x56\x3a\x5f\x26\x14\xb2\xdc\xc4\x97\x5d\xb0\xde\xbd\xb2\x4c\x34\x33\xbf\x78\xa7\xa9\x7a\x87\x49\x2c\x3a\xc7\xd2\x03\x5a\x14\x2b\xa6\x60\xa9\x90\x9d\x96\x85\x5a\x05\xe9\x2f\x37\xae\x94\x6b\x5d\xa5\xdf\x71\xe7\xe6\xbb\xec\xa4\x2c\xcb\x59\x6d\x5d\x70\x5c\x1d\x90\xe4\xf8\x5a\xe1\x25\xb3\x33\x45\x69\xae\x60\xb6\x60\xd9\xd8\xe5\x3c\x81\x77\x9e\xb9\x1d\xa1\x20\x75\xca\x1b\x10\x8a\x08\x72\x4d\x04\x5f\x77\x41\xc2\x83\x41\x41\x04\x17\x14\xf6\x0c\x7b\xb7\x69\x51\xd8\xd7\xcf\x5e\xe2\x2b\x10\xfa\xa8\x7f\x4d\xd4\x3e\xc1\xae\xa9\x66\xec\x58\xe0\x54\xff\x8e\xd9\xd4\xa2\xf0\xae\xeb\xfc\xbc\xb1\xcb\xbc\x06\xe0\x26\xb6\xd1\x79\x5b\x0b\xf8\xa4\x4b\xf5\x5b\x6b\x01\x87\x79\xed\x22\x3e\x30\x96\x1c\xe5\xbf\x16\x70\x52\xd4\x28\x92\x22\x61\x8d\xfc\xd7\x02\x6e\x8b\x1a\x26\x5d\x0b\x96\xeb\xe7\x05\xbc\xea\xb6\xc7\x21\x6b\x04\xfd\x6e\x1d\xec\xdf\x75\x6b\x20\xff\xa9\x9b\x13\x49\xc3\x0e\x18\x13\xc5\x65\xcb\xc4\x93\x6e\x2d\x9d\xe7\x6d\xb7\x96\x6d\xe2\x53\xb7\x0e\xef\x87\xdd\xc5\x42\x5f\x43\x8d\xac\x4e\xe9\xad\xba\xa0\xf0\xf6\x4e\x6e\x7b\x29\x2a\xc3\xc6\x8c\xbc\x32\x08\x78\xd5\xb9\xb8\x12\x0d\xe1\x96\x11\xd1\xbf\xc1\x40\x34\xc6\x5b\xa6\xe6\x3b\xa3\x01\xe3\x0d\x12\xfa\x77\x5d\x38\xe9\xc2\x6d\x17\x0e\xbb\xa0\x56\x3c\x0f\xbc\x37\x11\xc9\x98\xcb\x4b\x9e\xa5\xfd\x30\x79\xe4\x27\x5e\xaa\x37\x3f\x8c\x2f\xf4\xc3\x98\xc5\xec\x82\x8b\x47\x7a\x6b\x76\x79\x34\xb1\x16\xdf\x29\x1c\xac\xc7\xe1\x4b\x96\xf7\x46\x96\x60\xbe\x8f\x4e\x6d\xd6\x36\xba\x93\xe5\xbe\x2b\x26\x46\x8f\x58\xbd\xa5\x85\x0f\x1e\x89\xfb\xde\x69\x1d\x6f\x1b\xc3\xa7\xce\xa4\x22\x56\x1c\x78\x55\x9b\xdf\x0f\x5d\x27\x14\xc4\x12\x18\x7e\xe4\x4b\xb7\x3d\xf1\xfa\x67\x0f\x2c\x5c\x4e\xd5\x07\x46\x76\x82\x0f\x5d\x62\xa5\x72\x1e\xf1\xf4\x92\x73\x59\x58\x57\x45\x09\xf3\xd1\xb2\x4a\x10\x0f\x63\x3a\x17\x06\x71\x5c\x88\x44\x98\xa2\x38\x23\xd6\x1b\x16\x46\xdc\x57\x74\x58\xb5\xe9\xbc\x3c\x3a\xea\x04\x22\x19\xeb\xf4\x45\xd4\xf8\x37\xea\x18\xa3\x87\x31\xf9\xe9\xbd\xb2\xaf\xc0\x3b\xb0\xcf\x19\x78\x87\x76\x23\x63\xd9\x1d\x29\x32\xa2\x89\x2d\x5b\xd8\xea\xc7\x36\x30\x7b\x4e\xbe\x46\x60\xfd\x97\x05\x24\xd6\x59\xd3\xd8\x13\xd0\xef\x46\x96\xe2\x27\x8e\xd1\xe1\xef\x7d\xa4\xd8\x8a\x0c\x76\x15\x69\x98\x8f\xca\x90\x8b\x76\x19\x87\x31\xee\xbb\x9e\xe2\x2f\xfb\x2c\xc3\xf8\xf4\xe0\x6d\xdb\x5d\x49\x7e\x08\x0a\xde\x33\x7b\x3f\x02\xdf\x6d\x18\x99\xe2\x43\x0e\xc9\x9f\xef\xf5\xd2\x23\x07\xb0\x53\x01\x19\x6b\xb1\x58\xd0\xe7\x2c\x71\x7e\x7e\x60\x61\x6c\xff\x0c\xe3\x50\xda\x3f\x04\x39\x0c\x29\x19\xa8\x8f\xc4\xfd\xd7\xd1\x78\x94\xf7\xdb\x31\xe6\x53\x41\x22\x08\xf2\xe8\x9d\x30\xee\x48\x8a\x7f\xc4\x08\x43\x3c\x59\x8e\xc3\x47\x13\xf2\x84\xda\x31\x11\x7f\xf2\xef\x20\xff\xe4\xdf\xa9\xad\x1e\x1d\xf5\xb8\x20\xd8\x25\xb0\x84\xda\xf8\xe4\xb0\x64\x41\x14\x1b\x44\x9f\xff\xbf\x01\x00\x00\xff\xff\x01\x30\xcf\xe3\xfa\xaf\x01\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xdc\xbd\x0b\x7b\xdb\xb8\xae\x28\xfa\x57\x1c\xed\x6c\x2f\x72\x0c\xab\x76\x5e\x6d\xe5\x70\xf9\xa6\xaf\x69\x3b\x7d\x27\xed\x74\x9a\xc9\xe9\xa1\x64\x3a\x51\xe3\x50\x2e\x45\xc5\x49\x63\xef\xbf\x71\x7f\xd0\xfd\x63\xf7\x23\xa8\x07\x25\x3f\xa6\xb3\xf7\xda\xe7\x9c\x7b\xd7\x9a\x2f\x95\x25\x10\x04\x49\x10\x04\x40\x10\xdc\x1a\x67\x32\xd2\x71\x22\x89\xa4\x77\x5e\x96\x8a\x56\xaa\x55\x1c\x69\x6f\x50\x7c\x68\x29\x22\x41\x81\xa6\x77\x4a\xe8\x4c\xc9\x96\xf6\x39\x93\xa0\xfd\x31\x53\xa0\x17\x25\xd8\x84\x54\x20\x8a\xec\x80\x86\x12\xb5\x2a\x3f\xb8\xb5\x15\xe8\x88\x02\x49\x17\x0b\x5a\xa1\x1a\x11\xe1\xa0\xda\x05\x51\xa1\xd2\xcb\xa8\x36\x62\x17\x44\x83\xc5\xef\x56\xa0\x49\xe6\x54\xb0\x07\x59\x55\x81\x58\xc6\xf6\x77\xeb\xcc\x88\x80\xb2\x56\xb7\xda\x88\x70\xa7\xda\x7d\xe0\x55\xb5\xd9\x32\xc2\x7f\x01\x25\x9c\x64\xe0\xd2\xe2\x12\x23\x48\xe4\x10\x73\x00\x51\x45\x0c\x5f\xc6\xf9\xdf\x43\x5f\x44\x38\x34\x28\x74\x49\xcc\x48\xe2\x90\x78\x1f\x92\x8a\xc4\x68\x19\xed\xff\x32\xaa\x13\x12\xc1\x32\xdd\x2e\xe1\x9c\xc4\x0e\xe1\x0f\x20\xae\x08\x4f\x96\x31\xff\xef\x6c\x4b\x4c\x12\x58\xd9\x1a\xb7\x39\x09\x19\x3b\xcd\x79\x08\xe3\xaa\x39\xf1\x32\xf2\xff\xc3\x5a\x38\x26\x31\xac\x6b\xa3\xdb\xc8\x59\x43\xcc\xed\x30\xc6\xa4\xcf\x87\xd2\x1f\x13\xf3\x3e\x30\xf5\x10\xed\x94\xb8\xb5\x25\xa0\x22\x72\xb7\x5e\x06\x44\x59\x8a\x08\xa7\xe0\x4d\x51\x10\xaa\x26\xef\x35\x8b\x42\xe6\x16\x26\x99\x53\xfe\xba\x2a\x0f\x55\x3f\xee\x2f\x63\x00\xde\xc0\x41\xb8\x83\x66\xec\xa2\x81\x6a\x8c\x0e\x56\x21\x82\x68\x19\x15\x89\x1c\x6c\x61\x1d\x1b\x54\x6c\x70\x7f\x35\x3e\x48\x56\x62\x24\x89\x83\x34\x6d\x22\x85\x8a\xe1\x1e\xac\x43\x0b\xf1\x3a\xc4\x24\xa6\x8b\x6b\xae\x5a\x31\x1b\x91\x8a\x55\xec\xb0\x8f\x13\x45\xcc\x37\xc1\x8e\x94\xe2\xb7\x44\x52\xc8\x58\x6f\x90\x1d\xca\x41\xd6\xe9\x50\x71\x9a\x9d\x31\x4d\x54\x27\xa3\x83\x62\x6d\x59\x50\xd8\x66\x93\x1a\xa6\x0a\x8f\xae\xf0\x08\xd6\x1b\x88\x43\xd9\x6e\x2b\x3f\x1c\x88\x4e\x87\xea\x53\x71\xc6\x94\xcf\x41\x31\xf3\xaa\x5c\x58\x27\x42\x9e\xeb\x0b\x26\xe0\xab\x59\xb6\xe8\x82\xc2\x15\x23\xcd\x0a\x8a\x89\x78\x2a\xcf\x16\x14\x36\x35\xa4\x40\x08\x59\x4e\x8b\xa0\xc0\x59\x6f\xc0\x0f\xc5\x80\x77\x3a\x34\x3b\xe5\x67\x4c\x9f\xf2\xb3\x82\x82\xec\x54\x9e\x31\x05\xd9\x82\xc2\xfa\x66\xa9\x02\x6b\xd1\x53\xba\xd3\x2f\xfa\x4a\x57\x7d\xa5\x4e\xb3\x12\xaf\x38\xd5\x67\x4c\x82\xf8\x79\x7a\x0d\x32\x81\xc8\x14\x33\x33\x53\x9f\x66\x67\xa0\xca\xae\x57\x3f\x89\xa9\xdb\x1f\xf4\x0e\x99\x18\x88\x6e\xb7\x44\x24\x1a\x88\xe8\xe0\xef\xb4\x75\x45\x4b\x25\x31\x6d\xad\xb1\xc5\x7f\x79\x54\x50\x1a\x75\x38\x98\xd1\x29\x31\x67\x2b\x31\x97\xdc\x93\x4e\xe2\x48\x60\x0b\xfe\x82\x02\x55\x51\x20\xbb\x02\x78\x41\x47\x87\x64\x25\x75\x87\xd9\xb0\x78\x0c\x32\x4a\x21\x62\xbd\x41\x74\x28\x06\x51\xa7\x43\xf9\x69\x64\xc6\x37\x3a\x1b\x18\x9c\xf6\x4b\x56\x7c\xe9\x08\xc3\x53\x51\x39\xf6\x7c\x05\x33\x39\xa3\xb8\xe6\x53\x94\xc8\x34\x99\x08\x7f\x92\x9c\x13\xd9\xf1\x82\x96\xd7\xb9\x20\x94\x82\x5a\xd0\x4a\x33\xbd\x20\x05\xbc\x77\x18\x4b\x2d\x94\xe4\x93\xf4\x9f\x5e\x25\x3e\xa6\x66\x1d\xd0\x17\x2a\x99\xb5\x9e\x2a\x95\x28\xe2\x5d\x68\x3d\x4d\x83\x7b\xf7\xce\x63\x7d\x91\x85\x7e\x94\x5c\xdd\x13\x93\xab\x7b\x51\xa2\xc4\xbd\x70\x92\x84\xf7\xfa\x7e\xcf\xef\xdd\xbb\x88\xa5\x4e\xef\x79\x1d\xd9\xf1\xfc\xab\x91\xe7\x48\xa4\xf3\x06\x8b\x80\x60\xa7\x67\x90\xb1\x4b\xec\xe6\x1e\x08\x3a\xc8\xda\x6d\xa2\x99\xf0\xa7\xc9\x94\x50\x3a\x30\xdf\xb4\xcf\x41\xfb\x21\x7e\x77\x86\xb3\xc4\x7a\x59\x2d\x25\xf1\x98\xf4\x7b\xbd\x43\x4d\x0b\x76\xf2\xa7\x59\x7a\x41\xbe\x62\xbd\x14\xb6\x7a\x83\x78\x4c\x24\x63\x4c\xe5\x10\xf6\x8d\x97\x84\xdf\x44\xa4\xbd\x2d\xa6\x6f\xa7\x22\x19\xb7\xe4\x7c\x2e\xb3\xc9\xc4\x08\xc9\xf2\xa9\x28\xe2\x15\x15\x7b\xac\x04\x6f\xb7\xa7\x64\x9f\xc2\x56\x7f\x50\xb4\x2d\x6b\xc5\xb2\x25\xfd\xed\xc3\x5e\xbb\x4d\x24\x0b\xb5\x91\x65\xca\xfc\x6b\x08\x91\x34\x1e\x93\xad\x4b\x22\x71\x66\x9a\x3f\xba\xd3\x37\xcd\xcb\xa9\xea\x0f\x0a\xf2\x50\xe4\x1e\xb1\x09\x39\xa7\x70\xcc\x56\x0f\xf8\xd6\x79\xce\xb8\xd5\xe8\x9e\x14\x8c\xbb\xb2\x75\x45\xf7\x60\x4f\x0c\x7b\x81\x3c\x54\xc3\x6e\x3f\xe8\x9b\xbe\xd8\x92\xfe\x76\xfe\x9d\x68\x76\x42\xa4\x91\xb4\x3e\xa7\x74\x3e\xcf\x7f\x87\xa0\xfc\x90\xd2\xa1\x0e\xcc\xaf\x08\x94\x1f\x51\x6c\xf7\x40\xfa\x21\xca\xe9\x76\x7b\xab\x5e\x76\x20\x19\x96\x33\x12\xbb\x1c\x42\x3d\x9f\x1b\x6c\xc3\x7e\xa0\xfc\xd0\xd4\xdf\xb3\x0b\xcc\xd3\x35\xcd\xb4\x8d\xa2\x87\xbd\x05\x85\x2f\x6b\x45\x7b\x0e\xd4\x5f\x3f\x3d\x7a\x87\x27\xc5\x44\x5f\x0b\xc1\x0a\x10\x0a\xdf\x96\xc9\xc9\xbf\x96\x72\xf0\xb0\x37\xbc\xd6\x81\x1a\x8e\x74\x30\xd1\x0b\x0a\x8f\x59\xaf\x1a\x8a\xaf\x2e\xea\x3b\x1e\x48\x08\x03\xb5\xa8\xd8\xf7\x65\x5d\x16\x15\x10\x10\x05\xda\x81\x7a\x65\xb1\x14\xd3\xe6\x6e\x81\x3d\xae\x91\xcb\xa8\x5d\x22\x4e\xf5\x59\xf5\x52\xd9\x97\xca\xbc\x2c\x65\xab\x29\xfd\x86\x4d\xc8\x73\x87\x53\x9e\x5b\xc4\x86\x4f\x8c\xf5\x2a\xcf\x1d\xb6\x2e\xf9\xa4\xa3\x72\xd6\x08\x8b\x57\x6a\x60\x85\xfc\x0b\x3b\xc8\xf9\x08\x0f\x1c\x49\x6d\xb8\xc1\xbe\xa5\x82\x09\x3f\xac\x40\x8b\xf1\x47\x7a\x3e\xb3\xbb\xed\xa0\xb7\xa8\x08\x7a\x51\xeb\xaf\xed\xa0\x0f\x65\x9f\x19\xf8\xb7\x6c\x42\x5e\x38\xf4\x7f\x30\x62\xaa\xa8\x56\xb1\xcf\xa0\x99\xcc\x65\xef\x40\x77\xbb\x03\xaa\x4c\xc5\xa7\xba\xbe\x70\x95\xc5\x3f\xd5\x8b\x9f\x9e\x39\x64\x2b\x2b\x3d\xa4\xcf\x9d\x92\x06\xee\xc7\x46\x15\xe8\xf4\x6c\x80\x73\x40\x1b\xed\xc4\x70\x3c\x68\xa6\x4d\x2f\x58\x74\xb8\x3a\xa1\x48\xe3\x95\x38\xfb\x60\x74\x5c\x0a\x4f\x18\xd1\x0d\xcc\x46\xac\x95\x42\xc5\xc5\xdd\x6e\x8b\x7a\x05\x80\xdd\x4c\x33\x5b\xcd\x6d\x55\x0d\x88\x7a\x55\x99\xa9\x2a\x5a\xaa\xc7\x28\xd4\x45\x4d\x7c\xa9\xa6\x76\x3b\x5b\x55\x1d\x64\x2c\xf3\x43\xca\x6d\xa5\x37\xf5\x4a\x21\xab\x57\xcc\x4d\xc5\x62\x45\xc5\x46\x13\x2f\xaa\x8e\x56\x57\xdd\x6e\xf3\xf5\xf5\x03\x67\xdc\x0f\x69\x64\xa9\xb8\x5e\xa6\x02\x78\x9d\x92\xa8\x31\xfb\x35\x54\x46\xcf\x07\x62\x98\xc2\x4f\x13\xa5\xd7\x89\x18\x94\xe6\x28\xca\x17\xf8\x1f\xfc\x5a\x93\x47\x3f\x89\x8d\xcd\x0c\xa4\xcb\x97\x8c\xb1\x89\x1e\xf6\x02\xf3\x70\xad\x51\x26\x63\x05\xeb\x04\x95\xec\x18\x1d\x0c\x9e\xad\x95\x86\xb2\xbb\x41\x4f\x90\xbf\x60\xe9\xd7\xeb\x4b\xdf\xdb\x54\xfa\x9e\x9a\xf7\xf0\xf3\x6b\xae\x2f\xfc\x69\x32\x5b\xaf\xab\xfc\xbb\x5c\x85\xe7\xdf\x99\x2c\x5a\xde\x33\x4b\xed\x70\x4a\xfa\x7d\x1a\xf4\x0e\x55\xbb\x2d\x0f\x7b\xf3\xb9\x32\xab\x67\xef\x50\x0e\x55\x47\x06\xb9\xb6\x89\x95\x71\xcd\xe5\x0e\x45\x11\xf4\x9e\xe1\x9b\x48\xc4\x13\xf8\x68\x9f\xc7\x93\x24\x51\xf0\xc8\xfe\x50\x49\x26\x47\xf0\xdd\xfe\x98\x24\xe7\x83\x75\xcd\x69\xb7\x37\x35\x76\x3e\xdf\xf4\x75\x8b\x31\xa3\x5c\x19\x7a\xde\xb1\x4d\x63\x35\xf8\x5b\x1f\x7f\x4e\x97\xb6\xab\x02\x67\xca\x8f\x2e\xb8\x7a\x9c\x8c\xc4\x91\x26\x19\x1d\xf0\xc3\xfd\xfd\x9d\x87\x07\xf3\xf9\xfe\xc1\x6e\xff\xe1\x21\x1f\x12\x57\xe3\x06\xa3\x82\x07\xee\xab\x8e\x3a\xcd\x3a\x7d\xfc\xc2\x76\xe8\xa2\x54\xa1\xbe\x25\xb1\x24\x9e\x47\x37\x1a\x36\xa7\x67\x50\xd3\x8d\xad\x0d\x52\x92\x66\x54\x9c\x68\x89\xc2\xac\xd3\x81\xa8\x4e\x65\x34\x9f\x13\xde\xb1\x05\x0c\x85\x20\x09\xa7\x46\x14\xe0\xcc\xe6\x25\x59\xda\x21\x6b\xf0\xb7\xec\xa2\x82\x26\x6d\x69\xd2\x3f\x4d\x93\x2e\x69\xb2\xd6\x90\x59\xcb\x16\x95\x36\x8e\xa3\xff\x1b\xfb\x19\x5a\x8c\x49\x95\xd3\x91\x31\x34\xaa\x78\x9d\x0e\x41\x07\xb6\x8e\x8c\xf1\x7f\xb2\xfd\x83\xdd\x9d\x5e\xbb\xbd\x7f\x7f\x77\x6f\xf7\x9f\x8c\x0f\xf5\x69\xb7\x2b\xce\x3a\x59\x90\xd5\x29\x80\xdf\xd7\xf1\x9e\xf2\xd3\xe9\x24\x36\x52\x6b\x41\xe1\x8f\xf5\x50\xd8\xa7\x08\x24\x25\xfb\x49\x6b\xe9\x27\xb8\xd6\x2e\xc4\x77\xb9\x01\x65\xd6\xe2\xac\xce\x0b\x9a\xa2\x62\x4e\x04\xcb\x9a\xcd\xcd\x86\xea\xb4\xdb\xd5\x67\x1d\x11\x54\xfa\x71\x6f\x51\x28\xca\x79\xbf\x2b\xc9\xfe\x65\x64\x6c\xfd\x3c\x1d\xfd\x45\x49\x10\x05\x2d\xd7\xe9\xe7\x5b\xff\xa1\xfc\x58\x8e\xc4\xcd\xdb\xb1\xed\x5d\xb1\x0e\xd4\x08\xc2\x06\x6c\xb6\x16\xb6\xd0\x73\x0e\xcb\x16\x1a\xed\x7b\xc2\x53\xfd\xa2\x44\xc0\xca\x6f\xdd\x02\x7c\x41\x81\x2f\xe3\xb4\x5d\x55\xaa\x4e\xf1\x98\xe8\xc3\x7e\xa1\xed\x7d\x76\x14\xbb\x1e\xa0\x1a\xd2\xed\x1f\x12\xe1\xd2\x8a\xd6\x59\xa1\x7d\x08\x0a\xa2\xc3\x74\x5d\xe7\xc0\x91\x8a\xd6\x35\xc7\xa8\x7a\x3d\x18\x15\xba\xde\x3a\x51\x69\xc0\xfa\x20\x2a\xb0\xca\xd3\xba\x04\xb7\x0b\xe3\x40\xc2\x79\xa1\x3a\x8e\x37\x55\xbd\x87\x4a\xf7\x45\x20\x17\x39\xa1\xe1\xda\x7e\xc7\x9f\xa7\xea\xcc\x8c\x4e\xba\x61\x9e\xe4\x70\xa0\x11\x72\x22\x57\x2b\x77\x4d\x60\x10\x67\xeb\xf5\xb3\x65\x60\xc8\xce\x36\x69\x55\xab\x0a\x00\xc7\x22\xd9\xca\x22\x8e\x2f\xb3\x51\x08\x22\x2c\xc6\xd7\x14\x73\x9c\x96\x4b\x05\x21\xc1\xa2\xc9\xda\xa2\x8e\x6b\x72\x45\x61\x88\xcf\x56\xad\x3e\x5a\xdd\x16\x85\xae\xcd\xab\x97\xc7\x6f\xdf\xf8\x53\xae\x52\x81\x9a\x59\xc4\x75\x74\xe1\x38\xb3\xaf\x34\x99\x91\x0b\x0d\xde\xc9\x45\x9c\xb6\xe2\xb4\x25\x13\xdd\xba\xe6\x93\x78\xd4\x32\x25\xb7\x5a\x5e\x47\xfa\x57\x22\x4d\xf9\xb9\x00\x83\xc0\x28\x47\x23\xc3\x05\xd7\xd2\x61\xb3\xeb\xbc\xf6\x74\x16\x23\x7e\x7f\x9b\xde\x45\x3c\x15\xad\xdd\x20\x77\x10\x84\x49\x32\x11\xdc\xf1\x0f\xa8\xe1\xcc\x28\x8b\xc1\x85\x24\x1e\x6f\x3d\x7a\xfb\xf6\x95\x67\xb4\x3e\x2c\xb5\x53\x94\x92\xd9\x55\x28\x54\x65\xa5\xab\x21\x82\xcb\xd6\x8b\x37\x27\x06\x3c\x20\xea\x90\x75\x77\xfa\x7b\xf7\xf7\x1e\xec\x1e\xec\xdd\x9f\xcf\xab\xe7\x43\xa6\xe6\x73\xd2\x9b\x2b\x6a\x34\x11\xda\x6e\x93\xad\x38\x7d\x16\xcb\x58\x9b\xae\x98\xcf\xd5\xbf\xf7\x69\x13\x1d\x92\x64\x69\xd8\x6b\xd0\xb0\x86\xf0\x67\xaf\xde\x1e\x9d\x54\x94\x1f\x14\xa5\x9a\x76\x63\x51\x4a\xb5\x62\x99\x6a\x2e\x23\xf3\xf2\x18\x81\xf0\x4b\xc7\xf3\x0a\x94\xc7\x27\x1f\x5e\xbc\xf9\xb5\xc2\xf9\x30\x28\x64\x5b\xee\x74\x31\x05\xa4\x1f\x59\x78\xf3\xb2\x82\xdd\x2f\x60\x9d\x96\xdc\x2f\xde\xa1\x96\xe4\xc7\xa9\xd5\x96\x14\x1d\x6e\x4b\xeb\xba\x80\x0f\x45\xdd\xaf\x5e\x1c\x3b\xad\x79\xf0\xd7\x25\xaf\x64\x5e\x54\xb6\x8e\x3e\x7c\x38\xfa\xa3\x2a\xdc\xef\x05\x85\xfc\x1c\xad\x74\x28\xa9\xca\x8d\x34\x9f\x6f\x15\x26\x7a\x21\x5e\x73\xa4\x6f\x1f\xbd\x7c\xfa\xf8\xa4\x35\x8b\xf5\x45\x8b\xb7\xc6\xb1\x98\x8c\x5a\x92\x5f\x89\x51\xeb\x7f\x7a\x1d\xdd\xf1\xfe\x27\x56\x68\xa5\xf0\x75\x4e\xd4\xa9\xae\x5c\x9c\xb1\x20\x82\x0e\x45\x80\x8c\x3e\xd5\x66\x06\xa1\xd5\x63\x49\xec\x07\x86\x3c\x81\x2b\x5c\xb3\x8d\x0d\x42\xaa\xd6\xc5\x63\xa2\xca\x55\x46\xd7\xc0\x5a\xaf\xde\xbe\xf9\xf5\xe9\x87\x16\x47\x5c\xad\x37\x42\x8c\x5a\xb8\x18\xb4\x90\xd8\x56\x98\xe9\x56\x22\x27\xb7\xad\x54\x88\x96\xd7\x29\xd0\x74\xbc\x96\x90\x5a\xc5\x22\xc5\x0a\x7e\xa2\x25\xe7\xcd\x96\xec\x04\x7f\xd9\xc5\x7f\xd1\x40\xdb\xd3\x65\x77\x66\xc0\x99\x5d\xe2\x32\x3b\x30\xd8\xec\x0b\x9e\xbe\x9d\xc9\x77\x2a\x99\x0a\xa5\x6f\x49\x46\xe9\x9d\x43\x6d\x76\x66\x95\x05\x24\x95\xba\x22\x66\xaa\x21\xcb\xe9\xe5\xec\x05\xf9\x4a\xec\x2f\xa8\x94\xd7\x99\x26\x2f\x34\xa9\x1a\xb4\x1b\x54\xc6\xaf\xf4\xc7\x90\x30\xe9\x9f\x43\xcc\x7a\x83\xf8\x30\x29\x57\xe4\x4e\x27\x27\x20\x39\x8d\xcf\xf2\xc1\xa9\x57\x2f\x06\x11\x8b\x88\xa9\xcc\xa9\x29\x2a\x6a\xd9\x0b\x2a\xf2\x1b\x3d\x8d\xaf\x2f\xb0\xa4\x11\x0d\x22\x2f\xb1\x5f\xd2\x35\x66\x9f\x21\x34\x54\x0d\x42\x3f\x1c\x84\x2c\xf4\xc3\x9c\x98\xd0\xfa\x74\xe2\x31\x69\x90\x32\x66\x2f\x0c\x42\x18\x97\xc4\x5c\x69\x72\x8b\x2d\x1f\xd3\xb2\xe9\x41\x43\x38\x5b\x17\x51\xfe\xb5\xe7\xcc\x70\x69\x5a\x55\xf9\x6d\xb6\x37\xbb\xe6\x57\x6e\x0e\xdc\xd9\x1e\xb6\x02\x1c\xf7\x06\xf2\x1e\x8c\xea\x03\x78\xae\xcd\xb2\x83\x03\x88\xfb\x09\x91\xcf\x9d\xfe\x34\x56\x82\xe3\xd3\xbe\x72\xb7\x50\x67\x24\x11\x50\x92\xb1\x62\x43\xd5\x6e\x3c\x55\xa5\x2f\xea\x9a\x45\xb9\x44\x3d\xbd\x99\x8a\x48\xc7\xf2\xdc\x2c\x4a\xb8\x18\x55\x7e\x79\x59\x7a\xec\x96\x3d\xd9\xd2\xdf\x36\x2b\x40\xe9\xc2\xdd\xea\x0f\x96\xd6\xa9\x5e\x50\xef\x7a\xe9\x73\x83\xc7\xe7\x83\x7c\x19\xcb\xd7\xa5\x7c\x69\xc8\x65\x7d\x4d\xe4\x6e\xf5\x9a\xe2\xda\x8f\x10\x47\x54\x88\xe1\x5c\xa6\x16\x13\x36\x07\x9b\xca\xd2\x7f\x5c\x0a\xce\x12\xc3\x08\x31\x8c\xda\xed\x65\x28\x87\x56\x81\x50\x62\x15\xd4\x6e\x05\x35\x46\xa8\x71\xbb\x7d\x6e\xa0\xce\x41\xf9\xe7\xd5\x34\x28\xa1\x2e\x10\xea\x62\x15\xae\x72\x71\x71\x10\x38\xec\x77\xbe\x5e\x6b\xde\xaa\x54\xee\x6a\x10\x1c\xf5\x79\x20\x0e\x35\x6e\x64\x1a\xe6\x33\x15\xe3\xa6\xda\xa9\x38\x5b\xe7\xfd\x9f\xad\x55\x44\x51\xe1\xb1\xab\x6f\x3c\xbe\x25\x0a\x8c\x00\x04\x49\x3b\x9e\xe7\x2a\xc6\xb7\x2e\x07\x4a\xc4\x79\xb3\xc9\xbc\xb3\x1b\x99\x3a\xd7\x83\x2f\x25\x33\x68\x2b\x74\x47\x0e\xba\xbb\xed\xa0\x07\xdc\x28\xcd\xe5\xe7\xe3\xfa\xe7\x7e\xe3\xf3\x49\xfd\xf3\x0e\x84\x81\x84\x28\x30\x55\x58\x2d\xfd\xe9\x06\x2d\x7d\x17\xa1\x47\xa8\xf8\xc3\x97\x0d\x80\x7b\x0e\x20\xb6\xe2\x9b\x74\x7d\xf2\x8f\x91\x08\x89\xae\x67\x10\xc1\x37\xd9\xe9\xe4\xa6\x02\xf6\xe0\x45\x70\x7a\xb6\x28\x24\xe4\x67\x03\x0b\xb2\x6a\xc1\x57\x77\xc6\x9f\x48\xe2\x4e\x73\x49\x8e\x24\x79\x6c\x00\x28\x75\xe7\xf9\xcb\x9c\x40\xe9\x5f\x58\x03\x49\x51\x40\xc4\xd8\xe4\x57\xb5\x96\xb8\x63\xd1\x40\xff\xd2\x7e\x05\x5b\x0d\x56\x61\x9b\xf7\x46\xb2\xad\x3e\x3c\x97\xc6\x32\x2b\x2b\xc5\x0a\x8c\x9c\x78\x2e\x73\x4f\x36\x85\xad\x37\xb9\xbf\xdb\x94\xe8\x0d\x24\x7b\x2e\xfd\xf4\x22\x1e\x6b\x42\x07\x74\xcb\x8d\x0a\xc1\x1d\x1d\xe5\x8f\x73\x8b\x59\x9a\xf9\xe4\x6f\x1b\x16\xef\xd9\x7d\xb1\xbe\xf9\xa7\x84\x3b\x37\xb6\xe7\x39\x8a\x1f\x39\xa0\xca\x3f\x67\xe6\x67\x8c\x22\xd6\x4c\x1e\xdb\x20\x83\x10\x3f\x84\xc4\xa0\x33\xcb\x4d\x01\xb9\x10\x93\x54\x18\x6a\x31\x78\xa4\xdc\x67\xf0\xc7\x7e\x84\x55\x87\xb5\x9e\x30\x78\xa4\xe9\x42\x74\x41\xc4\x63\xb2\x6f\xa9\xc9\xc9\x53\xfe\x45\x7d\x0e\xe6\x15\x8f\xb1\xe2\x8b\xa2\xc9\x14\x2b\x6d\x19\x1a\x0c\x77\xa1\x13\xb2\x17\xf4\x8d\x29\x68\x40\x21\x0e\x94\x7f\xbe\x80\xa2\xec\x68\xb1\x58\x10\x49\x07\xd8\xdb\x8b\xc5\x06\x6b\xee\x85\x19\x28\x01\xd2\x8f\x9e\x98\x3f\x0f\xcd\x9f\xbd\x6a\x41\x58\x8e\xb9\xa1\x77\x8b\x45\x6d\x07\xef\x45\xc3\x90\xb3\x6b\xd7\x8c\x8c\x24\x48\x50\x43\xe5\x8f\x27\xfc\x3c\x0d\xae\x93\x78\xd4\xea\xd1\x01\xae\x62\xf3\xf9\x94\xe4\x6e\xd1\x84\xdd\x2d\x20\x66\x24\x62\x9a\xe0\x52\x66\x56\x62\xc6\x49\x08\xb1\x59\x14\x57\xd8\xfe\x20\x50\x4a\x09\xa3\x01\xbd\x95\x85\x77\xea\xad\x11\x4f\x83\xcc\xe7\xed\x36\x21\x9a\xe9\xf9\xfc\x6e\x41\x4f\xc5\x19\xcb\x7c\x4e\xd0\x4c\x02\x03\xb1\x02\xa1\x60\x77\xe7\x68\x51\x5b\x12\x17\x90\x31\xe9\x47\xc0\x8d\x8e\x0c\x46\xcf\x11\xa8\xe7\x8c\xcb\xed\x29\xff\x82\x3d\x96\x64\x46\x9e\xca\xb2\xa3\x5a\x6e\xc8\x12\x7e\x91\x70\xb7\x1d\xec\x43\x18\xb8\xcc\x60\xf7\x6e\xa4\xcf\x6b\xee\x64\x7f\x7b\x78\x4b\x38\x08\x14\x6e\x41\xd4\x6e\x27\xc3\x1b\x8c\xe9\x53\x7e\x0c\xca\xff\x66\xde\xde\xe2\x8b\x68\xa8\x7c\x33\xd4\xe6\x95\x19\x06\x90\x7e\x48\xe9\x82\xb8\xfe\x35\xbd\x20\x09\x84\xce\x00\x85\xb6\xa9\x66\x4c\x04\x48\xd3\xad\x63\x12\x1b\x5d\x01\x14\x85\x5f\x25\x49\x20\xf2\x43\xc8\x48\x4c\x4b\x1c\xf5\xb7\xc0\x87\x77\xd3\x44\xe9\x34\xe0\x8b\xe0\x2e\xdf\xdd\x92\xec\x6e\x81\x03\xf8\xe1\x67\x65\x82\xf2\xcf\x49\x53\x24\xac\x59\x2f\x66\xe4\x95\x04\xe9\x5f\x40\x2e\xb6\x55\x9d\xe5\x3e\x6d\x8e\x06\x43\x61\x7e\x19\x28\x98\x18\x81\x5e\xc9\xb6\x1f\x4d\x89\x7e\x65\xbe\x9b\x36\x3c\xd9\x28\xca\x65\x20\x21\x69\xf8\x70\x7e\x2d\x17\x23\x64\x21\xc8\x8a\x9d\x4e\x64\xcb\x67\x92\x6c\xf5\x40\x41\x86\x0b\x1d\x05\xf3\xbb\x0f\xba\xfc\x2d\xe9\xcb\x7c\x3d\xbd\xdb\x0e\xbc\xf1\x8d\x07\x3c\xc8\x4e\xc5\xd9\x7c\x7e\x17\x07\x9f\xe1\x5b\xf0\xb9\x16\xb5\xf6\xcc\x99\xb7\xb9\x96\xa4\x4a\x2d\xa9\x1f\xd8\x09\xa0\xfc\x4b\xe0\x8c\x70\x96\x41\xc2\x04\xcc\x88\x1c\xbe\x95\xa7\xfc\xcc\x17\x81\xfd\x77\x5c\xd3\xf3\xaa\xad\xc4\x64\xa0\x70\xbb\xea\x3b\x35\xa2\x73\x6a\xe4\x46\xb9\x04\x1b\x1d\xb1\xda\x8e\x32\x13\x84\xe8\xd3\xec\xcc\x54\xc3\x21\x63\x24\x43\x67\x33\x75\xe8\x06\x39\xcc\xfc\x98\xbd\x20\x1c\x32\x3f\xa6\x41\xe6\x7f\xcb\x7f\x7c\xa3\x90\xd1\xd2\x99\x50\x19\x12\xca\xbf\x1a\x44\x7e\x68\x4c\x02\x3f\xa4\xd8\x56\xc3\x9c\xa6\xb5\x79\xc5\x83\x9a\xdb\x02\xc9\xc8\xfb\xc4\x4f\x40\xc3\xdd\x34\x50\xbe\x84\xef\x81\x58\xd8\x65\x8a\x43\x52\x75\xde\x6b\x6c\xee\x5b\x79\x2a\xcf\xda\xed\x29\xd9\x75\xfa\xf5\x7d\x9d\xeb\x10\x12\x10\x92\xdd\x89\xe0\xa3\x04\x15\x28\xe0\xc1\x23\xb9\x80\x4f\xe5\x1a\xf8\x71\xad\x96\x53\x0b\x5b\x79\x54\x4e\x78\x0d\x11\x3b\x3d\x83\x84\x21\x66\x5f\x19\x69\xa7\x59\x0f\x1a\xd3\xc3\x0e\x46\x2a\xf4\x49\x7c\x25\x92\xcc\x91\xd9\xc5\x6a\x4d\xe9\x02\x74\x39\x18\xce\xe7\x68\x22\xb8\x2a\x8a\x29\xf4\x07\x15\x50\xb6\xce\x90\xc5\xb6\x5d\x7e\xb4\xc6\xef\x3f\x50\xc5\xa6\x25\xad\x54\xc0\x08\x32\x96\x10\x85\x36\xa1\x35\x4f\x0a\xfd\x91\x63\x58\x14\x3f\x23\x55\xa0\x5c\xbc\xa0\x70\x97\x66\x61\x1a\xa9\x38\x14\x35\xb1\x17\x15\xab\xfa\x02\x32\xb9\x1a\x84\x48\xb3\x04\x44\xb9\xc3\x9e\x52\xc7\xb5\x4c\x0f\x7b\xf3\x79\x84\x1b\x03\xe8\xcb\xef\xd3\x85\x9d\xb5\xdf\xe5\x60\x8d\xe4\x59\x65\xd0\xe0\x5e\x28\x2d\xd4\xac\x77\x92\x79\x99\x1c\x89\x71\x2c\xc5\xa8\xb2\xcd\x47\x49\x94\x5d\x09\xa9\x87\xc5\x43\x70\xe7\xec\xf8\xff\x56\x2a\x47\x7c\x3a\x15\x72\xf4\xf8\x22\x9e\x8c\x4c\x87\xaf\x5a\x60\x05\x13\xbe\x4c\x46\xa2\x5a\x36\xa6\x5c\x09\xa9\xdf\x24\x23\xe1\x2b\x31\x9d\xf0\x48\x58\x04\xdb\x8a\x48\x77\xc9\x5d\x50\x10\x14\xee\x6a\xf2\xe6\xf7\x95\xba\xac\x69\xc9\x1f\x35\x7e\x74\xdd\xa2\x7f\xb1\x09\xd6\x73\xc6\xfc\xae\x90\x21\x7c\x20\x3a\x2c\xf3\xc3\xf9\xbc\x07\xf9\x5e\x56\x56\x6d\xb1\x75\xaa\x5d\x2a\x14\xb2\x51\x10\xc1\x28\x18\x29\x8c\x7f\x0c\x34\x8c\x03\x0e\x61\x20\x50\x43\x20\xf9\x8a\x0f\x52\xfd\x77\x10\xf8\x73\x24\xee\xfc\x14\x89\x76\x67\x46\x6d\xd2\xd2\xbf\x05\x12\x97\x94\x30\xe8\x77\x88\xc2\xca\x69\x6d\x80\xb4\x6a\x94\xd9\x37\xcb\x0f\x5c\x05\x0a\x2e\x0b\xcd\x62\xb1\x46\x70\x68\x45\x4e\x25\xa8\xb3\x15\x7a\x97\xd5\x1b\x73\xa6\x15\x6a\x83\x31\x64\x71\x80\x5e\x85\xa5\x08\x7b\x5e\xa0\x3b\x5d\xb1\x0d\x0a\x61\x89\x07\xc4\x2a\x4c\x55\x38\x34\xe2\xe2\x8a\x91\x8d\x1b\x00\x0e\x3a\xc8\x56\x21\x74\xc3\xa4\x17\x3f\xb1\x41\x50\x43\x08\x7c\x15\xca\x7a\xe4\xf4\xe2\xa7\xb6\x10\x1a\x68\x21\x5a\x85\xb8\x19\x4b\xbd\xf8\xc9\x6d\x86\x25\xe4\x90\xac\x42\xbf\x1c\x5c\xbd\xf8\xe9\xcd\x88\x15\x55\x40\xbc\xaa\x92\x55\xc1\xd6\x8b\xf5\x91\x1b\x46\x3f\xe1\x3d\xcf\xd1\x81\x28\x44\x1b\x66\x8a\xc7\xfb\x2e\x30\x24\x1b\x61\x77\x6a\xb0\xf1\x46\xd8\x5d\x17\x76\xb0\x6e\x1e\x20\xe8\x9e\x01\x55\x90\x04\x77\x63\x2c\xa1\x17\xb5\xa9\x3a\x56\x95\x2c\xf5\xcc\x5a\x34\xd5\x9e\x31\xa8\xbc\xa9\x17\xc8\x35\x73\xd4\x74\x02\x9a\x6b\xdb\xc3\x19\xe1\x0a\x8c\xc2\x41\x34\x93\x20\xd9\x44\xe0\xfe\x62\x42\x8d\xc0\x11\xfe\xb6\x11\xcd\xc3\x5b\x12\x0a\x90\x87\xbb\xc3\x54\x05\x13\x05\xa9\x30\xaa\xaf\xf0\x39\x0d\x66\x64\x2c\x72\x3f\xf1\x82\xd2\x20\x8f\x4f\x03\x51\xec\xe6\x29\x48\xd7\xf5\x43\xeb\x2b\x91\x76\x39\x36\x22\xd1\x8c\xd9\xda\x1e\x8b\x5e\x05\x06\x34\x7a\x45\x81\x3f\x0a\x94\xcf\x1f\x01\xbf\x36\xff\x5e\xd7\xba\x02\xe5\xa2\xa3\x0b\xde\x2d\x9c\xb0\xb2\xd2\x69\xc4\x41\x30\xed\x6f\x43\xc6\xb4\x2f\x31\x04\x20\x19\x98\xc1\xdb\x62\x4c\x0c\x89\x66\x0a\x55\x57\x62\xfe\x61\x66\xf5\x32\x83\xc5\x18\x13\xed\xb6\x17\x4d\x78\x9a\x9a\x1f\xd9\xf0\x5a\x11\x6d\x4f\x2b\xa0\x0a\xc9\x69\x60\xbf\xbe\xe1\x57\xa2\x84\x50\x16\x42\x21\xc4\x62\x39\x0c\xee\x5a\xd5\xf4\x6e\x26\x4f\xd5\xd9\xc0\xfc\x61\x62\x28\x3a\x5e\xcb\xeb\xe8\xc0\x39\xaf\xb6\xad\xea\xee\xaf\xed\xc2\x02\x2f\xb7\x08\x0c\x84\x7f\x89\x11\x9e\x97\x4c\xfa\x57\x18\x7f\x4c\x0b\xef\x41\x09\xf6\x4e\xfa\x91\x12\x5c\x8b\x13\x71\x83\x4b\xb8\x8d\xb6\x8b\xc7\x64\x0f\xc1\x1c\xef\xae\xf4\x2f\xd1\x84\xfc\x36\x30\x9f\x84\xbf\x3d\xa0\x4b\x7b\x00\xd9\x30\x63\xa7\x19\x08\xff\xdb\x59\x50\xec\x44\x1b\x05\xd9\x28\x0d\x97\x03\x1b\xf7\x71\xf7\x2d\xc8\x60\x1a\xa8\xc2\xc1\x43\x22\xb6\xad\x88\x00\x63\x23\x8b\xc9\xd5\x57\x71\x2d\xa4\xfe\x6a\x54\x8c\xaf\x4a\x8c\x19\x87\x68\x11\x8f\xc9\xae\x4b\xf5\x95\x22\xc6\x80\xbd\x20\xd2\x3f\xa7\xa0\x40\xfa\x23\x0a\xd1\xa0\x74\xe0\x0f\xcb\x66\x3d\x9d\x08\xa3\xee\xbc\x39\x26\xd2\x1f\x03\x6e\x64\x35\xbf\xe1\xf6\xd6\xe0\xbb\x6c\xb7\x3d\x6e\xe6\x8b\x1f\xb5\xdb\x91\xcf\x47\xa3\xa7\x86\x90\x57\x71\xaa\x85\x14\x8a\x78\xd1\x24\x8e\x2e\x3d\xf8\x2e\x49\x44\x29\x18\x12\xf2\x9a\x4b\xe7\x62\x82\x46\xf5\x8a\x6d\x83\xdf\x24\x89\x60\x5b\x91\xbe\x69\xc4\x30\x39\x8d\xcf\x02\xf3\x07\x37\x02\x4a\x45\x33\x72\x7c\xda\x6a\xc9\xb9\x6e\xcc\x2f\xed\x86\xac\x0c\x8c\x48\x32\x03\x31\x5c\xe9\x4b\x60\xd2\x4f\xf5\xed\x44\xac\x8c\x48\x5d\x10\x09\x19\x0d\xf2\xc9\x5f\xc7\xe0\xda\x7e\xd2\x0c\xc8\xb3\x14\xb9\x08\x9f\xcc\x34\xa8\xcc\x41\x5d\x85\xf2\x88\x33\x88\x98\x31\xf5\x0c\xeb\x70\x74\x03\x45\xf6\xaf\xff\xdd\xdf\x66\x8c\x71\x34\xec\xfc\xef\x8c\x0f\xa2\x44\xea\x58\x66\x62\x21\x7d\x25\xae\x92\x6b\x51\xef\x68\x61\x56\xa0\xa8\x72\x68\xc4\x60\xa6\xb2\x73\xee\xa7\xb0\x29\xc6\xfe\x77\xd0\xec\x1a\x45\x07\xc8\x62\x0b\x44\x53\xa7\xd7\x20\x33\x62\x4c\x51\x50\x4c\xfb\x1c\x38\xcb\x86\xd9\xe1\xee\x50\xf9\x3c\x30\x42\x24\x50\xa0\x59\xdf\x4c\x51\xe5\x87\xc1\x2e\x63\x59\xbb\x8d\x32\x25\x62\x44\xb7\xdb\xa6\x0b\x93\xe9\x3b\x95\x4c\xf9\x39\xb7\xcb\x0d\x90\x9d\x25\xf0\x6b\x6a\x40\xa7\x0a\x19\xf7\x89\x18\xf3\x6c\xa2\x09\x85\x98\x0e\x04\x8b\xfc\x6f\x03\x1b\xdc\xbb\x1c\xb5\x2e\x28\x67\x82\x70\x3a\x40\x1f\x58\xc5\x44\xa5\x35\x92\x74\xbb\x03\x03\x73\x9a\x9c\x19\x30\x63\x47\x4c\x17\x11\xe1\xe8\x25\x29\xd6\x6e\xff\x3b\x93\x30\x5e\x10\x05\x9c\x82\x5c\xe6\x5b\x01\x11\x84\xaa\xdd\xbe\x9b\xf2\x34\x8d\xaf\x45\x30\x31\x75\x1e\xee\x18\xed\xc1\x08\xb6\xc8\xba\xe0\xd6\x8f\x85\x05\x2b\x54\x3d\x64\x11\xe4\x9d\xdd\x55\xdc\x57\xaa\xba\x96\xe3\x9c\x58\x9f\x81\x18\x4a\x3f\x15\xfa\x48\x6b\x15\x87\x99\x16\xc4\x1e\x31\xcb\xeb\x75\x5e\xd3\x45\xc9\x9f\x7b\x7f\xaf\x0e\xc8\x98\xf0\xc7\x28\x6d\x92\xa5\xfa\xde\x1c\x93\x0c\x56\xd7\x69\x3f\x55\xf5\x5e\xf3\x49\x26\x4a\x51\x7f\x21\xa2\x4b\x31\xca\x7f\xa2\xb3\x8d\xb1\xcc\xcc\x09\x74\xc3\xd1\xc5\x42\xab\xdb\xbb\x59\x2c\x47\xc9\x6c\x85\xd8\xd0\x9e\xdd\x15\x78\x8b\xa2\xd2\xb7\xa6\x59\xb9\xa9\x79\xb7\x00\x2f\x1f\x18\x0f\xee\xce\x85\x0e\x1c\xd5\x26\x54\x6c\xab\x67\x54\x93\x2a\x94\xc2\xd9\xb9\xaa\x2d\x01\xa7\x65\x94\xf9\x79\x2e\x3b\xa0\x47\xdd\x13\xce\x53\xe5\x9a\x70\x77\xdb\x81\x02\x15\x68\x48\x03\x01\x3a\xd7\xe3\x21\x2b\x14\xfa\xd2\x51\x52\x05\x13\x39\x5b\x2f\xaa\x76\xde\x03\x63\x2f\x0b\xc1\x24\x8d\x9a\x60\xb4\x09\x33\x19\xb3\x2d\xc6\xac\x28\xe8\x6f\x61\x8f\xed\xe0\x0b\xd7\xdb\x31\x35\x6b\x67\x0f\x04\x6e\x88\xb2\xd5\x7e\x1c\x23\x53\x7f\xf2\x30\x93\x59\x5e\xcb\x23\x69\xb9\x25\x27\x7d\x63\x28\x49\x7f\x04\x22\x10\x30\x0e\xcc\x3a\x10\x06\xd2\x0f\x17\x0b\x23\x18\x38\xeb\x2f\x72\xdf\x13\xcf\x3d\x4f\xfb\xb5\xdd\xe0\x09\x24\xa6\x72\x88\x59\x54\xee\x2b\xb2\x98\x31\x56\x4a\xf8\x71\xbb\x1d\x9b\x99\x3a\x66\xd1\x69\x6c\x98\xc3\xc8\x76\xd3\x01\x63\xb7\xad\x44\xe1\x42\x7c\x49\x07\xe6\x41\x99\x15\xd9\x2a\x46\x8d\xb1\xf3\x2f\x41\xf9\x97\x10\x9a\xf1\xc3\x72\xbd\xc3\xb0\x8c\x2e\xc3\xfe\xea\x83\x80\x90\x96\xa1\x23\x05\xb1\xa9\x59\x9b\x61\xc2\x94\xff\x0d\x46\x6c\xab\x0f\xd7\xa6\x3a\x5c\xac\xaf\xcd\x62\x3d\x62\x5b\x3d\x58\x5a\xb1\xd3\x61\xca\x4e\x53\xb8\x36\x2b\x76\x9a\x87\x6f\x9b\x15\xfb\x9a\x5d\xfb\x97\xe5\xca\xb6\xcd\x54\x8e\x6a\x7b\x3d\xaa\xc9\x70\xc2\x4e\x27\xb0\x6d\x50\x4d\x2c\xaa\x6d\x83\x6a\x9b\x6d\xfb\x97\x45\x13\x47\xed\x76\x9a\x37\x67\x8b\xb1\x49\xfe\x38\x6c\x72\x43\x40\xc8\x68\xdd\xb4\x67\xbd\x81\x3e\xac\xce\x18\xd8\x9d\x3c\x79\xaa\xcf\x0c\x27\x9e\xea\xb3\x15\xdb\x78\x24\x85\x09\x0d\x52\xc6\xd8\x84\xce\xe7\x58\xcf\x0e\x08\x98\xd8\x2e\x36\xfd\x7e\x0d\xdb\x86\xa5\x3b\xfd\xa5\xbd\x6f\x1c\x04\xe9\x73\xdc\x57\xe4\xf9\x18\xec\xa2\x1b\x9b\x2f\x6d\xa3\x23\xba\x59\x39\x43\xe0\xa6\x19\x66\xb4\x04\x71\x59\x40\xec\x06\xb8\x7f\x7c\x81\xf5\x5c\xac\x9d\x26\x21\xbb\x35\x5c\x32\x02\x65\x54\x8f\x30\xa7\x67\x0f\x79\x62\x10\x32\xe5\xc7\xd5\x86\xab\xdb\x82\x02\x72\xdf\x72\x8f\xeb\x40\x76\xa8\xc9\xf2\x25\x7d\x50\x6e\x28\x9b\xb5\x2d\xdf\xcd\x1d\x12\xc2\xdd\xda\xa9\x53\x39\x37\xc6\x68\x21\x17\x68\xe0\x50\xec\x9c\x39\x56\x0d\x05\xa3\xb0\xd4\xaa\xd0\x0f\x49\x8d\x5a\xb3\x85\x4b\xab\x51\x4f\x8a\xa7\xdd\xf2\x69\x0f\x9f\x86\x36\x50\x64\x48\x12\x26\x4f\xb3\x33\xca\x18\x23\x36\xcc\x99\xb6\xdb\xb9\xfc\xce\x4b\x14\xf2\xdb\xca\xa0\x5c\xe7\xd1\xed\x36\x21\x11\x4b\xa8\x51\x4e\x48\xc2\x38\xf5\xb7\x71\x1b\x3a\xf2\x39\x24\xf9\x71\x2b\x22\x98\xb0\xfb\x2d\x56\xaf\xaf\xfd\xd6\xc3\x5c\x01\xd3\x43\xcf\x2b\x54\x29\x6d\x2a\xd8\xb5\x6f\xad\x2c\x45\x5b\xcd\x88\xa5\x31\x24\x85\x78\x0d\x96\x4f\xfa\x9c\x66\x67\x06\x8d\x59\x29\x82\xbc\x93\x8b\xa3\x69\xa6\x46\xc8\x4c\x67\x37\x09\xc2\x6e\x8b\xf3\x88\x19\xec\xbd\x1a\xd1\xb1\x11\x88\xb1\x7b\xb6\xb3\x3a\xc4\xed\xc8\xf0\x42\x72\x0b\x94\xdc\x02\x24\xcb\x0a\x41\xa7\x18\x2f\xa6\x99\x3a\x94\x43\x1c\xd4\x03\x10\x70\x77\x1d\x28\x88\x03\x3c\xdc\x10\xc8\x43\x95\xf3\xc1\x7d\xfb\x49\x82\x08\xf8\xa2\x52\x8b\x23\x26\x0f\xd5\x10\x2d\x57\xd6\x1b\x24\x87\xd1\x20\x29\x82\x41\x62\x96\x9d\x26\x67\x83\x73\x45\x62\xe0\xa7\xc9\x19\x68\xe8\x74\x6c\xec\x6a\x8c\xce\x28\x87\x4b\x2f\xd5\xea\x03\x39\xc0\xd9\xdd\xa2\xf0\x45\x5b\x05\xdc\x34\x63\x5c\x0a\x68\x08\x59\x5c\x3c\xa6\xac\x07\x13\xd6\x83\x11\x13\x83\xf4\x70\xdc\x6e\x4f\x0e\xc3\x7c\x83\xf5\x1a\xb6\x19\xb9\x66\xc9\x69\x7a\x46\x7d\x0e\x57\x8c\x3c\x65\xf1\xe9\x04\x7f\x5c\xb0\x6b\x3f\x84\x29\x7b\xea\x87\x46\xb0\x6f\x6f\x31\x76\x65\x4b\x9d\xc3\x0c\x6e\xe1\x06\x2e\xe1\x08\x8e\x4d\xe1\x4e\xff\x0c\x4e\x4c\xc1\x4e\x1f\x17\x81\xe3\x76\x9b\xcc\xd8\xb1\x1f\xc2\x2d\xbb\x32\x6c\x7a\xce\x8e\x0d\x7f\xc1\x49\xbb\x4d\x2e\xd9\x89\x1f\xc2\x11\x33\x1a\x32\xb9\x61\x27\xf8\xe1\xa8\xdd\xbe\xa5\xe7\x8a\x5c\xc0\x25\x64\xd0\xe9\x8c\x28\x1c\x2b\x4c\x36\xb1\x0d\x53\x98\x18\x95\x6c\xd4\x61\x17\xd6\x53\x78\x52\x7c\x99\x59\xc8\x51\x87\xcd\xec\x97\xb4\xc3\x76\x60\xd2\x61\x3b\x56\xbf\x8c\xc7\xe4\x88\x8e\x3a\x9d\x02\xd7\x55\x81\xab\xac\x69\xe4\xe2\x4d\x3b\xac\x5f\x2f\x7d\x4b\xcb\xba\x2e\xca\xba\x72\xe8\x73\x45\x66\x30\x2d\xa8\x5d\xa6\xa1\x3f\x28\x36\x97\xb7\x8e\xe7\xf3\xf3\x2d\xc6\x6e\x68\xa8\x04\xbf\x1c\x34\x71\x36\xa9\x6b\xd4\x71\xb9\xbe\x8e\x9d\x85\xd5\x64\xb1\x3d\x2e\x2d\x65\x8b\x3a\x30\xe9\x74\x16\xb8\x2d\x90\x1e\x8e\x07\x45\x7b\x9c\x41\xb7\xe3\xbc\x5c\xd0\x1e\xaf\xac\x78\xe5\x29\x7c\x61\x5f\xe6\xf3\xd3\xb3\x41\x4e\xaf\xc3\x2b\x4f\xfd\x10\x72\x85\xea\x0b\xc5\x1a\x49\xef\xb0\x98\x52\xf3\x79\xef\x30\x2a\x9f\xbf\x14\x12\xf4\x81\x99\x39\xb3\x20\x83\x9b\x20\x82\xdb\xe0\x4b\xbe\xe1\x73\xa4\x98\xf7\x55\x4c\xae\x7e\x3f\x78\xf4\xca\x49\x6a\x73\xac\x56\x6d\x4d\xe3\xf9\x43\xd3\xc3\x51\xb1\x76\xe4\x87\xc2\xee\x54\x90\xc1\x51\x10\xb1\xbb\x28\xe8\xc1\x8f\x40\x80\x79\x91\x96\xde\xdb\x5c\xcf\x30\xe5\x59\x84\x66\x94\xb1\x53\x23\x3f\xa2\x77\x0d\x0c\x0b\x0a\x91\x1f\xb1\x9d\x7c\x87\xbb\xa6\xb8\x44\xfe\x0f\x10\x90\x40\xe4\x2b\x03\xa5\x58\x66\xd1\x46\x7e\xea\xa7\xec\x6e\x16\x24\x16\xc3\xa2\xa0\xbe\x73\xa4\x0a\x57\x66\x15\x9c\xb2\xbc\x12\x95\xed\xe2\x65\x70\x01\xb7\xa4\x15\x84\x44\x75\x42\x04\x70\xff\x07\x44\x90\xe5\x8b\xfb\x54\x11\x05\x0f\x21\x33\x1d\x1c\xc1\x91\x11\x4d\x8b\x93\x3a\x0d\x36\x0c\xe1\x4e\xb1\x12\xb6\xf0\xa0\x63\xa7\xdc\x45\x41\xdf\xe9\x37\xe5\xae\x9d\x4f\x1d\xa9\xb4\xe5\x6c\x9b\x37\x3c\xa6\x56\xd8\x19\x25\x75\x60\xc3\xf9\x62\x5f\x59\xa6\x32\x6b\x2b\xcf\xd9\x2a\x84\x94\xc5\x56\x79\x36\x43\x90\x0e\x9f\x1a\x7a\xb4\x7f\x09\xb1\x9f\x42\x42\x83\x07\xf8\x96\xc4\xbe\x66\x0a\x62\x3f\x63\x09\xf4\x0e\x89\x91\x6f\xa9\x3f\xa3\xa5\x9a\x68\xab\x0f\xa1\x97\x57\x4f\x83\x87\xcb\x05\x89\xa9\x2b\x35\xcb\x4a\xea\x1f\xf9\x29\x53\x16\xd5\x66\x44\x34\x70\x71\x50\xd8\x22\xa6\x55\x9d\x0e\x6e\x96\x12\x6c\x16\xfd\x67\xc9\x80\x19\x72\xf1\x84\x69\xdb\xa6\x3d\xd4\xbf\x4a\xe1\x3d\x62\x3a\x57\x2a\x47\x56\xa9\x1c\x55\x6a\xa2\xa9\x78\x64\x3b\xb0\xd3\x87\x08\xd4\x0a\xd7\x90\x9d\x23\xd7\x4c\xfb\x62\x50\x28\xa9\xd1\x45\x3c\x19\xbd\x49\x46\x22\x2d\x97\x9f\x2b\xd6\x1b\x5c\x1d\x5e\x17\x0b\xd9\x55\xb1\xf6\x5c\x18\xcb\x9f\x4d\x86\xd7\xa7\x57\x67\x81\xf9\x83\x12\xbe\xd3\xe1\x1d\x62\x27\x3e\x4e\x05\x7e\xc8\xc6\xed\xf6\xf8\x90\x4d\xdb\x6d\x92\x31\x49\xb6\x4f\xaf\xce\xe0\x22\x1f\xdb\x29\x94\x7d\xd0\xe8\x81\xb2\x0b\x06\x9c\x4d\x17\x65\x7f\x14\xb6\x19\xf4\x40\xf9\x21\xb8\x89\x55\xbe\xa8\xa5\x4d\x0b\x74\xd5\x15\x2a\xb2\x0c\x88\xc3\x6c\xf0\xcd\x3c\x6b\x37\x30\xf1\x9b\x5a\xa5\x28\x2b\x57\x51\x6e\xda\xca\x1a\x44\x23\x72\x64\x69\x1f\xbe\xd4\x83\x57\x3a\x89\x98\x74\xb6\xff\x40\xb3\x6d\x64\x58\x3a\xd0\x2b\xc6\x6b\x3e\x27\xab\x5e\x5b\x2f\x53\x73\x6c\x07\xa2\xdd\xd6\x5b\x8c\xc9\x76\xbb\xb1\xad\xa8\x41\x3a\x47\x98\x71\xb7\x3c\x05\xe5\x67\x8d\x58\xfa\xdc\x89\xe6\x67\xe6\x3b\x85\xe6\x66\xbb\x2c\x90\x3e\xe1\x9a\x93\x1e\xc8\x52\xe7\x71\xa0\x4b\xb5\xde\x76\xad\x9f\x36\x95\xf9\x55\xa4\x0f\x57\xbd\xf4\xbf\x31\xe5\xa7\xc1\xaa\x4f\xec\xee\x5b\x60\x9a\x30\x0d\x94\x9f\x2d\x8a\xaa\x0f\x02\xf7\xfc\x54\x9a\xa7\x61\xd1\x7e\x8c\xa1\x8b\x85\x07\xc3\xf6\x88\x74\xd8\xfe\x54\xfb\xd7\x95\xca\x27\x8b\x70\xd0\x4a\x61\x22\x88\x8f\xa2\xba\x57\x2b\x28\x98\x29\x3a\x10\xe5\x5a\x95\xd7\x14\xcb\x54\x28\xfd\x48\x8c\x13\x25\xc8\xb6\x22\x19\xc6\x4b\xfa\x19\x05\xde\xac\xe7\xa1\x31\x61\xb6\xf2\x1a\x68\xe5\x44\x70\x37\x88\x1d\xb2\x4d\x3f\x5b\x01\xae\xfd\x23\xd7\x58\x69\xf5\xb6\xcc\x02\xa4\xd0\xaf\xb6\xb6\x70\xe4\xa7\xcc\xce\x02\x7f\x56\x0e\xd9\x83\x55\xec\x5a\x78\x49\x6c\x47\xd6\xbf\xc4\x63\xd7\xdd\xa0\x59\xe9\x1e\x7e\x92\x6f\x95\x3f\x53\xfc\x1c\xfd\xc4\x65\x2e\x1c\xb7\x7f\x0a\xf5\xf9\x54\x9c\xf9\x47\x83\xdf\xa4\xb1\x2c\x19\x63\x99\x1f\x0d\x33\x3f\x0d\x4c\x7f\xf9\x3f\xb0\xbb\x9c\x48\xa6\x05\xd1\xfe\xad\x3d\xb4\x5f\x36\xa0\xca\x5c\xc1\xb4\x7f\x93\x07\x26\x64\x6e\x60\x42\xbe\xce\x67\xa7\xdc\x68\xba\x91\x7f\x04\x09\xdb\x41\x47\x44\x34\x4c\x6c\x5d\x49\x5e\xd7\xa0\x31\x6c\x09\xd4\x86\x3a\xf2\xd5\x19\x5d\x88\x76\x1b\x77\xfe\x85\x13\x18\x63\xf3\x2a\xd4\x8f\x77\x28\x3f\x25\x92\x0e\x46\xd6\xb3\x19\x4c\x49\xbf\x47\x17\x0b\x92\x61\xba\x10\x86\x53\x94\x48\x26\xca\xf6\x39\xa1\x9a\x8f\x55\x1e\x01\x69\x93\x4b\x19\x96\x3f\xb9\x9d\x8a\x82\x35\x7e\x97\x44\xfa\x5a\xdc\xe8\xc7\x89\xd4\x42\xda\xe3\x7f\xfd\xad\x35\xa0\x9e\x57\x75\x52\x91\x68\x80\x17\x2e\xbc\x14\x9a\xc7\x3b\x9d\xd3\x9d\x8a\xbd\x20\x33\x12\x2b\xc8\x7c\xc9\xaf\x04\x64\x3e\x5a\x88\xb8\x23\x52\x9d\xb8\x97\xbe\xe6\xe7\x6f\xf8\x95\xf0\x75\xf2\x2a\x99\x09\xf5\x98\xa7\x82\x50\x88\xd8\x67\xb4\x2c\xaa\x0e\x04\x51\x79\x7f\xb0\xae\x88\xbd\x20\x8f\x15\x49\x4e\xc5\x19\x85\xa8\xec\xcf\x5b\xf2\x07\x1e\x53\x85\xa8\x16\x4b\xa1\x40\x82\x76\x36\x69\x31\xd4\x10\xf3\x78\x3c\x31\x7f\x1e\x9a\x3f\x4e\xb0\x22\x9e\x66\x2f\x22\xec\x47\x21\x64\x2c\xc2\xee\x01\xce\x1e\x2b\x27\x52\xe5\x55\x2d\xde\xa2\x74\x93\x0b\x9c\x68\xec\xc2\x28\xaa\xca\x8c\xd8\x17\x45\xcc\xda\x65\x56\x0f\x63\xf2\x2d\xaa\x8d\xf8\xaf\xb5\x2d\x74\x4b\xa6\xa8\x93\x29\xd6\x92\x29\x40\x3a\xe1\x0c\x37\xe8\x1a\xbf\xb1\x47\x00\x90\xec\xc8\x4c\x2d\x1d\xeb\x89\x80\xc4\x3c\x86\xc9\xe8\x16\x62\xd3\x84\x64\x7d\x13\xbe\x4b\x96\xd9\x30\x06\xc6\xf1\xcc\x3f\xfb\x43\x12\xcf\x14\xf5\x28\xf9\x4c\x89\xf2\x23\x9e\xb7\x2e\x36\xeb\x4e\x62\x5a\x97\x40\x0c\x86\xad\x21\x66\x1a\xbe\x4b\xd6\x83\x08\x9d\x2a\xd1\x41\xbb\x4d\x0a\x22\x18\x1e\x87\x3e\xa0\xb6\xf9\xf0\x52\xad\x0c\x9c\x51\xe2\x7b\x26\x52\x7d\x24\xe3\x2b\xdc\x01\x78\xa6\xf8\x95\x18\xae\x7c\x5b\x8b\xfb\x71\xe2\x9d\x24\xf4\xc5\xee\xbd\x83\x1e\x75\x22\x6e\x5e\x29\x62\x3d\xb1\x44\xe7\x27\x60\xdc\xe8\x68\x4e\xe8\x5d\x86\xda\x49\x36\xec\x05\xe4\xa5\x22\x9c\x02\xee\xb4\xf6\xcb\x49\xd6\x38\x89\xc7\x24\xa8\x21\x41\x18\x14\x3f\xa8\xac\xf4\x8d\xba\xd6\xb3\x3f\x2d\x92\x8c\xed\xb8\x51\xf4\x6f\x54\xb5\x81\xfe\x54\x98\xae\x99\x24\x11\xb6\xc8\xbf\x30\x8b\xb0\xcf\xe7\xf3\x29\xe9\xd3\xc5\xda\x78\xc6\x24\x81\x2f\xa2\x16\xf2\x45\xef\x54\xbb\x7d\x11\xa7\x3a\x51\xb7\xfe\x79\x42\x14\x05\x49\x6c\x9a\x06\x6c\xe9\xf3\xb5\xbb\xc0\xab\xb1\x15\xa8\x8c\x21\x72\xac\xb9\x16\xe8\x33\xf7\xc0\xc1\x0b\x9f\xd5\xda\x14\x0a\x9b\x91\xe6\x3a\xc0\x3a\xbc\x77\x4d\x77\xbe\xeb\x9d\x5f\xc0\x8a\x1d\x93\xa0\x1e\x50\x0c\x2f\x56\xb3\x95\xdd\x2d\x18\xda\x7f\x82\xcf\xca\xdd\xf7\xaf\x07\x9a\x7c\x95\xa4\x11\x50\xe7\xe6\x36\xa5\x77\x8f\x25\xc9\x30\x00\xac\x4a\x70\xba\xbc\x03\xa4\xea\x3b\x40\x78\x5a\xda\x21\x54\xaf\xd9\xfb\xb1\x21\x77\xab\x62\x28\xf2\x33\x3c\xee\x29\x26\x45\x87\x97\x1a\x77\xf1\x83\x23\xed\xee\xc5\xbf\xcd\x79\x7d\x45\xf4\xac\xa2\x77\x2f\x95\x3b\x2e\x36\xd0\xbd\x08\x52\xf3\xcf\x85\xce\x37\x69\x1f\xdd\xbe\x18\x99\xb9\xa2\x88\x1c\x1e\x49\x62\x64\x1a\x0d\x8e\x25\x19\xe1\x86\x9f\x9d\xc4\x18\xb5\xab\xea\x51\xbb\x55\xa0\xdc\xdb\xa6\x68\x29\x56\xab\x53\x75\x46\x28\x3c\xde\x14\xb7\xab\xd9\x72\xc0\xc9\x0b\xe5\xa7\x91\x4a\x26\x13\x84\x84\xc7\x8b\x66\xe0\x63\xbd\x65\x18\xea\xa8\x09\x75\xce\x0c\xe8\x0d\xf1\x1e\xeb\xc9\xcd\x6b\x7d\x25\xc6\xc6\x0c\x2b\x7e\x9e\x24\x53\xa6\xf3\x46\x18\xdc\x9f\x14\xfb\xab\x04\x33\xa5\xc6\x1b\x31\xd5\xe1\x87\x95\xd7\x2f\x61\xbd\x41\xd4\x6e\x27\x87\xdc\x2e\xa2\xb1\xd1\x66\xaa\x43\xfa\xc6\xbc\x67\xf2\x34\xe9\x74\x70\x23\xec\x54\x75\x3a\x67\xed\x36\xe9\xf7\x18\x8b\x87\x44\x77\x3a\x20\x58\x9f\x06\x44\x74\x3a\x80\x69\x1c\x18\x23\x07\xbb\x7b\x0f\x1e\xb4\x63\x3a\x6c\x94\x0b\xfa\xd5\xfe\xf7\x4b\x12\x0d\x55\xd0\xed\xe7\x51\x58\xf0\x63\x43\x54\x98\x3a\x2c\xcd\xa2\x7a\x15\xba\x4e\x29\x1d\x4a\xa2\xfd\x34\x0b\x53\x6d\x0c\x93\x1d\x4a\x87\xaa\xb3\x13\x74\xfb\x81\x24\xfa\x54\x9d\xd1\xa1\xf7\xa7\x44\x77\xed\xa9\x3a\x1b\x76\x77\x02\xd5\xe9\x9b\xaf\xdd\xfe\x82\xc2\x93\x4d\x61\x69\xf5\x7a\x8c\x76\xb3\xa0\xf0\xab\x5a\x99\x05\x61\x20\x2b\x2b\x4c\x16\x8a\x9c\xae\xa7\x3e\xb0\xfb\xd7\xfa\x70\xef\xc1\x7c\xbe\x7f\xbf\xca\xa0\x26\x2b\xad\x8a\xc2\x33\xb5\x31\xbd\x45\x6f\x50\xf5\xcb\x40\x55\xca\x69\x83\xd8\xee\xde\x03\xdc\x9e\x3b\xec\xcd\xe7\xf2\x90\x65\xb9\x27\x4e\x30\xf9\x8b\xe8\x64\x8b\x32\x26\x47\xd9\x71\x78\xad\x36\xa4\x76\xe8\xad\x6c\x9b\x58\xd5\xb6\xbd\x07\xff\x14\xf3\xb9\xf8\xe7\xfe\x7d\x1a\x8f\xc9\xc1\xbe\xfd\x75\xbf\x87\xfa\xa1\x38\x7c\x78\x7f\x3e\xef\xf7\x76\x0e\x45\x4e\x8e\x66\xfd\x83\x5f\x74\x47\x74\x1f\xdc\xb7\x7e\xbd\xf2\xc5\xfe\xfe\xa0\xfe\x62\xef\x41\x45\xb4\xc4\x70\xc0\xc1\x5f\x31\x7f\xe6\xe4\x4d\x40\x86\xe6\x87\xbd\x61\x31\x03\x02\xde\x91\x95\xdf\x3b\xca\x9d\x33\x49\x63\x1a\x74\x3a\x74\x60\x98\x3e\x19\x12\xc1\xfa\xa0\x6d\x3a\x97\x25\xa6\x4f\x68\xbb\x6d\x60\x17\x25\x9b\xf3\x9c\xc3\x6d\xfa\x9c\x5a\xef\xba\x11\x81\x0d\x41\x69\xe3\x3a\x24\x93\x62\xd6\xfa\xfc\xfa\xd5\x73\xad\xa7\x1f\xac\x1a\x62\x46\x0e\x4e\xc6\x44\x33\x4e\x8d\xb5\xbc\xbc\x07\x3d\x55\xc9\xb9\x12\x69\xea\xd5\x24\x4a\xd1\xc6\xc7\xc9\xd5\x34\xd3\x3c\x9c\x88\x76\xfb\xb1\x99\x2f\x9c\xdc\x45\x51\x60\x94\x01\x3e\x12\x23\x88\x46\x81\xf4\x75\xa2\xf9\xc4\xae\x06\x2b\x82\x0c\x3c\xa1\x54\xa2\xbc\x5a\x5c\x1e\x39\x96\xe4\x68\xbc\xb6\x84\xb6\xea\xd1\x72\x99\xe3\xf5\x65\x0c\x41\x8d\x02\xab\xcc\xbc\x15\x47\x27\x46\x1c\x77\xfd\xd3\x69\x22\x53\xf1\xf1\xc3\x2b\x08\x8f\x83\xbb\xe8\x22\x90\x7e\xaa\xb9\xce\x52\x88\x5e\x95\xcf\x27\xe2\x46\x2f\x20\xfa\xb1\xe2\x88\xcb\x76\x62\x13\x94\x54\x59\xd8\xaa\xa9\x20\xf3\x1c\x2f\xde\x9f\xea\x4f\xe9\x51\x58\x9d\x6e\x06\x38\x44\xd6\x28\x31\x26\x5c\xc1\x84\x5e\xd0\xf2\xe8\xa0\x77\x98\xa0\xde\x16\xe5\x12\x2b\x96\xe7\xa4\x07\x89\xd1\xa0\xdd\x57\x3b\x9d\x84\x82\x62\xb7\xe4\xcd\xd8\x4d\xfe\x5d\xad\x11\x97\x9a\x9c\x18\xab\x76\xc8\x3b\x1e\x60\x56\x05\x1e\x70\xba\xc0\x63\xac\x65\xe8\x19\x91\x66\x79\x3d\x9a\x4c\x3e\xe4\xbd\xf2\x5c\xf0\x91\x50\x29\xa1\x14\x22\xb7\xb7\xec\x91\x2b\xdc\x9b\xb4\xfd\x73\xb8\xd3\xeb\xcd\xe7\xbb\xbd\xde\x21\x2b\x5e\xd1\x52\x2c\x1a\xd5\x9c\x55\x85\x4d\x5f\xc2\xb1\x24\x37\x63\xb3\x4e\x0f\x14\x53\x44\x37\xb4\x86\x23\x1b\xfb\x17\x90\xb5\x85\x67\xe4\x76\x6c\x13\x8a\x99\xe5\x93\x48\xc8\xfc\x08\x37\x5f\x17\x74\xa0\xd5\xed\x9d\xf4\x93\xa9\x90\x24\xf3\xa3\xd7\x90\xf9\x23\x0e\x5b\xbd\xe5\xec\x13\xc8\x5b\x97\x63\x62\x00\x0c\x9a\xad\xf5\xd9\x6a\xa2\x1f\x03\xed\x87\x03\x9b\x35\x0e\x83\x48\xf2\x99\x66\xbb\xc8\xcc\x10\x9b\xdd\xcc\x0f\x8d\xa5\x5d\x92\x7b\x3b\x45\xc1\xa7\xfc\x10\xa4\x3f\x8b\xf5\xc5\x63\x25\x46\x42\xea\x98\x4f\x52\x63\x03\x8d\xcc\x2c\x55\x7e\xb4\x4f\x8d\xc5\xec\xe7\x33\xc0\x14\xd9\xf7\xb9\x6d\x58\x91\x5e\x20\xf3\x23\x5e\x45\x61\xa4\x42\x8e\xc8\xd3\x31\x11\x74\x48\x56\xd0\xe3\xe5\xe6\x73\xd7\x50\xe0\xd9\xc3\xee\xc2\x0f\x69\x80\x4f\xae\x12\xe2\xf3\x30\x51\x9a\xd0\x45\x53\xdb\xa9\x87\x9a\xf6\x20\x0c\xb4\x1f\x02\xaf\x4d\x01\xc9\x8c\x68\xa8\x9c\x6f\x33\xf2\x65\x5c\xe6\xa7\x47\xba\x3f\xaa\x35\x69\x6d\xbc\x73\x6f\x20\xfd\xe8\x6d\xbb\x4d\x74\x87\x79\x57\x9e\x99\xdf\x91\xc8\x7f\xc6\x9e\x1d\xc7\x8a\x7d\x3f\x88\xf3\xa7\x37\x53\xa4\x6a\x79\x24\x8f\xb4\xd1\xac\x1f\xad\xd7\xf9\x65\x36\x99\xa0\xc1\x77\x95\x97\xdc\x9c\x52\x16\xf2\x5d\xc4\x9e\x99\x99\x36\xd4\xa4\x48\xe1\x03\x09\xeb\xf6\x07\xbc\xd3\x39\x94\xed\x36\x86\xc3\x8a\x1b\x11\x91\x88\xd2\x76\x3b\xd9\x72\x21\x07\x15\xc2\xb8\x8c\xe0\xea\xf6\x61\x9c\x87\xab\xc4\x66\x7a\xc7\x85\x9f\x9f\x89\xd3\xf8\x6c\x30\x3e\xed\x76\xe3\x33\x16\x1a\xc5\x39\x44\xb5\x39\x2b\xd2\xf8\x7d\x0b\x41\x9c\xf6\xce\x40\x58\x11\x01\x1c\x3e\xe0\xa9\x7d\x1b\x8c\x52\x54\x5a\xce\xe6\xea\x15\xd3\x90\x27\x18\xd4\xee\xb2\x62\xb3\x65\xe5\x1e\xa4\x5e\x99\xef\xae\x30\x80\x1a\xba\x66\x3c\x26\x51\xa7\xf3\x4f\x96\x95\x5a\x88\xe3\x78\xe1\xea\x1c\xb5\xf3\x22\x8c\xa3\xbb\x0b\x45\xba\x68\x65\x1a\xa9\xca\x14\x4f\x25\xe4\xa9\x3a\x1b\xe8\xd3\x6e\x17\xc3\x59\x2f\x35\x11\xd8\xd8\x32\xcf\x3f\x36\x57\x42\x05\xbe\x54\xc5\xce\x19\x44\xf0\xa1\x54\xf5\x29\x7c\xdf\xac\x09\xe9\x62\x4c\xdd\xb1\xac\x8d\xec\x40\x96\x32\x39\x2a\x86\x55\xd0\x7c\xff\xcc\x6a\x20\x65\x00\xab\x3d\xbc\xc3\x21\x97\xd7\x94\xd6\x11\x97\xde\xfd\x06\x3c\xa5\xb0\x72\x60\xde\xad\xb5\x80\x65\x7b\x53\x8a\xba\x8d\x19\xf0\xfe\xc7\x86\x92\xea\xf0\x50\x2e\xe8\xe0\xf3\xda\x7a\xd5\x3f\xff\x29\x37\x64\x3a\xfe\x27\x7e\x1e\xd4\x12\x2c\x8a\x75\xc7\x21\xcb\xf3\x5e\x2f\xa4\x16\xea\x9a\x4f\x5c\x2b\xe8\xb1\x24\x62\xe3\x69\xaf\xb2\x90\xa2\x8d\xf3\xb8\xbf\x39\xd1\xed\xad\x19\xf9\xa6\xc1\xfb\x53\xb6\x5a\xad\x96\x07\x33\xf2\x18\x7f\x79\x20\xdd\xfd\x90\xdf\xdd\x12\xb7\xe4\xab\x5e\xdb\xc0\x8e\x51\xf7\x7b\x46\x92\x95\x85\xff\x70\x0b\x3f\xbc\x7f\xc8\x88\x64\x9f\xf1\xa8\x55\xbb\x2d\x0f\x59\x7f\x67\xa7\x82\x95\xba\x82\x2d\xc1\x0e\xd9\xc3\x5e\xbb\x7d\xb0\x7f\xc8\x1c\x7f\xa8\x5a\x0d\xb9\x7f\xbf\xdd\xde\x7b\x50\x83\xd4\x0e\xa4\x25\x66\x3e\xc7\x7a\xe6\x73\x44\xe2\xdc\x85\xa1\x6b\xd9\x05\xaa\x0b\x28\x6a\xef\x7d\xee\xdc\xf0\xb0\xa6\x44\xe4\xbc\xf7\x3c\xb4\x69\x50\xf1\xd5\xec\x2d\xc4\x9a\x5d\xc1\x58\x33\x52\xf3\x54\x38\x87\x8d\x95\x1f\x61\x7e\xe1\x11\x64\xeb\xd8\xec\x96\xc4\x1a\xa4\xbf\x3d\xd4\x41\x86\xb1\xd3\xdc\x8c\xb0\xfb\x31\x03\xfc\xc7\x22\xb6\xe6\xc7\x9a\x73\x7d\x36\xaa\xb6\xbb\x83\x3b\x64\xdb\xf5\xac\xb8\x46\xf3\x32\x64\x48\xe0\xec\x16\xdd\xeb\x21\x68\x3f\x82\x5b\x32\x46\xcc\xa0\x7d\x81\x39\x91\x33\x50\x8c\x83\x66\x02\xcf\x7f\x84\xab\x34\xc7\x16\x16\x5a\x6b\x07\xce\x48\xa2\xc1\x66\x18\x46\xc3\x03\x3e\x1b\x2e\x82\x74\x25\x2a\xc9\x24\xfc\x04\x3a\xe9\x62\x9a\x68\xd6\x87\x91\x66\x3b\x70\xad\x59\x0f\xb6\xf5\x5a\xd9\xb1\xa0\x70\xb5\x52\xf7\x2d\x73\x40\xc0\x85\xde\x74\x1e\xb8\x4c\xf3\x4b\x61\xba\x01\xb0\xe7\x02\x9e\x6f\x00\xec\xbb\x80\xb3\x35\xa4\xe5\x27\xfe\xe0\x76\xcd\xf7\x9d\xfc\xfb\x8d\x66\xbf\xc2\xe5\x5f\x20\x39\xd2\xcc\xd4\xbb\x80\x63\xcd\x94\x84\x13\xcd\xde\xc0\x53\xcd\x66\x12\xbe\xac\x1e\x90\x8e\xe7\x2d\xe0\x9b\x5e\xef\x91\xfc\x03\x24\x7c\xb2\x79\x66\xe1\xf1\x5a\xb8\x0f\x64\x46\x7e\x07\x9b\x27\x86\xc2\x57\xcd\x36\x32\xed\x96\x6e\xa6\x71\x16\x98\x4f\xd7\x32\x2c\xe6\xf9\x2f\x52\x3a\xbb\x0c\x0a\x2f\x35\xfb\x01\xaf\xfe\x02\x79\xbf\x48\x9d\x5d\xaa\xe4\x79\x0d\x12\x32\xa6\xba\x7d\xac\x21\xd1\x58\x6e\x20\x99\x00\xc5\x32\xd0\x8c\x9b\x0a\xde\xe8\xf5\x33\xf7\x95\x9d\x39\x9f\x4d\x03\x9f\x6f\x80\x7b\x69\xe0\x66\xe4\x8d\x86\x1e\xfc\xae\x88\xa2\xdd\x3e\xb5\xb9\xbe\x3f\xd7\x87\xa0\x08\xee\x75\x4c\xea\x9e\x93\xd1\xbb\x96\x00\x54\x0d\x55\xd0\xef\xed\xec\xfd\x42\x54\x17\x3f\xd0\x4e\xad\x60\x9f\x76\x31\x59\x64\xe7\x60\x7f\x7f\xf7\x60\x01\x2f\xd6\xcc\xe4\xaf\x1a\x12\x9d\x4f\xac\xb7\x7f\x87\x1c\x74\x6d\x36\x69\xfa\x4a\xa4\x51\xd1\x64\xbe\xde\xf7\x29\x0d\xec\xab\x8e\x3c\xed\x57\xef\x77\x28\x45\x75\x07\x3e\xac\xeb\x36\xef\x4f\xf9\xa7\x24\x5e\xe7\x8b\x26\xb2\xd3\xa7\x1d\xe2\xd1\x96\xd7\xf9\x4d\x91\x4f\x3a\x4f\x64\x02\x9f\x56\xb6\x68\x46\x7e\x98\xee\xfe\x4c\x17\xf0\x63\x19\xb9\x0c\x72\xbe\x58\x91\x81\xc8\x3d\x02\x25\x91\xf7\x96\xbc\xb0\x6f\x8b\x7c\x9c\x7d\x9b\xcc\xa1\x0a\xab\x2d\xd3\x3d\x80\x74\xae\x00\x21\x7f\x28\x62\x16\x00\x6e\x57\x2a\x65\x56\xca\x19\x39\xd6\xa0\xb5\xe9\x70\x62\xb4\x26\xa3\x6b\x23\xfb\x65\x43\xcf\xf7\x3a\x3a\xf0\x4e\xff\x81\xd9\xca\xfe\x71\xe6\x59\x8e\xe7\x86\x21\xcb\x23\x22\xad\x72\x23\xbe\x88\x36\x08\x21\x62\xde\xa9\xed\x2b\x9f\xd3\x8e\x77\xe6\xb9\x78\xa3\x4d\x58\x76\x82\xe2\x94\x0e\x37\xed\x4a\xfc\x10\xa7\x4c\xe2\x87\xc5\xa9\xb0\x98\x11\xe5\x87\x43\xef\xe4\x42\xb4\x5e\xa6\x89\xf4\x9f\x88\x28\x19\x09\x3f\x91\xe2\xed\xb8\xc5\x75\xeb\x5b\x9a\x48\xaf\x63\xd5\x0f\x0f\x5e\x60\x33\x03\x6f\x09\xd4\xa3\x1d\xaf\x35\xe6\xf1\x04\x73\xb2\xb5\xf4\x85\x68\x8d\x93\xc9\x24\x99\xd9\x8c\x52\x5f\x34\xf9\x5d\x91\x84\x1a\xa8\x19\xbf\x4d\x03\x6f\xd0\x50\x6c\x8c\x32\x83\x0d\x8a\x61\x46\x9e\x6b\xf8\xa0\x31\xfa\x66\x21\x19\x67\x82\x25\x78\xfb\x4a\xc6\x94\xd3\xc4\x5c\x0b\xf5\x3e\x70\xd9\x8a\xa5\x4e\x5a\x7c\x45\x0b\x30\xb5\x9d\x4c\x5a\xd3\x24\x4d\xe3\x30\x9e\xc4\x3a\x16\xa9\xd7\xb1\x8d\x5e\xdf\xbe\x2d\xaf\xda\xfe\x8d\x70\xe0\x13\xcc\x36\x9f\x0f\x7c\xcc\xb0\xfc\x3b\x95\x84\x13\x71\x65\x2b\x31\x4d\xc6\x4d\xd6\x75\x58\x3b\x5e\x60\x9a\x89\x1a\x5c\xb0\x5c\xf6\x3c\xbe\x16\xd2\x62\x40\x38\x8f\x76\xc8\x6f\x8a\xcc\xc8\x53\x0d\x7b\x80\x5d\x97\xbf\x8e\x8c\xe8\x7a\xa2\x37\x1c\xfe\x75\x17\x2d\x88\x02\x0d\x23\x3c\x28\x0d\xbf\xe2\x81\xec\x67\x9a\xbd\x87\xd7\x6b\x45\xda\x77\xa2\xe8\xbd\xef\xd6\x88\x7c\xaf\xd9\x33\x4d\x66\xe4\xb5\x86\x1d\xd8\xdd\xa1\x14\x3e\x6a\x76\x43\x9e\x18\x61\xf7\x5e\xc3\xaf\xe6\x3f\x0a\x8f\x34\x8b\xe1\xfb\xfa\x85\x1a\x8f\x3e\x43\xbc\x56\x19\xb7\x75\xbd\xd3\xec\x08\x7e\xd3\xec\x23\xfc\xbe\x7a\xed\x2a\xb2\xc9\xc2\x1f\x6b\xab\x2a\x6e\x5a\x18\x62\xf6\x6e\x90\x82\x3d\x03\x25\xd8\x36\x68\xb1\xda\x51\x3d\x28\x0c\xf6\x19\x51\x02\x76\x77\x40\x5a\x3f\x56\x08\xda\xce\xaf\xbc\x2b\xb5\xcf\x17\x45\x06\x3c\x51\xad\x66\x2f\x50\x64\xd8\x55\x05\x8d\x74\xf1\x57\xf5\x3c\xd3\x44\xdd\xdb\xdd\x29\xe5\x4c\xe9\xf7\xae\x08\xf0\xf9\x40\xb2\x19\xd1\x02\x25\x5d\x81\x39\x5b\xc6\x8c\x49\x03\x45\x81\x79\x77\xe7\x17\xe5\x0b\x10\xec\xb7\x7c\xc4\x76\x77\x40\x77\xfb\x94\x82\x64\x72\x68\x78\xd0\x3f\xa7\x81\xf2\xcf\xc1\x60\x17\x06\xbb\x29\x3d\x28\xcf\x6f\x3f\xd1\xf0\xbb\x81\x1a\xd3\x8e\x86\x19\xf9\x03\x43\xe7\x7f\x79\xaf\x29\x42\x56\x59\xf5\x5c\xc8\x9c\x0b\xf0\x33\x05\x2e\xd8\x53\x88\xc4\x86\x9d\x98\x7c\xd1\x56\x87\xbd\xaa\xdd\x99\x80\xad\x3e\xdc\x9d\x07\x02\x44\xa0\xef\xed\xee\xcc\x7b\x30\x0e\xb2\xdc\xc5\xc2\x59\xae\x59\xdd\x92\x47\xd8\x26\x74\xc0\x0c\x8c\x6a\xa9\x98\xea\x9a\x46\x32\x0d\xc2\x8e\x16\x07\x41\x21\x63\x19\x9e\x58\x5e\xd9\x61\xbd\x43\x59\x9e\x22\xfd\xf7\xdd\x1d\x10\x0c\xf1\x6a\x90\x5d\xed\xec\xef\x5d\x93\x48\x98\x9a\xba\xda\xd4\x20\xe1\x33\x54\xe1\x1e\x1f\xb5\xe1\x66\xb1\x82\x47\xb7\xa4\xbf\xbd\x80\xb1\x60\xa1\x84\x50\xb0\x54\x42\x2a\x36\x2b\x70\x93\xfa\xf7\x15\x0b\x57\xc1\xd9\x8d\x00\xad\x7e\x23\x30\x6b\xa7\x94\x57\xc5\xed\x66\x8b\x05\x8c\x04\xe3\x1a\xae\x05\xdb\x7c\x16\xff\x8e\x1f\x04\x1c\xc2\x28\x50\xc0\xb3\x40\x40\x98\x05\x1a\xc2\xdb\x40\x42\x74\x12\x60\x5f\x6e\x0b\xa6\x25\x5c\x89\xcd\xf3\xf2\x42\x30\x29\x61\x2a\xd6\x0a\x82\xc3\xfe\x50\x05\xb7\xe4\xc2\xf0\xde\x95\x3d\xa6\x68\xd8\xe6\x5c\x30\x2e\x61\xb6\xb1\x9c\xe7\xd9\x82\x3d\xc8\x6f\x52\xb9\x15\x6b\x8e\x4f\xf5\x30\x4e\xa6\xa6\xd6\x80\x60\x7b\xbb\x78\x58\x61\x6f\x9f\x31\x3d\xec\x07\x3d\xc8\x98\x18\x64\x55\x68\x53\xa7\x53\xc5\xdf\x36\x12\xb4\x63\x50\x64\xbe\x4d\x55\x9e\xe6\x3a\xd2\x03\xc5\xfa\xbd\x5f\x54\x87\x3b\xdb\x31\x19\x63\x62\x78\xa4\x83\x4b\x4d\x6c\x4d\x5d\x15\x28\xba\x80\x9b\x75\x73\x22\x1e\x93\xc8\x54\x32\x9f\xcf\xc8\xb6\x00\xef\xff\xf2\x20\xa3\x4e\x1d\x96\xa2\x19\x39\x17\xe0\x05\xe6\x1b\x52\x93\xaf\xe3\x1c\xd7\xf1\x3a\x70\xc4\x38\x9e\xfb\xbc\x15\x64\x46\xa6\x02\xa2\x4e\x1f\xb3\xf5\xe4\xe2\x86\x57\xa6\xe3\x91\x1e\x70\x56\xfa\x5c\x2f\x35\x19\x93\x6b\x81\xba\xec\x4c\xd8\x68\x62\x5e\x9c\x6e\x59\x2c\x01\x65\x70\xa4\xcb\xaf\x14\x2e\xc5\xca\xd5\xc8\xb6\x4e\x34\x1b\x94\xe5\x0d\xba\xe7\x81\xf5\x40\x65\xa6\x41\x19\xcb\xaa\x7c\x5a\xd7\xe4\xc6\xd2\x32\x35\x9c\x2a\x28\x62\x44\xca\x32\x97\xa0\x1c\xcc\x60\x2a\x92\x59\xc0\x91\x58\x61\x30\x58\x4a\x74\x93\x12\x91\x53\x32\xf4\xc0\xaa\x7e\xc2\xa6\x19\x15\x15\x25\x37\xe4\xd2\x54\x71\xa9\x6d\x7f\x8a\x4e\x1f\x34\x35\xf4\x20\x35\x02\x1d\xb6\x75\x50\xdb\x33\x86\x94\xe3\x95\x22\x28\xd2\x4e\x7e\xd8\x9c\x10\x9d\x13\xf2\x6f\x45\x12\x5c\x63\x32\xdd\x69\xa6\x2b\x42\x6e\xc9\x91\x4b\x88\xee\xf4\x31\x19\x1a\x92\xa1\xdd\xad\x8e\x1c\xf0\x28\xbf\x94\xee\x44\x30\x21\xe1\xa9\x58\xad\x4f\x9f\x08\xc0\x6b\xb6\x82\x7b\xf7\x3c\x90\x74\x38\x23\xc7\x66\x92\x61\x15\xf7\x41\x52\x1a\x54\x30\x69\x0d\xa8\x6f\x81\x1e\x20\x90\x51\xf7\xbf\x2c\xcf\xc8\xc1\x80\xf6\x16\xf0\x4d\xb0\x23\x09\x52\xb2\x6f\xc2\x4c\xc6\xc7\x6b\x99\x45\x54\x09\x62\x04\x72\xb1\xb0\xc7\x4f\x78\xf1\xde\x72\x77\xc2\xb8\x7d\x9f\xd8\xd1\x4a\x10\x36\x71\x60\x2d\x84\x93\x34\x25\x83\x19\x86\x9c\xcd\x30\xa2\x0b\x2f\x53\xf0\x39\xec\xf7\x7a\x87\x7a\x88\x66\x92\x21\xe3\x85\x36\x2a\x6a\x70\x43\x1e\x0b\xeb\x35\xe9\xf4\x51\x09\xad\xba\x76\x19\x95\x5a\xf3\x55\x35\x5f\xd7\x2f\x4e\xf8\x2a\xd6\x6f\xb5\x97\xf5\xf7\x2c\x17\xbd\xac\x71\x91\x7b\xd5\xcb\x2d\xf9\x2a\x60\x7d\x1c\x90\x06\x7b\x09\x58\xe9\x5c\xa1\xf0\x4a\xb0\xa7\x12\xde\x88\x75\x41\x23\x33\xf2\x4a\xac\xda\x61\xfb\x26\x88\xc2\xa8\x1b\x8b\xe6\x79\x8d\x7c\x8d\xc1\x67\xab\x51\xa8\x9f\x41\x3d\xcb\xef\xfd\xa5\x0b\x33\x85\x6d\x15\x9f\x05\xfb\x20\xe1\xc5\xda\x45\xe1\xab\x24\x88\xf1\xb3\xb0\x6d\xa4\xf6\x96\x81\x0d\x9e\xa6\x37\x2b\xab\xef\x2d\x80\x28\x36\x23\x2f\x05\xbc\xc8\x51\x01\xf6\xeb\x73\x41\x12\x4d\xe1\x9b\x20\x9f\x29\xe4\x56\xa9\xd8\x50\x01\x32\xf7\x82\xc2\x07\xb9\xde\xbb\xf2\x46\xe4\xcb\xd7\xe0\xad\xf4\x4f\x78\x7a\xc9\xee\xc2\x40\x4a\x88\x02\x2e\x8d\x92\x2e\x41\x04\x1f\x24\x8c\xcb\x73\xc9\x55\x50\x91\x70\xf4\x07\xfe\x2a\xd8\xea\x43\xf8\x2d\xf0\x3c\x08\x2f\x6b\xd9\x4e\x3f\xd4\xe0\x44\x30\x4d\x20\xfc\x52\x83\xf8\x54\x83\x38\x09\x3e\x08\xe2\x79\x14\xf8\xa7\xe2\xe9\x3a\xb8\xe3\xdf\x82\x23\x0d\xfc\xd2\xfc\x8d\x6e\x02\x09\x7c\x8a\x2f\x14\xfe\xfd\x81\x7f\x8f\x70\xd2\xa7\x65\xf9\xcf\xc5\x53\x38\x32\xdf\xc3\xf7\xc5\xef\x97\xc1\x56\xdf\xcd\xde\xe7\xd4\x4f\x66\xe4\x26\x41\xf1\x8d\x52\xe5\x36\x81\x3e\x48\x1a\x48\xda\xf1\xee\xf1\x69\x7c\xef\x7a\xc7\xb9\x1f\xf0\x89\xd8\x98\x06\xf6\xd7\xfa\xe7\xfd\xc6\xe7\x67\x62\x95\x9b\xad\xca\x2e\x57\xff\xbc\xdb\xf8\xfc\x5e\x6c\xcc\x31\xfb\xb1\xfe\x79\xaf\xf1\xf9\xd1\xe6\xba\xbf\x6f\xae\xfb\xdd\x66\xe4\xbf\x6d\x6e\xf7\xef\x9b\x29\xff\x63\x73\xa7\xca\x6c\x23\xe5\x2a\xdb\x58\x5a\x67\x1b\x29\x17\xd9\x46\xca\xb3\x6c\x63\xb7\xf0\x06\x69\xcd\x96\x45\x9b\x8b\x27\x99\xbb\x57\x8e\x46\x86\x6d\x1d\xac\x5c\x27\x5f\x27\xc6\x48\x99\x91\xdf\x93\xdc\xed\x69\x9d\x42\x15\xbe\x38\xdb\x7c\xb3\xf1\x2d\x79\x8f\x28\xec\xfe\x71\x95\xde\x23\xab\x25\x1c\x7d\x94\x34\xf7\x25\xcf\xc9\x15\x8a\x25\x4d\x0b\x9f\xdd\xad\x70\xf6\xa4\x95\xbf\x3d\x4c\x32\xf2\x8f\x17\xd2\x5e\x2c\x11\x4b\x2d\xce\x85\x0a\x5a\xde\x3f\x3a\xb2\xf3\x0f\xef\x1f\x34\x88\x62\x8c\x37\x28\x96\x9f\x24\x23\x79\xb6\x6f\x31\xb2\xae\x19\x4d\x3b\xc4\x6b\x8d\xe2\xf3\x58\xa7\x80\x69\xf4\xcf\x13\x6d\x3f\x61\xdd\x46\xf6\x41\x16\x13\x1d\x13\x85\x3b\x92\x55\x4a\xd2\xcc\x35\x7e\x9c\x9b\x80\x33\x22\xab\x83\xb6\x1c\x4f\x5e\x84\x10\xb1\x2d\x54\x76\x07\x2b\x7a\xc9\x36\xed\x9a\x4c\x63\xc8\x40\x62\x40\x41\xf8\x2b\x48\x9f\x1f\xe3\xb6\x09\xee\x65\x72\xbc\xf1\xc9\xde\xea\x18\x95\x07\xe0\x88\x86\x6e\xdf\x48\x8f\xda\x10\x71\x4a\x03\xec\xf2\x08\x7a\x70\xc7\x8f\xd1\x11\x52\xa5\x46\x08\x8d\x85\xf3\x6b\x20\xcc\x88\xfb\x7c\xe1\x8e\xc8\xc4\x65\x8c\xf3\x98\xcc\xc8\x45\x6c\xb3\xc0\x3e\x40\xfe\x70\xdb\x3f\x72\x61\x4d\xc7\x16\xc3\x30\xe2\xb7\x81\xed\xc1\xda\x0e\xdd\xb5\xdb\x5f\x64\x46\x66\x31\xec\x81\xa4\xf3\xf9\x16\x3e\xf7\x7b\x3d\x90\xe8\x45\x34\x1f\xf0\x87\x53\x78\xdb\x29\x4c\x88\xec\xb2\x3e\xbd\xb7\x37\xef\xd1\x2e\x91\xf7\xfa\xbd\xde\xbc\x47\x3b\x44\xde\xdb\xc3\x27\x27\xb5\xce\x5f\xf2\xe5\xa5\x69\xde\x6f\x09\x46\xbf\x56\xd9\x36\xb2\x1a\xcc\xd3\xb8\x36\x20\xe1\xb5\x9b\x1f\x3e\xab\xcd\x94\xc7\x31\x9c\xc4\xb5\xad\xc5\xf3\xec\x27\xf7\x25\x6f\xc9\xf3\x18\x13\xf2\xdb\x2b\x03\x8c\xe1\x99\xd4\x30\xcd\x5c\x4c\x72\xe8\x69\x95\x09\x2f\xf0\xc6\x7c\x92\x0a\x67\xa5\xb8\xad\x81\xf9\xdb\xf3\xb9\xe7\x6d\xe5\xf7\x4f\x9b\x55\xab\x3a\x16\xee\x02\xbe\x36\x63\xfd\x35\x81\xf7\x31\x9c\x68\x22\x3b\x1e\xf3\x6a\xcc\x7e\x99\xad\xdd\xa1\xf4\xbe\x7a\x36\x45\x75\x63\xab\xf2\xa8\x46\x08\xab\x58\xe9\xa1\x65\xa5\xfa\xc4\x60\xb2\x16\xbe\xf2\x2f\x98\x15\xf3\x79\xef\x90\xdd\x12\x19\xaf\x12\x6a\xba\x46\xfb\x02\xf0\x2e\x84\xff\xf2\x44\x1a\x94\x51\x5f\x4e\x86\xf6\x3a\x87\xbc\x33\x9d\xe0\xb9\xf7\xf4\x9e\x64\x1b\x17\xa9\xa7\x9b\x97\x99\x2f\xee\xc4\x90\xfe\xf6\xf0\x24\x0b\x9e\x66\xd4\xde\xe0\x50\x9d\x16\xdc\x5c\xc7\xe3\xcd\x75\x7c\xad\x37\x41\x8d\x41\x82\x1c\xbb\x09\xd7\xeb\x00\xc5\x40\x5b\x3c\x0e\xdc\x2b\x17\x2e\xcd\xc8\xcb\xac\x2e\x22\xde\xb8\xf3\xf5\x28\x26\x1f\xc8\xe9\x8c\x8c\x62\x88\x62\xf2\x2d\x23\x3d\x4a\xe1\x55\x46\x8e\x33\xdc\x27\x01\xfc\x52\x7c\x7e\x8c\x2f\xe1\x6b\x46\x96\x07\xdb\xfb\xf3\x4f\x3b\xca\xeb\x00\xb6\x7a\x8b\x02\xdf\x4f\xa0\xb2\xe7\x14\xcb\x6b\x80\xe9\x99\xdb\x82\xe7\x8d\xd9\x97\x3b\x44\xea\xa3\xf1\xb9\x0e\x84\x21\x41\x32\x8f\xa5\xaf\x52\x92\x37\x80\xaa\x2f\x6f\x33\x77\x0f\x2b\xfc\x52\x85\x8e\x45\xcf\x3b\xc6\x40\x1e\x83\xe7\xc1\x8c\xbc\x8e\x21\xd3\xf0\x39\x33\x52\x7c\x0c\x38\xbd\x5f\x64\xf0\xce\xd4\xf5\x96\x52\xf8\x1e\x9b\xc5\x0d\x97\xc9\x8e\x32\xff\x38\x8a\x74\xbd\x86\x1f\xe8\x55\xfa\x88\xbb\x47\xc7\x98\x29\xec\x04\x27\xef\x07\xcc\x2c\xfe\x1c\xf7\x07\x38\x07\xb9\xbc\xad\x74\x35\x2e\xe9\x89\x68\x1e\x57\xb8\x5d\xdd\x73\x26\xdd\x34\xe2\x68\x86\x20\x95\x6f\x33\xfb\xef\xa5\x86\x8f\x31\xf1\xc6\xf1\x44\x0b\x65\xe4\x51\xbe\xb5\x94\xb0\x19\x79\x16\xaf\xd6\x55\x6e\xb2\x42\x88\xd2\x05\x3c\x27\x12\x3e\x90\xd3\xaf\xc4\x4b\xe3\x89\x90\x91\x18\x79\xe8\x43\xc8\x2c\x55\x5b\xe8\xce\x30\x63\x4d\xbc\x58\x5e\xc4\x61\xac\x97\x21\x44\x01\x71\x95\xad\xf8\x9a\x15\x5f\x79\xa4\x31\xad\x93\xfb\xb9\x67\x04\x88\xfd\xac\x44\x24\xe2\x6b\xa1\x3c\xb8\xcd\xd9\x8b\x78\xe7\x2a\xc9\xa6\x1e\x24\x86\x83\x4a\xbd\xa0\x77\x88\x9b\x45\x43\x6f\x58\xec\xa1\xb4\x0d\x48\xe0\x39\x22\xfe\x53\x96\xeb\x47\x5d\x7b\x7c\x6e\x7b\x3e\xcf\x9f\x46\xce\xb3\xa8\x7a\x5a\x0e\x2a\x60\x61\x81\xec\x03\xaf\x46\x79\x84\x83\x2c\xa0\xd8\x9e\xd6\x98\x3e\x5e\x63\xfa\x78\xed\x8b\xca\x39\xf5\x35\x36\x86\x0a\xca\xe3\x08\xf0\xa7\x3d\xde\x8c\x31\x21\x98\x2c\x46\xd0\xe2\x7d\x91\x64\xb4\x4c\x69\x8d\x15\xc5\x79\x45\x31\x56\x14\xfb\x11\x68\x46\x38\x8b\xfd\x11\x35\xe5\x19\xf7\x05\x44\x2c\x6e\x54\xda\x03\xee\x87\xc0\x8b\x4a\x97\x68\x48\xfc\x10\x12\x3f\x82\xc4\x1f\x41\x62\x68\xd0\xb4\x80\x34\x64\x28\x24\xa3\xb2\xc4\xfe\x2b\x7d\x38\x2a\xfa\x70\xb4\xdc\x87\xa6\x0b\x04\x36\x30\xc3\x2b\x73\x39\x13\x7e\x04\x11\x13\x86\x2c\x26\x96\x7a\x32\xc6\x55\x70\xcc\x56\xf4\xa6\xc6\xd5\xad\xea\xcd\x22\xc1\x80\xed\x4d\xb7\xa0\x60\x04\xaf\xc3\xa2\x58\x2d\x31\xf3\x4a\x50\xac\x5c\x62\xe5\x12\x2b\x97\x4b\x3d\x5a\x04\xcb\xe4\xb4\x10\x65\x06\x9c\xae\x1c\xcc\x3e\xc4\x30\x06\xb1\x44\x8b\xd3\xa7\x4f\x96\x74\x9d\x8f\x63\xb8\xaa\x6b\x31\xbf\xd6\x61\xae\xc2\x72\x93\xbe\xb2\x56\x1b\x3a\x55\x08\x77\x91\x30\x46\x7f\xf4\xd6\x58\xd3\x35\xd8\xd7\x75\xd8\x2f\xa8\x25\x24\xa6\x21\xf8\xaf\x51\x3b\xa6\x63\xf8\x1a\xc2\xb3\x8c\x78\xa7\xdd\xd3\x3f\xff\x3c\xbb\x5b\x10\xfa\x4b\x67\xe8\xc3\x9f\x7f\xfe\xf9\xe7\xff\xd8\x9e\xff\xdb\x9f\x7f\xa6\x67\x1e\xa5\x70\x4b\x5e\x86\xe8\x77\xfd\x9a\xac\x3e\x8c\x13\xfd\xb6\x30\xda\x91\x59\x04\xa8\x75\x8b\x34\x0d\xa1\xf7\x4d\xc9\xee\xdd\x15\xd3\x18\x30\x76\xed\xa5\x30\xd2\x4d\x52\xda\xf1\x16\x5e\x6d\x52\x7f\xdc\x6c\xb2\x3d\x6a\xac\xe0\xcd\x25\xfc\x7b\xc3\x22\x6c\xae\xe1\xef\xea\xdf\x1f\x36\x0d\xe9\xfa\xe7\x07\x4d\x43\xfa\xe7\xb5\xd8\x1b\x59\xd7\x62\xef\xea\x03\xf6\x87\x8b\xe9\xf7\x8c\x58\xf1\x2c\xf9\x95\xf0\xe0\x73\x48\xcc\xa8\x59\xe9\x68\xd3\x3a\xe5\xef\xbe\xe4\x42\x3a\xfd\x20\xce\xc5\x8d\x07\xbf\x99\x85\x24\xbc\x28\xde\x3e\xfd\x9e\xf1\x89\xe9\xde\xe9\x18\x9e\x84\x76\xe9\xfb\x6d\x6c\x68\x38\xa7\x8d\x05\x5a\xf2\xd5\xe1\x70\x8a\x57\x4b\xde\x8c\xfc\x6a\x18\xa1\xbf\xb7\xd7\xa3\x9d\xfb\xfd\x87\x7b\x07\x0f\x8c\x84\x52\x87\xbd\xa1\xea\xf6\xf7\x0e\x7a\x0f\x0f\x02\x45\xef\xe1\xd3\xfd\x79\xcf\xcc\x52\xfb\xfa\xfe\x2f\xda\x4c\x3f\xd1\x25\x02\xbf\xa2\x59\x22\xee\xed\x1e\xec\xef\x58\x63\xc5\xbe\x7e\x78\x30\xef\x51\x6a\x5e\xcf\x8b\xe8\xdc\x3b\xfe\x7b\x40\x24\x13\x5d\xb2\x7b\xb0\xff\x4b\xd6\x21\x59\x6e\xde\x64\xb9\x79\x43\x69\x97\x90\xfe\xfe\xee\x2f\x44\x31\xb2\xff\x8b\xec\xec\xd0\x7b\xfd\xfd\x5d\x53\xc3\x0e\xbd\xb7\x6f\xfe\xed\x03\x9f\x06\x82\xa9\x0e\x51\x87\xfd\xde\x70\x37\xe8\x3e\xa4\x10\xee\x06\x59\x67\xaf\xd7\xfb\x45\x77\xc8\xce\xa1\x18\xf6\x82\xbe\x6b\xea\x68\x5e\x9b\x3f\x32\x85\x3d\x98\x11\x9d\x82\x48\x91\x4b\x89\xd7\x35\x0c\x2c\x53\xd8\x81\x55\x9b\x75\xcd\xad\xba\x7e\x63\xab\x6e\xa7\xb1\x55\xb7\xdb\xc8\xcc\xb0\xd7\xc8\xe3\xb0\xdf\x38\x8e\x7e\x50\xbf\xfd\xb0\x75\xbf\x71\xf3\xe0\x83\x46\x22\x80\x87\x8d\xab\xb2\xfa\xbd\xe6\xd5\x57\xfd\x7e\x73\xb7\xb0\xbf\xb3\x58\x90\x19\x79\x17\xe6\x8d\xae\xb7\x7a\x46\xde\x87\x55\x6f\x9c\x38\xef\x3f\x3a\xef\x03\xe7\xfd\xf7\x35\xef\x95\xd3\xab\x7e\xfe\x7e\x17\x66\xe4\x51\x59\x31\xfe\xaf\xe3\x7d\x71\xc4\x82\xe0\x35\x55\xec\xc2\xe6\x30\xb5\xe2\x3e\x3c\xa7\x66\x19\xaa\xf6\x49\xee\xa2\xe7\x01\xca\xbd\xb7\xc1\x96\x6a\xb7\xf1\x72\xf3\xf9\x5c\x0f\xf1\x79\x27\xd8\x0d\xfa\xe8\x10\xf5\xc3\x2f\xae\xab\xa9\x36\x23\x0e\x7b\xb9\xca\x3a\x49\xc9\xca\x89\xde\x0c\x26\x92\x68\x86\x29\x27\x36\xa8\xf5\x95\xa8\x7b\x62\xde\x1b\xca\x0e\xf9\xa2\xed\x33\xed\x10\xdd\xf1\x5a\x1e\xa5\x01\xee\xb2\xc5\x76\xfb\x60\x81\x13\xd8\x03\x1e\x1b\x43\x00\x46\x29\xc5\x93\x1e\x95\x9f\xcb\xa1\x6d\xab\x74\x19\xb4\xdb\x5b\xae\xcf\xa0\xf0\x20\x58\xa7\x81\xe3\x04\x73\x1b\x66\xa6\x95\xf5\x1b\x18\x15\xf9\x2a\x05\x09\x7b\xb4\x9b\x3f\xf5\x7b\x3d\xda\x29\xde\xf6\x7a\x2e\x05\x09\xff\xff\x23\xbb\x57\x9e\x3b\xb7\x79\x18\xf7\xd0\x37\x9c\x78\x57\x6f\x56\xaf\xd1\xac\x7e\xa3\x59\x3b\x8d\x66\xed\x36\x9a\xb5\xd7\x68\xd6\x7e\xa3\x59\x07\x8d\x66\xdd\x6f\x34\xeb\x41\xb3\x55\x0f\x9b\x57\xd5\xf5\x7b\x4b\xcd\x74\xfd\xee\x63\x67\x16\x11\xc1\x66\x64\x86\xc3\x8e\x32\x1b\x6f\x6b\x92\x66\x46\xe1\x6b\xa3\xb3\xa1\xc0\xc6\xf7\xba\x04\x37\xaa\x52\x7f\xef\xa0\x8f\xaf\x45\x0d\xb6\x54\xde\x8d\x9c\x55\x9d\x7e\xaf\xf7\x8b\xec\xec\xfd\xa2\x3b\xc2\xe7\x1d\x22\xfc\x70\xd8\x0f\x5c\xb7\x54\xe8\x52\xa3\x98\x21\x8e\x29\x26\x29\xdc\x71\x1d\xc8\x6e\xc4\x89\x42\xc1\xad\xdc\x80\xe9\xf3\xd4\xe8\x85\xbb\xa8\x1e\x72\xed\x60\x4b\x5d\x36\x7f\x70\xb0\x27\x90\xd1\xef\xf7\x1f\xf6\x0f\xdc\x7b\x62\x26\xbc\xb6\x84\xbf\x4c\xa1\xbf\x6b\xe5\x8e\xe3\xd2\xe3\xcd\x98\xf0\xe1\x95\x26\xde\xf1\x45\x92\x4d\x46\x78\x83\x6f\x28\x5a\xe2\x6a\xaa\x6f\x3d\x1a\xcc\xc8\x8b\x14\xb6\x35\xf1\x7e\x57\x89\x3c\x6f\xbd\x38\x7e\xfb\xe0\xa0\xd7\x6f\x8d\x13\x75\xc5\xb5\x47\x61\xda\x30\xee\xaf\x5d\x02\x5e\x91\xcb\x04\xee\x3e\x18\x41\xb3\xd5\xa3\x70\x5c\x3c\x9c\x14\x0f\x1f\x8b\x87\xe7\xe6\xe1\xbd\x31\xa9\x5e\x0a\x10\x1c\xe5\xa4\xeb\x53\xd8\x76\xd1\x46\x28\xb7\x24\xa5\x9b\xe8\xae\xbb\xa9\xae\x6a\x02\x36\x7a\x8e\x66\xd0\x5b\x2b\xdc\xbe\xd4\x43\x25\xf3\x69\xa2\x9b\x52\xe0\x2b\xd9\xea\xc3\x56\xaf\x99\x1e\xd4\xbe\xee\x37\xd3\x08\x7d\x25\x5b\x3d\x84\x6e\x30\xac\x7d\x6f\x56\x67\x42\x31\x2f\x63\x29\xd5\xc3\x73\xd3\x07\x99\x1f\x52\x08\x2f\x02\x09\x61\x12\x28\x23\xc8\x85\xeb\xb3\xac\xaf\x13\x45\x6e\xad\xdc\xf7\x17\x7e\xc3\x0e\x79\x37\x11\x86\x94\x28\xb9\x9a\x4e\x84\x16\x2d\x3e\x1a\xc5\xf2\x1c\x43\xf0\xf0\xf4\x94\xb1\xb2\x03\xe5\x87\xc3\x99\xb6\xfd\x7d\x85\xf7\x83\x06\xa6\xec\x6b\x0b\x90\xb6\xb8\x12\x98\x29\x23\x56\x62\xe4\xfa\xb1\xa6\x75\x06\xfb\xdd\x2c\x7a\x22\x85\x1b\xf2\x3d\x85\x7e\xdf\x58\x61\x29\x20\xdf\xed\x14\xcb\x9d\xe3\x25\x5d\x66\xce\x7e\x93\x39\x67\x7c\xe3\x76\xcc\x6d\xbd\x03\xac\x39\xcb\x3f\xd9\x81\x7c\x8f\x5e\x0b\xfe\x19\x0d\xa2\x14\x0d\xa2\xeb\x41\xb5\x0d\x38\x23\x17\x13\xd8\x36\x4a\x2b\x3f\xc1\xdd\xc0\xe2\x85\x31\x21\x83\x08\x52\xfb\xe2\x7a\x02\x1c\x37\xfb\xf0\xd7\xeb\xd4\x4c\xed\x2f\x14\x32\xdc\xf6\x53\x10\xbe\xb7\x1f\x46\x18\x89\xd5\xd8\xf9\xbb\x71\x5b\x68\xac\x48\x22\x19\x8e\x19\xf5\xb7\x87\x57\x93\xc0\xb4\xae\xe6\x24\xba\xe4\x1b\xf7\x8f\x8e\x36\xf7\xc6\xb1\x5b\xdd\xc5\x98\x1c\x4d\xea\x93\xf1\x64\x73\xf1\xa7\x7c\xb3\xd3\x71\xf3\xe7\x6f\x35\x8d\xa2\x9e\x60\xc7\x71\x3a\xd6\xa5\x20\x2a\xef\x9f\xad\xee\x3e\x23\xaf\x27\x36\xc6\xa2\xb4\xdd\xfe\xfc\x73\x68\x3d\x40\x3e\x3f\xa0\x94\xfa\xe1\xf0\x2b\xa6\x82\x57\x7e\x68\x1d\x68\x45\xc0\xa9\xf2\x43\x8c\xc9\xa0\xc1\x57\xe2\xdd\xf3\xe0\xa8\x3c\x7f\x84\x95\x7c\x98\xc0\xb3\x09\xbc\x22\x12\xee\xf8\x01\xee\xe5\x66\x81\xc1\x13\x9d\x18\xc6\x5f\x50\x1c\x8f\x2f\x89\x79\xe7\x38\x40\x1d\x52\x91\xec\xc1\x52\xe6\xb4\x62\xed\x2b\x6c\x33\x53\xbe\xbe\x0a\xe6\x66\x55\xf5\x61\x27\xa8\x99\x63\xd5\x87\xdd\xc0\xbd\xa4\xdf\xfd\xd2\xab\xbe\x1c\xd4\x3e\x94\x4b\xeb\xa3\x49\x63\x2d\xfd\x38\x69\x2c\xb6\xdf\x27\x4d\xc9\xf3\x7e\xe2\x0c\xde\x4b\xbe\x71\x63\xf2\x15\xdf\x6c\x87\xbe\xa9\x7f\xbf\xdf\xf8\xfc\x9c\x6f\xb4\x33\x3f\xd7\x3f\x1f\x34\x3e\xbf\x70\xc6\xe1\xad\x76\x76\x02\xfb\xf9\xb5\x26\x32\x30\xe6\x11\xaa\xa4\xd4\x37\x86\xe0\xbb\x18\x12\x4c\xe8\x4c\xeb\xf7\xfa\xbe\xad\xdb\x3d\x7a\x04\x1f\xc8\xa9\x1c\x11\x8f\x4f\x84\xd2\x2d\xfc\xdb\x9d\x71\x25\x63\x79\xee\xd1\x33\x6a\x3e\x67\x23\x82\x04\xd4\x0d\xca\x0f\x2e\x26\x95\x11\x6d\x96\xaa\x70\x84\x61\x9d\xa8\x8e\x73\x78\x1b\xf4\x72\xbd\x7b\x51\x93\x7a\x9f\xea\x44\x8c\x46\x50\xdc\x3b\x91\x8a\xfa\x74\xfd\x51\x87\xfc\x63\x02\xde\x85\x12\x63\x0f\xee\xfd\x8f\x6f\xfc\x9a\xdb\xfb\x5f\x82\x7b\xb1\xaf\x45\xaa\x09\x91\x4c\xd2\xf2\xb4\xe7\xbd\x3f\xd3\x7b\xe7\xe0\x79\x94\x62\xd2\x61\xd7\x5f\x53\xc7\xfa\x52\x34\xf7\x5f\x1d\x67\x6d\x66\x7b\xb1\xe9\xb2\x9d\x62\xc7\x21\x79\x70\x33\x22\xde\xd7\x70\xc2\xe5\xa5\xd3\x63\x12\x7b\x0b\x5e\x98\x09\x3a\x1b\xc1\x2d\x26\x73\xfb\x5c\xeb\x86\x5f\x6b\x92\xdb\xe8\x62\xd2\x0d\x60\x3a\x1e\xc1\x67\xc0\x9d\x80\xa3\x72\x94\xb4\xb8\xd1\x5d\x99\xcc\x14\x9f\x3a\x75\xa9\x8e\x17\x98\x9f\x14\x66\xe4\xb2\x84\x9d\x75\xfb\xbd\x1e\x42\x3d\x59\x1e\xbd\x67\x7c\x53\x44\xd8\x7c\xbe\x32\x00\x6c\x5a\xe2\x0e\xb5\x6c\x85\x5a\x76\x93\x4c\x4f\x62\x29\xba\xb1\x1c\x27\xad\x30\x51\x23\xa1\xba\x3d\x8f\x02\x76\x8c\xa5\x6f\x46\xd2\xb2\xd8\x98\xb7\xc6\xbc\x8b\x25\xa2\x0b\xae\x74\xeb\x4a\x75\x77\x90\xc4\xcf\x14\xb2\x11\xf1\x8e\x93\x4c\x45\x02\xdb\x12\x98\xdf\xee\x3a\xfb\x7a\x73\x77\x69\x97\xb8\x2e\xfa\x98\x11\x7d\xeb\x2a\xcc\xeb\x40\x62\xc4\x52\x1b\xd2\xab\x82\x72\x15\x9f\x5f\xe8\x6e\xaf\x85\xbd\x6c\xdd\xde\xa6\x4b\xaf\x47\xe0\x65\xa9\x50\xdd\x54\x4c\x44\xa4\x3d\xf0\x62\x19\xeb\x98\x4f\xca\xaf\xdd\xab\xe4\x47\xf7\x2f\x40\x66\x22\xbc\x8c\xf5\x5f\x40\xe5\x84\x44\xc9\x24\x51\x1e\x78\xff\x16\x45\x51\x6d\x9c\xff\xc1\xca\x2d\x7e\x3b\xdc\xe3\x95\xcd\x39\xef\x4e\x4c\x53\x6a\x43\x94\x8a\x28\x91\x23\xae\x6e\x3d\x0a\x9f\x38\xf9\xc0\xc9\x57\x8c\x02\xa3\x14\xae\x46\xc4\x7b\x86\x9b\x0d\xad\xf0\xb6\xa5\x2f\xe2\xb4\x35\xe1\xa1\x98\x38\x55\x7b\x1d\x1c\x94\x1a\x0f\xbd\x77\xb5\xe6\x7f\xbb\x97\x6f\x35\xa4\xf7\xa4\x98\x0d\xed\xde\x05\xf3\x3a\xef\x63\xf2\xbe\xa1\x10\x7f\x74\x06\xf2\x73\x46\xa4\x1f\x1e\xfb\xe1\xdb\x5a\x74\xc3\xdf\xe4\xb5\xf7\x9c\x2c\x4d\xe3\x52\xa9\x7a\x64\xb7\x97\x7b\xf9\xde\x48\xa8\x4d\x8d\xb8\x07\xb4\x8e\x41\x43\x31\x99\x74\xd3\x09\x4f\x2f\xba\xc9\x32\x8b\xda\x66\x5a\x1e\xb5\x67\x81\x60\x13\xb9\x23\x2e\xcf\x4d\xc7\xd6\x08\x76\xbb\xcb\xeb\xa8\x9f\xa0\x64\x1d\x1d\x23\x24\xc4\xe9\xdd\x47\xf5\x99\xfd\x6d\xd4\x38\xf3\xfb\xbd\xfe\x5d\x38\x2b\x40\x7c\x2e\x0d\x6b\x8e\xbb\x91\x90\x86\x19\xca\x2a\x2d\x0f\x7c\x35\xa2\x30\x7c\xdf\xe0\x82\x77\x2b\x84\xf9\x85\x69\xb3\x07\x78\x5b\x96\x84\x1f\x23\x17\xfe\xb7\xcd\x1a\xd8\xef\x7c\xa3\x3b\xf8\x8f\xd5\x56\x8b\x74\x37\x04\x73\xbb\x61\x4b\xcf\xe7\x78\x72\x16\xad\x87\x1d\x9b\xb8\x1e\x6f\x58\x2a\x0d\x89\x5a\xd4\x53\xe4\xb4\x63\x15\x43\xd5\x7c\x51\xd2\x0f\xcf\x73\x97\x94\xae\xfb\xa2\x0a\x8e\x0b\x13\x58\xe7\x8b\x42\xc7\xee\xa2\x1e\xe8\xa1\xdc\xea\xbf\x12\x89\xe9\x3d\x2a\x77\x65\x54\xeb\xe4\xdf\x46\x46\x74\x4c\x33\x9d\xf7\xb1\x8a\x8a\xbe\xfe\x7d\x54\x63\x06\x11\x2d\x0d\xce\xa5\xb8\x1d\x25\x33\x59\x8e\xce\x1f\xb5\xd1\xc9\x56\x16\xc8\xa6\x6b\xc0\x79\xb4\x46\x9d\x88\x92\x49\x2b\x4a\x26\x5d\x9e\xe9\xa4\x12\xbe\x3f\x29\xa3\xc7\x1b\xe7\xbe\x95\x5f\x33\xf2\x7a\x04\x5b\x18\x2d\x53\x32\x28\x6e\x10\xaf\x15\x8c\xf5\x09\xe9\x62\xe9\xd7\xb0\x78\xff\xcf\xff\x5d\xc8\xba\x1a\xa3\x47\xd1\x46\x0d\x2f\x89\x36\xea\x8f\xf1\x72\xc7\x5e\x25\x59\x2a\x70\xa6\x2d\x2b\x3e\xe3\x35\xe0\x13\xc1\xaf\xc5\x32\x78\x18\x6d\xd4\x1f\xd3\x68\xa3\x4d\x35\x89\x36\xce\xb9\x51\xb4\x71\xc6\x5e\x2f\x93\x1a\x4e\xb2\x15\x6d\xda\xfe\xdf\xc8\x2c\xf1\x75\x93\x59\xe4\xdf\x64\x14\x83\xe1\xe7\x18\xe5\x6a\x73\x77\x5e\x6c\x66\x94\xe9\xe6\xb1\x3a\x8f\x36\x46\xb4\xcc\x36\x33\xc2\xed\x66\xe4\x37\xd1\x46\xfb\xf6\xb2\x51\x77\xf3\xfb\x51\xf4\xbf\xd6\x67\xdc\x30\xe7\xee\xbb\x7e\x80\xa8\xe9\x58\xd9\x69\xfa\x55\x4e\xd6\xb1\xe3\x88\x6b\x51\xd3\x01\x1b\x4a\x7d\xe5\x2d\x88\xca\x75\x01\x8f\x0e\x4e\xc7\x30\x8e\x49\x0f\x8d\xf5\x29\x5d\xa5\x9a\x46\x7c\x22\x8c\x12\xf6\xb5\x75\x95\x48\x7d\x51\xa0\x26\x8a\x69\x70\xe1\x54\x32\xb3\x10\xdd\x0b\xcc\x7e\xb4\x6a\x56\x4c\x95\xb8\xee\x22\x50\x6b\xd4\x1d\x4f\xc4\x4d\xbe\x6c\x5b\x86\x7d\x72\x5d\x16\x79\x76\x5d\x2e\xf1\x4a\x25\x33\x6f\xad\xb6\xc1\xe5\xf9\x44\x74\x27\x62\xac\xcd\xaf\xdd\x9b\x56\x94\xa9\x34\x51\xdd\x69\x12\x5b\xc4\xa8\x7d\x9c\x15\x22\xb6\x22\xc5\x92\x6a\xba\xac\x49\x4a\xd9\x75\x5f\x8c\x21\x64\xf7\xd7\xf2\x28\xa6\x5f\xaf\xe1\x73\xae\xcc\xfc\xc4\x0e\x9b\xf7\x92\xcb\xcc\x68\xaf\x75\x2e\xf2\x9e\x89\x50\x39\xef\x0b\x6e\xf2\x5e\x73\x15\x5d\x78\x75\x96\xf2\x8e\xa6\x2a\x9e\x78\x75\xbe\xf2\x5e\xf3\xa2\xf0\x7e\x59\x57\x26\x85\x57\x77\x30\x78\x2f\xb3\x49\x01\x77\xbf\xc4\x97\x9d\x67\xa9\xf6\xea\x9e\x07\xef\x58\x4c\xb5\xb8\x0a\x85\xf2\xea\xee\x7c\xef\x6d\xa4\x93\xea\x75\xe9\xd5\xf7\xde\x24\xd7\x39\x7c\x9d\xa3\xbd\x27\x22\xb2\x1f\x9c\x8d\x3a\x45\x97\xfb\x5f\x22\xb3\xae\x63\x85\x1f\xff\x69\x56\x40\x83\xe8\xaf\x79\xe1\xcc\x0e\xe8\xa7\x6b\xcc\xea\x51\x9b\x22\x5f\xea\x93\x2c\x56\xe0\x5d\xf1\x1b\x7b\xfe\xce\x83\x66\xa8\xec\xb7\xa8\xe6\x40\x7b\x39\xc4\x46\x7e\x6e\x72\xfe\x55\x32\xe2\x93\xd6\x98\x8f\x44\x2b\xbd\x30\xad\xc8\xad\xa7\x51\x9c\x4e\x27\xfc\xd6\x33\x0b\x50\x12\x5d\xae\x9a\x34\x58\xb4\x3b\x8a\xf9\x24\x39\x6f\xb9\x3f\xf2\x1e\xab\xa6\xfb\x72\xa9\xc8\x26\x20\x5b\x0f\xd0\x9c\xab\xd5\xd2\x12\x4d\x92\x54\xb4\xae\x8a\x25\xce\x8c\xca\x4d\x44\xbe\x5c\xbb\xab\xc9\x8d\xb7\x7a\x6a\x19\xcc\x36\x17\x74\x81\x37\x1a\xc1\x65\x04\x18\xed\x72\x5d\x03\x46\x93\xbf\x65\xe8\xe4\xb1\xac\x28\x41\x39\x55\x03\x9c\xea\xee\x5e\xcb\x08\x99\x6f\x59\xaa\xe3\xf1\x6d\xd1\xb6\xc6\xbc\x9d\x91\xef\x66\x4c\x7b\xa6\x30\x3e\xf5\x8b\xe1\x5e\x43\xe7\x38\x49\xf4\xea\x1e\xb8\x9a\x74\x77\x5a\xcd\x15\x36\xcd\xa2\x48\xa4\xa9\x59\xd6\x37\x74\xcc\x63\x2e\x23\x6b\x8c\xd6\xd7\xeb\x1a\xca\xa9\x8a\xaf\x4a\xe3\xf6\x26\x22\xdf\x6a\x28\x8e\x85\x6e\x3d\xe1\x5a\xdc\x3b\x89\xaf\x84\xb3\x68\xaf\xef\x70\x1e\x5d\x8e\x54\x32\x75\xb9\xac\xe0\xf8\xa0\x00\xb7\x5c\x17\x4d\xe2\xa9\x07\x9e\x12\x91\x26\x3d\xbc\xf4\xa2\x47\x4b\x96\x9c\x26\x69\x8c\x17\x62\x82\x37\x8e\x6f\x36\x70\x17\x56\x54\xd8\x77\x7f\x41\x4f\x45\x8a\xe3\x55\xde\xbc\xb2\x7f\xdd\xac\xc3\xbd\xdc\xac\x55\xbc\xda\xac\x17\xbc\x59\x9e\xe4\x2a\x99\xa5\xcb\xf3\xfb\xf9\x66\x3c\x9f\x23\x37\x16\xe5\x9b\xc6\x43\x42\x1f\xc8\xa9\x63\x2d\x7b\x80\x7b\x1c\x9e\x18\xc5\xda\x33\x43\x87\x0e\xf4\xbf\xe3\x2b\x50\x0e\x5b\x3c\x35\x58\x4c\x3f\x56\xa1\xa4\xe1\xb1\x1f\x7e\x18\xaa\xe0\x6f\x62\x9d\x91\xdb\x6d\x43\xda\xa5\xdd\x4b\x71\xea\xf8\x20\xec\x4d\x0b\x5e\x7d\xbc\x5e\x38\x6d\xc5\xc0\x06\x55\x05\x36\x28\xd7\xd3\xf8\x4d\xc3\x96\x31\x3a\xdb\x6d\x35\xf4\x98\x17\x98\xe7\xf9\x5c\x0d\xab\x77\xff\xe1\x05\xde\x16\xfe\x61\xd8\x5d\x36\x02\xcc\x0f\xbf\xd4\x2a\x7c\xbb\xb9\x42\x50\xec\xb5\x20\x97\xbc\xe1\xc4\xb5\x31\x15\x45\x5d\xbd\xa5\xda\xeb\xc1\x15\x4e\x3c\xe7\x8c\xbc\xbb\x86\x4b\x4c\xa4\x8c\x4d\x75\x3d\xc7\x51\xee\x66\xad\xe7\x5c\x69\xfd\x9f\x33\xad\xaa\xe4\x2f\x7e\xf8\xdd\x6e\xa8\xf9\x91\x0d\xfc\xe0\x3e\xdf\x43\x77\x03\xf7\xa3\x83\x9a\x8a\xf7\xff\xd9\x65\xea\x66\xbb\xfe\x1d\x6f\x0e\xf0\x36\x59\x4a\xb8\x9c\x59\x51\xab\x56\xda\x43\x7f\xb1\x84\xe9\x9f\x59\x3d\xc4\x7f\x41\x44\x3b\x7b\x0d\x9b\xad\xad\x1f\xab\x4c\x96\x52\xb9\xcc\x83\x9b\x1b\xaa\xe5\x54\xc8\x51\x2c\xcf\x97\xb4\x35\x71\x33\xc5\xbd\x61\x07\xfd\x93\xba\x64\x7c\xba\x82\x4b\xaa\x71\x78\xbc\xdd\x7c\x67\x3a\xf5\x0d\xbf\x12\x41\xcb\xae\x7e\xb8\x19\x11\x26\x4b\x1d\xf2\x57\x38\x8e\x46\x23\x25\xd2\xb4\x86\x86\x3f\x5f\x32\x5c\x7f\x8d\x6a\x7e\xae\xc4\xfa\xb9\x8e\xed\x56\x72\x3a\x70\x7d\x86\x79\x33\x5e\x6d\xdb\x27\x5c\xa6\x27\x59\xaa\x85\x6a\x1d\x63\xb2\x5c\x5b\x93\x13\x44\x80\x89\x4b\xdc\x6d\x15\xcf\xb3\xf3\x0c\x77\xad\x56\x19\x4b\xe3\x44\x5d\xe5\x76\x7f\x4d\x57\xad\xda\x18\x25\x93\x6e\x7a\x55\x73\x52\xda\xfe\xf2\x96\xba\x28\x07\xed\xf7\x9a\x8c\x6d\x7a\x80\xd4\x61\xff\x73\x15\xdb\x76\xff\x4c\xd5\x85\xd7\x95\x48\x66\xc3\x40\x43\x3e\x3a\x17\x1e\x6c\xf5\x6a\x3d\xb6\x3e\xec\xc2\x16\x28\xd4\x27\x6f\x65\x0c\x46\x0e\x53\xec\xe5\xad\x8e\xbc\xc8\x81\x72\x4f\x07\xfa\x1c\x17\xc4\x50\x29\x47\xf9\xc6\x72\x11\xbd\x9b\x19\x03\xf5\x62\x0c\x2f\xb2\x3c\x62\xaf\x6c\xf8\xcf\x18\x6f\x4a\xf0\xd1\x92\xe9\x96\x0a\x6d\xd6\xd3\xe5\x89\x34\x8a\x53\x1e\x4e\x70\x26\x11\xed\x0a\x81\x3a\x3b\x89\x35\xec\x24\xfe\x95\xec\xf4\x4e\x08\x55\x0d\xea\xc5\x9a\x41\xc5\x2e\x7a\x12\x81\x2c\xf8\xa9\xbe\xd9\xb6\xe4\x69\xc8\xa7\xcf\xcd\x75\x35\x7d\xdc\x69\xf3\x5f\x27\xfb\xe3\x54\xc7\x3f\x3d\x0f\xde\xa4\x46\xac\xfc\x51\x76\xb3\x91\x03\x3e\xff\x40\xf3\x70\xf2\x6d\x58\x37\xe5\x3f\x09\x95\xa2\x32\x23\x6d\xf4\x93\x59\x91\xff\x45\x0d\x78\xa4\xb8\x8c\x2e\x7e\xb2\x01\xca\xe7\x6f\x56\x2d\x14\xff\xc9\xaa\xb3\x78\x32\x32\xd6\xc2\xcf\xd7\xfe\xf6\x5f\x5c\xfb\xc7\x54\xa8\x9f\xaf\xfd\xdd\xbf\xae\xf6\x5f\x93\x7c\x4c\x7f\xbe\xf6\x87\xff\xba\xda\x3f\x88\xeb\xf8\x6f\x55\x1e\x3e\xfb\xd7\x55\xfe\x77\x1b\x1e\x7e\x75\xdd\x1f\x68\x8d\xf3\x8f\x7e\xa8\xc0\x9d\xe1\xb5\x05\x32\x91\xe3\xf8\xbc\x40\xff\xbc\x24\x66\xda\xdd\xab\x36\x80\x79\x74\x69\x28\x97\x23\x0f\xbc\x7f\x1b\xdf\x1f\xdf\x1f\x3f\x2c\x3f\x8e\x13\xa9\xbb\x63\x7e\x15\x4f\x8c\xf2\x78\x95\xc8\x24\x9d\xf2\x48\x54\x0d\x7c\x53\xd5\x26\x1d\xe2\xce\x96\x0f\x6c\xbc\x76\x5d\x97\xf6\xb8\x12\x93\x7e\xf4\xb9\x08\xf0\xe1\x65\x80\x4f\x19\x50\x83\x7e\x87\x97\x1c\xf0\xcc\x6a\xf4\x05\x56\x2b\xbd\x32\xe9\x9e\x67\x5a\x0b\x95\x56\x64\x7d\xc2\xaf\x2f\xcc\xc8\xc4\x62\x32\x4a\x85\x76\xfb\xfd\x59\xac\x52\xdd\x1a\xf1\xdb\x56\x32\xc6\x90\xbc\x99\x10\x97\xe5\x28\x1c\xa1\xc7\xea\xed\x8a\xb2\xb7\xe4\xf8\x1a\xbc\xd7\x89\x1c\x19\x5d\x7a\x2b\xf3\xa3\x1b\xe0\x9a\x82\x7d\x7f\x9c\xd9\xf7\x7d\x7b\x4f\x5d\xed\x13\xd7\x99\xc2\x8f\x3b\xce\x47\x5b\x9d\xba\xae\x31\x11\xba\x34\x57\xba\x82\xbd\x37\x89\x16\x41\xeb\xe4\x22\x4e\x5b\x66\x21\x8b\xe5\x79\xcb\x3c\xf2\x6b\x9b\x0d\x71\x92\x44\x7c\xd2\x4a\x75\xa2\xf8\xb9\x30\x2d\xbb\x4d\x32\xd5\x0a\x8d\x5d\x6c\x55\xdc\xd2\x93\xd2\x08\x64\x9a\x91\x78\x04\xcf\x22\xb0\xa6\xe8\x49\xf3\x9e\xba\x95\x3b\x92\xaf\xad\x8d\xf2\xd2\x5a\x28\x4f\x30\xe8\x2f\xfc\x6d\x39\x58\x6b\x37\xb0\xb9\xa5\x94\x9b\xea\xe8\xe5\x36\x08\xd0\xc0\x61\x6b\x2b\x2b\xaf\x85\xaf\x6b\x13\x7c\xd4\x54\x1d\xde\x72\x9b\x5f\x60\x41\xa4\x1f\xf5\x9b\xb7\xc9\xcf\xc8\xed\xb5\x69\xc0\x3e\x70\x9f\x37\xaf\xac\xd4\xd6\xf4\x8c\x7a\xd4\xe7\xdb\xf6\x1c\xf3\x27\xc0\xeb\xd4\x6e\x6d\x38\xfd\x6f\x6b\x58\xeb\x2a\x34\x13\xa5\xce\x54\xf9\xfb\x1d\x8f\x82\xe5\xaf\x89\x16\xaa\x1b\x72\xd5\x2d\x03\x3b\x5d\x4e\x9b\xe4\xf6\x85\x19\xea\x68\x94\x9f\xb6\xe4\xf0\x5a\x98\x17\xd9\x35\xdc\x45\x5f\xf1\xa8\x95\xd5\x3a\xe0\x96\x6c\x6f\xc3\xd3\x6d\x4c\xdb\x05\x37\xe4\x6a\x1b\x8e\xb6\xc1\x5e\xa6\x7b\x46\x69\x63\xbf\x02\x31\x3e\x13\x70\x43\xae\xb7\xe1\x48\x63\xb2\x21\xe9\x47\x97\xe6\xcf\x36\x6d\x46\xc3\xd6\xa0\x2f\x35\xe1\x18\xaa\x35\x02\xcf\xab\xc1\xdf\x5f\x3f\x04\x97\xd7\x6e\xae\x92\xba\x8a\xf1\xb9\x14\x2e\x92\x5f\x87\x46\x2b\xc2\x7f\xba\xe2\x66\xca\xe5\xa8\x7b\x35\x2a\x5e\xe4\x71\x22\x45\xc0\xc8\x55\xd8\xdd\x6f\x4d\x75\x77\xb7\x35\x0d\xbb\xbb\xcd\xb0\x94\x30\xd1\x3a\xb9\xf2\xc0\xeb\x4f\x6f\x5a\x69\x32\x89\x47\x2d\x75\x1e\x72\xd2\x83\x96\xfd\xcf\xef\xef\xec\xd3\x6a\x88\x5e\x38\xf2\xb6\xe1\x92\x74\xdd\x2b\x39\x29\xa1\xe2\x72\x54\x84\x47\xd4\xac\x97\x89\x50\xfa\x8a\x4b\x7e\x5e\x0d\xde\x45\xb3\xb4\xe4\xd7\x95\x26\xf6\x6c\x9b\x48\x0a\xaf\xb7\xe9\x2a\x7d\xba\x4a\xb4\xb7\x13\xd4\x47\x30\xd7\x22\x1b\xfd\xbc\xb4\xb2\xc4\x72\x12\x4b\xc7\x9b\xbb\xdc\xa2\x35\x3b\x91\x8d\xc0\x0f\x29\x66\x35\x81\x22\x66\x2d\x37\xb8\xc4\xa8\x90\x56\x93\xac\x29\x93\x1f\x1b\xae\xba\xe6\x3e\xf4\xa3\xc6\xf7\xe6\x89\xb7\xef\x8d\xef\xcd\x50\xc4\x77\x2e\x27\xfd\x21\xc9\x58\xd5\xbd\x37\xbf\x45\xb5\xfc\x4e\xb5\x89\x9a\x3f\x3d\xda\x06\x8c\x45\x8c\x5e\xd0\x8e\x37\x89\xc3\x7b\x61\x92\xe8\x54\x2b\x3e\xed\xee\xf9\x07\xfe\x4e\x77\x14\xa7\xfa\x5e\x94\xa6\xd5\x07\xff\x2a\x96\x7e\x64\x6c\x99\x8f\x91\x19\xc4\x47\xdb\x20\x6d\x59\x5c\xf4\xf8\x4c\xa4\xc9\x95\xe8\xee\xf9\xf7\xfd\x1e\x96\x74\x5f\x57\x85\xbf\x37\x0a\x8b\xc9\x55\x77\xc4\xb5\x98\xc6\xd1\xa5\x50\x58\xb0\xfe\xca\x16\x7b\x14\x35\xcd\x0b\x6b\x49\xbc\x24\xca\x8f\xf0\x50\xe8\xad\xf9\x23\xe9\xa0\x4c\x37\x7c\xa7\xca\x27\xbd\x94\x82\x98\x3b\x12\xb7\x7c\x19\xae\x7a\x19\x39\x2f\x97\xfa\xf4\x7d\x64\xea\xff\xdc\x54\x46\xf2\xa9\x64\xa6\x68\x29\x0f\x5f\x47\xe8\x89\xa9\xc4\xd2\x4e\x80\xf7\x3b\xb4\x54\xc9\xce\xf6\xb7\x5e\xd4\x3e\xcb\xf2\x73\x3c\x26\x3b\xe8\x8f\x33\x24\x15\x65\x1b\x65\x4a\x0a\xdf\x6f\xdb\xd4\xf6\x46\xba\x2f\x21\x08\x4b\x04\x78\x76\x78\x3d\xd6\xda\xb4\x5b\x34\x91\x47\x4e\xfe\x9a\xf2\x65\x88\x77\xc8\x94\x1a\x8d\xcd\xdd\xff\x7b\x04\x7f\x44\x20\x13\x50\x09\xe8\x04\x44\x02\x59\x02\x3c\x81\x28\x61\x9f\x24\xf1\x4e\x78\x7a\xe9\x51\x48\x92\x75\x39\xba\xa2\x84\x94\x69\xba\xf2\x6c\x5e\xcd\x4b\xa9\x90\x9d\xdf\xe3\x32\x15\x7d\x80\xda\x55\x79\x78\x5f\x0c\x79\xa3\xf0\xda\xbb\xf2\x28\x98\x22\x77\xfc\xa6\xba\x59\x46\x38\x97\xaa\x71\x26\xe0\x85\x5a\x75\x83\x55\x32\x4d\x35\xd7\xc2\x03\x4d\xe1\x3f\x5e\x28\x5f\xf2\xeb\xf8\x9c\xeb\x44\xf9\x59\x2a\xd4\xd1\xb9\x90\xba\xba\x4d\xe9\x44\xc5\x23\xf4\xf3\xb5\xdb\x2b\xb1\x5d\xf0\xf4\xa2\x88\xc4\xd2\x74\xf5\x79\xb6\x81\xf2\x23\xad\x26\xbf\x89\xdb\xf9\x5c\xf9\x57\x42\xf3\xfc\x31\xbd\x88\xc7\x1a\x9f\xfb\x87\x66\x4d\xce\xb4\x4e\xe4\x7c\x2e\x7d\xcd\xd5\xb9\xd0\x78\x06\x3c\x99\xc9\x49\xc2\x47\xf3\x39\x51\xfe\x54\xe1\x7d\xcf\x4f\x2c\x2f\x10\x8a\x0a\xc9\x85\x12\x63\x50\xcc\x74\x0d\x48\xf6\x54\x10\x8d\x67\x88\x48\x46\x64\xbb\xad\xfc\xf0\xd6\xb2\xcb\x2d\xfe\x88\xec\x8f\x08\x7f\x64\x3e\xb7\x3f\x33\x9f\x0f\xcb\x9d\x82\x20\xdf\x9a\xd0\x0b\x7b\x16\x06\xa2\x27\xc1\xca\x90\x3f\xbc\xbd\x55\x02\x56\xac\xe9\x02\x46\x61\x60\x6f\x67\x7d\x18\xe0\x9d\xae\xd1\x9e\xf9\x77\xcf\xa0\x88\x93\x3c\x9b\xfe\x18\x1f\x76\x17\x10\x26\x6c\x24\x21\x4d\x58\x24\x61\x82\x2f\x7b\x0b\xb8\xc6\x87\xee\xce\x02\xb6\x13\x76\x9d\xc0\x55\xc2\xb6\x13\xb8\x58\xc7\x52\x77\xfc\x69\x70\x95\x00\x7f\x86\x91\xf6\x2f\x82\x49\x02\xfc\xa5\xf9\x1b\x7d\x0f\x14\xf0\xed\xe0\x2d\x66\x98\x0b\x79\x90\xe7\x75\xe3\x5f\x03\xcf\x83\xe8\x3a\xf8\x0c\x7c\x17\xcf\x7c\x3f\x0f\x24\x44\x2f\x0d\x96\x70\x12\x7c\x86\xf0\x0a\x13\xac\x3d\x45\xf5\x04\x3f\x86\x47\xc1\x5d\x5e\x0c\x7f\x22\xd4\x23\xf3\xe7\x29\x66\x8a\x7b\x89\x05\x5e\x61\x81\xf0\x53\xd0\xc3\x2b\x0f\x8a\xf6\x9c\xaf\xa7\xfc\x09\xd2\x8c\xd4\x96\x84\xf2\x5e\x30\x4d\x20\xba\x31\xc4\xef\x07\x9f\x30\x8d\xab\xad\xf5\x4d\x30\x49\xf0\xea\x83\x84\xdd\x85\x27\xe6\x07\xdc\x26\x3f\x91\x0c\xb6\x07\xdd\x3c\xa9\xeb\x4d\xc2\x32\x09\x97\x09\xbb\xe3\x17\xd8\x15\x1c\x09\xc7\x84\x73\x1f\xcc\x9f\x63\xf3\xe7\xc4\xfc\xf9\x68\xfe\x3c\xc7\x1c\x74\x47\xd8\x92\x83\x05\x1c\xe3\xc3\xce\x02\x4e\x8a\x01\x7c\x9a\xac\xbf\xae\xe1\xc0\xbd\xae\xe1\x4b\x31\xf6\xdf\xf0\xe1\xc1\x02\x1e\x17\x58\xbf\x26\x1b\xee\x65\x24\x92\x68\x14\x14\x2f\x13\xb6\x32\xe9\xe1\xf2\x6d\xac\x92\xde\x69\x75\x7b\xf7\x42\x95\x97\xcf\x32\x55\xdd\xf9\xe4\xde\x49\xab\x84\x99\x54\x04\x0f\x44\x51\xba\x80\x57\x09\x7b\x22\xe1\x4d\xc2\x7e\x48\x78\x9e\xb0\x37\x89\x19\x8f\xcf\x09\x7b\xae\xe0\xc5\x7a\x22\xef\xf8\xcb\x40\x43\x18\x9b\xc6\xfe\xb0\xad\x7d\xbb\x76\x58\x94\x1f\x0e\x31\xfd\x61\x62\x53\x32\x62\x96\xa2\x0f\xeb\xc1\x6d\xe6\x44\x59\x66\x4d\x7c\x9b\xc0\x67\x3b\x96\x4f\x24\x4b\x56\xa6\x1d\x86\x08\x12\x88\x2b\xea\x7e\x0b\x34\xf0\xcf\x41\x02\xbc\x1f\x64\xc0\xef\x07\x2a\x27\xf6\x51\x20\x20\x7c\x1f\x70\x08\x8f\x83\x18\xc2\xcf\x01\x66\x3e\x7f\xae\x36\x65\x3e\x0f\x85\x69\xab\x34\x25\xdf\x1a\x44\x1f\x8c\x42\x43\xe1\x53\xb2\x3a\x0f\xf3\x7d\x08\x31\x0f\xf3\x8f\x84\x85\x82\xc4\x14\xe2\x4d\x19\x24\x7f\x24\x30\x23\xa9\xcd\x00\x67\x73\x73\x3e\x49\xd8\x58\xc2\xaf\xc9\xe6\x6b\x48\xc6\x92\xcd\xc8\x93\x64\xc3\xe9\x71\x2f\x93\x53\x95\x44\x22\x4d\xc5\xc8\x2b\xd6\xd6\x54\x90\xdc\x99\x5b\xec\x3e\x38\x5f\x72\x43\xcb\x4b\xb3\xe9\x54\x2d\x95\xdb\x59\x52\x5d\x7f\x4d\x88\xf7\x51\x5e\xca\x64\x26\x5b\xfa\x76\x2a\x82\x96\xd7\x91\x74\x61\x66\x0f\xf6\xe9\x2d\x89\xc1\xe6\x77\x79\x74\xeb\xc1\xa7\x84\x98\xf7\xf8\xb2\x4c\x0b\xd3\xfc\x50\x24\x94\x59\x7a\x6f\x17\xae\xb1\x84\x54\x90\xe7\x0a\x5d\xc4\xf0\x2c\xb1\x55\xd8\x34\x07\x47\x89\xf9\xb6\xa2\xd3\xc2\x04\x07\x8c\xc2\xeb\xe4\x27\x2f\x5a\x79\xbf\x81\xf3\x1b\x79\xf0\x0d\xf8\xc7\xa4\x7e\xff\xa4\x2c\xd3\x3e\xaf\x4f\x4b\xc7\xf3\x0b\x01\xf3\x23\x36\xd4\xcd\x0a\x98\x1f\xc0\xca\x6f\xb8\xc5\x10\x70\x54\x10\x40\xb2\x8c\x98\x0f\x4e\x59\x34\x37\x8a\x8b\x1d\x1c\xc7\xf4\xeb\x04\xf4\x7c\x2e\x6c\x54\x7a\xed\x1b\x66\xde\x2a\xbe\x19\x45\x88\xe2\x55\x70\x09\xfb\x98\xc0\xf7\x9f\xed\xa1\x77\xc9\xa6\x19\x63\x53\x7a\xc5\x66\xc6\x5c\xdb\x64\x5e\x38\x63\x7e\x2b\x96\x87\xdf\x93\xf5\xf9\x4c\xbf\x27\xf0\x5b\x02\x37\xe4\x5d\xe2\x64\x26\x43\x85\x0d\x65\xe2\x1f\x09\x23\xbf\x47\x28\x58\x7b\x2b\xf3\x2a\xda\xe4\x86\xc6\xdc\x35\x4d\x1f\x16\x39\x12\x7b\x46\xf0\x34\xf2\x90\xfd\x6e\x51\xca\x98\xfd\x50\xa0\xe2\xbf\xc8\x31\x6f\x87\x14\x33\x9f\x99\xaf\x99\x51\x4e\x31\x99\x22\x87\x6e\xbf\x4c\xbe\x8c\xf5\x9d\x90\x0c\xf3\x74\x1c\xf6\xf2\x04\x67\x02\xa2\x20\xc3\x04\x67\x19\x26\x38\x53\xa6\x4f\x34\xf0\x20\xf3\xf9\x82\x0e\x32\x46\x04\x43\x44\x3b\x74\x48\xf2\x3c\xf4\x9d\x3e\x68\xa6\x3b\x7d\xe8\xd3\x20\x7f\xc7\x6d\x62\xfa\x4e\x9f\x42\x86\xa3\xf6\x43\xad\x5a\x21\x56\xf4\xca\x35\x51\xb1\xd5\x70\xdd\x7c\x6f\x66\xae\x6a\x6c\xbd\x88\xff\x9b\x59\x38\x44\x57\x4c\x54\x63\x42\x7b\xb6\x21\x03\x9b\xbe\xdd\x80\x20\x79\x1c\x73\x0c\x09\x6c\x60\x16\xaf\xce\x31\x2d\x62\xd8\xc6\x2b\x51\x80\xc7\xec\x11\x44\x31\x8b\x33\x48\x56\x02\xf7\xf0\xa8\xae\x8d\x09\x6b\xb7\xb7\xee\x9d\xfe\x99\xde\x84\xc9\xd9\x3d\x7b\xa8\x4b\xe2\x3d\x92\xac\x23\x29\x63\x12\x33\x86\xd9\xcc\xd3\x71\xcc\x56\xa5\xce\x7c\x78\x68\xd3\x57\xae\x4a\x7c\xc9\x75\xeb\x2a\x49\x75\xeb\xe1\xc6\xbc\x97\xf9\xe6\x7f\x12\x13\xaf\xe7\x1b\x79\xb9\x2e\xed\xe6\x78\x92\x70\xdd\x48\xba\xc9\x63\xd2\x17\xbb\xbf\xd8\x8b\x3b\xdd\xfc\x99\x30\x8e\x19\x37\x2b\xf2\x5f\xe4\xe5\x6f\x8d\x63\x22\x3b\x07\xbd\x5f\xd4\x2f\x07\xbd\x5f\xfa\x62\xd7\x3c\x13\xdd\xe5\x14\x7f\x18\xe4\xa2\x83\x37\xec\xa5\xb5\x65\x8b\x57\xd7\x94\x45\x4c\x42\xc2\xd4\x7a\xbe\x88\xfe\x9e\x68\xb3\xa9\x06\xcd\xca\xae\xfc\x68\x59\xae\x65\xab\xe4\x5a\x66\xe5\x9a\xcd\x04\x8a\xee\xbe\xa6\x74\xcb\x60\x46\x38\x58\xf9\x67\x2f\x61\x87\x49\xbc\xfe\xca\xa5\xd4\xf2\x93\x55\x33\x46\x31\x9b\xc4\x70\xbd\x19\xfc\x7b\x09\xbe\x1d\x2f\x25\xd3\xce\x05\xf2\xfa\x3e\x12\x79\x1f\xad\xed\x1f\xb9\x72\xb6\x68\x14\xff\x38\x71\x29\x5c\xc5\x6c\x3b\x86\x8b\xf8\x27\xaf\x19\x9b\xc6\xec\x93\x82\xf3\x98\xa5\x19\xcc\x62\xf6\x1a\x6e\x63\x76\x0c\x9f\xd4\x32\x9f\x97\xcb\x89\xf5\xf4\x5a\xdf\xbd\xbd\xb3\xa0\xbc\x63\x63\x94\x11\xee\xdc\x2c\xa8\xaa\xa6\xed\xf6\xf7\x77\x0f\xc4\xc1\x2f\x44\x74\xfb\x0f\xef\xf7\x8c\xad\x96\xa7\x4f\x20\xd9\xe1\xee\x7c\xbe\x75\x9d\x11\x41\x87\xbc\xdb\x0f\x38\xed\x90\x6d\xf3\xab\xbb\x9d\x11\x04\xae\x22\x7c\x22\xc3\xa8\xaa\xa3\xe9\x22\x57\x6b\xb2\x66\xfa\x8c\xdd\xfe\x21\x1f\x22\x1d\x81\x2a\xb4\x1a\xe7\xf6\x8a\x87\x87\x7c\x3e\xdf\x79\xc8\x18\xe3\xed\x76\x5e\x69\x01\xbd\x73\x70\xff\xc1\x9e\xd8\x6f\xfa\x58\x6b\x18\xf7\x7b\x0f\xef\x1f\x94\x30\x55\x12\x8e\x9e\x03\x73\xff\xfe\xfd\x03\x71\xd0\x74\xa2\xd7\xd0\xf4\x7b\xbb\x07\x0f\x4a\x98\x83\x95\x68\xfa\xbb\xbd\xbd\x83\x8a\x9e\xfb\xab\x11\xed\x1f\xec\x3a\x44\x3f\x58\x0d\xf4\x60\xb7\x7f\xf0\xa0\x04\x7a\xb8\xb2\xba\x9d\xde\xc3\x87\xfb\x3b\x25\x50\x95\xff\xa3\x86\x6a\x67\x77\xff\xc1\x7d\x07\xaa\xbf\x1a\xd7\xc1\xce\xc1\x7e\xd5\x4d\xfd\x9d\xd5\xb8\x1e\x3c\xd8\xb7\x9d\xd9\x50\x21\x5d\x81\x87\x11\xc6\x28\xf0\xbe\x68\x92\xd9\x14\x8a\x8b\x05\xcc\xc8\x75\xec\xfc\x89\x62\x32\x22\x2f\x8b\xc4\x92\xe3\x8c\xec\x51\x98\x64\xc4\xeb\x7a\xd4\x79\xb9\xe3\xbe\xc4\xdf\x94\xc2\xcd\x86\xa9\xb2\xe3\x4e\x95\xcb\xf8\xe7\x6f\x9f\x2b\x74\x0a\x95\x5f\x3b\x8c\x39\xfe\xcc\x9c\x21\x3d\xd0\x3e\x2f\x74\xb5\x2d\xe7\x9a\x0c\xc1\xf0\xee\x2c\x22\x18\xa7\x7e\x79\xfd\x87\xc8\x2f\xa0\x99\x91\x1b\xb3\x54\x0b\x33\xd1\xb5\xbd\x77\xe6\x28\x66\x57\x19\x1c\x6f\x30\x24\xe4\x2f\xc4\x08\xf5\x0e\x5a\x10\x27\x2b\xd6\xae\x46\xf6\xcf\x5a\x97\xba\x7f\x6c\xb2\xce\xd0\x26\x0e\x32\x5d\x78\xe2\x2d\x77\x6b\xb0\xaa\xaf\x03\xa7\xaf\xa1\x56\x8f\xc5\xc9\xb5\x85\xf3\x0d\xc2\x38\xa6\xe6\x5d\xcf\xee\x6e\x16\xd0\x57\xf1\x9a\x74\xfa\xa6\xdc\x17\x4b\x48\x93\x19\x8e\xe3\xbf\x2a\xdf\xb7\xe5\x3b\xb6\xfc\x4a\x98\x6e\x0e\x63\xf8\xe5\xec\x2f\xda\x56\x7d\x8f\x62\x32\x26\xa1\x51\x07\x7b\xc5\xff\xa9\xd1\x50\xed\xd9\xec\x4f\x8a\xc2\xd3\x78\x83\x09\x6d\x94\xe4\x9a\x7e\xfc\x25\xfe\x5b\xf7\xcf\x95\xd7\x1f\x3a\xd7\xbb\x61\x48\x95\x3d\x4d\x8e\xac\x94\x68\xbc\xc8\xc3\xbd\xc6\xad\x98\x81\x4d\xd0\x2f\x71\x13\xd4\xd0\xf4\x6d\xc5\x9c\x61\x92\x18\xea\xfb\x10\x05\x9f\x61\x14\xf4\x21\x0c\x7a\xa6\x11\x98\xa0\x61\x51\x53\x68\xae\x34\x41\xcc\x66\x89\xff\x4c\x31\x4b\x8c\x59\xc1\x16\x14\x1e\xaf\x42\x3c\x23\xdf\x50\xbb\x5e\xc6\xf1\x52\xc0\x45\x06\xa8\xf8\x58\x24\xdc\x20\x79\xbd\x6c\x04\xdb\x45\x08\xb3\xe4\xb8\x48\x8c\xad\x5a\x65\xd2\xd6\xb9\xad\x1a\xa4\xc2\xa2\x42\x93\xf5\xeb\x3a\x13\xa0\x94\x12\xdd\x7e\xf3\x0e\x34\x10\xf6\x3a\xa3\x97\xf1\xfa\xeb\x78\x30\xbd\x65\xe6\x6f\xcf\xe7\xc6\x68\x28\xdf\x08\xf3\x46\xf8\x3c\x4f\x8b\x99\x67\x10\xb5\xf9\x43\xdd\x7c\x92\x15\xb2\xfc\xee\x1e\x81\xd9\x43\xc5\x52\xda\x49\x81\x2a\x74\x99\x76\xb2\xc8\xeb\xc9\xfd\x11\x70\x27\xe1\xa4\xc1\x16\x41\x96\xe7\xbb\x4c\x98\xb1\x55\x62\x96\x61\x62\xd2\x0c\x2f\x7d\xcd\x7c\x31\x68\x52\xd9\x20\x29\x81\xb8\xcc\xab\x89\xd4\x71\x5a\x10\x18\x35\xc8\x32\xdf\x8b\x8c\xa1\x39\x85\x65\x0b\x4a\xa2\x0c\x3e\x8e\x44\x51\x78\x15\xb3\x6f\xf0\x26\x5e\x7d\xe7\x4e\xf3\xba\xda\xbc\x12\x03\x70\x9d\xc0\x75\x42\xcb\xdb\x40\x79\x29\x8a\x35\x66\xeb\xd4\x98\xad\x53\xfb\x62\x50\x26\xe6\x7a\x65\x9a\x92\xd1\xe6\x94\xba\x26\x2f\xe3\xdc\xb1\x74\x4b\xde\xd8\x11\x88\x28\x24\xcd\x30\x38\xac\x3b\xcf\x82\x6a\xbe\x36\x16\x37\x07\x4d\x54\x21\x4a\x28\x6a\x6f\xcf\x57\xb5\x4f\xb3\x12\xcc\x5e\x1e\x84\x43\x50\x1c\x01\xae\xae\x23\xad\xe7\x3a\x2d\xd2\x8d\x9a\x06\x6a\x1f\x6f\x2c\xfa\x1c\xaf\x71\x1f\xed\xe4\xde\xa9\xe3\xd5\x76\xd5\x58\xc0\x79\x06\x9f\x63\x7b\x31\xcb\x8b\x35\x58\x1e\x42\x84\x48\xde\xae\xab\x65\x1f\xce\x11\xe0\x93\x5a\x55\xcd\x5b\x14\xd7\x2f\x62\x72\xa4\xa9\x3d\xf8\x7b\x69\xb4\x66\x94\x9a\x1f\x62\x63\xdb\xef\x2f\xe0\x53\xad\x7f\x6a\xfe\x85\xd6\xd2\xa4\x97\x6c\x46\xc2\x04\xbd\x8b\x8d\x6c\xc8\xa9\x20\x22\x4f\xaf\x01\x39\x94\xad\x5e\xc3\x8b\x98\x08\xdc\x98\x93\x4e\x80\x3e\x4a\x8a\x4f\x36\x71\x34\x8a\x07\x4c\x1f\x04\x1f\x62\xd3\xab\xdf\x36\x38\x3d\xac\x2f\xef\x96\x7c\x8a\x0b\x87\xde\x87\x18\xef\x98\xca\xef\x60\xfe\x11\xb3\xd2\x93\x95\xa5\x1e\x3c\x57\xd6\xb3\x25\xe4\x28\x3d\xd2\x1e\xbc\xb6\x3f\xb3\xa9\x91\x4e\x23\xe7\x4d\xaa\xb9\xd2\x2e\xc8\x38\x96\xe7\x42\x4d\x55\x2c\x35\x7a\xbd\xf0\x65\x91\x09\x39\x45\xbf\xd9\xb3\xc2\x6f\xc6\xa5\x4c\x34\x7a\x7e\x53\x0f\x8e\xd1\x9f\x76\x43\xbe\x81\x77\x2e\xa4\x50\x5c\x27\xea\xe3\x87\x57\x1e\x7c\x52\xf8\xe5\x48\xdb\x42\x98\x9d\xa1\x84\x4f\x05\x79\x52\x66\x51\xa4\x14\x9e\xe4\x0d\xc1\x64\x2e\xb6\xba\x1f\x31\xad\x53\xe1\xc1\xb3\x64\x0d\xae\x17\x78\xfd\x11\xfc\xba\x72\x65\x64\x92\xd4\x65\xbf\x0e\xec\x4d\xbb\xc6\xf6\x31\xbd\xf8\x6c\x83\x51\xf6\x55\xc0\xaf\x31\xe6\x41\xb1\x76\xd9\xeb\xf5\xd7\x43\x56\x19\xc4\x89\xb5\xa5\x29\xbc\x5f\xe9\x3c\x10\x32\x4a\x46\xe2\xe3\x87\x17\x8f\x93\xab\x69\x22\x05\x26\xe7\x5f\xc0\x47\x83\xfa\x2b\x85\x47\x1b\xd6\x77\xdc\xc0\x78\x6b\x33\x01\xa0\x9b\xf0\x7b\x9c\xc7\xe3\xb2\xff\xf0\x60\x07\x53\x34\x6e\xfd\x87\x07\xbb\xf8\xc4\x3c\xe8\xd9\x57\xcc\xc3\x73\x50\xf0\x2e\x66\xef\xe0\xb7\x78\x25\xcb\xb9\x3e\xa9\x8c\x69\xa2\x28\x29\xae\x3d\xdb\xa6\x77\xdc\xbd\xf6\x0c\xf5\x53\x39\x9f\x73\xc8\xcc\xc2\x6b\x57\x90\xcc\xe7\x10\xa1\xe0\x37\xc2\x1e\x6d\xbb\xa8\x9a\x33\x68\x6e\x62\x91\xc8\x08\x51\x9c\x3e\xe6\x97\x62\x91\x9f\xbb\xa0\xac\x5e\xfa\x7b\x5c\xbf\xf4\x49\x6f\x72\x41\xdd\x90\xdf\x62\x7b\x5b\x89\xce\x0d\xd8\x3f\xe2\xf5\x6e\xc0\xdf\x8d\x14\x5c\x29\xa2\xae\x62\xf8\x92\x81\x0d\x1b\x40\xf7\xdd\x18\xbd\x81\xfd\x05\xa8\x31\x5b\x73\xbf\xfe\xb2\x82\x80\x7e\x3c\x9d\x3b\xc4\x38\xad\x2e\x39\x50\xab\xae\xfe\x10\x94\x06\xf8\x69\xa7\xf0\x28\x16\x9e\xbd\x7e\xe3\xea\x02\xe9\x87\x9d\x3e\x6a\x74\x7e\xf8\x6b\xa7\x5f\xdc\x61\x10\xd4\x4b\x49\x9f\x1f\x77\x9a\x45\x55\x51\xac\xba\x41\x84\x82\xc6\xd6\xdd\x5f\x80\x18\xaf\x57\x0e\xcb\x75\x51\xd5\xee\xe2\x2b\x7c\x2c\x11\xfa\x58\x46\xb8\xbd\xdc\x5c\xfc\x30\xaf\x57\xb1\xfc\x59\x03\x44\xac\xb8\x3a\xb8\xba\xad\x4f\x57\xcb\x9c\x05\xcf\x6a\x1a\xe3\x82\x42\x36\x5e\x33\xac\x5b\x33\x22\xc6\xa8\xde\xf9\xdb\x0b\x0a\x7c\xbc\x7e\xf8\xb3\x71\xe1\x5d\x89\xc6\x2c\x5b\xb3\xe7\x53\x9f\x07\x89\xe3\x9b\xcd\x3d\xb3\x89\xe3\x99\x2d\xdc\xb0\xa6\xbf\x79\xcd\x05\xbb\x18\x44\x8c\x70\x46\x72\x2f\x6c\xf2\x57\x5e\xd8\xc4\xf5\xc2\x1a\xbd\xc7\x7a\xd0\x93\x31\x5b\xb6\x4e\x1e\xc5\x14\x88\x4a\xd8\x1d\xff\x12\xe8\x31\x44\x4f\x03\x22\x13\x76\x17\x3d\x0d\x2e\x33\x88\x3e\xe1\xfe\xeb\xbb\xe0\x32\x5b\x50\x3f\x7a\x6a\x5e\xc8\xc4\x8f\x3e\x99\x77\x32\xf1\xc3\x77\x0b\x58\xc3\xb9\xca\x7c\xad\xb8\x17\x5b\xab\x5c\x3f\x74\xf3\x7a\xa1\xc4\xe7\x5f\x68\xe1\x76\x2b\x58\x39\x24\xd1\xd8\x7c\x8a\x9e\x82\xe5\xdb\x9c\x69\xfb\x79\xae\xe9\x11\xba\xdd\x03\x07\x4c\x55\xee\xe3\x4e\x1d\x0a\x0c\x65\xff\x2f\x77\x6f\xa2\xdd\x36\xae\x2d\x0a\xfe\x8a\xc2\xa7\x4e\x01\xe5\x2d\x45\xb2\x9d\xa4\xc2\x14\x9f\x96\x33\x3a\x4e\x9c\xc1\x53\x1c\xd7\xc9\xf5\x02\x49\xd0\xa6\x4d\x91\x0a\x08\x4a\x96\x13\xfd\x4b\x7f\x4b\x7f\x59\x2f\x6c\x80\x83\x28\x52\x76\xd5\x39\xf7\xf6\x5b\x7d\xd6\xa9\x98\x22\x06\x62\xd8\xd8\x13\xf6\x60\xf4\xb8\xb2\x76\xaa\x66\x84\x05\x20\xb0\x8b\x93\x95\xb3\x65\x86\x56\x9c\x10\x9d\xe8\x10\x85\xba\xd6\x20\x29\x15\xec\xa6\xe5\x30\x54\xf3\xed\x60\x0e\x80\x85\x4e\xc1\x00\xe4\x9b\xe7\xfc\x66\xfd\xa6\x45\x3e\x34\xc5\x9b\x70\x32\xa4\x30\x4f\xc8\x90\x52\xc8\x54\xf7\x95\x54\x17\x83\x3c\x0b\xc6\x37\x4f\x0b\x78\xdf\x42\xf8\xe6\xc1\xc7\xcc\x90\xbd\xa0\x15\x5a\xc5\x82\x82\x1b\xac\x55\x16\x06\x05\x38\xa7\xc1\x5a\x19\xa3\x33\x23\xae\x5a\xaa\x71\xa6\x25\x5a\x37\xc0\xdc\x82\xf8\x6e\x46\xba\x8d\xf2\xed\xeb\x8c\x20\x91\x44\x4e\x16\x8d\x0b\x69\x6b\xdd\xa3\x8c\xbc\x93\x24\xd3\x59\xf7\xbe\xeb\x0c\x74\x51\xb0\x8e\xad\xc9\x47\x72\xd7\xb7\xb9\xea\x73\x46\xa2\x10\x47\x1a\x85\x18\xf2\x3d\x42\x1c\x4b\xef\x1e\x11\xb6\x0e\x31\x19\xc9\x77\x1c\x94\xdf\xb6\x4e\x8a\x89\xbb\xc7\xdc\x9e\xdf\xbd\x9e\xf7\x9d\x99\x59\x55\x88\xd1\x9e\x56\xff\x59\x50\x98\x2e\x8d\x70\x55\xd3\x9e\x77\x7f\xdc\x78\x49\xcb\xea\x32\x07\x92\xbc\x03\xf2\x57\xfc\x5d\xb1\x68\x69\x50\xcc\xb8\x2e\x74\x2c\x57\xf4\xab\x15\x57\x4c\x0b\xa3\x50\x4f\x56\xea\x3f\x59\xf9\xab\xec\x63\x4e\xa2\x20\xef\x81\x52\xad\x2c\x07\xde\xbe\x61\xa7\x0b\x10\x66\x93\xba\x81\x73\x2b\x9a\xf2\xb9\x74\x4c\xee\x22\xeb\x5f\x71\xf1\x24\x4c\xb6\x18\xb8\x15\x4e\x8e\x1e\x99\x34\xaa\x14\x22\x15\x56\x4c\xec\xbd\x8c\xe4\x8f\xd6\xc2\x02\xef\xad\x9d\x04\xe0\x7d\xb3\x2d\xb0\xc0\xdb\xb4\xbb\x81\x42\x8d\xd6\x4f\x0b\xbc\xa7\xf6\x40\x21\xcd\x84\xaa\x4a\x32\xe9\x7b\x6f\x55\xbd\xbd\x8c\xa8\xe7\x6f\x54\xd5\x56\x4f\x9b\xaa\x81\x7e\xeb\x7e\xa6\xaa\xd9\x7d\xe2\xad\xaf\xa6\x46\xae\x2d\xed\xe6\x62\x81\x1f\x7a\x8a\x40\xef\x06\x90\x16\x9f\xd0\x4b\x8c\x9f\x9e\x92\x69\x5e\xa2\x06\xaa\x5f\xea\xb1\xa6\xc5\x40\x75\x37\x54\x6b\x8e\x28\x8c\x15\x19\x39\x4f\xe0\x65\x48\x6e\x05\x85\xdd\x8c\xc2\x65\xf0\x4f\xb2\x75\x2a\x4e\x75\x64\x40\x58\x50\x4c\x5e\x6e\x32\x76\x4e\x82\x75\x8c\x71\x8c\xf1\x2f\x29\x5c\x04\xe6\xb6\x76\x16\x38\x51\x0c\xf3\xa0\x5d\x79\xba\x5d\x55\x9e\xde\x04\xcd\x42\xa1\x09\x54\x03\xd7\xc1\xfa\xfc\xd5\x3b\x81\xb1\xb8\x39\x0c\x8c\xfd\xcc\x51\xd0\x9a\x18\xfb\x75\x53\x51\xc7\x5c\x20\x2d\xe0\x6c\xed\x4c\xc7\x5a\x8f\x84\xa1\x8b\x0b\x39\xe0\x6a\x1d\xbf\x91\x4b\xe4\x4c\x49\xe4\xac\xcf\x0a\x1e\xac\xa7\x3e\xe9\xf5\xbb\x0f\x1f\xea\x07\x66\x98\x32\xfd\xcb\x57\x5c\x79\x18\x10\xd5\xd4\x43\xfd\x4e\x6e\xc0\x68\x46\x73\xab\x28\xd7\xa2\xe9\x87\x58\x54\x65\x7d\xb9\xa4\xd4\xa9\x66\x83\xe9\x73\xd0\xb7\xd9\x2f\x97\x57\xa4\x25\x15\x4b\xa1\x3d\x49\x4a\x67\x64\xed\x8f\x89\x46\xfe\x1e\xde\xfc\xf8\x46\x21\xe4\x61\x8a\x13\x33\xfe\xac\xa6\x0a\xd2\xeb\xf3\x32\x20\x99\x62\x84\x9e\xaf\xae\x90\xe6\xcd\x30\xb9\x4e\x51\x9a\x2c\x8d\x20\x76\x92\xaa\x2e\x6b\x2f\x84\xa4\xcf\x8a\xc4\x33\x2f\x03\x92\xf4\x7d\xbc\xf4\x6a\xff\xee\x02\xce\x83\xa6\xc4\xc8\x75\xae\xd8\xcc\xb7\x7a\xf3\x88\x46\x97\xc0\x90\x43\xf6\x90\x43\x0e\x03\x72\x44\x14\x45\xfb\x73\x50\xdb\x72\xfd\xb0\xbc\x00\x1a\x3c\x66\xe4\x3c\xc0\xd4\x66\x6a\x11\xf4\x94\x59\xdf\xaf\x4e\xf8\xd7\xaf\x24\x5f\x8e\x50\x2d\x87\x28\x97\x23\x5c\x19\x60\xb0\x9c\xa7\x67\x2f\x84\xb0\xcf\x20\xec\xbb\x10\xf6\xbd\xfc\x63\xa1\x5a\x96\x80\x2e\xd6\x8f\xa6\x34\x72\xdd\x53\xef\x5c\x72\x15\xc0\x32\x58\xa3\xad\x59\xf3\xf2\xa9\xd1\xfd\x83\xe5\xbb\xc0\xe5\x53\x02\x7d\x43\xfa\xe6\xbb\x60\x32\x46\x75\x8d\xbf\x58\x10\x2f\x27\xe3\xf9\x38\x46\xd3\xc4\xc6\xd5\x90\x45\x36\x1f\xa6\x60\xc0\xab\xe6\xef\xde\x0b\x8b\xb9\x99\x75\xd0\x53\xfc\x10\x34\x6a\x9c\xcf\x35\x6f\xf6\xbc\x32\x5d\x0c\x59\x40\x0b\xfd\xfa\xb2\xb6\xad\x9e\x94\x69\x41\xe1\x63\xd0\xa8\xcc\x10\xc4\x08\x3c\x92\xd6\xc2\x4f\x7e\xd0\x6f\x6d\x9d\x9d\xb0\x54\x6f\xec\xb6\xe2\x46\xd7\xc6\xe8\xac\x96\x41\x92\xa7\x81\xc3\x24\xbc\xbb\x83\x99\x3c\x0d\xc8\x4f\x8f\x29\xb1\x47\xd8\x84\x39\x19\xec\x06\xa4\xae\x36\x9b\x05\x80\x8e\x24\x25\xb7\x6e\xb6\x66\x34\x33\xe9\xd3\xc6\xb2\x50\x88\x29\xbe\xdc\xbb\xb5\x05\x78\xfb\x76\x0c\xde\x63\x7b\x47\x82\xcf\x6c\x09\xbe\x6f\x3f\x18\x2e\x8c\x82\x7a\x41\xe1\x53\x2b\xe2\x9d\x92\x77\x01\x58\x6f\x5f\x1f\x59\x8a\x1c\xc1\x45\xa0\xf9\xe2\x03\x43\xf6\x66\x01\x41\xf5\x99\xc5\x85\x48\x84\x05\x3b\x8a\x26\x2a\x22\x78\x12\xac\xb9\xfd\x22\xc2\x98\x4c\xde\x06\xce\x59\x0c\xaf\x82\xb5\xb6\xd8\xb7\x01\xcc\xc8\x89\xf9\xe7\x8a\x43\x4c\x61\x8c\x8c\xc8\x07\xbe\x52\x30\x93\x45\xa6\xe6\xb7\x6b\xe4\xd5\x57\x01\xf2\xbb\x5f\x04\x08\xd8\xc1\xa1\x90\x26\xba\x64\x56\xd6\xcb\xf4\xca\xc6\x59\xa3\x7b\x73\x71\xc7\x53\xf8\x32\x1f\x85\x63\x9e\x64\xb2\xc3\x6f\x3c\xce\x7d\xee\xd7\x63\x06\x7c\xe4\x72\x96\x88\xeb\x8e\x5e\xb4\xe7\x15\x6f\xac\x9a\xb4\x34\x09\xe0\x0c\xaf\x60\x0e\xfb\xde\x25\xdd\xb0\x3a\xd6\x86\xfe\xf1\x01\x0e\x02\x22\x14\x18\xd4\x2e\xbc\xad\xe3\x98\xe7\x16\x2e\x82\xa7\x93\x24\x4e\x79\x27\x10\xc9\xb8\xc3\x26\x21\xde\xa2\xf4\x59\xdd\xc3\x7a\x9f\x45\x41\x22\xc6\xdc\xef\x64\x22\x32\x75\xd0\x97\x4b\x93\xd8\x37\xcd\x07\xb1\x8c\xc8\x12\x97\xda\x45\x9d\xce\x2d\xb5\x36\x0e\x32\xed\x82\x90\xcf\xe5\xad\x02\x94\x4f\x8a\xfb\x3d\x49\xc8\xab\x50\x6f\xd1\xfe\xfd\x7b\x5e\xdf\xe1\xad\xe9\xf0\x8b\x01\xcb\x86\xcd\xcc\xeb\xc7\x1b\xd6\xa3\x15\xed\xab\x36\xad\x25\xeb\x18\x1d\x4a\xe1\x78\x8d\xd4\xb8\xab\xef\x15\xf1\x70\xbc\xf8\x47\x0c\xe0\x9c\x7c\x0c\x74\xba\x76\x9c\xc2\x7e\x48\x12\x0c\x98\x63\x84\xe1\x80\x68\x01\x80\xc2\xb5\xa4\xb4\x9a\x1b\x95\xc2\x8f\xd5\x81\x55\xaf\xbf\x45\x71\xfd\xfd\x60\x58\x5a\x78\xa1\xe6\x5d\xf3\x51\x79\x02\x48\x73\xa5\x8d\xea\xcf\xcf\x41\x7b\x86\xf8\x1f\x41\xb3\x29\x1f\x0a\xcd\x7a\x48\xef\x03\x67\x1e\xc3\xd7\xc0\xf9\x12\x13\x6b\xc2\x45\x1a\xa6\xf2\xad\x82\x8d\xd7\xe8\x74\xb6\x13\x45\x16\xbc\x0f\x28\x7c\x5b\x73\x4a\x3f\x14\x62\x78\xec\xb6\xd5\xfa\x40\x04\xfc\xf4\xa6\x76\x8d\x89\xaa\x05\x93\x39\x20\x7f\x69\x40\x42\xdb\xd3\xef\x2b\x01\xbc\xf3\xcc\x90\x63\x0e\x8c\x63\x8a\xcd\x19\x79\x29\x41\x89\x31\x31\xa5\x78\x14\x98\x56\x5f\x0a\xf7\x0e\x2d\x75\x9c\x5f\x76\xca\xf5\x63\x76\xaf\xed\x22\xd8\xbf\x70\x61\x1c\x40\xdc\xdf\x35\x3a\x52\xbe\xda\xb4\xd8\xb6\x5b\x24\xe4\xec\x12\x29\xf9\x21\x52\xf2\x23\xa4\xe4\x07\x90\x38\xa2\xbf\x0b\xa1\x2a\xd6\xc9\x59\xee\x95\x1e\x72\x7d\x6a\x48\xd1\x3f\xbe\x33\x39\x64\xb6\x36\x39\x24\x5b\x9f\x1c\xd2\xcb\x8b\x4d\x82\x4b\x98\x67\x24\x69\x48\x17\x29\x97\xd2\x45\x86\xf8\xc3\xcb\x52\x99\x8c\x11\xac\x30\xaa\x05\x1f\x5d\x4b\xa2\x53\x02\x63\xf2\x83\xef\xb5\x8c\x92\x9c\x8e\x76\x49\x0c\x4b\x59\x25\x39\xd5\x16\xee\x99\xab\xc4\x97\xed\x05\x30\xd7\x39\x10\xc4\x0a\x12\x2f\x4b\x2d\x0a\xde\xea\x5e\xb4\x5f\xee\xef\x11\xbd\xb7\x57\x76\xdc\x67\x23\xcb\xb2\x45\xdf\xbd\x02\xdc\xea\xcf\x81\x61\xd8\x45\xdf\xbd\xa6\x23\xf5\xaf\xbd\xab\x50\xfb\x75\x1e\x03\x67\x41\xd5\x7a\x20\x71\xea\x4a\x92\xb9\x14\x98\xdb\xec\xc4\x5a\x2a\x19\x4a\x23\x82\xc6\x11\x7c\x52\xeb\x56\x19\xc4\x65\x00\xf3\x90\x28\x1a\xa9\x06\xf1\xf7\x3f\xb8\xd5\x38\x51\xd5\xcf\x10\x76\x93\xba\x4d\x97\xa9\xc4\x3e\x2c\x57\xaa\xc9\xe6\x7b\x44\x98\x12\x54\xcb\xba\xc6\xf9\x22\x74\x1b\x99\x34\xdd\x23\xb3\x31\x49\xa3\x37\xa5\x7d\x77\x74\x41\x04\xd4\x0f\x38\x35\x17\x46\x26\xeb\xa0\x85\x09\x5c\x14\x70\x58\xb4\xb4\x78\x38\x27\x12\x3e\x26\x5a\xed\x73\x9a\x80\xec\x7b\xbb\x30\x23\xdc\xd5\xae\x5f\xc5\xc2\x24\x66\x61\x10\xf4\x7a\xee\xbc\x87\xbe\xe7\xc6\xf4\x64\x41\x21\x70\xd7\x61\xdf\xf8\x4f\x67\x50\xf2\xa6\xcb\xe8\xb8\x23\x14\x22\xea\x0d\xb5\xa7\xb3\x9a\xbe\xeb\xae\x37\x65\xaa\xf6\x26\xeb\xbd\x49\x73\x97\x2e\xfa\xac\xda\x2f\x46\x23\x4d\x14\xab\x29\x71\x89\xd3\x56\xc4\xf4\x4e\x92\x39\x71\x71\xfe\x70\xaa\x95\x8d\x6e\xf3\xb5\xfe\xe0\x4f\x91\x1b\x1e\x9e\xe3\x4d\x52\xa3\x2f\xa4\x1a\x1f\xef\xbb\xd5\x11\x16\xaf\xfa\x6e\x81\xa8\x79\x45\xc2\x36\x5e\x81\xb9\x15\xa1\x2a\xca\x99\xab\xbc\x8a\x01\x32\x7d\x99\xc6\x4b\xd0\x3f\x20\x7f\x65\x7d\xbc\x37\xeb\xb3\xef\x05\xc0\x62\x68\x18\x37\xff\x62\x6e\x91\xe1\x82\xe7\xb0\xa5\xa6\xac\xaf\xef\xcf\x3c\xdd\x7c\x51\x77\x98\xac\xf6\xf3\xf0\x61\xf1\x98\x77\x9a\x60\xa7\xa1\x93\x98\x6c\xae\x2e\x0a\xe3\xfa\x33\x0c\x58\xf5\x63\xb8\x19\x09\x1a\x53\x27\x12\x05\x45\x7c\xc8\xf2\x07\x0f\x86\x7c\xeb\xcf\x78\x34\x23\xa9\x0b\xa2\xb7\x0d\x4c\x49\x1e\x91\x0b\xf1\xc6\xd0\xfc\xc6\x84\xfc\xf9\x52\xe5\xa2\x54\xe1\x42\x79\x40\xfe\xe2\x66\x16\x85\x12\x90\x82\xef\xb6\x73\x2f\x91\xab\x6d\x32\x50\x51\xda\xb4\xe5\x85\x91\xc6\x2a\xcd\xd4\xd9\x94\x65\xdf\xd5\x76\x56\x2e\xf0\x0d\xc5\x5b\x07\x2e\xf0\x1e\xc2\xa0\x3e\x25\xdd\xd6\xcf\xeb\x14\x36\x31\x5a\x1a\xa9\x9a\x63\xd7\x79\x0f\x97\xed\x24\xd0\x88\xb2\xf9\x48\xbe\x0a\x9d\xda\xb9\x31\x16\x82\xa9\xf4\xe0\x82\xe8\xdc\xe6\x0f\x1f\x5e\x10\x6e\xb8\x14\xd4\xad\xad\x59\x94\x3d\x09\x78\x6b\x6c\xd6\xe5\xc2\x6d\x12\xb9\x35\xd3\x43\x0b\xc5\xa3\x1e\xe4\x18\x7d\xe2\xb8\x76\x8d\xea\xba\xe4\x14\xe5\x95\x89\x0b\x33\xf2\x51\xc2\x10\x24\x85\xb7\x26\x81\x77\xe6\xa0\xa5\x39\x08\x47\x67\x9e\xcb\x40\xd2\x47\x9b\xbf\x06\x14\x8f\xef\x8c\x1c\x24\x30\x23\x53\x17\x84\x56\xf2\x36\xf7\x97\x61\x7f\x5a\x73\x1f\x3b\x5f\x85\xfa\x7a\xe6\xc4\x8f\x32\x45\x73\x1e\x49\x30\xb9\x85\xf2\xd4\xd2\x97\x2e\xe1\x86\xaf\xe4\x12\x62\x4e\xfa\x8f\xb5\x2a\x19\x30\xd9\xe1\x8d\x44\x4e\xb6\x34\xb3\x18\x0d\x1f\x6d\xfd\x4e\xb2\x0d\xb9\x41\xe2\x9e\xa0\x8f\x62\x6a\x0f\x16\x14\x66\xeb\x90\x55\x8e\x1c\x72\x61\xfd\x01\xef\xb3\xbe\xfb\xeb\x57\x1d\x21\xe4\xc7\x98\xc1\xf2\x3d\x37\xda\x1e\xa9\xe7\xdc\x6b\x23\x53\x9c\x6a\xec\x78\x20\x1c\x0e\xd2\xd9\x25\x52\x61\x7d\xa6\x68\x3c\x8f\x52\xae\xb1\xd2\x57\x94\x2c\x8b\xce\xcd\x0d\x29\x48\xc5\xd3\x2e\x28\xcc\xdd\x26\xfd\xe3\x09\x89\x69\xff\x2a\x09\x63\x24\x0f\x70\xd3\x06\x13\x56\xae\x1c\x57\x7f\x85\x22\xef\x7a\xf7\x47\xb1\x3d\x77\xc9\x9c\xcc\x5c\xbd\x0b\x7a\x6f\x0d\x06\xbd\x6e\xc1\xa0\xcb\x9d\xd1\x42\x93\xdd\x00\x53\xf9\x74\x36\xfa\x9b\x8f\x7f\x1f\x73\x32\x23\x37\x86\x46\xfd\x4e\x86\x3d\xd4\x44\xec\xdc\x73\xcc\x83\x7c\xc8\x43\x7b\x4e\xae\x35\xa6\x9f\x91\x0b\xb7\xf0\x76\x3e\x74\x9d\x57\x70\xe4\x36\x5e\x31\xe5\x21\xc8\x0a\xbe\xe7\x69\x19\x3b\x8c\x57\x29\x29\xaf\x50\x52\x4d\xb0\x2f\x6d\xa9\x58\x80\xfb\x52\xd5\x5a\x04\x91\x39\x09\xf5\x50\x3f\x10\x0e\x3f\xd9\xb9\xea\x4c\x2d\x3f\xef\xb3\x73\xf0\xa6\xf6\x2e\xe1\x7d\x0f\x63\xb5\xa0\x09\x99\x12\x92\xdc\xc8\x3e\x5d\x2c\xf3\x49\x58\xf6\x7c\x5d\x97\x59\xd1\x63\xce\x2a\x65\x54\x4d\x66\x5a\xeb\xaf\x92\xc5\x0e\x9b\xbb\x63\x3d\xbd\x92\x07\xda\xae\xd5\x60\x5b\xaa\x86\xf6\xdb\xad\xd6\x7b\x5c\xef\xe9\x75\xbd\xa7\xad\x7a\x4f\x1f\xea\x35\x0a\x23\x75\xe6\xe4\x93\x51\x53\x65\x98\x56\xf4\x03\x61\xf0\xd3\x8d\x6c\x0f\x83\x8a\x9c\xd3\xd1\xa9\x3d\x23\x5d\x8e\xa1\xdc\xf4\x0b\xd6\x77\x23\x1b\x11\xf7\x70\xa0\x33\x14\x1d\xba\xb0\xe3\xea\xea\x50\xe2\xf9\x46\x49\xe2\x33\xea\x2d\xd5\x0a\x2d\xc0\xcd\x28\xa4\xea\x33\xde\x9e\xbe\x9a\xaa\xce\x76\x25\xd8\x1c\x47\x8e\x2f\x57\x40\xbd\x76\x8d\xdd\xc4\x59\x1b\x20\xa3\x5f\x20\x78\xc7\xfa\xd6\xe2\xca\x5d\xe7\xd0\xe6\xbd\xb4\x05\x78\xef\x55\xfd\xcf\xb6\x04\x6f\xcb\xe6\xaa\xd1\x4b\xd7\x39\x16\x70\xee\x3a\x8f\xfa\xff\xf5\x08\xf6\x5c\xe7\x85\x20\xc3\x47\x03\x0a\x1f\xee\x09\xef\x95\xa0\x7b\x5b\x68\xe8\xc7\xfa\xdd\x11\xb7\xf5\xce\xbd\xb0\x11\xc1\xee\x67\x20\x31\x14\x42\x75\x8b\xea\x00\xa3\x3d\xb5\x71\xdd\x13\x09\x6a\x6a\x16\x4a\xc4\xde\xb1\x6d\x59\x0b\xc8\x77\x83\xf7\xdd\x17\x6a\x1d\x0b\xe7\x6d\xc4\xba\xe6\x00\xbd\x36\x07\x28\x97\x92\x8a\x03\x74\x6f\xd0\x2a\x8f\x05\x7b\xbe\x32\xbe\xec\xee\xe1\xe5\xc0\xd2\x9e\x2b\xdc\x4d\x16\x0a\x94\x32\x4a\xcd\x5c\x28\x6d\x84\xdc\x7c\x88\xe8\x9f\xbe\xe6\x18\xb9\x7b\xab\xc7\xa3\x69\xfc\xc6\xe9\xdd\x74\xd7\x8c\x93\xdc\x5b\x1b\x91\x62\x66\x44\x85\x8c\x2e\x30\x00\x53\x0b\xa4\x2e\x28\x7c\x5c\x2f\xd1\xe7\x39\x3a\x73\x4b\xa7\x5d\xb7\x45\xdd\x9b\x87\x5d\x72\x19\x0a\xee\x6c\x0f\x25\x77\xd6\x45\xd1\xdd\xdd\x81\x40\xfd\x7a\x07\xae\x93\x6d\x58\xff\xeb\x51\xae\x5a\x4b\x1d\xee\x12\xb7\x48\xba\xb7\xaa\x76\xc4\xc9\x2b\x64\xfb\xce\xc8\x5b\xc5\x22\x0d\x70\xa3\x23\xbc\x35\xf2\x1b\x72\x79\x46\xb5\x98\x50\xb1\x13\xa1\x95\x39\x22\x0f\x6f\xcf\x7e\x65\x12\x8f\x62\xd8\x47\x64\x48\x5a\x37\x3c\x5c\x80\x2b\xa9\xc9\x4f\x8a\x26\x9c\x6d\x89\x73\x4a\x4c\xfc\x2e\x81\x0b\xad\x62\xd5\xb0\x96\x69\x27\x65\x6b\x81\x8c\x9a\xab\xa0\xec\x45\x70\xc7\x47\xb1\xd4\x95\x70\x19\x90\x56\x44\xa5\x78\x0c\x44\x55\xc8\x26\x55\x9c\x97\xce\x89\x87\x74\x5b\xd4\x09\xcf\x39\x89\x12\x60\xab\xe1\x34\x43\x7c\xbb\x02\x29\x71\x46\x22\x35\x0b\x0c\x85\x45\x9f\xaf\x6c\x8b\xaf\x46\xb0\x67\x47\xe0\x32\xdb\xef\xbb\xcb\x18\x42\x2d\xcc\xd4\x99\x91\xd8\x05\x09\x8c\x42\xd7\x99\x11\xa9\x9e\x93\x95\x9e\x96\xc3\x49\xc8\x3e\xbb\x1c\x05\x76\x88\x51\x25\xf0\x47\x98\xd8\x1e\xb0\xae\xdd\x55\x1f\x9a\x2a\xc8\x45\xda\x8c\x65\x33\xf2\xc1\x6c\xe0\x37\x0e\x22\x53\xa7\x63\x3f\x40\xd9\x90\xda\x65\xd9\xd7\xbc\xec\x8d\x29\x83\xb2\x2c\xcb\xb0\xec\x4b\x40\x78\x95\x5a\x57\x0e\xb3\xd0\x47\x4e\xa8\x23\x97\x92\x0f\x44\xc2\x4f\xcc\x64\x8b\xc6\xb9\x65\x94\xb3\xa7\x6b\x5b\x1c\x36\xb4\xf8\x63\x6d\x8b\xa3\x86\x16\xc3\xfa\xe9\x70\x4f\xea\xa7\x63\x1b\x97\x7e\xec\xcc\x88\x87\x76\x50\x90\xa8\xc5\x1f\xe3\x59\x19\xf7\x5d\xb8\x74\xc6\x7d\x0f\x26\x4e\xb9\x02\x52\xaf\xc0\x25\x85\xb1\x93\x92\x19\xf9\xe8\x42\xb7\xef\x5e\xe3\x3a\x4d\x1c\x7f\x54\x61\x85\x70\x7c\x63\x0a\x93\xef\x94\xda\x93\xfa\x46\xe2\x16\x9d\x20\x33\x3d\x29\xd0\xf6\xc4\xb9\x21\x47\x2e\xb8\x68\xef\xc8\x14\x28\x5c\x3a\x93\x6a\x5e\x71\x3d\x0f\x66\x4f\x9d\x09\xce\xa4\x1c\x18\xcf\x07\x56\x60\xc7\xa9\x73\x43\x3e\x94\x9d\x85\xaa\xb3\xe9\x6a\x67\x3b\xf6\xb4\xd6\x55\x56\xeb\xea\x59\x1d\xcb\xbc\xa9\xaf\xe3\x50\xa3\x99\x8b\xaa\x6a\xb5\x84\x58\x34\x2a\xbb\x00\xd1\x67\xaf\xe9\x68\x46\xbe\x15\x3f\xec\x19\x39\x2e\x7e\x80\xf7\x43\xe3\xec\xaf\x01\x79\x30\xac\x60\xe3\x4b\x44\x5e\x17\xce\x96\xe3\x38\xe4\xc2\x39\x27\x81\x1a\x9a\x22\xc0\x0f\x1f\x5e\xf4\xdd\x11\xa2\xa8\x8f\x4a\x70\xf9\x2a\xc8\x05\x12\x60\x4a\xed\x71\xb2\x3a\x90\x0b\xf5\x8d\xcb\xe2\x50\x7c\x0d\xc8\xa5\x9a\x77\x92\x00\xcb\xe0\x8a\x93\x4b\xa3\xd8\x59\x50\x38\x75\x9d\x79\x0c\xef\xdc\xaa\x12\x1b\x03\x14\xbe\x62\xf3\x4f\xc1\x57\xce\xaf\x2d\x38\x75\x29\x7c\x6a\x13\x56\x63\xe0\xed\xa9\x93\xf3\x68\x85\xcb\x56\x2c\x79\xac\xc2\xe5\x44\x39\x65\x98\xc2\x32\x61\x4e\x0d\xfd\x0c\x4c\xca\xe4\xd5\xef\xf1\x7a\x00\x5e\xf3\xe1\x5a\x04\x5e\xf3\xe1\xfa\xed\x50\xf1\xe5\x06\x9c\xe6\xdd\xd8\xbc\x58\x49\xbd\x86\x52\xad\xe1\x1b\x4e\xb4\xf7\x02\x53\xe5\x94\xc2\x3b\x97\x14\x06\x6c\x07\x6b\x79\x37\x93\x4b\xab\xea\xb4\x83\xe1\x3b\x5c\x63\x66\x72\x2c\xd6\x9a\x94\xa7\xda\xad\x60\x41\xe1\xd6\x75\x66\xe4\x58\xab\x06\x8d\x76\xfb\xdd\x2b\xeb\x3b\x45\xdf\xa1\x57\xae\x73\x1d\xc3\xdb\x56\x82\xfe\x5e\x92\xf8\x11\x8a\xfd\x6f\xdc\xfb\x3b\x17\x8a\x8d\xb8\xee\xce\xa2\xad\x13\x78\xdf\xfd\x8c\x01\x06\xca\x9a\x5c\x7b\x73\x81\x70\x44\xee\x37\xb8\xdf\x0a\x46\x55\x6a\xf9\x46\x23\xa9\x19\x79\xeb\x42\x8c\x49\xd2\x9f\xf0\x6d\x13\x8c\xe4\x4b\xfb\xed\x04\xa6\x37\x33\x72\x5e\x9f\x7d\x5d\x50\x38\x76\xdb\xaf\x5e\x66\x21\x6c\x6e\xeb\x6f\x14\xcd\xe0\xc9\x00\xf7\xef\xc5\xfa\x76\x43\xbe\xa5\xc7\x85\x37\x53\xeb\xeb\x3e\x19\x94\xdd\xab\xea\x9f\x5b\x95\xed\xb5\xf1\x4f\xfe\xff\x92\x9c\x9f\xc2\x7b\xb7\xfd\xa6\x7c\xf0\x67\x3c\x9a\x93\xf7\x2e\xc4\xff\xfb\x7f\x0f\x61\x97\x08\xb5\x0d\xc3\x87\xf1\x68\x97\x48\x10\xd4\x96\xd4\x56\x02\xd6\xd7\x35\x5a\xac\xf7\x5a\xcc\x45\xc5\x37\x7c\x5b\xf3\xad\x5d\x32\x23\x5f\x5d\x88\x7b\x63\x4e\x24\x85\x43\xd4\x4f\x69\xb0\x8a\xd3\xf6\xfe\xbf\xa9\xfe\xad\x01\xa6\xf7\xd0\x9b\x28\xd2\xbb\xf7\xbc\x80\xdd\x21\xdf\xc2\x46\x32\xbd\x1f\xe4\xba\x5b\x0a\x02\xc5\x3d\x9d\xe8\x79\xea\xcc\xc8\x0b\x01\x03\x4c\x2d\x95\x3a\x92\x01\x53\xaf\x4e\x02\x38\x75\x21\x4b\x29\x78\x6b\xa6\x76\x2e\x81\x28\x1c\xde\x7a\xe1\x37\xc9\xd2\x4b\xa2\x2f\x69\xc5\x82\x52\xf8\xeb\x7b\xee\x57\xac\x76\x25\x49\xef\x19\x9d\x25\x4c\xdb\x77\x45\xdb\x5f\x7c\xfe\x74\x68\x0c\x30\xb4\xb9\x35\x04\xab\x7d\xc7\xf5\x9b\xf3\x22\x4b\x8a\xce\x8c\xf2\x15\x0d\x5c\xcf\x89\x65\x6e\x75\x52\x0b\x66\xc4\x4b\xe1\x5b\x06\x44\x38\x82\xf6\xdd\x6b\x7d\xc5\x56\x7a\x30\xb1\x94\x08\xcc\xf1\xa9\x5e\xe7\x9e\x4f\xf8\x92\x9d\xea\x97\x3a\x9b\x09\xc6\xff\x39\x75\xd5\xfb\x13\xf3\x3e\x19\x8f\x79\x2c\xf3\xb7\x47\xe6\x06\xd1\xb7\x74\x3a\xf3\x57\xae\x4e\x71\x7e\x8a\xd7\x61\xbe\xc9\x20\x84\x1e\xb0\x29\x58\x6c\x32\x89\x42\x1d\x00\xeb\xd1\x55\x9a\x60\x76\xca\xd7\x35\x9d\xe4\xdb\x80\xcc\x49\x98\xe2\x8a\xdc\x6a\xbd\xb1\xdb\xba\xde\xec\x48\xf1\x2a\x47\xc0\x90\xf7\x3b\x81\xa9\x2d\x20\xb5\xe3\x7e\x0a\xec\xd4\xc6\x8c\xf8\xae\x6f\x63\x2a\x19\xf7\x8b\x8d\x89\xf2\xf7\x94\xac\xbd\xa0\x90\xb6\x82\x47\x10\x12\x84\xe0\x0d\xa6\xbd\xef\x28\x44\xa9\xd3\x28\x9e\x48\x11\x8e\x09\x5d\x80\x9f\x1a\x87\xa2\x99\x05\x4f\x06\xdb\x7f\xf0\xc7\xb8\x28\xbe\x05\x18\x70\x01\x7f\x5c\x5a\xb0\xf5\xc4\x3c\x8f\x2d\x8d\xd9\xd5\x96\x58\x78\x50\xbe\x53\x98\xae\x3f\x5c\x4f\x57\xfc\xec\xf0\x65\xc5\x65\xee\xd7\xaf\xa7\x0b\x35\xec\xa7\xbd\xfb\x58\xd6\xfe\x4f\xa4\xe9\x33\xcb\xd7\x4d\x5b\xa8\x1f\x63\x24\xa6\xa3\xa1\x3d\x28\x42\x18\xdf\x65\xff\xbb\x35\xac\x0d\xf3\xf1\xb3\x0d\x59\x1b\xe9\xb3\x41\xfe\xaa\x18\xec\x70\xb3\x78\x57\x0c\x78\xf8\x78\x98\xbf\x2b\x68\xc3\xf0\x8f\xe2\x5d\x41\x1f\x36\x87\x9b\xf9\xbb\x82\x46\x6c\x6e\x6f\xe5\xef\x0a\x3a\xb1\xf9\xb4\x78\x57\x09\xe4\x30\xd8\xde\x90\xf5\x95\xd9\xda\xda\xde\x40\x4b\x8c\x71\x7a\x37\x97\x72\xd9\x5a\xc7\x53\xab\xb7\x31\x23\x5d\x3c\x2b\x74\x43\x31\xd7\x93\xb4\x95\xcc\xd6\x97\x76\xab\x0e\x01\x7a\x37\x36\x9f\xd9\x9b\x7f\xd4\x61\xa1\x4e\x73\xb7\x06\x75\xa2\x3b\xac\x87\xde\x18\xe4\x4b\x5b\x8f\xa4\x51\x8f\x9a\x31\xa8\x47\xc8\x18\xae\x2e\xe2\xca\x0a\x22\x7d\xbd\x48\xef\xbc\xa5\x98\x91\x89\x5e\x1d\xc8\x9c\x84\x19\x53\xcf\xe1\xe6\x9f\x4e\xf6\xeb\xd7\x11\x7a\xa6\x95\xd7\xae\x3f\xd9\x57\x5b\x02\x9b\xd8\x02\xdc\x2d\x3b\x5e\x18\x26\x2e\x64\x24\xdb\x18\x52\x90\x8e\xec\x21\xc3\x3a\x4b\xdb\xef\xbb\x66\x64\x6c\xbe\x87\xe7\x53\x98\xcb\xa8\x79\xaa\xad\x97\x5c\xd6\xac\xe7\x60\x93\x05\x85\x1b\x53\x69\x9e\x36\x54\x22\x09\xee\xf6\x26\x7d\xb4\xf5\x4b\x09\x95\xd7\x2d\x67\x0a\xb8\x23\x9e\xb7\x9d\x79\xe9\x04\x48\x9a\x3d\x46\x24\xdd\x18\xae\xf8\x33\x5c\xa6\xa0\x2b\x10\xe9\xdc\xa4\xea\x21\x64\x64\xeb\x77\xd9\xdb\xa4\x0d\x81\xad\x8b\xda\x73\x55\xb5\x90\x4b\x97\x01\x83\xf7\x66\x64\x9a\x22\x86\xaf\x41\x88\x29\x19\x16\x25\x4f\x6a\x25\x9b\x45\xc9\xd3\x5a\xc9\x56\x51\xf2\x47\xad\x64\xbb\x28\x79\x56\x2b\x79\x5c\x94\x94\x80\x65\x8a\x9e\xa8\xa2\x1a\x84\x21\xf9\xde\x59\x43\xbe\x8f\xd0\xfc\xeb\xcf\xc1\x28\xb6\x07\x7f\x1e\x21\xd3\x36\x12\xc8\xb3\x1d\xae\x69\x55\x3f\xb3\x73\xb2\xa3\x96\xa0\x04\x53\x1d\x37\x64\x0d\xeb\x72\x98\x02\x26\xd8\x34\x40\xf6\xd9\xcd\x9f\xbe\x94\xcc\xf6\xeb\x74\x9d\x23\x91\x22\x43\xbf\xc7\x1b\x4f\xf8\xf6\xef\x02\x03\x4d\xc9\x0d\x25\xea\x9d\xb5\x7e\xf4\x86\xbc\x56\x1f\x3d\x2e\x3e\xf5\xa3\x78\x12\xc5\x40\x5e\x94\x9f\xbf\x6a\xc3\xf7\x48\x56\x0d\xbd\x22\xa9\xe2\xfe\x8e\x74\x7b\xb5\x24\x67\xfa\xb1\x27\xe9\xa3\x27\x7c\x1b\x81\xfc\x65\xda\x7a\x61\x9d\x22\x85\x96\x90\x29\xde\x48\xb5\x0c\x42\xc2\x91\xd3\x50\x0f\x3d\x35\xb9\x8c\xa2\x7d\xc4\x55\x5a\x98\x15\x5f\x90\x0c\xca\x4b\x44\xf1\x9c\x97\x95\x65\xc5\xf3\x54\x82\x69\xc5\x29\x1d\x71\x74\xd8\x38\x5f\xb3\xa7\x73\xf2\x32\xc5\xcb\xb6\xeb\x14\x6d\x4f\x8f\x52\x2c\xa6\x30\x40\x7b\xee\xa6\x96\xf5\x44\x54\xc5\xa1\xc8\x09\xc8\xb6\x5d\xef\xdc\xf4\x0a\xe5\x66\xe0\x4f\xdc\x0c\xf3\x24\x4c\x95\x41\xa1\x22\xdb\xfa\xfb\xdd\x0c\x2a\xcd\x37\xef\xdb\x7c\xb0\xd4\x6c\x58\x36\x3b\x4f\x61\x38\xd4\x41\x14\x96\xd1\x07\x16\x6d\x56\x4a\x06\x4b\x25\x83\x4a\x49\xad\xbb\x4a\xc9\xd6\x52\xc9\x56\xa5\x64\x7b\xa9\x64\xbb\x52\xf2\x78\xa9\xe4\x71\xa5\xe4\xc9\x52\xc9\x93\x4a\xc9\xd3\xa5\x92\xa7\x95\x92\x3f\x96\x4a\xfe\xa8\x94\x3c\x5b\x2a\x79\xa6\x4b\x6a\x48\x46\x4f\xc8\x78\x5a\x2e\x28\x7c\x68\x87\x77\x64\xaa\x23\x56\xf2\x7b\x3f\xd9\x95\x2d\x80\x5d\xdb\x79\x89\xc2\xeb\x37\x9a\x80\xc5\xc0\x04\xaa\x90\x6f\xd5\xe3\x8e\xd6\xb3\x7c\x44\x21\x69\x37\x5d\x1b\x2f\xf2\xc8\x3e\x40\x03\x07\x76\xa2\x1e\x62\x0a\x53\x7b\x4e\x3e\xa4\x80\xfe\xc6\x68\xdf\x47\xd2\x14\x9e\x6e\xf2\xc7\x08\xe1\x9c\x42\xaa\x2a\x22\xeb\x6f\x59\x90\x31\x82\x91\xaa\x28\x55\xfc\xf7\x01\x27\x1f\xd3\xe5\x16\x54\xf1\xe3\x3b\x52\x71\xe3\xba\x54\xf5\xb2\x67\x3f\x40\x7a\x7e\xda\x8a\x81\x10\x71\xf4\x62\x85\x3c\x17\x14\xde\xa5\x77\x38\x13\x19\xe3\xd7\x4a\x7c\x9a\x4f\x69\xbb\x02\xc6\xd7\xe9\x34\x4e\xd0\xd5\x46\xc9\x12\x0e\x0a\x0a\x9e\x83\xf2\x43\xe2\xec\x66\xc4\x67\x24\x4b\x09\xd3\x46\x18\xc5\x6f\xaf\xbc\x68\x30\x2b\x97\xe5\x2b\xc7\x8b\x95\x33\x11\x65\xeb\xcb\x34\x23\xa7\xa9\xf6\xf9\xa8\xae\x95\xa7\x17\x48\xaf\x76\xb1\x46\xac\xb2\x46\xd7\xb1\xc3\x5a\x23\xef\x56\xf7\x31\x53\x23\xe1\xaa\x6b\xa9\xba\x64\xe0\x5e\x2b\xb9\xf4\x8b\xe2\x6e\x0e\x6d\x0f\xdc\x53\x1b\x03\x3a\x9f\xad\x8d\xb8\x7b\x61\x73\x70\x2f\x55\x17\x89\x6a\x7d\x66\x82\x8e\x0a\x07\x83\x57\x84\xe9\xeb\x1f\x19\x8b\x30\x6e\x45\x90\x20\x7c\x3c\x18\xe4\x91\x65\xd3\x03\x7e\xc1\x6f\x2c\x08\x4c\x00\x8a\x29\x8b\x32\x5e\xc6\xc9\xa8\xc6\x8a\x3d\xd3\xb7\xca\xa7\xc2\xa9\xc6\x98\xbd\x2b\xac\x6e\x9e\x87\xef\x6f\x85\xd4\xcd\x93\xfa\xfd\xf3\x78\xba\x2d\xb1\x6d\x0f\x8c\x29\xf9\x41\xea\xb4\xc7\x0f\xc1\x80\x23\xa7\x26\xe0\x88\x92\x99\xf3\xd5\x28\xa4\xea\xe2\x45\x29\x7e\xe7\xaf\x6a\x01\x4a\x56\xc2\x91\x94\xd2\xff\x49\x42\x3e\x0b\x1c\xe9\x75\x19\x30\x04\x4e\x1a\x69\x58\x8b\x6e\xc1\x02\xf1\xbd\x9a\xe5\xf3\x43\x02\x12\x4a\xcb\xfc\x83\x54\x6b\x7c\x6f\x53\x87\xf0\xc4\x09\xc2\x7a\x14\xec\x98\xec\xc4\x84\x27\xe4\x15\x93\xbc\x1f\x27\x33\xa2\x6f\x88\x29\xbc\x4a\xab\x3a\x77\x13\x48\xfe\xa5\x9a\x6d\x22\xb4\xce\xfd\x6d\x7a\x57\xec\xcc\xdc\x09\xc9\xc4\xe4\x19\x99\xf0\x48\x23\x13\xde\x69\x64\xdc\xc4\x46\x33\x49\xa6\xc4\x78\xf5\xf4\x19\x70\xb4\x21\x64\x98\xac\x06\xbd\x69\x98\xf1\xaa\xc9\xcc\x5f\x6e\xfe\x4a\xf3\xd7\x20\x8f\x17\x42\x89\xf7\x37\xe4\x4c\x9d\x5d\xcb\x82\x07\x43\x03\xe9\x4a\x6c\x7f\x93\x3a\xea\xb8\x59\x96\x3a\x6f\xea\xdf\x53\x5b\x27\x87\x37\x88\xee\xda\x7e\x21\xd4\xb1\xc3\x97\x0b\xd8\x6f\x52\xef\x9c\x2b\x84\x12\x53\xf0\x51\xb9\xaa\x03\xe7\xa0\x9b\x9b\x4e\xb2\x50\x5e\x87\x3e\xc7\xfb\xd5\xf2\x12\x46\x71\x9e\x0a\x2b\xe2\xad\x88\xd1\xcd\x2a\x04\x68\xbd\x64\xf1\x6f\xb2\xe3\xf2\x4e\x18\x63\xae\xa5\x09\x4b\xa5\xa5\x11\x22\x6a\x93\x9b\xd1\x21\x5e\x5d\xfb\x80\xa6\x78\x47\xda\x1a\x5d\xa7\xec\x71\xbf\xa0\xc1\x29\x3b\xcd\x3f\xbc\x9b\x91\x80\xbc\x4d\x61\xad\xd7\xd3\x07\xf2\x26\x05\xb5\x38\x42\xad\x0d\x06\x02\xcf\x96\x71\x11\xc7\xeb\xf4\x4b\x9c\x7c\x97\x11\xd9\x77\xcf\xf0\x81\xe3\x83\xc2\xb2\xf8\x30\x23\xfb\x29\xa8\x47\x10\xea\x37\x42\xde\x71\x2b\x11\x38\xc2\x5f\xc8\x99\x2b\xd6\xed\x45\x3b\x51\x95\xad\x92\xd2\x9c\xbc\x50\xac\xc6\x70\xf3\x77\x01\xbc\x66\x54\xe1\x32\x85\xde\x99\x33\xdc\xfc\x5d\x8d\x6f\xab\x37\xa4\x1b\x4a\x3c\xcb\xfa\x6c\x42\xd5\x0f\x01\x9e\x92\x1a\xb5\xce\x7c\x13\x18\x55\xe2\x23\x73\x50\x36\x64\x30\xdc\x54\xa2\x57\x29\x0f\x30\x23\x0f\x28\x62\xb0\x31\x23\xc7\x6a\xa6\xec\xab\x16\x09\x90\x40\xd4\x38\x27\xbe\xf1\xf4\x77\x51\xc7\x58\x7c\x03\x11\xf3\x8f\x66\xea\xbe\x12\xbc\x6e\x85\xef\xd4\x3a\x2f\x4e\x37\x0a\x21\x69\xdb\x8e\x9d\xe1\x63\x10\x0e\xc6\xb9\x35\xc1\x66\x1a\x22\x92\x6c\xe5\xf5\x50\x9e\x68\xaf\xb7\x99\xd7\x43\xf1\x63\x4d\xc5\xe1\x12\xd3\x29\x01\xb7\x62\x2b\xe7\x3e\xd5\x7c\x14\x40\x9c\x99\xc7\x15\xb6\xb2\x6c\x33\x5c\xdf\x66\x60\xc7\xce\xa6\x9a\xdf\xe6\xba\xd1\x98\x4a\xeb\x96\x00\x57\x60\x08\xc2\x79\xda\x5c\xa9\x8c\xd2\xb2\xa6\x16\x92\xd5\x35\x12\xd8\x8f\x54\x81\x52\x0c\x3c\xd5\x36\xab\xef\xef\xa8\xbb\x55\xa9\xfb\xb5\xfd\x04\xcc\xc9\x5e\x9a\x47\x39\x2b\xe4\x1f\x0e\x92\x8e\xa4\x8d\x1d\xc5\xb8\x8c\xe8\x5c\xf9\xad\x01\x75\xf5\x1c\x14\x02\xf0\x4b\xcf\x5b\x07\x1b\x47\xcd\x2d\x7f\x34\xb6\xac\x0e\x5d\xd4\x5a\x66\xb9\x99\x49\x83\xe2\x27\x0f\x81\xcb\x97\xcc\x43\xf6\x5b\x3c\x65\x74\x0a\x84\x45\xc5\x9b\x39\x1e\x9d\xab\x33\xbc\x03\x5c\xfd\xb9\xa6\xd4\x3e\x27\xf8\xb8\x43\x01\x5f\x2c\xb4\x40\x39\x09\x40\x63\x78\x3c\xf0\xcf\xdb\x7d\x46\x3e\x90\x0c\x7e\xb2\x89\x62\xe7\x26\x4c\xfb\x45\xd6\x24\x9a\x4a\x0d\xdc\x89\x4d\x35\x71\xbd\x0a\x43\xe8\x0d\xd5\xaf\xf2\xbd\xd4\x24\xb4\x06\xf1\xba\x0b\x51\x1a\x48\xd4\x04\xa0\xbc\x7c\x47\x2e\x68\xd5\x1f\x91\x37\xd9\x3c\x57\x3c\x8c\x2f\x30\xaa\x78\x61\x99\xfd\xbc\x44\x14\x44\x28\x41\x1e\xcb\x31\xff\x0b\x23\xea\x25\x3e\xe0\x60\x87\x38\xee\xd8\x51\xac\x3d\xb2\xec\x3d\x64\xfc\xc5\x86\xf6\x0c\x65\xad\x4c\x7e\xbf\x3b\x12\xda\xb5\x83\xe3\x45\xa8\xd6\x26\x78\xce\x4a\xbe\xa6\xac\xcf\x44\x2d\xbc\x1c\x6e\xdd\xad\xda\x92\xab\x4a\x5a\x6f\x50\xb4\xb5\x52\x50\xf8\x8f\xb1\x3c\x10\x40\x91\xc9\xa8\xe8\x47\x27\x33\xdf\x91\xf9\xe4\x97\x08\x6e\x5e\x8c\x1c\x3a\x5d\x18\x57\xfc\xd6\x1e\x74\x4a\xf1\x8a\x69\xfd\x87\x10\xf4\xda\x09\xbd\x38\x17\x08\x17\x74\x84\x8d\xb4\x84\x25\x10\xf0\x96\x3e\x43\x28\x24\x18\xf2\xcb\x73\xbc\xf2\xc2\x58\xef\xec\x95\xed\x69\x29\x50\x49\x00\x08\xa6\x4a\xec\x4b\x94\xd8\xa7\xde\x25\x80\x00\xbc\x28\xa4\x5f\xed\xf6\xae\xd6\x26\x40\xa7\x25\x17\xa3\x0c\xb4\x4b\x54\x7f\x0e\x46\x03\x1b\x49\x99\xb1\x96\x4f\x9c\x39\x11\x10\x42\xd0\x76\x7b\x16\x8f\x66\x24\x8e\x60\x46\x52\x78\x32\x00\x8c\xfa\x6d\xcf\xc8\xb7\x14\xdf\x6c\x6e\xeb\x37\x8b\x92\xb9\xd4\xf3\xb8\xb6\x93\xbe\xab\x46\x9d\x60\x24\xfe\x22\x9b\x15\x0e\x2f\xd0\xdf\xac\x0c\x7b\xc5\x2f\x27\x3f\xfd\x72\xd9\x6f\xb1\xb6\xd8\x8a\x1d\x46\xbe\xa0\x88\xcd\x31\x23\xf1\xe8\x7d\x6a\x7f\x4e\xc1\xd5\x00\xb7\x32\xae\x40\x8f\x2b\x28\x22\x81\x45\xed\xba\xa0\x3a\x67\x3a\xc3\x0f\xe4\x1c\x28\x6d\xe2\x2e\xcf\x4c\x9c\x45\x1e\x39\x6f\x04\x64\x91\xb3\x2f\x80\x45\xad\x17\x5e\x87\xb6\xe8\xb3\x43\x34\xd7\xef\xbb\x14\x3c\x5b\x60\xe4\x32\xa1\x83\x9e\x81\xfb\xd6\x16\x3a\x72\x99\xe8\x33\x35\x5a\x2f\x72\xde\x0a\x48\x22\xe7\x95\x80\x30\x6a\x3a\xf4\x73\x92\x44\x30\x1c\x0c\x71\x83\x7f\xfd\xc2\x9f\x4f\x9e\x69\xbd\x5c\x2e\x25\x63\xf4\x2d\x2c\xd9\xde\xc2\xe8\xb4\xa6\xde\xf6\x63\xfc\x35\x92\x1b\x43\x5b\xe2\x35\x9f\x17\xe9\xe8\xb5\x15\x6d\x9a\xa0\xa3\x9e\x28\xd7\x3c\x5e\x50\x08\xa2\x76\x0d\xa7\xea\xf6\x09\x7e\x7e\x34\x23\xa1\x02\x24\x2f\xd2\x1e\x32\x06\x94\xc2\x28\x87\x45\x37\x5a\x6b\x88\xc9\xd1\xa3\x84\x6b\x5b\x8d\xa6\x28\xf8\xe8\x24\xf7\x35\x01\x13\xd0\xf6\xb9\xa8\xa2\x3a\x35\x74\x66\xa2\x64\xe9\x44\x12\x92\xfe\x59\x34\x88\xab\x91\xb2\xb4\xd3\x05\x8b\x8a\xc8\xa9\x69\xb4\x3e\x42\x65\x35\xb9\x86\x29\xc4\x8b\xc6\xa8\x55\xf4\xd1\x11\xff\x95\xf8\x92\x38\x33\x12\x44\xe0\xe9\xa4\x9b\x61\x40\x92\xd2\xfa\x24\x9f\xd5\x0d\x49\x23\x60\x08\x08\x7d\x76\xd8\x23\xc9\x06\xc3\x78\xf5\xc0\xfa\x1e\xcd\xd3\x65\xf4\x5d\x48\x9a\xe3\x94\x21\xee\xd5\xb5\xbc\x4a\x9d\x29\x71\xd5\xd2\xeb\xe0\x27\x6a\x54\xcf\x0b\x3f\xaf\xe6\x75\x65\x6a\x99\x9e\x67\x66\x23\x92\x90\x60\x64\x32\xfc\xb0\x96\xc2\x9e\x57\x02\xc5\x70\x8c\xc8\x50\x6f\x5d\x2c\x72\x86\xe2\x99\x5e\xe6\x04\xb4\x03\x7b\xab\xb9\x40\x87\x3b\x3f\xd9\x3e\x9e\x32\x0a\xec\xcc\x8e\x81\x6d\x2a\xe9\x87\x49\x0a\xae\x6b\xde\xbb\x81\x7a\xc5\x25\x05\xef\x8d\x2d\xc0\x9d\xe8\xf7\x8b\x7a\xae\x09\x0d\x92\x7f\x14\x51\xde\x2a\xa6\xae\x78\x2e\x44\xc9\xcf\xeb\xb3\xb4\x39\xd0\x69\xf3\xe8\x08\x57\x8c\xf7\xbd\x37\xc0\xfb\xae\x8b\x01\x9f\xb2\x48\x5b\xec\x51\x88\xd5\xe4\x54\x7d\x54\x91\xae\xd6\x9f\x20\x27\xcb\x23\xf8\xa3\xde\xe2\xd9\x1f\x4d\x0d\xd8\x7e\xde\x60\xb3\xd2\x20\x20\x51\x59\xe3\x4c\xf5\x1b\xa8\xa7\x4d\x38\x27\x02\x06\xd5\x70\x2e\xad\x35\xb1\xcf\xe1\xa0\x58\x00\xd5\x46\x9b\x43\x2d\x28\xbc\x11\xda\x12\xe3\x0c\x94\xc8\x16\x39\x4b\x61\xf7\x62\xae\x2a\xfc\x93\x18\x72\x91\x89\x21\xe7\xa7\x8a\x79\xd8\x6f\x08\x55\x65\xfe\xf9\x16\xc2\x00\x1a\x92\xaf\x54\x22\x9f\x7b\x61\x93\xe9\xf0\xcb\x8c\xc4\x1b\x88\x46\xb0\x27\x3f\x82\x6e\x40\x31\x1a\xfa\x15\x7e\x3b\x0f\xad\x65\xe2\x41\x4d\xa3\x22\x1e\xd4\xbe\xa0\xf0\x2e\x25\x5d\x49\xac\xaf\x22\x89\x2f\x3a\x7e\x26\xd0\xa8\xa1\xa3\xf3\xa3\x63\x90\xf2\x6e\xb4\xd6\xa6\x9c\x71\x7b\x92\x80\x7b\x66\xc7\x28\x03\x8f\x23\x13\x63\xe9\xf2\xce\x66\x04\xa3\xb3\xa2\x20\xac\x4e\x8c\xce\xd0\x6b\x8f\x23\xec\x67\x52\x6b\x2e\x1b\x9d\x9a\x0d\x0f\xcd\x08\x73\x70\x3f\xb9\x7a\x96\x7d\x76\x8a\xe2\x76\xb6\xca\x71\xcd\x89\x8c\xe0\x34\x45\x51\xa0\xc6\x79\xc9\x7e\xda\x77\xcf\x9e\xc7\x4e\x86\x8a\x88\xa5\x10\xbe\xba\x0c\xcd\x49\x49\x85\xae\x4a\xf8\x99\xda\x33\xd2\x8d\x20\x03\xd9\x4f\x51\xd5\x89\x3f\x15\x95\x74\xbf\x54\xf8\x64\x93\xfb\x06\x6d\xd6\x71\x88\xee\x17\x1c\x22\x0e\x98\xfd\x7f\x31\x54\x76\x5a\x0e\x95\x9d\x56\xf8\xf1\xb6\xa1\x7a\xce\x34\xd2\x43\x25\x99\x1e\x5c\x9a\x82\x87\x26\x4f\xea\xab\xb8\xe6\xf6\xc7\x14\x95\x50\x4d\xdf\x65\xcb\xdf\xcd\x96\xbf\xbb\x65\xd7\x9b\x5c\x46\x30\x8d\x2a\x6d\x2e\x23\xd8\x4f\xcb\xe1\x60\x6b\xbd\xe0\x97\x11\xf8\xb5\x15\xdf\x5e\xea\x8e\x9d\xe8\x6f\xc6\x9a\x7d\x39\xa9\xb0\x91\x2b\xd5\x2e\x23\xe8\xd6\x6a\x3d\x59\xae\x75\xb4\xd4\xd9\x51\x51\xed\xe9\x6a\xb5\xa2\xb3\xb2\xd6\x1f\xb6\x76\xc6\x5d\xd9\xef\x73\x22\xfb\x53\x25\xb6\xe1\x9f\xeb\x56\xf5\xd9\x1e\xae\x01\xce\x1f\x57\xa7\x94\x12\x50\x4e\x58\x62\xf3\xf7\x48\xbe\x3a\x5a\x03\x2f\xb4\x7f\x9b\x5e\x4a\xfd\xdb\x94\xc4\x45\xc9\x34\x82\x06\x15\xbf\x00\xa3\x81\x5d\x85\x2a\xcf\x49\xfa\x9e\xda\x23\x8e\xbe\xc5\xee\x17\x5b\x38\x49\x9f\x69\x55\x7f\x71\x8b\x94\x38\xc4\xab\xc2\x93\x86\x1a\x35\x61\x25\x2a\x79\xea\xf4\x7a\xe6\x4a\x22\x3f\xc0\xcb\x1f\x2a\xee\x21\x3c\x5c\x21\xef\x86\x6a\x1b\xa8\x15\xad\x37\xd6\xd6\x1f\x47\xeb\x8a\x68\x9d\xeb\x54\xd5\x49\x45\xab\xc5\x66\xe4\x4b\x0a\xe8\xec\x22\xfa\xec\x71\x11\x04\xb9\x66\xa5\x3d\xb0\x6f\x10\x61\x75\x29\xb0\xc7\xf6\x1c\x9f\x1f\x53\x70\x3f\xda\x71\x46\xac\x97\x49\x16\xf9\x9d\x38\x91\x9d\x34\x73\xc7\xa1\x44\xdd\xa5\xc2\xa9\x90\xa7\x4c\xee\x84\x29\x96\xcf\xb9\xec\x60\x12\x81\xbe\x95\x3b\x1e\x65\xd5\x68\xcb\xb9\xf9\xfb\x47\x3b\x4c\x2a\x76\xcc\xb9\x0d\xfc\xe7\x0c\xde\x20\xcf\x16\xa4\x3a\xe0\x22\xbc\xc2\x13\x78\x62\x0c\xc6\x7f\xa0\xc1\x38\xbe\xa8\x38\x42\x3c\x33\x87\x7c\xeb\x81\xa3\x76\x45\xa1\x90\x7e\x77\xb4\x9b\xd8\xa5\x43\x80\xdc\xa8\xa6\x7e\xb6\x36\xbc\xca\xa9\x2e\xc7\xe4\x29\x39\xb8\x38\x25\xac\x6a\x06\xac\xfd\x1f\x12\x33\xce\x39\x39\x70\x8d\x7b\x8b\x7b\xad\x58\xa6\x23\x8a\x03\xbf\x4d\x1b\x5c\x2d\x1a\x72\x7a\x22\x29\x2d\xb3\x7a\x62\x0e\xfc\xc7\xf6\x0d\xd9\x4d\x4d\x9c\x10\x0f\xe3\xc6\x0a\x04\x0b\x6f\xd7\xc6\x39\xe8\x64\x9f\x8d\xae\x8c\x02\xe6\xe4\x44\x2d\x19\xce\x5e\x8f\xf1\x3d\xae\xe5\x8a\x23\xc7\xd6\x03\x23\x68\x8f\x54\xb3\xdd\x44\x49\xb5\x0d\x23\x44\xb6\x80\x33\x20\x99\x3e\x8a\xc6\x5a\x71\x65\xcc\x33\xf2\x29\x45\x3e\xbd\x36\x52\xd1\x77\x3f\x2e\x60\xd9\x42\xfd\xc4\xa5\x15\x83\x15\xcd\x39\x37\x80\xa7\xb7\x0a\x9e\x7b\x1a\x0c\x31\x5a\x7b\xc7\x0f\xd3\x49\xc4\xe6\x1d\x16\x04\x3a\xec\x12\x66\x28\x4f\xd7\xc2\x22\xb4\x40\x78\x01\xa3\xde\xaa\x0b\xc5\x9e\x86\xd1\x12\x3a\x8f\x73\xe8\x44\xff\x9d\x29\xaa\xc1\xaf\xe9\x6a\xac\x8e\xca\xa8\xd7\x38\xa9\xaa\x1a\xaf\x56\x1d\xc7\x56\xfa\x50\x5b\xa2\xd6\x79\xa2\x71\x74\x71\x30\xa3\xa4\xc1\x17\x44\x09\x21\xa2\xac\xd8\x9f\xae\xb8\x32\xa9\xae\x5c\x5c\xf2\xc7\x90\x2c\x39\x07\x0e\x87\x76\x56\xfa\xe4\xe8\xa5\x4a\x30\xfc\xf9\x8a\x13\x0d\x5e\xd7\x28\x50\x58\x5a\x9f\x17\x7a\x7d\x92\x26\x9f\xbe\xdc\x7b\xa1\x98\x2f\x9a\x6c\x45\xeb\xa3\xa0\xbd\x7a\xfd\xe1\xf5\xd1\xeb\xe5\x40\x68\xf3\xa8\xe2\x65\xa0\xaf\xee\x8c\x8b\xc1\x4d\xf4\xf7\x2e\xd2\xfa\xae\xdf\x72\x97\x36\x8b\x40\xc0\x3c\xd2\x37\x1a\xd7\x7f\xa7\xdb\x86\xb8\x59\x2b\x97\x74\x27\x09\xc1\x7b\x3a\x74\x23\x6f\x5d\x81\x0b\x1d\x85\xcc\x3d\xd0\xce\x15\x87\x51\xa3\xfd\xf1\x21\xd3\x49\x1d\x72\x3f\xdc\x2b\xfb\xab\x20\x31\x05\x36\xb7\x63\x70\x4f\xf4\xbd\xf0\x51\xd4\x6a\x7d\xb8\x9a\xff\xdc\xcb\xf2\x7b\xfa\x1a\x44\x46\x49\x4d\x4b\x1a\x26\xf5\x6d\x8e\x33\xad\x3d\x59\x50\x78\x1d\x39\x07\xe4\xaf\x21\x6c\xc2\xe0\x3b\x85\xb3\x36\x85\xc0\x0a\xd9\xda\xac\x1f\x80\xb9\x3d\x23\x47\x51\xb3\xb2\x78\x8f\xc3\x61\xa4\xa6\xfb\x3a\xa2\x0b\x88\x6b\x3e\xc0\x2b\xe7\xb1\x6b\x1b\x07\x3f\x0d\xdb\xee\x7b\x44\x7a\x73\x7d\xcc\xe7\xe4\x1a\xb9\x38\xd8\x59\x9d\x7a\x4e\x21\xde\x2b\xda\x6e\x98\xf3\xbe\xeb\xd3\x55\xdf\x5e\xcd\x69\x7a\xcb\x94\x23\x6f\x5c\xf9\x9a\x26\x7c\x73\x72\x13\xa1\x91\x40\x57\x92\x23\x25\xcc\x78\xa3\x92\x64\xf1\x2a\xc9\xb2\xa8\xbd\x9b\x94\x14\x6f\xbb\x38\xec\x4b\xa7\x35\x44\x46\x85\x21\xdf\xe2\x69\xf7\xb9\x6b\x06\x49\xdf\xa3\xa8\x9d\xe0\x6e\xad\x53\x40\x4f\xba\x30\xf7\xa4\xf3\x1c\xb6\xe2\x49\x97\x50\xf0\xbe\x53\x6a\x37\x20\x81\x70\x81\xc1\x3c\x9b\x8f\x7a\xd5\xeb\x0f\xfd\xc7\xa3\x35\xf6\x56\xed\xbb\xbf\x82\x42\x87\x77\xa2\xd0\xed\xd5\x5d\x43\x37\xee\x55\x1c\x5b\x25\x85\x15\x6c\xeb\xee\xdb\x68\x79\xa2\xdb\xd8\x55\x72\xa0\xca\xbc\x8c\x70\x43\x13\x73\xec\x77\xc4\x34\x51\x90\x8a\x28\xf0\x9c\x28\xa0\x24\x5e\xd5\xed\x67\x0d\x8e\x7a\x6a\x74\x43\x04\xbf\x93\x14\x24\x64\xf0\x9a\x55\xd0\xe7\xba\x16\xe5\x1e\x2d\xb3\x36\x99\x76\xa5\x7b\xbb\x36\x67\x33\x3b\xb0\x63\x60\xc7\xb6\x04\xf7\x9b\xcd\xc1\xed\x6a\x4c\xf1\xca\x98\x7a\x24\x22\xbc\x08\x63\x16\xad\xcb\x1a\x2c\x8c\x65\xc5\x0b\xd1\x9e\xe3\x43\x9b\xa7\xa4\xea\x33\x87\x26\xe9\x77\xab\x06\x75\xd7\x16\x60\x52\x11\xc3\x1b\x33\x0e\xe6\xfb\x82\xa7\x69\xbb\x79\x8a\xd6\x40\xac\x37\x48\x11\x9c\xf9\xf3\x26\x73\x94\x94\x4b\x19\xd5\xac\x4e\x72\x83\x14\x3f\x4c\x99\x1b\xfd\x5b\x19\x9e\xcf\xb4\x35\xce\x84\x6b\xe3\x0f\x41\x4e\x12\xf2\x46\x89\x28\x79\x1e\x99\xdc\xf2\x64\x5f\xe8\xa4\x33\x7a\x72\x65\xb2\x99\x94\x93\x17\x42\x67\x72\x16\x77\xd8\x5e\xfc\x64\x1f\x6d\x09\xec\x93\x9d\x01\xfb\x6c\x73\x60\xcf\x6c\x06\x2e\xaa\xcf\xce\xf5\x92\xee\x9b\x25\xbd\x48\x4e\xb8\x48\xc3\x24\x2e\x17\xd5\xcd\xc2\xc8\x7f\x85\xc6\x3d\x4b\xaf\x8e\x53\x2e\x2a\xaf\x04\x8b\xbd\xcb\x6a\x46\x9d\x69\xb8\xdc\xcf\xb4\xd2\x71\xca\x71\xae\xda\xc4\xe5\x65\x94\x1b\xdf\xc8\x50\x4d\x71\x3f\xb7\xae\x89\x83\xf0\xc2\x82\x57\x62\xa9\xfd\xbb\x38\x48\x70\x51\x74\xa5\x28\x4b\x31\x4c\xdd\x99\xea\xf3\xad\x49\x6d\x7d\x1e\xdd\xc3\x1d\x27\xe7\x0e\xb4\x5b\xfc\xa7\x00\x62\x78\x19\x2d\xd3\x65\xa1\xe8\xb2\x36\x06\xdf\x8b\xd6\xdd\x80\x69\xfe\xff\x3c\x82\x82\xbf\x3e\x63\x70\xac\xf8\xeb\x1c\x41\xb8\x87\xf6\x4f\x17\xfd\x5e\x16\x06\xed\x51\xf8\x10\xb5\xc7\x15\x7c\xa6\xa3\x2a\x3d\x59\xbd\xa9\x7c\x62\xb0\xc5\x94\xec\xba\x70\xa8\x0e\xb9\xfb\xd8\x70\xf6\x1c\x24\xd5\x81\xae\xea\x58\xe1\x31\x32\x65\xde\xcc\xf6\xc0\x3b\xb5\x5f\x71\xe2\xd1\x8a\x34\x33\xd4\xe4\xc9\x83\xc4\x99\x92\xb3\x08\x8e\x10\x75\x0c\x4c\xaf\x0a\x33\x68\xb2\x51\x77\x37\x35\xdd\x7d\x56\xdd\x81\x37\xd0\xb7\x40\x1a\xe9\xed\x73\x60\xab\x26\xa9\x79\xc3\x53\xfb\xa5\x66\x0e\x0b\x01\xe0\x58\xbb\xa8\xe6\x1e\xaa\x35\xfd\x01\xfa\x4a\x3b\x73\x72\x15\x81\x89\x85\x9e\x2c\xd4\x10\x87\x7a\x68\xe1\xea\xd0\x4e\xed\xf7\x9c\x28\xf2\x34\xb4\xc3\x72\x54\x5f\xaa\xa3\x1a\xd8\x61\x03\x02\xf5\x4e\xed\x1f\x9c\x84\x34\x1f\x1e\xee\xe6\x6b\x4c\xaf\x7b\xad\xc5\xb8\x2b\x55\xbc\x2c\x5d\x06\xcd\x1d\xbd\xe0\x24\xa0\xcb\xf3\x7c\xc3\xc9\x5b\xf5\xb6\xd1\xed\x3e\x6f\x77\xb6\xcc\xbc\x6f\x37\xbb\xd9\xc7\x25\x1b\x36\x5c\x92\xf6\xf6\x12\x52\x2d\x6b\x89\x04\x20\x2b\xd1\x2c\x56\x6d\x8f\xcb\xc1\x5c\x25\x8d\xf4\x73\x46\xf6\x8c\x24\x51\x10\xce\x40\xc3\xa4\xe6\x38\xdc\xc7\xea\x33\xb3\x1c\x26\x83\x26\x98\xc4\xdb\xb9\x02\x0a\x35\x19\x74\x35\x08\xea\x4e\xbc\x81\xee\xc4\x80\xa0\xbb\xba\xcf\x03\xdb\x6d\x06\xba\xc7\xb6\xab\x8e\x75\x3e\x1c\xef\xac\xa5\x83\x33\xd3\x01\x5b\xe2\xd4\x52\x0d\x6c\xa6\xad\x01\xb3\x74\xb5\xf5\xd0\x4e\x9b\xa1\x6b\xd3\x4e\x9d\x1b\x72\x51\x74\xd1\xcd\xe7\xd0\xd0\x49\xd7\x74\x52\x0c\x61\x05\x24\xdc\x15\x46\xe7\x8f\x7a\x95\xf9\x4a\x95\x7a\x88\x00\x2f\xae\x57\xd9\xac\xf3\xb0\xde\x75\xa5\x4a\x8b\x94\xf6\x63\x99\x75\xfb\x18\xad\x4f\xfb\x38\xb3\x39\xdc\xda\x12\x32\x9d\xcb\x2b\x83\x1d\x4d\x71\x76\xa3\x66\xf7\x3c\xf7\xe1\x43\x62\x59\x9a\xf7\xd2\xca\x40\x37\x4f\xc4\xd0\x67\xb0\x1b\xa1\x76\x84\xda\xa7\x0b\x38\x6d\x45\xc9\xd7\x32\xbf\x38\x1c\xe9\x28\xbd\x76\x9e\xc9\xc1\xc4\x50\x7e\xb7\xfc\x71\x29\xe6\x95\xa6\x3e\x6f\xc8\x5a\x46\x17\x1e\x33\x6c\x43\x91\x22\x6a\xb1\x80\x4f\x6d\x28\x5c\x07\xac\x75\x2c\x93\x53\x4f\xaa\x79\x49\x1d\xac\xf0\x81\xcc\x23\x15\xc6\x8e\x7a\x64\x20\x9d\x77\x11\xde\x30\xe7\x57\x73\x95\x0c\x8d\xe2\xb9\x44\xf7\xf5\x58\xd5\x89\x97\xee\xde\xb4\xed\x85\x0e\x54\x0c\xa7\x91\x0e\xd9\x52\x4d\x7e\x40\xe1\xa0\x75\x8d\x5a\x42\xcb\x3f\x88\x4b\xff\x79\x93\x04\x6b\x39\xbd\x81\xe8\x67\x79\xd4\x48\x5a\xae\x19\xde\x6c\x3c\xcf\xe3\xa8\xf1\x3e\x7b\xf8\x70\x39\xb2\x5c\x51\x27\x76\xe4\x62\x41\x62\x32\x25\x1f\x23\x38\x5d\xf1\x8f\x7c\xa9\x69\x74\x39\x51\xbd\xe3\x0f\x1f\xea\xc8\x69\x7d\x36\x8a\xfb\xae\x1d\xd3\x85\x92\x25\x33\x0a\x6a\x1d\x08\xa6\xfb\x3e\xa2\xfd\xee\xa8\x9b\xd8\x18\x77\xe0\x53\x04\xdd\xc4\x44\x0d\x7e\x68\x69\x54\xa9\x76\xff\x09\x30\xa9\x65\xeb\x93\xe8\x5e\x36\xd9\x97\x8a\x71\x62\x0a\x76\x6f\x6d\x0e\x07\x76\x02\x87\x36\x83\x23\xdb\x83\x63\x3b\x83\x5d\x0d\xcb\xb7\xd1\xdf\xc8\xe4\x26\x49\x11\x68\x98\x07\x46\xd5\x8c\xdc\xf5\x1a\x75\xc7\xc7\x08\x44\x7f\x07\x44\x3f\x03\xd1\xbf\x05\xd1\x9f\x41\x7e\x9b\x84\x89\x15\xa3\xa5\x5c\xf3\x45\xa6\xf9\xf6\x0c\xea\x71\x7f\x07\x77\x34\x43\x33\xfa\x5b\xb4\xa2\x9f\x3d\xaf\x8a\xce\xaf\x70\xdd\xcf\x28\x78\x7a\xab\x4a\xa6\x52\x0f\xb7\x39\x39\xe5\x8c\xdc\x46\xe8\x4f\x73\x9e\xc0\x69\x06\xfb\x21\xc1\xc7\x2b\x06\xf3\x90\x58\x01\x8b\x52\x6e\x69\xcd\x3a\xbc\x8d\xd6\x44\xe9\x68\x4c\x90\x5f\x7c\xe3\x20\x51\x64\x05\x4f\xe5\xda\xfb\xe4\x19\x79\xab\x46\x43\xa4\x23\x1a\x2f\x31\x6f\x2b\x01\x47\x71\x92\x6a\x59\xd4\xa2\x08\x88\xfb\x33\x20\x78\x79\x7a\x46\x09\xda\xf7\xd0\xef\x68\x67\x92\xbb\x93\xbf\xa9\xcc\xdf\x5b\x93\x2a\xaf\x71\xa5\xb5\xbb\xc2\x99\xc1\x0c\x1a\x11\x60\x6e\xc0\x92\x38\x5c\x90\x18\x3c\x3a\xca\x47\x56\xa4\xa2\x29\xb6\xe1\xbb\x42\x82\x45\x40\xd1\x05\xec\xaf\xd9\x8f\xc6\x04\x30\xae\x41\xaf\x79\x32\x47\x14\x59\x17\x4a\xca\x9b\x91\x2b\x38\x51\xdf\x7c\x21\xee\xf3\xcf\x1b\x41\xf2\xb8\xf0\x14\xf6\x8b\xd0\xd1\x14\x7f\xe8\x08\xd1\x78\xdf\x72\x1b\xc1\x4a\x8c\xe8\x1c\x52\xe6\x98\xcf\x94\xea\x36\x45\xa4\x69\xaa\xe0\xac\x12\x0d\xdb\xfc\x2e\x43\x5f\x9b\x17\x3a\xd2\xb5\xf9\x61\xfc\x08\x8c\xfc\xa7\x06\xa7\x44\xb9\x30\xbe\x50\xc3\xab\x25\x4d\x4c\xfe\xdd\x9d\xd3\x27\x4d\x23\x68\xcc\x24\xeb\x24\xc4\x33\x28\xbf\xc0\xe1\xa7\x1a\x87\xd7\xa1\xcd\x84\x97\x15\x14\x62\xbd\xa7\x44\x22\x94\x95\x9b\xaa\xc4\xc4\x99\x92\x73\x0e\x8f\x0e\xde\x7d\x7c\x6b\xc1\xb5\x44\xd9\x1d\x01\xfb\x4d\xb9\x32\x6a\x66\xf8\xee\x0c\xdf\x72\x3f\xd4\xd7\xd9\x27\x62\x39\x0d\x6c\x5c\x1a\x91\xc6\x90\x39\x72\xed\x29\x13\x80\xce\x44\x59\x7e\xce\xc2\x35\xfe\xfc\xf9\x0d\x9a\xa0\xe0\x5e\x2b\x14\x9c\x80\x70\xc9\x38\xa0\x30\x09\xc8\x29\x35\x29\x2b\xc3\x96\x81\x1b\x18\x8a\xf9\xcc\x42\x5d\x87\x80\xb0\x0a\x47\xea\x39\xf7\xb5\xd0\x20\x82\x10\xda\x30\xe8\x94\x9c\x28\x70\xdf\x91\xf0\x60\xa8\xfe\xad\xfc\x1f\x53\x4d\x99\x0f\x55\x3e\x5e\x05\x57\xbd\xda\xab\x03\x3c\xc3\xd3\x8e\x2f\xb5\xd0\x48\xe1\x4d\xe4\x90\x2c\x71\x50\x19\x76\x05\x9f\x39\xec\xab\x79\x5c\xc1\xcb\x04\x2d\x27\xd4\xe3\x55\x02\xfb\xe6\xf1\x07\x87\x50\x3f\xbd\xe7\x70\xa6\x9f\x5e\x70\x78\x6b\x8a\x5f\x71\x78\x65\x1e\x75\xd4\xc5\x86\x99\x69\x3e\x66\x41\xbf\xd3\x26\xb3\x09\x44\x89\x4d\xec\x14\x5a\xc6\x64\x28\x6d\xee\x47\xce\x0f\x01\x5f\x22\x13\xd9\xf1\x58\xdb\x2e\x6c\x2d\xe0\x85\x7e\xda\x5c\xc0\x0f\xfd\xf4\x64\x01\x9f\xa3\xfb\x24\xb9\xba\x6a\x31\x51\x1e\x03\x77\x5e\x32\x1d\xf5\x76\x46\x3e\x47\xda\x44\xc9\x4d\x74\x6e\x5f\x6b\x22\x12\x3f\xc3\x46\x16\x04\x09\xc6\x7e\x53\x52\xeb\x48\x51\x74\x5b\x51\x7f\xaf\xa9\xd5\x45\x2d\x5d\x41\xde\x32\x69\x08\xb1\x84\xcd\xf3\x08\x4a\xd5\x4e\x82\x5a\xb8\xa8\x1d\xdd\x89\xd1\x05\xfd\x7b\xb1\x9e\xc2\xa6\x58\x4f\x15\xfb\x8d\x9a\x8f\xf5\x4a\xe2\x8f\xce\x75\x82\xfd\x04\x7a\xf6\xd6\xd2\xc0\xfd\x9a\xcf\x8d\x19\x38\x64\xce\x2d\x27\xf9\xd2\x5d\x4a\x39\xb1\x1f\x3d\x8a\x12\x8f\x45\x97\x49\x2a\xed\x67\x83\x67\x5b\x8f\xac\xaa\x52\x23\x82\x73\xed\x2c\x3e\x76\x7e\xea\xbb\xbc\x53\xbc\x99\x93\xa5\xc2\x3b\x4a\xc0\x3d\xb1\x87\x15\x30\xec\xae\x62\xc9\xe9\xea\x2b\x7f\xf5\x55\xb4\xfa\x2a\x5d\x7d\xe5\xae\xbe\x0a\x56\x5f\x85\xab\xaf\x1a\xb0\x77\x03\x29\x66\xab\xaf\xb2\xd5\x57\x0d\xe9\x6e\x1b\xd8\x38\xb1\x86\xb3\x53\x12\xad\x0f\xee\x13\x3b\x04\xf7\x99\x1d\x80\xe7\xda\x1e\x78\xd7\x36\x07\x2f\xb6\x33\xf0\x7e\xd8\x12\xbc\x99\x9d\x82\x37\xb7\x19\xde\x86\x82\xf7\xce\x4e\xc0\x3b\xb5\x23\xf0\xce\xec\x18\xbc\xae\x3d\x05\x6f\x60\x8f\xc1\x1b\xda\x5d\x70\x0f\x6d\x77\x51\xff\xdf\xf2\x75\x6c\xbe\x73\x0f\x86\xe0\xee\xe3\xa5\x1f\x99\x91\x8b\x04\xc3\x14\xaa\xc7\x4b\xf5\xe8\x51\x4a\x38\x25\x21\x25\xb3\x84\x6a\xbe\x99\x64\x94\x30\x4a\xc2\xa4\xfc\x2f\xa0\xc4\xa3\x44\x52\xf2\xd3\xbb\xb1\x93\x85\xe6\x92\x7f\x08\xe7\x36\x56\x20\xf2\xbe\x15\x21\x94\x92\x88\xd8\x20\x96\x6d\x6d\x9c\x15\xe9\x8e\xe0\xeb\x3a\xab\x5b\x23\xa1\x49\x7b\x97\x48\xd8\x25\xa5\x74\xf6\x2d\x6a\x67\xe8\x12\x45\xc4\x4e\x5d\x13\xdb\x28\xf6\x9d\x6f\x11\xb1\xbc\x88\xa5\xe9\x47\x36\xe6\x16\x05\xe1\xe7\xae\x5d\xee\xb5\x92\x12\xa5\xef\x7c\x8b\x89\xe5\x87\x53\x8b\x02\xd7\x3f\xd2\x09\x8b\x2d\x0a\x99\xef\x7c\x8d\x81\xf9\xce\x8c\x48\x1f\x4e\x01\xb1\x39\x37\x4f\x99\x4f\xac\x0f\x09\xf3\xc3\xf8\xa2\xdf\xef\x5b\xf4\xbb\x0e\x8a\xe3\xf9\x8e\x10\x90\xf8\x2d\xb1\x65\x92\xe3\xc9\x84\x8b\x97\x2c\xe5\x84\x2e\x20\xf4\xff\xc6\xd5\x9a\xbe\x57\xcb\x95\x10\xcb\x77\x11\xcc\xaf\xe3\x8a\x4f\xac\xb8\x4c\x0b\xf4\xa4\xdc\x4c\xca\x44\x4d\xcb\xf5\xef\x19\x8e\x29\xd5\x0d\x43\x8b\x42\xe4\x3b\x4c\x80\xef\xb7\x2f\x7c\xe4\x43\x0c\xa6\x07\x81\x56\x6b\x53\xdf\xf1\x04\x74\xfd\x86\x2d\x8e\x9d\x78\x64\x05\xac\x37\x0e\xe3\x2c\xb5\x6c\xf5\x38\x89\xb2\xd4\x2a\x11\x51\xe0\xab\x45\x3e\x41\x5c\x14\xfb\xc4\x72\x65\xdc\x71\x65\xdc\x4b\x32\x19\x85\x31\xef\x85\x71\x90\x74\xdc\x44\xf8\x5c\xf4\x06\x9d\xb1\xe8\x0d\x3b\x63\xb7\x37\x44\x76\x61\xea\x83\x35\x66\xe2\x22\x8c\x7b\x11\x0f\xa4\x05\x56\x6f\x4b\xf0\xb1\xda\x23\xbd\x87\x29\x76\xae\xba\x0d\x18\xea\xdc\xf1\x13\x63\xd1\xdb\xc4\x3a\xa7\x6a\xeb\x15\xfb\x96\x18\x73\xc1\xb1\x06\x23\x19\xca\x48\x81\xd0\xa5\x5e\x97\x2c\xb2\x28\x4c\xf4\x33\xb3\x28\x5c\xf8\xda\x96\xb0\x75\x89\x8e\x78\x1e\xec\xae\xb5\xca\x8f\xc0\x54\x21\x07\xe4\xaf\x1c\x5f\x5b\x80\x4f\xa9\x7a\xfc\x8e\xa6\x49\xfe\xda\x04\x42\x71\x35\x63\x85\x09\x20\xa2\xfd\xa0\xc1\x58\xa5\x38\x17\x3e\xc9\x30\xab\xc9\x48\x1f\x33\xd6\xef\x8e\x08\xfa\x84\x14\xa9\xe7\x62\xc7\x24\x38\x98\x49\x82\xb1\x45\x13\x09\x63\x49\xe4\x86\xd5\x51\x27\x85\x52\x4c\xd9\xdc\x58\x07\x6b\x88\xa6\x1a\x82\x62\x7e\x93\xea\x57\x6b\x5f\x1b\x4b\x92\x0f\x44\x67\xd0\xca\xf0\x63\x95\x9e\xf4\x07\x36\x4c\x6f\x4b\xef\xf5\x3b\x0c\x1d\xdf\x78\x02\x0f\x48\x1e\xdf\xa9\x9f\x4e\xa2\x50\x92\x47\xff\x4a\x37\x1e\x5d\x28\x71\xf3\xc6\xec\x31\x13\x17\x5c\x5a\x14\xae\xf5\xc6\x4a\xdf\xa2\xb0\x63\x9e\x2f\x2d\x0a\x87\xe6\x59\xf1\x9d\x47\x7e\xfb\xfd\x7b\x8c\x6e\x1f\x7d\x36\xa4\x74\x54\x01\xe7\x1d\x79\x1f\x78\xce\x45\x94\x46\x80\xcd\xcf\x4d\xa7\x06\xb0\x16\x5e\x7d\x28\x90\xb5\xf3\x0f\xde\xf9\x25\x8b\xc2\x09\x23\xc5\x48\xdb\xbe\xa7\x0e\x67\xfb\xe7\x16\x14\x5e\xeb\x55\x89\x14\xae\x38\x5b\x5a\x15\x0e\x85\xc0\xd4\x9e\x21\x42\x54\x33\x44\x28\xa9\x62\x74\x9e\xe7\x07\xc6\x0c\x71\xf6\x39\xc6\xef\x30\x22\x6e\x25\x27\x0c\x2a\x73\x04\x9c\x93\x53\xd0\x52\x04\x85\xab\xb5\x87\xa3\x9e\xb2\x32\x2e\xbc\xa1\xfc\xe7\x78\x07\xe4\x6b\xaf\x84\x3e\xa7\x79\x6a\xad\x97\x66\xc7\x99\x8b\xa7\xff\xdc\x77\x24\x83\x3d\xbf\xcd\xfd\x0e\x62\x67\x97\x10\xee\xcc\xc8\x99\x6f\x62\xb3\x4a\xf8\x2c\x49\x25\xe1\x0d\xad\x06\x6a\x6f\xc5\x05\x9f\x0b\x5c\x10\x53\x8c\xd6\xee\x62\xde\x8e\x50\x89\x38\xe8\xf8\xec\x56\x18\xb7\xd7\xbe\xde\x39\x85\xfb\x26\x49\x1a\x6a\xee\x19\x05\x92\xd0\xb3\x34\xcc\xb1\x28\xbc\x88\x7b\xa1\xe4\xe3\xb4\x87\x8e\xe6\x9d\x28\x4c\x65\x4f\x87\xf4\x57\xaf\x4b\x00\x9c\x28\xa4\xea\xf6\xb6\x4b\x10\x94\x05\x48\xcc\x7a\xc3\x01\x96\x6e\x76\xfc\x5e\x10\xf1\x9b\xce\x4a\xc7\x79\xb3\x1f\x4a\x64\x85\xc1\x9f\x2f\xd0\x8e\xf1\xbd\x3a\x09\x9e\xdf\x24\x88\x88\x8c\xfc\xec\xda\xcf\x30\x77\x1b\x4a\x62\x47\xbe\x8e\xb7\x62\x2b\x48\xb3\x28\x10\x0c\xd2\xf9\x94\xf6\xbb\x23\xfd\xc6\x7e\xc3\xb4\xef\xc0\x31\x7e\xe3\x34\x53\x6b\x73\xd8\x77\x79\xa5\x0a\x52\xeb\x96\x63\xe0\xb3\xf8\x82\x8b\xca\x41\x68\x83\x7d\x3e\xe7\xbd\x34\x62\xe9\x65\xc3\x01\x28\xd4\x0c\x8a\xf4\x17\x43\x88\xff\xd3\x43\x70\x79\x14\xb5\x8c\x61\x3f\x2b\xbe\xbf\xac\x2a\x2d\x2e\x6f\x46\x5a\x7e\x75\xac\x8d\x2f\x21\xf9\x92\xad\x9a\xec\x97\xde\xd1\x21\xea\xd0\x07\x26\xd3\x98\xab\xf8\x34\x0d\x6e\x95\x14\x87\xf7\xc6\x2b\xb7\x0c\x63\xc8\x36\xcf\x28\x0a\xe3\xeb\x95\xb9\x7c\x08\xe3\x6b\x8d\x50\x08\x26\x03\x83\x0b\x22\xd0\x5b\x2e\xc7\xa2\x2f\x8b\x5e\xf0\x30\x76\x0a\x48\x1c\x62\x37\x38\xb3\xb7\x4c\x9f\x13\xf6\x9e\x96\xd0\x63\x18\x38\x1d\xf1\x1f\x3d\x50\x34\xda\xfa\xe0\xaf\x49\x47\x5c\xe4\x09\x1a\xb5\x7b\x39\x68\x1b\xe3\x72\x79\x64\x75\x79\xf4\xc9\xaa\x32\x27\xf9\x72\x2c\xc3\x84\xe4\x37\xb2\x67\x54\x54\x86\x7d\xc9\x52\x2e\x7a\x29\x8f\xb8\xa7\xd8\x97\x30\x0e\x65\xc8\xa2\xa2\xb4\x37\x4e\x6e\x7b\x77\x54\x99\x71\xf7\x3a\x94\x77\xd4\x32\xdb\xe5\x25\x91\x92\x19\xad\xff\xf5\xd8\xf5\x06\x7e\x41\x77\x32\x9f\x88\x8d\xdf\x1c\xeb\xb7\x8d\x78\xe3\x37\xeb\x37\xdc\x92\xbb\x28\x8b\x26\x28\x07\x8c\x9c\x13\xad\xba\x86\xb1\x4f\xac\x37\x08\x82\x1d\x77\xde\x91\x97\x61\xda\x89\x98\xcb\xa3\xca\x57\xac\x8d\x9c\x7f\x5e\x00\xa7\x76\xc3\x12\xa9\xcf\xa4\xdc\x4b\x62\x9f\x89\xf9\xea\x8a\xaa\x3e\x3e\x26\xb2\x83\x0b\x6e\xce\xc3\x77\x85\xc0\xbd\x5f\xbf\x30\x92\x35\x46\xd2\x61\xce\x7a\xf4\x33\x1c\xe4\xf8\x67\x4e\xba\x0a\xff\x30\x34\x6c\x92\xce\x57\x41\x30\xee\x14\x5e\xbd\x8c\xce\x24\x91\x8a\x35\xc1\xe3\x65\xd9\x4b\x3f\x53\x0b\xa4\x53\x1b\xff\x38\xd2\xa3\x1d\x14\xcb\x3e\xbb\x0c\x25\xef\xa5\x13\xe6\x71\x0b\xac\x38\x99\x09\x36\xa9\x4c\x45\xea\xe1\x2f\x41\xd5\x69\x1d\x0b\x8f\xdd\xde\x96\x81\xfa\x44\x02\x83\x5d\x92\xe8\x58\x3c\x62\x34\x23\x97\x45\xb5\x12\xc3\x9b\x21\xe4\xe7\x64\x46\xf6\x7c\xc0\x24\xac\x59\x71\x4e\xf4\xa1\xf8\xe8\xb7\x5f\x34\x60\x8e\x5e\x75\x4e\xa6\x09\x4c\xb5\x01\xa8\x5f\xb5\x14\xd2\xc7\x47\x7b\x58\xc5\x26\x67\x58\x5c\xbd\xe7\xa9\x4e\x61\x12\xf5\x1e\x9b\x01\xed\xca\x36\x3a\xe8\x92\x0f\x3e\x9e\x4a\x4c\xa6\xe8\xe2\x35\x51\x88\x77\x35\x7b\x10\x43\x86\x52\x1e\xad\xda\xfd\xbb\xb7\xc8\xe5\x32\xac\xe0\x20\x12\x63\xaa\xc9\xf3\xe5\x0e\x67\xe4\xa3\x8f\x01\xae\x14\x91\x05\x85\xf5\xb2\x42\xb3\xfa\x89\x29\x70\xd2\x3b\xaa\x61\x2a\xed\x04\x49\x16\xfb\x68\x96\xee\x89\x3b\xc4\xcf\xf7\x81\x11\x3f\x4f\x95\x04\x44\x2c\xef\x92\x7b\xd7\x78\xb8\xdf\x69\x26\xf3\x52\x8e\xa3\x37\x89\xe2\x20\x3f\xe9\x17\xa1\x2a\x3c\x30\xe2\x56\x3c\xc9\x14\x03\x7a\x62\x58\x2a\x7d\x56\xe0\xd6\x2f\x2d\x57\x0d\x93\x0a\x45\xcf\xdf\x29\xaa\xbb\x5e\x19\x1e\x76\x3e\x51\x8c\xca\x5b\xbf\x5d\xb8\xce\x19\x06\xb5\x0d\x31\x9b\x22\xed\x6e\xa2\xf5\x63\xa9\x60\x57\x01\xb0\x56\xcc\xf7\xbc\x24\x96\x22\x89\x8a\x9f\x6a\x00\x6e\x72\x53\xb6\x3d\xc0\xb6\xaf\x7c\x33\x6d\x2c\x83\x4f\x3e\x31\x42\xd6\x72\x37\xbd\x7c\xb2\xa7\x7e\x99\xc2\x92\x52\xf8\xcc\xf4\xbd\x90\x04\x91\x51\x43\x21\x66\xe4\xa4\x18\x56\xad\x97\x7c\x8d\xde\xf9\x05\xc9\xc9\xf4\x63\x8e\x56\x28\xbc\xf1\xd7\x3b\x6f\xb6\xaf\x87\x49\xc1\x54\x3d\xd2\xaa\x0a\x92\xb0\x0a\xa3\xce\x4b\xb6\xdb\x20\x57\xe6\x5d\x2b\xe0\x89\x7d\x0b\x2c\x29\x58\x9c\x4e\x98\x40\x1d\xb5\x41\x03\x41\x12\x6b\xa4\x7c\xc9\x45\x58\xbe\xf6\x32\x91\x22\x3a\x9e\x24\x61\xac\x15\xdc\xba\xc0\xe0\x59\x44\x19\x31\x37\x4c\x5d\x3e\x14\x8d\x78\xf1\xd2\x0b\x07\xa3\x67\xbd\xef\xdf\x33\xa8\xf1\x17\x0d\xaa\x85\xe1\x1a\x85\x63\xdf\xf9\x8d\xc7\x53\xa7\xaa\x8e\xfd\x0d\x5e\xf8\xce\x1f\xf0\xc3\x77\x86\x5b\xf0\x19\xe5\x5d\xa9\xb9\xd8\x6b\x09\x5d\x89\xfe\xf1\xf0\xfe\x1e\x5a\x82\x61\xa1\x25\xf8\xda\x04\xd7\x3a\xac\x94\xb1\xcc\xfe\xa6\x6a\xa4\x09\x58\xd7\x7c\xfe\x32\xf1\xb9\x05\x18\x5a\x9e\xc2\xb1\xc8\xfd\x12\xfd\xc2\x89\xb0\x1b\x54\x1d\x09\x93\xa0\x74\xf5\x8b\xa7\x85\xab\xdf\xb1\xd0\x59\xaf\xc5\x54\xab\x7b\xc6\x2c\x52\xe0\x23\xa7\xb8\x06\xe9\x84\x47\x11\x02\xaf\x92\x73\xa7\x78\xa4\xf4\x80\x28\x64\xd3\xd6\x90\x63\xde\xb9\x16\x9c\xaf\x75\x70\x9d\x2b\xcc\xf5\xca\x3e\x80\xe7\xc4\x53\x45\x3e\x12\xe7\x84\x69\x20\xcf\x4c\x38\x65\xd7\xc7\xc8\x5a\x9e\xc2\xda\xa1\xf3\xd9\x27\x9c\x42\xe0\x5c\x10\x0f\x97\xd1\x24\x63\xf9\xc6\x00\x45\x11\x93\xfc\xc6\xb2\x6c\xaf\xdf\x1d\x59\x97\x2c\x35\xfc\xa3\x65\xe3\x8f\x34\xf3\x3c\x9e\x56\x55\x28\xe5\x29\x16\xc9\xac\x13\x27\xbd\x8b\x4c\x4a\x2e\xd2\x16\x76\x7d\x57\x73\x86\xcc\x53\xdf\xab\xa1\x01\x2f\x89\x3a\xd6\x86\x28\x94\x2b\x61\xdc\x9b\x85\xbe\xbc\xb4\x40\x8e\xac\xad\xc1\x60\x72\x63\xd9\xd6\x26\xfe\x6d\x40\x22\x8d\x9f\x57\x67\x97\xc7\xb2\x97\x4a\xc1\xa5\x77\xd9\xd4\x4e\x7d\x15\x11\x44\xcf\x5c\x12\x2e\xe3\x98\x4f\x7e\x73\xf6\x53\x3c\x16\x41\x22\x0a\xfc\x80\x5b\x4b\x1e\x0c\xd5\x6e\x62\x8a\x30\x8f\xd4\x9c\x81\xd5\x11\xff\xe1\x57\xdc\xa6\x1b\x77\x29\x4f\xf6\xf6\xc2\xa7\x26\x27\xdc\x03\xc7\xc9\xf2\x46\xef\x99\xaa\xf7\x3c\x76\xce\x09\x83\xb0\xe2\x86\x68\xcc\x54\xba\xa3\xcc\xb5\x67\x64\xdf\x87\x07\xc8\x61\xf7\x59\x41\x6f\x32\x77\x41\x21\xf3\x48\x4b\x96\xe6\x17\x3e\x1d\xa9\xde\x87\xd4\xc6\x9a\xd2\x23\x5f\x59\x81\x15\xcb\xf5\xaa\xac\x55\x8f\x4d\x26\x3c\xf6\xcb\x25\x5b\xe5\xda\x26\x22\x1c\x33\x31\xb7\xd4\xd9\x27\x01\x85\xa4\x81\x1d\x53\x1c\x9f\x1c\xd5\xf7\xc4\x4b\xa2\x1e\xcb\x64\xa2\x08\xc3\x66\xd3\xc6\x35\x6e\xda\xe4\x2e\xbe\x51\x09\x0c\x9e\xc1\x5f\x77\x88\x41\xbd\x64\x45\x78\x30\xee\x3b\x95\x91\x97\x4c\x0d\xcc\x88\x98\x16\x7d\x29\xc8\x50\x2c\xf7\x12\xdf\x5d\x4e\xfe\x25\xd2\x96\x8e\x01\x27\xe8\xf0\xfe\x45\xdf\x6a\x66\x7c\x91\x04\x20\x6b\x3a\x36\x50\xed\xb2\x94\x23\x8e\x46\x6c\xfc\x95\x91\x63\x9f\x96\x7d\x1f\xfb\xe5\xe8\x4c\x76\x0d\x36\xbd\xa7\x32\xd6\x9b\x36\xd8\xac\xe6\x6a\x26\x4a\x47\x45\x78\x3c\x6b\x45\x8b\xaa\x86\xec\x8b\x64\xe2\x27\x33\x7d\xec\xb5\xce\x13\xd1\x11\x9b\x62\xac\x83\xca\x20\x85\x21\x1d\xc9\x74\x1d\xfb\x50\xd2\xe2\xe0\x49\xc7\x0f\xdd\xce\xd8\xdd\xec\x8c\x45\xa3\x4a\xc0\xe3\x9a\x8c\xad\x65\x11\x4e\xd5\x97\x15\xe1\x97\x05\x64\xf3\x2a\xa7\xb8\x59\xdd\x23\x9c\x40\x41\xda\xc3\xe9\x3d\x89\x5c\x30\x75\xfe\x00\x77\xea\x6c\x0f\x20\x9d\x2a\x12\x16\x4d\x9d\xad\x3f\xc0\x9f\xde\x33\x1f\x7b\x6e\xf1\x54\x24\x64\xbf\xd0\xb9\x50\x0b\xc4\x71\x9a\x11\x49\xab\x69\xd9\xa7\xd3\x95\xb4\xec\x39\xbd\x60\xe7\x68\x37\xe0\x46\xa8\x9a\x75\xc7\xc8\xb5\x7a\x53\x6d\x54\xfb\x01\x5d\x2e\x26\x01\x68\xaa\xa0\xc3\x81\xb6\x11\x55\x7f\x9a\x2b\x8a\xde\x49\x8c\x97\x9b\xa1\xd1\xb2\x18\x25\x0a\xe1\xe8\x1d\x96\xfa\x76\x7d\x12\xc0\x69\xf6\x77\x7a\xe4\xd8\x5b\x13\x51\xb9\x03\x33\xd7\x13\x45\x36\x61\x65\x3e\x25\xb2\x0d\x1d\xbb\xd3\x62\x55\x7d\x8f\x84\x05\xf2\x8d\x96\xde\x27\xc5\xfb\xb4\x7c\xaf\x24\xa0\x49\x00\x89\x41\xe0\x6c\x8a\x08\x3c\x43\xbd\x68\xbe\x1a\x79\xb3\x60\x5a\xc1\xe5\x32\xef\x21\xf2\x0a\x5c\xfe\xd9\x27\x0c\x3d\x55\x4a\x7c\x6e\xbc\x90\xf5\xf2\x86\x53\x8d\xcf\x59\x05\x9f\x27\xeb\xf1\x79\x30\xa5\x23\xf5\x85\x21\xb5\x13\x83\xcf\x5d\x0f\x55\x5c\x29\x7e\x57\xf1\x2e\xc8\x1e\x7a\x59\x6a\x41\xca\xd5\x9e\x52\x98\x7a\x24\xc5\x46\xff\x59\xcc\x2f\x10\x11\xc4\xb4\x19\xfb\x2f\x28\x74\xdb\x59\x1e\x03\xc2\xde\x14\x32\xe7\x01\xca\xd9\x12\xe2\xbe\xb7\x47\x95\xd4\xfd\x39\xc8\x4d\x5a\x3d\x25\x21\x2b\xce\x25\x5b\xc3\xb7\x60\x14\xae\x06\xf1\x16\x1d\x9d\x92\x29\x58\xaf\x63\xd4\xf9\x68\xd6\x5f\x4b\x65\x68\x21\x24\xc0\xf3\xaa\x1e\x73\x62\x54\x0a\xcc\x12\xfe\x29\x1b\xd4\x6d\x67\x83\x58\x03\x1b\x54\x67\x7e\xa6\x53\x14\x83\x01\x97\xa1\xa2\xf9\x05\xae\x04\x89\xfb\x13\xa3\x0f\x4a\xb2\xe9\x5c\xf3\x79\x27\x48\x44\x31\xe9\x5c\xd7\x60\x74\xfd\xff\xa1\xee\xfe\x2d\x52\xe7\x7a\xcb\x0a\xee\xf2\x9b\x95\xb7\x86\xa3\x20\xdc\x21\x99\x13\x53\x85\xf4\x62\x27\x53\x28\xb0\xba\xca\x8a\xb5\xf0\x92\xf1\x24\xe2\x92\xf7\xc6\x3c\xce\x3a\xd6\x06\x21\x59\x9f\x6d\xfd\xfa\x95\xf5\xdd\xd7\xf4\xe1\x43\x75\xfa\xac\xf4\x32\x99\x29\x72\xa7\xb8\x67\x8f\x24\x78\x74\x28\x04\xfa\xb1\x72\x99\x21\x57\x89\xa0\xea\xb5\x54\x85\x78\x53\x85\xe6\xb4\x52\x30\x27\xcd\x6a\x65\xe5\x82\xc2\x78\xea\xfc\xec\xda\x4f\x16\x70\x79\x07\xfd\x6d\xa4\xb3\xa5\x78\x68\x37\x95\xaf\x13\xf9\x4e\x18\x19\x7b\x44\xf4\xbd\xe3\x15\x5d\x50\x9c\x53\xea\xf2\x86\x72\x32\x35\xf9\xb6\x2e\x1a\x68\xa1\xc6\xfb\xb1\xc2\xfc\x65\x52\xe9\xd6\x04\xa0\xd7\xf2\x8e\x34\xb2\x71\xdf\x3b\x5e\x14\x52\xdf\x67\xa9\xc3\x25\x88\x65\x3d\xf1\xaa\x38\xad\xb8\x45\xb5\xb5\x38\xe9\x50\x80\x25\x99\xfb\x2e\xf6\xf9\x0d\xe6\x22\x1a\xd2\x7c\x2d\x2a\xb7\x17\x82\x47\x4c\x2f\x60\x8b\x04\xbc\xbc\xc5\x27\x8c\x4c\xa6\xe6\x2e\x17\xf5\x16\xa2\xb7\xbd\x66\x89\x4b\x10\x3d\x30\xf6\x84\x76\xc7\xda\xd0\x96\x6a\x68\x41\x24\x2a\x58\x70\x36\x6d\x37\x78\x72\x3f\xfc\xfa\x25\xfa\xee\xeb\x91\x02\x6c\xe9\x08\xaa\x10\x23\xa6\x13\xdb\x43\x9d\xa3\x26\xe3\x68\xbd\x19\xfd\x2d\x5a\x2e\x0d\x2d\xf7\x0a\xca\x2d\xef\xdf\x5e\xea\xb6\xeb\xb6\x02\x57\xa8\xb3\x7a\xde\xf0\x64\xe1\xa9\xba\x2c\x4f\xd5\xa5\x3e\x55\xff\xc6\x2e\x95\xcc\x41\x3d\x09\xae\xe2\x04\x38\x92\xb8\xf1\x14\xe9\xe1\x85\xb7\xc2\x17\x54\x08\xa8\x3b\xa5\xa3\x89\x47\x3c\x6a\x1b\x8e\x40\xfd\x62\xfa\x57\x3a\xa5\xa3\xb1\xa7\x05\x6d\x0e\x6d\xa1\x22\x35\x0c\x67\x94\x52\xfb\xb5\xbb\x28\xee\xff\x4b\x70\x31\x61\x02\x2c\xb0\xdc\x28\x41\x4d\x80\x51\xdd\x1a\x7c\x3f\x1c\x0c\xfe\x2f\xab\x81\x12\x2f\xa1\x98\xce\xd2\xaf\x9e\x08\x2f\x2e\x65\x89\x76\x2e\x51\x18\x95\x1a\xdf\xd8\x33\x72\x31\x45\x0f\x04\xf7\x05\x2d\x2f\xed\x81\x81\xb7\xa0\x30\x5f\x43\x83\xdf\x69\x36\x92\xe9\x1b\xfe\xae\xbe\xe2\xdf\xd1\x5e\xc4\x27\x80\xbe\x51\x6f\x74\x94\xbd\xd7\x78\x5b\xe1\xfd\x58\xaf\x58\xf6\x98\xf0\x3b\x55\xf2\x5b\x2f\xec\x5d\x72\xe6\x57\xf9\xf9\xcb\x2a\x80\x75\x14\x90\x49\xe6\xa6\x9d\x4a\x5d\x7c\x91\x37\xb8\x21\x6f\x7c\x18\x80\xa7\x51\xc8\x07\x86\x89\x2b\xcd\x49\x7c\x63\x6c\x2d\x15\x99\xc0\x7a\xc3\xc6\x7a\xa2\xcf\x2e\x47\x16\x5a\x09\x77\x88\xe6\x08\xa8\x65\xeb\x17\xb9\xc4\xe7\xf9\x4b\x99\x31\x67\x64\x36\xd5\x3a\x64\x46\x29\xcc\xc9\x5b\x1f\x72\x99\xd1\xb7\x40\xf4\x8f\xe1\x94\xe5\xef\xcb\x8b\x3d\x10\xfd\x43\xf8\x58\x14\xe8\xdb\x36\x10\xfd\x23\xd8\x65\x39\x39\x5b\x59\x1f\x37\xf1\xe7\xf9\x64\xbd\x51\x39\x12\x9e\x8f\xa4\x3b\x45\x7d\x36\xbb\xc4\x7d\xcf\x8b\x65\x5e\x9c\x4d\xe1\xa7\x77\x6e\x3f\x18\x20\x84\x56\xbf\x72\xda\xc6\xd2\xe5\xa2\x74\x79\x47\xb2\x62\x1b\xb3\xa5\x89\x8a\xb9\xea\xd8\x04\x66\x3f\x88\x17\x86\x4a\xc6\xa3\x75\x46\x06\x5b\x55\x39\xfb\x65\x12\x45\x6c\x92\xf2\x0e\x8b\x22\xa3\x1b\xb7\xe8\x77\x7b\x8d\xd1\xc0\x52\x73\x6d\xa0\xb9\xdc\x38\x9f\x60\xe8\xc3\x9c\xec\xfa\x90\x40\xa8\x78\x27\x69\x50\xef\x8d\xd6\xd2\x5d\x0e\x2d\x0a\xd7\xd3\x25\x63\xac\x9b\x69\x69\x8c\x15\x27\x32\x57\xd2\x9b\x1e\x77\x74\x43\xc4\x31\x29\x1a\x75\x1c\xae\x95\x69\xef\xaf\xf6\x16\xcc\x0f\x93\x26\x81\xd6\x14\xdc\x4b\xe1\x2d\x10\xed\xc5\x88\xef\xe4\xbf\xab\xe4\x5e\x50\x38\x9a\x1a\xd3\xdd\xd7\x53\x13\x7d\xf2\x0c\x1f\x86\x83\x05\x5c\xe1\xd3\x1f\x0b\x78\x89\x0f\xdb\x0b\x38\x9f\xb6\x3a\x05\x57\x84\xdf\xc1\x9f\x0e\x06\x23\xd7\x81\xc8\x95\x1c\x62\x56\xeb\x9d\x24\x99\xc6\x53\x9e\x13\x43\xe2\x08\x08\x1d\x09\x81\xc3\xc1\x75\xcc\x8d\x54\x46\x21\x75\x4c\xbc\x61\x81\x49\x92\x9f\xc7\x8e\x07\xc2\x49\x40\x3a\x21\x70\x27\x80\xcc\x71\x81\x39\xa9\x92\x94\xf7\xa6\x6b\xfd\xc4\x3a\x01\x39\x9f\xa2\xe7\xc8\x37\x89\xe9\x85\xd0\xdd\xfd\x14\xe6\xe4\x6b\x8a\xd1\x0b\x75\xac\xc5\x0f\xd3\x36\x8b\x3a\x93\x5a\xad\x96\x23\x73\xb8\xbd\x3d\xc8\xcd\x7b\x2b\xae\xfd\xb5\x68\x01\xdb\xf5\xfc\x64\xb5\x10\x11\x4f\x6a\xbe\x8f\x83\x7a\x56\xb2\xba\x75\xde\x26\x7a\xc6\xb5\x21\xf5\x09\x86\x4e\xe7\xce\x94\xec\x4d\x61\x38\x04\x0c\xbd\x2b\x81\x64\x4e\x83\x9f\xba\xa8\xa7\xd6\x8c\x6b\x71\x0a\xd0\xfe\x72\xf4\xd4\x8e\x7b\x2b\xc3\x78\x62\x8a\x9e\xe2\xdf\xa1\x1d\x6f\x0c\x17\x0b\xb2\xa3\xa8\xe7\x87\x69\x1e\x9d\xb8\x08\x5d\xfc\xb4\x97\x15\xef\x32\xa7\x0c\x61\xac\x00\xdd\x21\xf1\xbd\x06\xa7\xbf\x34\xb0\x9b\x07\x39\x68\x1f\xe4\xa0\x7d\x90\x99\xce\xe0\x51\x44\x58\x8e\xf5\x4b\x58\x5a\xbe\xb8\xaa\xc6\x90\xcb\x4b\x9b\x81\xa4\x68\x60\xba\x4b\x72\x38\xda\x6d\x65\xf7\x30\x42\xca\x9f\x4f\x47\xc2\x9e\x91\xdd\xa9\x92\x95\x5c\xcc\xd8\x07\x33\xf2\x29\x01\xa1\x11\x82\xaf\xdf\x19\x1d\xdf\x29\x9e\xb9\xad\x05\xbc\x9b\xde\x69\xee\xfa\xeb\x97\xf1\xef\x33\x5e\x37\x4b\x81\x66\x17\x14\x3e\x2d\x75\x21\x31\x9f\x91\x31\x47\xb8\x20\x87\x9e\x02\x9c\x43\x4f\x1d\xd4\x91\x85\x77\xed\xe3\x24\x96\x97\x4a\x4a\x82\xac\xfd\x56\xa6\x08\x60\x1c\x17\x31\x75\x05\x5d\x1b\xd7\xf9\x41\xdc\xef\x3e\x7c\xa8\x86\x3a\x23\x19\x5a\x8d\x70\x3a\x12\xb6\x65\x2d\x34\xb7\x8a\x03\xbe\x02\xab\x83\xaa\x08\x54\x66\xe1\x2b\x01\x56\x67\x9c\x64\x29\x4f\xd0\x7d\x07\x75\x52\x58\x70\x0b\x56\xc7\x08\xe1\xcb\x49\x91\xcb\x78\x70\xec\x16\x3b\x6d\x8b\x05\x67\x59\xc5\x25\xb0\x8b\x26\x65\xe7\xc4\x8c\x0d\x47\xa7\xe8\x2a\x86\x0f\xc4\xf6\xa2\xcf\x7e\xfd\xda\xc4\xb8\xbe\x6e\xd9\xde\x3c\x74\x5c\x2e\x67\x9c\xc7\xd6\x82\xd0\x9c\x81\x3f\x27\x98\x26\x42\x31\x02\xef\xa6\xd0\x9a\x2a\x2e\x04\x74\x9c\x2f\x07\xdb\xa8\x3a\xf3\x99\xe4\x1d\x97\x79\xd7\xd6\x06\x61\x7d\xa6\xfe\x71\x37\x62\xda\x28\xb2\xaa\xaa\x81\x48\x62\x69\x6d\x24\x1b\x24\xdc\x20\xde\x86\x09\x5c\xe7\xfb\x60\x95\x6b\x09\x29\x7a\xc8\xe7\x39\x9c\x15\xa9\x3f\x9d\x96\x74\xe2\x4c\x81\xd2\x17\x0c\xcd\xce\x69\x45\xae\x39\xb8\x8b\x22\x96\xfc\xe1\x69\x6e\x38\xf0\x69\x9a\xa7\x35\x33\x9d\x9c\x4c\x5b\xbd\x5c\x3f\xa2\x3c\x82\xf1\xbd\xd4\xcf\xdd\x29\x48\x38\xa5\x6d\x97\x54\x57\x59\x2a\xc3\x60\x5e\x5c\x0e\xd5\x35\xc7\x15\x23\x34\xce\xaf\x2b\x7c\xe8\xaa\x67\x05\x7e\xf3\x67\x3d\x19\xde\x1e\x87\x23\x0f\xef\x1a\x0f\x33\x25\xbb\xec\xa3\x04\x73\x94\x29\x61\xe5\xab\x62\xed\xac\xa3\xcb\xcc\x02\xeb\x8d\x08\x2d\xb0\x0e\x99\xb4\xbe\xaf\xc4\xf3\xa9\xf6\x72\x77\x7b\x74\x33\xc1\x5e\x6a\x78\x6d\x69\x30\x45\xc5\xf5\x43\x52\xcb\xbd\x20\x35\x9e\x53\x81\x08\xae\x18\x0b\x63\x73\x5b\x5c\x82\x46\x26\x11\x32\x5e\x4e\x69\xc5\xf2\xe3\xa0\xbe\x81\xb7\x88\xa1\x06\x0b\x78\x35\x35\x11\x4b\xdf\x6a\xde\xc9\x55\xfd\xbd\xd1\xcf\x13\x8b\xc2\x7e\x3b\xb8\xfc\xec\xda\x4f\xaa\xa9\xc0\xf1\x56\x79\x6d\xf5\xc7\xf5\xea\xc7\xe6\x3e\x56\x8a\x24\xbe\xb0\xe8\x9a\xe4\xe1\x2b\x51\x5b\x4c\xfe\xb9\xb8\xdf\x1d\xbd\x4d\xec\x94\x53\xed\xaf\xa8\xf0\x33\x2f\x32\x36\xb6\x5b\x6e\xe4\x39\xa6\x2a\xe9\xa5\x88\xe5\x15\x81\x0b\xbd\x24\x9e\x72\x21\x3b\xa9\x14\x21\x8e\xec\xc5\x54\xdf\x5a\x7f\x35\xbc\xfb\x9c\x83\x27\x28\x85\x1f\xd3\x36\x4f\xdf\x3a\xa8\xcb\x70\xcc\x27\xa1\x77\x5d\x05\xef\xe3\x42\x91\x97\x66\xee\x15\xf7\x64\xd5\x28\x68\x64\xbd\x8e\x7d\xcb\xb6\x0e\x73\x55\xe5\x32\x14\x5c\x26\x99\x68\x52\xfa\x66\x93\x9e\xb6\xfc\x37\x37\x33\xc5\x99\x52\x18\x62\x4e\xf6\xd5\x81\x1c\xc0\x1a\xdb\x5f\x16\x5f\x44\xbc\x67\x94\xfc\xa7\xe6\xbb\x07\xc6\xce\x41\x01\x9a\x1b\x65\xc2\xd2\x0b\x3d\x23\x5f\xb0\x3f\xb5\x40\x14\xd9\xdb\xca\xc1\x0c\x03\x22\x73\x7c\x2e\xfa\xec\xba\x1a\xa8\xd5\x1a\xa0\x21\x55\x9e\x77\x42\xfb\x87\x60\xb5\x9d\x3b\xab\xa9\xf3\x70\xe6\x91\x4d\xcd\x6f\x4f\x43\x3e\xab\x4f\x35\xe7\xad\x2b\xd7\x61\x4a\x28\xbf\xc7\xba\xf4\xee\x5c\x18\xd5\x53\xb9\x34\x2b\xf2\x60\x12\xad\x7e\xa1\x54\x3c\xd9\xab\xfb\xa8\xa4\x2e\xc9\xff\xe9\x4e\x0e\xff\xc3\x3b\x39\xfc\xe7\x3b\xf9\xe3\x7e\x3b\xf9\x63\xed\x4e\xfe\xf3\xbd\x1b\xfe\xdb\x7b\xa7\x4e\x68\x0b\x34\xe9\xed\x23\x71\x3b\x7a\xd2\xee\xae\x6d\xea\x27\x85\x6e\x2c\xcb\x9e\x91\x79\x02\x7f\x80\x44\xc6\x6b\x61\x90\x94\x1c\x19\x9e\xef\x5a\xfd\x73\x45\x6d\xf3\x73\x47\xfd\x73\x5b\xd0\x6e\x64\x76\xe2\x05\x85\xcf\xd3\xa6\xf8\xff\xc6\xeb\xaa\xb4\x68\x68\xb0\xa7\x1c\x1b\xcd\xfe\xc5\xa5\x34\xea\x02\xbc\x55\x47\xd3\xee\x16\x4b\x54\xc9\x6f\xe4\x3a\x33\xd4\xe5\xf2\x46\x1b\x54\x5d\x65\xf9\xba\xf9\x79\xbc\x1c\x32\x3c\xf8\xdb\x83\x3d\xa9\x5a\x1b\x97\x73\x6d\xbc\x06\x11\x25\xfb\xf3\x7e\xda\x9a\x71\xb7\xcd\x4e\x5a\xc7\x89\x72\x74\x9c\x28\x0c\xb7\xea\xa2\xe1\xea\x2e\x21\xf2\x0e\xa3\xff\xdc\x7a\x11\xed\xf7\x65\xdf\x5d\xe5\x0e\xd7\x1b\xf0\xff\x33\xf3\xfc\x8a\x31\xbe\x30\xc6\xf8\xc2\x18\xe3\x1f\xf9\xc8\x08\x14\x46\xf6\xe8\x8d\x51\x33\xb2\x57\x92\x87\x36\xc6\x5e\x76\x69\xb9\xbf\x31\xb6\x68\x37\xc6\xfe\x3c\x45\x8f\x18\x9e\xef\xc7\xd7\x69\xfb\x91\xaa\x18\x8e\xb2\x81\xfe\x5c\xf9\xa5\xf7\xa8\x49\xd1\x66\x97\xdf\xa6\xf7\x71\xab\x5b\xc9\x82\xb3\xb2\x88\x66\xe1\x64\xdf\x1d\xfd\x35\x23\x6f\xa6\x39\x2f\x7c\x5c\xd1\x3a\xed\xe4\x61\x64\xf5\x1d\x9a\xdd\x41\xff\xc6\xaf\x02\x33\xc0\x14\x48\xe5\xeb\x14\x3d\x59\x50\x4d\xd6\xdc\xcf\xc7\xa4\x8c\x48\x5b\xb9\xdd\x33\x67\x7d\x99\x01\xd5\xeb\x58\x4f\xf4\x5d\xba\x00\xb6\xce\x4a\x1b\xb4\xe2\xbf\xbd\x19\x13\x31\xf2\x32\xcb\x66\xc7\x8a\x0d\x8b\xbb\xed\xd1\x16\x1b\x1c\x13\xab\xc3\xa9\x30\xc9\x9e\x0f\x2f\x3d\x98\x91\x6f\x7a\xee\xf5\x14\x47\xc6\x41\xb1\xce\x15\x33\x5f\x8d\x40\x74\x1d\x6b\x2c\x7b\x8f\x2d\x90\xdd\x15\x03\x8a\xd5\x89\xed\x12\xd1\x05\xe3\xd8\x33\xb2\x3a\x4b\x77\xcc\x56\x49\x04\xb4\x6a\xed\x5d\x8b\xd9\x58\x85\x09\x2b\x76\x65\xdf\x64\x5f\xec\x68\x3a\x8d\x1b\x8e\x9b\x53\x6e\x56\x6e\xd3\x9e\x56\xec\x8f\xb4\xf6\xf9\x45\x56\xd1\xe5\x0e\x11\xbd\xc3\x32\x11\xd5\x02\x68\x81\xa4\xcd\x42\x16\x74\xb5\x69\x0b\xab\x16\x14\xbd\x80\x73\x1f\xc5\xc8\x9a\x3e\x70\x41\xcc\x71\xe2\x5d\xc3\xce\x67\x5d\x67\xad\xda\xd8\x5c\xc2\x23\x1e\x3d\x71\x2b\x1c\xca\x67\xa1\x69\xe0\x4e\x09\x93\xc0\xba\xf7\x39\xa4\x0a\x3f\x75\xac\x0d\xd1\xcd\x7b\xeb\xd6\x3c\x54\x90\x0d\x40\x87\x75\x6e\xd9\xd6\x31\xa6\xd6\x6c\xb4\x5d\x1a\x47\xbd\xcd\xce\xaa\xf1\xc2\x09\x23\xbc\xbb\x32\xf3\x78\x99\x59\x58\x6a\x6b\x80\x42\xeb\xc1\x97\xee\xff\x50\x3d\x5c\x50\x05\x0f\x97\xed\xd9\x02\x92\xae\xd1\xdc\x84\xdd\x3b\x72\xb8\xb0\x3e\xe3\x79\x2c\x3e\xaf\x12\x46\xbd\x49\xfa\xd7\x16\x52\x9a\xa7\x48\xa2\x6c\xac\x33\x4c\x18\x2b\xfd\x8a\x4d\x44\xc7\xda\x90\x55\xe0\x5d\x45\x1b\xa2\x44\x31\x78\x29\xcc\xa7\x84\xe9\x84\x00\x9e\xb9\x4f\xcb\x56\x0d\x6f\x3a\x4b\x30\x54\x6c\x7d\xce\x06\xad\x1c\xe4\xfb\x8e\xfc\xbf\x67\xb4\x95\x81\xe5\xa8\x42\x3b\xe6\x78\xcd\x07\xe4\xee\xd5\x35\x6e\x57\xff\x13\x8b\x9b\x03\xdc\xea\x3d\xe1\x5d\xe7\x38\xc9\xa1\x71\x41\x21\xe8\xde\xef\xd6\x42\x89\x95\x95\x03\x17\x90\xb0\x0b\x07\x3e\x18\x89\x11\x94\x30\xd2\x8b\x2e\x7a\xdb\x68\xc0\xf9\xc4\xc4\xd6\xf9\xe0\xc1\x8d\x47\xe1\xc6\x23\x49\x97\x42\x4c\xa1\x68\xf6\xca\xe4\x3f\x29\x5b\x6e\x2d\xb5\x3c\x5f\x6a\x29\x2b\x2d\x5f\xa3\xc9\x7b\xe3\xe7\xf6\x96\x1a\x89\x86\x45\xd1\x1b\x65\x1a\x0f\x4d\xe3\x95\x9d\x52\xc7\xf6\xff\xf9\xbf\xad\x15\x9f\xa4\xa5\xbd\xa8\xa3\x39\x83\x3b\x3a\xda\x16\xa0\xb7\x64\x6c\x71\xe3\x11\xaf\xdb\x2e\x30\x78\x2c\xe2\xb1\xcf\xc4\x92\xb8\xf0\x9d\xde\xe5\x0f\x12\x0a\x78\xf4\x5f\x24\x89\x7f\xa9\x71\xed\x60\x8d\x2e\x7d\x14\xf6\x25\x4f\x25\x89\x9d\x98\x8e\x2c\x9f\x49\xd6\xb3\x36\x62\x3b\x86\x47\xff\xf5\xaf\xf4\x77\x72\xc5\xa6\x2c\xf5\x44\x38\x91\xf6\x2f\x55\x68\x2b\x26\xf6\x5f\x8f\x2e\xe5\x38\x2a\x9a\x0a\x47\xa0\x45\x95\x4e\x98\xa5\x90\xbb\x27\x40\x77\x75\x21\xd8\x78\x7c\xce\xfd\x10\xe3\x80\xe4\x31\xb5\x20\xed\xb6\x39\x44\xe7\x9e\xd0\xe2\x5f\xf1\xaf\x7f\x89\x5f\xff\x8a\xb5\x43\x74\xd4\xd5\x6e\xaf\xfc\x46\x32\xc1\x99\x45\xc1\xef\xae\x4d\xcc\x35\x27\x3b\x29\x6c\xc1\xf0\x31\x7c\x15\x24\xed\xea\x34\xaf\x68\xbd\x90\xfd\xf7\x20\x47\xb1\xfe\xfc\xc6\xe5\xf9\x8d\xba\xe6\x00\x67\xf9\x01\x96\x78\x80\xf9\xbd\xb1\x23\x7c\xf4\x08\x53\x4b\xfd\x1f\x40\x93\xff\x2d\xe3\x6e\x1a\xe2\x7f\x1a\x61\xfe\x0f\x2c\x78\x41\xa2\x97\x26\xf3\x8f\x51\xe7\xb4\xdb\xe8\xf5\xa3\x23\xe4\xf2\x3e\x7b\x0c\x98\x50\xae\x0b\x9e\xfa\x33\x00\xf4\xf7\xfc\x08\xa1\xfa\xb5\x87\x69\xe6\xd8\x2b\x0c\xf2\xd5\x1d\x9d\x13\xeb\x23\x9f\xe5\x69\x22\x14\x3a\x7b\x8d\x0e\x4a\x18\xc3\xd7\x7a\xed\x87\xb2\x2c\x7b\xcb\x89\x09\x29\x58\x0d\xd9\xd6\x72\x73\x9d\x0b\x58\x73\x12\x74\x21\xeb\xbb\x5f\x20\xeb\xb3\x53\xc8\xfa\x29\xce\xbb\x0b\x1e\xb0\x0a\x72\x2d\x42\xfc\x88\xae\xd1\x3d\x16\x28\xf5\xf5\x14\xf3\x97\x9e\x50\x98\x12\xbf\x0b\xd6\xcb\x3c\x01\x79\x5e\x75\x56\x54\x3d\xd2\x55\x8f\x96\x96\xb6\x20\x1d\x73\x12\x77\x81\x43\xa2\xc3\x52\xb1\x2e\x4a\x89\x6a\x8c\x57\x8a\xe8\x19\xbb\xd0\xae\xc3\x05\x8c\xbb\x4e\x26\xe0\xb2\x11\xb9\xc4\x82\x04\x02\x55\x1b\x79\xb0\x8c\xee\x3d\x0d\xb5\x2f\x5a\x2b\x7a\x0c\xc5\xc8\x1d\xc1\x3b\xf3\x24\xeb\xa4\x99\x79\x98\xb1\x58\x76\x64\xd2\xd1\xf9\xe3\x97\x58\xf2\x91\x45\x81\x6d\xdb\xeb\x2d\x61\x4f\x18\xd9\xc7\x44\x3f\x7a\xae\x55\x03\xc6\x97\x49\x1c\x84\x62\xac\x69\x8d\xfb\xc3\xde\xe7\xe4\x28\xa1\xe0\x3d\xb1\xad\xd7\xfa\x6b\xf9\xbe\x63\x56\x8a\x35\xcc\x71\x93\x5e\xc2\x58\x53\xa6\x3c\x0a\x8c\x86\xa9\x74\x6d\x30\xc7\x6a\x03\x0d\xde\xcf\x7d\x13\x65\x10\xf3\x58\xb4\x7e\x05\x5d\x28\x36\x88\xf5\xd0\x44\x44\xd3\x7e\xdf\x5a\x30\xbe\xd1\x28\xfd\xf2\xb1\x45\xe1\x7a\xcd\x38\xff\xcf\x0c\x26\xb0\x7a\xc7\x63\x72\x5c\xac\xd2\x93\x59\x17\x99\x90\xd4\x02\xd1\x67\xa7\x75\xd1\x53\x97\x23\x57\x84\x35\xdc\x2f\x0d\x97\x33\xd8\x05\x6e\xaf\x6f\x7a\xc1\xe0\x5b\xa8\x22\x71\x7d\xf8\x9b\x9e\xf0\xcb\x41\xf6\x65\x05\xba\x4e\x8c\x96\x93\x52\x38\xf5\x88\xa0\x8d\xb1\xe8\x97\xe6\xb9\x5e\x0f\xb0\x4e\xcc\x5b\x09\x38\x60\xc0\x7e\x17\xdd\x6e\x2a\x83\xd2\x13\xb7\x68\xe3\xb5\xd5\x7f\xa0\xff\x57\x3c\xe2\x5a\xc9\xad\x56\x55\xac\xa8\x5e\x4b\xbd\xce\x27\x4f\x6d\xd0\x35\xa5\x70\xe0\x91\x78\x84\x37\xe2\x17\x5d\x10\xf0\x60\x48\xa9\xbd\x23\x0b\x55\xa8\x5c\x50\xd8\xe9\x36\x84\x33\x34\x6b\x28\x6b\xaa\x1f\x5e\x89\xb8\x88\xd1\x3a\x4c\xcc\xd5\x36\x7b\x41\x36\x5f\x68\x03\xda\xb5\x96\xb1\xee\xc9\xc2\x58\xc4\xe2\x35\x2b\xa5\x18\x3d\xe0\xb2\xbb\xea\x8e\x5d\x4e\xb1\xa1\xa3\x73\xb5\xe5\x0a\xc8\xae\xbb\x79\x10\x04\xf5\x82\xa2\x95\xf2\x02\xe3\xe1\x18\x1f\xe5\x1c\xaa\x72\xd3\xa7\x55\x2d\x8b\x6c\xd5\xb2\x1c\x76\xab\x59\x56\x8e\xd6\x48\x19\x68\x8a\x27\xf3\xc0\xad\x27\x1e\xec\xf3\xba\x2e\x43\x14\x17\x02\x95\x30\x96\x99\x4f\xde\x31\x72\xeb\xa1\x36\x6c\xc9\xa3\xc7\x65\xfe\x05\xef\xe0\xbf\xbd\x49\x18\x45\xc9\xcc\xfc\x30\x23\x35\x68\x00\xf1\xa4\x4c\x26\x4b\xae\x66\xfa\x3a\x3b\x36\x2c\xf8\xa2\xe5\x73\xdf\xf1\x3e\x61\x41\xe1\xf5\xaa\x0a\x29\x0c\x88\x4e\xdf\x51\x51\x90\xb7\x58\x31\x16\x88\xcb\xdc\x9d\x1e\x29\xe0\x1b\xa8\xc5\x5b\x55\x5b\xdf\xab\x8b\xc6\xd0\x1b\xd8\x6b\xdc\xf7\xae\x40\xc1\x50\x71\x17\x70\xf6\x7f\x32\x1d\xfc\x82\x06\x07\x78\x89\xdb\x77\xfd\x45\x2b\x45\xbc\xea\x1a\x93\xb3\x97\x9a\xfc\xb8\x16\x85\xf3\x7b\xa9\x90\x2a\x7c\xa8\x48\x66\x56\x4d\x91\x67\xee\xd7\x7a\x9b\x28\x23\x62\xdd\xa5\xc0\x12\x33\xf2\xb2\xdb\xc4\x9b\x2e\xdd\xce\xf5\x86\x83\xbb\x5d\xd6\x44\x21\xeb\xed\x35\xf3\x93\xa2\x35\xb2\xc4\x97\x22\x6f\x81\x09\x6c\xf3\x4d\xdf\xbd\xd3\x3b\x98\xc2\xd2\x9f\x11\x6a\xb1\x24\x0a\xbb\xdc\x53\x64\xaa\xff\xa7\xc9\xc5\x17\x4e\xae\xba\xff\x5d\xb4\x62\xa5\xf3\x65\x42\x21\xcb\x4d\x3c\xef\x82\xf5\xee\x95\x65\x02\xb5\xf9\xc5\x3b\x4d\xd5\x3b\x4c\x62\xd1\x39\x96\x7e\xa1\x45\xb1\x62\x0a\x96\x0a\xd9\x69\x59\xa8\x55\x90\xfe\x72\xe3\x4a\xb9\xd6\x55\xfa\x1d\x77\x6e\xbe\xcb\x4e\xca\xb2\x9c\xd5\xd6\x05\x47\xd5\x01\x49\x8e\xaf\x15\x5e\x32\x3b\x53\x94\xe6\x0a\x66\x0b\x96\x4d\x6c\xce\x13\x78\xe7\x99\xdb\x11\x0a\x52\x27\x05\x02\xa1\x88\x20\xd7\x44\xf0\xac\x0b\x12\x1e\x0c\x0a\x22\xb8\xa0\xf0\xc1\xb0\x77\x9b\x4a\x7c\xd2\xcf\x5e\xe2\x2b\x10\xda\xd5\xbf\x26\x6a\x9f\xe0\xd4\x54\x33\xd6\x33\xf0\x4e\xff\x8e\xd9\xd4\xa2\xf0\xa9\xeb\xfc\xbc\xb1\xcb\xcc\x0f\xe0\x26\xb6\xd1\x79\x5b\x0b\x38\xd0\xa5\xfa\xad\xb5\x80\x93\xbc\x76\x11\x41\x19\x4b\x0e\xf3\x5f\x0b\xb8\x2d\x6a\x14\x69\xa3\xb0\x46\xfe\x6b\x01\xaf\x8a\x1a\x26\xa1\x0d\x96\xeb\xe7\x05\xbc\xed\xb6\x87\x58\x6b\x04\xfd\x6e\x1d\xec\x3f\x75\x6b\x20\x7f\xd0\xcd\x89\xa4\x61\x07\x8c\xf1\xe6\xb2\xcd\xe6\x6d\xb7\x96\xef\xf4\x55\xb7\x96\x8f\xe3\xa0\x5b\x87\xf7\x93\xee\x62\xa1\xaf\xa1\x46\x56\xa7\xf4\xc7\x5d\x50\x78\x73\x27\xb7\xbd\x14\x79\x62\x63\x46\xde\x1a\x04\xbc\xea\x3e\x5d\x89\xf8\x70\xcb\x88\xe8\xdf\x60\x8c\x1d\xe3\x0c\x54\x73\x0d\x32\x51\x20\x90\xd0\x7f\xea\xc2\x6d\x17\x5e\x75\xe1\xa4\x0b\x6a\xc5\xf3\x98\x82\x13\x91\x8c\xb9\xbc\xe4\x59\xda\x0f\x93\x47\x7e\xe2\xa5\x7a\xf3\xc3\xf8\x42\x3f\x8c\x59\xcc\x2e\xb8\x78\xa4\xb7\x66\x97\x47\x13\x6b\xf1\x9d\xc2\x97\xf5\x38\x7c\xc9\xb1\xc0\xc8\x12\xcc\xf7\xd1\x67\xcf\xda\x46\x6f\xb9\xdc\x35\xc7\x84\x1f\x12\xab\xb7\xb4\xf0\xc5\x23\x71\xdf\x3b\xad\xe3\x6d\x63\xec\xd4\x99\x54\xc4\x8a\x7d\xaf\x6a\x0d\x7d\xdc\x75\x42\x41\x2c\x81\x36\xd3\x2f\xba\xed\x99\xe9\x3f\x7b\x60\xe1\x72\xaa\x3e\x30\x68\x15\x1c\x77\x89\x95\xca\x79\xc4\xd3\x4b\xce\x65\x61\x51\x15\x25\xcc\x47\x6b\x2a\x41\x3c\x8c\x7a\x5d\x98\xe1\x71\x21\x12\x61\x8a\xe2\x8c\x58\x6f\x58\x18\x71\x5f\xd1\x61\xd5\xa6\xf3\xf2\xf0\xb0\x13\x88\x64\xac\x13\x3c\x51\xe3\xc1\xa9\xc3\xa7\x1e\xc4\xe4\xa7\xf7\xca\xbe\x02\xef\x8b\x7d\xce\xc0\x3b\xb0\x1b\x19\xcb\xee\x48\x91\x11\x4d\x6c\xd9\xc2\x56\x3f\xb6\x81\xd9\x73\xf2\x35\x02\xeb\x7f\x59\x40\x62\x9d\x57\x8e\x3d\x01\xfd\x6e\x64\x29\x7e\xe2\x08\xfd\x19\xdf\x47\x8a\xad\xc8\x60\x57\x91\x86\xf9\xa8\x8c\x26\x69\x97\x21\x26\xe3\xbe\xeb\x29\xfe\xb2\xcf\x32\x8c\xe0\x0f\xde\xb6\xdd\x95\xe4\x87\xa0\xe0\x3d\xb3\x3f\x44\xe0\xbb\x0d\x23\x53\x7c\xc8\x01\xf9\xeb\xbd\x5e\x7a\xe4\x00\x76\x2a\x20\x63\x2d\x16\x0b\xfa\x9c\x25\xce\xcf\x7d\x16\xc6\xf6\xcf\x30\x0e\xa5\xfd\x43\x90\x83\x90\x92\x81\xfa\x48\xdc\x7f\x1d\x8d\x47\x79\xbf\x1d\x63\x32\x15\x24\x82\x20\x8f\xde\x09\xe3\x8e\xa4\xf8\x47\x8c\x30\x7a\x95\xe5\x38\x7c\x34\x21\x4f\xa8\x1d\x13\xf1\x17\xff\x0e\xf2\x2f\xfe\x9d\xda\xea\xd1\x51\x8f\x0b\x82\x5d\x02\x4b\xa8\x8d\x4f\x0e\x4b\x16\x44\xb1\x41\xf4\xf9\xff\x1b\x00\x00\xff\xff\xfc\x7a\x5c\xc5\x8e\xb1\x01\x00"), }, "/templates": &vfsgen۰DirInfo{ name: "templates", @@ -161,9 +161,9 @@ var Assets = func() http.FileSystem { "/templates/default.tmpl": &vfsgen۰CompressedFileInfo{ name: "default.tmpl", modTime: time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC), - uncompressedSize: 8101, + uncompressedSize: 8398, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x59\xcf\x6f\xeb\x36\x0c\xbe\xe7\xaf\x20\xfc\x76\x68\x0e\xf5\x1b\x76\x2c\x50\x0c\x0f\xc3\x7e\x1c\xba\x61\x68\xd1\x5d\x86\x21\x50\x6d\xc6\x55\x2b\x4b\xae\x44\x27\x0d\xd2\xfc\xef\x83\x6c\xc7\x91\x2d\x27\x91\xd3\xec\xb4\xdc\x12\x99\xfc\x48\x7f\x1f\x4d\xca\xf2\x7a\x0d\x29\xce\xb9\x44\x88\x66\x33\x26\x50\x53\xce\x24\xcb\x50\x47\xb0\xd9\x7c\x73\xfe\xaf\xd7\x80\x32\x85\xcd\x66\xb2\xd7\xe5\xf1\xfe\xce\x7a\xad\xd7\x10\xff\xfc\x4e\xa8\x25\x13\x8f\xf7\x77\xb0\xd9\x7c\xfd\xf2\xb5\xb2\x33\x3f\x6a\x4c\x90\x2f\x50\xdf\x5a\xa3\xfb\xe6\x0f\x7c\x40\xa9\xc5\x5b\x89\x7a\x55\xbb\x37\x81\xba\x91\x4c\xf9\xf4\x82\x09\xd9\x08\x7f\x5b\xef\x07\x62\x54\x1a\xf8\x00\x52\x8f\x45\x81\xba\x76\xe5\x73\xc0\xb7\xf6\x62\x34\xe7\x9a\xcb\xcc\xfa\xdc\x58\x9f\xea\x86\x4c\xfc\x4b\xb5\x0a\x1f\x20\x50\xba\x11\xff\x01\x6b\xf4\xab\x56\x65\x71\xc7\x9e\x50\x98\xf8\x41\x69\xc2\xf4\x4f\xc6\xb5\x89\xff\x62\xa2\x44\x1b\xf0\x45\x71\x09\x11\x58\x54\xa8\x43\x66\x04\x57\x16\x2b\xfe\x49\xe5\xb9\x92\xb5\xf3\xb4\x59\x73\xf0\xa6\xb0\xd9\x5c\xad\xd7\xb0\xe4\xf4\xdc\x35\x8e\xef\x31\x57\x0b\xec\x46\xff\x83\xe5\x68\x1a\x46\x87\xa2\xb7\x89\x4f\xdb\x5f\x7b\x64\x4a\xd1\x24\x9a\x17\xc4\x95\x8c\x0e\x70\x4c\xf8\x4e\xb5\xa4\x33\xc1\x0d\x35\xa6\x9a\xc9\x0c\x21\x86\xcd\xa6\xce\xeb\x66\xb2\x5b\xf4\x79\xb2\xac\x5c\x57\x44\xda\xf4\xed\xbf\x5b\x68\x6f\xa0\x49\xac\x0e\xfe\x4d\x4a\x45\xcc\xe6\xd4\x81\x74\x96\x4f\xc3\x7d\x50\xa5\x4e\xf0\xa6\x16\x13\x25\x6a\x46\x4a\xd7\x95\x38\x19\x20\xea\x20\x05\xb3\x9c\xe9\xd7\x54\x2d\xa5\xc7\xc5\x24\x94\x8c\xc0\xac\x27\xe3\xe9\x08\x45\x0e\x22\x64\x32\xcc\x88\x11\x2c\x79\x8d\x53\x9c\xb3\x52\x50\x4c\x9c\x04\x36\x54\x10\xe6\x85\x60\xd4\x7d\x38\xe3\x7d\x35\xd8\xc5\x29\x8d\x6d\x0f\xf9\x10\x54\xb7\x09\x05\xe2\xcd\x99\x10\x4f\x2c\x79\xf5\xf0\x06\xd3\xb7\xa0\xf0\x01\xc7\x0c\x05\x97\xaf\xc1\x19\x24\x4d\x06\x3c\x8d\xc2\x1c\x0a\x8d\xb6\xd6\x02\xad\x9d\x84\x0e\x32\x56\xf5\xe0\xc0\x94\x79\xa2\x24\xe6\xea\x85\x47\xe1\xf6\xa5\x16\xa1\x19\x87\xdf\xdc\x5c\x29\xaa\x27\x8e\x53\x83\xae\x79\x61\x6f\x2d\x2d\x69\xd5\xba\xf8\x0d\x6d\x5c\x39\xfa\x88\x89\xe0\x28\xe9\xf4\x82\xdc\x87\xb8\x9b\x8a\xa7\x69\xe6\xe3\x72\x69\x88\xc9\x04\xcd\x00\xae\xd7\xc1\xe3\xfd\xac\xaa\xc2\x64\x28\x39\xb6\xc0\x39\x1a\xc3\xb2\xd3\x9e\x6f\x0f\xcc\x57\xa8\x19\x78\x7b\x1a\xda\xe0\x84\x9b\xf4\xe6\x6b\x67\x80\x4f\xe1\x7b\xb8\xb6\x8d\xb3\x5a\x84\x7a\xb1\x6a\x9d\x87\x19\xe9\xee\x02\xaa\x20\xd7\xce\x1d\x0d\xc4\xbb\x47\xa3\xc4\x02\xd3\x5e\xc4\xed\x72\x78\xcc\xad\x87\x17\xf5\x3a\x84\x52\x53\xf5\xf1\xf1\xd5\xd4\x51\x7d\x89\xc9\x33\xa3\xb1\x9a\x4f\x2e\xfa\x1d\xd0\xcf\xdd\x28\x3f\x6a\xe1\xe1\x0d\xea\xb3\x47\xf5\x9e\x3e\xa4\x66\x76\x58\xee\xed\xa4\xbe\x79\xc1\x34\xad\x46\xd8\x13\xcb\x42\xad\x59\x86\x92\x66\xfd\x11\xd7\xad\xaf\x05\x4f\x48\x69\x55\x98\x5d\xd9\x12\x23\x9c\x75\x0b\xed\x52\x4b\xe3\x7a\x81\xcf\x2a\x4a\xe2\xb4\x9a\xa5\xdc\x14\x82\xad\x66\x7b\x76\x53\xc7\x1b\xb7\x8f\x9c\x2b\xc9\x49\x59\x42\x66\xa4\x94\x18\x39\x12\x3b\xb3\xab\x34\xcf\x6a\x81\xfa\x0c\xfb\x47\x0f\xea\xbf\xaf\xa7\xf3\x94\x53\x78\x35\x9d\xaf\x98\xfc\x2d\xfd\x21\x26\x77\x7b\xba\x31\x33\xc5\xdd\xcd\x49\xe7\x61\xdf\xbd\xa6\x8f\x7f\x47\x70\x70\x2e\xf2\x8e\x91\xd7\x65\x91\x50\x60\xa6\x59\x3e\x44\xe5\xff\x96\x94\x94\x9b\x44\xe9\x74\xb7\x37\x57\x92\x76\xdb\x7d\xbf\x14\xfb\xf6\xa7\x37\xae\x3e\xd2\x45\x0d\xbb\xad\x78\xc2\xf7\xcb\xa3\xfe\x69\x1e\x73\x43\xc8\x72\xb7\xf9\xe6\x39\xd3\xab\x93\xea\xb4\x8f\x75\x7a\xc5\x7b\x48\xcd\x49\x40\x88\x4c\x5f\x60\x94\x50\xce\xf1\xdc\xa7\x15\x6b\x43\x87\x6a\x36\x10\xfc\x04\xf1\x16\x3f\x9c\x8f\x72\x17\xeb\x42\xfa\x10\xe9\x2f\x5c\xb3\xb3\x3c\x2e\x1d\xa0\xde\x59\xc7\x85\xf3\x49\xf5\x1a\x33\xc8\x55\xa1\xb9\xd2\xdc\xbe\xa1\x5e\x37\x6f\x3b\xdf\x6d\x97\xe0\xe6\x16\xa2\x68\xfb\x12\xb4\x3d\xff\xee\xdc\xad\xf5\x01\x00\xa8\xfc\x0c\x2e\x70\xeb\xc7\x65\x8a\xef\xdb\x23\x78\x88\xb6\x97\xa2\x8e\x07\x9f\xc3\x15\xbe\x39\x8e\x51\xa2\x39\xf1\x84\x89\x68\xda\x1a\xb6\xf0\x6d\x5a\xb7\x10\xfd\xc6\xb3\xe7\x2e\x16\x0a\x83\x15\x20\x93\x69\x1f\x75\xc9\xb4\xe4\x32\x8b\xa6\x70\x25\xd1\x01\xaa\x61\xa6\x47\x62\xfd\x8e\x29\x2f\xf3\xf0\x68\x5c\xce\x95\x0d\x65\x57\x77\xa1\x8e\x86\xb9\x53\xcb\x5e\x0c\x99\xb6\x9a\xb8\xbf\xeb\x6f\x6a\x2e\x74\xc7\xad\xab\x53\x5b\x18\x5e\xec\x51\x6a\x8d\x56\x2c\x40\xb5\xb3\x2b\x17\xa4\xde\xf9\x14\x3c\xae\x62\x5f\xc9\x63\xca\xee\x90\xfa\x57\xdd\x56\xa7\x55\xf2\x8a\xd4\x3d\x36\x3a\x79\x52\x0d\x80\x31\xc1\x99\x39\xfd\xe0\x7d\x5f\x7a\x9f\xfe\x5a\x32\x00\x7c\xf8\x73\xc9\x80\xc3\xb1\x6f\x26\x43\xc9\x7b\x1f\x4e\xfe\x0d\x00\x00\xff\xff\x74\x5d\xc4\xb5\xa5\x1f\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x59\xcf\x6f\xeb\x36\x0c\xbe\xe7\xaf\x10\xfc\x76\x68\x0e\xf5\x1b\x76\x2c\x50\x0c\x0f\xc3\x7e\x1c\xba\x61\x68\xd1\x5d\x86\x21\x50\x6d\xc6\x55\x2b\x4b\xae\x44\x27\x0d\xd2\xfc\xef\x83\x6c\xc7\x91\x2c\x3b\x91\xdd\xec\xb4\xdc\x12\x99\xfc\x48\x7f\x1f\x4d\xca\xf2\x76\x4b\x52\x58\x32\x01\x24\x5a\x2c\x28\x07\x85\x39\x15\x34\x03\x15\x91\xdd\xee\x9b\xf5\x7f\xbb\x25\x20\x52\xb2\xdb\xcd\x06\x5d\x1e\xef\xef\x8c\xd7\x76\x4b\xe2\x9f\xdf\x11\x94\xa0\xfc\xf1\xfe\x8e\xec\x76\x5f\xbf\x7c\xad\xec\xf4\x8f\x0a\x12\x60\x2b\x50\xb7\xc6\xe8\xbe\xf9\x43\x3e\x48\xa9\xf8\x5b\x09\x6a\x53\xbb\x37\x81\xdc\x48\xba\x7c\x7a\x81\x04\x4d\x84\xbf\x8d\xf7\x03\x52\x2c\x35\xf9\x20\x28\x1f\x8b\x02\x54\xed\xca\x96\x04\xde\xda\x8b\xd1\x92\x29\x26\x32\xe3\x73\x63\x7c\xaa\x1b\xd2\xf1\x2f\xd5\x2a\xf9\x20\x1c\x84\x1d\xf1\x1f\x62\x8c\x7e\x55\xb2\x2c\xee\xe8\x13\x70\x1d\x3f\x48\x85\x90\xfe\x49\x99\xd2\xf1\x5f\x94\x97\x60\x02\xbe\x48\x26\x48\x44\x0c\x2a\xa9\x43\x66\x48\xae\x0c\x56\xfc\x93\xcc\x73\x29\x6a\xe7\x79\xb3\x66\xe1\xcd\xc9\x6e\x77\xb5\xdd\x92\x35\xc3\x67\xd7\x38\xbe\x87\x5c\xae\xc0\x8d\xfe\x07\xcd\x41\x37\x8c\xf6\x45\x6f\x13\x9f\xb7\xbf\x06\x64\x4a\x41\x27\x8a\x15\xc8\xa4\x88\x8e\x70\x8c\xf0\x8e\xb5\xa4\x0b\xce\x34\x36\xa6\x8a\x8a\x0c\x48\x4c\x76\xbb\x3a\xaf\x9b\xd9\x61\xd1\xe7\xc9\xb0\x72\x5d\x11\x69\xd2\x37\xff\x6e\x49\x7b\x03\x4d\x62\x75\xf0\x6f\x42\x48\xa4\x26\x27\x07\xd2\x5a\x9e\x86\xfb\x20\x4b\x95\xc0\x4d\x2d\x26\x08\x50\x14\xa5\xaa\x2b\x71\xd6\x43\xd4\x51\x0a\x16\x39\x55\xaf\xa9\x5c\x0b\x8f\x8b\x59\x28\x19\x81\x59\xcf\xc6\xd3\x11\x8a\x1c\x44\xc8\xac\x9f\x11\xcd\x69\xf2\x1a\xa7\xb0\xa4\x25\xc7\x18\x19\x72\x68\xa8\x40\xc8\x0b\x4e\xd1\x7d\x38\xe3\xa1\x1a\x74\x71\x4a\x6d\xda\x43\xde\x07\xe5\x36\xa1\x40\xbc\x25\xe5\xfc\x89\x26\xaf\x1e\x5e\x6f\xfa\x06\x94\x7c\x90\x53\x86\x9c\x89\xd7\xe0\x0c\x92\x26\x03\x96\x46\x61\x0e\x85\x02\x53\x6b\x81\xd6\x56\x42\x47\x19\xab\x7a\x70\x60\xca\x2c\x91\x02\x72\xf9\xc2\xa2\x70\xfb\x52\xf1\xd0\x8c\xc3\x6f\x6e\x29\x25\xd6\x13\xc7\xaa\x41\xdb\xbc\x30\xb7\x96\x96\xb8\x69\x5d\xfc\x86\x36\xae\x1c\x7d\xc4\x84\x33\x10\x38\xbd\x20\x87\x10\x0f\x53\x71\x9a\x66\x3e\x2e\x13\x1a\xa9\x48\x40\xf7\xe0\x7a\x1d\x3c\x1e\x66\x55\x16\x3a\x03\xc1\xa0\x05\xce\x41\x6b\x9a\x4d\x7b\xbe\x3d\x30\x5f\xa1\x66\xe0\x0d\x34\xb4\xde\x09\x37\xeb\xcc\x57\x67\x80\xcf\xc9\xf7\xe4\xda\x34\xce\x6a\x91\xd4\x8b\x55\xeb\x3c\xce\x88\xbb\x0b\xa8\x82\x5c\x5b\x77\xd4\x13\xef\x1e\xb4\xe4\x2b\x48\x3b\x11\xf7\xcb\xe1\x31\xf7\x1e\x5e\xd4\xeb\x10\x4a\x75\xd5\xc7\xc7\x57\x93\xa3\xfa\x1a\x92\x67\x8a\x63\x35\x9f\x5d\xf4\x3b\xa2\x9f\xbd\x51\x7e\x54\xdc\xc3\xeb\xd5\x67\x40\xf5\x8e\x3e\x28\x17\x66\x58\x0e\x76\x52\xdf\xbc\xa0\x0a\x37\x23\xec\x91\x66\xa1\xd6\x34\x03\x81\x8b\xee\x88\x73\xeb\x6b\xc5\x12\x94\x4a\x16\xfa\x50\xb6\x48\x11\x16\x6e\xa1\x5d\x6a\x69\x5c\x2f\xf0\x59\x05\x81\x0c\x37\x8b\x94\xe9\x82\xd3\xcd\x62\x60\x37\x75\xba\x71\xfb\xc8\xb9\x14\x0c\xa5\x21\x64\x81\x52\xf2\x91\x23\xd1\x99\x5d\xa5\x7e\x96\x2b\x50\x67\xd8\x3f\x7a\x50\xff\x7d\x3d\x9d\xa7\x9c\xc2\xab\xe9\x7c\xc5\xe4\x6f\xe9\x8f\x31\x79\xd8\xd3\x8d\x99\x29\xf6\x6e\x4e\x58\x0f\xfb\xe1\x35\x7d\xfc\x3b\x82\x85\x73\x91\x77\x8c\xbc\x36\x8b\x08\x1c\x32\x45\xf3\x3e\x2a\xff\xb7\xa4\xa4\x4c\x27\x52\xa5\x87\xbd\xb9\x14\x78\xd8\xee\xfb\xa5\xd8\xb5\x9f\xde\xb8\xba\x48\x17\x35\xcc\xb6\xe2\x09\xde\x2f\x8f\xfa\xa7\x79\xcc\x35\x02\xcd\xed\xe6\x9b\xe7\x54\x6d\x26\xd5\x69\x17\x6b\x7a\xc5\x7b\x48\xcd\x49\x40\x88\x4c\x5f\xc8\x28\xa1\xac\xe3\xb9\x4f\x2b\xd6\x86\x0e\xd5\xac\x27\xf8\x04\xf1\x56\x3f\x9c\x8f\x72\x1b\xeb\x42\x7a\x1f\xe9\x2f\x4c\xd1\xb3\x3c\x2e\x0e\x50\xe7\xac\xe3\xc2\xf9\xac\x7a\x8d\xe9\xe5\xaa\x50\x4c\x2a\x66\xde\x50\xaf\x9b\xb7\x9d\xef\xf6\x4b\xe4\xe6\x96\x44\xd1\xfe\x25\x68\x7f\xfe\xed\xdc\xad\xf1\x21\x84\x90\xca\x4f\xc3\x0a\xf6\x7e\x4c\xa4\xf0\xbe\x3f\x82\x27\xd1\xfe\x52\xe4\x78\xb0\x25\xb9\x82\x37\xcb\x31\x4a\x14\x43\x96\x50\x1e\xcd\x5b\xc3\x16\xbe\x4d\xeb\x96\x44\xbf\xb1\xec\xd9\xc5\x02\xae\xa1\x02\xa4\x22\xed\xa2\xae\xa9\x12\x4c\x64\xd1\x9c\x5c\x09\xb0\x80\x6a\x98\xf9\x89\x58\xbf\x43\xca\xca\x3c\x3c\x1a\x13\x4b\x69\x42\x99\xd5\x43\xa8\x93\x61\xee\xe4\xba\x13\x43\xa4\xad\x26\xf6\xef\xfa\x9b\x9a\x0d\xed\xb8\xb9\x3a\xb5\x85\xe1\xc5\x1e\xa5\xd6\x68\xc5\x02\x54\x3b\xbb\x72\x41\xea\x9d\x4f\xc1\xd3\x2a\x76\x95\x3c\xa5\xec\x01\xa9\x7b\xd5\x6e\x75\x4a\x26\xaf\x80\xee\xb1\xd1\xe4\x49\xd5\x03\x46\x39\xa3\x7a\xfa\xc1\xfb\x50\x7a\x9f\xfe\x5a\xd2\x03\x7c\xfc\x73\x49\x8f\xc3\xa9\x6f\x26\x7d\xc9\x7b\x1f\x4e\x9c\x49\x4f\x11\x41\xe5\x52\xe3\x65\xd4\x7b\x63\xe7\xdf\x00\x00\x00\xff\xff\xa7\x3a\x7d\xf7\xce\x20\x00\x00"), }, "/templates/email.tmpl": &vfsgen۰CompressedFileInfo{ name: "email.tmpl", @@ -184,16 +184,16 @@ var Assets = func() http.FileSystem { fs["/static/script.js"].(os.FileInfo), } fs["/static/lib"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/static/lib/bootstrap-4.0.0-alpha.6-dist"].(os.FileInfo), + fs["/static/lib/bootstrap-4.6.2-dist"].(os.FileInfo), fs["/static/lib/elm-datepicker"].(os.FileInfo), fs["/static/lib/font-awesome-4.7.0"].(os.FileInfo), } - fs["/static/lib/bootstrap-4.0.0-alpha.6-dist"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/static/lib/bootstrap-4.0.0-alpha.6-dist/css"].(os.FileInfo), + fs["/static/lib/bootstrap-4.6.2-dist"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/static/lib/bootstrap-4.6.2-dist/css"].(os.FileInfo), } - fs["/static/lib/bootstrap-4.0.0-alpha.6-dist/css"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ - fs["/static/lib/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css"].(os.FileInfo), - fs["/static/lib/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css.map"].(os.FileInfo), + fs["/static/lib/bootstrap-4.6.2-dist/css"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ + fs["/static/lib/bootstrap-4.6.2-dist/css/bootstrap.min.css"].(os.FileInfo), + fs["/static/lib/bootstrap-4.6.2-dist/css/bootstrap.min.css.map"].(os.FileInfo), } fs["/static/lib/elm-datepicker"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ fs["/static/lib/elm-datepicker/css"].(os.FileInfo), diff --git a/vendor/github.com/prometheus/alertmanager/cluster/channel.go b/vendor/github.com/prometheus/alertmanager/cluster/channel.go index 923a0e6539e..4e392bd7e79 100644 --- a/vendor/github.com/prometheus/alertmanager/cluster/channel.go +++ b/vendor/github.com/prometheus/alertmanager/cluster/channel.go @@ -21,6 +21,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/hashicorp/memberlist" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/alertmanager/cluster/clusterpb" ) @@ -53,22 +54,25 @@ func NewChannel( stopc <-chan struct{}, reg prometheus.Registerer, ) *Channel { - oversizeGossipMessageFailureTotal := prometheus.NewCounter(prometheus.CounterOpts{ + if reg == nil { + return nil + } + oversizeGossipMessageFailureTotal := promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_oversized_gossip_message_failure_total", Help: "Number of oversized gossip message sends that failed.", ConstLabels: prometheus.Labels{"key": key}, }) - oversizeGossipMessageSentTotal := prometheus.NewCounter(prometheus.CounterOpts{ + oversizeGossipMessageSentTotal := promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_oversized_gossip_message_sent_total", Help: "Number of oversized gossip message sent.", ConstLabels: prometheus.Labels{"key": key}, }) - oversizeGossipMessageDroppedTotal := prometheus.NewCounter(prometheus.CounterOpts{ + oversizeGossipMessageDroppedTotal := promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_oversized_gossip_message_dropped_total", Help: "Number of oversized gossip messages that were dropped due to a full message queue.", ConstLabels: prometheus.Labels{"key": key}, }) - oversizeGossipDuration := prometheus.NewHistogram(prometheus.HistogramOpts{ + oversizeGossipDuration := promauto.With(reg).NewHistogram(prometheus.HistogramOpts{ Name: "alertmanager_oversize_gossip_message_duration_seconds", Help: "Duration of oversized gossip message requests.", ConstLabels: prometheus.Labels{"key": key}, @@ -78,8 +82,6 @@ func NewChannel( NativeHistogramMinResetDuration: 1 * time.Hour, }) - reg.MustRegister(oversizeGossipDuration, oversizeGossipMessageFailureTotal, oversizeGossipMessageDroppedTotal, oversizeGossipMessageSentTotal) - c := &Channel{ key: key, send: send, diff --git a/vendor/github.com/prometheus/alertmanager/cluster/cluster.go b/vendor/github.com/prometheus/alertmanager/cluster/cluster.go index 5b38bc00be8..418ddeab7ff 100644 --- a/vendor/github.com/prometheus/alertmanager/cluster/cluster.go +++ b/vendor/github.com/prometheus/alertmanager/cluster/cluster.go @@ -1,4 +1,4 @@ -// Copyright 2018 Prometheus Team +// Copyright The Prometheus 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 @@ -15,10 +15,10 @@ package cluster import ( "context" + "crypto/rand" "errors" "fmt" "log/slog" - "math/rand" "net" "sort" "strconv" @@ -27,8 +27,9 @@ import ( "time" "github.com/hashicorp/memberlist" - "github.com/oklog/ulid" + "github.com/oklog/ulid/v2" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" ) // ClusterPeer represents a single Peer in a gossip cluster. @@ -59,7 +60,8 @@ type Peer struct { mlist *memberlist.Memberlist delegate *delegate - resolvedPeers []string + resolvedPeers []string + resolvePeersTimeout time.Duration mtx sync.RWMutex states map[string]State @@ -116,15 +118,16 @@ func (s PeerStatus) String() string { } const ( - DefaultPushPullInterval = 60 * time.Second - DefaultGossipInterval = 200 * time.Millisecond - DefaultTCPTimeout = 10 * time.Second - DefaultProbeTimeout = 500 * time.Millisecond - DefaultProbeInterval = 1 * time.Second - DefaultReconnectInterval = 10 * time.Second - DefaultReconnectTimeout = 6 * time.Hour - DefaultRefreshInterval = 15 * time.Second - MaxGossipPacketSize = 1400 + DefaultPushPullInterval = 60 * time.Second + DefaultGossipInterval = 200 * time.Millisecond + DefaultTCPTimeout = 10 * time.Second + DefaultProbeTimeout = 500 * time.Millisecond + DefaultProbeInterval = 1 * time.Second + DefaultReconnectInterval = 10 * time.Second + DefaultReconnectTimeout = 6 * time.Hour + DefaultRefreshInterval = 15 * time.Second + DefaultResolvePeersTimeout = 15 * time.Second + MaxGossipPacketSize = 1400 ) func Create( @@ -137,11 +140,13 @@ func Create( pushPullInterval time.Duration, gossipInterval time.Duration, tcpTimeout time.Duration, + resolveTimeout time.Duration, probeTimeout time.Duration, probeInterval time.Duration, tlsTransportConfig *TLSTransportConfig, allowInsecureAdvertise bool, label string, + name string, ) (*Peer, error) { bindHost, bindPortStr, err := net.SplitHostPort(bindAddr) if err != nil { @@ -166,7 +171,9 @@ func Create( } } - resolvedPeers, err := resolvePeers(context.Background(), knownPeers, advertiseAddr, &net.Resolver{}, waitIfEmpty) + ctx, cancel := context.WithTimeout(context.Background(), resolveTimeout) + defer cancel() + resolvedPeers, err := resolvePeers(ctx, knownPeers, advertiseAddr, &net.Resolver{}, waitIfEmpty) if err != nil { return nil, fmt.Errorf("resolve peers: %w", err) } @@ -187,38 +194,40 @@ func Create( advertisePort = bindPort } - // TODO(fabxc): generate human-readable but random names? - name, err := ulid.New(ulid.Now(), rand.New(rand.NewSource(time.Now().UnixNano()))) - if err != nil { - return nil, err + // Generate a random name if none is provided. + if name == "" { + id, err := ulid.New(ulid.Now(), rand.Reader) + if err != nil { + return nil, err + } + name = id.String() } p := &Peer{ - states: map[string]State{}, - stopc: make(chan struct{}), - readyc: make(chan struct{}), - logger: l, - peers: map[string]peer{}, - resolvedPeers: resolvedPeers, - knownPeers: knownPeers, + states: map[string]State{}, + stopc: make(chan struct{}), + readyc: make(chan struct{}), + logger: l, + peers: map[string]peer{}, + resolvedPeers: resolvedPeers, + resolvePeersTimeout: resolveTimeout, + knownPeers: knownPeers, } - p.register(reg, name.String()) + p.register(reg, name) - retransmit := len(knownPeers) / 2 - if retransmit < 3 { - retransmit = 3 - } + retransmit := max(len(knownPeers)/2, 3) p.delegate = newDelegate(l, reg, p, retransmit) cfg := memberlist.DefaultLANConfig() - cfg.Name = name.String() + cfg.Name = name cfg.BindAddr = bindHost cfg.BindPort = bindPort cfg.Delegate = p.delegate cfg.Ping = p.delegate cfg.Alive = p.delegate cfg.Events = p.delegate + cfg.Conflict = p.delegate cfg.GossipInterval = gossipInterval cfg.PushPullInterval = pushPullInterval cfg.TCPTimeout = tcpTimeout @@ -333,7 +342,7 @@ func (p *Peer) setInitialFailed(peers []string, myAddr string) { } func (p *Peer) register(reg prometheus.Registerer, name string) { - peerInfo := prometheus.NewGauge( + peerInfo := promauto.With(reg).NewGauge( prometheus.GaugeOpts{ Name: "alertmanager_cluster_peer_info", Help: "A metric with a constant '1' value labeled by peer name.", @@ -341,7 +350,7 @@ func (p *Peer) register(reg prometheus.Registerer, name string) { }, ) peerInfo.Set(1) - clusterFailedPeers := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + promauto.With(reg).NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_cluster_failed_peers", Help: "Number indicating the current number of failed peers in the cluster.", }, func() float64 { @@ -350,40 +359,37 @@ func (p *Peer) register(reg prometheus.Registerer, name string) { return float64(len(p.failedPeers)) }) - p.failedReconnectionsCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.failedReconnectionsCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_reconnections_failed_total", Help: "A counter of the number of failed cluster peer reconnection attempts.", }) - p.reconnectionsCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.reconnectionsCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_reconnections_total", Help: "A counter of the number of cluster peer reconnections.", }) - p.failedRefreshCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.failedRefreshCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_refresh_join_failed_total", Help: "A counter of the number of failed cluster peer joined attempts via refresh.", }) - p.refreshCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.refreshCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_refresh_join_total", Help: "A counter of the number of cluster peer joined via refresh.", }) - p.peerLeaveCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.peerLeaveCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_peers_left_total", Help: "A counter of the number of peers that have left.", }) - p.peerUpdateCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.peerUpdateCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_peers_update_total", Help: "A counter of the number of peers that have updated metadata.", }) - p.peerJoinCounter = prometheus.NewCounter(prometheus.CounterOpts{ + p.peerJoinCounter = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_peers_joined_total", Help: "A counter of the number of peers that have joined.", }) - - reg.MustRegister(peerInfo, clusterFailedPeers, p.failedReconnectionsCounter, p.reconnectionsCounter, - p.peerLeaveCounter, p.peerUpdateCounter, p.peerJoinCounter, p.refreshCounter, p.failedRefreshCounter) } func (p *Peer) runPeriodicTask(d time.Duration, f func()) { @@ -442,7 +448,9 @@ func (p *Peer) reconnect() { func (p *Peer) refresh() { logger := p.logger.With("msg", "refresh") - resolvedPeers, err := resolvePeers(context.Background(), p.knownPeers, p.advertiseAddr, &net.Resolver{}, false) + ctx, cancel := context.WithTimeout(context.Background(), p.resolvePeersTimeout) + defer cancel() + resolvedPeers, err := resolvePeers(ctx, p.knownPeers, p.advertiseAddr, &net.Resolver{}, false) if err != nil { logger.Debug(fmt.Sprintf("%v", p.knownPeers), "err", err) return diff --git a/vendor/github.com/prometheus/alertmanager/cluster/delegate.go b/vendor/github.com/prometheus/alertmanager/cluster/delegate.go index 5353d54da67..624c206493c 100644 --- a/vendor/github.com/prometheus/alertmanager/cluster/delegate.go +++ b/vendor/github.com/prometheus/alertmanager/cluster/delegate.go @@ -1,4 +1,4 @@ -// Copyright 2018 Prometheus Team +// Copyright The Prometheus 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 @@ -20,6 +20,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/hashicorp/memberlist" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/alertmanager/cluster/clusterpb" ) @@ -46,6 +47,7 @@ type delegate struct { messagesPruned prometheus.Counter nodeAlive *prometheus.CounterVec nodePingDuration *prometheus.HistogramVec + conflictsCount prometheus.Counter } func newDelegate(l *slog.Logger, reg prometheus.Registerer, p *Peer, retransmit int) *delegate { @@ -53,56 +55,56 @@ func newDelegate(l *slog.Logger, reg prometheus.Registerer, p *Peer, retransmit NumNodes: p.ClusterSize, RetransmitMult: retransmit, } - messagesReceived := prometheus.NewCounterVec(prometheus.CounterOpts{ + messagesReceived := promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_received_total", Help: "Total number of cluster messages received.", }, []string{"msg_type"}) - messagesReceivedSize := prometheus.NewCounterVec(prometheus.CounterOpts{ + messagesReceivedSize := promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_received_size_total", Help: "Total size of cluster messages received.", }, []string{"msg_type"}) - messagesSent := prometheus.NewCounterVec(prometheus.CounterOpts{ + messagesSent := promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_sent_total", Help: "Total number of cluster messages sent.", }, []string{"msg_type"}) - messagesSentSize := prometheus.NewCounterVec(prometheus.CounterOpts{ + messagesSentSize := promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_sent_size_total", Help: "Total size of cluster messages sent.", }, []string{"msg_type"}) - messagesPruned := prometheus.NewCounter(prometheus.CounterOpts{ + messagesPruned := promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_pruned_total", Help: "Total number of cluster messages pruned.", }) - gossipClusterMembers := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + promauto.With(reg).NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_cluster_members", Help: "Number indicating current number of members in cluster.", }, func() float64 { return float64(p.ClusterSize()) }) - peerPosition := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + promauto.With(reg).NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_peer_position", Help: "Position the Alertmanager instance believes it's in. The position determines a peer's behavior in the cluster.", }, func() float64 { return float64(p.Position()) }) - healthScore := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + promauto.With(reg).NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_cluster_health_score", Help: "Health score of the cluster. Lower values are better and zero means 'totally healthy'.", }, func() float64 { return float64(p.mlist.GetHealthScore()) }) - messagesQueued := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + promauto.With(reg).NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_cluster_messages_queued", Help: "Number of cluster messages which are queued.", }, func() float64 { return float64(bcast.NumQueued()) }) - nodeAlive := prometheus.NewCounterVec(prometheus.CounterOpts{ + nodeAlive := promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_alive_messages_total", Help: "Total number of received alive messages.", }, []string{"peer"}, ) - nodePingDuration := prometheus.NewHistogramVec(prometheus.HistogramOpts{ + nodePingDuration := promauto.With(reg).NewHistogramVec(prometheus.HistogramOpts{ Name: "alertmanager_cluster_pings_seconds", Help: "Histogram of latencies for ping messages.", Buckets: []float64{.005, .01, .025, .05, .1, .25, .5}, @@ -111,6 +113,10 @@ func newDelegate(l *slog.Logger, reg prometheus.Registerer, p *Peer, retransmit NativeHistogramMinResetDuration: 1 * time.Hour, }, []string{"peer"}, ) + conflictsCount := promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "alertmanager_cluster_peer_name_conflicts_total", + Help: "Total number of times memberlist has noticed conflicting peer names", + }) messagesReceived.WithLabelValues(fullState) messagesReceivedSize.WithLabelValues(fullState) @@ -121,11 +127,6 @@ func newDelegate(l *slog.Logger, reg prometheus.Registerer, p *Peer, retransmit messagesSent.WithLabelValues(update) messagesSentSize.WithLabelValues(update) - reg.MustRegister(messagesReceived, messagesReceivedSize, messagesSent, messagesSentSize, - gossipClusterMembers, peerPosition, healthScore, messagesQueued, messagesPruned, - nodeAlive, nodePingDuration, - ) - d := &delegate{ logger: l, Peer: p, @@ -137,6 +138,7 @@ func newDelegate(l *slog.Logger, reg prometheus.Registerer, p *Peer, retransmit messagesPruned: messagesPruned, nodeAlive: nodeAlive, nodePingDuration: nodePingDuration, + conflictsCount: conflictsCount, } go d.handleQueueDepth() @@ -173,6 +175,12 @@ func (d *delegate) NotifyMsg(b []byte) { } } +// NotifyConflict is the callback when memberlist encounters two nodes with the same ID. +func (d *delegate) NotifyConflict(existing, other *memberlist.Node) { + d.logger.Warn("Found conflicting peer IDs", "peer", existing.Name) + d.conflictsCount.Inc() +} + // GetBroadcasts is called when user data messages can be broadcasted. func (d *delegate) GetBroadcasts(overhead, limit int) [][]byte { msgs := d.bcast.GetBroadcasts(overhead, limit) diff --git a/vendor/github.com/prometheus/alertmanager/cluster/tls_transport.go b/vendor/github.com/prometheus/alertmanager/cluster/tls_transport.go index f7d4b13d1c2..2af3d9f9d44 100644 --- a/vendor/github.com/prometheus/alertmanager/cluster/tls_transport.go +++ b/vendor/github.com/prometheus/alertmanager/cluster/tls_transport.go @@ -30,6 +30,7 @@ import ( "github.com/hashicorp/go-sockaddr" "github.com/hashicorp/memberlist" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" common "github.com/prometheus/common/config" "github.com/prometheus/exporter-toolkit/web" ) @@ -76,6 +77,10 @@ func NewTLSTransport( bindPort int, cfg *TLSTransportConfig, ) (*TLSTransport, error) { + if reg == nil { + return nil, errors.New("missing Prometheus registry") + } + if cfg == nil { return nil, errors.New("must specify TLSTransportConfig") } @@ -289,7 +294,7 @@ func (t *TLSTransport) handle(conn net.Conn) { } func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { - t.packetsSent = prometheus.NewCounter( + t.packetsSent = promauto.With(reg).NewCounter( prometheus.CounterOpts{ Namespace: metricNamespace, Subsystem: metricSubsystem, @@ -297,7 +302,7 @@ func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { Help: "The number of packet bytes sent to outgoing connections (excluding internal metadata).", }, ) - t.packetsRcvd = prometheus.NewCounter( + t.packetsRcvd = promauto.With(reg).NewCounter( prometheus.CounterOpts{ Namespace: metricNamespace, Subsystem: metricSubsystem, @@ -305,7 +310,7 @@ func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { Help: "The number of packet bytes received from incoming connections (excluding internal metadata).", }, ) - t.streamsSent = prometheus.NewCounter( + t.streamsSent = promauto.With(reg).NewCounter( prometheus.CounterOpts{ Namespace: metricNamespace, Subsystem: metricSubsystem, @@ -314,7 +319,7 @@ func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { }, ) - t.streamsRcvd = prometheus.NewCounter( + t.streamsRcvd = promauto.With(reg).NewCounter( prometheus.CounterOpts{ Namespace: metricNamespace, Subsystem: metricSubsystem, @@ -322,7 +327,7 @@ func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { Help: "The number of stream connections received.", }, ) - t.readErrs = prometheus.NewCounter( + t.readErrs = promauto.With(reg).NewCounter( prometheus.CounterOpts{ Namespace: metricNamespace, Subsystem: metricSubsystem, @@ -330,7 +335,7 @@ func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { Help: "The number of errors encountered while reading from incoming connections.", }, ) - t.writeErrs = prometheus.NewCounterVec( + t.writeErrs = promauto.With(reg).NewCounterVec( prometheus.CounterOpts{ Namespace: metricNamespace, Subsystem: metricSubsystem, @@ -339,13 +344,4 @@ func (t *TLSTransport) registerMetrics(reg prometheus.Registerer) { }, []string{"connection_type"}, ) - - if reg != nil { - reg.MustRegister(t.packetsSent) - reg.MustRegister(t.packetsRcvd) - reg.MustRegister(t.streamsSent) - reg.MustRegister(t.streamsRcvd) - reg.MustRegister(t.readErrs) - reg.MustRegister(t.writeErrs) - } } diff --git a/vendor/github.com/prometheus/alertmanager/config/config.go b/vendor/github.com/prometheus/alertmanager/config/config.go index 09cd7138705..d0107614749 100644 --- a/vendor/github.com/prometheus/alertmanager/config/config.go +++ b/vendor/github.com/prometheus/alertmanager/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2015 Prometheus Team +// Copyright The Prometheus 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 @@ -14,6 +14,7 @@ package config import ( + "cmp" "encoding/json" "errors" "fmt" @@ -24,6 +25,7 @@ import ( "regexp" "sort" "strings" + "text/template" "time" commoncfg "github.com/prometheus/common/config" @@ -199,6 +201,85 @@ func (s *SecretURL) UnmarshalJSON(data []byte) error { return nil } +// containsTemplating checks if the string contains template syntax. +func containsTemplating(s string) (bool, error) { + if !strings.Contains(s, "{{") { + return false, nil + } + // If it contains template syntax, validate it's actually a valid templ. + _, err := template.New("").Parse(s) + if err != nil { + return true, err + } + return true, nil +} + +// SecretTemplateURL is a Secret string that represents a URL which may contain +// Go template syntax. Unlike SecretURL, it allows templated values and only +// validates non-templated URLs at unmarshal time. +type SecretTemplateURL Secret + +// MarshalYAML implements the yaml.Marshaler interface for SecretTemplateURL. +func (s SecretTemplateURL) MarshalYAML() (any, error) { + if s != "" { + if MarshalSecretValue { + return string(s), nil + } + return secretToken, nil + } + return nil, nil +} + +// UnmarshalYAML implements the yaml.Unmarshaler interface for SecretTemplateURL. +func (s *SecretTemplateURL) UnmarshalYAML(unmarshal func(any) error) error { + type plain Secret + if err := unmarshal((*plain)(s)); err != nil { + return err + } + + urlStr := string(*s) + + // Skip validation for empty strings or secret token + if urlStr == "" || urlStr == secretToken { + return nil + } + + // Check if the URL contains template syntax + isTemplated, err := containsTemplating(urlStr) + if err != nil { + return fmt.Errorf("invalid template syntax: %w", err) + } + + // Only validate as URL if it's not templated + if !isTemplated { + if _, err := parseURL(urlStr); err != nil { + return fmt.Errorf("invalid URL: %w", err) + } + } + + return nil +} + +// MarshalJSON implements the json.Marshaler interface for SecretTemplateURL. +func (s SecretTemplateURL) MarshalJSON() ([]byte, error) { + return Secret(s).MarshalJSON() +} + +// UnmarshalJSON implements the json.Unmarshaler interface for SecretTemplateURL. +func (s *SecretTemplateURL) UnmarshalJSON(data []byte) error { + if string(data) == secretToken || string(data) == secretTokenJSON { + *s = "" + return nil + } + // Just unmarshal as a string since Secret doesn't have UnmarshalJSON + var str string + if err := json.Unmarshal(data, &str); err != nil { + return err + } + *s = SecretTemplateURL(str) + return nil +} + // Load parses the YAML input s into a Config. func Load(s string) (*Config, error) { cfg := &Config{} @@ -298,6 +379,9 @@ func resolveFilepaths(baseDir string, cfg *Config) { for _, cfg := range receiver.RocketchatConfigs { cfg.HTTPConfig.SetDirectory(baseDir) } + for _, cfg := range receiver.MattermostConfigs { + cfg.HTTPConfig.SetDirectory(baseDir) + } } } @@ -348,6 +432,8 @@ type Config struct { MuteTimeIntervals []MuteTimeInterval `yaml:"mute_time_intervals,omitempty" json:"mute_time_intervals,omitempty"` TimeIntervals []TimeInterval `yaml:"time_intervals,omitempty" json:"time_intervals,omitempty"` + TracingConfig TracingConfig `yaml:"tracing,omitempty" json:"tracing,omitempty"` + // original is the input from which the config was parsed. original string } @@ -377,10 +463,23 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { *c.Global = DefaultGlobalConfig() } + if c.Global.SlackAppToken != "" && len(c.Global.SlackAppTokenFile) > 0 { + return errors.New("at most one of slack_app_token & slack_app_token_file must be configured") + } + if c.Global.SlackAPIURL != nil && len(c.Global.SlackAPIURLFile) > 0 { return errors.New("at most one of slack_api_url & slack_api_url_file must be configured") } + if (c.Global.SlackAppToken != "" || len(c.Global.SlackAppTokenFile) > 0) && (c.Global.SlackAPIURL != nil || len(c.Global.SlackAPIURLFile) > 0) { + // Support transition from workaround suggested in https://github.com/prometheus/alertmanager/issues/2513, + // where users might set `slack_api_url` at the top level and then have `http_config` with individual + // bearer tokens in the receivers. + if c.Global.SlackAPIURL.String() != c.Global.SlackAppURL.String() { + return errors.New("at most one of slack_app_token/slack_app_token_file & slack_api_url/slack_api_url_file must be configured") + } + } + if c.Global.OpsGenieAPIKey != "" && len(c.Global.OpsGenieAPIKeyFile) > 0 { return errors.New("at most one of opsgenie_api_key & opsgenie_api_key_file must be configured") } @@ -389,6 +488,10 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { return errors.New("at most one of victorops_api_key & victorops_api_key_file must be configured") } + if c.Global.TelegramBotToken != "" && len(c.Global.TelegramBotTokenFile) > 0 { + return errors.New("at most one of telegram_bot_token & telegram_bot_token_file must be configured") + } + if len(c.Global.SMTPAuthPassword) > 0 && len(c.Global.SMTPAuthPasswordFile) > 0 { return errors.New("at most one of smtp_auth_password & smtp_auth_password_file must be configured") } @@ -401,6 +504,14 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { return errors.New("at most one of rocketchat_token_id & rocketchat_token_id_file must be configured") } + if len(c.Global.SMTPAuthSecret) > 0 && len(c.Global.SMTPAuthSecretFile) > 0 { + return fmt.Errorf("at most one of smtp_auth_secret & smtp_auth_secret_file must be configured") + } + + if c.Global.WeChatAPISecret != "" && len(c.Global.WeChatAPISecretFile) > 0 { + return errors.New("at most one of wechat_api_secret & wechat_api_secret_file must be configured") + } + names := map[string]struct{}{} for _, rcv := range c.Receivers { @@ -408,125 +519,115 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { return fmt.Errorf("notification config name %q is not unique", rcv.Name) } for _, wh := range rcv.WebhookConfigs { - if wh.HTTPConfig == nil { - wh.HTTPConfig = c.Global.HTTPConfig - } + wh.HTTPConfig = cmp.Or(wh.HTTPConfig, c.Global.HTTPConfig) } for _, ec := range rcv.EmailConfigs { - if ec.TLSConfig == nil { - ec.TLSConfig = c.Global.SMTPTLSConfig - } + ec.TLSConfig = cmp.Or(ec.TLSConfig, c.Global.SMTPTLSConfig) + ec.Smarthost = cmp.Or(ec.Smarthost, c.Global.SMTPSmarthost) if ec.Smarthost.String() == "" { - if c.Global.SMTPSmarthost.String() == "" { - return errors.New("no global SMTP smarthost set") - } - ec.Smarthost = c.Global.SMTPSmarthost + return errors.New("no global SMTP smarthost set") } + ec.From = cmp.Or(ec.From, c.Global.SMTPFrom) if ec.From == "" { - if c.Global.SMTPFrom == "" { - return errors.New("no global SMTP from set") - } - ec.From = c.Global.SMTPFrom - } - if ec.Hello == "" { - ec.Hello = c.Global.SMTPHello - } - if ec.AuthUsername == "" { - ec.AuthUsername = c.Global.SMTPAuthUsername + return errors.New("no global SMTP from set") } + ec.Hello = cmp.Or(ec.Hello, c.Global.SMTPHello) + ec.AuthUsername = cmp.Or(ec.AuthUsername, c.Global.SMTPAuthUsername) if ec.AuthPassword == "" && ec.AuthPasswordFile == "" { ec.AuthPassword = c.Global.SMTPAuthPassword ec.AuthPasswordFile = c.Global.SMTPAuthPasswordFile } - if ec.AuthSecret == "" { - ec.AuthSecret = c.Global.SMTPAuthSecret - } - if ec.AuthIdentity == "" { - ec.AuthIdentity = c.Global.SMTPAuthIdentity - } + ec.AuthSecret = cmp.Or(ec.AuthSecret, c.Global.SMTPAuthSecret) + ec.AuthSecretFile = cmp.Or(ec.AuthSecretFile, c.Global.SMTPAuthSecretFile) + ec.AuthIdentity = cmp.Or(ec.AuthIdentity, c.Global.SMTPAuthIdentity) if ec.RequireTLS == nil { ec.RequireTLS = new(bool) *ec.RequireTLS = c.Global.SMTPRequireTLS } + if ec.ForceImplicitTLS == nil { + ec.ForceImplicitTLS = c.Global.SMTPForceImplicitTLS + } } for _, sc := range rcv.SlackConfigs { - if sc.HTTPConfig == nil { - sc.HTTPConfig = c.Global.HTTPConfig + sc.AppURL = cmp.Or(sc.AppURL, c.Global.SlackAppURL) + if sc.AppURL == nil { + return errors.New("no global Slack App URL set") + } + // we only want to set the app token from global if there's no local authorization or webhook url + if sc.AppToken == "" && len(sc.AppTokenFile) == 0 && (sc.HTTPConfig == nil || sc.HTTPConfig.Authorization == nil) && sc.APIURL == nil { + sc.AppToken = c.Global.SlackAppToken + sc.AppTokenFile = c.Global.SlackAppTokenFile } if sc.APIURL == nil && len(sc.APIURLFile) == 0 { - if c.Global.SlackAPIURL == nil && len(c.Global.SlackAPIURLFile) == 0 { - return errors.New("no global Slack API URL set either inline or in a file") - } sc.APIURL = c.Global.SlackAPIURL sc.APIURLFile = c.Global.SlackAPIURLFile } + if sc.APIURL == nil && len(sc.APIURLFile) == 0 && sc.AppToken == "" && len(sc.AppTokenFile) == 0 { + return errors.New("no Slack API URL nor App token set either inline or in a file") + } + if sc.HTTPConfig == nil { + // we don't want to change the global http config when setting the receiver's http config, do we do a copy + httpconfig := *c.Global.HTTPConfig + sc.HTTPConfig = &httpconfig + } + if sc.AppToken != "" || len(sc.AppTokenFile) != 0 { + if sc.HTTPConfig.Authorization != nil { + return errors.New("http authorization can't be set when using Slack App tokens") + } + sc.HTTPConfig.Authorization = &commoncfg.Authorization{ + Type: "Bearer", + Credentials: commoncfg.Secret(sc.AppToken), + CredentialsFile: sc.AppTokenFile, + } + sc.APIURL = (*SecretURL)(sc.AppURL) + } } for _, poc := range rcv.PushoverConfigs { - if poc.HTTPConfig == nil { - poc.HTTPConfig = c.Global.HTTPConfig - } + poc.HTTPConfig = cmp.Or(poc.HTTPConfig, c.Global.HTTPConfig) } for _, pdc := range rcv.PagerdutyConfigs { - if pdc.HTTPConfig == nil { - pdc.HTTPConfig = c.Global.HTTPConfig - } + pdc.HTTPConfig = cmp.Or(pdc.HTTPConfig, c.Global.HTTPConfig) + pdc.URL = cmp.Or(pdc.URL, c.Global.PagerdutyURL) if pdc.URL == nil { - if c.Global.PagerdutyURL == nil { - return errors.New("no global PagerDuty URL set") - } - pdc.URL = c.Global.PagerdutyURL + return errors.New("no global PagerDuty URL set") } } for _, iio := range rcv.IncidentioConfigs { - if iio.HTTPConfig == nil { - iio.HTTPConfig = c.Global.HTTPConfig - } + iio.HTTPConfig = cmp.Or(iio.HTTPConfig, c.Global.HTTPConfig) } for _, ogc := range rcv.OpsGenieConfigs { - if ogc.HTTPConfig == nil { - ogc.HTTPConfig = c.Global.HTTPConfig - } + ogc.HTTPConfig = cmp.Or(ogc.HTTPConfig, c.Global.HTTPConfig) + ogc.APIURL = cmp.Or(ogc.APIURL, c.Global.OpsGenieAPIURL) if ogc.APIURL == nil { - if c.Global.OpsGenieAPIURL == nil { - return errors.New("no global OpsGenie URL set") - } - ogc.APIURL = c.Global.OpsGenieAPIURL + return errors.New("no global OpsGenie URL set") } if !strings.HasSuffix(ogc.APIURL.Path, "/") { ogc.APIURL.Path += "/" } + ogc.APIKey = cmp.Or(ogc.APIKey, c.Global.OpsGenieAPIKey) + ogc.APIKeyFile = cmp.Or(ogc.APIKeyFile, c.Global.OpsGenieAPIKeyFile) if ogc.APIKey == "" && len(ogc.APIKeyFile) == 0 { - if c.Global.OpsGenieAPIKey == "" && len(c.Global.OpsGenieAPIKeyFile) == 0 { - return errors.New("no global OpsGenie API Key set either inline or in a file") - } - ogc.APIKey = c.Global.OpsGenieAPIKey - ogc.APIKeyFile = c.Global.OpsGenieAPIKeyFile + return errors.New("no global OpsGenie API Key set either inline or in a file") } } for _, wcc := range rcv.WechatConfigs { - if wcc.HTTPConfig == nil { - wcc.HTTPConfig = c.Global.HTTPConfig - } - + wcc.HTTPConfig = cmp.Or(wcc.HTTPConfig, c.Global.HTTPConfig) + wcc.APIURL = cmp.Or(wcc.APIURL, c.Global.WeChatAPIURL) if wcc.APIURL == nil { - if c.Global.WeChatAPIURL == nil { - return errors.New("no global Wechat URL set") - } - wcc.APIURL = c.Global.WeChatAPIURL + return errors.New("no global Wechat URL set") } - if wcc.APISecret == "" { - if c.Global.WeChatAPISecret == "" { - return errors.New("no global Wechat ApiSecret set") + if wcc.APISecret == "" && len(wcc.APISecretFile) == 0 { + if c.Global.WeChatAPISecret == "" && len(c.Global.WeChatAPISecretFile) == 0 { + return errors.New("no global Wechat Api Secret set either inline or in a file") } wcc.APISecret = c.Global.WeChatAPISecret + wcc.APISecretFile = c.Global.WeChatAPISecretFile } + wcc.CorpID = cmp.Or(wcc.CorpID, c.Global.WeChatAPICorpID) if wcc.CorpID == "" { - if c.Global.WeChatAPICorpID == "" { - return errors.New("no global Wechat CorpID set") - } - wcc.CorpID = c.Global.WeChatAPICorpID + return errors.New("no global Wechat CorpID set") } if !strings.HasSuffix(wcc.APIURL.Path, "/") { @@ -534,109 +635,86 @@ func (c *Config) UnmarshalYAML(unmarshal func(any) error) error { } } for _, voc := range rcv.VictorOpsConfigs { - if voc.HTTPConfig == nil { - voc.HTTPConfig = c.Global.HTTPConfig - } + voc.HTTPConfig = cmp.Or(voc.HTTPConfig, c.Global.HTTPConfig) + voc.APIURL = cmp.Or(voc.APIURL, c.Global.VictorOpsAPIURL) if voc.APIURL == nil { - if c.Global.VictorOpsAPIURL == nil { - return errors.New("no global VictorOps URL set") - } - voc.APIURL = c.Global.VictorOpsAPIURL + return errors.New("no global VictorOps URL set") } if !strings.HasSuffix(voc.APIURL.Path, "/") { voc.APIURL.Path += "/" } + voc.APIKey = cmp.Or(voc.APIKey, c.Global.VictorOpsAPIKey) + voc.APIKeyFile = cmp.Or(voc.APIKeyFile, c.Global.VictorOpsAPIKeyFile) if voc.APIKey == "" && len(voc.APIKeyFile) == 0 { - if c.Global.VictorOpsAPIKey == "" && len(c.Global.VictorOpsAPIKeyFile) == 0 { - return errors.New("no global VictorOps API Key set") - } - voc.APIKey = c.Global.VictorOpsAPIKey - voc.APIKeyFile = c.Global.VictorOpsAPIKeyFile + return errors.New("no global VictorOps API Key set") } } for _, sns := range rcv.SNSConfigs { - if sns.HTTPConfig == nil { - sns.HTTPConfig = c.Global.HTTPConfig - } + sns.HTTPConfig = cmp.Or(sns.HTTPConfig, c.Global.HTTPConfig) } for _, telegram := range rcv.TelegramConfigs { - if telegram.HTTPConfig == nil { - telegram.HTTPConfig = c.Global.HTTPConfig - } - if telegram.APIUrl == nil { - telegram.APIUrl = c.Global.TelegramAPIUrl + telegram.HTTPConfig = cmp.Or(telegram.HTTPConfig, c.Global.HTTPConfig) + telegram.APIUrl = cmp.Or(telegram.APIUrl, c.Global.TelegramAPIUrl) + if telegram.BotToken == "" && len(telegram.BotTokenFile) == 0 { + if c.Global.TelegramBotToken == "" && len(c.Global.TelegramBotTokenFile) == 0 { + return errors.New("missing bot_token or bot_token_file on telegram_config") + } + telegram.BotToken = c.Global.TelegramBotToken + telegram.BotTokenFile = c.Global.TelegramBotTokenFile } } for _, discord := range rcv.DiscordConfigs { - if discord.HTTPConfig == nil { - discord.HTTPConfig = c.Global.HTTPConfig - } + discord.HTTPConfig = cmp.Or(discord.HTTPConfig, c.Global.HTTPConfig) if discord.WebhookURL == nil && len(discord.WebhookURLFile) == 0 { return errors.New("no discord webhook URL or URLFile provided") } } for _, webex := range rcv.WebexConfigs { - if webex.HTTPConfig == nil { - webex.HTTPConfig = c.Global.HTTPConfig - } + webex.HTTPConfig = cmp.Or(webex.HTTPConfig, c.Global.HTTPConfig) + webex.APIURL = cmp.Or(webex.APIURL, c.Global.WebexAPIURL) if webex.APIURL == nil { - if c.Global.WebexAPIURL == nil { - return errors.New("no global Webex URL set") - } - - webex.APIURL = c.Global.WebexAPIURL + return errors.New("no global Webex URL set") } } for _, msteams := range rcv.MSTeamsConfigs { - if msteams.HTTPConfig == nil { - msteams.HTTPConfig = c.Global.HTTPConfig - } + msteams.HTTPConfig = cmp.Or(msteams.HTTPConfig, c.Global.HTTPConfig) if msteams.WebhookURL == nil && len(msteams.WebhookURLFile) == 0 { return errors.New("no msteams webhook URL or URLFile provided") } } for _, msteamsv2 := range rcv.MSTeamsV2Configs { - if msteamsv2.HTTPConfig == nil { - msteamsv2.HTTPConfig = c.Global.HTTPConfig - } + msteamsv2.HTTPConfig = cmp.Or(msteamsv2.HTTPConfig, c.Global.HTTPConfig) if msteamsv2.WebhookURL == nil && len(msteamsv2.WebhookURLFile) == 0 { return errors.New("no msteamsv2 webhook URL or URLFile provided") } } for _, jira := range rcv.JiraConfigs { - if jira.HTTPConfig == nil { - jira.HTTPConfig = c.Global.HTTPConfig - } + jira.HTTPConfig = cmp.Or(jira.HTTPConfig, c.Global.HTTPConfig) + jira.APIURL = cmp.Or(jira.APIURL, c.Global.JiraAPIURL) if jira.APIURL == nil { - if c.Global.JiraAPIURL == nil { - return errors.New("no global Jira Cloud URL set") - } - jira.APIURL = c.Global.JiraAPIURL + return errors.New("no global Jira Cloud URL set") } } for _, rocketchat := range rcv.RocketchatConfigs { - if rocketchat.HTTPConfig == nil { - rocketchat.HTTPConfig = c.Global.HTTPConfig - } - if rocketchat.APIURL == nil { - rocketchat.APIURL = c.Global.RocketchatAPIURL - } + rocketchat.HTTPConfig = cmp.Or(rocketchat.HTTPConfig, c.Global.HTTPConfig) + rocketchat.APIURL = cmp.Or(rocketchat.APIURL, c.Global.RocketchatAPIURL) + + rocketchat.TokenID = cmp.Or(rocketchat.TokenID, c.Global.RocketchatTokenID) + rocketchat.TokenIDFile = cmp.Or(rocketchat.TokenIDFile, c.Global.RocketchatTokenIDFile) if rocketchat.TokenID == nil && len(rocketchat.TokenIDFile) == 0 { - if c.Global.RocketchatTokenID == nil && len(c.Global.RocketchatTokenIDFile) == 0 { - return errors.New("no global Rocketchat TokenID set either inline or in a file") - } - rocketchat.TokenID = c.Global.RocketchatTokenID - rocketchat.TokenIDFile = c.Global.RocketchatTokenIDFile + return errors.New("no global Rocketchat TokenID set either inline or in a file") } + + rocketchat.Token = cmp.Or(rocketchat.Token, c.Global.RocketchatToken) + rocketchat.TokenFile = cmp.Or(rocketchat.TokenFile, c.Global.RocketchatTokenFile) if rocketchat.Token == nil && len(rocketchat.TokenFile) == 0 { - if c.Global.RocketchatToken == nil && len(c.Global.RocketchatTokenFile) == 0 { - return errors.New("no global Rocketchat Token set either inline or in a file") - } - rocketchat.Token = c.Global.RocketchatToken - rocketchat.TokenFile = c.Global.RocketchatTokenFile + return errors.New("no global Rocketchat Token set either inline or in a file") } } + for _, mattermost := range rcv.MattermostConfigs { + mattermost.HTTPConfig = cmp.Or(mattermost.HTTPConfig, c.Global.HTTPConfig) + } names[rcv.Name] = struct{}{} } @@ -741,6 +819,7 @@ func DefaultGlobalConfig() GlobalConfig { TelegramAPIUrl: mustParseURL("https://api.telegram.org"), WebexAPIURL: mustParseURL("https://webexapis.com/v1/messages"), RocketchatAPIURL: mustParseURL("https://open.rocket.chat/"), + SlackAppURL: mustParseURL("https://slack.com/api/chat.postMessage"), } } @@ -850,22 +929,30 @@ type GlobalConfig struct { SMTPAuthPassword Secret `yaml:"smtp_auth_password,omitempty" json:"smtp_auth_password,omitempty"` SMTPAuthPasswordFile string `yaml:"smtp_auth_password_file,omitempty" json:"smtp_auth_password_file,omitempty"` SMTPAuthSecret Secret `yaml:"smtp_auth_secret,omitempty" json:"smtp_auth_secret,omitempty"` + SMTPAuthSecretFile string `yaml:"smtp_auth_secret_file,omitempty" json:"smtp_auth_secret_file,omitempty"` SMTPAuthIdentity string `yaml:"smtp_auth_identity,omitempty" json:"smtp_auth_identity,omitempty"` SMTPRequireTLS bool `yaml:"smtp_require_tls" json:"smtp_require_tls,omitempty"` SMTPTLSConfig *commoncfg.TLSConfig `yaml:"smtp_tls_config,omitempty" json:"smtp_tls_config,omitempty"` + SMTPForceImplicitTLS *bool `yaml:"smtp_force_implicit_tls,omitempty" json:"smtp_force_implicit_tls,omitempty"` SlackAPIURL *SecretURL `yaml:"slack_api_url,omitempty" json:"slack_api_url,omitempty"` SlackAPIURLFile string `yaml:"slack_api_url_file,omitempty" json:"slack_api_url_file,omitempty"` + SlackAppToken Secret `yaml:"slack_app_token,omitempty" json:"slack_app_token,omitempty"` + SlackAppTokenFile string `yaml:"slack_app_token_file,omitempty" json:"slack_app_token_file,omitempty"` + SlackAppURL *URL `yaml:"slack_app_url,omitempty" json:"slack_app_url,omitempty"` PagerdutyURL *URL `yaml:"pagerduty_url,omitempty" json:"pagerduty_url,omitempty"` OpsGenieAPIURL *URL `yaml:"opsgenie_api_url,omitempty" json:"opsgenie_api_url,omitempty"` OpsGenieAPIKey Secret `yaml:"opsgenie_api_key,omitempty" json:"opsgenie_api_key,omitempty"` OpsGenieAPIKeyFile string `yaml:"opsgenie_api_key_file,omitempty" json:"opsgenie_api_key_file,omitempty"` WeChatAPIURL *URL `yaml:"wechat_api_url,omitempty" json:"wechat_api_url,omitempty"` WeChatAPISecret Secret `yaml:"wechat_api_secret,omitempty" json:"wechat_api_secret,omitempty"` + WeChatAPISecretFile string `yaml:"wechat_api_secret_file,omitempty" json:"wechat_api_secret_file,omitempty"` WeChatAPICorpID string `yaml:"wechat_api_corp_id,omitempty" json:"wechat_api_corp_id,omitempty"` VictorOpsAPIURL *URL `yaml:"victorops_api_url,omitempty" json:"victorops_api_url,omitempty"` VictorOpsAPIKey Secret `yaml:"victorops_api_key,omitempty" json:"victorops_api_key,omitempty"` VictorOpsAPIKeyFile string `yaml:"victorops_api_key_file,omitempty" json:"victorops_api_key_file,omitempty"` TelegramAPIUrl *URL `yaml:"telegram_api_url,omitempty" json:"telegram_api_url,omitempty"` + TelegramBotToken Secret `yaml:"telegram_bot_token,omitempty" json:"telegram_bot_token,omitempty"` + TelegramBotTokenFile string `yaml:"telegram_bot_token_file,omitempty" json:"telegram_bot_token_file,omitempty"` WebexAPIURL *URL `yaml:"webex_api_url,omitempty" json:"webex_api_url,omitempty"` RocketchatAPIURL *URL `yaml:"rocketchat_api_url,omitempty" json:"rocketchat_api_url,omitempty"` RocketchatToken *Secret `yaml:"rocketchat_token,omitempty" json:"rocketchat_token,omitempty"` @@ -928,6 +1015,10 @@ func (r *Route) UnmarshalYAML(unmarshal func(any) error) error { } } + if r.GroupByStr != nil && len(r.GroupByStr) == 0 { + r.GroupBy = make([]model.LabelName, 0) + } + if len(r.GroupBy) > 0 && r.GroupByAll { return errors.New("cannot have wildcard group_by (`...`) and other labels at the same time") } @@ -955,6 +1046,8 @@ func (r *Route) UnmarshalYAML(unmarshal func(any) error) error { // target labels if an alert matching the source labels exists. // Both alerts have to have a set of labels being equal. type InhibitRule struct { + // Name is an optional name for the inhibition rule. + Name string `yaml:"name,omitempty" json:"name,omitempty"` // SourceMatch defines a set of labels that have to equal the given // value for source alerts. Deprecated. Remove before v1.0 release. SourceMatch map[string]string `yaml:"source_match,omitempty" json:"source_match,omitempty"` @@ -1027,6 +1120,7 @@ type Receiver struct { MSTeamsV2Configs []*MSTeamsV2Config `yaml:"msteamsv2_configs,omitempty" json:"msteamsv2_configs,omitempty"` JiraConfigs []*JiraConfig `yaml:"jira_configs,omitempty" json:"jira_configs,omitempty"` RocketchatConfigs []*RocketchatConfig `yaml:"rocketchat_configs,omitempty" json:"rocketchat_configs,omitempty"` + MattermostConfigs []*MattermostConfig `yaml:"mattermost_configs,omitempty" json:"mattermost_configs,omitempty"` } // UnmarshalYAML implements the yaml.Unmarshaler interface for Receiver. diff --git a/vendor/github.com/prometheus/alertmanager/config/coordinator.go b/vendor/github.com/prometheus/alertmanager/config/coordinator.go index 68d1f0307ac..e9f3e21d8f4 100644 --- a/vendor/github.com/prometheus/alertmanager/config/coordinator.go +++ b/vendor/github.com/prometheus/alertmanager/config/coordinator.go @@ -20,6 +20,7 @@ import ( "sync" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" ) // Coordinator coordinates Alertmanager configurations beyond the lifetime of a @@ -53,21 +54,19 @@ func NewCoordinator(configFilePath string, r prometheus.Registerer, l *slog.Logg } func (c *Coordinator) registerMetrics(r prometheus.Registerer) { - configHash := prometheus.NewGauge(prometheus.GaugeOpts{ + configHash := promauto.With(r).NewGauge(prometheus.GaugeOpts{ Name: "alertmanager_config_hash", Help: "Hash of the currently loaded alertmanager configuration. Note that this is not a cryptographically strong hash.", }) - configSuccess := prometheus.NewGauge(prometheus.GaugeOpts{ + configSuccess := promauto.With(r).NewGauge(prometheus.GaugeOpts{ Name: "alertmanager_config_last_reload_successful", Help: "Whether the last configuration reload attempt was successful.", }) - configSuccessTime := prometheus.NewGauge(prometheus.GaugeOpts{ + configSuccessTime := promauto.With(r).NewGauge(prometheus.GaugeOpts{ Name: "alertmanager_config_last_reload_success_timestamp_seconds", Help: "Timestamp of the last successful configuration reload.", }) - r.MustRegister(configHash, configSuccess, configSuccessTime) - c.configHashMetric = configHash c.configSuccessMetric = configSuccess c.configSuccessTimeMetric = configSuccessTime diff --git a/vendor/github.com/prometheus/alertmanager/config/notifiers.go b/vendor/github.com/prometheus/alertmanager/config/notifiers.go index e8b7dcf28cb..ed6b6e90dde 100644 --- a/vendor/github.com/prometheus/alertmanager/config/notifiers.go +++ b/vendor/github.com/prometheus/alertmanager/config/notifiers.go @@ -18,8 +18,8 @@ import ( "fmt" "net/textproto" "regexp" + "slices" "strings" - "text/template" "time" commoncfg "github.com/prometheus/common/config" @@ -72,9 +72,9 @@ var ( DefaultEmailSubject = `{{ template "email.default.subject" . }}` // DefaultPagerdutyDetails defines the default values for PagerDuty details. - DefaultPagerdutyDetails = map[string]string{ - "firing": `{{ template "pagerduty.default.instances" .Alerts.Firing }}`, - "resolved": `{{ template "pagerduty.default.instances" .Alerts.Resolved }}`, + DefaultPagerdutyDetails = map[string]any{ + "firing": `{{ .Alerts.Firing | toJson }}`, + "resolved": `{{ .Alerts.Resolved | toJson }}`, "num_firing": `{{ .Alerts.Firing | len }}`, "num_resolved": `{{ .Alerts.Resolved | len }}`, } @@ -206,10 +206,21 @@ var ( NotifierConfig: NotifierConfig{ VSendResolved: true, }, - APIType: "auto", - Summary: `{{ template "jira.default.summary" . }}`, - Description: `{{ template "jira.default.description" . }}`, - Priority: `{{ template "jira.default.priority" . }}`, + APIType: "auto", + Summary: JiraFieldConfig{ + Template: `{{ template "jira.default.summary" . }}`, + }, + Description: JiraFieldConfig{ + Template: `{{ template "jira.default.description" . }}`, + }, + Priority: `{{ template "jira.default.priority" . }}`, + } + + DefaultMattermostConfig = MattermostConfig{ + NotifierConfig: NotifierConfig{ + VSendResolved: true, + }, + Text: `{{ template "mattermost.default.text" . }}`, } ) @@ -298,12 +309,25 @@ type EmailConfig struct { AuthPassword Secret `yaml:"auth_password,omitempty" json:"auth_password,omitempty"` AuthPasswordFile string `yaml:"auth_password_file,omitempty" json:"auth_password_file,omitempty"` AuthSecret Secret `yaml:"auth_secret,omitempty" json:"auth_secret,omitempty"` + AuthSecretFile string `yaml:"auth_secret_file,omitempty" json:"auth_secret_file,omitempty"` AuthIdentity string `yaml:"auth_identity,omitempty" json:"auth_identity,omitempty"` Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"` HTML string `yaml:"html,omitempty" json:"html,omitempty"` Text string `yaml:"text,omitempty" json:"text,omitempty"` RequireTLS *bool `yaml:"require_tls,omitempty" json:"require_tls,omitempty"` TLSConfig *commoncfg.TLSConfig `yaml:"tls_config,omitempty" json:"tls_config,omitempty"` + // ForceImplicitTLS controls whether to use implicit TLS (direct TLS connection). + // true: force use of implicit TLS (direct TLS connection) + // false: force disable implicit TLS (use explicit TLS/STARTTLS if required) + // nil (default): auto-detect based on port (465=implicit, other=explicit) for backward compatibility + ForceImplicitTLS *bool `yaml:"force_implicit_tls,omitempty" json:"force_implicit_tls,omitempty"` + Threading ThreadingConfig `yaml:"threading,omitempty" json:"threading,omitempty"` +} + +// ThreadingConfig configures mail threading. +type ThreadingConfig struct { + Enabled bool `yaml:"enabled,omitempty" json:"enabled,omitempty"` + ThreadByDate string `yaml:"thread_by_date,omitempty" json:"thread_by_date,omitempty"` } // UnmarshalYAML implements the yaml.Unmarshaler interface. @@ -327,6 +351,18 @@ func (c *EmailConfig) UnmarshalYAML(unmarshal func(any) error) error { } c.Headers = normalizedHeaders + if c.Threading.Enabled { + if _, ok := normalizedHeaders["References"]; ok { + return errors.New("conflicting configuration: threading.enabled conflicts with custom References header") + } + if _, ok := normalizedHeaders["In-Reply-To"]; ok { + return errors.New("conflicting configuration: threading.enabled conflicts with custom In-Reply-To header") + } + if !slices.Contains([]string{"none", "daily"}, c.Threading.ThreadByDate) { + return errors.New("threading.thread_by_date must be either 'none' or 'daily'") + } + } + return nil } @@ -336,22 +372,25 @@ type PagerdutyConfig struct { HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"` - ServiceKey Secret `yaml:"service_key,omitempty" json:"service_key,omitempty"` - ServiceKeyFile string `yaml:"service_key_file,omitempty" json:"service_key_file,omitempty"` - RoutingKey Secret `yaml:"routing_key,omitempty" json:"routing_key,omitempty"` - RoutingKeyFile string `yaml:"routing_key_file,omitempty" json:"routing_key_file,omitempty"` - URL *URL `yaml:"url,omitempty" json:"url,omitempty"` - Client string `yaml:"client,omitempty" json:"client,omitempty"` - ClientURL string `yaml:"client_url,omitempty" json:"client_url,omitempty"` - Description string `yaml:"description,omitempty" json:"description,omitempty"` - Details map[string]string `yaml:"details,omitempty" json:"details,omitempty"` - Images []PagerdutyImage `yaml:"images,omitempty" json:"images,omitempty"` - Links []PagerdutyLink `yaml:"links,omitempty" json:"links,omitempty"` - Source string `yaml:"source,omitempty" json:"source,omitempty"` - Severity string `yaml:"severity,omitempty" json:"severity,omitempty"` - Class string `yaml:"class,omitempty" json:"class,omitempty"` - Component string `yaml:"component,omitempty" json:"component,omitempty"` - Group string `yaml:"group,omitempty" json:"group,omitempty"` + ServiceKey Secret `yaml:"service_key,omitempty" json:"service_key,omitempty"` + ServiceKeyFile string `yaml:"service_key_file,omitempty" json:"service_key_file,omitempty"` + RoutingKey Secret `yaml:"routing_key,omitempty" json:"routing_key,omitempty"` + RoutingKeyFile string `yaml:"routing_key_file,omitempty" json:"routing_key_file,omitempty"` + URL *URL `yaml:"url,omitempty" json:"url,omitempty"` + Client string `yaml:"client,omitempty" json:"client,omitempty"` + ClientURL string `yaml:"client_url,omitempty" json:"client_url,omitempty"` + Description string `yaml:"description,omitempty" json:"description,omitempty"` + Details map[string]any `yaml:"details,omitempty" json:"details,omitempty"` + Images []PagerdutyImage `yaml:"images,omitempty" json:"images,omitempty"` + Links []PagerdutyLink `yaml:"links,omitempty" json:"links,omitempty"` + Source string `yaml:"source,omitempty" json:"source,omitempty"` + Severity string `yaml:"severity,omitempty" json:"severity,omitempty"` + Class string `yaml:"class,omitempty" json:"class,omitempty"` + Component string `yaml:"component,omitempty" json:"component,omitempty"` + Group string `yaml:"group,omitempty" json:"group,omitempty"` + // Timeout is the maximum time allowed to invoke the pagerduty. Setting this to 0 + // does not impose a timeout. + Timeout time.Duration `yaml:"timeout" json:"timeout"` } // PagerdutyLink is a link. @@ -384,7 +423,7 @@ func (c *PagerdutyConfig) UnmarshalYAML(unmarshal func(any) error) error { return errors.New("at most one of service_key & service_key_file must be configured") } if c.Details == nil { - c.Details = make(map[string]string) + c.Details = make(map[string]any) } if c.Source == "" { c.Source = c.Client @@ -488,8 +527,11 @@ type SlackConfig struct { HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"` - APIURL *SecretURL `yaml:"api_url,omitempty" json:"api_url,omitempty"` - APIURLFile string `yaml:"api_url_file,omitempty" json:"api_url_file,omitempty"` + APIURL *SecretURL `yaml:"api_url,omitempty" json:"api_url,omitempty"` + APIURLFile string `yaml:"api_url_file,omitempty" json:"api_url_file,omitempty"` + AppToken Secret `yaml:"app_token,omitempty" json:"app_token,omitempty"` + AppTokenFile string `yaml:"app_token_file,omitempty" json:"app_token_file,omitempty"` + AppURL *URL `yaml:"app_url,omitempty" json:"app_url,omitempty"` // Slack channel override, (like #other-channel or @username). Channel string `yaml:"channel,omitempty" json:"channel,omitempty"` @@ -500,6 +542,7 @@ type SlackConfig struct { TitleLink string `yaml:"title_link,omitempty" json:"title_link,omitempty"` Pretext string `yaml:"pretext,omitempty" json:"pretext,omitempty"` Text string `yaml:"text,omitempty" json:"text,omitempty"` + MessageText string `yaml:"message_text,omitempty" json:"message_text,omitempty"` Fields []*SlackField `yaml:"fields,omitempty" json:"fields,omitempty"` ShortFields bool `yaml:"short_fields" json:"short_fields,omitempty"` Footer string `yaml:"footer,omitempty" json:"footer,omitempty"` @@ -512,6 +555,9 @@ type SlackConfig struct { LinkNames bool `yaml:"link_names" json:"link_names,omitempty"` MrkdwnIn []string `yaml:"mrkdwn_in,omitempty" json:"mrkdwn_in,omitempty"` Actions []*SlackAction `yaml:"actions,omitempty" json:"actions,omitempty"` + // Timeout is the maximum time allowed to invoke the slack. Setting this to 0 + // does not impose a timeout. + Timeout time.Duration `yaml:"timeout" json:"timeout"` } // UnmarshalYAML implements the yaml.Unmarshaler interface. @@ -525,6 +571,12 @@ func (c *SlackConfig) UnmarshalYAML(unmarshal func(any) error) error { if c.APIURL != nil && len(c.APIURLFile) > 0 { return errors.New("at most one of api_url & api_url_file must be configured") } + if c.AppToken != "" && len(c.AppTokenFile) > 0 { + return errors.New("at most one of app_token & app_token_file must be configured") + } + if (c.APIURL != nil || len(c.APIURLFile) > 0) && (c.AppToken != "" || len(c.AppTokenFile) > 0) { + return errors.New("at most one of api_url/api_url_file & app_token/app_token_file must be configured") + } return nil } @@ -556,7 +608,7 @@ type IncidentioConfig struct { } // UnmarshalYAML implements the yaml.Unmarshaler interface. -func (c *IncidentioConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (c *IncidentioConfig) UnmarshalYAML(unmarshal func(any) error) error { *c = DefaultIncidentioConfig type plain IncidentioConfig if err := unmarshal((*plain)(c)); err != nil { @@ -588,8 +640,8 @@ type WebhookConfig struct { HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"` // URL to send POST request to. - URL *SecretURL `yaml:"url" json:"url"` - URLFile string `yaml:"url_file" json:"url_file"` + URL SecretTemplateURL `yaml:"url,omitempty" json:"url,omitempty"` + URLFile string `yaml:"url_file" json:"url_file"` // MaxAlerts is the maximum number of alerts to be sent per webhook message. // Alerts exceeding this threshold will be truncated. Setting this to 0 @@ -608,10 +660,10 @@ func (c *WebhookConfig) UnmarshalYAML(unmarshal func(any) error) error { if err := unmarshal((*plain)(c)); err != nil { return err } - if c.URL == nil && c.URLFile == "" { + if c.URL == "" && c.URLFile == "" { return errors.New("one of url or url_file must be configured") } - if c.URL != nil && c.URLFile != "" { + if c.URL != "" && c.URLFile != "" { return errors.New("at most one of url & url_file must be configured") } return nil @@ -623,15 +675,16 @@ type WechatConfig struct { HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"` - APISecret Secret `yaml:"api_secret,omitempty" json:"api_secret,omitempty"` - CorpID string `yaml:"corp_id,omitempty" json:"corp_id,omitempty"` - Message string `yaml:"message,omitempty" json:"message,omitempty"` - APIURL *URL `yaml:"api_url,omitempty" json:"api_url,omitempty"` - ToUser string `yaml:"to_user,omitempty" json:"to_user,omitempty"` - ToParty string `yaml:"to_party,omitempty" json:"to_party,omitempty"` - ToTag string `yaml:"to_tag,omitempty" json:"to_tag,omitempty"` - AgentID string `yaml:"agent_id,omitempty" json:"agent_id,omitempty"` - MessageType string `yaml:"message_type,omitempty" json:"message_type,omitempty"` + APISecret Secret `yaml:"api_secret,omitempty" json:"api_secret,omitempty"` + APISecretFile string `yaml:"api_secret_file,omitempty" json:"api_secret_file,omitempty"` + CorpID string `yaml:"corp_id,omitempty" json:"corp_id,omitempty"` + Message string `yaml:"message,omitempty" json:"message,omitempty"` + APIURL *URL `yaml:"api_url,omitempty" json:"api_url,omitempty"` + ToUser string `yaml:"to_user,omitempty" json:"to_user,omitempty"` + ToParty string `yaml:"to_party,omitempty" json:"to_party,omitempty"` + ToTag string `yaml:"to_tag,omitempty" json:"to_tag,omitempty"` + AgentID string `yaml:"agent_id,omitempty" json:"agent_id,omitempty"` + MessageType string `yaml:"message_type,omitempty" json:"message_type,omitempty"` } const wechatValidTypesRe = `^(text|markdown)$` @@ -654,6 +707,10 @@ func (c *WechatConfig) UnmarshalYAML(unmarshal func(any) error) error { return fmt.Errorf("weChat message type %q does not match valid options %s", c.MessageType, wechatValidTypesRe) } + if c.APISecret != "" && len(c.APISecretFile) > 0 { + return errors.New("at most one of api_secret & api_secret_file must be configured") + } + return nil } @@ -700,12 +757,11 @@ func (c *OpsGenieConfig) UnmarshalYAML(unmarshal func(any) error) error { return fmt.Errorf("opsGenieConfig responder %v has to have at least one of id, username or name specified", r) } - if strings.Contains(r.Type, "{{") { - _, err := template.New("").Parse(r.Type) - if err != nil { - return fmt.Errorf("opsGenieConfig responder %v type is not a valid template: %w", r, err) - } - } else { + isTemplated, err := containsTemplating(r.Type) + if err != nil { + return fmt.Errorf("opsGenieConfig responder %v type contains invalid template syntax: %w", r, err) + } + if !isTemplated { r.Type = strings.ToLower(r.Type) if !opsgenieTypeMatcher.MatchString(r.Type) { return fmt.Errorf("opsGenieConfig responder %v type does not match valid options %s", r, opsgenieValidTypesRe) @@ -868,6 +924,7 @@ type TelegramConfig struct { BotToken Secret `yaml:"bot_token,omitempty" json:"token,omitempty"` BotTokenFile string `yaml:"bot_token_file,omitempty" json:"token_file,omitempty"` ChatID int64 `yaml:"chat_id,omitempty" json:"chat,omitempty"` + ChatIDFile string `yaml:"chat_id_file,omitempty" json:"chat_file,omitempty"` MessageThreadID int `yaml:"message_thread_id,omitempty" json:"message_thread_id,omitempty"` Message string `yaml:"message,omitempty" json:"message,omitempty"` DisableNotifications bool `yaml:"disable_notifications,omitempty" json:"disable_notifications,omitempty"` @@ -881,14 +938,14 @@ func (c *TelegramConfig) UnmarshalYAML(unmarshal func(any) error) error { if err := unmarshal((*plain)(c)); err != nil { return err } - if c.BotToken == "" && c.BotTokenFile == "" { - return errors.New("missing bot_token or bot_token_file on telegram_config") - } if c.BotToken != "" && c.BotTokenFile != "" { return errors.New("at most one of bot_token & bot_token_file must be configured") } - if c.ChatID == 0 { - return errors.New("missing chat_id on telegram_config") + if c.ChatID == 0 && c.ChatIDFile == "" { + return errors.New("missing chat_id or chat_id_file on telegram_config") + } + if c.ChatID != 0 && c.ChatIDFile != "" { + return errors.New("at most one of chat_id & chat_id_file must be configured") } if c.ParseMode != "" && c.ParseMode != "Markdown" && @@ -956,6 +1013,13 @@ func (c *MSTeamsV2Config) UnmarshalYAML(unmarshal func(any) error) error { return nil } +type JiraFieldConfig struct { + // Template is the template string used to render the field. + Template string `yaml:"template,omitempty" json:"template,omitempty"` + // EnableUpdate indicates whether this field should be omitted when updating an existing issue. + EnableUpdate *bool `yaml:"enable_update,omitempty" json:"enable_update,omitempty"` +} + type JiraConfig struct { NotifierConfig `yaml:",inline" json:",inline"` HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"` @@ -963,12 +1027,12 @@ type JiraConfig struct { APIURL *URL `yaml:"api_url,omitempty" json:"api_url,omitempty"` APIType string `yaml:"api_type,omitempty" json:"api_type,omitempty"` - Project string `yaml:"project,omitempty" json:"project,omitempty"` - Summary string `yaml:"summary,omitempty" json:"summary,omitempty"` - Description string `yaml:"description,omitempty" json:"description,omitempty"` - Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"` - Priority string `yaml:"priority,omitempty" json:"priority,omitempty"` - IssueType string `yaml:"issue_type,omitempty" json:"issue_type,omitempty"` + Project string `yaml:"project,omitempty" json:"project,omitempty"` + Summary JiraFieldConfig `yaml:"summary,omitempty" json:"summary,omitempty"` + Description JiraFieldConfig `yaml:"description,omitempty" json:"description,omitempty"` + Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"` + Priority string `yaml:"priority,omitempty" json:"priority,omitempty"` + IssueType string `yaml:"issue_type,omitempty" json:"issue_type,omitempty"` ReopenTransition string `yaml:"reopen_transition,omitempty" json:"reopen_transition,omitempty"` ResolveTransition string `yaml:"resolve_transition,omitempty" json:"resolve_transition,omitempty"` @@ -978,6 +1042,28 @@ type JiraConfig struct { Fields map[string]any `yaml:"fields,omitempty" json:"custom_fields,omitempty"` } +func (f *JiraFieldConfig) EnableUpdateValue() bool { + if f.EnableUpdate == nil { + return true + } + return *f.EnableUpdate +} + +// Supports both the legacy string and the new object form. +func (f *JiraFieldConfig) UnmarshalYAML(unmarshal func(any) error) error { + // Try simple string first (backward compatibility). + var s string + if err := unmarshal(&s); err == nil { + f.Template = s + // DisableUpdate stays false by default. + return nil + } + + // Fallback to full object form. + type plain JiraFieldConfig + return unmarshal((*plain)(f)) +} + func (c *JiraConfig) UnmarshalYAML(unmarshal func(any) error) error { *c = DefaultJiraConfig type plain JiraConfig @@ -1066,3 +1152,98 @@ func (c *RocketchatConfig) UnmarshalYAML(unmarshal func(any) error) error { } return nil } + +// MattermostPriority defines the priority for a mattermost notification. +type MattermostPriority struct { + Priority string `yaml:"priority,omitempty" json:"priority,omitempty"` + RequestedAck bool `yaml:"requested_ack,omitempty" json:"requested_ack,omitempty"` + PersistentNotifications bool `yaml:"persistent_notifications,omitempty" json:"persistent_notifications,omitempty"` +} + +// MattermostProps defines additional properties for a mattermost notification. +// Only 'card' property takes effect now. +type MattermostProps struct { + Card string `yaml:"card,omitempty" json:"card,omitempty"` +} + +// MattermostField configures a single Mattermost field for Slack compatibility. +// See https://developers.mattermost.com/integrate/reference/message-attachments/#fields for more information. +type MattermostField struct { + Title string `yaml:"title,omitempty" json:"title,omitempty"` + Value string `yaml:"value,omitempty" json:"value,omitempty"` + Short *bool `yaml:"short,omitempty" json:"short,omitempty"` +} + +// UnmarshalYAML implements the yaml.Unmarshaler interface for MattermostField. +func (c *MattermostField) UnmarshalYAML(unmarshal func(any) error) error { + type plain MattermostField + if err := unmarshal((*plain)(c)); err != nil { + return err + } + if c.Title == "" { + return errors.New("missing title in Mattermost field configuration") + } + if c.Value == "" { + return errors.New("missing value in Mattermost field configuration") + } + return nil +} + +// MattermostAttachment defines an attachment for a Mattermost notification. +// See https://developers.mattermost.com/integrate/reference/message-attachments/#fields for more information. +type MattermostAttachment struct { + Fallback string `yaml:"fallback,omitempty" json:"fallback,omitempty"` + Color string `yaml:"color,omitempty" json:"color,omitempty"` + Pretext string `yaml:"pretext,omitempty" json:"pretext,omitempty"` + Text string `yaml:"text,omitempty" json:"text,omitempty"` + AuthorName string `yaml:"author_name,omitempty" json:"author_name,omitempty"` + AuthorLink string `yaml:"author_link,omitempty" json:"author_link,omitempty"` + AuthorIcon string `yaml:"author_icon,omitempty" json:"author_icon,omitempty"` + Title string `yaml:"title,omitempty" json:"title,omitempty"` + TitleLink string `yaml:"title_link,omitempty" json:"title_link,omitempty"` + Fields []*MattermostField `yaml:"fields,omitempty" json:"fields,omitempty"` + ThumbURL string `yaml:"thumb_url,omitempty" json:"thumb_url,omitempty"` + Footer string `yaml:"footer,omitempty" json:"footer,omitempty"` + FooterIcon string `yaml:"footer_icon,omitempty" json:"footer_icon,omitempty"` + ImageURL string `yaml:"image_url,omitempty" json:"image_url,omitempty"` +} + +// MattermostConfig configures notifications via Mattermost. +// See https://developers.mattermost.com/integrate/webhooks/incoming/ for more information. +type MattermostConfig struct { + NotifierConfig `yaml:",inline" json:",inline"` + + HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"` + WebhookURL *SecretURL `yaml:"webhook_url,omitempty" json:"webhook_url,omitempty"` + WebhookURLFile string `yaml:"webhook_url_file,omitempty" json:"webhook_url_file,omitempty"` + + Channel string `yaml:"channel,omitempty" json:"channel,omitempty"` + Username string `yaml:"username,omitempty" json:"username,omitempty"` + + Text string `yaml:"text,omitempty" json:"text,omitempty"` + IconURL string `yaml:"icon_url,omitempty" json:"icon_url,omitempty"` + IconEmoji string `yaml:"icon_emoji,omitempty" json:"icon_emoji,omitempty"` + Attachments []*MattermostAttachment `yaml:"attachments,omitempty" json:"attachments,omitempty"` + Type string `yaml:"type,omitempty" json:"type,omitempty"` + Props *MattermostProps `yaml:"props,omitempty" json:"props,omitempty"` + Priority *MattermostPriority `yaml:"priority,omitempty" json:"priority,omitempty"` +} + +// UnmarshalYAML implements the yaml.Unmarshaler interface. +func (c *MattermostConfig) UnmarshalYAML(unmarshal func(any) error) error { + *c = DefaultMattermostConfig + type plain MattermostConfig + if err := unmarshal((*plain)(c)); err != nil { + return err + } + + if c.WebhookURL == nil && c.WebhookURLFile == "" { + return errors.New("one of webhook_url or webhook_url_file must be configured") + } + + if c.WebhookURL != nil && len(c.WebhookURLFile) > 0 { + return errors.New("at most one of webhook_url & webhook_url_file must be configured") + } + + return nil +} diff --git a/vendor/github.com/prometheus/alertmanager/config/tracing.go b/vendor/github.com/prometheus/alertmanager/config/tracing.go new file mode 100644 index 00000000000..b88d926070f --- /dev/null +++ b/vendor/github.com/prometheus/alertmanager/config/tracing.go @@ -0,0 +1,92 @@ +// Copyright The Prometheus 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 config + +import ( + "errors" + "fmt" + + commoncfg "github.com/prometheus/common/config" + "github.com/prometheus/common/model" +) + +// TODO: probably move these into prometheus/common since they're copied from +// prometheus/prometheus? + +type TracingClientType string + +const ( + TracingClientHTTP TracingClientType = "http" + TracingClientGRPC TracingClientType = "grpc" + + GzipCompression = "gzip" +) + +// UnmarshalYAML implements the yaml.Unmarshaler interface. +func (t *TracingClientType) UnmarshalYAML(unmarshal func(any) error) error { + *t = TracingClientType("") + type plain TracingClientType + if err := unmarshal((*plain)(t)); err != nil { + return err + } + + switch *t { + case TracingClientHTTP, TracingClientGRPC: + return nil + default: + return fmt.Errorf("expected tracing client type to be to be %s or %s, but got %s", + TracingClientHTTP, TracingClientGRPC, *t, + ) + } +} + +// TracingConfig configures the tracing options. +type TracingConfig struct { + ClientType TracingClientType `yaml:"client_type,omitempty"` + Endpoint string `yaml:"endpoint,omitempty"` + SamplingFraction float64 `yaml:"sampling_fraction,omitempty"` + Insecure bool `yaml:"insecure,omitempty"` + TLSConfig *commoncfg.TLSConfig `yaml:"tls_config,omitempty"` + Headers *commoncfg.Headers `yaml:"headers,omitempty"` + Compression string `yaml:"compression,omitempty"` + Timeout model.Duration `yaml:"timeout,omitempty"` +} + +// SetDirectory joins any relative file paths with dir. +func (t *TracingConfig) SetDirectory(dir string) { + t.TLSConfig.SetDirectory(dir) + t.Headers.SetDirectory(dir) +} + +// UnmarshalYAML implements the yaml.Unmarshaler interface. +func (t *TracingConfig) UnmarshalYAML(unmarshal func(any) error) error { + *t = TracingConfig{ + ClientType: TracingClientGRPC, + } + type plain TracingConfig + if err := unmarshal((*plain)(t)); err != nil { + return err + } + + if t.Endpoint == "" { + return errors.New("tracing endpoint must be set") + } + + if t.Compression != "" && t.Compression != GzipCompression { + return fmt.Errorf("invalid compression type %s provided, valid options: %s", + t.Compression, GzipCompression) + } + + return nil +} diff --git a/vendor/github.com/prometheus/alertmanager/dispatch/dispatch.go b/vendor/github.com/prometheus/alertmanager/dispatch/dispatch.go index 973f084a436..1e11e934678 100644 --- a/vendor/github.com/prometheus/alertmanager/dispatch/dispatch.go +++ b/vendor/github.com/prometheus/alertmanager/dispatch/dispatch.go @@ -1,4 +1,4 @@ -// Copyright 2018 Prometheus Team +// Copyright The Prometheus 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 @@ -18,12 +18,20 @@ import ( "errors" "fmt" "log/slog" + "maps" "sort" "sync" + "sync/atomic" "time" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" "github.com/prometheus/alertmanager/notify" "github.com/prometheus/alertmanager/provider" @@ -31,6 +39,14 @@ import ( "github.com/prometheus/alertmanager/types" ) +const ( + DispatcherStateUnknown = iota + DispatcherStateWaitingToStart + DispatcherStateRunning +) + +var tracer = otel.Tracer("github.com/prometheus/alertmanager/dispatch") + // DispatcherMetrics represents metrics associated to a dispatcher. type DispatcherMetrics struct { aggrGroups prometheus.Gauge @@ -40,20 +56,23 @@ type DispatcherMetrics struct { // NewDispatcherMetrics returns a new registered DispatchMetrics. func NewDispatcherMetrics(registerLimitMetrics bool, r prometheus.Registerer) *DispatcherMetrics { + if r == nil { + return nil + } m := DispatcherMetrics{ - aggrGroups: prometheus.NewGauge( + aggrGroups: promauto.With(r).NewGauge( prometheus.GaugeOpts{ Name: "alertmanager_dispatcher_aggregation_groups", Help: "Number of active aggregation groups", }, ), - processingDuration: prometheus.NewSummary( + processingDuration: promauto.With(r).NewSummary( prometheus.SummaryOpts{ Name: "alertmanager_dispatcher_alert_processing_duration_seconds", Help: "Summary of latencies for the processing of alerts.", }, ), - aggrGroupLimitReached: prometheus.NewCounter( + aggrGroupLimitReached: promauto.With(r).NewCounter( prometheus.CounterOpts{ Name: "alertmanager_dispatcher_aggregation_group_limit_reached_total", Help: "Number of times when dispatcher failed to create new aggregation group due to limit.", @@ -61,29 +80,24 @@ func NewDispatcherMetrics(registerLimitMetrics bool, r prometheus.Registerer) *D ), } - if r != nil { - r.MustRegister(m.aggrGroups, m.processingDuration) - if registerLimitMetrics { - r.MustRegister(m.aggrGroupLimitReached) - } - } - return &m } // Dispatcher sorts incoming alerts into aggregation groups and // assigns the correct notifiers to each. type Dispatcher struct { - route *Route - alerts provider.Alerts - stage notify.Stage - marker types.GroupMarker - metrics *DispatcherMetrics - limits Limits + route *Route + alerts provider.Alerts + stage notify.Stage + marker types.GroupMarker + metrics *DispatcherMetrics + limits Limits + propagator propagation.TextMapPropagator timeout func(time.Duration) time.Duration mtx sync.RWMutex + loadingFinished sync.WaitGroup aggrGroupsPerRoute map[*Route]map[model.Fingerprint]*aggrGroup aggrGroupsNum int @@ -93,6 +107,9 @@ type Dispatcher struct { cancel func() logger *slog.Logger + + startTimer *time.Timer + state int } // Limits describes limits used by Dispatcher. @@ -105,46 +122,59 @@ type Limits interface { // NewDispatcher returns a new Dispatcher. func NewDispatcher( - ap provider.Alerts, - r *Route, - s notify.Stage, - mk types.GroupMarker, - to func(time.Duration) time.Duration, - mi time.Duration, - lim Limits, - l *slog.Logger, - m *DispatcherMetrics, + alerts provider.Alerts, + route *Route, + stage notify.Stage, + marker types.GroupMarker, + timeout func(time.Duration) time.Duration, + maintenanceInterval time.Duration, + limits Limits, + logger *slog.Logger, + metrics *DispatcherMetrics, ) *Dispatcher { - if lim == nil { - lim = nilLimits{} + if limits == nil { + limits = nilLimits{} } disp := &Dispatcher{ - alerts: ap, - stage: s, - route: r, - marker: mk, - timeout: to, - maintenanceInterval: mi, - logger: l.With("component", "dispatcher"), - metrics: m, - limits: lim, + alerts: alerts, + stage: stage, + route: route, + marker: marker, + timeout: timeout, + maintenanceInterval: maintenanceInterval, + logger: logger.With("component", "dispatcher"), + metrics: metrics, + limits: limits, + propagator: otel.GetTextMapPropagator(), + state: DispatcherStateUnknown, } + disp.loadingFinished.Add(1) return disp } // Run starts dispatching alerts incoming via the updates channel. -func (d *Dispatcher) Run() { +func (d *Dispatcher) Run(dispatchStartTime time.Time) { d.done = make(chan struct{}) d.mtx.Lock() + d.logger.Debug("preparing to start", "startTime", dispatchStartTime) + d.startTimer = time.NewTimer(time.Until(dispatchStartTime)) + d.state = DispatcherStateWaitingToStart + d.logger.Debug("setting state", "state", "waiting_to_start") d.aggrGroupsPerRoute = map[*Route]map[model.Fingerprint]*aggrGroup{} d.aggrGroupsNum = 0 d.metrics.aggrGroups.Set(0) d.ctx, d.cancel = context.WithCancel(context.Background()) d.mtx.Unlock() - d.run(d.alerts.Subscribe()) + initalAlerts, it := d.alerts.SlurpAndSubscribe("dispatcher") + for _, alert := range initalAlerts { + d.routeAlert(d.ctx, alert) + } + d.loadingFinished.Done() + + d.run(it) close(d.done) } @@ -165,19 +195,30 @@ func (d *Dispatcher) run(it provider.AlertIterator) { return } - d.logger.Debug("Received alert", "alert", alert) - // Log errors but keep trying. if err := it.Err(); err != nil { d.logger.Error("Error on alert update", "err", err) continue } - now := time.Now() - for _, r := range d.route.Match(alert.Labels) { - d.processAlert(alert, r) + ctx := d.ctx + if alert.Header != nil { + ctx = d.propagator.Extract(ctx, propagation.MapCarrier(alert.Header)) + } + + d.routeAlert(ctx, alert.Data) + + case <-d.startTimer.C: + if d.state == DispatcherStateWaitingToStart { + d.state = DispatcherStateRunning + d.logger.Debug("started", "state", "running") + d.logger.Debug("Starting all existing aggregation groups") + for _, groups := range d.aggrGroupsPerRoute { + for _, ag := range groups { + d.runAG(ag) + } + } } - d.metrics.processingDuration.Observe(time.Since(now).Seconds()) case <-maintenance.C: d.doMaintenance() @@ -187,6 +228,30 @@ func (d *Dispatcher) run(it provider.AlertIterator) { } } +func (d *Dispatcher) routeAlert(ctx context.Context, alert *types.Alert) { + d.logger.Debug("Received alert", "alert", alert) + + ctx, span := tracer.Start(ctx, "dispatch.Dispatcher.routeAlert", + trace.WithAttributes( + attribute.String("alerting.alert.name", alert.Name()), + attribute.String("alerting.alert.fingerprint", alert.Fingerprint().String()), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + + now := time.Now() + for _, r := range d.route.Match(alert.Labels) { + span.AddEvent("dispatching alert to route", + trace.WithAttributes( + attribute.String("alerting.route.receiver.name", r.RouteOpts.Receiver), + ), + ) + d.groupAlert(ctx, alert, r) + } + d.metrics.processingDuration.Observe(time.Since(now).Seconds()) +} + func (d *Dispatcher) doMaintenance() { d.mtx.Lock() defer d.mtx.Unlock() @@ -203,6 +268,20 @@ func (d *Dispatcher) doMaintenance() { } } +func (d *Dispatcher) WaitForLoading() { + d.loadingFinished.Wait() +} + +func (d *Dispatcher) LoadingDone() <-chan struct{} { + doneChan := make(chan struct{}) + go func() { + d.WaitForLoading() + close(doneChan) + }() + + return doneChan +} + // AlertGroup represents how alerts exist within an aggrGroup. type AlertGroup struct { Alerts types.AlertSlice @@ -224,11 +303,31 @@ func (ag AlertGroups) Less(i, j int) bool { func (ag AlertGroups) Len() int { return len(ag) } // Groups returns a slice of AlertGroups from the dispatcher's internal state. -func (d *Dispatcher) Groups(routeFilter func(*Route) bool, alertFilter func(*types.Alert, time.Time) bool) (AlertGroups, map[model.Fingerprint][]string) { +func (d *Dispatcher) Groups(ctx context.Context, routeFilter func(*Route) bool, alertFilter func(*types.Alert, time.Time) bool) (AlertGroups, map[model.Fingerprint][]string, error) { + select { + case <-ctx.Done(): + return nil, nil, ctx.Err() + case <-d.LoadingDone(): + } + d.WaitForLoading() groups := AlertGroups{} + // Make a snapshot of the aggrGroupsPerRoute map to use for this function. + // This ensures that we hold the Dispatcher.mtx for as little time as + // possible. + // It also prevents us from holding the any locks in alertFilter or routeFilter + // while we hold the dispatcher lock d.mtx.RLock() - defer d.mtx.RUnlock() + aggrGroupsPerRoute := map[*Route]map[model.Fingerprint]*aggrGroup{} + for route, ags := range d.aggrGroupsPerRoute { + // Since other goroutines could modify d.aggrGroupsPerRoute, we need to + // copy it. We DON'T need to copy the aggrGroup objects because they each + // have a mutex protecting their internal state. + // The aggrGroup methods use the internal lock. It is important to avoid + // accessing internal fields on the aggrGroup objects. + aggrGroupsPerRoute[route] = maps.Clone(ags) + } + d.mtx.RUnlock() // Keep a list of receivers for an alert to prevent checking each alert // again against all routes. The alert has already matched against this @@ -236,7 +335,7 @@ func (d *Dispatcher) Groups(routeFilter func(*Route) bool, alertFilter func(*typ receivers := map[model.Fingerprint][]string{} now := time.Now() - for route, ags := range d.aggrGroupsPerRoute { + for route, ags := range aggrGroupsPerRoute { if !routeFilter(route) { continue } @@ -286,7 +385,7 @@ func (d *Dispatcher) Groups(routeFilter func(*Route) bool, alertFilter func(*typ sort.Strings(receivers[i]) } - return groups, receivers + return groups, receivers, nil } // Stop the dispatcher. @@ -308,12 +407,23 @@ func (d *Dispatcher) Stop() { // notifyFunc is a function that performs notification for the alert // with the given fingerprint. It aborts on context cancelation. -// Returns false iff notifying failed. +// Returns false if notifying failed. type notifyFunc func(context.Context, ...*types.Alert) bool -// processAlert determines in which aggregation group the alert falls +// groupAlert determines in which aggregation group the alert falls // and inserts it. -func (d *Dispatcher) processAlert(alert *types.Alert, route *Route) { +func (d *Dispatcher) groupAlert(ctx context.Context, alert *types.Alert, route *Route) { + _, span := tracer.Start(ctx, "dispatch.Dispatcher.groupAlert", + trace.WithAttributes( + attribute.String("alerting.alert.name", alert.Name()), + attribute.String("alerting.alert.fingerprint", alert.Fingerprint().String()), + attribute.String("alerting.route.receiver.name", route.RouteOpts.Receiver), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + + now := time.Now() groupLabels := getGroupLabels(alert, route) fp := groupLabels.Fingerprint() @@ -329,31 +439,73 @@ func (d *Dispatcher) processAlert(alert *types.Alert, route *Route) { ag, ok := routeGroups[fp] if ok { - ag.insert(alert) + ag.insert(ctx, alert) return } // If the group does not exist, create it. But check the limit first. if limit := d.limits.MaxNumberOfAggregationGroups(); limit > 0 && d.aggrGroupsNum >= limit { d.metrics.aggrGroupLimitReached.Inc() - d.logger.Error("Too many aggregation groups, cannot create new group for alert", "groups", d.aggrGroupsNum, "limit", limit, "alert", alert.Name()) + err := errors.New("too many aggregation groups, cannot create new group for alert") + message := "Failed to create aggregation group" + d.logger.Error(message, "err", err.Error(), "groups", d.aggrGroupsNum, "limit", limit, "alert", alert.Name()) + span.SetStatus(codes.Error, message) + span.RecordError(err, + trace.WithAttributes( + attribute.Int("alerting.aggregation_group.count", d.aggrGroupsNum), + attribute.Int("alerting.aggregation_group.limit", limit), + ), + ) return } - ag = newAggrGroup(d.ctx, groupLabels, route, d.timeout, d.logger) + ag = newAggrGroup(d.ctx, groupLabels, route, d.timeout, d.marker.(types.AlertMarker), d.logger) routeGroups[fp] = ag d.aggrGroupsNum++ d.metrics.aggrGroups.Inc() + span.AddEvent("new AggregationGroup created", + trace.WithAttributes( + attribute.String("alerting.aggregation_group.key", ag.GroupKey()), + attribute.Int("alerting.aggregation_group.count", d.aggrGroupsNum), + ), + ) // Insert the 1st alert in the group before starting the group's run() // function, to make sure that when the run() will be executed the 1st // alert is already there. - ag.insert(alert) + ag.insert(ctx, alert) + + if alert.StartsAt.Add(ag.opts.GroupWait).Before(now) { + message := "Alert is old enough for immediate flush, resetting timer to zero" + ag.logger.Debug(message, "alert", alert.Name(), "fingerprint", alert.Fingerprint(), "startsAt", alert.StartsAt) + span.AddEvent(message, + trace.WithAttributes( + attribute.String("alerting.alert.StartsAt", alert.StartsAt.Format(time.RFC3339)), + ), + ) + ag.resetTimer(0) + } + // Check dispatcher and alert state to determine if we should run the AG now. + switch d.state { + case DispatcherStateWaitingToStart: + span.AddEvent("Not starting Aggregation Group, dispatcher is not running") + d.logger.Debug("Dispatcher still waiting to start") + case DispatcherStateRunning: + span.AddEvent("Starting Aggregation Group") + d.runAG(ag) + default: + d.logger.Warn("unknown state detected", "state", "unknown") + } +} +func (d *Dispatcher) runAG(ag *aggrGroup) { + if ag.running.Load() { + return + } go ag.run(func(ctx context.Context, alerts ...*types.Alert) bool { _, _, err := d.stage.Exec(ctx, d.logger, alerts...) if err != nil { - logger := d.logger.With("num_alerts", len(alerts), "err", err) + logger := d.logger.With("aggrGroup", ag.GroupKey(), "num_alerts", len(alerts), "err", err) if errors.Is(ctx.Err(), context.Canceled) { // It is expected for the context to be canceled on // configuration reload or shutdown. In this case, the @@ -389,18 +541,24 @@ type aggrGroup struct { routeKey string alerts *store.Alerts + marker types.AlertMarker ctx context.Context cancel func() done chan struct{} next *time.Timer timeout func(time.Duration) time.Duration - - mtx sync.RWMutex - hasFlushed bool + running atomic.Bool } // newAggrGroup returns a new aggregation group. -func newAggrGroup(ctx context.Context, labels model.LabelSet, r *Route, to func(time.Duration) time.Duration, logger *slog.Logger) *aggrGroup { +func newAggrGroup( + ctx context.Context, + labels model.LabelSet, + r *Route, + to func(time.Duration) time.Duration, + marker types.AlertMarker, + logger *slog.Logger, +) *aggrGroup { if to == nil { to = func(d time.Duration) time.Duration { return d } } @@ -411,6 +569,7 @@ func newAggrGroup(ctx context.Context, labels model.LabelSet, r *Route, to func( opts: &r.RouteOpts, timeout: to, alerts: store.NewAlerts(), + marker: marker, done: make(chan struct{}), } ag.ctx, ag.cancel = context.WithCancel(ctx) @@ -437,6 +596,7 @@ func (ag *aggrGroup) String() string { } func (ag *aggrGroup) run(nf notifyFunc) { + ag.running.Store(true) defer close(ag.done) defer ag.next.Stop() @@ -463,13 +623,23 @@ func (ag *aggrGroup) run(nf notifyFunc) { ctx = notify.WithRouteID(ctx, ag.routeID) // Wait the configured interval before calling flush again. - ag.mtx.Lock() - ag.next.Reset(ag.opts.GroupInterval) - ag.hasFlushed = true - ag.mtx.Unlock() + ag.resetTimer(ag.opts.GroupInterval) ag.flush(func(alerts ...*types.Alert) bool { - return nf(ctx, alerts...) + ctx, span := tracer.Start(ctx, "dispatch.AggregationGroup.flush", + trace.WithAttributes( + attribute.String("alerting.aggregation_group.key", ag.GroupKey()), + attribute.Int("alerting.alerts.count", len(alerts)), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + + success := nf(ctx, alerts...) + if !success { + span.SetStatus(codes.Error, "notification failed") + } + return success }) cancel() @@ -487,18 +657,27 @@ func (ag *aggrGroup) stop() { <-ag.done } +// resetTimer resets the timer for the AG. +func (ag *aggrGroup) resetTimer(t time.Duration) { + ag.next.Reset(t) +} + // insert inserts the alert into the aggregation group. -func (ag *aggrGroup) insert(alert *types.Alert) { +func (ag *aggrGroup) insert(ctx context.Context, alert *types.Alert) { + _, span := tracer.Start(ctx, "dispatch.AggregationGroup.insert", + trace.WithAttributes( + attribute.String("alerting.alert.name", alert.Name()), + attribute.String("alerting.alert.fingerprint", alert.Fingerprint().String()), + attribute.String("alerting.aggregation_group.key", ag.GroupKey()), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() if err := ag.alerts.Set(alert); err != nil { - ag.logger.Error("error on set alert", "err", err) - } - - // Immediately trigger a flush if the wait duration for this - // alert is already over. - ag.mtx.Lock() - defer ag.mtx.Unlock() - if !ag.hasFlushed && alert.StartsAt.Add(ag.opts.GroupWait).Before(time.Now()) { - ag.next.Reset(0) + message := "error on set alert" + span.SetStatus(codes.Error, message) + span.RecordError(err) + ag.logger.Error(message, "err", err) } } @@ -539,6 +718,14 @@ func (ag *aggrGroup) flush(notify func(...*types.Alert) bool) { // we would delete an active alert thinking it was resolved. if err := ag.alerts.DeleteIfNotModified(resolvedSlice); err != nil { ag.logger.Error("error on delete alerts", "err", err) + } else { + // Delete markers for resolved alerts that are not in the store. + for _, alert := range resolvedSlice { + _, err := ag.alerts.Get(alert.Fingerprint()) + if errors.Is(err, store.ErrNotFound) { + ag.marker.Delete(alert.Fingerprint()) + } + } } } } diff --git a/vendor/github.com/prometheus/alertmanager/featurecontrol/featurecontrol.go b/vendor/github.com/prometheus/alertmanager/featurecontrol/featurecontrol.go index d6da3ac88f2..63e1056a2cd 100644 --- a/vendor/github.com/prometheus/alertmanager/featurecontrol/featurecontrol.go +++ b/vendor/github.com/prometheus/alertmanager/featurecontrol/featurecontrol.go @@ -21,6 +21,7 @@ import ( ) const ( + FeatureAlertNamesInMetrics = "alert-names-in-metrics" FeatureReceiverNameInMetrics = "receiver-name-in-metrics" FeatureClassicMode = "classic-mode" FeatureUTF8StrictMode = "utf8-strict-mode" @@ -29,6 +30,7 @@ const ( ) var AllowedFlags = []string{ + FeatureAlertNamesInMetrics, FeatureReceiverNameInMetrics, FeatureClassicMode, FeatureUTF8StrictMode, @@ -37,6 +39,7 @@ var AllowedFlags = []string{ } type Flagger interface { + EnableAlertNamesInMetrics() bool EnableReceiverNamesInMetrics() bool ClassicMode() bool UTF8StrictMode() bool @@ -46,6 +49,7 @@ type Flagger interface { type Flags struct { logger *slog.Logger + enableAlertNamesInMetrics bool enableReceiverNamesInMetrics bool classicMode bool utf8StrictMode bool @@ -53,6 +57,10 @@ type Flags struct { enableAutoGOMAXPROCS bool } +func (f *Flags) EnableAlertNamesInMetrics() bool { + return f.enableAlertNamesInMetrics +} + func (f *Flags) EnableReceiverNamesInMetrics() bool { return f.enableReceiverNamesInMetrics } @@ -105,6 +113,12 @@ func enableAutoGOMAXPROCS() flagOption { } } +func enableAlertNamesInMetrics() flagOption { + return func(configs *Flags) { + configs.enableAlertNamesInMetrics = true + } +} + func NewFlags(logger *slog.Logger, features string) (Flagger, error) { fc := &Flags{logger: logger} opts := []flagOption{} @@ -113,8 +127,11 @@ func NewFlags(logger *slog.Logger, features string) (Flagger, error) { return NoopFlags{}, nil } - for _, feature := range strings.Split(features, ",") { + for feature := range strings.SplitSeq(features, ",") { switch feature { + case FeatureAlertNamesInMetrics: + opts = append(opts, enableAlertNamesInMetrics()) + logger.Warn("Alert names in metrics enabled") case FeatureReceiverNameInMetrics: opts = append(opts, enableReceiverNameInMetrics()) logger.Warn("Experimental receiver name in metrics enabled") @@ -148,6 +165,8 @@ func NewFlags(logger *slog.Logger, features string) (Flagger, error) { type NoopFlags struct{} +func (n NoopFlags) EnableAlertNamesInMetrics() bool { return false } + func (n NoopFlags) EnableReceiverNamesInMetrics() bool { return false } func (n NoopFlags) ClassicMode() bool { return false } diff --git a/vendor/github.com/prometheus/alertmanager/inhibit/index.go b/vendor/github.com/prometheus/alertmanager/inhibit/index.go new file mode 100644 index 00000000000..fd60e48701c --- /dev/null +++ b/vendor/github.com/prometheus/alertmanager/inhibit/index.go @@ -0,0 +1,64 @@ +// Copyright The Prometheus 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 inhibit + +import ( + "sync" + + "github.com/prometheus/common/model" +) + +// index contains map of fingerprints to fingerprints. +// The keys are fingerprints of the equal labels of source alerts. +// The values are fingerprints of the source alerts. +// For more info see comments on inhibitor and InhibitRule. +type index struct { + mtx sync.RWMutex + items map[model.Fingerprint]model.Fingerprint +} + +func newIndex() *index { + return &index{ + items: make(map[model.Fingerprint]model.Fingerprint), + } +} + +func (c *index) Get(key model.Fingerprint) (model.Fingerprint, bool) { + c.mtx.RLock() + defer c.mtx.RUnlock() + + fp, ok := c.items[key] + return fp, ok +} + +func (c *index) Set(key, value model.Fingerprint) { + c.mtx.Lock() + defer c.mtx.Unlock() + + c.items[key] = value +} + +func (c *index) Delete(key model.Fingerprint) { + c.mtx.Lock() + defer c.mtx.Unlock() + + delete(c.items, key) +} + +func (c *index) Len() int { + c.mtx.RLock() + defer c.mtx.RUnlock() + + return len(c.items) +} diff --git a/vendor/github.com/prometheus/alertmanager/inhibit/inhibit.go b/vendor/github.com/prometheus/alertmanager/inhibit/inhibit.go index 3650186e370..6e0a61f40e5 100644 --- a/vendor/github.com/prometheus/alertmanager/inhibit/inhibit.go +++ b/vendor/github.com/prometheus/alertmanager/inhibit/inhibit.go @@ -1,4 +1,4 @@ -// Copyright 2015 Prometheus Team +// Copyright The Prometheus 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 @@ -21,6 +21,11 @@ import ( "github.com/oklog/run" "github.com/prometheus/common/model" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" "github.com/prometheus/alertmanager/config" "github.com/prometheus/alertmanager/pkg/labels" @@ -29,37 +34,59 @@ import ( "github.com/prometheus/alertmanager/types" ) +var tracer = otel.Tracer("github.com/prometheus/alertmanager/inhibit") + // An Inhibitor determines whether a given label set is muted based on the // currently active alerts and a set of inhibition rules. It implements the // Muter interface. type Inhibitor struct { - alerts provider.Alerts - rules []*InhibitRule - marker types.AlertMarker - logger *slog.Logger + alerts provider.Alerts + rules []*InhibitRule + marker types.AlertMarker + logger *slog.Logger + propagator propagation.TextMapPropagator - mtx sync.RWMutex - cancel func() + mtx sync.RWMutex + loadingFinished sync.WaitGroup + cancel func() } // NewInhibitor returns a new Inhibitor. func NewInhibitor(ap provider.Alerts, rs []config.InhibitRule, mk types.AlertMarker, logger *slog.Logger) *Inhibitor { ih := &Inhibitor{ - alerts: ap, - marker: mk, - logger: logger, + alerts: ap, + marker: mk, + logger: logger, + propagator: otel.GetTextMapPropagator(), } - for _, cr := range rs { + + ih.loadingFinished.Add(1) + ruleNames := make(map[string]struct{}) + for i, cr := range rs { + if _, ok := ruleNames[cr.Name]; ok { + ih.logger.Debug("duplicate inhibition rule name", "index", i, "name", cr.Name) + } + r := NewInhibitRule(cr) ih.rules = append(ih.rules, r) + + if cr.Name != "" { + ruleNames[cr.Name] = struct{}{} + } } return ih } func (ih *Inhibitor) run(ctx context.Context) { - it := ih.alerts.Subscribe() + initalAlerts, it := ih.alerts.SlurpAndSubscribe("inhibitor") defer it.Close() + for _, a := range initalAlerts { + ih.processAlert(ctx, a) + } + + ih.loadingFinished.Done() + for { select { case <-ctx.Done(): @@ -69,18 +96,47 @@ func (ih *Inhibitor) run(ctx context.Context) { ih.logger.Error("Error iterating alerts", "err", err) continue } - // Update the inhibition rules' cache. - for _, r := range ih.rules { - if r.SourceMatchers.Matches(a.Labels) { - if err := r.scache.Set(a); err != nil { - ih.logger.Error("error on set alert", "err", err) - } - } + traceCtx := context.Background() + if a.Header != nil { + traceCtx = ih.propagator.Extract(traceCtx, propagation.MapCarrier(a.Header)) } + ih.processAlert(traceCtx, a.Data) } } } +func (ih *Inhibitor) processAlert(ctx context.Context, a *types.Alert) { + _, span := tracer.Start(ctx, "inhibit.Inhibitor.processAlert", + trace.WithAttributes( + attribute.String("alerting.alert.name", a.Name()), + attribute.String("alerting.alert.fingerprint", a.Fingerprint().String()), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + + // Update the inhibition rules' cache. + for _, r := range ih.rules { + if r.SourceMatchers.Matches(a.Labels) { + attr := attribute.String("alerting.inhibit_rule.name", r.Name) + span.AddEvent("alert matched rule source", trace.WithAttributes(attr)) + if err := r.scache.Set(a); err != nil { + message := "error on set alert" + ih.logger.Error(message, "err", err) + span.SetStatus(codes.Error, message) + span.RecordError(err) + continue + } + span.SetAttributes(attr) + r.updateIndex(a) + } + } +} + +func (ih *Inhibitor) WaitForLoading() { + ih.loadingFinished.Wait() +} + // Run the Inhibitor's background processing. func (ih *Inhibitor) Run() { var ( @@ -124,22 +180,40 @@ func (ih *Inhibitor) Stop() { // Mutes returns true iff the given label set is muted. It implements the Muter // interface. -func (ih *Inhibitor) Mutes(lset model.LabelSet) bool { +func (ih *Inhibitor) Mutes(ctx context.Context, lset model.LabelSet) bool { fp := lset.Fingerprint() + _, span := tracer.Start(ctx, "inhibit.Inhibitor.Mutes", + trace.WithAttributes(attribute.String("alerting.alert.fingerprint", fp.String())), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + + now := time.Now() for _, r := range ih.rules { if !r.TargetMatchers.Matches(lset) { // If target side of rule doesn't match, we don't need to look any further. continue } + span.AddEvent("alert matched rule target", + trace.WithAttributes( + attribute.String("alerting.inhibit_rule.name", r.Name), + ), + ) // If we are here, the target side matches. If the source side matches, too, we // need to exclude inhibiting alerts for which the same is true. - if inhibitedByFP, eq := r.hasEqual(lset, r.SourceMatchers.Matches(lset)); eq { + if inhibitedByFP, eq := r.hasEqual(lset, r.SourceMatchers.Matches(lset), now); eq { ih.marker.SetInhibited(fp, inhibitedByFP.String()) + span.AddEvent("alert inhibited", + trace.WithAttributes( + attribute.String("alerting.inhibit_rule.source.fingerprint", inhibitedByFP.String()), + ), + ) return true } } ih.marker.SetInhibited(fp) + span.AddEvent("alert not inhibited") return false } @@ -150,6 +224,8 @@ func (ih *Inhibitor) Mutes(lset model.LabelSet) bool { // from sending notifications if their meaning is logically a subset of a // higher-level alert. type InhibitRule struct { + // Name is an optional name for the inhibition rule. + Name string // The set of Filters which define the group of source alerts (which inhibit // the target alerts). SourceMatchers labels.Matchers @@ -162,6 +238,12 @@ type InhibitRule struct { // Cache of alerts matching source labels. scache *store.Alerts + + // Index of fingerprints of source alert equal labels to fingerprint of source alert. + // The index helps speed up source alert lookups from scache significantely in scenarios with 100s of source alerts cached. + // The index items might overwrite eachother if multiple source alerts have exact equal labels. + // Overwrites only happen if the new source alert has bigger EndsAt value. + sindex *index } // NewInhibitRule returns a new InhibitRule based on a configuration definition. @@ -170,6 +252,7 @@ func NewInhibitRule(cr config.InhibitRule) *InhibitRule { sourcem labels.Matchers targetm labels.Matchers ) + // cr.SourceMatch will be deprecated. This for loop appends regex matchers. for ln, lv := range cr.SourceMatch { matcher, err := labels.NewMatcher(labels.MatchEqual, ln, lv) @@ -217,11 +300,87 @@ func NewInhibitRule(cr config.InhibitRule) *InhibitRule { equal[model.LabelName(ln)] = struct{}{} } - return &InhibitRule{ + rule := &InhibitRule{ + Name: cr.Name, SourceMatchers: sourcem, TargetMatchers: targetm, Equal: equal, scache: store.NewAlerts(), + sindex: newIndex(), + } + + rule.scache.SetGCCallback(rule.gcCallback) + + return rule +} + +// fingerprintEquals returns the fingerprint of the equal labels of the given label set. +func (r *InhibitRule) fingerprintEquals(lset model.LabelSet) model.Fingerprint { + equalSet := model.LabelSet{} + for n := range r.Equal { + equalSet[n] = lset[n] + } + return equalSet.Fingerprint() +} + +// updateIndex updates the source alert index if necessary. +func (r *InhibitRule) updateIndex(alert *types.Alert) { + fp := alert.Fingerprint() + // Calculate source labelset subset which is in equals. + eq := r.fingerprintEquals(alert.Labels) + + // Check if the equal labelset is already in the index. + indexed, ok := r.sindex.Get(eq) + if !ok { + // If not, add it. + r.sindex.Set(eq, fp) + return + } + // If the indexed fingerprint is the same as the new fingerprint, do nothing. + if indexed == fp { + return + } + + // New alert and existing index are not the same, compare them. + existing, err := r.scache.Get(indexed) + if err != nil { + // failed to get the existing alert, overwrite the index. + r.sindex.Set(eq, fp) + return + } + + // If the new alert resolves after the existing alert, replace the index. + if existing.ResolvedAt(alert.EndsAt) { + r.sindex.Set(eq, fp) + return + } + // If the existing alert resolves after the new alert, do nothing. +} + +// findEqualSourceAlert returns the source alert that matches the equal labels of the given label set. +func (r *InhibitRule) findEqualSourceAlert(lset model.LabelSet, now time.Time) (*types.Alert, bool) { + equalsFP := r.fingerprintEquals(lset) + sourceFP, ok := r.sindex.Get(equalsFP) + if ok { + alert, err := r.scache.Get(sourceFP) + if err != nil { + return nil, false + } + + if alert.ResolvedAt(now) { + return nil, false + } + + return alert, true + } + + return nil, false +} + +func (r *InhibitRule) gcCallback(alerts []types.Alert) { + for _, a := range alerts { + fp := r.fingerprintEquals(a.Labels) + r.sindex.Delete(fp) } } @@ -229,23 +388,14 @@ func NewInhibitRule(cr config.InhibitRule) *InhibitRule { // labels for the given label set. If so, the fingerprint of one of those alerts // is returned. If excludeTwoSidedMatch is true, alerts that match both the // source and the target side of the rule are disregarded. -func (r *InhibitRule) hasEqual(lset model.LabelSet, excludeTwoSidedMatch bool) (model.Fingerprint, bool) { - now := time.Now() -Outer: - for _, a := range r.scache.List() { - // The cache might be stale and contain resolved alerts. - if a.ResolvedAt(now) { - continue +func (r *InhibitRule) hasEqual(lset model.LabelSet, excludeTwoSidedMatch bool, now time.Time) (model.Fingerprint, bool) { + equal, found := r.findEqualSourceAlert(lset, now) + if found { + if excludeTwoSidedMatch && r.TargetMatchers.Matches(equal.Labels) { + return model.Fingerprint(0), false } - for n := range r.Equal { - if a.Labels[n] != lset[n] { - continue Outer - } - } - if excludeTwoSidedMatch && r.TargetMatchers.Matches(a.Labels) { - continue Outer - } - return a.Fingerprint(), true + return equal.Fingerprint(), found } + return model.Fingerprint(0), false } diff --git a/vendor/github.com/prometheus/alertmanager/limit/bucket.go b/vendor/github.com/prometheus/alertmanager/limit/bucket.go new file mode 100644 index 00000000000..bccc91bcc59 --- /dev/null +++ b/vendor/github.com/prometheus/alertmanager/limit/bucket.go @@ -0,0 +1,160 @@ +// Copyright The Prometheus 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 limit + +import ( + "container/heap" + "sync" + "time" +) + +// item represents a value and its priority based on time. +type item[V any] struct { + value V + priority time.Time + index int +} + +// expired returns true if the item is expired (priority is before the given time). +func (i *item[V]) expired(at time.Time) bool { + return i.priority.Before(at) +} + +// sortedItems is a heap of items. +type sortedItems[V any] []*item[V] + +// Len returns the number of items in the heap. +func (s sortedItems[V]) Len() int { return len(s) } + +// Less reports whether the element with index i should sort before the element with index j. +func (s sortedItems[V]) Less(i, j int) bool { return s[i].priority.Before(s[j].priority) } + +// Swap swaps the elements with indexes i and j. +func (s sortedItems[V]) Swap(i, j int) { + s[i], s[j] = s[j], s[i] + s[i].index = i + s[j].index = j +} + +// Push adds an item to the heap. +func (s *sortedItems[V]) Push(x any) { + n := len(*s) + item := x.(*item[V]) + item.index = n + *s = append(*s, item) +} + +// Pop removes and returns the minimum element (according to Less). +func (s *sortedItems[V]) Pop() any { + old := *s + n := len(old) + item := old[n-1] + old[n-1] = nil // don't stop the GC from reclaiming the item eventually + item.index = -1 // for safety + *s = old[0 : n-1] + return item +} + +// update modifies the priority and value of an item in the heap. +func (s *sortedItems[V]) update(item *item[V], priority time.Time) { + item.priority = priority + heap.Fix(s, item.index) +} + +// Bucket is a simple cache for values with priority(expiry). +// It has: +// - configurable capacity. +// - a mutex for thread safety. +// - a sorted heap of items for priority/expiry based eviction. +// - an index of items for fast updates. +type Bucket[V comparable] struct { + mtx sync.Mutex + index map[V]*item[V] + items sortedItems[V] + capacity int +} + +// NewBucket creates a new bucket with the given capacity. +// All internal data structures are initialized to the given capacity to avoid allocations during runtime. +func NewBucket[V comparable](capacity int) *Bucket[V] { + items := make(sortedItems[V], 0, capacity) + heap.Init(&items) + return &Bucket[V]{ + index: make(map[V]*item[V], capacity), + items: items, + capacity: capacity, + } +} + +// IsStale returns true if the latest item in the bucket is expired. +func (b *Bucket[V]) IsStale() (stale bool) { + b.mtx.Lock() + defer b.mtx.Unlock() + if b.items.Len() == 0 { + return true + } + + latest := b.items[b.items.Len()-1] + return latest.expired(time.Now()) +} + +// Upsert tries to add a new value and its priority to the bucket. +// If the value is already in the bucket, its priority is updated. +// If the bucket is not full, the new value is added. +// If the bucket is full, oldest expired item is evicted based on priority and the new value is added. +// Otherwise the new value is ignored and the method returns false. +func (b *Bucket[V]) Upsert(value V, priority time.Time) (ok bool) { + if b.capacity < 1 { + return false + } + + b.mtx.Lock() + defer b.mtx.Unlock() + + // If the value is already in the index, update it. + if item, exists := b.index[value]; exists { + b.items.update(item, priority) + return true + } + + // If the bucket is not full, add the new value to the heap and index. + if b.items.Len() < b.capacity { + item := &item[V]{ + value: value, + priority: priority, + } + b.index[value] = item + heap.Push(&b.items, item) + return true + } + + // If the bucket is full, check the oldest item (at heap root) and evict it if expired + oldest := b.items[0] + if oldest.expired(time.Now()) { + // Remove the expired item from both the heap and the index + heap.Pop(&b.items) + delete(b.index, oldest.value) + + // Add the new item + item := &item[V]{ + value: value, + priority: priority, + } + b.index[value] = item + heap.Push(&b.items, item) + return true + } + + return false +} diff --git a/vendor/github.com/prometheus/alertmanager/matcher/parse/token.go b/vendor/github.com/prometheus/alertmanager/matcher/parse/token.go index 96baeeef43b..3e73fb8536a 100644 --- a/vendor/github.com/prometheus/alertmanager/matcher/parse/token.go +++ b/vendor/github.com/prometheus/alertmanager/matcher/parse/token.go @@ -16,6 +16,7 @@ package parse import ( "errors" "fmt" + "slices" "strconv" "unicode/utf8" ) @@ -73,12 +74,7 @@ func (t token) isEOF() bool { // isOneOf returns true if the token is one of the specified kinds. func (t token) isOneOf(kinds ...tokenKind) bool { - for _, k := range kinds { - if k == t.kind { - return true - } - } - return false + return slices.Contains(kinds, t.kind) } // unquote the value in token. If unquoted returns it unmodified. diff --git a/vendor/github.com/prometheus/alertmanager/nflog/nflog.go b/vendor/github.com/prometheus/alertmanager/nflog/nflog.go index 584ee9b04fd..3d7176b4c03 100644 --- a/vendor/github.com/prometheus/alertmanager/nflog/nflog.go +++ b/vendor/github.com/prometheus/alertmanager/nflog/nflog.go @@ -23,6 +23,7 @@ import ( "fmt" "io" "log/slog" + "maps" "math/rand" "os" "sync" @@ -31,6 +32,7 @@ import ( "github.com/coder/quartz" "github.com/matttproud/golang_protobuf_extensions/pbutil" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/promslog" "github.com/prometheus/alertmanager/cluster" @@ -74,6 +76,100 @@ func QGroupKey(gk string) QueryParam { } } +// Store abstracts the NFLog's receiver data storage as a mutable key/value store. A store +// can be generated from a nflogpb.Entry and then written via the call to Log. +// +// Every key in the Store is associated with either an int, float, or string value. +type Store struct { + data map[string]*pb.ReceiverDataValue +} + +// NewStore creates a Store from the entry's receiver data. If entry is nil, the resulting +// Store is empty. +func NewStore(entry *pb.Entry) *Store { + var receiverData map[string]*pb.ReceiverDataValue + if entry != nil { + receiverData = maps.Clone(entry.ReceiverData) + } + if receiverData == nil { + receiverData = make(map[string]*pb.ReceiverDataValue) + } + return &Store{ + data: receiverData, + } +} + +// GetInt finds the integer value associated with the key, if any, and returns it. +func (s *Store) GetInt(key string) (int64, bool) { + dataValue, ok := s.data[key] + if !ok { + return 0, false + } + intVal, ok := dataValue.Value.(*pb.ReceiverDataValue_IntVal) + if !ok { + return 0, false + } + return intVal.IntVal, true +} + +// GetFloat finds the float value associated with the key, if any, and returns it. +func (s *Store) GetFloat(key string) (float64, bool) { + dataValue, ok := s.data[key] + if !ok { + return 0, false + } + floatVal, ok := dataValue.Value.(*pb.ReceiverDataValue_DoubleVal) + if !ok { + return 0, false + } + return floatVal.DoubleVal, true +} + +// GetFloat finds the string value associated with the key, if any, and returns it. +func (s *Store) GetStr(key string) (string, bool) { + dataValue, ok := s.data[key] + if !ok { + return "", false + } + strVal, ok := dataValue.Value.(*pb.ReceiverDataValue_StrVal) + if !ok { + return "", false + } + return strVal.StrVal, true +} + +// SetInt associates an integer value with the provided key, overwriting any existing value. +func (s *Store) SetInt(key string, v int64) { + s.data[key] = &pb.ReceiverDataValue{ + Value: &pb.ReceiverDataValue_IntVal{ + IntVal: v, + }, + } +} + +// SetFloat associates a float value with the provided key, overwriting any existing value. +func (s *Store) SetFloat(key string, v float64) { + s.data[key] = &pb.ReceiverDataValue{ + Value: &pb.ReceiverDataValue_DoubleVal{ + DoubleVal: v, + }, + } +} + +// SetStr associates a string value with the provided key, overwriting any existing value. +func (s *Store) SetStr(key, v string) { + s.data[key] = &pb.ReceiverDataValue{ + Value: &pb.ReceiverDataValue_StrVal{ + StrVal: v, + }, + } +} + +// Delete deletes any value associated with the key. +func (s *Store) Delete(key string) { + delete(s.data, key) +} + // Log holds the notification log state for alerts that have been notified. type Log struct { clock quartz.Clock @@ -108,37 +204,37 @@ type metrics struct { func newMetrics(r prometheus.Registerer) *metrics { m := &metrics{} - m.gcDuration = prometheus.NewSummary(prometheus.SummaryOpts{ + m.gcDuration = promauto.With(r).NewSummary(prometheus.SummaryOpts{ Name: "alertmanager_nflog_gc_duration_seconds", Help: "Duration of the last notification log garbage collection cycle.", Objectives: map[float64]float64{}, }) - m.snapshotDuration = prometheus.NewSummary(prometheus.SummaryOpts{ + m.snapshotDuration = promauto.With(r).NewSummary(prometheus.SummaryOpts{ Name: "alertmanager_nflog_snapshot_duration_seconds", Help: "Duration of the last notification log snapshot.", Objectives: map[float64]float64{}, }) - m.snapshotSize = prometheus.NewGauge(prometheus.GaugeOpts{ + m.snapshotSize = promauto.With(r).NewGauge(prometheus.GaugeOpts{ Name: "alertmanager_nflog_snapshot_size_bytes", Help: "Size of the last notification log snapshot in bytes.", }) - m.maintenanceTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.maintenanceTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_nflog_maintenance_total", Help: "How many maintenances were executed for the notification log.", }) - m.maintenanceErrorsTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.maintenanceErrorsTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_nflog_maintenance_errors_total", Help: "How many maintenances were executed for the notification log that failed.", }) - m.queriesTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.queriesTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_nflog_queries_total", Help: "Number of notification log queries were received.", }) - m.queryErrorsTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.queryErrorsTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_nflog_query_errors_total", Help: "Number notification log received queries that failed.", }) - m.queryDuration = prometheus.NewHistogram(prometheus.HistogramOpts{ + m.queryDuration = promauto.With(r).NewHistogram(prometheus.HistogramOpts{ Name: "alertmanager_nflog_query_duration_seconds", Help: "Duration of notification log query evaluation.", Buckets: prometheus.DefBuckets, @@ -146,24 +242,11 @@ func newMetrics(r prometheus.Registerer) *metrics { NativeHistogramMaxBucketNumber: 100, NativeHistogramMinResetDuration: 1 * time.Hour, }) - m.propagatedMessagesTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.propagatedMessagesTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_nflog_gossip_messages_propagated_total", Help: "Number of received gossip messages that have been further gossiped.", }) - if r != nil { - r.MustRegister( - m.gcDuration, - m.snapshotDuration, - m.snapshotSize, - m.queriesTotal, - m.queryErrorsTotal, - m.queryDuration, - m.propagatedMessagesTotal, - m.maintenanceTotal, - m.maintenanceErrorsTotal, - ) - } return m } @@ -171,9 +254,7 @@ type state map[string]*pb.MeshEntry func (s state) clone() state { c := make(state, len(s)) - for k, v := range s { - c[k] = v - } + maps.Copy(c, s) return c } @@ -248,6 +329,10 @@ func (o *Options) validate() error { return errors.New("only one of SnapshotFile and SnapshotReader must be set") } + if o.Metrics == nil { + return errors.New("missing prometheus.Registerer") + } + return nil } @@ -377,7 +462,7 @@ func stateKey(k string, r *pb.Receiver) string { return fmt.Sprintf("%s:%s", k, receiverKey(r)) } -func (l *Log) Log(r *pb.Receiver, gkey string, firingAlerts, resolvedAlerts []uint64, expiry time.Duration) error { +func (l *Log) Log(r *pb.Receiver, gkey string, firingAlerts, resolvedAlerts []uint64, store *Store, expiry time.Duration) error { // Write all st with the same timestamp. now := l.now() key := stateKey(gkey, r) @@ -398,6 +483,11 @@ func (l *Log) Log(r *pb.Receiver, gkey string, firingAlerts, resolvedAlerts []ui expiresAt = now.Add(expiry) } + var receiverData map[string]*pb.ReceiverDataValue + if store != nil { + receiverData = store.data + } + e := &pb.MeshEntry{ Entry: &pb.Entry{ Receiver: r, @@ -405,6 +495,7 @@ func (l *Log) Log(r *pb.Receiver, gkey string, firingAlerts, resolvedAlerts []ui Timestamp: now, FiringAlerts: firingAlerts, ResolvedAlerts: resolvedAlerts, + ReceiverData: receiverData, }, ExpiresAt: expiresAt, } diff --git a/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.pb.go b/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.pb.go index a5960171a0f..5de7db88b0e 100644 --- a/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.pb.go +++ b/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.pb.go @@ -4,6 +4,7 @@ package nflogpb import ( + encoding_binary "encoding/binary" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" @@ -92,10 +93,12 @@ type Entry struct { // FiringAlerts list of hashes of firing alerts at the last notification time. FiringAlerts []uint64 `protobuf:"varint,6,rep,packed,name=firing_alerts,json=firingAlerts,proto3" json:"firing_alerts,omitempty"` // ResolvedAlerts list of hashes of resolved alerts at the last notification time. - ResolvedAlerts []uint64 `protobuf:"varint,7,rep,packed,name=resolved_alerts,json=resolvedAlerts,proto3" json:"resolved_alerts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ResolvedAlerts []uint64 `protobuf:"varint,7,rep,packed,name=resolved_alerts,json=resolvedAlerts,proto3" json:"resolved_alerts,omitempty"` + // Data specific to the receiver which sent the notification + ReceiverData map[string]*ReceiverDataValue `protobuf:"bytes,8,rep,name=receiver_data,json=receiverData,proto3" json:"receiver_data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Entry) Reset() { *m = Entry{} } @@ -177,41 +180,152 @@ func (m *MeshEntry) XXX_DiscardUnknown() { var xxx_messageInfo_MeshEntry proto.InternalMessageInfo +type ReceiverDataValue struct { + // Types that are valid to be assigned to Value: + // + // *ReceiverDataValue_StrVal + // *ReceiverDataValue_IntVal + // *ReceiverDataValue_DoubleVal + Value isReceiverDataValue_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReceiverDataValue) Reset() { *m = ReceiverDataValue{} } +func (m *ReceiverDataValue) String() string { return proto.CompactTextString(m) } +func (*ReceiverDataValue) ProtoMessage() {} +func (*ReceiverDataValue) Descriptor() ([]byte, []int) { + return fileDescriptor_c2d9785ad9c3e602, []int{3} +} +func (m *ReceiverDataValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReceiverDataValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReceiverDataValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ReceiverDataValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReceiverDataValue.Merge(m, src) +} +func (m *ReceiverDataValue) XXX_Size() int { + return m.Size() +} +func (m *ReceiverDataValue) XXX_DiscardUnknown() { + xxx_messageInfo_ReceiverDataValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ReceiverDataValue proto.InternalMessageInfo + +type isReceiverDataValue_Value interface { + isReceiverDataValue_Value() + MarshalTo([]byte) (int, error) + Size() int +} + +type ReceiverDataValue_StrVal struct { + StrVal string `protobuf:"bytes,1,opt,name=str_val,json=strVal,proto3,oneof" json:"str_val,omitempty"` +} +type ReceiverDataValue_IntVal struct { + IntVal int64 `protobuf:"varint,2,opt,name=int_val,json=intVal,proto3,oneof" json:"int_val,omitempty"` +} +type ReceiverDataValue_DoubleVal struct { + DoubleVal float64 `protobuf:"fixed64,3,opt,name=double_val,json=doubleVal,proto3,oneof" json:"double_val,omitempty"` +} + +func (*ReceiverDataValue_StrVal) isReceiverDataValue_Value() {} +func (*ReceiverDataValue_IntVal) isReceiverDataValue_Value() {} +func (*ReceiverDataValue_DoubleVal) isReceiverDataValue_Value() {} + +func (m *ReceiverDataValue) GetValue() isReceiverDataValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *ReceiverDataValue) GetStrVal() string { + if x, ok := m.GetValue().(*ReceiverDataValue_StrVal); ok { + return x.StrVal + } + return "" +} + +func (m *ReceiverDataValue) GetIntVal() int64 { + if x, ok := m.GetValue().(*ReceiverDataValue_IntVal); ok { + return x.IntVal + } + return 0 +} + +func (m *ReceiverDataValue) GetDoubleVal() float64 { + if x, ok := m.GetValue().(*ReceiverDataValue_DoubleVal); ok { + return x.DoubleVal + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ReceiverDataValue) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ReceiverDataValue_StrVal)(nil), + (*ReceiverDataValue_IntVal)(nil), + (*ReceiverDataValue_DoubleVal)(nil), + } +} + func init() { proto.RegisterType((*Receiver)(nil), "nflogpb.Receiver") proto.RegisterType((*Entry)(nil), "nflogpb.Entry") + proto.RegisterMapType((map[string]*ReceiverDataValue)(nil), "nflogpb.Entry.ReceiverDataEntry") proto.RegisterType((*MeshEntry)(nil), "nflogpb.MeshEntry") + proto.RegisterType((*ReceiverDataValue)(nil), "nflogpb.ReceiverDataValue") } func init() { proto.RegisterFile("nflog.proto", fileDescriptor_c2d9785ad9c3e602) } var fileDescriptor_c2d9785ad9c3e602 = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xbb, 0x4d, 0xd3, 0xda, 0xe3, 0xb4, 0x94, 0x15, 0x07, 0xcb, 0x08, 0xc7, 0x0a, 0x48, - 0xf8, 0x82, 0x23, 0x95, 0x27, 0x68, 0x10, 0x12, 0x12, 0x82, 0xc3, 0x8a, 0x2b, 0xb2, 0x36, 0x74, - 0xb2, 0x5e, 0x61, 0x7b, 0xad, 0xf5, 0x36, 0x6a, 0xde, 0x82, 0x47, 0xe0, 0x71, 0x72, 0xe4, 0x09, - 0xf8, 0x93, 0x27, 0x41, 0xde, 0xb5, 0x1d, 0x8e, 0xdc, 0x66, 0x7f, 0xf3, 0xcd, 0xcc, 0xb7, 0x1f, - 0x04, 0xf5, 0xa6, 0x54, 0x22, 0x6b, 0xb4, 0x32, 0x8a, 0x5e, 0xd8, 0x47, 0xb3, 0x8e, 0xe6, 0x42, - 0x29, 0x51, 0xe2, 0xd2, 0xe2, 0xf5, 0xfd, 0x66, 0x69, 0x64, 0x85, 0xad, 0xe1, 0x55, 0xe3, 0x94, - 0xd1, 0x13, 0xa1, 0x84, 0xb2, 0xe5, 0xb2, 0xab, 0x1c, 0x5d, 0x7c, 0x06, 0x8f, 0xe1, 0x17, 0x94, - 0x5b, 0xd4, 0xf4, 0x19, 0x80, 0xd0, 0xea, 0xbe, 0xc9, 0x6b, 0x5e, 0x61, 0x48, 0x12, 0x92, 0xfa, - 0xcc, 0xb7, 0xe4, 0x23, 0xaf, 0x90, 0x26, 0x10, 0xc8, 0xda, 0xa0, 0xd0, 0xdc, 0x48, 0x55, 0x87, - 0xa7, 0xb6, 0xff, 0x2f, 0xa2, 0xd7, 0x30, 0x91, 0x77, 0x0f, 0xe1, 0x24, 0x21, 0xe9, 0x25, 0xeb, - 0xca, 0xc5, 0xf7, 0x53, 0x98, 0xbe, 0xad, 0x8d, 0xde, 0xd1, 0xa7, 0xe0, 0x56, 0xe5, 0x5f, 0x71, - 0x67, 0x77, 0xcf, 0x98, 0x67, 0xc1, 0x7b, 0xdc, 0xd1, 0x57, 0xe0, 0xe9, 0xde, 0x85, 0xdd, 0x1b, - 0xdc, 0x3c, 0xce, 0xfa, 0x8f, 0x65, 0x83, 0x3d, 0x36, 0x4a, 0x8e, 0x46, 0x0b, 0xde, 0x16, 0xf6, - 0xdc, 0xac, 0x37, 0xfa, 0x8e, 0xb7, 0x05, 0x8d, 0xba, 0x6d, 0xad, 0x2a, 0xb7, 0x78, 0x17, 0x9e, - 0x25, 0x24, 0xf5, 0xd8, 0xf8, 0xa6, 0x2b, 0xf0, 0xc7, 0x60, 0xc2, 0xa9, 0x3d, 0x15, 0x65, 0x2e, - 0xba, 0x6c, 0x88, 0x2e, 0xfb, 0x34, 0x28, 0x56, 0xde, 0xfe, 0xe7, 0xfc, 0xe4, 0xdb, 0xaf, 0x39, - 0x61, 0xc7, 0x31, 0xfa, 0x1c, 0x2e, 0x37, 0x52, 0xcb, 0x5a, 0xe4, 0xbc, 0x44, 0x6d, 0xda, 0xf0, - 0x3c, 0x99, 0xa4, 0x67, 0x6c, 0xe6, 0xe0, 0xad, 0x65, 0xf4, 0x25, 0x3c, 0x1a, 0x8e, 0x0e, 0xb2, - 0x0b, 0x2b, 0xbb, 0x1a, 0xb0, 0x13, 0x2e, 0xb6, 0xe0, 0x7f, 0xc0, 0xb6, 0x70, 0x29, 0xbd, 0x80, - 0x29, 0x76, 0x85, 0x4d, 0x28, 0xb8, 0xb9, 0x1a, 0x53, 0xb0, 0x6d, 0xe6, 0x9a, 0xf4, 0x0d, 0x00, - 0x3e, 0x34, 0x52, 0x63, 0x9b, 0x73, 0xd3, 0x07, 0xf6, 0x9f, 0xbf, 0xe8, 0xe7, 0x6e, 0xcd, 0xea, - 0x7a, 0xff, 0x27, 0x3e, 0xd9, 0x1f, 0x62, 0xf2, 0xe3, 0x10, 0x93, 0xdf, 0x87, 0x98, 0xac, 0xcf, - 0xed, 0xe8, 0xeb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x49, 0xcd, 0xa7, 0x1e, 0x61, 0x02, 0x00, - 0x00, + // 509 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0x8f, 0xd3, 0x30, + 0x10, 0x6d, 0x36, 0xdb, 0x36, 0x99, 0xb6, 0xcb, 0xae, 0xc5, 0x21, 0x04, 0xd1, 0x46, 0x05, 0x89, + 0x5e, 0x48, 0x51, 0xb9, 0x20, 0x6e, 0x5b, 0x58, 0xa9, 0x12, 0x82, 0x83, 0x85, 0x7a, 0x41, 0x28, + 0x72, 0xa9, 0x9b, 0x5a, 0xa4, 0x71, 0x65, 0xbb, 0xd1, 0xf6, 0x5f, 0xf0, 0xa3, 0x38, 0xf4, 0xc8, + 0x2f, 0xe0, 0xa3, 0xbf, 0x04, 0xd9, 0x4e, 0xb2, 0xbb, 0xda, 0x0b, 0xb7, 0xf1, 0x7b, 0x6f, 0x66, + 0xde, 0xbc, 0x04, 0x3a, 0xf9, 0x2a, 0xe3, 0x69, 0xbc, 0x15, 0x5c, 0x71, 0xd4, 0x36, 0x8f, 0xed, + 0x22, 0x1c, 0xa4, 0x9c, 0xa7, 0x19, 0x1d, 0x1b, 0x78, 0xb1, 0x5b, 0x8d, 0x15, 0xdb, 0x50, 0xa9, + 0xc8, 0x66, 0x6b, 0x95, 0xe1, 0xc3, 0x94, 0xa7, 0xdc, 0x94, 0x63, 0x5d, 0x59, 0x74, 0xf8, 0x05, + 0x3c, 0x4c, 0xbf, 0x52, 0x56, 0x50, 0x81, 0x9e, 0x00, 0xa4, 0x82, 0xef, 0xb6, 0x49, 0x4e, 0x36, + 0x34, 0x70, 0x22, 0x67, 0xe4, 0x63, 0xdf, 0x20, 0x1f, 0xc9, 0x86, 0xa2, 0x08, 0x3a, 0x2c, 0x57, + 0x34, 0x15, 0x44, 0x31, 0x9e, 0x07, 0x27, 0x86, 0xbf, 0x0d, 0xa1, 0x73, 0x70, 0xd9, 0xf2, 0x3a, + 0x70, 0x23, 0x67, 0xd4, 0xc3, 0xba, 0x1c, 0xfe, 0x70, 0xa1, 0x79, 0x95, 0x2b, 0xb1, 0x47, 0x8f, + 0xc1, 0x8e, 0x4a, 0xbe, 0xd1, 0xbd, 0x99, 0xdd, 0xc5, 0x9e, 0x01, 0xde, 0xd3, 0x3d, 0x7a, 0x01, + 0x9e, 0x28, 0x5d, 0x98, 0xb9, 0x9d, 0xc9, 0x45, 0x5c, 0x1e, 0x16, 0x57, 0xf6, 0x70, 0x2d, 0xb9, + 0x31, 0xba, 0x26, 0x72, 0x6d, 0xd6, 0x75, 0x4b, 0xa3, 0x33, 0x22, 0xd7, 0x28, 0xd4, 0xd3, 0x24, + 0xcf, 0x0a, 0xba, 0x0c, 0x4e, 0x23, 0x67, 0xe4, 0xe1, 0xfa, 0x8d, 0xa6, 0xe0, 0xd7, 0xc1, 0x04, + 0x4d, 0xb3, 0x2a, 0x8c, 0x6d, 0x74, 0x71, 0x15, 0x5d, 0xfc, 0xa9, 0x52, 0x4c, 0xbd, 0xc3, 0xaf, + 0x41, 0xe3, 0xfb, 0xef, 0x81, 0x83, 0x6f, 0xda, 0xd0, 0x53, 0xe8, 0xad, 0x98, 0x60, 0x79, 0x9a, + 0x90, 0x8c, 0x0a, 0x25, 0x83, 0x56, 0xe4, 0x8e, 0x4e, 0x71, 0xd7, 0x82, 0x97, 0x06, 0x43, 0xcf, + 0xe1, 0x41, 0xb5, 0xb4, 0x92, 0xb5, 0x8d, 0xec, 0xac, 0x82, 0x4b, 0xe1, 0x15, 0xf4, 0xaa, 0xc3, + 0x92, 0x25, 0x51, 0x24, 0xf0, 0x22, 0x77, 0xd4, 0x99, 0x44, 0x75, 0x00, 0x26, 0xbf, 0x3a, 0x86, + 0x77, 0x44, 0x11, 0x83, 0xe0, 0xae, 0xb8, 0x05, 0x85, 0x9f, 0xe1, 0xe2, 0x9e, 0x44, 0x7f, 0x90, + 0x2a, 0x6e, 0x1f, 0xeb, 0x12, 0xbd, 0x84, 0x66, 0x41, 0xb2, 0x1d, 0x2d, 0x63, 0x0e, 0xef, 0xc5, + 0xac, 0x9b, 0xe7, 0x5a, 0x81, 0xad, 0xf0, 0xcd, 0xc9, 0x6b, 0x67, 0x58, 0x80, 0xff, 0x81, 0xca, + 0xb5, 0x1d, 0xfa, 0x0c, 0x9a, 0x54, 0x17, 0x66, 0x6c, 0x67, 0x72, 0x76, 0xd7, 0x28, 0xb6, 0x24, + 0x7a, 0x0b, 0x40, 0xaf, 0xb7, 0x4c, 0x50, 0x99, 0x10, 0x55, 0x6f, 0xfb, 0xaf, 0xa4, 0xcb, 0xbe, + 0x4b, 0x35, 0x94, 0x77, 0x8f, 0x32, 0xbe, 0xd0, 0x23, 0x68, 0x4b, 0x25, 0x92, 0x82, 0x64, 0xf6, + 0xb0, 0x59, 0x03, 0xb7, 0xa4, 0x12, 0x73, 0x92, 0x69, 0x8a, 0xe5, 0xca, 0x50, 0x7a, 0xa3, 0xab, + 0x29, 0x96, 0x2b, 0x4d, 0x0d, 0x00, 0x96, 0x7c, 0xb7, 0xc8, 0xa8, 0x61, 0xf5, 0x3f, 0xe3, 0xcc, + 0x1a, 0xd8, 0xb7, 0xd8, 0x9c, 0x64, 0xd3, 0x76, 0x99, 0xcc, 0xf4, 0xfc, 0xf0, 0xb7, 0xdf, 0x38, + 0x1c, 0xfb, 0xce, 0xcf, 0x63, 0xdf, 0xf9, 0x73, 0xec, 0x3b, 0x8b, 0x96, 0xf1, 0xfb, 0xea, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0xe0, 0xe0, 0xa3, 0x7a, 0x03, 0x00, 0x00, } func (m *Receiver) Marshal() (dAtA []byte, err error) { @@ -284,48 +398,74 @@ func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.ReceiverData) > 0 { + for k := range m.ReceiverData { + v := m.ReceiverData[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNflog(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintNflog(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintNflog(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x42 + } + } if len(m.ResolvedAlerts) > 0 { - dAtA2 := make([]byte, len(m.ResolvedAlerts)*10) - var j1 int + dAtA3 := make([]byte, len(m.ResolvedAlerts)*10) + var j2 int for _, num := range m.ResolvedAlerts { for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j1++ + j2++ } - dAtA2[j1] = uint8(num) - j1++ + dAtA3[j2] = uint8(num) + j2++ } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintNflog(dAtA, i, uint64(j1)) + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintNflog(dAtA, i, uint64(j2)) i-- dAtA[i] = 0x3a } if len(m.FiringAlerts) > 0 { - dAtA4 := make([]byte, len(m.FiringAlerts)*10) - var j3 int + dAtA5 := make([]byte, len(m.FiringAlerts)*10) + var j4 int for _, num := range m.FiringAlerts { for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j4++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA5[j4] = uint8(num) + j4++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintNflog(dAtA, i, uint64(j3)) + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintNflog(dAtA, i, uint64(j4)) i-- dAtA[i] = 0x32 } - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err5 != nil { - return 0, err5 + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err6 != nil { + return 0, err6 } - i -= n5 - i = encodeVarintNflog(dAtA, i, uint64(n5)) + i -= n6 + i = encodeVarintNflog(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x2a if m.Resolved { @@ -391,12 +531,12 @@ func (m *MeshEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiresAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiresAt):]) - if err7 != nil { - return 0, err7 + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiresAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiresAt):]) + if err8 != nil { + return 0, err8 } - i -= n7 - i = encodeVarintNflog(dAtA, i, uint64(n7)) + i -= n8 + i = encodeVarintNflog(dAtA, i, uint64(n8)) i-- dAtA[i] = 0x12 if m.Entry != nil { @@ -414,6 +554,81 @@ func (m *MeshEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ReceiverDataValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReceiverDataValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReceiverDataValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ReceiverDataValue_StrVal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReceiverDataValue_StrVal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.StrVal) + copy(dAtA[i:], m.StrVal) + i = encodeVarintNflog(dAtA, i, uint64(len(m.StrVal))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *ReceiverDataValue_IntVal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReceiverDataValue_IntVal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintNflog(dAtA, i, uint64(m.IntVal)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *ReceiverDataValue_DoubleVal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReceiverDataValue_DoubleVal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleVal)))) + i-- + dAtA[i] = 0x19 + return len(dAtA) - i, nil +} func encodeVarintNflog(dAtA []byte, offset int, v uint64) int { offset -= sovNflog(v) base := offset @@ -485,6 +700,19 @@ func (m *Entry) Size() (n int) { } n += 1 + sovNflog(uint64(l)) + l } + if len(m.ReceiverData) > 0 { + for k, v := range m.ReceiverData { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovNflog(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovNflog(uint64(len(k))) + l + n += mapEntrySize + 1 + sovNflog(uint64(mapEntrySize)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -509,6 +737,50 @@ func (m *MeshEntry) Size() (n int) { return n } +func (m *ReceiverDataValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ReceiverDataValue_StrVal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StrVal) + n += 1 + l + sovNflog(uint64(l)) + return n +} +func (m *ReceiverDataValue_IntVal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovNflog(uint64(m.IntVal)) + return n +} +func (m *ReceiverDataValue_DoubleVal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} + func sovNflog(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -987,6 +1259,135 @@ func (m *Entry) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field ResolvedAlerts", wireType) } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiverData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNflog + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNflog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReceiverData == nil { + m.ReceiverData = make(map[string]*ReceiverDataValue) + } + var mapkey string + var mapvalue *ReceiverDataValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthNflog + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthNflog + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthNflog + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthNflog + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ReceiverDataValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipNflog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNflog + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ReceiverData[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNflog(dAtA[iNdEx:]) @@ -1129,6 +1530,120 @@ func (m *MeshEntry) Unmarshal(dAtA []byte) error { } return nil } +func (m *ReceiverDataValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReceiverDataValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReceiverDataValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNflog + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNflog + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = &ReceiverDataValue_StrVal{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNflog + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = &ReceiverDataValue_IntVal{v} + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DoubleVal", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = &ReceiverDataValue_DoubleVal{float64(math.Float64frombits(v))} + default: + iNdEx = preIndex + skippy, err := skipNflog(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNflog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipNflog(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.proto b/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.proto index eb4fd8ba9e7..ee7d4054495 100644 --- a/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.proto +++ b/vendor/github.com/prometheus/alertmanager/nflog/nflogpb/nflog.proto @@ -39,6 +39,8 @@ message Entry { repeated uint64 firing_alerts = 6; // ResolvedAlerts list of hashes of resolved alerts at the last notification time. repeated uint64 resolved_alerts = 7; + // Data specific to the receiver which sent the notification + map receiver_data = 8; } // MeshEntry is a wrapper message to communicate a notify log @@ -50,3 +52,11 @@ message MeshEntry { // the log entry from its state. google.protobuf.Timestamp expires_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } + +message ReceiverDataValue { + oneof value { + string str_val = 1; + int64 int_val = 2; + double double_val = 3; + } +} diff --git a/vendor/github.com/prometheus/alertmanager/notify/discord/discord.go b/vendor/github.com/prometheus/alertmanager/notify/discord/discord.go index 42d8724e67d..0382a0906c8 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/discord/discord.go +++ b/vendor/github.com/prometheus/alertmanager/notify/discord/discord.go @@ -60,7 +60,7 @@ type Notifier struct { // New returns a new Discord notifier. func New(c *config.DiscordConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "discord", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "discord", httpOpts...) if err != nil { return nil, err } @@ -95,10 +95,11 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } - n.logger.Debug("extracted group key", "key", key) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") alerts := types.Alerts(as...) - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmpl := notify.TmplText(n.tmpl, data, &err) if err != nil { return false, err @@ -109,14 +110,14 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } if truncated { - n.logger.Warn("Truncated title", "key", key, "max_runes", maxTitleLenRunes) + logger.Warn("Truncated title", "max_runes", maxTitleLenRunes) } description, truncated := notify.TruncateInRunes(tmpl(n.conf.Message), maxDescriptionLenRunes) if err != nil { return false, err } if truncated { - n.logger.Warn("Truncated message", "key", key, "max_runes", maxDescriptionLenRunes) + logger.Warn("Truncated message", "max_runes", maxDescriptionLenRunes) } content, truncated := notify.TruncateInRunes(tmpl(n.conf.Content), maxContentLenRunes) @@ -124,7 +125,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } if truncated { - n.logger.Warn("Truncated message", "key", key, "max_runes", maxContentLenRunes) + logger.Warn("Truncated message", "max_runes", maxContentLenRunes) } color := colorGrey @@ -160,7 +161,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) if _, err := netUrl.Parse(n.conf.AvatarURL); err == nil { w.AvatarURL = n.conf.AvatarURL } else { - n.logger.Warn("Bad avatar url", "key", key) + logger.Warn("Bad avatar url", "key", key) } } diff --git a/vendor/github.com/prometheus/alertmanager/notify/email/email.go b/vendor/github.com/prometheus/alertmanager/notify/email/email.go index 7bd910ca6bd..3677a9e130d 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/email/email.go +++ b/vendor/github.com/prometheus/alertmanager/notify/email/email.go @@ -80,10 +80,14 @@ func (n *Email) auth(mechs string) (smtp.Auth, error) { } err := &types.MultiError{} - for _, mech := range strings.Split(mechs, " ") { + for mech := range strings.SplitSeq(mechs, " ") { switch mech { case "CRAM-MD5": - secret := string(n.conf.AuthSecret) + secret, secretErr := n.getAuthSecret() + if secretErr != nil { + err.Add(secretErr) + continue + } if secret == "" { err.Add(errors.New("missing secret for CRAM-MD5 auth mechanism")) continue @@ -130,7 +134,16 @@ func (n *Email) Notify(ctx context.Context, as ...*types.Alert) (bool, error) { err error success = false ) - if n.conf.Smarthost.Port == "465" { + // Determine whether to use Implicit TLS + var useImplicitTLS bool + if n.conf.ForceImplicitTLS != nil { + useImplicitTLS = *n.conf.ForceImplicitTLS + } else { + // Default logic: port 465 uses implicit TLS (backward compatibility) + useImplicitTLS = n.conf.Smarthost.Port == "465" + } + + if useImplicitTLS { tlsConfig, err := commoncfg.NewTLSConfig(n.conf.TLSConfig) if err != nil { return false, fmt.Errorf("parse TLS configuration: %w", err) @@ -173,7 +186,7 @@ func (n *Email) Notify(ctx context.Context, as ...*types.Alert) (bool, error) { } // Global Config guarantees RequireTLS is not nil. - if *n.conf.RequireTLS { + if *n.conf.RequireTLS && !useImplicitTLS { if ok, _ := c.Extension("STARTTLS"); !ok { return true, fmt.Errorf("'require_tls' is true (default) but %q does not advertise the STARTTLS extension", n.conf.Smarthost) } @@ -265,6 +278,31 @@ func (n *Email) Notify(ctx context.Context, as ...*types.Alert) (bool, error) { fmt.Fprintf(buffer, "Message-Id: %s\r\n", fmt.Sprintf("<%d.%d@%s>", time.Now().UnixNano(), rand.Uint64(), n.hostname)) } + if n.conf.Threading.Enabled { + key, err := notify.ExtractGroupKey(ctx) + if err != nil { + return false, err + } + // Add threading headers. All notifications for the same alert group + // (identified by key hash) are threaded together. + threadBy := "" + if n.conf.Threading.ThreadByDate != "none" { + // ThreadByDate is 'daily': + // Use current date so all mails for this alert today thread together. + threadBy = time.Now().Format("2006-01-02") + } + keyHash := key.Hash() + if len(keyHash) > 16 { + keyHash = keyHash[:16] + } + // The thread root ID is a Message-ID that doesn't correspond to + // any actual email. Email clients following the (commonly used) JWZ + // algorithm will create a dummy container to group these messages. + threadRootID := fmt.Sprintf("", keyHash, threadBy) + fmt.Fprintf(buffer, "References: %s\r\n", threadRootID) + fmt.Fprintf(buffer, "In-Reply-To: %s\r\n", threadRootID) + } + multipartBuffer := &bytes.Buffer{} multipartWriter := multipart.NewWriter(multipartBuffer) @@ -385,3 +423,14 @@ func (n *Email) getPassword() (string, error) { } return string(n.conf.AuthPassword), nil } + +func (n *Email) getAuthSecret() (string, error) { + if len(n.conf.AuthSecretFile) > 0 { + content, err := os.ReadFile(n.conf.AuthSecretFile) + if err != nil { + return "", fmt.Errorf("could not read %s: %w", n.conf.AuthSecretFile, err) + } + return string(content), nil + } + return string(n.conf.AuthSecret), nil +} diff --git a/vendor/github.com/prometheus/alertmanager/notify/incidentio/incidentio.go b/vendor/github.com/prometheus/alertmanager/notify/incidentio/incidentio.go index efee649a76c..b985853eaba 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/incidentio/incidentio.go +++ b/vendor/github.com/prometheus/alertmanager/notify/incidentio/incidentio.go @@ -73,7 +73,7 @@ func New(conf *config.IncidentioConfig, t *template.Template, l *slog.Logger, ht } } - client, err := commoncfg.NewClientFromConfig(httpConfig, "incidentio", httpOpts...) + client, err := notify.NewClientWithTracing(httpConfig, "incidentio", httpOpts...) if err != nil { return nil, err } diff --git a/vendor/github.com/prometheus/alertmanager/notify/jira/jira.go b/vendor/github.com/prometheus/alertmanager/notify/jira/jira.go index 5d91382fe47..d2fc8889331 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/jira/jira.go +++ b/vendor/github.com/prometheus/alertmanager/notify/jira/jira.go @@ -27,7 +27,6 @@ import ( commoncfg "github.com/prometheus/common/config" "github.com/prometheus/common/model" - "github.com/trivago/tgo/tcontainer" "github.com/prometheus/alertmanager/config" "github.com/prometheus/alertmanager/notify" @@ -50,7 +49,7 @@ type Notifier struct { } func New(c *config.JiraConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "jira", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "jira", httpOpts...) if err != nil { return nil, err } @@ -72,6 +71,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) } logger := n.logger.With("group_key", key.String()) + logger.Debug("extracted group key") var ( alerts = types.Alerts(as...) @@ -102,8 +102,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) } else { path = "issue/" + existingIssue.Key method = http.MethodPut - - logger.Debug("updating existing issue", "issue_key", existingIssue.Key) + logger.Debug("updating existing issue", "issue_key", existingIssue.Key, "summary_update_enabled", n.conf.Summary.EnableUpdateValue(), "description_update_enabled", n.conf.Description.EnableUpdateValue()) } requestBody, err := n.prepareIssueRequestBody(ctx, logger, key.Hash(), tmplTextFunc) @@ -111,6 +110,15 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } + if method == http.MethodPut && requestBody.Fields != nil { + if !n.conf.Description.EnableUpdateValue() { + requestBody.Fields.Description = nil + } + if !n.conf.Summary.EnableUpdateValue() { + requestBody.Fields.Summary = nil + } + } + _, shouldRetry, err = n.doAPIRequest(ctx, method, path, requestBody) if err != nil { return shouldRetry, fmt.Errorf("failed to %s request to %q: %w", method, path, err) @@ -119,11 +127,12 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return n.transitionIssue(ctx, logger, existingIssue, alerts.HasFiring()) } -func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logger, groupID string, tmplTextFunc templateFunc) (issue, error) { - summary, err := tmplTextFunc(n.conf.Summary) +func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logger, groupID string, tmplTextFunc template.TemplateFunc) (issue, error) { + summary, err := tmplTextFunc(n.conf.Summary.Template) if err != nil { return issue{}, fmt.Errorf("summary template: %w", err) } + project, err := tmplTextFunc(n.conf.Project) if err != nil { return issue{}, fmt.Errorf("project template: %w", err) @@ -133,11 +142,12 @@ func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logge return issue{}, fmt.Errorf("issue_type template: %w", err) } - // Recursively convert any maps to map[string]interface{}, filtering out all non-string keys, so the json encoder - // doesn't blow up when marshaling JIRA requests. - fieldsWithStringKeys, err := tcontainer.ConvertToMarshalMap(n.conf.Fields, func(v string) string { return v }) - if err != nil { - return issue{}, fmt.Errorf("convertToMarshalMap: %w", err) + fieldsWithStringKeys := make(map[string]any, len(n.conf.Fields)) + for key, value := range n.conf.Fields { + fieldsWithStringKeys[key], err = template.DeepCopyWithTemplate(value, tmplTextFunc) + if err != nil { + return issue{}, fmt.Errorf("fields template: %w", err) + } } summary, truncated := notify.TruncateInRunes(summary, maxSummaryLenRunes) @@ -148,12 +158,12 @@ func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logge requestBody := issue{Fields: &issueFields{ Project: &issueProject{Key: project}, Issuetype: &idNameValue{Name: issueType}, - Summary: summary, + Summary: &summary, Labels: make([]string, 0, len(n.conf.Labels)+1), Fields: fieldsWithStringKeys, }} - issueDescriptionString, err := tmplTextFunc(n.conf.Description) + issueDescriptionString, err := tmplTextFunc(n.conf.Description.Template) if err != nil { return issue{}, fmt.Errorf("description template: %w", err) } @@ -163,15 +173,26 @@ func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logge logger.Warn("Truncated description", "max_runes", maxDescriptionLenRunes) } - requestBody.Fields.Description = issueDescriptionString - if strings.HasSuffix(n.conf.APIURL.Path, "/3") { - var issueDescription any - if err := json.Unmarshal([]byte(issueDescriptionString), &issueDescription); err != nil { - return issue{}, fmt.Errorf("description unmarshaling: %w", err) + var description *jiraDescription + descriptionCopy := issueDescriptionString + if isAPIv3Path(n.conf.APIURL.Path) { + descriptionCopy = strings.TrimSpace(descriptionCopy) + if descriptionCopy != "" { + if !json.Valid([]byte(descriptionCopy)) { + return issue{}, fmt.Errorf("description template: invalid JSON for API v3") + } + raw := json.RawMessage(descriptionCopy) + description = &jiraDescription{ + RawJSONDescription: append(json.RawMessage(nil), raw...), + } } - requestBody.Fields.Description = issueDescription + } else if descriptionCopy != "" { + desc := descriptionCopy + description = &jiraDescription{StringDescription: &desc} } + requestBody.Fields.Description = description + for i, label := range n.conf.Labels { label, err = tmplTextFunc(label) if err != nil { @@ -194,7 +215,7 @@ func (n *Notifier) prepareIssueRequestBody(_ context.Context, logger *slog.Logge return requestBody, nil } -func (n *Notifier) searchExistingIssue(ctx context.Context, logger *slog.Logger, groupID string, firing bool, tmplTextFunc templateFunc) (*issue, bool, error) { +func (n *Notifier) searchExistingIssue(ctx context.Context, logger *slog.Logger, groupID string, firing bool, tmplTextFunc template.TemplateFunc) (*issue, bool, error) { jql := strings.Builder{} if n.conf.WontFixResolution != "" { @@ -274,7 +295,7 @@ func (n *Notifier) prepareSearchRequest(jql string) (issueSearch, string) { } if n.conf.APIType == "cloud" || n.conf.APIType == "auto" && strings.HasSuffix(n.conf.APIURL.Host, "atlassian.net") { - searchPath := strings.Replace(n.conf.APIURL.JoinPath("/search/jql").String(), "/2", "/3", 1) + searchPath := strings.Replace(n.conf.APIURL.JoinPath("/search/jql").String(), "/rest/api/2/", "/rest/api/3/", 1) return requestBody, searchPath } @@ -387,3 +408,7 @@ func (n *Notifier) doAPIRequestFullPath(ctx context.Context, method, path string return responseBody, false, nil } + +func isAPIv3Path(path string) bool { + return strings.HasSuffix(strings.TrimRight(path, "/"), "/3") +} diff --git a/vendor/github.com/prometheus/alertmanager/notify/jira/types.go b/vendor/github.com/prometheus/alertmanager/notify/jira/types.go index e04eb6d4f86..4d42097740c 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/jira/types.go +++ b/vendor/github.com/prometheus/alertmanager/notify/jira/types.go @@ -14,11 +14,12 @@ package jira import ( + "bytes" "encoding/json" + "maps" ) -type templateFunc func(string) (string, error) - +// issue represents a Jira issue wrapper. type issue struct { Key string `json:"key,omitempty"` Fields *issueFields `json:"fields,omitempty"` @@ -26,14 +27,14 @@ type issue struct { } type issueFields struct { - Description any `json:"description"` - Issuetype *idNameValue `json:"issuetype,omitempty"` - Labels []string `json:"labels,omitempty"` - Priority *idNameValue `json:"priority,omitempty"` - Project *issueProject `json:"project,omitempty"` - Resolution *idNameValue `json:"resolution,omitempty"` - Summary string `json:"summary"` - Status *issueStatus `json:"status,omitempty"` + Description *jiraDescription `json:"description,omitempty"` + Issuetype *idNameValue `json:"issuetype,omitempty"` + Labels []string `json:"labels,omitempty"` + Priority *idNameValue `json:"priority,omitempty"` + Project *issueProject `json:"project,omitempty"` + Resolution *idNameValue `json:"resolution,omitempty"` + Summary *string `json:"summary,omitempty"` + Status *issueStatus `json:"status,omitempty"` Fields map[string]any `json:"-"` } @@ -70,38 +71,101 @@ type issueTransitions struct { // MarshalJSON merges the struct issueFields and issueFields.CustomField together. func (i issueFields) MarshalJSON() ([]byte, error) { - jsonFields := map[string]any{ - "description": i.Description, - "summary": i.Summary, + jsonFields := map[string]any{} + + if i.Summary != nil { + jsonFields["summary"] = *i.Summary + } + + // Only include description when it has content. + if i.Description != nil && !i.Description.IsEmpty() { + jsonFields["description"] = i.Description } if i.Issuetype != nil { jsonFields["issuetype"] = i.Issuetype } - if i.Labels != nil { jsonFields["labels"] = i.Labels } - if i.Priority != nil { jsonFields["priority"] = i.Priority } - if i.Project != nil { jsonFields["project"] = i.Project } - if i.Resolution != nil { jsonFields["resolution"] = i.Resolution } - if i.Status != nil { jsonFields["status"] = i.Status } - for key, field := range i.Fields { - jsonFields[key] = field + // copy custom/unknown fields into the outgoing map + if i.Fields != nil { + maps.Copy(jsonFields, i.Fields) } return json.Marshal(jsonFields) } + +// jiraDescription holds either a plain string (v2 API) description or ADF (Atlassian Document Format) JSON (v3 API). +type jiraDescription struct { + StringDescription *string // non-nil if the description is a simple string + RawJSONDescription json.RawMessage // non-empty if the description is structured JSON +} + +func (jd jiraDescription) MarshalJSON() ([]byte, error) { + // If there's a structured JSON payload, return it as-is. + if len(jd.RawJSONDescription) > 0 { + out := make([]byte, len(jd.RawJSONDescription)) + copy(out, jd.RawJSONDescription) + return out, nil + } + + // If we have a string representation, let json.Marshal quote it properly. + if jd.StringDescription != nil { + return json.Marshal(*jd.StringDescription) + } + + // No value: represent as JSON null. + return []byte("null"), nil +} + +func (jd *jiraDescription) UnmarshalJSON(data []byte) error { + // Reset current state + jd.StringDescription = nil + jd.RawJSONDescription = nil + + trimmed := bytes.TrimSpace(data) + if len(trimmed) == 0 || bytes.Equal(trimmed, []byte("null")) { + // nothing to do (leave both fields nil/empty) + return nil + } + + // If it starts with object or array token, treat as structured JSON and keep raw bytes. + switch trimmed[0] { + case '{', '[': + // store a copy of the raw JSON + jd.RawJSONDescription = append(json.RawMessage(nil), trimmed...) + return nil + default: + // otherwise try to unmarshal as string (expected for Jira v2) + var s string + if err := json.Unmarshal(trimmed, &s); err != nil { + // fallback: if it's not a string but also not an object/array, keep raw bytes + jd.RawJSONDescription = append(json.RawMessage(nil), trimmed...) + return nil + } + jd.StringDescription = &s + return nil + } +} + +// IsEmpty reports whether the jiraDescription contains no useful value. +func (jd *jiraDescription) IsEmpty() bool { + if jd == nil { + return true + } + return jd.StringDescription == nil && len(jd.RawJSONDescription) == 0 +} diff --git a/vendor/github.com/prometheus/alertmanager/notify/msteams/msteams.go b/vendor/github.com/prometheus/alertmanager/notify/msteams/msteams.go index f53f020b3b1..e6923a17e14 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/msteams/msteams.go +++ b/vendor/github.com/prometheus/alertmanager/notify/msteams/msteams.go @@ -61,7 +61,7 @@ type teamsMessage struct { // New returns a new notifier that uses the Microsoft Teams Webhook API. func New(c *config.MSTeamsConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "msteams", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "msteams", httpOpts...) if err != nil { return nil, err } @@ -85,9 +85,10 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } - n.logger.Debug("extracted group key", "key", key) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmpl := notify.TmplText(n.tmpl, data, &err) if err != nil { return false, err diff --git a/vendor/github.com/prometheus/alertmanager/notify/msteamsv2/msteamsv2.go b/vendor/github.com/prometheus/alertmanager/notify/msteamsv2/msteamsv2.go index f013bc3bdc3..010df739d1e 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/msteamsv2/msteamsv2.go +++ b/vendor/github.com/prometheus/alertmanager/notify/msteamsv2/msteamsv2.go @@ -85,7 +85,7 @@ type teamsMessage struct { // New returns a new notifier that uses the Microsoft Teams Power Platform connector. func New(c *config.MSTeamsV2Config, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "msteamsv2", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "msteamsv2", httpOpts...) if err != nil { return nil, err } @@ -109,9 +109,10 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } - n.logger.Debug("extracted group key", "key", key) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmpl := notify.TmplText(n.tmpl, data, &err) if err != nil { return false, err diff --git a/vendor/github.com/prometheus/alertmanager/notify/notify.go b/vendor/github.com/prometheus/alertmanager/notify/notify.go index b7ae41fadac..4de234f935c 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/notify.go +++ b/vendor/github.com/prometheus/alertmanager/notify/notify.go @@ -25,7 +25,12 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/cespare/xxhash/v2" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" "github.com/prometheus/alertmanager/featurecontrol" "github.com/prometheus/alertmanager/inhibit" @@ -36,6 +41,8 @@ import ( "github.com/prometheus/alertmanager/types" ) +var tracer = otel.Tracer("github.com/prometheus/alertmanager/notify") + // ResolvedSender returns true if resolved notifications should be sent. type ResolvedSender interface { SendResolved() bool @@ -80,8 +87,24 @@ func NewIntegration(notifier Notifier, rs ResolvedSender, name string, idx int, } // Notify implements the Notifier interface. -func (i *Integration) Notify(ctx context.Context, alerts ...*types.Alert) (bool, error) { - return i.notifier.Notify(ctx, alerts...) +func (i *Integration) Notify(ctx context.Context, alerts ...*types.Alert) (recoverable bool, err error) { + ctx, span := tracer.Start(ctx, "notify.Integration.Notify", + trace.WithAttributes(attribute.String("alerting.notify.integration.name", i.name)), + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindClient), + ) + + defer func() { + span.SetAttributes(attribute.Bool("alerting.notify.error.recoverable", recoverable)) + if err != nil { + span.SetStatus(codes.Error, err.Error()) + span.RecordError(err) + } + span.End() + }() + + recoverable, err = i.notifier.Notify(ctx, alerts...) + return recoverable, err } // SendResolved implements the ResolvedSender interface. @@ -119,6 +142,7 @@ const ( keyMuteTimeIntervals keyActiveTimeIntervals keyRouteID + keyNflogStore ) // WithReceiverName populates a context with a receiver name. @@ -239,6 +263,15 @@ func RouteID(ctx context.Context) (string, bool) { return v, ok } +func WithNflogStore(ctx context.Context, store *nflog.Store) context.Context { + return context.WithValue(ctx, keyNflogStore, store) +} + +func NflogStore(ctx context.Context) (*nflog.Store, bool) { + v, ok := ctx.Value(keyNflogStore).(*nflog.Store) + return v, ok +} + // A Stage processes alerts under the constraints of the given context. type Stage interface { Exec(ctx context.Context, l *slog.Logger, alerts ...*types.Alert) (context.Context, []*types.Alert, error) @@ -253,7 +286,7 @@ func (f StageFunc) Exec(ctx context.Context, l *slog.Logger, alerts ...*types.Al } type NotificationLog interface { - Log(r *nflogpb.Receiver, gkey string, firingAlerts, resolvedAlerts []uint64, expiry time.Duration) error + Log(r *nflogpb.Receiver, gkey string, firingAlerts, resolvedAlerts []uint64, store *nflog.Store, expiry time.Duration) error Query(params ...nflog.QueryParam) ([]*nflogpb.Entry, error) } @@ -276,32 +309,32 @@ func NewMetrics(r prometheus.Registerer, ff featurecontrol.Flagger) *Metrics { } m := &Metrics{ - numNotifications: prometheus.NewCounterVec(prometheus.CounterOpts{ + numNotifications: promauto.With(r).NewCounterVec(prometheus.CounterOpts{ Namespace: "alertmanager", Name: "notifications_total", Help: "The total number of attempted notifications.", }, labels), - numTotalFailedNotifications: prometheus.NewCounterVec(prometheus.CounterOpts{ + numTotalFailedNotifications: promauto.With(r).NewCounterVec(prometheus.CounterOpts{ Namespace: "alertmanager", Name: "notifications_failed_total", Help: "The total number of failed notifications.", }, append(labels, "reason")), - numNotificationRequestsTotal: prometheus.NewCounterVec(prometheus.CounterOpts{ + numNotificationRequestsTotal: promauto.With(r).NewCounterVec(prometheus.CounterOpts{ Namespace: "alertmanager", Name: "notification_requests_total", Help: "The total number of attempted notification requests.", }, labels), - numNotificationRequestsFailedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{ + numNotificationRequestsFailedTotal: promauto.With(r).NewCounterVec(prometheus.CounterOpts{ Namespace: "alertmanager", Name: "notification_requests_failed_total", Help: "The total number of failed notification requests.", }, labels), - numNotificationSuppressedTotal: prometheus.NewCounterVec(prometheus.CounterOpts{ + numNotificationSuppressedTotal: promauto.With(r).NewCounterVec(prometheus.CounterOpts{ Namespace: "alertmanager", Name: "notifications_suppressed_total", Help: "The total number of notifications suppressed for being silenced, inhibited, outside of active time intervals or within muted time intervals.", }, []string{"reason"}), - notificationLatencySeconds: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + notificationLatencySeconds: promauto.With(r).NewHistogramVec(prometheus.HistogramOpts{ Namespace: "alertmanager", Name: "notification_latency_seconds", Help: "The latency of notifications in seconds.", @@ -313,12 +346,6 @@ func NewMetrics(r prometheus.Registerer, ff featurecontrol.Flagger) *Metrics { ff: ff, } - r.MustRegister( - m.numNotifications, m.numTotalFailedNotifications, - m.numNotificationRequestsTotal, m.numNotificationRequestsFailedTotal, - m.numNotificationSuppressedTotal, m.notificationLatencySeconds, - ) - return m } @@ -368,6 +395,7 @@ func (m *Metrics) InitializeFor(receiver map[string][]Integration) { "incidentio", "jira", "rocketchat", + "mattermost", } { m.numNotifications.WithLabelValues(integration) m.numNotificationRequestsTotal.WithLabelValues(integration) @@ -458,6 +486,15 @@ func (rs RoutingStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*type return ctx, nil, errors.New("receiver missing") } + ctx, span := tracer.Start(ctx, "notify.RoutingStage.Exec", + trace.WithAttributes( + attribute.String("alerting.notify.receiver.name", receiver), + attribute.Int("alerting.alerts.count", len(alerts)), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + s, ok := rs[receiver] if !ok { return ctx, nil, errors.New("stage for receiver missing") @@ -552,6 +589,12 @@ func NewMuteStage(m types.Muter, metrics *Metrics) *MuteStage { // Exec implements the Stage interface. func (n *MuteStage) Exec(ctx context.Context, logger *slog.Logger, alerts ...*types.Alert) (context.Context, []*types.Alert, error) { + ctx, span := tracer.Start(ctx, "notify.MuteStage.Exec", + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + var ( filtered []*types.Alert muted []*types.Alert @@ -559,7 +602,7 @@ func (n *MuteStage) Exec(ctx context.Context, logger *slog.Logger, alerts ...*ty for _, a := range alerts { // TODO(fabxc): increment total alerts counter. // Do not send the alert if muted. - if n.muter.Mutes(a.Labels) { + if n.muter.Mutes(ctx, a.Labels) { muted = append(muted, a) } else { filtered = append(filtered, a) @@ -576,6 +619,11 @@ func (n *MuteStage) Exec(ctx context.Context, logger *slog.Logger, alerts ...*ty reason = SuppressedReasonInhibition default: } + span.SetAttributes( + attribute.Int("alerting.alerts.muted.count", len(muted)), + attribute.Int("alerting.alerts.filtered.count", len(filtered)), + attribute.String("alerting.suppressed.reason", reason), + ) n.metrics.numNotificationSuppressedTotal.WithLabelValues(reason).Add(float64(len(muted))) logger.Debug("Notifications will not be sent for muted alerts", "alerts", fmt.Sprintf("%v", muted), "reason", reason) } @@ -704,6 +752,13 @@ func (n *DedupStage) Exec(ctx context.Context, _ *slog.Logger, alerts ...*types. return ctx, nil, errors.New("group key missing") } + ctx, span := tracer.Start(ctx, "notify.DedupStage.Exec", + trace.WithAttributes(attribute.String("alerting.group.key", gkey)), + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + repeatInterval, ok := RepeatInterval(ctx) if !ok { return ctx, nil, errors.New("repeat interval missing") @@ -735,15 +790,27 @@ func (n *DedupStage) Exec(ctx context.Context, _ *slog.Logger, alerts ...*types. } var entry *nflogpb.Entry + var isFirstNotification bool switch len(entries) { case 0: + isFirstNotification = true case 1: entry = entries[0] + // if this condition true, we're sending a notification for a new alert group, but the nflog entry for the previous alert + // group is still in log + isFirstNotification = len(entry.FiringAlerts) == 0 && len(firing) > 0 default: return ctx, nil, fmt.Errorf("unexpected entry result size %d", len(entries)) } + if isFirstNotification { + ctx = WithNflogStore(ctx, nflog.NewStore(nil)) + } else { + ctx = WithNflogStore(ctx, nflog.NewStore(entry)) + } + if n.needsUpdate(entry, firingSet, resolvedSet, repeatInterval) { + span.AddEvent("notify.DedupStage.Exec nflog needs update") return ctx, alerts, nil } return ctx, nil, nil @@ -776,10 +843,23 @@ func NewRetryStage(i Integration, groupName string, metrics *Metrics) *RetryStag func (r RetryStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*types.Alert) (context.Context, []*types.Alert, error) { r.metrics.numNotifications.WithLabelValues(r.labelValues...).Inc() + + ctx, span := tracer.Start(ctx, "notify.RetryStage.Exec", + trace.WithAttributes(attribute.String("alerting.group.name", r.groupName)), + trace.WithAttributes(attribute.String("alerting.integration.name", r.integration.name)), + trace.WithAttributes(attribute.StringSlice("alerting.label.values", r.labelValues)), + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + ctx, alerts, err := r.exec(ctx, l, alerts...) failureReason := DefaultReason.String() if err != nil { + span.SetStatus(codes.Error, err.Error()) + span.RecordError(err) + var e *ErrorWithReason if errors.As(err, &e) { failureReason = e.Reason.String() @@ -883,18 +963,6 @@ func (r RetryStage) exec(ctx context.Context, l *slog.Logger, alerts ...*types.A return ctx, alerts, nil } case <-ctx.Done(): - if iErr == nil { - iErr = ctx.Err() - if errors.Is(iErr, context.Canceled) { - iErr = NewErrorWithReason(ContextCanceledReason, iErr) - } else if errors.Is(iErr, context.DeadlineExceeded) { - iErr = NewErrorWithReason(ContextDeadlineExceededReason, iErr) - } - } - if iErr != nil { - return ctx, nil, fmt.Errorf("%s/%s: notify retry canceled after %d attempts: %w", r.groupName, r.integration.String(), i, iErr) - } - return ctx, nil, nil } } } @@ -921,6 +989,13 @@ func (n SetNotifiesStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*t return ctx, nil, errors.New("group key missing") } + ctx, span := tracer.Start(ctx, "notify.SetNotifiesStage.Exec", + trace.WithAttributes(attribute.String("alerting.group.key", gkey)), + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + firing, ok := FiringAlerts(ctx) if !ok { return ctx, nil, errors.New("firing alerts missing") @@ -937,7 +1012,14 @@ func (n SetNotifiesStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*t } expiry := 2 * repeat - return ctx, alerts, n.nflog.Log(n.recv, gkey, firing, resolved, expiry) + span.SetAttributes( + attribute.Int("alerting.alerts.firing.count", len(firing)), + attribute.Int("alerting.alerts.resolved.count", len(resolved)), + ) + + // Extract receiver data from context if present (it's ok for it to be nil). + store, _ := NflogStore(ctx) + return ctx, alerts, n.nflog.Log(n.recv, gkey, firing, resolved, store, expiry) } type timeStage struct { @@ -955,15 +1037,26 @@ func NewTimeMuteStage(muter types.TimeMuter, marker types.GroupMarker, metrics * // Exec implements the stage interface for TimeMuteStage. // TimeMuteStage is responsible for muting alerts whose route is not in an active time. func (tms TimeMuteStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*types.Alert) (context.Context, []*types.Alert, error) { + ctx, span := tracer.Start(ctx, "notify.TimeMuteStage.Exec", + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + routeID, ok := RouteID(ctx) if !ok { - return ctx, nil, errors.New("route ID missing") + err := errors.New("route ID missing") + span.SetStatus(codes.Error, err.Error()) + span.RecordError(err) + return ctx, nil, err } + span.SetAttributes(attribute.String("alerting.route.id", routeID)) gkey, ok := GroupKey(ctx) if !ok { return ctx, nil, errors.New("group key missing") } + span.SetAttributes(attribute.String("alerting.group.key", gkey)) muteTimeIntervalNames, ok := MuteTimeIntervalNames(ctx) if !ok { @@ -981,6 +1074,8 @@ func (tms TimeMuteStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*ty muted, mutedBy, err := tms.muter.Mutes(muteTimeIntervalNames, now) if err != nil { + span.SetStatus(codes.Error, err.Error()) + span.RecordError(err) return ctx, alerts, err } // If muted is false then mutedBy is nil and the muted marker is removed. @@ -990,6 +1085,7 @@ func (tms TimeMuteStage) Exec(ctx context.Context, l *slog.Logger, alerts ...*ty if muted { tms.metrics.numNotificationSuppressedTotal.WithLabelValues(SuppressedReasonMuteTimeInterval).Add(float64(len(alerts))) l.Debug("Notifications not sent, route is within mute time", "alerts", len(alerts)) + span.AddEvent("notify.TimeMuteStage.Exec muted the alerts") return ctx, nil, nil } @@ -1010,6 +1106,13 @@ func (tas TimeActiveStage) Exec(ctx context.Context, l *slog.Logger, alerts ...* return ctx, nil, errors.New("route ID missing") } + ctx, span := tracer.Start(ctx, "notify.TimeActiveStage.Exec", + trace.WithAttributes(attribute.String("alerting.route.id", routeID)), + trace.WithAttributes(attribute.Int("alerting.alerts.count", len(alerts))), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + gkey, ok := GroupKey(ctx) if !ok { return ctx, nil, errors.New("group key missing") @@ -1046,6 +1149,7 @@ func (tas TimeActiveStage) Exec(ctx context.Context, l *slog.Logger, alerts ...* // If the current time is not inside an active time, all alerts are removed from the pipeline if !active { + span.AddEvent("notify.TimeActiveStage.Exec not active, removing all alerts") tas.metrics.numNotificationSuppressedTotal.WithLabelValues(SuppressedReasonActiveTimeInterval).Add(float64(len(alerts))) l.Debug("Notifications not sent, route is not within active time", "alerts", len(alerts)) return ctx, nil, nil diff --git a/vendor/github.com/prometheus/alertmanager/notify/opsgenie/opsgenie.go b/vendor/github.com/prometheus/alertmanager/notify/opsgenie/opsgenie.go index 54c0e245548..a267b45e700 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/opsgenie/opsgenie.go +++ b/vendor/github.com/prometheus/alertmanager/notify/opsgenie/opsgenie.go @@ -19,6 +19,7 @@ import ( "encoding/json" "fmt" "log/slog" + "maps" "net/http" "os" "strings" @@ -46,7 +47,7 @@ type Notifier struct { // New returns a new OpsGenie notifier. func New(c *config.OpsGenieConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "opsgenie", httpOpts...) if err != nil { return nil, err } @@ -132,17 +133,16 @@ func (n *Notifier) createRequests(ctx context.Context, as ...*types.Alert) ([]*h if err != nil { return nil, false, err } - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") - n.logger.Debug("extracted group key", "key", key) + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmpl := notify.TmplText(n.tmpl, data, &err) details := make(map[string]string) - for k, v := range data.CommonLabels { - details[k] = v - } + maps.Copy(details, data.CommonLabels) for k, v := range n.conf.Details { details[k] = tmpl(v) @@ -174,7 +174,7 @@ func (n *Notifier) createRequests(ctx context.Context, as ...*types.Alert) ([]*h default: message, truncated := notify.TruncateInRunes(tmpl(n.conf.Message), maxMessageLenRunes) if truncated { - n.logger.Warn("Truncated message", "alert", key, "max_runes", maxMessageLenRunes) + logger.Warn("Truncated message", "alert", key, "max_runes", maxMessageLenRunes) } createEndpointURL := n.conf.APIURL.Copy() diff --git a/vendor/github.com/prometheus/alertmanager/notify/pagerduty/pagerduty.go b/vendor/github.com/prometheus/alertmanager/notify/pagerduty/pagerduty.go index abab5a70be1..85327239923 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/pagerduty/pagerduty.go +++ b/vendor/github.com/prometheus/alertmanager/notify/pagerduty/pagerduty.go @@ -55,7 +55,7 @@ type Notifier struct { // New returns a new PagerDuty notifier. func New(c *config.PagerdutyConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "pagerduty", httpOpts...) if err != nil { return nil, err } @@ -63,11 +63,11 @@ func New(c *config.PagerdutyConfig, t *template.Template, l *slog.Logger, httpOp if c.ServiceKey != "" || c.ServiceKeyFile != "" { n.apiV1 = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" // Retrying can solve the issue on 403 (rate limiting) and 5xx response codes. - // https://v2.developer.pagerduty.com/docs/trigger-events + // https://developer.pagerduty.com/docs/events-api-v1-overview#api-response-codes--retry-logic n.retrier = ¬ify.Retrier{RetryCodes: []int{http.StatusForbidden}, CustomDetailsFunc: errDetails} } else { // Retrying can solve the issue on 429 (rate limiting) and 5xx response codes. - // https://v2.developer.pagerduty.com/docs/events-api-v2#api-response-codes--retry-logic + // https://developer.pagerduty.com/docs/events-api-v2-overview#response-codes--retry-logic n.retrier = ¬ify.Retrier{RetryCodes: []int{http.StatusTooManyRequests}, CustomDetailsFunc: errDetails} } return n, nil @@ -89,7 +89,7 @@ type pagerDutyMessage struct { Payload *pagerDutyPayload `json:"payload"` Client string `json:"client,omitempty"` ClientURL string `json:"client_url,omitempty"` - Details map[string]string `json:"details,omitempty"` + Details map[string]any `json:"details,omitempty"` Images []pagerDutyImage `json:"images,omitempty"` Links []pagerDutyLink `json:"links,omitempty"` } @@ -106,14 +106,14 @@ type pagerDutyImage struct { } type pagerDutyPayload struct { - Summary string `json:"summary"` - Source string `json:"source"` - Severity string `json:"severity"` - Timestamp string `json:"timestamp,omitempty"` - Class string `json:"class,omitempty"` - Component string `json:"component,omitempty"` - Group string `json:"group,omitempty"` - CustomDetails map[string]string `json:"custom_details,omitempty"` + Summary string `json:"summary"` + Source string `json:"source"` + Severity string `json:"severity"` + Timestamp string `json:"timestamp,omitempty"` + Class string `json:"class,omitempty"` + Component string `json:"component,omitempty"` + Group string `json:"group,omitempty"` + CustomDetails map[string]any `json:"custom_details,omitempty"` } func (n *Notifier) encodeMessage(msg *pagerDutyMessage) (bytes.Buffer, error) { @@ -126,9 +126,9 @@ func (n *Notifier) encodeMessage(msg *pagerDutyMessage) (bytes.Buffer, error) { truncatedMsg := fmt.Sprintf("Custom details have been removed because the original event exceeds the maximum size of %s", units.MetricBytes(maxEventSize).String()) if n.apiV1 != "" { - msg.Details = map[string]string{"error": truncatedMsg} + msg.Details = map[string]any{"error": truncatedMsg} } else { - msg.Payload.CustomDetails = map[string]string{"error": truncatedMsg} + msg.Payload.CustomDetails = map[string]any{"error": truncatedMsg} } warningMsg := fmt.Sprintf("Truncated Details because message of size %s exceeds limit %s", units.MetricBytes(buf.Len()).String(), units.MetricBytes(maxEventSize).String()) @@ -148,8 +148,7 @@ func (n *Notifier) notifyV1( eventType string, key notify.Key, data *template.Data, - details map[string]string, - as ...*types.Alert, + details map[string]any, ) (bool, error) { var tmplErr error tmpl := notify.TmplText(n.tmpl, data, &tmplErr) @@ -209,8 +208,7 @@ func (n *Notifier) notifyV2( eventType string, key notify.Key, data *template.Data, - details map[string]string, - as ...*types.Alert, + details map[string]any, ) (bool, error) { var tmplErr error tmpl := notify.TmplText(n.tmpl, data, &tmplErr) @@ -308,31 +306,43 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) if err != nil { return false, err } + logger := n.logger.With("group_key", key) var ( alerts = types.Alerts(as...) - data = notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + data = notify.GetTemplateData(ctx, n.tmpl, as, logger) eventType = pagerDutyEventTrigger ) + if alerts.Status() == model.AlertResolved { eventType = pagerDutyEventResolve } - n.logger.Debug("extracted group key", "key", key, "eventType", eventType) + logger.Debug("extracted group key", "eventType", eventType) - details := make(map[string]string, len(n.conf.Details)) - for k, v := range n.conf.Details { - detail, err := n.tmpl.ExecuteTextString(v, data) - if err != nil { - return false, fmt.Errorf("%q: failed to template %q: %w", k, v, err) - } - details[k] = detail + details, err := n.renderDetails(data) + if err != nil { + return false, fmt.Errorf("failed to render details: %w", err) } + if n.conf.Timeout > 0 { + nfCtx, cancel := context.WithTimeoutCause(ctx, n.conf.Timeout, fmt.Errorf("configured pagerduty timeout reached (%s)", n.conf.Timeout)) + defer cancel() + ctx = nfCtx + } + + nf := n.notifyV2 if n.apiV1 != "" { - return n.notifyV1(ctx, eventType, key, data, details, as...) + nf = n.notifyV1 + } + retry, err := nf(ctx, eventType, key, data, details) + if err != nil { + if ctx.Err() != nil { + err = fmt.Errorf("%w: %w", err, context.Cause(ctx)) + } + return retry, err } - return n.notifyV2(ctx, eventType, key, data, details, as...) + return retry, nil } func errDetails(status int, body io.Reader) string { @@ -351,3 +361,24 @@ func errDetails(status int, body io.Reader) string { } return fmt.Sprintf("%s: %s", pgr.Message, strings.Join(pgr.Errors, ",")) } + +func (n *Notifier) renderDetails( + data *template.Data, +) (map[string]any, error) { + var ( + tmplTextErr error + tmplText = notify.TmplText(n.tmpl, data, &tmplTextErr) + tmplTextFunc = func(tmpl string) (string, error) { + return tmplText(tmpl), tmplTextErr + } + ) + var err error + rendered := make(map[string]any, len(n.conf.Details)) + for k, v := range n.conf.Details { + rendered[k], err = template.DeepCopyWithTemplate(v, tmplTextFunc) + if err != nil { + return nil, err + } + } + return rendered, nil +} diff --git a/vendor/github.com/prometheus/alertmanager/notify/pushover/pushover.go b/vendor/github.com/prometheus/alertmanager/notify/pushover/pushover.go index 1032de99030..3f5155668c2 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/pushover/pushover.go +++ b/vendor/github.com/prometheus/alertmanager/notify/pushover/pushover.go @@ -52,7 +52,7 @@ type Notifier struct { // New returns a new Pushover notifier. func New(c *config.PushoverConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "pushover", httpOpts...) if err != nil { return nil, err } @@ -72,10 +72,10 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) if !ok { return false, fmt.Errorf("group key missing") } - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") - // @tjhop: should this use `group` for the keyval like most other notify implementations? - n.logger.Debug("extracted group key", "incident", key) + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) var ( err error @@ -113,7 +113,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) title, truncated := notify.TruncateInRunes(tmpl(n.conf.Title), maxTitleLenRunes) if truncated { - n.logger.Warn("Truncated title", "incident", key, "max_runes", maxTitleLenRunes) + logger.Warn("Truncated title", "incident", key, "max_runes", maxTitleLenRunes) } parameters.Add("title", title) @@ -130,7 +130,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) message, truncated = notify.TruncateInRunes(message, maxMessageLenRunes) if truncated { - n.logger.Warn("Truncated message", "incident", key, "max_runes", maxMessageLenRunes) + logger.Warn("Truncated message", "incident", key, "max_runes", maxMessageLenRunes) } message = strings.TrimSpace(message) if message == "" { @@ -141,7 +141,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) supplementaryURL, truncated := notify.TruncateInRunes(tmpl(n.conf.URL), maxURLLenRunes) if truncated { - n.logger.Warn("Truncated URL", "incident", key, "max_runes", maxURLLenRunes) + logger.Warn("Truncated URL", "incident", key, "max_runes", maxURLLenRunes) } parameters.Add("url", supplementaryURL) parameters.Add("url_title", tmpl(n.conf.URLTitle)) @@ -167,7 +167,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) } u.RawQuery = parameters.Encode() // Don't log the URL as it contains secret data (see #1825). - n.logger.Debug("Sending message", "incident", key) + logger.Debug("Sending message", "incident", key) resp, err := notify.PostText(ctx, n.client, u.String(), nil) if err != nil { return true, notify.RedactURL(err) diff --git a/vendor/github.com/prometheus/alertmanager/notify/rocketchat/rocketchat.go b/vendor/github.com/prometheus/alertmanager/notify/rocketchat/rocketchat.go index ec225bd0eac..8d1a6f40855 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/rocketchat/rocketchat.go +++ b/vendor/github.com/prometheus/alertmanager/notify/rocketchat/rocketchat.go @@ -88,7 +88,7 @@ func (t *rocketchatRoundTripper) RoundTrip(req *http.Request) (res *http.Respons // New returns a new Rocketchat notification handler. func New(c *config.RocketchatConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "rocketchat", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "rocketchat", httpOpts...) if err != nil { return nil, err } @@ -140,7 +140,14 @@ func getToken(c *config.RocketchatConfig) (string, error) { func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) { var err error - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + key, err := notify.ExtractGroupKey(ctx) + if err != nil { + return false, err + } + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") + + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmplText := notify.TmplText(n.tmpl, data, &err) if err != nil { return false, err @@ -152,11 +159,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) title, truncated := notify.TruncateInRunes(title, maxTitleLenRunes) if truncated { - key, err := notify.ExtractGroupKey(ctx) - if err != nil { - return false, err - } - n.logger.Warn("Truncated title", "key", key, "max_runes", maxTitleLenRunes) + logger.Warn("Truncated title", "max_runes", maxTitleLenRunes) } att := &Attachment{ Title: title, diff --git a/vendor/github.com/prometheus/alertmanager/notify/slack/slack.go b/vendor/github.com/prometheus/alertmanager/notify/slack/slack.go index c335ab5f00c..e3ba8d1b69a 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/slack/slack.go +++ b/vendor/github.com/prometheus/alertmanager/notify/slack/slack.go @@ -48,7 +48,7 @@ type Notifier struct { // New returns a new Slack notification handler. func New(c *config.SlackConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "slack", httpOpts...) if err != nil { return nil, err } @@ -70,6 +70,7 @@ type request struct { IconEmoji string `json:"icon_emoji,omitempty"` IconURL string `json:"icon_url,omitempty"` LinkNames bool `json:"link_names,omitempty"` + Text string `json:"text,omitempty"` Attachments []attachment `json:"attachments"` } @@ -93,8 +94,16 @@ type attachment struct { // Notify implements the Notifier interface. func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) { var err error + + key, err := notify.ExtractGroupKey(ctx) + if err != nil { + return false, err + } + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") + var ( - data = notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + data = notify.GetTemplateData(ctx, n.tmpl, as, logger) tmplText = notify.TmplText(n.tmpl, data, &err) ) var markdownIn []string @@ -107,11 +116,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) title, truncated := notify.TruncateInRunes(tmplText(n.conf.Title), maxTitleLenRunes) if truncated { - key, err := notify.ExtractGroupKey(ctx) - if err != nil { - return false, err - } - n.logger.Warn("Truncated title", "key", key, "max_runes", maxTitleLenRunes) + logger.Warn("Truncated title", "max_runes", maxTitleLenRunes) } att := &attachment{ Title: title, @@ -182,6 +187,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) IconEmoji: tmplText(n.conf.IconEmoji), IconURL: tmplText(n.conf.IconURL), LinkNames: n.conf.LinkNames, + Text: tmplText(n.conf.MessageText), Attachments: []attachment{*att}, } if err != nil { @@ -204,8 +210,17 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) u = strings.TrimSpace(string(content)) } + if n.conf.Timeout > 0 { + postCtx, cancel := context.WithTimeoutCause(ctx, n.conf.Timeout, fmt.Errorf("configured slack timeout reached (%s)", n.conf.Timeout)) + defer cancel() + ctx = postCtx + } + resp, err := n.postJSONFunc(ctx, n.client, u, &buf) if err != nil { + if ctx.Err() != nil { + err = fmt.Errorf("%w: %w", err, context.Cause(ctx)) + } return true, notify.RedactURL(err) } defer notify.Drain(resp) diff --git a/vendor/github.com/prometheus/alertmanager/notify/sns/sns.go b/vendor/github.com/prometheus/alertmanager/notify/sns/sns.go index 7a995c32311..80b039b8b1e 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/sns/sns.go +++ b/vendor/github.com/prometheus/alertmanager/notify/sns/sns.go @@ -51,7 +51,7 @@ type Notifier struct { // New returns a new SNS notification handler. func New(c *config.SNSConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "sns", httpOpts...) if err != nil { return nil, err } diff --git a/vendor/github.com/prometheus/alertmanager/notify/telegram/telegram.go b/vendor/github.com/prometheus/alertmanager/notify/telegram/telegram.go index 4c8d0c0e80d..da5ea46a8a2 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/telegram/telegram.go +++ b/vendor/github.com/prometheus/alertmanager/notify/telegram/telegram.go @@ -19,6 +19,7 @@ import ( "log/slog" "net/http" "os" + "strconv" "strings" commoncfg "github.com/prometheus/common/config" @@ -44,7 +45,7 @@ type Notifier struct { // New returns a new Telegram notification handler. func New(conf *config.TelegramConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - httpclient, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "telegram", httpOpts...) + httpclient, err := notify.NewClientWithTracing(*conf.HTTPConfig, "telegram", httpOpts...) if err != nil { return nil, err } @@ -64,9 +65,17 @@ func New(conf *config.TelegramConfig, t *template.Template, l *slog.Logger, http } func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, error) { + key, ok := notify.GroupKey(ctx) + if !ok { + return false, fmt.Errorf("group key missing") + } + + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") + var ( err error - data = notify.GetTemplateData(ctx, n.tmpl, alert, n.logger) + data = notify.GetTemplateData(ctx, n.tmpl, alert, logger) tmpl = notify.TmplText(n.tmpl, data, &err) ) @@ -74,17 +83,12 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err tmpl = notify.TmplHTML(n.tmpl, data, &err) } - key, ok := notify.GroupKey(ctx) - if !ok { - return false, fmt.Errorf("group key missing") - } - messageText, truncated := notify.TruncateInRunes(tmpl(n.conf.Message), maxMessageLenRunes) if err != nil { return false, err } if truncated { - n.logger.Warn("Truncated message", "alert", key, "max_runes", maxMessageLenRunes) + logger.Warn("Truncated message", "max_runes", maxMessageLenRunes) } n.client.Token, err = n.getBotToken() @@ -92,7 +96,12 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err return true, err } - message, err := n.client.Send(telebot.ChatID(n.conf.ChatID), messageText, &telebot.SendOptions{ + chatID, err := n.getChatID() + if err != nil { + return true, err + } + + message, err := n.client.Send(telebot.ChatID(chatID), messageText, &telebot.SendOptions{ DisableNotification: n.conf.DisableNotifications, DisableWebPagePreview: true, ThreadID: n.conf.MessageThreadID, @@ -101,7 +110,7 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err if err != nil { return true, err } - n.logger.Debug("Telegram message successfully published", "message_id", message.ID, "chat_id", message.Chat.ID) + logger.Debug("Telegram message successfully published", "message_id", message.ID, "chat_id", message.Chat.ID) return false, nil } @@ -130,3 +139,18 @@ func (n *Notifier) getBotToken() (string, error) { } return string(n.conf.BotToken), nil } + +func (n *Notifier) getChatID() (int64, error) { + if len(n.conf.ChatIDFile) > 0 { + content, err := os.ReadFile(n.conf.ChatIDFile) + if err != nil { + return 0, fmt.Errorf("could not read %s: %w", n.conf.ChatIDFile, err) + } + chatID, err := strconv.ParseInt(strings.TrimSpace(string(content)), 10, 64) + if err != nil { + return 0, fmt.Errorf("could not parse chat_id from %s: %w", n.conf.ChatIDFile, err) + } + return chatID, nil + } + return n.conf.ChatID, nil +} diff --git a/vendor/github.com/prometheus/alertmanager/notify/util.go b/vendor/github.com/prometheus/alertmanager/notify/util.go index c3c7aa22702..7bef014d210 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/util.go +++ b/vendor/github.com/prometheus/alertmanager/notify/util.go @@ -22,11 +22,14 @@ import ( "log/slog" "net/http" "net/url" + "slices" "strings" + commoncfg "github.com/prometheus/common/config" "github.com/prometheus/common/version" "github.com/prometheus/alertmanager/template" + "github.com/prometheus/alertmanager/tracing" "github.com/prometheus/alertmanager/types" ) @@ -36,6 +39,18 @@ const truncationMarker = "…" // UserAgentHeader is the default User-Agent for notification requests. var UserAgentHeader = version.ComponentUserAgent("Alertmanager") +// NewClientWithTracing creates a new HTTP client with tracing included +// Clients are reused across requests, so tracing is configured once at creation +// rather than on each request. +func NewClientWithTracing(cfg commoncfg.HTTPClientConfig, name string, httpOpts ...commoncfg.HTTPClientOption) (*http.Client, error) { + client, err := commoncfg.NewClientFromConfig(cfg, name, httpOpts...) + if err != nil { + return nil, err + } + client.Transport = tracing.Transport(client.Transport) + return client, nil +} + // RedactURL removes the URL part from an error of *url.Error type. func RedactURL(err error) error { var e *url.Error @@ -74,6 +89,7 @@ func request(ctx context.Context, client *http.Client, method, url, bodyType str if bodyType != "" { req.Header.Set("Content-Type", bodyType) } + return client.Do(req.WithContext(ctx)) } @@ -222,15 +238,7 @@ func (r *Retrier) Check(statusCode int, body io.Reader) (bool, error) { } // 5xx responses are considered to be always retried. - retry := statusCode/100 == 5 - if !retry { - for _, code := range r.RetryCodes { - if code == statusCode { - retry = true - break - } - } - } + retry := statusCode/100 == 5 || slices.Contains(r.RetryCodes, statusCode) s := fmt.Sprintf("unexpected status code %v", statusCode) var details string diff --git a/vendor/github.com/prometheus/alertmanager/notify/victorops/victorops.go b/vendor/github.com/prometheus/alertmanager/notify/victorops/victorops.go index ac89222ece6..746a10b55d5 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/victorops/victorops.go +++ b/vendor/github.com/prometheus/alertmanager/notify/victorops/victorops.go @@ -46,7 +46,7 @@ type Notifier struct { // New returns a new VictorOps notifier. func New(c *config.VictorOpsConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "victorops", httpOpts...) if err != nil { return nil, err } @@ -141,7 +141,7 @@ func (n *Notifier) createVictorOpsPayload(ctx context.Context, as ...*types.Aler stateMessage, truncated := notify.TruncateInRunes(stateMessage, maxMessageLenRunes) if truncated { - n.logger.Warn("Truncated state_message", "incident", key, "max_runes", maxMessageLenRunes) + n.logger.Warn("Truncated state_message", "group_key", key, "max_runes", maxMessageLenRunes) } msg := map[string]string{ diff --git a/vendor/github.com/prometheus/alertmanager/notify/webex/webex.go b/vendor/github.com/prometheus/alertmanager/notify/webex/webex.go index 8ec916dfb6d..922ea543d5d 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/webex/webex.go +++ b/vendor/github.com/prometheus/alertmanager/notify/webex/webex.go @@ -44,7 +44,7 @@ type Notifier struct { // New returns a new Webex notifier. func New(c *config.WebexConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "webex", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "webex", httpOpts...) if err != nil { return nil, err } @@ -72,9 +72,10 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } - n.logger.Debug("extracted group key", "key", key) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmpl := notify.TmplText(n.tmpl, data, &err) if err != nil { return false, err @@ -87,7 +88,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) message, truncated := notify.TruncateInBytes(message, maxMessageSize) if truncated { - n.logger.Debug("message truncated due to exceeding maximum allowed length by webex", "truncated_message", message) + logger.Debug("message truncated due to exceeding maximum allowed length by webex", "truncated_message", message) } w := webhook{ diff --git a/vendor/github.com/prometheus/alertmanager/notify/webhook/webhook.go b/vendor/github.com/prometheus/alertmanager/notify/webhook/webhook.go index 41b9f497dcb..d35e4079819 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/webhook/webhook.go +++ b/vendor/github.com/prometheus/alertmanager/notify/webhook/webhook.go @@ -17,6 +17,7 @@ import ( "bytes" "context" "encoding/json" + "errors" "fmt" "log/slog" "net/http" @@ -42,7 +43,7 @@ type Notifier struct { // New returns a new Webhook. func New(conf *config.WebhookConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", httpOpts...) + client, err := notify.NewClientWithTracing(*conf.HTTPConfig, "webhook", httpOpts...) if err != nil { return nil, err } @@ -82,12 +83,11 @@ func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, er groupKey, err := notify.ExtractGroupKey(ctx) if err != nil { - // @tjhop: should we `return false, err` here as we do in most - // other Notify() implementations? - n.logger.Error("error extracting group key", "err", err) + return false, err } - // @tjhop: should we debug log the key here like most other Notify() implementations? + logger := n.logger.With("group_key", groupKey) + logger.Debug("extracted group key") msg := &Message{ Version: "4", @@ -102,14 +102,25 @@ func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, er } var url string - if n.conf.URL != nil { - url = n.conf.URL.String() + var tmplErr error + tmpl := notify.TmplText(n.tmpl, data, &tmplErr) + + if n.conf.URL != "" { + url = tmpl(string(n.conf.URL)) } else { content, err := os.ReadFile(n.conf.URLFile) if err != nil { return false, fmt.Errorf("read url_file: %w", err) } - url = strings.TrimSpace(string(content)) + url = tmpl(strings.TrimSpace(string(content))) + } + + if tmplErr != nil { + return false, fmt.Errorf("failed to template webhook URL: %w", tmplErr) + } + + if url == "" { + return false, errors.New("webhook URL is empty after templating") } if n.conf.Timeout > 0 { diff --git a/vendor/github.com/prometheus/alertmanager/notify/wechat/wechat.go b/vendor/github.com/prometheus/alertmanager/notify/wechat/wechat.go index 4aab58ca30c..35d418931de 100644 --- a/vendor/github.com/prometheus/alertmanager/notify/wechat/wechat.go +++ b/vendor/github.com/prometheus/alertmanager/notify/wechat/wechat.go @@ -23,6 +23,8 @@ import ( "log/slog" "net/http" "net/url" + "os" + "strings" "time" commoncfg "github.com/prometheus/common/config" @@ -71,7 +73,7 @@ type weChatResponse struct { // New returns a new Wechat notifier. func New(c *config.WechatConfig, t *template.Template, l *slog.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", httpOpts...) + client, err := notify.NewClientWithTracing(*c.HTTPConfig, "wechat", httpOpts...) if err != nil { return nil, err } @@ -86,8 +88,10 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } - n.logger.Debug("extracted group key", "key", key) - data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger) + logger := n.logger.With("group_key", key) + logger.Debug("extracted group key") + + data := notify.GetTemplateData(ctx, n.tmpl, as, logger) tmpl := notify.TmplText(n.tmpl, data, &err) if err != nil { @@ -97,7 +101,11 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) // Refresh AccessToken over 2 hours if n.accessToken == "" || time.Since(n.accessTokenAt) > 2*time.Hour { parameters := url.Values{} - parameters.Add("corpsecret", tmpl(string(n.conf.APISecret))) + apiSecret, err := n.getApiSecret() + if err != nil { + return false, err + } + parameters.Add("corpsecret", tmpl(apiSecret)) parameters.Add("corpid", tmpl(string(n.conf.CorpID))) if err != nil { return false, fmt.Errorf("templating error: %w", err) @@ -174,7 +182,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) if err != nil { return true, err } - n.logger.Debug(string(body), "incident", key) + logger.Debug(string(body)) var weResp weChatResponse if err := json.Unmarshal(body, &weResp); err != nil { @@ -194,3 +202,14 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, errors.New(weResp.Error) } + +func (n *Notifier) getApiSecret() (string, error) { + if len(n.conf.APISecretFile) > 0 { + content, err := os.ReadFile(n.conf.APISecretFile) + if err != nil { + return "", err + } + return strings.TrimSpace(string(content)), nil + } + return string(n.conf.APISecret), nil +} diff --git a/vendor/github.com/prometheus/alertmanager/pkg/labels/parse.go b/vendor/github.com/prometheus/alertmanager/pkg/labels/parse.go index f84b29e84b1..13360174c90 100644 --- a/vendor/github.com/prometheus/alertmanager/pkg/labels/parse.go +++ b/vendor/github.com/prometheus/alertmanager/pkg/labels/parse.go @@ -127,8 +127,8 @@ func ParseMatcher(s string) (_ *Matcher, err error) { expectTrailingQuote bool ) - if strings.HasPrefix(rawValue, "\"") { - rawValue = strings.TrimPrefix(rawValue, "\"") + if after, ok := strings.CutPrefix(rawValue, "\""); ok { + rawValue = after expectTrailingQuote = true } diff --git a/vendor/github.com/prometheus/alertmanager/provider/mem/mem.go b/vendor/github.com/prometheus/alertmanager/provider/mem/mem.go index 3948697d845..fb7294c661a 100644 --- a/vendor/github.com/prometheus/alertmanager/provider/mem/mem.go +++ b/vendor/github.com/prometheus/alertmanager/provider/mem/mem.go @@ -1,4 +1,4 @@ -// Copyright 2016 Prometheus Team +// Copyright The Prometheus 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 @@ -15,13 +15,20 @@ package mem import ( "context" + "errors" "log/slog" "sync" "time" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" + "github.com/prometheus/alertmanager/featurecontrol" "github.com/prometheus/alertmanager/provider" "github.com/prometheus/alertmanager/store" "github.com/prometheus/alertmanager/types" @@ -29,6 +36,8 @@ import ( const alertChannelLength = 200 +var tracer = otel.Tracer("github.com/prometheus/alertmanager/provider/mem") + // Alerts gives access to a set of alerts. All methods are goroutine-safe. type Alerts struct { cancel context.CancelFunc @@ -43,7 +52,13 @@ type Alerts struct { callback AlertStoreCallback - logger *slog.Logger + logger *slog.Logger + propagator propagation.TextMapPropagator + flagger featurecontrol.Flagger + + alertsLimit prometheus.Gauge + alertsLimitedTotal *prometheus.CounterVec + subscriberChannelWrites *prometheus.CounterVec } type AlertStoreCallback interface { @@ -61,48 +76,79 @@ type AlertStoreCallback interface { } type listeningAlerts struct { - alerts chan *types.Alert + name string + alerts chan *provider.Alert done chan struct{} } func (a *Alerts) registerMetrics(r prometheus.Registerer) { - newMemAlertByStatus := func(s types.AlertState) prometheus.GaugeFunc { - return prometheus.NewGaugeFunc( - prometheus.GaugeOpts{ - Name: "alertmanager_alerts", - Help: "How many alerts by state.", - ConstLabels: prometheus.Labels{"state": string(s)}, - }, - func() float64 { - return float64(a.count(s)) - }, - ) + r.MustRegister(&alertsCollector{alerts: a}) + + a.alertsLimit = promauto.With(r).NewGauge(prometheus.GaugeOpts{ + Name: "alertmanager_alerts_per_alert_limit", + Help: "Current limit on number of alerts per alert name", + }) + + labels := []string{} + if a.flagger.EnableAlertNamesInMetrics() { + labels = append(labels, "alertname") } + a.alertsLimitedTotal = promauto.With(r).NewCounterVec( + prometheus.CounterOpts{ + Name: "alertmanager_alerts_limited_total", + Help: "Total number of alerts that were dropped due to per alert name limit", + }, + labels, + ) - r.MustRegister(newMemAlertByStatus(types.AlertStateActive)) - r.MustRegister(newMemAlertByStatus(types.AlertStateSuppressed)) - r.MustRegister(newMemAlertByStatus(types.AlertStateUnprocessed)) + a.subscriberChannelWrites = promauto.With(r).NewCounterVec( + prometheus.CounterOpts{ + Name: "alertmanager_alerts_subscriber_channel_writes_total", + Help: "Number of times alerts were written to subscriber channels", + }, + []string{"subscriber"}, + ) } // NewAlerts returns a new alert provider. -func NewAlerts(ctx context.Context, m types.AlertMarker, intervalGC time.Duration, alertCallback AlertStoreCallback, l *slog.Logger, r prometheus.Registerer) (*Alerts, error) { +func NewAlerts( + ctx context.Context, + m types.AlertMarker, + intervalGC time.Duration, + perAlertNameLimit int, + alertCallback AlertStoreCallback, + l *slog.Logger, + r prometheus.Registerer, + flagger featurecontrol.Flagger, +) (*Alerts, error) { if alertCallback == nil { alertCallback = noopCallback{} } + if perAlertNameLimit > 0 { + l.Info("per alert name limit enabled", "limit", perAlertNameLimit) + } + + if flagger == nil { + flagger = featurecontrol.NoopFlags{} + } + ctx, cancel := context.WithCancel(ctx) a := &Alerts{ - marker: m, - alerts: store.NewAlerts(), - cancel: cancel, - listeners: map[int]listeningAlerts{}, - next: 0, - logger: l.With("component", "provider"), - callback: alertCallback, + marker: m, + alerts: store.NewAlerts().WithPerAlertLimit(perAlertNameLimit), + cancel: cancel, + listeners: map[int]listeningAlerts{}, + next: 0, + logger: l.With("component", "provider"), + propagator: otel.GetTextMapPropagator(), + callback: alertCallback, + flagger: flagger, } if r != nil { a.registerMetrics(r) + a.alertsLimit.Set(float64(perAlertNameLimit)) } go a.gcLoop(ctx, intervalGC) @@ -154,40 +200,52 @@ func (a *Alerts) Close() { } } -func max(a, b int) int { - if a > b { - return a - } - return b -} - // Subscribe returns an iterator over active alerts that have not been // resolved and successfully notified about. // They are not guaranteed to be in chronological order. -func (a *Alerts) Subscribe() provider.AlertIterator { +func (a *Alerts) Subscribe(name string) provider.AlertIterator { a.mtx.Lock() defer a.mtx.Unlock() var ( done = make(chan struct{}) alerts = a.alerts.List() - ch = make(chan *types.Alert, max(len(alerts), alertChannelLength)) + ch = make(chan *provider.Alert, max(len(alerts), alertChannelLength)) ) for _, a := range alerts { - ch <- a + ch <- &provider.Alert{ + Header: map[string]string{}, + Data: a, + } } - a.listeners[a.next] = listeningAlerts{alerts: ch, done: done} + a.listeners[a.next] = listeningAlerts{name: name, alerts: ch, done: done} a.next++ return provider.NewAlertIterator(ch, done, nil) } +func (a *Alerts) SlurpAndSubscribe(name string) ([]*types.Alert, provider.AlertIterator) { + a.mtx.Lock() + defer a.mtx.Unlock() + + var ( + done = make(chan struct{}) + alerts = a.alerts.List() + ch = make(chan *provider.Alert, alertChannelLength) + ) + + a.listeners[a.next] = listeningAlerts{name: name, alerts: ch, done: done} + a.next++ + + return alerts, provider.NewAlertIterator(ch, done, nil) +} + // GetPending returns an iterator over all the alerts that have // pending notifications. func (a *Alerts) GetPending() provider.AlertIterator { var ( - ch = make(chan *types.Alert, alertChannelLength) + ch = make(chan *provider.Alert, alertChannelLength) done = make(chan struct{}) ) a.mtx.Lock() @@ -198,7 +256,10 @@ func (a *Alerts) GetPending() provider.AlertIterator { defer close(ch) for _, a := range alerts { select { - case ch <- a: + case ch <- &provider.Alert{ + Header: map[string]string{}, + Data: a, + }: case <-done: return } @@ -216,10 +277,18 @@ func (a *Alerts) Get(fp model.Fingerprint) (*types.Alert, error) { } // Put adds the given alert to the set. -func (a *Alerts) Put(alerts ...*types.Alert) error { +func (a *Alerts) Put(ctx context.Context, alerts ...*types.Alert) error { a.mtx.Lock() defer a.mtx.Unlock() + ctx, span := tracer.Start(ctx, "provider.mem.Put", + trace.WithAttributes( + attribute.Int("alerting.alerts.count", len(alerts)), + ), + trace.WithSpanKind(trace.SpanKindProducer), + ) + defer span.End() + for _, alert := range alerts { fp := alert.Fingerprint() @@ -243,15 +312,30 @@ func (a *Alerts) Put(alerts ...*types.Alert) error { } if err := a.alerts.Set(alert); err != nil { - a.logger.Error("error on set alert", "err", err) + a.logger.Warn("error on set alert", "alertname", alert.Name(), "err", err) + if errors.Is(err, store.ErrLimited) { + labels := []string{} + if a.flagger.EnableAlertNamesInMetrics() { + labels = append(labels, alert.Name()) + } + a.alertsLimitedTotal.WithLabelValues(labels...).Inc() + } continue } a.callback.PostStore(alert, existing) + metadata := map[string]string{} + a.propagator.Inject(ctx, propagation.MapCarrier(metadata)) + msg := &provider.Alert{ + Data: alert, + Header: metadata, + } + for _, l := range a.listeners { select { - case l.alerts <- alert: + case l.alerts <- msg: + a.subscriberChannelWrites.WithLabelValues(l.name).Inc() case <-l.done: } } @@ -260,26 +344,46 @@ func (a *Alerts) Put(alerts ...*types.Alert) error { return nil } -// count returns the number of non-resolved alerts we currently have stored filtered by the provided state. -func (a *Alerts) count(state types.AlertState) int { - a.mtx.Lock() - defer a.mtx.Unlock() - - var count int +// countByState returns the number of non-resolved alerts by state. +func (a *Alerts) countByState() (active, suppressed, unprocessed int) { for _, alert := range a.alerts.List() { if alert.Resolved() { continue } - status := a.marker.Status(alert.Fingerprint()) - if status.State != state { - continue + switch a.marker.Status(alert.Fingerprint()).State { + case types.AlertStateActive: + active++ + case types.AlertStateSuppressed: + suppressed++ + case types.AlertStateUnprocessed: + unprocessed++ } - - count++ } + return active, suppressed, unprocessed +} + +// alertsCollector implements prometheus.Collector to collect all alert count metrics in a single pass. +type alertsCollector struct { + alerts *Alerts +} + +var alertsDesc = prometheus.NewDesc( + "alertmanager_alerts", + "How many alerts by state.", + []string{"state"}, nil, +) + +func (c *alertsCollector) Describe(ch chan<- *prometheus.Desc) { + ch <- alertsDesc +} + +func (c *alertsCollector) Collect(ch chan<- prometheus.Metric) { + active, suppressed, unprocessed := c.alerts.countByState() - return count + ch <- prometheus.MustNewConstMetric(alertsDesc, prometheus.GaugeValue, float64(active), string(types.AlertStateActive)) + ch <- prometheus.MustNewConstMetric(alertsDesc, prometheus.GaugeValue, float64(suppressed), string(types.AlertStateSuppressed)) + ch <- prometheus.MustNewConstMetric(alertsDesc, prometheus.GaugeValue, float64(unprocessed), string(types.AlertStateUnprocessed)) } type noopCallback struct{} diff --git a/vendor/github.com/prometheus/alertmanager/provider/provider.go b/vendor/github.com/prometheus/alertmanager/provider/provider.go index 4d1f76f2069..dcc40f89fed 100644 --- a/vendor/github.com/prometheus/alertmanager/provider/provider.go +++ b/vendor/github.com/prometheus/alertmanager/provider/provider.go @@ -14,6 +14,7 @@ package provider import ( + "context" "fmt" "github.com/prometheus/common/model" @@ -24,6 +25,12 @@ import ( // ErrNotFound is returned if a provider cannot find a requested item. var ErrNotFound = fmt.Errorf("item not found") +type Alert struct { + // Header contains metadata, for example propagated tracing information. + Header map[string]string + Data *types.Alert +} + // Iterator provides the functions common to all iterators. To be useful, a // specific iterator interface (e.g. AlertIterator) has to be implemented that // provides a Next method. @@ -44,11 +51,11 @@ type AlertIterator interface { // exhausted. It is not necessary to exhaust the iterator but Close must // be called in any case to release resources used by the iterator (even // if the iterator is exhausted). - Next() <-chan *types.Alert + Next() <-chan *Alert } // NewAlertIterator returns a new AlertIterator based on the generic alertIterator type. -func NewAlertIterator(ch <-chan *types.Alert, done chan struct{}, err error) AlertIterator { +func NewAlertIterator(ch <-chan *Alert, done chan struct{}, err error) AlertIterator { return &alertIterator{ ch: ch, done: done, @@ -58,12 +65,12 @@ func NewAlertIterator(ch <-chan *types.Alert, done chan struct{}, err error) Ale // alertIterator implements AlertIterator. So far, this one fits all providers. type alertIterator struct { - ch <-chan *types.Alert + ch <-chan *Alert done chan struct{} err error } -func (ai alertIterator) Next() <-chan *types.Alert { +func (ai alertIterator) Next() <-chan *Alert { return ai.ch } @@ -75,12 +82,24 @@ type Alerts interface { // Subscribe returns an iterator over active alerts that have not been // resolved and successfully notified about. // They are not guaranteed to be in chronological order. - Subscribe() AlertIterator + Subscribe(name string) AlertIterator + + // SlurpAndSubcribe returns a list of all active alerts which are available + // in the provider before the call to SlurpAndSubcribe and an iterator + // of all alerts available after the call to SlurpAndSubcribe. + // SlurpAndSubcribe can be used by clients which need to build in memory state + // to know when they've processed the 'initial' batch of alerts in a provider + // after they reload their subscription. + // Implementation of SlurpAndSubcribe is optional - providers may choose to + // return an empty list for the first return value and the result of Subscribe + // for the second return value. + SlurpAndSubscribe(name string) ([]*types.Alert, AlertIterator) + // GetPending returns an iterator over all alerts that have // pending notifications. GetPending() AlertIterator // Get returns the alert for a given fingerprint. Get(model.Fingerprint) (*types.Alert, error) // Put adds the given set of alerts to the set. - Put(...*types.Alert) error + Put(ctx context.Context, alerts ...*types.Alert) error } diff --git a/vendor/github.com/prometheus/alertmanager/silence/silence.go b/vendor/github.com/prometheus/alertmanager/silence/silence.go index 8d1b341a1f5..bdf2b49dbaf 100644 --- a/vendor/github.com/prometheus/alertmanager/silence/silence.go +++ b/vendor/github.com/prometheus/alertmanager/silence/silence.go @@ -17,6 +17,7 @@ package silence import ( "bytes" + "context" "errors" "fmt" "io" @@ -25,16 +26,22 @@ import ( "os" "reflect" "regexp" + "slices" "sort" "sync" "time" "github.com/coder/quartz" - uuid "github.com/gofrs/uuid" + uuid "github.com/google/uuid" "github.com/matttproud/golang_protobuf_extensions/pbutil" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" "github.com/prometheus/common/promslog" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" "github.com/prometheus/alertmanager/cluster" "github.com/prometheus/alertmanager/matcher/compat" @@ -43,27 +50,27 @@ import ( "github.com/prometheus/alertmanager/types" ) +var tracer = otel.Tracer("github.com/prometheus/alertmanager/silence") + // ErrNotFound is returned if a silence was not found. var ErrNotFound = errors.New("silence not found") // ErrInvalidState is returned if the state isn't valid. var ErrInvalidState = errors.New("invalid state") -type matcherCache map[string]labels.Matchers +type matcherIndex map[string]labels.Matchers -// Get retrieves the matchers for a given silence. If it is a missed cache -// access, it compiles and adds the matchers of the requested silence to the -// cache. -func (c matcherCache) Get(s *pb.Silence) (labels.Matchers, error) { +// get retrieves the matchers for a given silence. +func (c matcherIndex) get(s *pb.Silence) (labels.Matchers, error) { if m, ok := c[s.Id]; ok { return m, nil } - return c.add(s) + return nil, ErrNotFound } // add compiles a silences' matchers and adds them to the cache. // It returns the compiled matchers. -func (c matcherCache) add(s *pb.Silence) (labels.Matchers, error) { +func (c matcherIndex) add(s *pb.Silence) (labels.Matchers, error) { ms := make(labels.Matchers, len(s.Matchers)) for i, m := range s.Matchers { @@ -92,6 +99,39 @@ func (c matcherCache) add(s *pb.Silence) (labels.Matchers, error) { return ms, nil } +// silenceVersion associates a silence with the Silences version when it was created. +type silenceVersion struct { + id string + version int +} + +// versionIndex is a index into Silences ordered by the version of Silences when the +// silence was created. The index is always sorted from lowest to highest version. +// +// The versionIndex allows clients of Silences.Query to incrementally update local caches +// of query results. Instead of a new version requiring the client to scan everything +// again to get an up-to-date picture of Silences, they can use the versionIndex to figure +// out which silences have been added since the last version they saw. This means they can +// just scan the NEW silences, rather than all of them. +type versionIndex []silenceVersion + +// add pushes a new silenceVersionMapping to the back of the silenceVersionIndex. It does not +// validate the input. +func (s *versionIndex) add(version int, sil string) { + *s = append(*s, silenceVersion{version: version, id: sil}) +} + +// findVersionGreaterThan uses a log(n) search to find the first index of the versionIndex +// which has a version higher than version. If any entries with a higher version exist, +// it returns true and the starting index (which is guaranteed to be a valid index into +// the slice). Otherwise it returns false. +func (s versionIndex) findVersionGreaterThan(version int) (index int, found bool) { + startIdx := sort.Search(len(s), func(i int) bool { + return s[i].version > version + }) + return startIdx, startIdx < len(s) +} + // Silencer binds together a AlertMarker and a Silences to implement the Muter // interface. type Silencer struct { @@ -110,71 +150,120 @@ func NewSilencer(s *Silences, m types.AlertMarker, l *slog.Logger) *Silencer { } // Mutes implements the Muter interface. -func (s *Silencer) Mutes(lset model.LabelSet) bool { +func (s *Silencer) Mutes(ctx context.Context, lset model.LabelSet) bool { fp := lset.Fingerprint() activeIDs, pendingIDs, markerVersion, _ := s.marker.Silenced(fp) + ctx, span := tracer.Start(ctx, "silence.Silencer.Mutes", + trace.WithAttributes( + attribute.String("alerting.alert.fingerprint", fp.String()), + ), + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + var ( - err error - allSils []*pb.Silence + oldSils []*pb.Silence + newSils []*pb.Silence newVersion = markerVersion ) - if markerVersion == s.silences.Version() { - totalSilences := len(activeIDs) + len(pendingIDs) - // No new silences added, just need to check which of the old - // silences are still relevant and which of the pending ones - // have become active. - if totalSilences == 0 { - // Super fast path: No silences ever applied to this - // alert, none have been added. We are done. - return false - } - // This is still a quite fast path: No silences have been added, - // we only need to check which of the applicable silences are - // currently active. Note that newVersion is left at - // markerVersion because the Query call might already return a - // newer version, which is not the version our old list of - // applicable silences is based on. - allIDs := append(append(make([]string, 0, totalSilences), activeIDs...), pendingIDs...) - allSils, _, err = s.silences.Query( + totalMarkerSilences := len(activeIDs) + len(pendingIDs) + markerIsUpToDate := markerVersion == s.silences.Version() + + if markerIsUpToDate && totalMarkerSilences == 0 { + // Very fast path: no new silences have been added and this lset was not + // silenced last time we checked. + span.AddEvent("No new silences to match since last check", + trace.WithAttributes( + attribute.Int("alerting.silences.count", totalMarkerSilences), + ), + ) + return false + } + // Either there are new silences and we need to check if those match lset or there were + // silences last time we queried so we need to see if those are still active/have become + // active. It's possible for there to be both old and new silences. + + if totalMarkerSilences > 0 { + // there were old silences for this lset, we need to find them to check if they + // are still active/pending, or have ended. + var err error + allIDs := append(append(make([]string, 0, totalMarkerSilences), activeIDs...), pendingIDs...) + oldSils, _, err = s.silences.Query( + ctx, QIDs(allIDs...), QState(types.SilenceStateActive, types.SilenceStatePending), ) - } else { - // New silences have been added, do a full query. - allSils, newVersion, err = s.silences.Query( + if err != nil { + span.SetStatus(codes.Error, err.Error()) + span.RecordError(err) + s.logger.Error( + "Querying old silences failed, alerts might not get silenced correctly", + "err", err, + ) + } + } + + if !markerIsUpToDate { + // New silences have been added since the last time the marker was updated. Do a full + // query for any silences newer than the markerVersion that match the lset. + // On this branch we WILL update newVersion since we can be sure we've seen any silences + // newer than markerVersion. + var err error + newSils, newVersion, err = s.silences.Query( + ctx, + QSince(markerVersion), QState(types.SilenceStateActive, types.SilenceStatePending), QMatches(lset), ) + if err != nil { + span.SetStatus(codes.Error, err.Error()) + span.RecordError(err) + s.logger.Error( + "Querying silences failed, alerts might not get silenced correctly", + "err", err, + ) + } } - if err != nil { - s.logger.Error("Querying silences failed, alerts might not get silenced correctly", "err", err) - } - if len(allSils) == 0 { + // Note: if markerIsUpToDate, newVersion is left at markerVersion because the Query call + // might already return a newer version, which is not the version our old list of + // applicable silences is based on. + + totalSilences := len(oldSils) + len(newSils) + if totalSilences == 0 { // Easy case, neither active nor pending silences anymore. s.marker.SetActiveOrSilenced(fp, newVersion, nil, nil) + span.AddEvent("No silences to match", trace.WithAttributes( + attribute.Int("alerting.silences.count", totalSilences), + )) return false } + // It is still possible that nothing has changed, but finding out is not // much less effort than just recreating the IDs from the query // result. So let's do it in any case. Note that we cannot reuse the // current ID slices for concurrency reasons. - activeIDs, pendingIDs = nil, nil + activeIDs = make([]string, 0, totalSilences) + pendingIDs = make([]string, 0, totalSilences) now := s.silences.nowUTC() - for _, sil := range allSils { - switch getState(sil, now) { - case types.SilenceStatePending: - pendingIDs = append(pendingIDs, sil.Id) - case types.SilenceStateActive: - activeIDs = append(activeIDs, sil.Id) - default: - // Do nothing, silence has expired in the meantime. + + // Categorize old and new silences by their current state + for _, sils := range [...][]*pb.Silence{oldSils, newSils} { + for _, sil := range sils { + switch getState(sil, now) { + case types.SilenceStatePending: + pendingIDs = append(pendingIDs, sil.Id) + case types.SilenceStateActive: + activeIDs = append(activeIDs, sil.Id) + default: + // Do nothing, silence has expired in the meantime. + } } } s.logger.Debug( "determined current silences state", "now", now, - "total", len(allSils), + "total", totalSilences, "active", len(activeIDs), "pending", len(pendingIDs), ) @@ -182,8 +271,12 @@ func (s *Silencer) Mutes(lset model.LabelSet) bool { sort.Strings(pendingIDs) s.marker.SetActiveOrSilenced(fp, newVersion, activeIDs, pendingIDs) - - return len(activeIDs) > 0 + mutes := len(activeIDs) > 0 + span.AddEvent("Silencer mutes alert", trace.WithAttributes( + attribute.Int("alerting.silences.active.count", len(activeIDs)), + attribute.Int("alerting.silences.pending.count", len(pendingIDs)), + )) + return mutes } // Silences holds a silence state that can be modified, queried, and snapshot. @@ -199,7 +292,8 @@ type Silences struct { st state version int // Increments whenever silences are added. broadcast func([]byte) - mc matcherCache + mi matcherIndex + vi versionIndex } // Limits contains the limits for silences. @@ -217,29 +311,37 @@ type Limits struct { type MaintenanceFunc func() (int64, error) type metrics struct { - gcDuration prometheus.Summary - snapshotDuration prometheus.Summary - snapshotSize prometheus.Gauge - queriesTotal prometheus.Counter - queryErrorsTotal prometheus.Counter - queryDuration prometheus.Histogram - silencesActive prometheus.GaugeFunc - silencesPending prometheus.GaugeFunc - silencesExpired prometheus.GaugeFunc - propagatedMessagesTotal prometheus.Counter - maintenanceTotal prometheus.Counter - maintenanceErrorsTotal prometheus.Counter + gcDuration prometheus.Summary + gcErrorsTotal prometheus.Counter + snapshotDuration prometheus.Summary + snapshotSize prometheus.Gauge + queriesTotal prometheus.Counter + queryErrorsTotal prometheus.Counter + queryDuration prometheus.Histogram + queryScannedTotal prometheus.Counter + querySkippedTotal prometheus.Counter + silencesActive prometheus.GaugeFunc + silencesPending prometheus.GaugeFunc + silencesExpired prometheus.GaugeFunc + stateSize prometheus.Gauge + matcherIndexSize prometheus.Gauge + versionIndexSize prometheus.Gauge + propagatedMessagesTotal prometheus.Counter + maintenanceTotal prometheus.Counter + maintenanceErrorsTotal prometheus.Counter + matcherCompileIndexSilenceErrorsTotal prometheus.Counter + matcherCompileLoadSnapshotErrorsTotal prometheus.Counter } -func newSilenceMetricByState(s *Silences, st types.SilenceState) prometheus.GaugeFunc { - return prometheus.NewGaugeFunc( +func newSilenceMetricByState(r prometheus.Registerer, s *Silences, st types.SilenceState) prometheus.GaugeFunc { + return promauto.With(r).NewGaugeFunc( prometheus.GaugeOpts{ Name: "alertmanager_silences", Help: "How many silences by state.", ConstLabels: prometheus.Labels{"state": string(st)}, }, func() float64 { - count, err := s.CountState(st) + count, err := s.CountState(context.Background(), st) if err != nil { s.logger.Error("Counting silences failed", "err", err) } @@ -251,37 +353,50 @@ func newSilenceMetricByState(s *Silences, st types.SilenceState) prometheus.Gaug func newMetrics(r prometheus.Registerer, s *Silences) *metrics { m := &metrics{} - m.gcDuration = prometheus.NewSummary(prometheus.SummaryOpts{ + m.gcDuration = promauto.With(r).NewSummary(prometheus.SummaryOpts{ Name: "alertmanager_silences_gc_duration_seconds", Help: "Duration of the last silence garbage collection cycle.", Objectives: map[float64]float64{}, }) - m.snapshotDuration = prometheus.NewSummary(prometheus.SummaryOpts{ + m.gcErrorsTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ + Name: "alertmanager_silences_gc_errors_total", + Help: "How many silence GC errors were encountered.", + }) + m.snapshotDuration = promauto.With(r).NewSummary(prometheus.SummaryOpts{ Name: "alertmanager_silences_snapshot_duration_seconds", Help: "Duration of the last silence snapshot.", Objectives: map[float64]float64{}, }) - m.snapshotSize = prometheus.NewGauge(prometheus.GaugeOpts{ + m.snapshotSize = promauto.With(r).NewGauge(prometheus.GaugeOpts{ Name: "alertmanager_silences_snapshot_size_bytes", Help: "Size of the last silence snapshot in bytes.", }) - m.maintenanceTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.maintenanceTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_silences_maintenance_total", Help: "How many maintenances were executed for silences.", }) - m.maintenanceErrorsTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.maintenanceErrorsTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_silences_maintenance_errors_total", Help: "How many maintenances were executed for silences that failed.", }) - m.queriesTotal = prometheus.NewCounter(prometheus.CounterOpts{ + matcherCompileErrorsTotal := promauto.With(r).NewCounterVec( + prometheus.CounterOpts{ + Name: "alertmanager_silences_matcher_compile_errors_total", + Help: "How many silence matcher compilations failed.", + }, + []string{"stage"}, + ) + m.matcherCompileIndexSilenceErrorsTotal = matcherCompileErrorsTotal.WithLabelValues("index") + m.matcherCompileLoadSnapshotErrorsTotal = matcherCompileErrorsTotal.WithLabelValues("load_snapshot") + m.queriesTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_silences_queries_total", Help: "How many silence queries were received.", }) - m.queryErrorsTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.queryErrorsTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_silences_query_errors_total", Help: "How many silence received queries did not succeed.", }) - m.queryDuration = prometheus.NewHistogram(prometheus.HistogramOpts{ + m.queryDuration = promauto.With(r).NewHistogram(prometheus.HistogramOpts{ Name: "alertmanager_silences_query_duration_seconds", Help: "Duration of silence query evaluation.", Buckets: prometheus.DefBuckets, @@ -289,32 +404,36 @@ func newMetrics(r prometheus.Registerer, s *Silences) *metrics { NativeHistogramMaxBucketNumber: 100, NativeHistogramMinResetDuration: 1 * time.Hour, }) - m.propagatedMessagesTotal = prometheus.NewCounter(prometheus.CounterOpts{ + m.queryScannedTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ + Name: "alertmanager_silences_query_silences_scanned_total", + Help: "How many silences were scanned during query evaluation.", + }) + m.querySkippedTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ + Name: "alertmanager_silences_query_silences_skipped_total", + Help: "How many silences were skipped during query evaluation using the version index.", + }) + m.propagatedMessagesTotal = promauto.With(r).NewCounter(prometheus.CounterOpts{ Name: "alertmanager_silences_gossip_messages_propagated_total", Help: "Number of received gossip messages that have been further gossiped.", }) if s != nil { - m.silencesActive = newSilenceMetricByState(s, types.SilenceStateActive) - m.silencesPending = newSilenceMetricByState(s, types.SilenceStatePending) - m.silencesExpired = newSilenceMetricByState(s, types.SilenceStateExpired) - } - - if r != nil { - r.MustRegister( - m.gcDuration, - m.snapshotDuration, - m.snapshotSize, - m.queriesTotal, - m.queryErrorsTotal, - m.queryDuration, - m.silencesActive, - m.silencesPending, - m.silencesExpired, - m.propagatedMessagesTotal, - m.maintenanceTotal, - m.maintenanceErrorsTotal, - ) + m.silencesActive = newSilenceMetricByState(r, s, types.SilenceStateActive) + m.silencesPending = newSilenceMetricByState(r, s, types.SilenceStatePending) + m.silencesExpired = newSilenceMetricByState(r, s, types.SilenceStateExpired) + m.stateSize = promauto.With(r).NewGauge(prometheus.GaugeOpts{ + Name: "alertmanager_silences_state_size", + Help: "The number of silences in the state map.", + }) + m.matcherIndexSize = promauto.With(r).NewGauge(prometheus.GaugeOpts{ + Name: "alertmanager_silences_matcher_index_size", + Help: "The number of entries in the matcher cache index.", + }) + m.versionIndexSize = promauto.With(r).NewGauge(prometheus.GaugeOpts{ + Name: "alertmanager_silences_version_index_size", + Help: "The number of entries in the version index.", + }) } + return m } @@ -351,13 +470,17 @@ func New(o Options) (*Silences, error) { s := &Silences{ clock: quartz.NewReal(), - mc: matcherCache{}, + mi: make(matcherIndex, 512), + vi: make(versionIndex, 0, 512), logger: promslog.NewNopLogger(), retention: o.Retention, limits: o.Limits, broadcast: func([]byte) {}, st: state{}, } + if o.Metrics == nil { + return nil, errors.New("Options.Metrics is nil") + } s.metrics = newMetrics(o.Metrics, s) if o.Logger != nil { @@ -388,6 +511,16 @@ func (s *Silences) nowUTC() time.Time { return s.clock.Now().UTC() } +// updateSizeMetrics updates the size metrics for state, matcher index, and version index. +// Must be called while holding s.mtx. +func (s *Silences) updateSizeMetrics() { + if s.metrics != nil && s.metrics.stateSize != nil { + s.metrics.stateSize.Set(float64(len(s.st))) + s.metrics.matcherIndexSize.Set(float64(len(s.mi))) + s.metrics.versionIndexSize.Set(float64(len(s.vi))) + } +} + // Maintenance garbage collects the silence state at the given interval. If the snapshot // file is set, a snapshot is written to it afterwards. // Terminates on receiving from stopc. @@ -446,8 +579,7 @@ Loop: break Loop case <-t.C: if err := runMaintenance(doMaintenance); err != nil { - // @tjhop: this should probably log at error level - s.logger.Info("Running maintenance failed", "err", err) + s.logger.Error("Running maintenance failed", "err", err) } } } @@ -457,8 +589,7 @@ Loop: return } if err := runMaintenance(doMaintenance); err != nil { - // @tjhop: this should probably log at error level - s.logger.Info("Creating shutdown snapshot failed", "err", err) + s.logger.Error("Creating shutdown snapshot failed", "err", err) } } @@ -470,22 +601,60 @@ func (s *Silences) GC() (int, error) { now := s.nowUTC() var n int + var errs error s.mtx.Lock() defer s.mtx.Unlock() - for id, sil := range s.st { + // During GC we will delete expired silences from the state map and the indices. + // If between the last GC's deletion, and including any silences that were added + // until now, we have more than 50% spare capacity, we want to reallocate to a smaller + // slice, while still leaving some growth buffer. + needsRealloc := cap(s.vi) > 1024 && len(s.vi) < cap(s.vi)/2 + + var targetVi versionIndex + if needsRealloc { + // Allocate new slice with growth buffer. + newCap := max(len(s.vi)*5/4, 1024) + targetVi = make(versionIndex, 0, newCap) + } else { + targetVi = s.vi[:0] + } + + // Iterate state map directly (fast - no extra lookups). + for _, sv := range s.vi { + sil, ok := s.st[sv.id] + expire := false + if !ok { + // Silence in version index but not in state - remove from version index and count error + s.metrics.gcErrorsTotal.Inc() + errs = errors.Join(errs, fmt.Errorf("silence %s in version index missing from state", sv.id)) + // not adding to targetVi effectively removes it + continue + } if sil.ExpiresAt.IsZero() { - return n, errors.New("unexpected zero expiration timestamp") + // Invalid expiration timestamp - remove silence and count error + s.metrics.gcErrorsTotal.Inc() + errs = errors.Join(errs, fmt.Errorf("silence %s has zero expiration timestamp", sil.Silence.Id)) + expire = true } - if !sil.ExpiresAt.After(now) { - delete(s.st, id) - delete(s.mc, sil.Silence.Id) + if expire || !sil.ExpiresAt.After(now) { + delete(s.st, sil.Silence.Id) + delete(s.mi, sil.Silence.Id) n++ + } else { + targetVi = append(targetVi, sv) } } - return n, nil + if !needsRealloc { + // If we didn't reallocate, clear tail to prevent string pointer leaks + clear(s.vi[len(targetVi):]) + } + s.vi = targetVi + s.updateSizeMetrics() + + return n, errs } func validateMatcher(m *pb.Matcher) error { @@ -562,6 +731,16 @@ func (s *Silences) checkSizeLimits(msil *pb.MeshSilence) error { return nil } +func (s *Silences) indexSilence(sil *pb.Silence) { + s.version++ + s.vi.add(s.version, sil.Id) + _, err := s.mi.add(sil) + if err != nil { + s.metrics.matcherCompileIndexSilenceErrorsTotal.Inc() + s.logger.Error("Failed to compile silence matchers", "silence_id", sil.Id, "err", err) + } +} + func (s *Silences) getSilence(id string) (*pb.Silence, bool) { msil, ok := s.st[id] if !ok { @@ -584,7 +763,8 @@ func (s *Silences) setSilence(msil *pb.MeshSilence, now time.Time) error { } _, added := s.st.merge(msil, now) if added { - s.version++ + s.indexSilence(msil.Silence) + s.updateSizeMetrics() } s.broadcast(b) return nil @@ -592,7 +772,10 @@ func (s *Silences) setSilence(msil *pb.MeshSilence, now time.Time) error { // Set the specified silence. If a silence with the ID already exists and the modification // modifies history, the old silence gets expired and a new one is created. -func (s *Silences) Set(sil *pb.Silence) error { +func (s *Silences) Set(ctx context.Context, sil *pb.Silence) error { + _, span := tracer.Start(ctx, "silences.Set") + defer span.End() + now := s.nowUTC() if sil.StartsAt.IsZero() { sil.StartsAt = now @@ -628,7 +811,7 @@ func (s *Silences) Set(sil *pb.Silence) error { } } - uid, err := uuid.NewV4() + uid, err := uuid.NewRandom() if err != nil { return fmt.Errorf("generate uuid: %w", err) } @@ -683,9 +866,15 @@ func canUpdate(a, b *pb.Silence, now time.Time) bool { } // Expire the silence with the given ID immediately. -func (s *Silences) Expire(id string) error { +func (s *Silences) Expire(ctx context.Context, id string) error { s.mtx.Lock() defer s.mtx.Unlock() + + _, span := tracer.Start(ctx, "silences.Expire", trace.WithAttributes( + attribute.String("alerting.silence.id", id), + )) + defer span.End() + return s.expire(id) } @@ -719,6 +908,7 @@ type QueryParam func(*query) error type query struct { ids []string + since *int filters []silenceFilter } @@ -729,16 +919,35 @@ type silenceFilter func(*pb.Silence, *Silences, time.Time) (bool, error) // QIDs configures a query to select the given silence IDs. func QIDs(ids ...string) QueryParam { return func(q *query) error { + if len(ids) == 0 { + return errors.New("QIDs filter must have at least one id") + } + if q.since != nil { + return fmt.Errorf("QSince cannot be used with QIDs") + } q.ids = append(q.ids, ids...) return nil } } +// QSince filters silences to those created after the provided version. This can be used to +// scan all silences which have been added after the provided version to incrementally update +// a cache. +func QSince(version int) QueryParam { + return func(q *query) error { + if len(q.ids) != 0 { + return fmt.Errorf("QSince cannot be used with QIDs") + } + q.since = &version + return nil + } +} + // QMatches returns silences that match the given label set. func QMatches(set model.LabelSet) QueryParam { return func(q *query) error { f := func(sil *pb.Silence, s *Silences, _ time.Time) (bool, error) { - m, err := s.mc.Get(sil) + m, err := s.mi.get(sil) if err != nil { return true, err } @@ -766,10 +975,8 @@ func QState(states ...types.SilenceState) QueryParam { f := func(sil *pb.Silence, _ *Silences, now time.Time) (bool, error) { s := getState(sil, now) - for _, ps := range states { - if s == ps { - return true, nil - } + if slices.Contains(states, s) { + return true, nil } return false, nil } @@ -780,8 +987,12 @@ func QState(states ...types.SilenceState) QueryParam { // QueryOne queries with the given parameters and returns the first result. // Returns ErrNotFound if the query result is empty. -func (s *Silences) QueryOne(params ...QueryParam) (*pb.Silence, error) { - res, _, err := s.Query(params...) +func (s *Silences) QueryOne(ctx context.Context, params ...QueryParam) (*pb.Silence, error) { + _, span := tracer.Start(ctx, "inhibit.Silences.QueryOne", + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() + res, _, err := s.Query(ctx, params...) if err != nil { return nil, err } @@ -793,10 +1004,11 @@ func (s *Silences) QueryOne(params ...QueryParam) (*pb.Silence, error) { // Query for silences based on the given query parameters. It returns the // resulting silences and the state version the result is based on. -func (s *Silences) Query(params ...QueryParam) ([]*pb.Silence, int, error) { - s.mtx.Lock() - defer s.mtx.Unlock() - +func (s *Silences) Query(ctx context.Context, params ...QueryParam) ([]*pb.Silence, int, error) { + _, span := tracer.Start(ctx, "inhibit.Silences.Query", + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() s.metrics.queriesTotal.Inc() defer prometheus.NewTimer(s.metrics.queryDuration).ObserveDuration() @@ -822,51 +1034,94 @@ func (s *Silences) Version() int { } // CountState counts silences by state. -func (s *Silences) CountState(states ...types.SilenceState) (int, error) { +func (s *Silences) CountState(ctx context.Context, states ...types.SilenceState) (int, error) { + _, span := tracer.Start(ctx, "inhibit.Silences.CountState", + trace.WithSpanKind(trace.SpanKindInternal), + ) + defer span.End() // This could probably be optimized. - sils, _, err := s.Query(QState(states...)) + sils, _, err := s.Query(ctx, QState(states...)) if err != nil { return -1, err } return len(sils), nil } +// query executes the given query and returns the resulting silences. func (s *Silences) query(q *query, now time.Time) ([]*pb.Silence, int, error) { - // If we have no ID constraint, all silences are our base set. This and - // the use of post-filter functions is the trivial solution for now. var res []*pb.Silence + var err error + + scannedCount := 0 + defer func() { + s.metrics.queryScannedTotal.Add(float64(scannedCount)) + }() + // appendIfFiltersMatch appends the given silence to the result set + // if it matches all filters in the query. In case of a filter error, the error is returned. + appendIfFiltersMatch := func(res []*pb.Silence, sil *pb.Silence) ([]*pb.Silence, error) { + for _, f := range q.filters { + matches, err := f(sil, s, now) + // In case of error return it immediately and don't process further filters. + if err != nil { + return res, err + } + // If one filter doesn't match, return the result unchanged, immediately. + if !matches { + return res, nil + } + } + // All filters matched, append the silence to the result. + return append(res, cloneSilence(sil)), nil + } + + // Preallocate result slice if we have IDs (if not this will be a no-op) + res = make([]*pb.Silence, 0, len(q.ids)) + + // Take a read lock on Silences: we can read but not modify the Silences struct. + s.mtx.RLock() + defer s.mtx.RUnlock() + + // If we have IDs, only consider the silences with the given IDs, if they exist. if q.ids != nil { for _, id := range q.ids { - if s, ok := s.st[id]; ok { - res = append(res, s.Silence) + if sil, ok := s.st[id]; ok { + scannedCount++ + // append the silence to the results if it satisfies the query. + res, err = appendIfFiltersMatch(res, sil.Silence) + if err != nil { + return nil, s.version, err + } } } } else { - for _, sil := range s.st { - res = append(res, sil.Silence) + start := 0 + if q.since != nil { + var found bool + start, found = s.vi.findVersionGreaterThan(*q.since) + // no new silences, nothing to do + if !found { + return res, s.version, nil + } + // Track how many silences we skipped using the version index. + s.metrics.querySkippedTotal.Add(float64(start)) } - } - - var resf []*pb.Silence - for _, sil := range res { - remove := false - for _, f := range q.filters { - ok, err := f(sil, s, now) + // Preallocate result slice with a reasonable capacity. If we are + // scanning less than 64 silences, we can allocate that many, + // otherwise we just allocate 64 and let it grow as needed. + res = make([]*pb.Silence, 0, min(64, len(s.vi)-start)) + for _, sv := range s.vi[start:] { + scannedCount++ + sil := s.st[sv.id] + // append the silence to the results if it satisfies the query. + res, err = appendIfFiltersMatch(res, sil.Silence) if err != nil { return nil, s.version, err } - if !ok { - remove = true - break - } - } - if !remove { - resf = append(resf, cloneSilence(sil)) } } - return resf, s.version, nil + return res, s.version, nil } // loadSnapshot loads a snapshot generated by Snapshot() into the state. @@ -876,6 +1131,11 @@ func (s *Silences) loadSnapshot(r io.Reader) error { if err != nil { return err } + + mi := make(matcherIndex, len(st)) // for a map, len is ok as a size hint. + // Choose new version index capacity with some growth buffer. + vi := make(versionIndex, 0, max(len(st)*5/4, 1024)) + for _, e := range st { // Comments list was moved to a single comment. Upgrade on loading the snapshot. if len(e.Silence.Comments) > 0 { @@ -883,11 +1143,22 @@ func (s *Silences) loadSnapshot(r io.Reader) error { e.Silence.CreatedBy = e.Silence.Comments[0].Author e.Silence.Comments = nil } - st[e.Silence.Id] = e + // Add to matcher index, and only if successful, to the new state. + if _, err := mi.add(e.Silence); err != nil { + s.metrics.matcherCompileLoadSnapshotErrorsTotal.Inc() + s.logger.Error("Failed to compile silence matchers during snapshot load", "silence_id", e.Silence.Id, "err", err) + } else { + st[e.Silence.Id] = e + + vi.add(s.version+1, e.Silence.Id) + } } s.mtx.Lock() s.st = st + s.mi = mi + s.vi = vi s.version++ + s.updateSizeMetrics() s.mtx.Unlock() return nil @@ -933,7 +1204,7 @@ func (s *Silences) Merge(b []byte) error { merged, added := s.st.merge(e, now) if merged { if added { - s.version++ + s.indexSilence(e.Silence) } if !cluster.OversizedMessage(b) { // If this is the first we've seen the message and it's @@ -946,6 +1217,7 @@ func (s *Silences) Merge(b []byte) error { } } } + s.updateSizeMetrics() return nil } diff --git a/vendor/github.com/prometheus/alertmanager/store/store.go b/vendor/github.com/prometheus/alertmanager/store/store.go index 11e440c1415..daa7c14357f 100644 --- a/vendor/github.com/prometheus/alertmanager/store/store.go +++ b/vendor/github.com/prometheus/alertmanager/store/store.go @@ -21,9 +21,13 @@ import ( "github.com/prometheus/common/model" + "github.com/prometheus/alertmanager/limit" "github.com/prometheus/alertmanager/types" ) +// ErrLimited is returned if a Store has reached the per-alert limit. +var ErrLimited = errors.New("alert limited") + // ErrNotFound is returned if a Store cannot find the Alert. var ErrNotFound = errors.New("alert not found") @@ -33,26 +37,40 @@ var ErrNotFound = errors.New("alert not found") // resolved alerts that have been removed. type Alerts struct { sync.Mutex - c map[model.Fingerprint]*types.Alert - cb func([]types.Alert) + alerts map[model.Fingerprint]*types.Alert + gcCallback func([]types.Alert) + limits map[string]*limit.Bucket[model.Fingerprint] + perAlertLimit int } // NewAlerts returns a new Alerts struct. func NewAlerts() *Alerts { a := &Alerts{ - c: make(map[model.Fingerprint]*types.Alert), - cb: func(_ []types.Alert) {}, + alerts: make(map[model.Fingerprint]*types.Alert), + gcCallback: func(_ []types.Alert) {}, + perAlertLimit: 0, } return a } +// WithPerAlertLimit sets the per-alert limit for the Alerts struct. +func (a *Alerts) WithPerAlertLimit(lim int) *Alerts { + a.Lock() + defer a.Unlock() + + a.limits = make(map[string]*limit.Bucket[model.Fingerprint]) + a.perAlertLimit = lim + + return a +} + // SetGCCallback sets a GC callback to be executed after each GC. func (a *Alerts) SetGCCallback(cb func([]types.Alert)) { a.Lock() defer a.Unlock() - a.cb = cb + a.gcCallback = cb } // Run starts the GC loop. The interval must be greater than zero; if not, the function will panic. @@ -73,9 +91,9 @@ func (a *Alerts) Run(ctx context.Context, interval time.Duration) { func (a *Alerts) GC() []types.Alert { a.Lock() var resolved []types.Alert - for fp, alert := range a.c { + for fp, alert := range a.alerts { if alert.Resolved() { - delete(a.c, fp) + delete(a.alerts, fp) resolved = append(resolved, types.Alert{ Alert: model.Alert{ Labels: alert.Labels.Clone(), @@ -89,8 +107,16 @@ func (a *Alerts) GC() []types.Alert { }) } } + + // Remove stale alert limit buckets + for alertName, bucket := range a.limits { + if bucket.IsStale() { + delete(a.limits, alertName) + } + } + a.Unlock() - a.cb(resolved) + a.gcCallback(resolved) return resolved } @@ -100,7 +126,7 @@ func (a *Alerts) Get(fp model.Fingerprint) (*types.Alert, error) { a.Lock() defer a.Unlock() - alert, prs := a.c[fp] + alert, prs := a.alerts[fp] if !prs { return nil, ErrNotFound } @@ -112,7 +138,22 @@ func (a *Alerts) Set(alert *types.Alert) error { a.Lock() defer a.Unlock() - a.c[alert.Fingerprint()] = alert + fp := alert.Fingerprint() + name := alert.Name() + + // Apply per alert limits if necessary + if a.perAlertLimit > 0 { + bucket, ok := a.limits[name] + if !ok { + bucket = limit.NewBucket[model.Fingerprint](a.perAlertLimit) + a.limits[name] = bucket + } + if !bucket.Upsert(fp, alert.EndsAt) { + return ErrLimited + } + } + + a.alerts[fp] = alert return nil } @@ -123,8 +164,8 @@ func (a *Alerts) DeleteIfNotModified(alerts types.AlertSlice) error { defer a.Unlock() for _, alert := range alerts { fp := alert.Fingerprint() - if other, ok := a.c[fp]; ok && alert.UpdatedAt.Equal(other.UpdatedAt) { - delete(a.c, fp) + if other, ok := a.alerts[fp]; ok && alert.UpdatedAt.Equal(other.UpdatedAt) { + delete(a.alerts, fp) } } return nil @@ -135,8 +176,8 @@ func (a *Alerts) List() []*types.Alert { a.Lock() defer a.Unlock() - alerts := make([]*types.Alert, 0, len(a.c)) - for _, alert := range a.c { + alerts := make([]*types.Alert, 0, len(a.alerts)) + for _, alert := range a.alerts { alerts = append(alerts, alert) } @@ -148,5 +189,13 @@ func (a *Alerts) Empty() bool { a.Lock() defer a.Unlock() - return len(a.c) == 0 + return len(a.alerts) == 0 +} + +// Len returns the number of alerts in the store. +func (a *Alerts) Len() int { + a.Lock() + defer a.Unlock() + + return len(a.alerts) } diff --git a/vendor/github.com/prometheus/alertmanager/template/default.tmpl b/vendor/github.com/prometheus/alertmanager/template/default.tmpl index 57e877c0c21..cdbceb5324b 100644 --- a/vendor/github.com/prometheus/alertmanager/template/default.tmpl +++ b/vendor/github.com/prometheus/alertmanager/template/default.tmpl @@ -217,3 +217,14 @@ Alerts Resolved: {{ define "rocketchat.default.emoji" }}{{ end }} {{ define "rocketchat.default.iconurl" }}{{ end }} {{ define "rocketchat.default.text" }}{{ end }} + +{{ define "mattermost.default.text" }} +{{ if gt (len .Alerts.Firing) 0 }} +# Alerts Firing: +{{ template "__text_alert_list_markdown" .Alerts.Firing }} +{{ end }} +{{ if gt (len .Alerts.Resolved) 0 }} +# Alerts Resolved: +{{ template "__text_alert_list_markdown" .Alerts.Resolved }} +{{ end }} +{{ end }} \ No newline at end of file diff --git a/vendor/github.com/prometheus/alertmanager/template/template.go b/vendor/github.com/prometheus/alertmanager/template/template.go index 31939902878..b361ec03de5 100644 --- a/vendor/github.com/prometheus/alertmanager/template/template.go +++ b/vendor/github.com/prometheus/alertmanager/template/template.go @@ -15,11 +15,13 @@ package template import ( "bytes" + "encoding/json" tmplhtml "html/template" "io" "net/url" "path" "path/filepath" + "reflect" "regexp" "sort" "strings" @@ -30,6 +32,7 @@ import ( "github.com/prometheus/common/model" "golang.org/x/text/cases" "golang.org/x/text/language" + "gopkg.in/yaml.v2" "github.com/prometheus/alertmanager/asset" "github.com/prometheus/alertmanager/types" @@ -186,6 +189,10 @@ var DefaultFuncs = FuncMap{ "safeHtml": func(text string) tmplhtml.HTML { return tmplhtml.HTML(text) }, + "safeUrl": func(text string) tmplhtml.URL { + return tmplhtml.URL(text) + }, + "urlUnescape": url.QueryUnescape, "reReplaceAll": func(pattern, repl, text string) string { re := regexp.MustCompile(pattern) return re.ReplaceAllString(text, repl) @@ -207,6 +214,13 @@ var DefaultFuncs = FuncMap{ }, "since": time.Since, "humanizeDuration": commonTemplates.HumanizeDuration, + "toJson": func(v any) (string, error) { + bytes, err := json.Marshal(v) + if err != nil { + return "", err + } + return string(bytes), nil + }, } // Pair is a key/value string pair. @@ -423,3 +437,66 @@ func (t *Template) Data(recv string, groupLabels model.LabelSet, alerts ...*type return data } + +type TemplateFunc func(string) (string, error) + +// DeepCopyWithTemplate returns a deep copy of a map/slice/array/string/int/bool or combination thereof, executing the +// provided template (with the provided data) on all string keys or values. All maps are connverted to +// map[string]any, with all non-string keys discarded. +func DeepCopyWithTemplate(value any, tmplTextFunc TemplateFunc) (any, error) { + if value == nil { + return value, nil + } + + valueMeta := reflect.ValueOf(value) + switch valueMeta.Kind() { + + case reflect.String: + parsed, ok := tmplTextFunc(value.(string)) + if ok == nil { + var inlineType any + err := yaml.Unmarshal([]byte(parsed), &inlineType) + if err != nil || (inlineType != nil && reflect.TypeOf(inlineType).Kind() == reflect.String) { + // ignore error, thus the string is not an interface + return parsed, ok + } + return DeepCopyWithTemplate(inlineType, tmplTextFunc) + } + return parsed, ok + + case reflect.Array, reflect.Slice: + arrayLen := valueMeta.Len() + converted := make([]any, arrayLen) + for i := range arrayLen { + var err error + converted[i], err = DeepCopyWithTemplate(valueMeta.Index(i).Interface(), tmplTextFunc) + if err != nil { + return nil, err + } + } + return converted, nil + + case reflect.Map: + keys := valueMeta.MapKeys() + converted := make(map[string]any, len(keys)) + + for _, keyMeta := range keys { + var err error + strKey, isString := keyMeta.Interface().(string) + if !isString { + continue + } + strKey, err = tmplTextFunc(strKey) + if err != nil { + return nil, err + } + converted[strKey], err = DeepCopyWithTemplate(valueMeta.MapIndex(keyMeta).Interface(), tmplTextFunc) + if err != nil { + return nil, err + } + } + return converted, nil + default: + return value, nil + } +} diff --git a/vendor/github.com/prometheus/alertmanager/tracing/http.go b/vendor/github.com/prometheus/alertmanager/tracing/http.go new file mode 100644 index 00000000000..23ed944ef07 --- /dev/null +++ b/vendor/github.com/prometheus/alertmanager/tracing/http.go @@ -0,0 +1,50 @@ +// Copyright 2024 Prometheus Team +// 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 tracing + +import ( + "context" + "fmt" + "net/http" + "net/http/httptrace" + + "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" +) + +// TODO: maybe move these into prometheus/common? + +// Transport wraps the provided http.RoundTripper with one that starts a span +// and injects the span context into the outbound request headers. If the +// provided http.RoundTripper is nil, http.DefaultTransport will be used as the +// base http.RoundTripper. +func Transport(rt http.RoundTripper) http.RoundTripper { + rt = otelhttp.NewTransport(rt, + otelhttp.WithClientTrace(func(ctx context.Context) *httptrace.ClientTrace { + return otelhttptrace.NewClientTrace(ctx) + }), + ) + + return rt +} + +// Middleware returns a new HTTP handler that will trace all requests with the +// HTTP method and path as the span name. +func Middleware(handler http.Handler) http.Handler { + return otelhttp.NewHandler(handler, "", + otelhttp.WithSpanNameFormatter(func(_ string, r *http.Request) string { + return fmt.Sprintf("%s %s", r.Method, r.URL.Path) + }), + ) +} diff --git a/vendor/github.com/prometheus/alertmanager/tracing/tracing.go b/vendor/github.com/prometheus/alertmanager/tracing/tracing.go new file mode 100644 index 00000000000..1fbe59ff1c0 --- /dev/null +++ b/vendor/github.com/prometheus/alertmanager/tracing/tracing.go @@ -0,0 +1,273 @@ +// Copyright 2021 The Prometheus 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 tracing + +import ( + "context" + "fmt" + "log/slog" + "reflect" + "time" + + commoncfg "github.com/prometheus/common/config" + "github.com/prometheus/common/version" + "go.opentelemetry.io/otel" + "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/propagation" + "go.opentelemetry.io/otel/sdk/resource" + tracesdk "go.opentelemetry.io/otel/sdk/trace" + semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/otel/trace/noop" + "google.golang.org/grpc/credentials" + + "github.com/prometheus/alertmanager/config" +) + +const serviceName = "alertmanager" + +// Manager is capable of building, (re)installing and shutting down +// the tracer provider. +type Manager struct { + logger *slog.Logger + done chan struct{} + config config.TracingConfig + shutdownFunc func() error +} + +// NewManager creates a new tracing manager. +func NewManager(logger *slog.Logger) *Manager { + return &Manager{ + logger: logger, + done: make(chan struct{}), + } +} + +// Run starts the tracing manager. It registers the global text map propagator and error handler. +// It is blocking. +func (m *Manager) Run() { + otel.SetTextMapPropagator(propagation.TraceContext{}) + otel.SetErrorHandler(otelErrHandler(func(err error) { + m.logger.Error("OpenTelemetry handler returned an error", "err", err) + })) + <-m.done +} + +// ApplyConfig takes care of refreshing the tracing configuration by shutting down +// the current tracer provider (if any is registered) and installing a new one. +func (m *Manager) ApplyConfig(cfg *config.Config) error { + // Update only if a config change is detected. If TLS configuration is + // set, we have to restart the manager to make sure that new TLS + // certificates are picked up. + var blankTLSConfig commoncfg.TLSConfig + if reflect.DeepEqual(m.config, cfg.TracingConfig) && (m.config.TLSConfig == nil || *m.config.TLSConfig == blankTLSConfig) { + return nil + } + + if m.shutdownFunc != nil { + if err := m.shutdownFunc(); err != nil { + return fmt.Errorf("failed to shut down the tracer provider: %w", err) + } + } + + // If no endpoint is set, assume tracing should be disabled. + if cfg.TracingConfig.Endpoint == "" { + m.config = cfg.TracingConfig + m.shutdownFunc = nil + otel.SetTracerProvider(noop.NewTracerProvider()) + m.logger.Info("Tracing provider uninstalled.") + return nil + } + + tp, shutdownFunc, err := buildTracerProvider(context.Background(), cfg.TracingConfig) + if err != nil { + return fmt.Errorf("failed to install a new tracer provider: %w", err) + } + + m.shutdownFunc = shutdownFunc + m.config = cfg.TracingConfig + otel.SetTracerProvider(tp) + + m.logger.Info("Successfully installed a new tracer provider.") + return nil +} + +// Stop gracefully shuts down the tracer provider and stops the tracing manager. +func (m *Manager) Stop() { + defer close(m.done) + + if m.shutdownFunc == nil { + return + } + + if err := m.shutdownFunc(); err != nil { + m.logger.Error("failed to shut down the tracer provider", "err", err) + } + + m.logger.Info("Tracing manager stopped") +} + +type otelErrHandler func(err error) + +func (o otelErrHandler) Handle(err error) { + o(err) +} + +// buildTracerProvider return a new tracer provider ready for installation, together +// with a shutdown function. +func buildTracerProvider(ctx context.Context, tracingCfg config.TracingConfig) (trace.TracerProvider, func() error, error) { + client, err := getClient(tracingCfg) + if err != nil { + return nil, nil, err + } + + exp, err := otlptrace.New(ctx, client) + if err != nil { + return nil, nil, err + } + + // Create a resource describing the service and the runtime. + res, err := resource.New( + ctx, + resource.WithSchemaURL(semconv.SchemaURL), + resource.WithAttributes( + semconv.ServiceNameKey.String(serviceName), + semconv.ServiceVersionKey.String(version.Version), + ), + resource.WithProcessRuntimeDescription(), + resource.WithTelemetrySDK(), + ) + if err != nil { + return nil, nil, err + } + + tp := tracesdk.NewTracerProvider( + tracesdk.WithBatcher(exp), + tracesdk.WithSampler(tracesdk.ParentBased( + tracesdk.TraceIDRatioBased(tracingCfg.SamplingFraction), + )), + tracesdk.WithResource(res), + ) + + return tp, func() error { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + err := tp.Shutdown(ctx) + if err != nil { + return err + } + + return nil + }, nil +} + +// headersToMap converts prometheus/common Headers to a simple map[string]string. +// It takes the first value from Values, Secrets, or Files for each header. +func headersToMap(headers *commoncfg.Headers) (map[string]string, error) { + if headers == nil || len(headers.Headers) == 0 { + return nil, nil + } + + result := make(map[string]string) + for name, header := range headers.Headers { + if len(header.Values) > 0 { + result[name] = header.Values[0] + } else if len(header.Secrets) > 0 { + result[name] = string(header.Secrets[0]) + } else if len(header.Files) > 0 { + // Note: Files would need to be read at runtime. For tracing config, + // we only support direct values and secrets. + return nil, fmt.Errorf("header files are not supported for tracing configuration") + } + } + return result, nil +} + +// getClient returns an appropriate OTLP client (either gRPC or HTTP), based +// on the provided tracing configuration. +func getClient(tracingCfg config.TracingConfig) (otlptrace.Client, error) { + var client otlptrace.Client + switch tracingCfg.ClientType { + case config.TracingClientGRPC: + opts := []otlptracegrpc.Option{otlptracegrpc.WithEndpoint(tracingCfg.Endpoint)} + + switch { + case tracingCfg.Insecure: + opts = append(opts, otlptracegrpc.WithInsecure()) + case tracingCfg.TLSConfig != nil: + // Use of TLS Credentials forces the use of TLS. Therefore it can + // only be set when `insecure` is set to false. + tlsConf, err := commoncfg.NewTLSConfig(tracingCfg.TLSConfig) + if err != nil { + return nil, err + } + opts = append(opts, otlptracegrpc.WithTLSCredentials(credentials.NewTLS(tlsConf))) + } + + if tracingCfg.Compression != "" { + opts = append(opts, otlptracegrpc.WithCompressor(tracingCfg.Compression)) + } + + headers, err := headersToMap(tracingCfg.Headers) + if err != nil { + return nil, err + } + if len(headers) > 0 { + opts = append(opts, otlptracegrpc.WithHeaders(headers)) + } + + if tracingCfg.Timeout != 0 { + opts = append(opts, otlptracegrpc.WithTimeout(time.Duration(tracingCfg.Timeout))) + } + + client = otlptracegrpc.NewClient(opts...) + case config.TracingClientHTTP: + opts := []otlptracehttp.Option{otlptracehttp.WithEndpoint(tracingCfg.Endpoint)} + + switch { + case tracingCfg.Insecure: + opts = append(opts, otlptracehttp.WithInsecure()) + case tracingCfg.TLSConfig != nil: + tlsConf, err := commoncfg.NewTLSConfig(tracingCfg.TLSConfig) + if err != nil { + return nil, err + } + opts = append(opts, otlptracehttp.WithTLSClientConfig(tlsConf)) + } + + if tracingCfg.Compression == config.GzipCompression { + opts = append(opts, otlptracehttp.WithCompression(otlptracehttp.GzipCompression)) + } + + headers, err := headersToMap(tracingCfg.Headers) + if err != nil { + return nil, err + } + if len(headers) > 0 { + opts = append(opts, otlptracehttp.WithHeaders(headers)) + } + + if tracingCfg.Timeout != 0 { + opts = append(opts, otlptracehttp.WithTimeout(time.Duration(tracingCfg.Timeout))) + } + + client = otlptracehttp.NewClient(opts...) + default: + return nil, fmt.Errorf("unknown tracing client type: %s", tracingCfg.ClientType) + } + + return client, nil +} diff --git a/vendor/github.com/prometheus/alertmanager/types/types.go b/vendor/github.com/prometheus/alertmanager/types/types.go index 727ac320e3e..2cf9dd4501d 100644 --- a/vendor/github.com/prometheus/alertmanager/types/types.go +++ b/vendor/github.com/prometheus/alertmanager/types/types.go @@ -14,6 +14,7 @@ package types import ( + "context" "fmt" "strings" "sync" @@ -471,7 +472,7 @@ func (a *Alert) Merge(o *Alert) *Alert { // maintain an underlying AlertMarker are expected to update it during a call of // Mutes. type Muter interface { - Mutes(model.LabelSet) bool + Mutes(ctx context.Context, lset model.LabelSet) bool } // A TimeMuter determines if the time is muted by one or more active or mute @@ -482,10 +483,10 @@ type TimeMuter interface { } // A MuteFunc is a function that implements the Muter interface. -type MuteFunc func(model.LabelSet) bool +type MuteFunc func(ctx context.Context, lset model.LabelSet) bool // Mutes implements the Muter interface. -func (f MuteFunc) Mutes(lset model.LabelSet) bool { return f(lset) } +func (f MuteFunc) Mutes(ctx context.Context, lset model.LabelSet) bool { return f(ctx, lset) } // A Silence determines whether a given label set is muted. type Silence struct { diff --git a/vendor/github.com/prometheus/alertmanager/ui/web.go b/vendor/github.com/prometheus/alertmanager/ui/web.go index 3b81135237e..4c6d1894632 100644 --- a/vendor/github.com/prometheus/alertmanager/ui/web.go +++ b/vendor/github.com/prometheus/alertmanager/ui/web.go @@ -1,4 +1,4 @@ -// Copyright 2015 Prometheus Team +// Copyright The Prometheus 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 @@ -19,6 +19,7 @@ import ( "net/http" _ "net/http/pprof" // Comment this line to disable pprof endpoint. "path" + "strings" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/route" @@ -87,8 +88,17 @@ func Register(r *route.Router, reloadCh chan<- chan error, logger *slog.Logger) w.WriteHeader(http.StatusOK) }) - r.Get("/debug/*subpath", http.DefaultServeMux.ServeHTTP) - r.Post("/debug/*subpath", http.DefaultServeMux.ServeHTTP) + debugHandlerFunc := func(w http.ResponseWriter, req *http.Request) { + subpath := route.Param(req.Context(), "subpath") + req.URL.Path = path.Join("/debug", subpath) + // path.Join removes trailing slashes, but some pprof handlers expect them. + if strings.HasSuffix(subpath, "/") && !strings.HasSuffix(req.URL.Path, "/") { + req.URL.Path += "/" + } + http.DefaultServeMux.ServeHTTP(w, req) + } + r.Get("/debug/*subpath", debugHandlerFunc) + r.Post("/debug/*subpath", debugHandlerFunc) } func disableCaching(w http.ResponseWriter) { diff --git a/vendor/github.com/prometheus/common/config/http_config.go b/vendor/github.com/prometheus/common/config/http_config.go index 4e5ff92a29f..55cc5b0770c 100644 --- a/vendor/github.com/prometheus/common/config/http_config.go +++ b/vendor/github.com/prometheus/common/config/http_config.go @@ -27,11 +27,13 @@ import ( "net/url" "os" "path/filepath" + "slices" "strings" "sync" "time" - conntrack "github.com/mwitkow/go-conntrack" + "github.com/golang-jwt/jwt/v5" + "github.com/mwitkow/go-conntrack" "go.yaml.in/yaml/v2" "golang.org/x/net/http/httpproxy" "golang.org/x/net/http2" @@ -39,6 +41,10 @@ import ( "golang.org/x/oauth2/clientcredentials" ) +const ( + grantTypeJWTBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer" +) + var ( // DefaultHTTPClientConfig is the default HTTP client configuration. DefaultHTTPClientConfig = HTTPClientConfig{ @@ -130,7 +136,7 @@ func (tv *TLSVersion) String() string { // BasicAuth contains basic HTTP authentication credentials. type BasicAuth struct { - Username string `yaml:"username" json:"username"` + Username string `yaml:"username,omitempty" json:"username,omitempty"` UsernameFile string `yaml:"username_file,omitempty" json:"username_file,omitempty"` // UsernameRef is the name of the secret within the secret manager to use as the username. UsernameRef string `yaml:"username_ref,omitempty" json:"username_ref,omitempty"` @@ -232,17 +238,43 @@ func (u URL) MarshalJSON() ([]byte, error) { // OAuth2 is the oauth2 client configuration. type OAuth2 struct { - ClientID string `yaml:"client_id" json:"client_id"` - ClientSecret Secret `yaml:"client_secret" json:"client_secret"` - ClientSecretFile string `yaml:"client_secret_file" json:"client_secret_file"` + ClientID string `yaml:"client_id,omitempty" json:"client_id,omitempty"` + ClientSecret Secret `yaml:"client_secret,omitempty" json:"client_secret,omitempty"` + ClientSecretFile string `yaml:"client_secret_file,omitempty" json:"client_secret_file,omitempty"` // ClientSecretRef is the name of the secret within the secret manager to use as the client // secret. - ClientSecretRef string `yaml:"client_secret_ref" json:"client_secret_ref"` - Scopes []string `yaml:"scopes,omitempty" json:"scopes,omitempty"` - TokenURL string `yaml:"token_url" json:"token_url"` - EndpointParams map[string]string `yaml:"endpoint_params,omitempty" json:"endpoint_params,omitempty"` - TLSConfig TLSConfig `yaml:"tls_config,omitempty"` - ProxyConfig `yaml:",inline"` + ClientSecretRef string `yaml:"client_secret_ref,omitempty" json:"client_secret_ref,omitempty"` + ClientCertificateKeyID string `yaml:"client_certificate_key_id,omitempty" json:"client_certificate_key_id,omitempty"` + ClientCertificateKey Secret `yaml:"client_certificate_key,omitempty" json:"client_certificate_key,omitempty"` + ClientCertificateKeyFile string `yaml:"client_certificate_key_file,omitempty" json:"client_certificate_key_file,omitempty"` + // ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client + // secret. + ClientCertificateKeyRef string `yaml:"client_certificate_key_ref,omitempty" json:"client_certificate_key_ref,omitempty"` + // GrantType is the OAuth2 grant type to use. It can be one of + // "client_credentials" or "urn:ietf:params:oauth:grant-type:jwt-bearer" (RFC 7523). + // Default value is "client_credentials" + GrantType string `yaml:"grant_type,omitempty" json:"grant_type,omitempty"` + // SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if + // GrantType is set to "urn:ietf:params:oauth:grant-type:jwt-bearer". + // Default value is RS256 and valid values RS256, RS384, RS512 + SignatureAlgorithm string `yaml:"signature_algorithm,omitempty" json:"signature_algorithm,omitempty"` + // Iss is the OAuth client identifier used when communicating with + // the configured OAuth provider. Default value is client_id. Only used if + // GrantType is set to "urn:ietf:params:oauth:grant-type:jwt-bearer". + Iss string `yaml:"iss,omitempty" json:"iss,omitempty"` + // Audience optionally specifies the intended audience of the + // request. If empty, the value of TokenURL is used as the + // intended audience. Only used if + // GrantType is set to "urn:ietf:params:oauth:grant-type:jwt-bearer". + Audience string `yaml:"audience,omitempty" json:"audience,omitempty"` + // Claims is a map of claims to be added to the JWT token. Only used if + // GrantType is set to "urn:ietf:params:oauth:grant-type:jwt-bearer". + Claims map[string]interface{} `yaml:"claims,omitempty" json:"claims,omitempty"` + Scopes []string `yaml:"scopes,omitempty" json:"scopes,omitempty"` + TokenURL string `yaml:"token_url,omitempty" json:"token_url,omitempty"` + EndpointParams map[string]string `yaml:"endpoint_params,omitempty" json:"endpoint_params,omitempty"` + TLSConfig TLSConfig `yaml:"tls_config,omitempty"` + ProxyConfig `yaml:",inline"` } // UnmarshalYAML implements the yaml.Unmarshaler interface. @@ -408,8 +440,15 @@ func (c *HTTPClientConfig) Validate() error { if len(c.OAuth2.TokenURL) == 0 { return errors.New("oauth2 token_url must be configured") } - if nonZeroCount(len(c.OAuth2.ClientSecret) > 0, len(c.OAuth2.ClientSecretFile) > 0, len(c.OAuth2.ClientSecretRef) > 0) > 1 { - return errors.New("at most one of oauth2 client_secret, client_secret_file & client_secret_ref must be configured") + if c.OAuth2.GrantType == grantTypeJWTBearer { + if nonZeroCount(len(c.OAuth2.ClientCertificateKey) > 0, len(c.OAuth2.ClientCertificateKeyFile) > 0, len(c.OAuth2.ClientCertificateKeyRef) > 0) > 1 { + return errors.New("at most one of oauth2 client_certificate_key, client_certificate_key_file & client_certificate_key_ref must be configured using grant-type=urn:ietf:params:oauth:grant-type:jwt-bearer") + } + if c.OAuth2.SignatureAlgorithm != "" && !slices.Contains(validSignatureAlgorithm, c.OAuth2.SignatureAlgorithm) { + return errors.New("valid signature algorithms are RS256, RS384 and RS512") + } + } else if nonZeroCount(len(c.OAuth2.ClientSecret) > 0, len(c.OAuth2.ClientSecretFile) > 0, len(c.OAuth2.ClientSecretRef) > 0) > 1 { + return errors.New("at most one of oauth2 client_secret, client_secret_file & client_secret_ref must be configured using grant-type=client_credentials") } } if err := c.ProxyConfig.Validate(); err != nil { @@ -623,12 +662,6 @@ func NewRoundTripperFromConfigWithContext(ctx context.Context, cfg HTTPClientCon DialContext: dialContext, } if opts.http2Enabled && cfg.EnableHTTP2 { - // HTTP/2 support is golang had many problematic cornercases where - // dead connections would be kept and used in connection pools. - // https://github.com/golang/go/issues/32388 - // https://github.com/golang/go/issues/39337 - // https://github.com/golang/go/issues/39750 - http2t, err := http2.ConfigureTransports(rt.(*http.Transport)) if err != nil { return nil, err @@ -668,11 +701,23 @@ func NewRoundTripperFromConfigWithContext(ctx context.Context, cfg HTTPClientCon } if cfg.OAuth2 != nil { - clientSecret, err := toSecret(opts.secretManager, cfg.OAuth2.ClientSecret, cfg.OAuth2.ClientSecretFile, cfg.OAuth2.ClientSecretRef) - if err != nil { - return nil, fmt.Errorf("unable to use client secret: %w", err) + var ( + oauthCredential SecretReader + err error + ) + + if cfg.OAuth2.GrantType == grantTypeJWTBearer { + oauthCredential, err = toSecret(opts.secretManager, cfg.OAuth2.ClientCertificateKey, cfg.OAuth2.ClientCertificateKeyFile, cfg.OAuth2.ClientCertificateKeyRef) + if err != nil { + return nil, fmt.Errorf("unable to use client certificate: %w", err) + } + } else { + oauthCredential, err = toSecret(opts.secretManager, cfg.OAuth2.ClientSecret, cfg.OAuth2.ClientSecretFile, cfg.OAuth2.ClientSecretRef) + if err != nil { + return nil, fmt.Errorf("unable to use client secret: %w", err) + } } - rt = NewOAuth2RoundTripper(clientSecret, cfg.OAuth2, rt, &opts) + rt = NewOAuth2RoundTripper(oauthCredential, cfg.OAuth2, rt, &opts) } if cfg.HTTPHeaders != nil { @@ -891,27 +936,31 @@ type oauth2RoundTripper struct { lastSecret string // Required for interaction with Oauth2 server. - config *OAuth2 - clientSecret SecretReader - opts *httpClientOptions - client *http.Client + config *OAuth2 + oauthCredential SecretReader + opts *httpClientOptions + client *http.Client } -func NewOAuth2RoundTripper(clientSecret SecretReader, config *OAuth2, next http.RoundTripper, opts *httpClientOptions) http.RoundTripper { - if clientSecret == nil { - clientSecret = NewInlineSecret("") +func NewOAuth2RoundTripper(oauthCredential SecretReader, config *OAuth2, next http.RoundTripper, opts *httpClientOptions) http.RoundTripper { + if oauthCredential == nil { + oauthCredential = NewInlineSecret("") } return &oauth2RoundTripper{ config: config, // A correct tokenSource will be added later on. - lastRT: &oauth2.Transport{Base: next}, - opts: opts, - clientSecret: clientSecret, + lastRT: &oauth2.Transport{Base: next}, + opts: opts, + oauthCredential: oauthCredential, } } -func (rt *oauth2RoundTripper) newOauth2TokenSource(req *http.Request, secret string) (client *http.Client, source oauth2.TokenSource, err error) { +type oauth2TokenSourceConfig interface { + TokenSource(ctx context.Context) oauth2.TokenSource +} + +func (rt *oauth2RoundTripper) newOauth2TokenSource(req *http.Request, clientCredential string) (client *http.Client, source oauth2.TokenSource, err error) { tlsConfig, err := NewTLSConfig(&rt.config.TLSConfig, WithSecretManager(rt.opts.secretManager)) if err != nil { return nil, nil, err @@ -949,12 +998,49 @@ func (rt *oauth2RoundTripper) newOauth2TokenSource(req *http.Request, secret str t = NewUserAgentRoundTripper(ua, t) } - config := &clientcredentials.Config{ - ClientID: rt.config.ClientID, - ClientSecret: secret, - Scopes: rt.config.Scopes, - TokenURL: rt.config.TokenURL, - EndpointParams: mapToValues(rt.config.EndpointParams), + var config oauth2TokenSourceConfig + + if rt.config.GrantType == grantTypeJWTBearer { + // RFC 7523 3.1 - JWT authorization grants + // RFC 7523 3.2 - Client Authentication Processing is not implement upstream yet, + // see https://github.com/golang/oauth2/pull/745 + + var sig *jwt.SigningMethodRSA + switch rt.config.SignatureAlgorithm { + case jwt.SigningMethodRS256.Name: + sig = jwt.SigningMethodRS256 + case jwt.SigningMethodRS384.Name: + sig = jwt.SigningMethodRS384 + case jwt.SigningMethodRS512.Name: + sig = jwt.SigningMethodRS512 + default: + sig = jwt.SigningMethodRS256 + } + + iss := rt.config.Iss + if iss == "" { + iss = rt.config.ClientID + } + config = &JwtGrantTypeConfig{ + PrivateKey: []byte(clientCredential), + PrivateKeyID: rt.config.ClientCertificateKeyID, + Scopes: rt.config.Scopes, + TokenURL: rt.config.TokenURL, + SigningAlgorithm: sig, + Iss: iss, + Subject: rt.config.ClientID, + Audience: rt.config.Audience, + PrivateClaims: rt.config.Claims, + EndpointParams: mapToValues(rt.config.EndpointParams), + } + } else { + config = &clientcredentials.Config{ + ClientID: rt.config.ClientID, + ClientSecret: clientCredential, + Scopes: rt.config.Scopes, + TokenURL: rt.config.TokenURL, + EndpointParams: mapToValues(rt.config.EndpointParams), + } } client = &http.Client{Transport: t} ctx := context.WithValue(context.Background(), oauth2.HTTPClient, client) @@ -973,8 +1059,8 @@ func (rt *oauth2RoundTripper) RoundTrip(req *http.Request) (*http.Response, erro rt.mtx.RUnlock() // Fetch the secret if it's our first run or always if the secret can change. - if !rt.clientSecret.Immutable() || needsInit { - newSecret, err := rt.clientSecret.Fetch(req.Context()) + if !rt.oauthCredential.Immutable() || needsInit { + newSecret, err := rt.oauthCredential.Fetch(req.Context()) if err != nil { return nil, fmt.Errorf("unable to read oauth2 client secret: %w", err) } @@ -1383,6 +1469,9 @@ func (t *tlsRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { // using GetClientCertificate. tlsConfig := t.tlsConfig.Clone() if !updateRootCA(tlsConfig, caData) { + if t.settings.CA == nil { + return nil, errors.New("unable to use specified CA cert: none configured") + } return nil, fmt.Errorf("unable to use specified CA cert %s", t.settings.CA.Description()) } rt, err = t.newRT(tlsConfig) @@ -1505,19 +1594,19 @@ func (c *ProxyConfig) Proxy() (fn func(*http.Request) (*url.URL, error)) { fn = c.proxyFunc }() if c.proxyFunc != nil { - return + return fn } if c.ProxyFromEnvironment { proxyFn := httpproxy.FromEnvironment().ProxyFunc() c.proxyFunc = func(req *http.Request) (*url.URL, error) { return proxyFn(req.URL) } - return + return fn } if c.ProxyURL.URL != nil && c.ProxyURL.String() != "" { if c.NoProxy == "" { c.proxyFunc = http.ProxyURL(c.ProxyURL.URL) - return + return fn } proxy := &httpproxy.Config{ HTTPProxy: c.ProxyURL.String(), @@ -1529,7 +1618,7 @@ func (c *ProxyConfig) Proxy() (fn func(*http.Request) (*url.URL, error)) { return proxyFn(req.URL) } } - return + return fn } // ProxyConnectHeader() return the Proxy Connext Headers. diff --git a/vendor/github.com/prometheus/common/config/oauth_assertion.go b/vendor/github.com/prometheus/common/config/oauth_assertion.go new file mode 100644 index 00000000000..bf4bcb949b6 --- /dev/null +++ b/vendor/github.com/prometheus/common/config/oauth_assertion.go @@ -0,0 +1,194 @@ +// Copyright 2025 The Prometheus 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 config + +import ( + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "time" + + "github.com/golang-jwt/jwt/v5" + "github.com/google/uuid" + "golang.org/x/oauth2" +) + +var ( + defaultGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer" + validSignatureAlgorithm = []string{"RS256", "RS384", "RS512"} +) + +// Config is the configuration for using JWT to fetch tokens, +// commonly known as "two-legged OAuth 2.0". +type JwtGrantTypeConfig struct { + // Iss is the OAuth client identifier used when communicating with + // the configured OAuth provider. + Iss string + + // PrivateKey contains the contents of an RSA private key or the + // contents of a PEM file that contains a private key. The provided + // private key is used to sign JWT payloads. + // PEM containers with a passphrase are not supported. + // Use the following command to convert a PKCS 12 file into a PEM. + // + // $ openssl pkcs12 -in key.p12 -out key.pem -nodes + // + PrivateKey []byte + + // SigningAlgorithm is the RSA algorithm used to sign JWT payloads + SigningAlgorithm *jwt.SigningMethodRSA + + // PrivateKeyID contains an optional hint indicating which key is being + // used. + PrivateKeyID string + + // Subject is the optional user to impersonate. + Subject string + + // Scopes optionally specifies a list of requested permission scopes. + Scopes []string + + // TokenURL is the endpoint required to complete the 2-legged JWT flow. + TokenURL string + + // EndpointParams specifies additional parameters for requests to the token endpoint. + EndpointParams url.Values + + // Expires optionally specifies how long the token is valid for. + Expires time.Duration + + // Audience optionally specifies the intended audience of the + // request. If empty, the value of TokenURL is used as the + // intended audience. + Audience string + + // PrivateClaims optionally specifies custom private claims in the JWT. + // See http://tools.ietf.org/html/draft-jones-json-web-token-10#section-4.3 + PrivateClaims map[string]any +} + +// TokenSource returns a JWT TokenSource using the configuration +// in c and the HTTP client from the provided context. +func (c *JwtGrantTypeConfig) TokenSource(ctx context.Context) oauth2.TokenSource { + return oauth2.ReuseTokenSource(nil, jwtSource{ctx, c}) +} + +// Client returns an HTTP client wrapping the context's +// HTTP transport and adding Authorization headers with tokens +// obtained from c. +// +// The returned client and its Transport should not be modified. +func (c *JwtGrantTypeConfig) Client(ctx context.Context) *http.Client { + return oauth2.NewClient(ctx, c.TokenSource(ctx)) +} + +// jwtSource is a source that always does a signed JWT request for a token. +// It should typically be wrapped with a reuseTokenSource. +type jwtSource struct { + ctx context.Context + conf *JwtGrantTypeConfig +} + +func (js jwtSource) Token() (*oauth2.Token, error) { + pk, err := jwt.ParseRSAPrivateKeyFromPEM(js.conf.PrivateKey) + if err != nil { + return nil, err + } + hc := oauth2.NewClient(js.ctx, nil) + audience := js.conf.TokenURL + if aud := js.conf.Audience; aud != "" { + audience = aud + } + expiration := time.Now().Add(10 * time.Minute) + if t := js.conf.Expires; t > 0 { + expiration = time.Now().Add(t) + } + scopes := strings.Join(js.conf.Scopes, " ") + + claims := jwt.MapClaims{ + "iss": js.conf.Iss, + "sub": js.conf.Subject, + "jti": uuid.New(), + "aud": audience, + "iat": jwt.NewNumericDate(time.Now()), + "exp": jwt.NewNumericDate(expiration), + } + + if len(scopes) > 0 { + claims["scope"] = scopes + } + + for k, v := range js.conf.PrivateClaims { + claims[k] = v + } + + assertion := jwt.NewWithClaims(js.conf.SigningAlgorithm, claims) + if js.conf.PrivateKeyID != "" { + assertion.Header["kid"] = js.conf.PrivateKeyID + } + payload, err := assertion.SignedString(pk) + if err != nil { + return nil, err + } + v := url.Values{} + v.Set("grant_type", defaultGrantType) + v.Set("assertion", payload) + if len(scopes) > 0 { + v.Set("scope", scopes) + } + + for k, p := range js.conf.EndpointParams { + // Allow grant_type to be overridden to allow interoperability with + // non-compliant implementations. + if _, ok := v[k]; ok && k != "grant_type" { + return nil, fmt.Errorf("oauth2: cannot overwrite parameter %q", k) + } + v[k] = p + } + + resp, err := hc.PostForm(js.conf.TokenURL, v) + if err != nil { + return nil, fmt.Errorf("oauth2: cannot fetch token: %w", err) + } + defer resp.Body.Close() + body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) + if err != nil { + return nil, fmt.Errorf("oauth2: cannot fetch token: %w", err) + } + if c := resp.StatusCode; c < 200 || c > 299 { + return nil, &oauth2.RetrieveError{ + Response: resp, + Body: body, + } + } + // tokenRes is the JSON response body. + var tokenRes struct { + oauth2.Token + } + if err := json.Unmarshal(body, &tokenRes); err != nil { + return nil, fmt.Errorf("oauth2: cannot fetch token: %w", err) + } + token := &oauth2.Token{ + AccessToken: tokenRes.AccessToken, + TokenType: tokenRes.TokenType, + } + if secs := tokenRes.ExpiresIn; secs > 0 { + token.Expiry = time.Now().Add(time.Duration(secs) * time.Second) + } + return token, nil +} diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go index c34c7de432b..4e4c13e724c 100644 --- a/vendor/github.com/prometheus/common/expfmt/expfmt.go +++ b/vendor/github.com/prometheus/common/expfmt/expfmt.go @@ -45,6 +45,7 @@ const ( // The Content-Type values for the different wire protocols. Do not do direct // comparisons to these constants, instead use the comparison functions. + // // Deprecated: Use expfmt.NewFormat(expfmt.TypeUnknown) instead. FmtUnknown Format = `` // Deprecated: Use expfmt.NewFormat(expfmt.TypeTextPlain) instead. diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz.go b/vendor/github.com/prometheus/common/expfmt/fuzz.go index 0290f6abc40..872c0c15b40 100644 --- a/vendor/github.com/prometheus/common/expfmt/fuzz.go +++ b/vendor/github.com/prometheus/common/expfmt/fuzz.go @@ -13,7 +13,6 @@ // Build only when actually fuzzing //go:build gofuzz -// +build gofuzz package expfmt diff --git a/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go b/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go index 8c8bbaa6243..21b93bca362 100644 --- a/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go +++ b/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go @@ -160,38 +160,38 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E n, err = w.WriteString("# HELP ") written += n if err != nil { - return + return written, err } n, err = writeName(w, compliantName) written += n if err != nil { - return + return written, err } err = w.WriteByte(' ') written++ if err != nil { - return + return written, err } n, err = writeEscapedString(w, *in.Help, true) written += n if err != nil { - return + return written, err } err = w.WriteByte('\n') written++ if err != nil { - return + return written, err } } n, err = w.WriteString("# TYPE ") written += n if err != nil { - return + return written, err } n, err = writeName(w, compliantName) written += n if err != nil { - return + return written, err } switch metricType { case dto.MetricType_COUNTER: @@ -215,34 +215,34 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E } written += n if err != nil { - return + return written, err } if toOM.withUnit && in.Unit != nil { n, err = w.WriteString("# UNIT ") written += n if err != nil { - return + return written, err } n, err = writeName(w, compliantName) written += n if err != nil { - return + return written, err } err = w.WriteByte(' ') written++ if err != nil { - return + return written, err } n, err = writeEscapedString(w, *in.Unit, true) written += n if err != nil { - return + return written, err } err = w.WriteByte('\n') written++ if err != nil { - return + return written, err } } @@ -306,7 +306,7 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E ) written += n if err != nil { - return + return written, err } } n, err = writeOpenMetricsSample( @@ -316,7 +316,7 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E ) written += n if err != nil { - return + return written, err } n, err = writeOpenMetricsSample( w, compliantName, "_count", metric, "", 0, @@ -349,7 +349,7 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E ) written += n if err != nil { - return + return written, err } if math.IsInf(b.GetUpperBound(), +1) { infSeen = true @@ -367,7 +367,7 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E // out if needed). written += n if err != nil { - return + return written, err } } n, err = writeOpenMetricsSample( @@ -377,7 +377,7 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E ) written += n if err != nil { - return + return written, err } if metric.Histogram.GetSampleCountFloat() > 0 { return written, fmt.Errorf( @@ -401,10 +401,10 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E } written += n if err != nil { - return + return written, err } } - return + return written, err } // FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics. diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go index 7e1d23cabc4..6b897814564 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_create.go +++ b/vendor/github.com/prometheus/common/expfmt/text_create.go @@ -108,38 +108,38 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e n, err = w.WriteString("# HELP ") written += n if err != nil { - return + return written, err } n, err = writeName(w, name) written += n if err != nil { - return + return written, err } err = w.WriteByte(' ') written++ if err != nil { - return + return written, err } n, err = writeEscapedString(w, *in.Help, false) written += n if err != nil { - return + return written, err } err = w.WriteByte('\n') written++ if err != nil { - return + return written, err } } n, err = w.WriteString("# TYPE ") written += n if err != nil { - return + return written, err } n, err = writeName(w, name) written += n if err != nil { - return + return written, err } metricType := in.GetType() switch metricType { @@ -161,7 +161,7 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e } written += n if err != nil { - return + return written, err } // Finally the samples, one line for each. @@ -211,7 +211,7 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e ) written += n if err != nil { - return + return written, err } } n, err = writeSample( @@ -220,7 +220,7 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e ) written += n if err != nil { - return + return written, err } n, err = writeSample( w, name, "_count", metric, "", 0, @@ -245,7 +245,7 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e ) written += n if err != nil { - return + return written, err } if math.IsInf(b.GetUpperBound(), +1) { infSeen = true @@ -263,7 +263,7 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e ) written += n if err != nil { - return + return written, err } } n, err = writeSample( @@ -272,7 +272,7 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e ) written += n if err != nil { - return + return written, err } v := metric.Histogram.GetSampleCountFloat() if v == 0 { @@ -286,10 +286,10 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e } written += n if err != nil { - return + return written, err } } - return + return written, err } // writeSample writes a single sample in text format to w, given the metric diff --git a/vendor/github.com/prometheus/exporter-toolkit/web/handler.go b/vendor/github.com/prometheus/exporter-toolkit/web/handler.go index 51da762c957..0a2718d53ea 100644 --- a/vendor/github.com/prometheus/exporter-toolkit/web/handler.go +++ b/vendor/github.com/prometheus/exporter-toolkit/web/handler.go @@ -24,6 +24,7 @@ import ( "sync" "golang.org/x/crypto/bcrypt" + "golang.org/x/time/rate" ) // extraHTTPHeaders is a map of HTTP headers that can be added to HTTP @@ -80,6 +81,7 @@ type webHandler struct { handler http.Handler logger *slog.Logger cache *cache + limiter *rate.Limiter // bcryptMtx is there to ensure that bcrypt.CompareHashAndPassword is run // only once in parallel as this is CPU intensive. bcryptMtx sync.Mutex @@ -93,6 +95,11 @@ func (u *webHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } + if u.limiter != nil && !u.limiter.Allow() { + http.Error(w, http.StatusText(http.StatusTooManyRequests), http.StatusTooManyRequests) + return + } + // Configure http headers. for k, v := range c.HTTPConfig.Header { w.Header().Set(k, v) diff --git a/vendor/github.com/prometheus/exporter-toolkit/web/tls_config.go b/vendor/github.com/prometheus/exporter-toolkit/web/tls_config.go index 531bfcde167..c760d88ca21 100644 --- a/vendor/github.com/prometheus/exporter-toolkit/web/tls_config.go +++ b/vendor/github.com/prometheus/exporter-toolkit/web/tls_config.go @@ -26,12 +26,14 @@ import ( "path/filepath" "strconv" "strings" + "time" "github.com/coreos/go-systemd/v22/activation" "github.com/mdlayher/vsock" config_util "github.com/prometheus/common/config" "go.yaml.in/yaml/v2" "golang.org/x/sync/errgroup" + "golang.org/x/time/rate" ) var ( @@ -40,9 +42,10 @@ var ( ) type Config struct { - TLSConfig TLSConfig `yaml:"tls_server_config"` - HTTPConfig HTTPConfig `yaml:"http_server_config"` - Users map[string]config_util.Secret `yaml:"basic_auth_users"` + TLSConfig TLSConfig `yaml:"tls_server_config"` + HTTPConfig HTTPConfig `yaml:"http_server_config"` + RateLimiterConfig RateLimiterConfig `yaml:"rate_limit"` + Users map[string]config_util.Secret `yaml:"basic_auth_users"` } type TLSConfig struct { @@ -109,6 +112,11 @@ type HTTPConfig struct { Header map[string]string `yaml:"headers,omitempty"` } +type RateLimiterConfig struct { + Burst int `yaml:"burst"` + Interval time.Duration `yaml:"interval"` +} + func getConfig(configPath string) (*Config, error) { content, err := os.ReadFile(configPath) if err != nil { @@ -365,11 +373,18 @@ func Serve(l net.Listener, server *http.Server, flags *FlagConfig, logger *slog. return err } + var limiter *rate.Limiter + if c.RateLimiterConfig.Interval != 0 { + limiter = rate.NewLimiter(rate.Every(c.RateLimiterConfig.Interval), c.RateLimiterConfig.Burst) + logger.Info("Rate Limiter is enabled.", "burst", c.RateLimiterConfig.Burst, "interval", c.RateLimiterConfig.Interval) + } + server.Handler = &webHandler{ tlsConfigPath: tlsConfigPath, logger: logger, handler: handler, cache: newCache(), + limiter: limiter, } config, err := ConfigToTLSConfig(&c.TLSConfig) diff --git a/vendor/github.com/prometheus/procfs/.golangci.yml b/vendor/github.com/prometheus/procfs/.golangci.yml index 3c3bf910fdf..23ecd4505b2 100644 --- a/vendor/github.com/prometheus/procfs/.golangci.yml +++ b/vendor/github.com/prometheus/procfs/.golangci.yml @@ -1,7 +1,9 @@ version: "2" linters: enable: + - errorlint - forbidigo + - gocritic - godot - misspell - revive @@ -11,6 +13,20 @@ linters: forbid: - pattern: ^fmt\.Print.*$ msg: Do not commit print statements. + gocritic: + enable-all: true + disabled-checks: + - commentFormatting + - commentedOutCode + - deferInLoop + - filepathJoin + - hugeParam + - importShadow + - paramTypeCombine + - rangeValCopy + - tooManyResultsChecker + - unnamedResult + - whyNoLint godot: exclude: # Ignore "See: URL". @@ -19,16 +35,12 @@ linters: misspell: locale: US exclusions: - generated: lax presets: - comments - common-false-positives - legacy - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ + warn-unused: true formatters: enable: - gofmt @@ -37,9 +49,3 @@ formatters: goimports: local-prefixes: - github.com/prometheus/procfs - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile index 7edfe4d0932..bce50a19c50 100644 --- a/vendor/github.com/prometheus/procfs/Makefile +++ b/vendor/github.com/prometheus/procfs/Makefile @@ -1,4 +1,4 @@ -# Copyright 2018 The Prometheus Authors +# Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/Makefile.common b/vendor/github.com/prometheus/procfs/Makefile.common index 0ed55c2ba21..6f61bec48fd 100644 --- a/vendor/github.com/prometheus/procfs/Makefile.common +++ b/vendor/github.com/prometheus/procfs/Makefile.common @@ -33,7 +33,7 @@ GOHOSTOS ?= $(shell $(GO) env GOHOSTOS) GOHOSTARCH ?= $(shell $(GO) env GOHOSTARCH) GO_VERSION ?= $(shell $(GO) version) -GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION))Error Parsing File +GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION)) PRE_GO_111 ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\.(10|[0-9])\.') PROMU := $(FIRST_GOPATH)/bin/promu @@ -61,7 +61,8 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_ SKIP_GOLANGCI_LINT := GOLANGCI_LINT := GOLANGCI_LINT_OPTS ?= -GOLANGCI_LINT_VERSION ?= v2.0.2 +GOLANGCI_LINT_VERSION ?= v2.1.5 +GOLANGCI_FMT_OPTS ?= # golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64. # windows isn't included here because of the path separator being different. ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) @@ -138,7 +139,7 @@ common-deps: update-go-deps: @echo ">> updating Go dependencies" @for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ - $(GO) get -d $$m; \ + $(GO) get $$m; \ done $(GO) mod tidy @@ -156,9 +157,13 @@ $(GOTEST_DIR): @mkdir -p $@ .PHONY: common-format -common-format: +common-format: $(GOLANGCI_LINT) @echo ">> formatting code" $(GO) fmt $(pkgs) +ifdef GOLANGCI_LINT + @echo ">> formatting code with golangci-lint" + $(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS) +endif .PHONY: common-vet common-vet: @@ -248,8 +253,8 @@ $(PROMU): cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu rm -r $(PROMU_TMP) -.PHONY: proto -proto: +.PHONY: common-proto +common-proto: @echo ">> generating code from proto files" @./scripts/genproto.sh diff --git a/vendor/github.com/prometheus/procfs/arp.go b/vendor/github.com/prometheus/procfs/arp.go index 2e53344151f..716bdef1090 100644 --- a/vendor/github.com/prometheus/procfs/arp.go +++ b/vendor/github.com/prometheus/procfs/arp.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -73,15 +73,16 @@ func parseARPEntries(data []byte) ([]ARPEntry, error) { columns := strings.Fields(line) width := len(columns) - if width == expectedHeaderWidth || width == 0 { + switch width { + case expectedHeaderWidth, 0: continue - } else if width == expectedDataWidth { + case expectedDataWidth: entry, err := parseARPEntry(columns) if err != nil { return []ARPEntry{}, fmt.Errorf("%w: Failed to parse ARP entry: %v: %w", ErrFileParse, entry, err) } entries = append(entries, entry) - } else { + default: return []ARPEntry{}, fmt.Errorf("%w: %d columns found, but expected %d: %w", ErrFileParse, width, expectedDataWidth, err) } diff --git a/vendor/github.com/prometheus/procfs/buddyinfo.go b/vendor/github.com/prometheus/procfs/buddyinfo.go index 83807500908..53243e68758 100644 --- a/vendor/github.com/prometheus/procfs/buddyinfo.go +++ b/vendor/github.com/prometheus/procfs/buddyinfo.go @@ -1,4 +1,4 @@ -// Copyright 2017 The Prometheus Authors +// Copyright The Prometheus 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 @@ -64,14 +64,12 @@ func parseBuddyInfo(r io.Reader) ([]BuddyInfo, error) { if bucketCount == -1 { bucketCount = arraySize - } else { - if bucketCount != arraySize { - return nil, fmt.Errorf("%w: mismatch in number of buddyinfo buckets, previous count %d, new count %d", ErrFileParse, bucketCount, arraySize) - } + } else if bucketCount != arraySize { + return nil, fmt.Errorf("%w: mismatch in number of buddyinfo buckets, previous count %d, new count %d", ErrFileParse, bucketCount, arraySize) } sizes := make([]float64, arraySize) - for i := 0; i < arraySize; i++ { + for i := range arraySize { sizes[i], err = strconv.ParseFloat(parts[i+4], 64) if err != nil { return nil, fmt.Errorf("%w: Invalid valid in buddyinfo: %f: %w", ErrFileParse, sizes[i], err) diff --git a/vendor/github.com/prometheus/procfs/cmdline.go b/vendor/github.com/prometheus/procfs/cmdline.go index bf4f3b48c0e..4f1cac1f0ac 100644 --- a/vendor/github.com/prometheus/procfs/cmdline.go +++ b/vendor/github.com/prometheus/procfs/cmdline.go @@ -1,4 +1,4 @@ -// Copyright 2021 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go index f0950bb4953..5fe6cecd3dd 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_armx.go b/vendor/github.com/prometheus/procfs/cpuinfo_armx.go index 64cfd534c1f..8f155551e52 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_armx.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_armx.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go index d88442f0edf..e81a5db9490 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go b/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go index c11207f3ab6..4be2b1cc549 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_others.go b/vendor/github.com/prometheus/procfs/cpuinfo_others.go index a6b2b3127cb..e713bae8dfe 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_others.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_others.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go b/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go index 003bc2ad4a3..0825aa1a830 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go index 1c9b7313b6c..496770b05f6 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go index fa3686bc004..b3228ce3d86 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_x86.go b/vendor/github.com/prometheus/procfs/cpuinfo_x86.go index a0ef55562eb..575eb022eb0 100644 --- a/vendor/github.com/prometheus/procfs/cpuinfo_x86.go +++ b/vendor/github.com/prometheus/procfs/cpuinfo_x86.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/crypto.go b/vendor/github.com/prometheus/procfs/crypto.go index 5f2a37a78b3..e4a5876eafb 100644 --- a/vendor/github.com/prometheus/procfs/crypto.go +++ b/vendor/github.com/prometheus/procfs/crypto.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/doc.go b/vendor/github.com/prometheus/procfs/doc.go index f9d961e4417..26bfea071ba 100644 --- a/vendor/github.com/prometheus/procfs/doc.go +++ b/vendor/github.com/prometheus/procfs/doc.go @@ -1,4 +1,4 @@ -// Copyright 2014 Prometheus Team +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go index 9bdaccc7c8a..8f27912a13a 100644 --- a/vendor/github.com/prometheus/procfs/fs.go +++ b/vendor/github.com/prometheus/procfs/fs.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/fs_statfs_notype.go b/vendor/github.com/prometheus/procfs/fs_statfs_notype.go index 1b5bdbdf84a..3c53023c544 100644 --- a/vendor/github.com/prometheus/procfs/fs_statfs_notype.go +++ b/vendor/github.com/prometheus/procfs/fs_statfs_notype.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/fs_statfs_type.go b/vendor/github.com/prometheus/procfs/fs_statfs_type.go index 80df79c3193..80fce484789 100644 --- a/vendor/github.com/prometheus/procfs/fs_statfs_type.go +++ b/vendor/github.com/prometheus/procfs/fs_statfs_type.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/fscache.go b/vendor/github.com/prometheus/procfs/fscache.go index 7db86330779..9dde8570737 100644 --- a/vendor/github.com/prometheus/procfs/fscache.go +++ b/vendor/github.com/prometheus/procfs/fscache.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -388,20 +388,21 @@ func parseFscacheinfo(r io.Reader) (*Fscacheinfo, error) { } } case "CacheOp:": - if strings.Split(fields[1], "=")[0] == "alo" { + switch strings.Split(fields[1], "=")[0] { + case "alo": err := setFSCacheFields(fields[1:], &m.CacheopAllocationsinProgress, &m.CacheopLookupObjectInProgress, &m.CacheopLookupCompleteInPorgress, &m.CacheopGrabObjectInProgress) if err != nil { return &m, err } - } else if strings.Split(fields[1], "=")[0] == "inv" { + case "inv": err := setFSCacheFields(fields[1:], &m.CacheopInvalidations, &m.CacheopUpdateObjectInProgress, &m.CacheopDropObjectInProgress, &m.CacheopPutObjectInProgress, &m.CacheopAttributeChangeInProgress, &m.CacheopSyncCacheInProgress) if err != nil { return &m, err } - } else { + default: err := setFSCacheFields(fields[1:], &m.CacheopReadOrAllocPageInProgress, &m.CacheopReadOrAllocPagesInProgress, &m.CacheopAllocatePageInProgress, &m.CacheopAllocatePagesInProgress, &m.CacheopWritePagesInProgress, &m.CacheopUncachePagesInProgress, &m.CacheopDissociatePagesInProgress) diff --git a/vendor/github.com/prometheus/procfs/internal/fs/fs.go b/vendor/github.com/prometheus/procfs/internal/fs/fs.go index 3a43e83915f..e7ccad66b2e 100644 --- a/vendor/github.com/prometheus/procfs/internal/fs/fs.go +++ b/vendor/github.com/prometheus/procfs/internal/fs/fs.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/internal/util/parse.go b/vendor/github.com/prometheus/procfs/internal/util/parse.go index 5a7d2df06ae..30c5872019a 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/parse.go +++ b/vendor/github.com/prometheus/procfs/internal/util/parse.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/internal/util/readfile.go b/vendor/github.com/prometheus/procfs/internal/util/readfile.go index 71b7a70ebd6..0e41f71af18 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/readfile.go +++ b/vendor/github.com/prometheus/procfs/internal/util/readfile.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go index d5404a6d728..8318d8dfd51 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go +++ b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go index 1d86f5e63f3..15bb096ee20 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go +++ b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/internal/util/valueparser.go b/vendor/github.com/prometheus/procfs/internal/util/valueparser.go index fe2355d3c6f..e0ed671ea07 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/valueparser.go +++ b/vendor/github.com/prometheus/procfs/internal/util/valueparser.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/ipvs.go b/vendor/github.com/prometheus/procfs/ipvs.go index bc3a20c932d..5374da9fa89 100644 --- a/vendor/github.com/prometheus/procfs/ipvs.go +++ b/vendor/github.com/prometheus/procfs/ipvs.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/kernel_hung.go b/vendor/github.com/prometheus/procfs/kernel_hung.go new file mode 100644 index 00000000000..539c1115142 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/kernel_hung.go @@ -0,0 +1,45 @@ +// Copyright The Prometheus 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. + +//go:build !windows +// +build !windows + +package procfs + +import ( + "os" + "strconv" + "strings" +) + +// KernelHung contains information about to the kernel's hung_task_detect_count number. +type KernelHung struct { + // Indicates the total number of tasks that have been detected as hung since the system boot. + // This file shows up if `CONFIG_DETECT_HUNG_TASK` is enabled. + HungTaskDetectCount *uint64 +} + +// KernelHung returns values from /proc/sys/kernel/hung_task_detect_count. +func (fs FS) KernelHung() (KernelHung, error) { + data, err := os.ReadFile(fs.proc.Path("sys", "kernel", "hung_task_detect_count")) + if err != nil { + return KernelHung{}, err + } + val, err := strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64) + if err != nil { + return KernelHung{}, err + } + return KernelHung{ + HungTaskDetectCount: &val, + }, nil +} diff --git a/vendor/github.com/prometheus/procfs/kernel_random.go b/vendor/github.com/prometheus/procfs/kernel_random.go index db88566bdf0..b66565a1043 100644 --- a/vendor/github.com/prometheus/procfs/kernel_random.go +++ b/vendor/github.com/prometheus/procfs/kernel_random.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/loadavg.go b/vendor/github.com/prometheus/procfs/loadavg.go index 332e76c17f5..c8c78a65edc 100644 --- a/vendor/github.com/prometheus/procfs/loadavg.go +++ b/vendor/github.com/prometheus/procfs/loadavg.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go index 67a9d2b4486..d66eeda82a2 100644 --- a/vendor/github.com/prometheus/procfs/mdstat.go +++ b/vendor/github.com/prometheus/procfs/mdstat.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -27,13 +27,34 @@ var ( recoveryLinePctRE = regexp.MustCompile(`= (.+)%`) recoveryLineFinishRE = regexp.MustCompile(`finish=(.+)min`) recoveryLineSpeedRE = regexp.MustCompile(`speed=(.+)[A-Z]`) - componentDeviceRE = regexp.MustCompile(`(.*)\[\d+\]`) + componentDeviceRE = regexp.MustCompile(`(.*)\[(\d+)\](\([SF]+\))?`) + personalitiesPrefix = "Personalities : " ) +type MDStatComponent struct { + // Name of the component device. + Name string + // DescriptorIndex number of component device, e.g. the order in the superblock. + DescriptorIndex int32 + // Flags per Linux drivers/md/md.[ch] as of v6.12-rc1 + // Subset that are exposed in mdstat + WriteMostly bool + Journal bool + Faulty bool // "Faulty" is what kernel source uses for "(F)" + Spare bool + Replacement bool + // Some additional flags that are NOT exposed in procfs today; they may + // be available via sysfs. + // In_sync, Bitmap_sync, Blocked, WriteErrorSeen, FaultRecorded, + // BlockedBadBlocks, WantReplacement, Candidate, ... +} + // MDStat holds info parsed from /proc/mdstat. type MDStat struct { // Name of the device. Name string + // raid type of the device. + Type string // activity-state of the device. ActivityState string // Number of active disks. @@ -58,8 +79,8 @@ type MDStat struct { BlocksSyncedFinishTime float64 // current sync speed (in Kilobytes/sec) BlocksSyncedSpeed float64 - // Name of md component devices - Devices []string + // component devices + Devices []MDStatComponent } // MDStat parses an mdstat-file (/proc/mdstat) and returns a slice of @@ -80,28 +101,52 @@ func (fs FS) MDStat() ([]MDStat, error) { // parseMDStat parses data from mdstat file (/proc/mdstat) and returns a slice of // structs containing the relevant info. func parseMDStat(mdStatData []byte) ([]MDStat, error) { + // TODO: + // - parse global hotspares from the "unused devices" line. mdStats := []MDStat{} lines := strings.Split(string(mdStatData), "\n") + knownRaidTypes := make(map[string]bool) for i, line := range lines { if strings.TrimSpace(line) == "" || line[0] == ' ' || - strings.HasPrefix(line, "Personalities") || strings.HasPrefix(line, "unused") { continue } + // Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] + if len(knownRaidTypes) == 0 && strings.HasPrefix(line, personalitiesPrefix) { + personalities := strings.Fields(line[len(personalitiesPrefix):]) + for _, word := range personalities { + word := word[1 : len(word)-1] + knownRaidTypes[word] = true + } + continue + } deviceFields := strings.Fields(line) if len(deviceFields) < 3 { return nil, fmt.Errorf("%w: Expected 3+ lines, got %q", ErrFileParse, line) } mdName := deviceFields[0] // mdx - state := deviceFields[2] // active or inactive + state := deviceFields[2] // active, inactive, broken + + mdType := "unknown" // raid1, raid5, etc. + var deviceStartIndex int + if len(deviceFields) > 3 { // mdType may be in the 3rd or 4th field + if isRaidType(deviceFields[3], knownRaidTypes) { + mdType = deviceFields[3] + deviceStartIndex = 4 + } else if len(deviceFields) > 4 && isRaidType(deviceFields[4], knownRaidTypes) { + // if the 3rd field is (...), the 4th field is the mdType + mdType = deviceFields[4] + deviceStartIndex = 5 + } + } if len(lines) <= i+3 { return nil, fmt.Errorf("%w: Too few lines for md device: %q", ErrFileParse, mdName) } - // Failed disks have the suffix (F) & Spare disks have the suffix (S). + // Failed (Faulty) disks have the suffix (F) & Spare disks have the suffix (S). fail := int64(strings.Count(line, "(F)")) spare := int64(strings.Count(line, "(S)")) active, total, down, size, err := evalStatusLine(lines[i], lines[i+1]) @@ -123,16 +168,20 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) { finish := float64(0) pct := float64(0) recovering := strings.Contains(lines[syncLineIdx], "recovery") + reshaping := strings.Contains(lines[syncLineIdx], "reshape") resyncing := strings.Contains(lines[syncLineIdx], "resync") checking := strings.Contains(lines[syncLineIdx], "check") // Append recovery and resyncing state info. - if recovering || resyncing || checking { - if recovering { + if recovering || resyncing || checking || reshaping { + switch { + case recovering: state = "recovering" - } else if checking { + case reshaping: + state = "reshaping" + case checking: state = "checking" - } else { + default: state = "resyncing" } @@ -148,8 +197,14 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) { } } + devices, err := evalComponentDevices(deviceFields[deviceStartIndex:]) + if err != nil { + return nil, fmt.Errorf("error parsing components in md device %q: %w", mdName, err) + } + mdStats = append(mdStats, MDStat{ Name: mdName, + Type: mdType, ActivityState: state, DisksActive: active, DisksFailed: fail, @@ -162,14 +217,24 @@ func parseMDStat(mdStatData []byte) ([]MDStat, error) { BlocksSyncedPct: pct, BlocksSyncedFinishTime: finish, BlocksSyncedSpeed: speed, - Devices: evalComponentDevices(deviceFields), + Devices: devices, }) } return mdStats, nil } +// check if a string's format is like the mdType +// Rule 1: mdType should not be like (...) +// Rule 2: mdType should not be like sda[0] +// . +func isRaidType(mdType string, knownRaidTypes map[string]bool) bool { + _, ok := knownRaidTypes[mdType] + return !strings.ContainsAny(mdType, "([") && ok +} + func evalStatusLine(deviceLine, statusLine string) (active, total, down, size int64, err error) { + // e.g. 523968 blocks super 1.2 [4/4] [UUUU] statusFields := strings.Fields(statusLine) if len(statusFields) < 1 { return 0, 0, 0, 0, fmt.Errorf("%w: Unexpected statusline %q: %w", ErrFileParse, statusLine, err) @@ -260,17 +325,29 @@ func evalRecoveryLine(recoveryLine string) (blocksSynced int64, blocksToBeSynced return blocksSynced, blocksToBeSynced, pct, finish, speed, nil } -func evalComponentDevices(deviceFields []string) []string { - mdComponentDevices := make([]string, 0) - if len(deviceFields) > 3 { - for _, field := range deviceFields[4:] { - match := componentDeviceRE.FindStringSubmatch(field) - if match == nil { - continue - } - mdComponentDevices = append(mdComponentDevices, match[1]) +func evalComponentDevices(deviceFields []string) ([]MDStatComponent, error) { + mdComponentDevices := make([]MDStatComponent, 0) + for _, field := range deviceFields { + match := componentDeviceRE.FindStringSubmatch(field) + if match == nil { + continue + } + descriptorIndex, err := strconv.ParseInt(match[2], 10, 32) + if err != nil { + return mdComponentDevices, fmt.Errorf("error parsing int from device %q: %w", match[2], err) } + mdComponentDevices = append(mdComponentDevices, MDStatComponent{ + Name: match[1], + DescriptorIndex: int32(descriptorIndex), + // match may contain one or more of these + // https://github.com/torvalds/linux/blob/7ec462100ef9142344ddbf86f2c3008b97acddbe/drivers/md/md.c#L8376-L8392 + Faulty: strings.Contains(match[3], "(F)"), + Spare: strings.Contains(match[3], "(S)"), + Journal: strings.Contains(match[3], "(J)"), + Replacement: strings.Contains(match[3], "(R)"), + WriteMostly: strings.Contains(match[3], "(W)"), + }) } - return mdComponentDevices + return mdComponentDevices, nil } diff --git a/vendor/github.com/prometheus/procfs/meminfo.go b/vendor/github.com/prometheus/procfs/meminfo.go index 4b2c4050a3d..34203831871 100644 --- a/vendor/github.com/prometheus/procfs/meminfo.go +++ b/vendor/github.com/prometheus/procfs/meminfo.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -66,6 +66,10 @@ type Meminfo struct { // Memory which has been evicted from RAM, and is temporarily // on the disk SwapFree *uint64 + // Memory consumed by the zswap backend (compressed size) + Zswap *uint64 + // Amount of anonymous memory stored in zswap (original size) + Zswapped *uint64 // Memory which is waiting to get written back to the disk Dirty *uint64 // Memory which is actively being written back to the disk @@ -85,6 +89,8 @@ type Meminfo struct { // amount of memory dedicated to the lowest level of page // tables. PageTables *uint64 + // secondary page tables. + SecPageTables *uint64 // NFS pages sent to the server, but not yet committed to // stable storage NFSUnstable *uint64 @@ -129,15 +135,18 @@ type Meminfo struct { Percpu *uint64 HardwareCorrupted *uint64 AnonHugePages *uint64 + FileHugePages *uint64 ShmemHugePages *uint64 ShmemPmdMapped *uint64 CmaTotal *uint64 CmaFree *uint64 + Unaccepted *uint64 HugePagesTotal *uint64 HugePagesFree *uint64 HugePagesRsvd *uint64 HugePagesSurp *uint64 Hugepagesize *uint64 + Hugetlb *uint64 DirectMap4k *uint64 DirectMap2M *uint64 DirectMap1G *uint64 @@ -161,6 +170,8 @@ type Meminfo struct { MlockedBytes *uint64 SwapTotalBytes *uint64 SwapFreeBytes *uint64 + ZswapBytes *uint64 + ZswappedBytes *uint64 DirtyBytes *uint64 WritebackBytes *uint64 AnonPagesBytes *uint64 @@ -171,6 +182,7 @@ type Meminfo struct { SUnreclaimBytes *uint64 KernelStackBytes *uint64 PageTablesBytes *uint64 + SecPageTablesBytes *uint64 NFSUnstableBytes *uint64 BounceBytes *uint64 WritebackTmpBytes *uint64 @@ -182,11 +194,14 @@ type Meminfo struct { PercpuBytes *uint64 HardwareCorruptedBytes *uint64 AnonHugePagesBytes *uint64 + FileHugePagesBytes *uint64 ShmemHugePagesBytes *uint64 ShmemPmdMappedBytes *uint64 CmaTotalBytes *uint64 CmaFreeBytes *uint64 + UnacceptedBytes *uint64 HugepagesizeBytes *uint64 + HugetlbBytes *uint64 DirectMap4kBytes *uint64 DirectMap2MBytes *uint64 DirectMap1GBytes *uint64 @@ -287,6 +302,12 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) { case "SwapFree:": m.SwapFree = &val m.SwapFreeBytes = &valBytes + case "Zswap:": + m.Zswap = &val + m.ZswapBytes = &valBytes + case "Zswapped:": + m.Zswapped = &val + m.ZswappedBytes = &valBytes case "Dirty:": m.Dirty = &val m.DirtyBytes = &valBytes @@ -317,6 +338,9 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) { case "PageTables:": m.PageTables = &val m.PageTablesBytes = &valBytes + case "SecPageTables:": + m.SecPageTables = &val + m.SecPageTablesBytes = &valBytes case "NFS_Unstable:": m.NFSUnstable = &val m.NFSUnstableBytes = &valBytes @@ -350,6 +374,9 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) { case "AnonHugePages:": m.AnonHugePages = &val m.AnonHugePagesBytes = &valBytes + case "FileHugePages:": + m.FileHugePages = &val + m.FileHugePagesBytes = &valBytes case "ShmemHugePages:": m.ShmemHugePages = &val m.ShmemHugePagesBytes = &valBytes @@ -362,6 +389,9 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) { case "CmaFree:": m.CmaFree = &val m.CmaFreeBytes = &valBytes + case "Unaccepted:": + m.Unaccepted = &val + m.UnacceptedBytes = &valBytes case "HugePages_Total:": m.HugePagesTotal = &val case "HugePages_Free:": @@ -373,6 +403,9 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) { case "Hugepagesize:": m.Hugepagesize = &val m.HugepagesizeBytes = &valBytes + case "Hugetlb:": + m.Hugetlb = &val + m.HugetlbBytes = &valBytes case "DirectMap4k:": m.DirectMap4k = &val m.DirectMap4kBytes = &valBytes diff --git a/vendor/github.com/prometheus/procfs/mountinfo.go b/vendor/github.com/prometheus/procfs/mountinfo.go index a704c5e735f..9414a12f42f 100644 --- a/vendor/github.com/prometheus/procfs/mountinfo.go +++ b/vendor/github.com/prometheus/procfs/mountinfo.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -147,8 +147,7 @@ func mountOptionsParseOptionalFields(o []string) (map[string]string, error) { // mountOptionsParser parses the mount options, superblock options. func mountOptionsParser(mountOptions string) map[string]string { opts := make(map[string]string) - options := strings.Split(mountOptions, ",") - for _, opt := range options { + for opt := range strings.SplitSeq(mountOptions, ",") { splitOption := strings.Split(opt, "=") if len(splitOption) < 2 { key := splitOption[0] @@ -178,3 +177,21 @@ func GetProcMounts(pid int) ([]*MountInfo, error) { } return parseMountInfo(data) } + +// GetMounts retrieves mountinfo information from `/proc/self/mountinfo`. +func (fs FS) GetMounts() ([]*MountInfo, error) { + data, err := util.ReadFileNoStat(fs.proc.Path("self/mountinfo")) + if err != nil { + return nil, err + } + return parseMountInfo(data) +} + +// GetProcMounts retrieves mountinfo information from a processes' `/proc//mountinfo`. +func (fs FS) GetProcMounts(pid int) ([]*MountInfo, error) { + data, err := util.ReadFileNoStat(fs.proc.Path(fmt.Sprintf("%d/mountinfo", pid))) + if err != nil { + return nil, err + } + return parseMountInfo(data) +} diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go index 50caa73274e..e503cb3a6c5 100644 --- a/vendor/github.com/prometheus/procfs/mountstats.go +++ b/vendor/github.com/prometheus/procfs/mountstats.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -383,7 +383,7 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e if stats.Opts == nil { stats.Opts = map[string]string{} } - for _, opt := range strings.Split(ss[1], ",") { + for opt := range strings.SplitSeq(ss[1], ",") { split := strings.Split(opt, "=") if len(split) == 2 { stats.Opts[split[0]] = split[1] diff --git a/vendor/github.com/prometheus/procfs/net_conntrackstat.go b/vendor/github.com/prometheus/procfs/net_conntrackstat.go index 316df5fbb74..e9ca3570790 100644 --- a/vendor/github.com/prometheus/procfs/net_conntrackstat.go +++ b/vendor/github.com/prometheus/procfs/net_conntrackstat.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_dev.go b/vendor/github.com/prometheus/procfs/net_dev.go index e66208aa05f..7b3e1d61c95 100644 --- a/vendor/github.com/prometheus/procfs/net_dev.go +++ b/vendor/github.com/prometheus/procfs/net_dev.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_dev_snmp6.go b/vendor/github.com/prometheus/procfs/net_dev_snmp6.go index f50b38e3528..2a0f60f29fe 100644 --- a/vendor/github.com/prometheus/procfs/net_dev_snmp6.go +++ b/vendor/github.com/prometheus/procfs/net_dev_snmp6.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -18,6 +18,7 @@ import ( "errors" "io" "os" + "path/filepath" "strconv" "strings" ) @@ -56,7 +57,9 @@ func newNetDevSNMP6(dir string) (NetDevSNMP6, error) { } for _, iFaceFile := range ifaceFiles { - f, err := os.Open(dir + "/" + iFaceFile.Name()) + filePath := filepath.Join(dir, iFaceFile.Name()) + + f, err := os.Open(filePath) if err != nil { return netDevSNMP6, err } diff --git a/vendor/github.com/prometheus/procfs/net_ip_socket.go b/vendor/github.com/prometheus/procfs/net_ip_socket.go index 19e3378f72d..9291f8cd4c8 100644 --- a/vendor/github.com/prometheus/procfs/net_ip_socket.go +++ b/vendor/github.com/prometheus/procfs/net_ip_socket.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_protocols.go b/vendor/github.com/prometheus/procfs/net_protocols.go index 8d4b1ac05b0..eaa996cbcf1 100644 --- a/vendor/github.com/prometheus/procfs/net_protocols.go +++ b/vendor/github.com/prometheus/procfs/net_protocols.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 @@ -169,7 +169,7 @@ func (pc *NetProtocolCapabilities) parseCapabilities(capabilities []string) erro &pc.EnterMemoryPressure, } - for i := 0; i < len(capabilities); i++ { + for i := range capabilities { switch capabilities[i] { case "y": *capabilityFields[i] = true diff --git a/vendor/github.com/prometheus/procfs/net_route.go b/vendor/github.com/prometheus/procfs/net_route.go index deb7029fe1e..fa3812d9d00 100644 --- a/vendor/github.com/prometheus/procfs/net_route.go +++ b/vendor/github.com/prometheus/procfs/net_route.go @@ -1,4 +1,4 @@ -// Copyright 2023 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_sockstat.go b/vendor/github.com/prometheus/procfs/net_sockstat.go index fae62b13d96..8b221ebfff7 100644 --- a/vendor/github.com/prometheus/procfs/net_sockstat.go +++ b/vendor/github.com/prometheus/procfs/net_sockstat.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -139,9 +139,6 @@ func parseSockstatKVs(kvs []string) (map[string]int, error) { func parseSockstatProtocol(kvs map[string]int) NetSockstatProtocol { var nsp NetSockstatProtocol for k, v := range kvs { - // Capture the range variable to ensure we get unique pointers for - // each of the optional fields. - v := v switch k { case "inuse": nsp.InUse = v diff --git a/vendor/github.com/prometheus/procfs/net_softnet.go b/vendor/github.com/prometheus/procfs/net_softnet.go index 71c8059f4d7..4a2dfa18fd8 100644 --- a/vendor/github.com/prometheus/procfs/net_softnet.go +++ b/vendor/github.com/prometheus/procfs/net_softnet.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_tcp.go b/vendor/github.com/prometheus/procfs/net_tcp.go index 0396d72015c..610ea78e564 100644 --- a/vendor/github.com/prometheus/procfs/net_tcp.go +++ b/vendor/github.com/prometheus/procfs/net_tcp.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_tls_stat.go b/vendor/github.com/prometheus/procfs/net_tls_stat.go index 13994c1782f..b1b3f6a6a2f 100644 --- a/vendor/github.com/prometheus/procfs/net_tls_stat.go +++ b/vendor/github.com/prometheus/procfs/net_tls_stat.go @@ -1,4 +1,4 @@ -// Copyright 2023 Prometheus Team +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_udp.go b/vendor/github.com/prometheus/procfs/net_udp.go index 9ac3daf2d4c..8a327791026 100644 --- a/vendor/github.com/prometheus/procfs/net_udp.go +++ b/vendor/github.com/prometheus/procfs/net_udp.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_unix.go b/vendor/github.com/prometheus/procfs/net_unix.go index d7e0cacb4c6..e4d63592365 100644 --- a/vendor/github.com/prometheus/procfs/net_unix.go +++ b/vendor/github.com/prometheus/procfs/net_unix.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_wireless.go b/vendor/github.com/prometheus/procfs/net_wireless.go index 7c597bc8708..69d07944516 100644 --- a/vendor/github.com/prometheus/procfs/net_wireless.go +++ b/vendor/github.com/prometheus/procfs/net_wireless.go @@ -1,4 +1,4 @@ -// Copyright 2023 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/net_xfrm.go b/vendor/github.com/prometheus/procfs/net_xfrm.go index 932ef204684..5a9f497d190 100644 --- a/vendor/github.com/prometheus/procfs/net_xfrm.go +++ b/vendor/github.com/prometheus/procfs/net_xfrm.go @@ -1,4 +1,4 @@ -// Copyright 2017 Prometheus Team +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/netstat.go b/vendor/github.com/prometheus/procfs/netstat.go index 742dff453ba..dbdae473924 100644 --- a/vendor/github.com/prometheus/procfs/netstat.go +++ b/vendor/github.com/prometheus/procfs/netstat.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/nfnetlink_queue.go b/vendor/github.com/prometheus/procfs/nfnetlink_queue.go new file mode 100644 index 00000000000..b0a73b11e9e --- /dev/null +++ b/vendor/github.com/prometheus/procfs/nfnetlink_queue.go @@ -0,0 +1,85 @@ +// Copyright The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + + "github.com/prometheus/procfs/internal/util" +) + +const nfNetLinkQueueFormat = "%d %d %d %d %d %d %d %d %d" + +// NFNetLinkQueue contains general information about netfilter queues found in /proc/net/netfilter/nfnetlink_queue. +type NFNetLinkQueue struct { + // id of the queue + QueueID uint + // pid of process handling the queue + PeerPID uint + // number of packets waiting for a decision + QueueTotal uint + // indicate how userspace receive packets + CopyMode uint + // size of copy + CopyRange uint + // number of items dropped by the kernel because too many packets were waiting a decision. + // It queue_total is superior to queue_max_len (1024 per default) the packets are dropped. + QueueDropped uint + // number of packets dropped by userspace (due to kernel send failure on the netlink socket) + QueueUserDropped uint + // sequence number of packets queued. It gives a correct approximation of the number of queued packets. + SequenceID uint + // internal value (number of entity using the queue) + Use uint +} + +// NFNetLinkQueue returns information about current state of netfilter queues. +func (fs FS) NFNetLinkQueue() ([]NFNetLinkQueue, error) { + data, err := util.ReadFileNoStat(fs.proc.Path("net/netfilter/nfnetlink_queue")) + if err != nil { + return nil, err + } + + queue := []NFNetLinkQueue{} + if len(data) == 0 { + return queue, nil + } + + scanner := bufio.NewScanner(bytes.NewReader(data)) + for scanner.Scan() { + line := scanner.Text() + nFNetLinkQueue, err := parseNFNetLinkQueueLine(line) + if err != nil { + return nil, err + } + queue = append(queue, *nFNetLinkQueue) + } + return queue, nil +} + +// parseNFNetLinkQueueLine parses each line of the /proc/net/netfilter/nfnetlink_queue file. +func parseNFNetLinkQueueLine(line string) (*NFNetLinkQueue, error) { + nFNetLinkQueue := NFNetLinkQueue{} + _, err := fmt.Sscanf( + line, nfNetLinkQueueFormat, + &nFNetLinkQueue.QueueID, &nFNetLinkQueue.PeerPID, &nFNetLinkQueue.QueueTotal, &nFNetLinkQueue.CopyMode, + &nFNetLinkQueue.CopyRange, &nFNetLinkQueue.QueueDropped, &nFNetLinkQueue.QueueUserDropped, &nFNetLinkQueue.SequenceID, &nFNetLinkQueue.Use, + ) + if err != nil { + return nil, err + } + return &nFNetLinkQueue, nil +} diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go index 368187fa884..39c14aa55eb 100644 --- a/vendor/github.com/prometheus/procfs/proc.go +++ b/vendor/github.com/prometheus/procfs/proc.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -49,7 +49,7 @@ func (p Procs) Less(i, j int) bool { return p[i].PID < p[j].PID } // Self returns a process for the current process read via /proc/self. func Self() (Proc, error) { fs, err := NewFS(DefaultMountPoint) - if err != nil || errors.Unwrap(err) == ErrMountPoint { + if err != nil || errors.Is(err, ErrMountPoint) { return Proc{}, err } return fs.Self() diff --git a/vendor/github.com/prometheus/procfs/proc_cgroup.go b/vendor/github.com/prometheus/procfs/proc_cgroup.go index 4a64347c03a..535c08d6fc0 100644 --- a/vendor/github.com/prometheus/procfs/proc_cgroup.go +++ b/vendor/github.com/prometheus/procfs/proc_cgroup.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_cgroups.go b/vendor/github.com/prometheus/procfs/proc_cgroups.go index 5dd4938999a..0b275c3b1f5 100644 --- a/vendor/github.com/prometheus/procfs/proc_cgroups.go +++ b/vendor/github.com/prometheus/procfs/proc_cgroups.go @@ -1,4 +1,4 @@ -// Copyright 2021 The Prometheus Authors +// Copyright The Prometheus 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 @@ -40,13 +40,13 @@ type CgroupSummary struct { // parseCgroupSummary parses each line of the /proc/cgroup file // Line format is `subsys_name hierarchy num_cgroups enabled`. -func parseCgroupSummaryString(CgroupSummaryStr string) (*CgroupSummary, error) { +func parseCgroupSummaryString(cgroupSummaryStr string) (*CgroupSummary, error) { var err error - fields := strings.Fields(CgroupSummaryStr) + fields := strings.Fields(cgroupSummaryStr) // require at least 4 fields if len(fields) < 4 { - return nil, fmt.Errorf("%w: 4+ fields required, found %d fields in cgroup info string: %s", ErrFileParse, len(fields), CgroupSummaryStr) + return nil, fmt.Errorf("%w: 4+ fields required, found %d fields in cgroup info string: %s", ErrFileParse, len(fields), cgroupSummaryStr) } CgroupSummary := &CgroupSummary{ diff --git a/vendor/github.com/prometheus/procfs/proc_environ.go b/vendor/github.com/prometheus/procfs/proc_environ.go index 57a89895d66..5b941de0477 100644 --- a/vendor/github.com/prometheus/procfs/proc_environ.go +++ b/vendor/github.com/prometheus/procfs/proc_environ.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_fdinfo.go b/vendor/github.com/prometheus/procfs/proc_fdinfo.go index fa761b35295..fa57761dbe3 100644 --- a/vendor/github.com/prometheus/procfs/proc_fdinfo.go +++ b/vendor/github.com/prometheus/procfs/proc_fdinfo.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -60,15 +60,16 @@ func (p Proc) FDInfo(fd string) (*ProcFDInfo, error) { scanner := bufio.NewScanner(bytes.NewReader(data)) for scanner.Scan() { text = scanner.Text() - if rPos.MatchString(text) { + switch { + case rPos.MatchString(text): pos = rPos.FindStringSubmatch(text)[1] - } else if rFlags.MatchString(text) { + case rFlags.MatchString(text): flags = rFlags.FindStringSubmatch(text)[1] - } else if rMntID.MatchString(text) { + case rMntID.MatchString(text): mntid = rMntID.FindStringSubmatch(text)[1] - } else if rIno.MatchString(text) { + case rIno.MatchString(text): ino = rIno.FindStringSubmatch(text)[1] - } else if rInotify.MatchString(text) { + case rInotify.MatchString(text): newInotify, err := parseInotifyInfo(text) if err != nil { return nil, err diff --git a/vendor/github.com/prometheus/procfs/proc_interrupts.go b/vendor/github.com/prometheus/procfs/proc_interrupts.go index 86b4b452463..b942c50723c 100644 --- a/vendor/github.com/prometheus/procfs/proc_interrupts.go +++ b/vendor/github.com/prometheus/procfs/proc_interrupts.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_io.go b/vendor/github.com/prometheus/procfs/proc_io.go index d15b66ddb64..dd8086ba2e7 100644 --- a/vendor/github.com/prometheus/procfs/proc_io.go +++ b/vendor/github.com/prometheus/procfs/proc_io.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go index 9530b14bc68..4b7d3378471 100644 --- a/vendor/github.com/prometheus/procfs/proc_limits.go +++ b/vendor/github.com/prometheus/procfs/proc_limits.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -19,6 +19,7 @@ import ( "os" "regexp" "strconv" + "strings" ) // ProcLimits represents the soft limits for each of the process's resource @@ -74,7 +75,7 @@ const ( ) var ( - limitsMatch = regexp.MustCompile(`(Max \w+\s{0,1}?\w*\s{0,1}\w*)\s{2,}(\w+)\s+(\w+)`) + limitsMatch = regexp.MustCompile(`(Max \w+\s??\w*\s?\w*)\s{2,}(\w+)\s+(\w+)`) ) // NewLimits returns the current soft limits of the process. @@ -106,7 +107,7 @@ func (p Proc) Limits() (ProcLimits, error) { return ProcLimits{}, fmt.Errorf("%w: couldn't parse %q line %q", ErrFileParse, f.Name(), s.Text()) } - switch fields[1] { + switch strings.TrimSpace(fields[1]) { case "Max cpu time": l.CPUTime, err = parseUint(fields[2]) case "Max file size": diff --git a/vendor/github.com/prometheus/procfs/proc_maps.go b/vendor/github.com/prometheus/procfs/proc_maps.go index 7e75c286b5b..cc519f92f9a 100644 --- a/vendor/github.com/prometheus/procfs/proc_maps.go +++ b/vendor/github.com/prometheus/procfs/proc_maps.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_netstat.go b/vendor/github.com/prometheus/procfs/proc_netstat.go index 4248c1716ee..7f94cc89145 100644 --- a/vendor/github.com/prometheus/procfs/proc_netstat.go +++ b/vendor/github.com/prometheus/procfs/proc_netstat.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_ns.go b/vendor/github.com/prometheus/procfs/proc_ns.go index 0f8f847f954..5fc0eb9e2f9 100644 --- a/vendor/github.com/prometheus/procfs/proc_ns.go +++ b/vendor/github.com/prometheus/procfs/proc_ns.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_psi.go b/vendor/github.com/prometheus/procfs/proc_psi.go index ccd35f153a0..cc2c5de873e 100644 --- a/vendor/github.com/prometheus/procfs/proc_psi.go +++ b/vendor/github.com/prometheus/procfs/proc_psi.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_smaps.go b/vendor/github.com/prometheus/procfs/proc_smaps.go index 9a297afcf89..3e48afd1d39 100644 --- a/vendor/github.com/prometheus/procfs/proc_smaps.go +++ b/vendor/github.com/prometheus/procfs/proc_smaps.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_snmp.go b/vendor/github.com/prometheus/procfs/proc_snmp.go index 4bdc90b07ea..8d9a9bcd67a 100644 --- a/vendor/github.com/prometheus/procfs/proc_snmp.go +++ b/vendor/github.com/prometheus/procfs/proc_snmp.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_snmp6.go b/vendor/github.com/prometheus/procfs/proc_snmp6.go index fb7fd3995be..841fef46492 100644 --- a/vendor/github.com/prometheus/procfs/proc_snmp6.go +++ b/vendor/github.com/prometheus/procfs/proc_snmp6.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go index 06a8d931c98..02e3f9e316a 100644 --- a/vendor/github.com/prometheus/procfs/proc_stat.go +++ b/vendor/github.com/prometheus/procfs/proc_stat.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -101,6 +101,12 @@ type ProcStat struct { RSS int // Soft limit in bytes on the rss of the process. RSSLimit uint64 + // The address above which program text can run. + StartCode uint64 + // The address below which program text can run. + EndCode uint64 + // The address of the start (i.e., bottom) of the stack. + StartStack uint64 // CPU number last executed on. Processor uint // Real-time scheduling priority, a number in the range 1 to 99 for processes @@ -177,9 +183,9 @@ func (p Proc) Stat() (ProcStat, error) { &s.VSize, &s.RSS, &s.RSSLimit, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, + &s.StartCode, + &s.EndCode, + &s.StartStack, &ignoreUint64, &ignoreUint64, &ignoreUint64, diff --git a/vendor/github.com/prometheus/procfs/proc_statm.go b/vendor/github.com/prometheus/procfs/proc_statm.go new file mode 100644 index 00000000000..b0a93601677 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_statm.go @@ -0,0 +1,116 @@ +// Copyright The Prometheus 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 procfs + +import ( + "os" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// - https://man7.org/linux/man-pages/man5/proc_pid_statm.5.html + +// ProcStatm Provides memory usage information for a process, measured in memory pages. +// Read from /proc/[pid]/statm. +type ProcStatm struct { + // The process ID. + PID int + // total program size (same as VmSize in status) + Size uint64 + // resident set size (same as VmRSS in status) + Resident uint64 + // number of resident shared pages (i.e., backed by a file) + Shared uint64 + // text (code) + Text uint64 + // library (unused since Linux 2.6; always 0) + Lib uint64 + // data + stack + Data uint64 + // dirty pages (unused since Linux 2.6; always 0) + Dt uint64 +} + +// NewStatm returns the current status information of the process. +// Deprecated: Use p.Statm() instead. +func (p Proc) NewStatm() (ProcStatm, error) { + return p.Statm() +} + +// Statm returns the current memory usage information of the process. +func (p Proc) Statm() (ProcStatm, error) { + data, err := util.ReadFileNoStat(p.path("statm")) + if err != nil { + return ProcStatm{}, err + } + + statmSlice, err := parseStatm(data) + if err != nil { + return ProcStatm{}, err + } + + procStatm := ProcStatm{ + PID: p.PID, + Size: statmSlice[0], + Resident: statmSlice[1], + Shared: statmSlice[2], + Text: statmSlice[3], + Lib: statmSlice[4], + Data: statmSlice[5], + Dt: statmSlice[6], + } + + return procStatm, nil +} + +// parseStatm return /proc/[pid]/statm data to uint64 slice. +func parseStatm(data []byte) ([]uint64, error) { + var statmSlice []uint64 + statmItems := strings.Fields(string(data)) + for i := range statmItems { + statmItem, err := strconv.ParseUint(statmItems[i], 10, 64) + if err != nil { + return nil, err + } + statmSlice = append(statmSlice, statmItem) + } + return statmSlice, nil +} + +// SizeBytes returns the process of total program size in bytes. +func (s ProcStatm) SizeBytes() uint64 { + return s.Size * uint64(os.Getpagesize()) +} + +// ResidentBytes returns the process of resident set size in bytes. +func (s ProcStatm) ResidentBytes() uint64 { + return s.Resident * uint64(os.Getpagesize()) +} + +// SHRBytes returns the process of share memory size in bytes. +func (s ProcStatm) SHRBytes() uint64 { + return s.Shared * uint64(os.Getpagesize()) +} + +// TextBytes returns the process of text (code) size in bytes. +func (s ProcStatm) TextBytes() uint64 { + return s.Text * uint64(os.Getpagesize()) +} + +// DataBytes returns the process of data + stack size in bytes. +func (s ProcStatm) DataBytes() uint64 { + return s.Data * uint64(os.Getpagesize()) +} diff --git a/vendor/github.com/prometheus/procfs/proc_status.go b/vendor/github.com/prometheus/procfs/proc_status.go index dd8aa56885e..1ed2bced417 100644 --- a/vendor/github.com/prometheus/procfs/proc_status.go +++ b/vendor/github.com/prometheus/procfs/proc_status.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -16,7 +16,7 @@ package procfs import ( "bytes" "math/bits" - "sort" + "slices" "strconv" "strings" @@ -94,8 +94,7 @@ func (p Proc) NewStatus() (ProcStatus, error) { s := ProcStatus{PID: p.PID} - lines := strings.Split(string(data), "\n") - for _, line := range lines { + for line := range strings.SplitSeq(string(data), "\n") { if !bytes.Contains([]byte(line), []byte(":")) { continue } @@ -222,7 +221,7 @@ func calcCpusAllowedList(cpuString string) []uint64 { } - sort.Slice(g, func(i, j int) bool { return g[i] < g[j] }) + slices.Sort(g) return g } diff --git a/vendor/github.com/prometheus/procfs/proc_sys.go b/vendor/github.com/prometheus/procfs/proc_sys.go index 3810d1ac999..52658a4d52d 100644 --- a/vendor/github.com/prometheus/procfs/proc_sys.go +++ b/vendor/github.com/prometheus/procfs/proc_sys.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/schedstat.go b/vendor/github.com/prometheus/procfs/schedstat.go index 5f7f32dc83c..fafd8dff740 100644 --- a/vendor/github.com/prometheus/procfs/schedstat.go +++ b/vendor/github.com/prometheus/procfs/schedstat.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/slab.go b/vendor/github.com/prometheus/procfs/slab.go index 8611c901770..32a04678ad0 100644 --- a/vendor/github.com/prometheus/procfs/slab.go +++ b/vendor/github.com/prometheus/procfs/slab.go @@ -1,4 +1,4 @@ -// Copyright 2020 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/softirqs.go b/vendor/github.com/prometheus/procfs/softirqs.go index 403e6ae7086..47b73a7297b 100644 --- a/vendor/github.com/prometheus/procfs/softirqs.go +++ b/vendor/github.com/prometheus/procfs/softirqs.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go index e36b41c18a9..593ad0f62f0 100644 --- a/vendor/github.com/prometheus/procfs/stat.go +++ b/vendor/github.com/prometheus/procfs/stat.go @@ -1,4 +1,4 @@ -// Copyright 2018 The Prometheus Authors +// Copyright The Prometheus 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 @@ -16,6 +16,7 @@ package procfs import ( "bufio" "bytes" + "errors" "fmt" "io" "strconv" @@ -92,7 +93,7 @@ func parseCPUStat(line string) (CPUStat, int64, error) { &cpuStat.Iowait, &cpuStat.IRQ, &cpuStat.SoftIRQ, &cpuStat.Steal, &cpuStat.Guest, &cpuStat.GuestNice) - if err != nil && err != io.EOF { + if err != nil && !errors.Is(err, io.EOF) { return CPUStat{}, -1, fmt.Errorf("%w: couldn't parse %q (cpu): %w", ErrFileParse, line, err) } if count == 0 { diff --git a/vendor/github.com/prometheus/procfs/swaps.go b/vendor/github.com/prometheus/procfs/swaps.go index 65fec834bf4..ee17bf4888c 100644 --- a/vendor/github.com/prometheus/procfs/swaps.go +++ b/vendor/github.com/prometheus/procfs/swaps.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/thread.go b/vendor/github.com/prometheus/procfs/thread.go index 80e0e947be7..0cfbb541844 100644 --- a/vendor/github.com/prometheus/procfs/thread.go +++ b/vendor/github.com/prometheus/procfs/thread.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/vm.go b/vendor/github.com/prometheus/procfs/vm.go index 51c49d89e81..2a8d7639097 100644 --- a/vendor/github.com/prometheus/procfs/vm.go +++ b/vendor/github.com/prometheus/procfs/vm.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 diff --git a/vendor/github.com/prometheus/procfs/zoneinfo.go b/vendor/github.com/prometheus/procfs/zoneinfo.go index e54d94b0903..806e171147d 100644 --- a/vendor/github.com/prometheus/procfs/zoneinfo.go +++ b/vendor/github.com/prometheus/procfs/zoneinfo.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Prometheus Authors +// Copyright The Prometheus 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 @@ -88,11 +88,9 @@ func parseZoneinfo(zoneinfoData []byte) ([]Zoneinfo, error) { zoneinfo := []Zoneinfo{} - zoneinfoBlocks := bytes.Split(zoneinfoData, []byte("\nNode")) - for _, block := range zoneinfoBlocks { + for block := range bytes.SplitSeq(zoneinfoData, []byte("\nNode")) { var zoneinfoElement Zoneinfo - lines := strings.Split(string(block), "\n") - for _, line := range lines { + for line := range strings.SplitSeq(string(block), "\n") { if nodeZone := nodeZoneRE.FindStringSubmatch(line); nodeZone != nil { zoneinfoElement.Node = nodeZone[1] diff --git a/vendor/github.com/prometheus/sigv4/.golangci.yml b/vendor/github.com/prometheus/sigv4/.golangci.yml index 255980fa81b..070f76e9107 100644 --- a/vendor/github.com/prometheus/sigv4/.golangci.yml +++ b/vendor/github.com/prometheus/sigv4/.golangci.yml @@ -2,41 +2,31 @@ version: "2" linters: enable: - errorlint + - gocritic - misspell - revive - testifylint settings: + gocritic: + enable-all: true + disabled-checks: + - whyNoLint revive: rules: - name: unused-parameter severity: warning disabled: true testifylint: - enable: - - bool-compare - - compares - - empty - - error-is-as - - error-nil - - expected-actual - - len - - require-error - - suite-dont-use-pkg - - suite-extra-assert-call + enable-all: true disable: - float-compare - go-require exclusions: - generated: lax presets: - comments - common-false-positives - legacy - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ issues: max-issues-per-linter: 0 max-same-issues: 0 @@ -48,9 +38,4 @@ formatters: goimports: local-prefixes: - github.com/prometheus/sigv4 - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ + diff --git a/vendor/github.com/prometheus/sigv4/sigv4.go b/vendor/github.com/prometheus/sigv4/sigv4.go index 8ad1a2cbe37..15d984d39e3 100644 --- a/vendor/github.com/prometheus/sigv4/sigv4.go +++ b/vendor/github.com/prometheus/sigv4/sigv4.go @@ -99,7 +99,15 @@ func NewSigV4RoundTripper(cfg *SigV4Config, next http.RoundTripper) (http.RoundT } if cfg.RoleARN != "" { - awscfg.Credentials = stscreds.NewAssumeRoleProvider(sts.NewFromConfig(awscfg), cfg.RoleARN) + awscfg.Credentials = stscreds.NewAssumeRoleProvider( + sts.NewFromConfig(awscfg), + cfg.RoleARN, + func(o *stscreds.AssumeRoleOptions) { + if cfg.ExternalID != "" { + o.ExternalID = aws.String(cfg.ExternalID) + } + }, + ) } serviceName := "aps" @@ -119,7 +127,7 @@ func NewSigV4RoundTripper(cfg *SigV4Config, next http.RoundTripper) (http.RoundT return rt, nil } -func (rt *sigV4RoundTripper) newBuf() interface{} { +func (rt *sigV4RoundTripper) newBuf() any { return bytes.NewBuffer(make([]byte, 0, 1024)) } diff --git a/vendor/github.com/prometheus/sigv4/sigv4_config.go b/vendor/github.com/prometheus/sigv4/sigv4_config.go index d4b88f6d236..0057ddb696e 100644 --- a/vendor/github.com/prometheus/sigv4/sigv4_config.go +++ b/vendor/github.com/prometheus/sigv4/sigv4_config.go @@ -28,6 +28,7 @@ type SigV4Config struct { //nolint:revive SecretKey config.Secret `yaml:"secret_key,omitempty"` Profile string `yaml:"profile,omitempty"` RoleARN string `yaml:"role_arn,omitempty"` + ExternalID string `yaml:"external_id,omitempty"` UseFIPSSTSEndpoint bool `yaml:"use_fips_sts_endpoint,omitempty"` ServiceName string `yaml:"service_name,omitempty"` } @@ -36,10 +37,13 @@ func (c *SigV4Config) Validate() error { if (c.AccessKey == "") != (c.SecretKey == "") { return fmt.Errorf("must provide a AWS SigV4 Access key and Secret Key if credentials are specified in the SigV4 config") } + if c.ExternalID != "" && c.RoleARN == "" { + return fmt.Errorf("external_id can only be used with role_arn") + } return nil } -func (c *SigV4Config) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (c *SigV4Config) UnmarshalYAML(unmarshal func(any) error) error { type plain SigV4Config *c = SigV4Config{} if err := unmarshal((*plain)(c)); err != nil { diff --git a/vendor/github.com/spf13/afero/.editorconfig b/vendor/github.com/spf13/afero/.editorconfig new file mode 100644 index 00000000000..a85749f1900 --- /dev/null +++ b/vendor/github.com/spf13/afero/.editorconfig @@ -0,0 +1,15 @@ +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 + +[{*.yml,*.yaml}] +indent_size = 2 diff --git a/vendor/github.com/spf13/afero/.golangci.yaml b/vendor/github.com/spf13/afero/.golangci.yaml new file mode 100644 index 00000000000..4f359b81af1 --- /dev/null +++ b/vendor/github.com/spf13/afero/.golangci.yaml @@ -0,0 +1,48 @@ +version: "2" + +run: + timeout: 10m + +linters: + enable: + - govet + - ineffassign + - misspell + - nolintlint + # - revive + - staticcheck + - unused + + disable: + - errcheck + # - staticcheck + + settings: + misspell: + locale: US + nolintlint: + allow-unused: false # report any unused nolint directives + require-specific: false # don't require nolint directives to be specific about which linter is being skipped + + exclusions: + paths: + - gcsfs/internal/stiface + +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + - golines + + settings: + gci: + sections: + - standard + - default + - localmodule + + exclusions: + paths: + - gcsfs/internal/stiface diff --git a/vendor/github.com/spf13/afero/README.md b/vendor/github.com/spf13/afero/README.md index 3bafbfdfcaf..ef67e9a77e7 100644 --- a/vendor/github.com/spf13/afero/README.md +++ b/vendor/github.com/spf13/afero/README.md @@ -1,442 +1,474 @@ -![afero logo-sm](https://cloud.githubusercontent.com/assets/173412/11490338/d50e16dc-97a5-11e5-8b12-019a300d0fcb.png) +afero logo-sm -A FileSystem Abstraction System for Go -[![Test](https://github.com/spf13/afero/actions/workflows/test.yml/badge.svg)](https://github.com/spf13/afero/actions/workflows/test.yml) [![GoDoc](https://godoc.org/github.com/spf13/afero?status.svg)](https://godoc.org/github.com/spf13/afero) [![Join the chat at https://gitter.im/spf13/afero](https://badges.gitter.im/Dev%20Chat.svg)](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/afero/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/afero/actions?query=workflow%3ACI) +[![GoDoc](https://pkg.go.dev/badge/mod/github.com/spf13/afero)](https://pkg.go.dev/mod/github.com/spf13/afero) +[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/afero)](https://goreportcard.com/report/github.com/spf13/afero) +![Go Version](https://img.shields.io/badge/go%20version-%3E=1.23-61CFDD.svg?style=flat-square") -# Overview -Afero is a filesystem framework providing a simple, uniform and universal API -interacting with any filesystem, as an abstraction layer providing interfaces, -types and methods. Afero has an exceptionally clean interface and simple design -without needless constructors or initialization methods. +# Afero: The Universal Filesystem Abstraction for Go -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 -and benefit of the os and ioutil packages. +Afero is a powerful and extensible filesystem abstraction system for Go. It provides a single, unified API for interacting with diverse filesystems—including the local disk, memory, archives, and network storage. -Afero provides significant improvements over using the os package alone, most -notably the ability to create mock and testing filesystems without relying on the disk. +Afero acts as a drop-in replacement for the standard `os` package, enabling you to write modular code that is agnostic to the underlying storage, dramatically simplifies testing, and allows for sophisticated architectural patterns through filesystem composition. -It is suitable for use in any situation where you would consider using the OS -package as it provides an additional abstraction that makes it easy to use a -memory backed file system during testing. It also adds support for the http -filesystem for full interoperability. +## Why Afero? +Afero elevates filesystem interaction beyond simple file reading and writing, offering solutions for testability, flexibility, and advanced architecture. -## Afero Features +🔑 **Key Features:** -* A single consistent API for accessing a variety of filesystems -* Interoperation between a variety of file system types -* A set of interfaces to encourage and enforce interoperability between backends -* An atomic cross platform memory backed file system -* Support for compositional (union) file systems by combining multiple file systems acting as one -* Specialized backends which modify existing filesystems (Read Only, Regexp filtered) -* A set of utility functions ported from io, ioutil & hugo to be afero aware -* Wrapper for go 1.16 filesystem abstraction `io/fs.FS` +* **Universal API:** Write your code once. Run it against the local OS, in-memory storage, ZIP/TAR archives, or remote systems (SFTP, GCS). +* **Ultimate Testability:** Utilize `MemMapFs`, a fully concurrent-safe, read/write in-memory filesystem. Write fast, isolated, and reliable unit tests without touching the physical disk or worrying about cleanup. +* **Powerful Composition:** Afero's hidden superpower. Layer filesystems on top of each other to create sophisticated behaviors: + * **Sandboxing:** Use `CopyOnWriteFs` to create temporary scratch spaces that isolate changes from the base filesystem. + * **Caching:** Use `CacheOnReadFs` to automatically layer a fast cache (like memory) over a slow backend (like a network drive). + * **Security Jails:** Use `BasePathFs` to restrict application access to a specific subdirectory (chroot). +* **`os` Package Compatibility:** Afero mirrors the functions in the standard `os` package, making adoption and refactoring seamless. +* **`io/fs` Compatibility:** Fully compatible with the Go standard library's `io/fs` interfaces. -# Using Afero +## Installation -Afero is easy to use and easier to adopt. - -A few different ways you could use Afero: - -* Use the interfaces alone to define your own file system. -* Wrapper for the OS packages. -* Define different filesystems for different parts of your application. -* Use Afero for mock filesystems while testing - -## Step 1: Install Afero - -First use go get to install the latest version of the library. - - $ go get github.com/spf13/afero +```bash +go get github.com/spf13/afero +``` -Next include Afero in your application. ```go import "github.com/spf13/afero" ``` -## Step 2: Declare a backend +## Quick Start: The Power of Abstraction + +The core of Afero is the `afero.Fs` interface. By designing your functions to accept this interface rather than calling `os.*` functions directly, your code instantly becomes more flexible and testable. + +### 1. Refactor Your Code + +Change functions that rely on the `os` package to accept `afero.Fs`. -First define a package variable and set it to a pointer to a filesystem. ```go -var AppFs = afero.NewMemMapFs() +// Before: Coupled to the OS and difficult to test +// func ProcessConfiguration(path string) error { +// data, err := os.ReadFile(path) +// ... +// } -or +import "github.com/spf13/afero" -var AppFs = afero.NewOsFs() +// After: Decoupled, flexible, and testable +func ProcessConfiguration(fs afero.Fs, path string) error { + // Use Afero utility functions which mirror os/ioutil + data, err := afero.ReadFile(fs, path) + // ... process the data + return err +} ``` -It is important to note that if you repeat the composite literal you -will be using a completely new and isolated filesystem. In the case of -OsFs it will still use the same underlying filesystem but will reduce -the ability to drop in other filesystems as desired. -## Step 3: Use it like you would the OS package +### 2. Usage in Production -Throughout your application use any function and method like you normally -would. +In your production environment, inject the `OsFs` backend, which wraps the standard operating system calls. -So if my application before had: ```go -os.Open("/tmp/foo") -``` -We would replace it with: -```go -AppFs.Open("/tmp/foo") +func main() { + // Use the real OS filesystem + AppFs := afero.NewOsFs() + ProcessConfiguration(AppFs, "/etc/myapp.conf") +} ``` -`AppFs` being the variable we defined above. - +### 3. Usage in Testing -## List of all available functions +In your tests, inject `MemMapFs`. This provides a blazing-fast, isolated, in-memory filesystem that requires no disk I/O and no cleanup. -File System Methods Available: ```go -Chmod(name string, mode os.FileMode) : error -Chown(name string, uid, gid int) : error -Chtimes(name string, atime time.Time, mtime time.Time) : error -Create(name string) : File, error -Mkdir(name string, perm os.FileMode) : error -MkdirAll(path string, perm os.FileMode) : error -Name() : string -Open(name string) : File, error -OpenFile(name string, flag int, perm os.FileMode) : File, error -Remove(name string) : error -RemoveAll(path string) : error -Rename(oldname, newname string) : error -Stat(name string) : os.FileInfo, error -``` -File Interfaces and Methods Available: -```go -io.Closer -io.Reader -io.ReaderAt -io.Seeker -io.Writer -io.WriterAt - -Name() : string -Readdir(count int) : []os.FileInfo, error -Readdirnames(n int) : []string, error -Stat() : os.FileInfo, error -Sync() : error -Truncate(size int64) : error -WriteString(s string) : ret int, err error +func TestProcessConfiguration(t *testing.T) { + // Use the in-memory filesystem + AppFs := afero.NewMemMapFs() + + // Pre-populate the memory filesystem for the test + configPath := "/test/config.json" + afero.WriteFile(AppFs, configPath, []byte(`{"feature": true}`), 0644) + + // Run the test entirely in memory + err := ProcessConfiguration(AppFs, configPath) + if err != nil { + t.Fatal(err) + } +} ``` -In some applications it may make sense to define a new package that -simply exports the file system variable for easy access from anywhere. -## Using Afero's utility functions +## Afero's Superpower: Composition -Afero provides a set of functions to make it easier to use the underlying file systems. -These functions have been primarily ported from io & ioutil with some developed for Hugo. +Afero's most unique feature is its ability to combine filesystems. This allows you to build complex behaviors out of simple components, keeping your application logic clean. -The afero utilities support all afero compatible backends. +### Example 1: Sandboxing with Copy-on-Write -The list of utilities includes: +Create a temporary environment where an application can "modify" system files without affecting the actual disk. ```go -DirExists(path string) (bool, error) -Exists(path string) (bool, error) -FileContainsBytes(filename string, subslice []byte) (bool, error) -GetTempDir(subPath string) string -IsDir(path string) (bool, error) -IsEmpty(path string) (bool, error) -ReadDir(dirname string) ([]os.FileInfo, error) -ReadFile(filename string) ([]byte, error) -SafeWriteReader(path string, r io.Reader) (err error) -TempDir(dir, prefix string) (name string, err error) -TempFile(dir, prefix string) (f File, err error) -Walk(root string, walkFn filepath.WalkFunc) error -WriteFile(filename string, data []byte, perm os.FileMode) error -WriteReader(path string, r io.Reader) (err error) -``` -For a complete list see [Afero's GoDoc](https://godoc.org/github.com/spf13/afero) +// 1. The base layer is the real OS, made read-only for safety. +baseFs := afero.NewReadOnlyFs(afero.NewOsFs()) -They are available under two different approaches to use. You can either call -them directly where the first parameter of each function will be the file -system, or you can declare a new `Afero`, a custom type used to bind these -functions as methods to a given filesystem. +// 2. The overlay layer is a temporary in-memory filesystem for changes. +overlayFs := afero.NewMemMapFs() -### Calling utilities directly +// 3. Combine them. Reads fall through to the base; writes only hit the overlay. +sandboxFs := afero.NewCopyOnWriteFs(baseFs, overlayFs) -```go -fs := new(afero.MemMapFs) -f, err := afero.TempFile(fs,"", "ioutil-test") +// The application can now "modify" /etc/hosts, but the changes are isolated in memory. +afero.WriteFile(sandboxFs, "/etc/hosts", []byte("127.0.0.1 sandboxed-app"), 0644) +// The real /etc/hosts on disk is untouched. ``` -### Calling via Afero +### Example 2: Caching a Slow Filesystem -```go -fs := afero.NewMemMapFs() -afs := &afero.Afero{Fs: fs} -f, err := afs.TempFile("", "ioutil-test") -``` +Improve performance by layering a fast cache (like memory) over a slow backend (like a network drive or cloud storage). -## Using Afero for Testing +```go +import "time" -There is a large benefit to using a mock filesystem for testing. It has a -completely blank state every time it is initialized and can be easily -reproducible regardless of OS. You could create files to your heart’s content -and the file access would be fast while also saving you from all the annoying -issues with deleting temporary files, Windows file locking, etc. The MemMapFs -backend is perfect for testing. +// Assume 'remoteFs' is a slow backend (e.g., SFTP or GCS) +var remoteFs afero.Fs -* Much faster than performing I/O operations on disk -* Avoid security issues and permissions -* Far more control. 'rm -rf /' with confidence -* Test setup is far more easier to do -* No test cleanup needed +// 'cacheFs' is a fast in-memory backend +cacheFs := afero.NewMemMapFs() -One way to accomplish this is to define a variable as mentioned above. -In your application this will be set to afero.NewOsFs() during testing you -can set it to afero.NewMemMapFs(). +// Create the caching layer. Cache items for 5 minutes upon first read. +cachedFs := afero.NewCacheOnReadFs(remoteFs, cacheFs, 5*time.Minute) -It wouldn't be uncommon to have each test initialize a blank slate memory -backend. To do this I would define my `appFS = afero.NewOsFs()` somewhere -appropriate in my application code. This approach ensures that Tests are order -independent, with no test relying on the state left by an earlier test. +// The first read is slow (fetches from remote, then caches) +data1, _ := afero.ReadFile(cachedFs, "data.json") -Then in my tests I would initialize a new MemMapFs for each test: -```go -func TestExist(t *testing.T) { - appFS := afero.NewMemMapFs() - // create test files and directories - appFS.MkdirAll("src/a", 0755) - afero.WriteFile(appFS, "src/a/b", []byte("file b"), 0644) - afero.WriteFile(appFS, "src/c", []byte("file c"), 0644) - name := "src/c" - _, err := appFS.Stat(name) - if os.IsNotExist(err) { - t.Errorf("file \"%s\" does not exist.\n", name) - } -} +// The second read is instant (serves from memory cache) +data2, _ := afero.ReadFile(cachedFs, "data.json") ``` -# Available Backends +### Example 3: Security Jails (chroot) -## Operating System Native +Restrict an application component's access to a specific subdirectory. -### OsFs +```go +osFs := afero.NewOsFs() -The first is simply a wrapper around the native OS calls. This makes it -very easy to use as all of the calls are the same as the existing OS -calls. It also makes it trivial to have your code use the OS during -operation and a mock filesystem during testing or as needed. +// Create a filesystem rooted at /home/user/public +// The application cannot access anything above this directory. +jailedFs := afero.NewBasePathFs(osFs, "/home/user/public") -```go -appfs := afero.NewOsFs() -appfs.MkdirAll("src/a", 0755) +// To the application, this is reading "/" +// In reality, it's reading "/home/user/public/" +dirInfo, err := afero.ReadDir(jailedFs, "/") + +// Attempts to access parent directories fail +_, err = jailedFs.Open("../secrets.txt") // Returns an error ``` -## Memory Backed Storage +## Real-World Use Cases -### MemMapFs +### Build Cloud-Agnostic Applications -Afero also provides a fully atomic memory backed filesystem perfect for use in -mocking and to speed up unnecessary disk io when persistence isn’t -necessary. It is fully concurrent and will work within go routines -safely. +Write applications that seamlessly work with different storage backends: ```go -mm := afero.NewMemMapFs() -mm.MkdirAll("src/a", 0755) -``` +type DocumentProcessor struct { + fs afero.Fs +} -#### InMemoryFile +func NewDocumentProcessor(fs afero.Fs) *DocumentProcessor { + return &DocumentProcessor{fs: fs} +} -As part of MemMapFs, Afero also provides an atomic, fully concurrent memory -backed file implementation. This can be used in other memory backed file -systems with ease. Plans are to add a radix tree memory stored file -system using InMemoryFile. +func (p *DocumentProcessor) Process(inputPath, outputPath string) error { + // This code works whether fs is local disk, cloud storage, or memory + content, err := afero.ReadFile(p.fs, inputPath) + if err != nil { + return err + } + + processed := processContent(content) + return afero.WriteFile(p.fs, outputPath, processed, 0644) +} -## Network Interfaces +// Use with local filesystem +processor := NewDocumentProcessor(afero.NewOsFs()) -### SftpFs +// Use with Google Cloud Storage +processor := NewDocumentProcessor(gcsFS) -Afero has experimental support for secure file transfer protocol (sftp). Which can -be used to perform file operations over a encrypted channel. +// Use with in-memory filesystem for testing +processor := NewDocumentProcessor(afero.NewMemMapFs()) +``` -### GCSFs +### Treating Archives as Filesystems -Afero has experimental support for Google Cloud Storage (GCS). You can either set the -`GOOGLE_APPLICATION_CREDENTIALS_JSON` env variable to your JSON credentials or use `opts` in -`NewGcsFS` to configure access to your GCS bucket. +Read files directly from `.zip` or `.tar` archives without unpacking them to disk first. -Some known limitations of the existing implementation: -* No Chmod support - The GCS ACL could probably be mapped to *nix style permissions but that would add another level of complexity and is ignored in this version. -* No Chtimes support - Could be simulated with attributes (gcs a/m-times are set implicitly) but that's is left for another version. -* Not thread safe - Also assumes all file operations are done through the same instance of the GcsFs. File operations between different GcsFs instances are not guaranteed to be consistent. +```go +import ( + "archive/zip" + "github.com/spf13/afero/zipfs" +) + +// Assume 'zipReader' is a *zip.Reader initialized from a file or memory +var zipReader *zip.Reader +// Create a read-only ZipFs +archiveFS := zipfs.New(zipReader) -## Filtering Backends +// Read a file from within the archive using the standard Afero API +content, err := afero.ReadFile(archiveFS, "/docs/readme.md") +``` -### BasePathFs +### Serving Any Filesystem over HTTP -The BasePathFs restricts all operations to a given path within an Fs. -The given file name to the operations on this Fs will be prepended with -the base path before calling the source Fs. +Use `HttpFs` to expose any Afero filesystem—even one created dynamically in memory—through a standard Go web server. ```go -bp := afero.NewBasePathFs(afero.NewOsFs(), "/base/path") -``` +import ( + "net/http" + "github.com/spf13/afero" +) -### ReadOnlyFs +func main() { + memFS := afero.NewMemMapFs() + afero.WriteFile(memFS, "index.html", []byte("

Hello from Memory!

"), 0644) -A thin wrapper around the source Fs providing a read only view. + // Wrap the memory filesystem to make it compatible with http.FileServer. + httpFS := afero.NewHttpFs(memFS) -```go -fs := afero.NewReadOnlyFs(afero.NewOsFs()) -_, err := fs.Create("/file.txt") -// err = syscall.EPERM + http.Handle("/", http.FileServer(httpFS.Dir("/"))) + http.ListenAndServe(":8080", nil) +} ``` -# RegexpFs +### Testing Made Simple -A filtered view on file names, any file NOT matching -the passed regexp will be treated as non-existing. -Files not matching the regexp provided will not be created. -Directories are not filtered. +One of Afero's greatest strengths is making filesystem-dependent code easily testable: ```go -fs := afero.NewRegexpFs(afero.NewMemMapFs(), regexp.MustCompile(`\.txt$`)) -_, err := fs.Create("/file.html") -// err = syscall.ENOENT -``` +func SaveUserData(fs afero.Fs, userID string, data []byte) error { + filename := fmt.Sprintf("users/%s.json", userID) + return afero.WriteFile(fs, filename, data, 0644) +} -### HttpFs +func TestSaveUserData(t *testing.T) { + // Create a clean, fast, in-memory filesystem for testing + testFS := afero.NewMemMapFs() + + userData := []byte(`{"name": "John", "email": "john@example.com"}`) + err := SaveUserData(testFS, "123", userData) + + if err != nil { + t.Fatalf("SaveUserData failed: %v", err) + } + + // Verify the file was saved correctly + saved, err := afero.ReadFile(testFS, "users/123.json") + if err != nil { + t.Fatalf("Failed to read saved file: %v", err) + } + + if string(saved) != string(userData) { + t.Errorf("Data mismatch: got %s, want %s", saved, userData) + } +} +``` -Afero provides an http compatible backend which can wrap any of the existing -backends. +**Benefits of testing with Afero:** +- ⚡ **Fast** - No disk I/O, tests run in memory +- 🔄 **Reliable** - Each test starts with a clean slate +- 🧹 **No cleanup** - Memory is automatically freed +- 🔒 **Safe** - Can't accidentally modify real files +- 🏃 **Parallel** - Tests can run concurrently without conflicts + +## Backend Reference + +| Type | Backend | Constructor | Description | Status | +| :--- | :--- | :--- | :--- | :--- | +| **Core** | **OsFs** | `afero.NewOsFs()` | Interacts with the real operating system filesystem. Use in production. | ✅ Official | +| | **MemMapFs** | `afero.NewMemMapFs()` | A fast, atomic, concurrent-safe, in-memory filesystem. Ideal for testing. | ✅ Official | +| **Composition** | **CopyOnWriteFs**| `afero.NewCopyOnWriteFs(base, overlay)` | A read-only base with a writable overlay. Ideal for sandboxing. | ✅ Official | +| | **CacheOnReadFs**| `afero.NewCacheOnReadFs(base, cache, ttl)` | Lazily caches files from a slow base into a fast layer on first read. | ✅ Official | +| | **BasePathFs** | `afero.NewBasePathFs(source, path)` | Restricts operations to a subdirectory (chroot/jail). | ✅ Official | +| | **ReadOnlyFs** | `afero.NewReadOnlyFs(source)` | Provides a read-only view, preventing any modifications. | ✅ Official | +| | **RegexpFs** | `afero.NewRegexpFs(source, regexp)` | Filters a filesystem, only showing files that match a regex. | ✅ Official | +| **Utility** | **HttpFs** | `afero.NewHttpFs(source)` | Wraps any Afero filesystem to be served via `http.FileServer`. | ✅ Official | +| **Archives** | **ZipFs** | `zipfs.New(zipReader)` | Read-only access to files within a ZIP archive. | ✅ Official | +| | **TarFs** | `tarfs.New(tarReader)` | Read-only access to files within a TAR archive. | ✅ Official | +| **Network** | **GcsFs** | `gcsfs.NewGcsFs(...)` | Google Cloud Storage backend. | ⚡ Experimental | +| | **SftpFs** | `sftpfs.New(...)` | SFTP backend. | ⚡ Experimental | +| **3rd Party Cloud** | **S3Fs** | [`fclairamb/afero-s3`](https://github.com/fclairamb/afero-s3) | Production-ready S3 backend built on official AWS SDK. | 🔹 3rd Party | +| | **MinioFs** | [`cpyun/afero-minio`](https://github.com/cpyun/afero-minio) | MinIO object storage backend with S3 compatibility. | 🔹 3rd Party | +| | **DriveFs** | [`fclairamb/afero-gdrive`](https://github.com/fclairamb/afero-gdrive) | Google Drive backend with streaming support. | 🔹 3rd Party | +| | **DropboxFs** | [`fclairamb/afero-dropbox`](https://github.com/fclairamb/afero-dropbox) | Dropbox backend with streaming support. | 🔹 3rd Party | +| **3rd Party Specialized** | **GitFs** | [`tobiash/go-gitfs`](https://github.com/tobiash/go-gitfs) | Git repository filesystem (read-only, Afero compatible). | 🔹 3rd Party | +| | **DockerFs** | [`unmango/aferox`](https://github.com/unmango/aferox) | Docker container filesystem access. | 🔹 3rd Party | +| | **GitHubFs** | [`unmango/aferox`](https://github.com/unmango/aferox) | GitHub repository and releases filesystem. | 🔹 3rd Party | +| | **FilterFs** | [`unmango/aferox`](https://github.com/unmango/aferox) | Filesystem filtering with predicates. | 🔹 3rd Party | +| | **IgnoreFs** | [`unmango/aferox`](https://github.com/unmango/aferox) | .gitignore-aware filtering filesystem. | 🔹 3rd Party | +| | **FUSEFs** | [`JakWai01/sile-fystem`](https://github.com/JakWai01/sile-fystem) | Generic FUSE implementation using any Afero backend. | 🔹 3rd Party | + +## Afero vs. `io/fs` (Go 1.16+) + +Go 1.16 introduced the `io/fs` package, which provides a standard abstraction for **read-only** filesystems. + +Afero complements `io/fs` by focusing on different needs: + +* **Use `io/fs` when:** You only need to read files and want to conform strictly to the standard library interfaces. +* **Use Afero when:** + * Your application needs to **create, write, modify, or delete** files. + * You need to test complex read/write interactions (e.g., renaming, concurrent writes). + * You need advanced compositional features (Copy-on-Write, Caching, etc.). + +Afero is fully compatible with `io/fs`. You can wrap any Afero filesystem to satisfy the `fs.FS` interface using `afero.NewIOFS`: -The Http package requires a slightly specific version of Open which -returns an http.File type. +```go +import "io/fs" -Afero provides an httpFs file system which satisfies this requirement. -Any Afero FileSystem can be used as an httpFs. +// Create an Afero filesystem (writable) +var myAferoFs afero.Fs = afero.NewMemMapFs() -```go -httpFs := afero.NewHttpFs() -fileserver := http.FileServer(httpFs.Dir()) -http.Handle("/", fileserver) +// Convert it to a standard library fs.FS (read-only view) +var myIoFs fs.FS = afero.NewIOFS(myAferoFs) ``` -## Composite Backends +## Third-Party Backends & Ecosystem -Afero provides the ability have two filesystems (or more) act as a single -file system. +The Afero community has developed numerous backends and tools that extend the library's capabilities. Below are curated, well-maintained options organized by maturity and reliability. -### CacheOnReadFs +### Featured Community Backends -The CacheOnReadFs will lazily make copies of any accessed files from the base -layer into the overlay. Subsequent reads will be pulled from the overlay -directly permitting the request is within the cache duration of when it was -created in the overlay. +These are mature, reliable backends that we can confidently recommend for production use: -If the base filesystem is writeable, any changes to files will be -done first to the base, then to the overlay layer. Write calls to open file -handles like `Write()` or `Truncate()` to the overlay first. +#### **Amazon S3** - [`fclairamb/afero-s3`](https://github.com/fclairamb/afero-s3) +Production-ready S3 backend built on the official AWS SDK for Go. -To writing files to the overlay only, you can use the overlay Fs directly (not -via the union Fs). +```go +import "github.com/fclairamb/afero-s3" -Cache files in the layer for the given time.Duration, a cache duration of 0 -means "forever" meaning the file will not be re-requested from the base ever. +s3fs := s3.NewFs(bucket, session) +``` -A read-only base will make the overlay also read-only but still copy files -from the base to the overlay when they're not present (or outdated) in the -caching layer. +#### **MinIO** - [`cpyun/afero-minio`](https://github.com/cpyun/afero-minio) +MinIO object storage backend providing S3-compatible object storage with deduplication and optimization features. ```go -base := afero.NewOsFs() -layer := afero.NewMemMapFs() -ufs := afero.NewCacheOnReadFs(base, layer, 100 * time.Second) +import "github.com/cpyun/afero-minio" + +minioFs := miniofs.NewMinioFs(ctx, "minio://endpoint/bucket") ``` -### CopyOnWriteFs() +### Community & Specialized Backends -The CopyOnWriteFs is a read only base file system with a potentially -writeable layer on top. +#### Cloud Storage -Read operations will first look in the overlay and if not found there, will -serve the file from the base. +- **Google Drive** - [`fclairamb/afero-gdrive`](https://github.com/fclairamb/afero-gdrive) + Streaming support; no write-seeking or POSIX permissions; no files listing cache -Changes to the file system will only be made in the overlay. +- **Dropbox** - [`fclairamb/afero-dropbox`](https://github.com/fclairamb/afero-dropbox) + Streaming support; no write-seeking or POSIX permissions -Any attempt to modify a file found only in the base will copy the file to the -overlay layer before modification (including opening a file with a writable -handle). +#### Version Control Systems -Removing and Renaming files present only in the base layer is not currently -permitted. If a file is present in the base layer and the overlay, only the -overlay will be removed/renamed. +- **Git Repositories** - [`tobiash/go-gitfs`](https://github.com/tobiash/go-gitfs) + Read-only filesystem abstraction for Git repositories. Works with bare repositories and provides filesystem view of any git reference. Uses go-git for repository access. -```go - base := afero.NewOsFs() - roBase := afero.NewReadOnlyFs(base) - ufs := afero.NewCopyOnWriteFs(roBase, afero.NewMemMapFs()) +#### Container and Remote Systems - fh, _ = ufs.Create("/home/test/file2.txt") - fh.WriteString("This is a test") - fh.Close() -``` +- **Docker Containers** - [`unmango/aferox`](https://github.com/unmango/aferox) + Access Docker container filesystems as if they were local filesystems -In this example all write operations will only occur in memory (MemMapFs) -leaving the base filesystem (OsFs) untouched. +- **GitHub API** - [`unmango/aferox`](https://github.com/unmango/aferox) + Turn GitHub repositories, releases, and assets into browsable filesystems +#### FUSE Integration -## Desired/possible backends +- **Generic FUSE** - [`JakWai01/sile-fystem`](https://github.com/JakWai01/sile-fystem) + Mount any Afero filesystem as a FUSE filesystem, allowing any Afero backend to be used as a real mounted filesystem -The following is a short list of possible backends we hope someone will -implement: +#### Specialized Filesystems -* SSH -* S3 +- **FAT32 Support** - [`aligator/GoFAT`](https://github.com/aligator/GoFAT) + Pure Go FAT filesystem implementation (currently read-only) -# About the project +### Interface Adapters & Utilities -## What's in the name +**Cross-Interface Compatibility:** +- [`jfontan/go-billy-desfacer`](https://github.com/jfontan/go-billy-desfacer) - Adapter between Afero and go-billy interfaces (for go-git compatibility) +- [`Maldris/go-billy-afero`](https://github.com/Maldris/go-billy-afero) - Alternative wrapper for using Afero with go-billy +- [`c4milo/afero2billy`](https://github.com/c4milo/afero2billy) - Another Afero to billy filesystem adapter -Afero comes from the latin roots Ad-Facere. +**Working Directory Management:** +- [`carolynvs/aferox`](https://github.com/carolynvs/aferox) - Working directory-aware filesystem wrapper -**"Ad"** is a prefix meaning "to". +**Advanced Filtering:** +- [`unmango/aferox`](https://github.com/unmango/aferox) includes multiple specialized filesystems: + - **FilterFs** - Predicate-based file filtering + - **IgnoreFs** - .gitignore-aware filtering + - **WriterFs** - Dump writes to io.Writer for debugging -**"Facere"** is a form of the root "faciō" making "make or do". +#### Developer Tools & Utilities -The literal meaning of afero is "to make" or "to do" which seems very fitting -for a library that allows one to make files and directories and do things with them. +**nhatthm Utility Suite** - Essential tools for Afero development: +- [`nhatthm/aferocopy`](https://github.com/nhatthm/aferocopy) - Copy files between any Afero filesystems +- [`nhatthm/aferomock`](https://github.com/nhatthm/aferomock) - Mocking toolkit for testing +- [`nhatthm/aferoassert`](https://github.com/nhatthm/aferoassert) - Assertion helpers for filesystem testing -The English word that shares the same roots as Afero is "affair". Affair shares -the same concept but as a noun it means "something that is made or done" or "an -object of a particular type". +### Ecosystem Showcase -It's also nice that unlike some of my other libraries (hugo, cobra, viper) it -Googles very well. +**Windows Virtual Drives** - [`balazsgrill/potatodrive`](https://github.com/balazsgrill/potatodrive) +Mount any Afero filesystem as a Windows drive letter. Brilliant demonstration of Afero's power! -## Release Notes +### Modern Asset Embedding (Go 1.16+) -See the [Releases Page](https://github.com/spf13/afero/releases). +Instead of third-party tools, use Go's native `//go:embed` with Afero: + +```go +import ( + "embed" + "github.com/spf13/afero" +) + +//go:embed assets/* +var assetsFS embed.FS + +func main() { + // Convert embedded files to Afero filesystem + fs := afero.FromIOFS(assetsFS) + + // Use like any other Afero filesystem + content, _ := afero.ReadFile(fs, "assets/config.json") +} +``` ## Contributing -1. Fork it +We welcome contributions! The project is mature, but we are actively looking for contributors to help implement and stabilize network/cloud backends. + +* 🔥 **Microsoft Azure Blob Storage** +* 🔒 **Modern Encryption Backend** - Built on secure, contemporary crypto (not legacy EncFS) +* 🐙 **Canonical go-git Adapter** - Unified solution for Git integration +* 📡 **SSH/SCP Backend** - Secure remote file operations +* Stabilization of existing experimental backends (GCS, SFTP) + +To contribute: +1. Fork the repository 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request +5. Create a new Pull Request + +## 📄 License -## Contributors +Afero is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/afero/blob/master/LICENSE.txt) for details. -Names in no particular order: +## 🔗 Additional Resources -* [spf13](https://github.com/spf13) -* [jaqx0r](https://github.com/jaqx0r) -* [mbertschler](https://github.com/mbertschler) -* [xor-gate](https://github.com/xor-gate) +- [📖 Full API Documentation](https://pkg.go.dev/github.com/spf13/afero) +- [🎯 Examples Repository](https://github.com/spf13/afero/tree/master/examples) +- [📋 Release Notes](https://github.com/spf13/afero/releases) +- [❓ GitHub Discussions](https://github.com/spf13/afero/discussions) -## License +--- -Afero is released under the Apache 2.0 license. See -[LICENSE.txt](https://github.com/spf13/afero/blob/master/LICENSE.txt) +*Afero comes from the Latin roots Ad-Facere, meaning "to make" or "to do" - fitting for a library that empowers you to make and do amazing things with filesystems.* diff --git a/vendor/github.com/spf13/afero/copyOnWriteFs.go b/vendor/github.com/spf13/afero/copyOnWriteFs.go index 184d6dd702a..aba2879ebb2 100644 --- a/vendor/github.com/spf13/afero/copyOnWriteFs.go +++ b/vendor/github.com/spf13/afero/copyOnWriteFs.go @@ -34,7 +34,8 @@ func (u *CopyOnWriteFs) isBaseFile(name string) (bool, error) { _, err := u.base.Stat(name) if err != nil { if oerr, ok := err.(*os.PathError); ok { - if oerr.Err == os.ErrNotExist || oerr.Err == syscall.ENOENT || oerr.Err == syscall.ENOTDIR { + if oerr.Err == os.ErrNotExist || oerr.Err == syscall.ENOENT || + oerr.Err == syscall.ENOTDIR { return false, nil } } @@ -237,7 +238,11 @@ func (u *CopyOnWriteFs) OpenFile(name string, flag int, perm os.FileMode) (File, return u.layer.OpenFile(name, flag, perm) } - return nil, &os.PathError{Op: "open", Path: name, Err: syscall.ENOTDIR} // ...or os.ErrNotExist? + return nil, &os.PathError{ + Op: "open", + Path: name, + Err: syscall.ENOTDIR, + } // ...or os.ErrNotExist? } if b { return u.base.OpenFile(name, flag, perm) diff --git a/vendor/github.com/spf13/afero/iofs.go b/vendor/github.com/spf13/afero/iofs.go index 938b9316e6b..57ba5673ec1 100644 --- a/vendor/github.com/spf13/afero/iofs.go +++ b/vendor/github.com/spf13/afero/iofs.go @@ -137,7 +137,7 @@ type readDirFile struct { var _ fs.ReadDirFile = readDirFile{} func (r readDirFile) ReadDir(n int) ([]fs.DirEntry, error) { - items, err := r.File.Readdir(n) + items, err := r.Readdir(n) if err != nil { return nil, err } @@ -161,7 +161,12 @@ var _ Fs = FromIOFS{} func (f FromIOFS) Create(name string) (File, error) { return nil, notImplemented("create", name) } -func (f FromIOFS) Mkdir(name string, perm os.FileMode) error { return notImplemented("mkdir", name) } +func (f FromIOFS) Mkdir( + name string, + perm os.FileMode, +) error { + return notImplemented("mkdir", name) +} func (f FromIOFS) MkdirAll(path string, perm os.FileMode) error { return notImplemented("mkdirall", path) @@ -255,7 +260,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/lstater.go b/vendor/github.com/spf13/afero/lstater.go index 89c1bfc0a7d..2dcbdb1f09a 100644 --- a/vendor/github.com/spf13/afero/lstater.go +++ b/vendor/github.com/spf13/afero/lstater.go @@ -19,9 +19,9 @@ import ( // Lstater is an optional interface in Afero. It is only implemented by the // filesystems saying so. -// It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem. +// It will call Lstat if the filesystem itself is, or it delegates to, the os filesystem. // Else it will call Stat. -// In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not. +// In addition to the FileInfo, it will return a boolean telling whether Lstat was called or not. type Lstater interface { LstatIfPossible(name string) (os.FileInfo, bool, error) } diff --git a/vendor/github.com/spf13/afero/mem/file.go b/vendor/github.com/spf13/afero/mem/file.go index 62fe4498e19..c77fcd40e9b 100644 --- a/vendor/github.com/spf13/afero/mem/file.go +++ b/vendor/github.com/spf13/afero/mem/file.go @@ -150,7 +150,11 @@ func (f *File) Sync() error { func (f *File) Readdir(count int) (res []os.FileInfo, err error) { if !f.fileData.dir { - return nil, &os.PathError{Op: "readdir", Path: f.fileData.name, Err: errors.New("not a dir")} + return nil, &os.PathError{ + Op: "readdir", + Path: f.fileData.name, + Err: errors.New("not a dir"), + } } var outLength int64 @@ -236,7 +240,11 @@ func (f *File) Truncate(size int64) error { return ErrFileClosed } if f.readOnly { - return &os.PathError{Op: "truncate", Path: f.fileData.name, Err: errors.New("file handle is read only")} + return &os.PathError{ + Op: "truncate", + Path: f.fileData.name, + Err: errors.New("file handle is read only"), + } } if size < 0 { return ErrOutOfRange @@ -273,7 +281,11 @@ func (f *File) Write(b []byte) (n int, err error) { return 0, ErrFileClosed } if f.readOnly { - return 0, &os.PathError{Op: "write", Path: f.fileData.name, Err: errors.New("file handle is read only")} + return 0, &os.PathError{ + Op: "write", + Path: f.fileData.name, + Err: errors.New("file handle is read only"), + } } n = len(b) cur := atomic.LoadInt64(&f.at) @@ -285,7 +297,9 @@ func (f *File) Write(b []byte) (n int, err error) { tail = f.fileData.data[n+int(cur):] } if diff > 0 { - f.fileData.data = append(f.fileData.data, append(bytes.Repeat([]byte{0o0}, int(diff)), b...)...) + f.fileData.data = append( + f.fileData.data, + append(bytes.Repeat([]byte{0o0}, int(diff)), b...)...) f.fileData.data = append(f.fileData.data, tail...) } else { f.fileData.data = append(f.fileData.data[:cur], b...) diff --git a/vendor/github.com/spf13/afero/memmap.go b/vendor/github.com/spf13/afero/memmap.go index d6c744e8d56..ed92f5649da 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/afero/unionFile.go b/vendor/github.com/spf13/afero/unionFile.go index 62dd6c93c83..2e2253f55c2 100644 --- a/vendor/github.com/spf13/afero/unionFile.go +++ b/vendor/github.com/spf13/afero/unionFile.go @@ -92,7 +92,8 @@ func (f *UnionFile) Seek(o int64, w int) (pos int64, err error) { func (f *UnionFile) Write(s []byte) (n int, err error) { if f.Layer != nil { n, err = f.Layer.Write(s) - if err == nil && f.Base != nil { // hmm, do we have fixed size files where a write may hit the EOF mark? + if err == nil && + f.Base != nil { // hmm, do we have fixed size files where a write may hit the EOF mark? _, err = f.Base.Write(s) } return n, err @@ -157,7 +158,7 @@ var defaultUnionMergeDirsFn = func(lofi, bofi []os.FileInfo) ([]os.FileInfo, err // return a single view of the overlayed directories. // At the end of the directory view, the error is io.EOF if c > 0. func (f *UnionFile) Readdir(c int) (ofi []os.FileInfo, err error) { - var merge DirsMerger = f.Merger + merge := f.Merger if merge == nil { merge = defaultUnionMergeDirsFn } diff --git a/vendor/github.com/spf13/afero/util.go b/vendor/github.com/spf13/afero/util.go index 9e4cba2746a..23176883882 100644 --- a/vendor/github.com/spf13/afero/util.go +++ b/vendor/github.com/spf13/afero/util.go @@ -113,11 +113,11 @@ func GetTempDir(fs Fs, subPath string) string { if subPath != "" { // preserve windows backslash :-( if FilePathSeparator == "\\" { - subPath = strings.Replace(subPath, "\\", "____", -1) + subPath = strings.ReplaceAll(subPath, "\\", "____") } dir = dir + UnicodeSanitize((subPath)) if FilePathSeparator == "\\" { - dir = strings.Replace(dir, "____", "\\", -1) + dir = strings.ReplaceAll(dir, "____", "\\") } if exists, _ := Exists(fs, dir); exists { diff --git a/vendor/github.com/tjhop/slog-gokit/handler.go b/vendor/github.com/tjhop/slog-gokit/handler.go index 23ca2d85a44..5afe7952cc6 100644 --- a/vendor/github.com/tjhop/slog-gokit/handler.go +++ b/vendor/github.com/tjhop/slog-gokit/handler.go @@ -90,7 +90,12 @@ func (h *GoKitHandler) Handle(_ context.Context, record slog.Record) error { // WithAttrs formats the provided attributes and caches them in the handler to // attach to all future log calls. It implements slog.Handler. func (h *GoKitHandler) WithAttrs(attrs []slog.Attr) slog.Handler { - pairs := make([]slog.Attr, 0, len(attrs)+len(h.preformatted)) + // Make a defensive copy of preformatted attrs to avoid race conditions + // when multiple goroutines call WithAttrs concurrently on the same handler + pairs := make([]slog.Attr, len(h.preformatted), len(h.preformatted)+len(attrs)) + copy(pairs, h.preformatted) + + // Then append the new attrs for _, attr := range attrs { // preresolve the group to simplify attr tracking if h.group != "" { @@ -99,10 +104,6 @@ func (h *GoKitHandler) WithAttrs(attrs []slog.Attr) slog.Handler { pairs = append(pairs, attr) } - if h.preformatted != nil { - pairs = append(h.preformatted, pairs...) - } - return &GoKitHandler{ logger: h.logger, level: h.level, diff --git a/vendor/github.com/trivago/tgo/tcontainer/arrays.go b/vendor/github.com/trivago/tgo/tcontainer/arrays.go deleted file mode 100644 index ede9aed3ed7..00000000000 --- a/vendor/github.com/trivago/tgo/tcontainer/arrays.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 tcontainer - -import "sort" - -// Int64Slice is a typedef to allow sortable int64 slices -type Int64Slice []int64 - -func (s Int64Slice) Len() int { - return len(s) -} - -func (s Int64Slice) Less(i, j int) bool { - return s[i] < s[j] -} - -func (s Int64Slice) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Sort is a shortcut for sort.Sort(s) -func (s Int64Slice) Sort() { - sort.Sort(s) -} - -// IsSorted is a shortcut for sort.IsSorted(s) -func (s Int64Slice) IsSorted() bool { - return sort.IsSorted(s) -} - -// Set sets all values in this slice to the given value -func (s Int64Slice) Set(v int64) { - for i := range s { - s[i] = v - } -} - -// Uint64Slice is a typedef to allow sortable uint64 slices -type Uint64Slice []uint64 - -func (s Uint64Slice) Len() int { - return len(s) -} - -func (s Uint64Slice) Less(i, j int) bool { - return s[i] < s[j] -} - -func (s Uint64Slice) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Sort is a shortcut for sort.Sort(s) -func (s Uint64Slice) Sort() { - sort.Sort(s) -} - -// IsSorted is a shortcut for sort.IsSorted(s) -func (s Uint64Slice) IsSorted() bool { - return sort.IsSorted(s) -} - -// Set sets all values in this slice to the given value -func (s Uint64Slice) Set(v uint64) { - for i := range s { - s[i] = v - } -} - -// Float32Slice is a typedef to allow sortable float32 slices -type Float32Slice []float32 - -func (s Float32Slice) Len() int { - return len(s) -} - -func (s Float32Slice) Less(i, j int) bool { - return s[i] < s[j] -} - -func (s Float32Slice) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Sort is a shortcut for sort.Sort(s) -func (s Float32Slice) Sort() { - sort.Sort(s) -} - -// IsSorted is a shortcut for sort.IsSorted(s) -func (s Float32Slice) IsSorted() bool { - return sort.IsSorted(s) -} - -// Set sets all values in this slice to the given value -func (s Float32Slice) Set(v float32) { - for i := range s { - s[i] = v - } -} diff --git a/vendor/github.com/trivago/tgo/tcontainer/bytepool.go b/vendor/github.com/trivago/tgo/tcontainer/bytepool.go deleted file mode 100644 index c1290b766d3..00000000000 --- a/vendor/github.com/trivago/tgo/tcontainer/bytepool.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 tcontainer - -import ( - "reflect" - "runtime" - "sync/atomic" - "unsafe" -) - -const ( - tiny = 64 - small = 512 - medium = 1024 - large = 1024 * 10 - huge = 1024 * 100 - - tinyCount = 16384 // 1 MB - smallCount = 2048 // 1 MB - mediumCount = 1024 // 1 MB - largeCount = 102 // ~1 MB - hugeCount = 10 // ~1 MB -) - -type byteSlab struct { - buffer []byte - bufferSize uintptr - stride uintptr - basePtr *uintptr - nextPtr *uintptr -} - -// BytePool is a fragmentation friendly way to allocated byte slices. -type BytePool struct { - tinySlab byteSlab - smallSlab byteSlab - mediumSlab byteSlab - largeSlab byteSlab - hugeSlab byteSlab -} - -func newByteSlab(size, count int) byteSlab { - bufferSize := count * size - buffer := make([]byte, bufferSize) - basePtr := (*reflect.SliceHeader)(unsafe.Pointer(&buffer)).Data - nextPtr := basePtr + uintptr(bufferSize) - - return byteSlab{ - buffer: buffer, - bufferSize: uintptr(bufferSize), - stride: uintptr(size), - basePtr: &basePtr, - nextPtr: &nextPtr, - } -} - -func (slab *byteSlab) getSlice(size int) (chunk []byte) { - chunkHeader := (*reflect.SliceHeader)(unsafe.Pointer(&chunk)) - chunkHeader.Len = size - chunkHeader.Cap = int(slab.stride) - - for { - // WARNING: The following two lines are order sensitive - basePtr := atomic.LoadUintptr(slab.basePtr) - nextPtr := atomic.AddUintptr(slab.nextPtr, -slab.stride) - lastPtr := basePtr + slab.bufferSize - - switch { - case nextPtr < basePtr || nextPtr >= lastPtr: - // out of range either means alloc while realloc or race between - // base and next during realloc. In the latter case we lose a chunk. - runtime.Gosched() - - case nextPtr == basePtr: - // Last item: realloc - slab.buffer = make([]byte, slab.bufferSize) - dataPtr := (*reflect.SliceHeader)(unsafe.Pointer(&slab.buffer)).Data - - // WARNING: The following two lines are order sensitive - atomic.StoreUintptr(slab.nextPtr, dataPtr+slab.bufferSize) - atomic.StoreUintptr(slab.basePtr, dataPtr) - fallthrough - - default: - chunkHeader.Data = nextPtr - return - } - } -} - -// NewBytePool creates a new BytePool with each slab using 1 MB of storage. -// The pool contains 5 slabs of different sizes: 64B, 512B, 1KB, 10KB and 100KB. -// Allocations above 100KB will be allocated directly. -func NewBytePool() BytePool { - return BytePool{ - tinySlab: newByteSlab(tiny, tinyCount), - smallSlab: newByteSlab(small, smallCount), - mediumSlab: newByteSlab(medium, mediumCount), - largeSlab: newByteSlab(large, largeCount), - hugeSlab: newByteSlab(huge, hugeCount), - } -} - -// NewBytePoolWithSize creates a new BytePool with each slab size using n MB of -// storage. See NewBytePool() for slab size details. -func NewBytePoolWithSize(n int) BytePool { - if n <= 0 { - n = 1 - } - return BytePool{ - tinySlab: newByteSlab(tiny, tinyCount*n), - smallSlab: newByteSlab(small, smallCount*n), - mediumSlab: newByteSlab(medium, mediumCount*n), - largeSlab: newByteSlab(large, largeCount*n), - hugeSlab: newByteSlab(huge, hugeCount*n), - } -} - -// Get returns a slice allocated to a normalized size. -// Sizes are organized in evenly sized buckets so that fragmentation is kept low. -func (b *BytePool) Get(size int) []byte { - switch { - case size == 0: - return []byte{} - - case size <= tiny: - return b.tinySlab.getSlice(size) - - case size <= small: - return b.smallSlab.getSlice(size) - - case size <= medium: - return b.mediumSlab.getSlice(size) - - case size <= large: - return b.largeSlab.getSlice(size) - - case size <= huge: - return b.hugeSlab.getSlice(size) - - default: - return make([]byte, size) - } -} diff --git a/vendor/github.com/trivago/tgo/tcontainer/marshalmap.go b/vendor/github.com/trivago/tgo/tcontainer/marshalmap.go deleted file mode 100644 index 7564f3b5f7c..00000000000 --- a/vendor/github.com/trivago/tgo/tcontainer/marshalmap.go +++ /dev/null @@ -1,565 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 tcontainer - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "time" - - "github.com/trivago/tgo/treflect" -) - -// MarshalMap is a wrapper type to attach converter methods to maps normally -// returned by marshalling methods, i.e. key/value parsers. -// All methods that do a conversion will return an error if the value stored -// behind key is not of the expected type or if the key is not existing in the -// map. -type MarshalMap map[string]interface{} - -const ( - // MarshalMapSeparator defines the rune used for path separation - MarshalMapSeparator = '/' - // MarshalMapArrayBegin defines the rune starting array index notation - MarshalMapArrayBegin = '[' - // MarshalMapArrayEnd defines the rune ending array index notation - MarshalMapArrayEnd = ']' -) - -// NewMarshalMap creates a new marshal map (string -> interface{}) -func NewMarshalMap() MarshalMap { - return make(map[string]interface{}) -} - -// TryConvertToMarshalMap converts collections to MarshalMap if possible. -// This is a deep conversion, i.e. each element in the collection will be -// traversed. You can pass a formatKey function that will be applied to all -// string keys that are detected. -func TryConvertToMarshalMap(value interface{}, formatKey func(string) string) interface{} { - valueMeta := reflect.ValueOf(value) - switch valueMeta.Kind() { - default: - return value - - case reflect.Array, reflect.Slice: - arrayLen := valueMeta.Len() - converted := make([]interface{}, arrayLen) - for i := 0; i < arrayLen; i++ { - converted[i] = TryConvertToMarshalMap(valueMeta.Index(i).Interface(), formatKey) - } - return converted - - case reflect.Map: - converted := NewMarshalMap() - keys := valueMeta.MapKeys() - - for _, keyMeta := range keys { - strKey, isString := keyMeta.Interface().(string) - if !isString { - continue - } - if formatKey != nil { - strKey = formatKey(strKey) - } - val := valueMeta.MapIndex(keyMeta).Interface() - converted[strKey] = TryConvertToMarshalMap(val, formatKey) - } - return converted // ### return, converted MarshalMap ### - } -} - -// ConvertToMarshalMap tries to convert a compatible map type to a marshal map. -// Compatible types are map[interface{}]interface{}, map[string]interface{} and of -// course MarshalMap. The same rules as for ConvertValueToMarshalMap apply. -func ConvertToMarshalMap(value interface{}, formatKey func(string) string) (MarshalMap, error) { - converted := TryConvertToMarshalMap(value, formatKey) - if result, isMap := converted.(MarshalMap); isMap { - return result, nil - } - return nil, fmt.Errorf("Root value cannot be converted to MarshalMap") -} - -// Clone creates a copy of the given MarshalMap. -func (mmap MarshalMap) Clone() MarshalMap { - clone := cloneMap(reflect.ValueOf(mmap)) - return clone.Interface().(MarshalMap) -} - -func cloneMap(mapValue reflect.Value) reflect.Value { - clone := reflect.MakeMap(mapValue.Type()) - keys := mapValue.MapKeys() - - for _, k := range keys { - v := mapValue.MapIndex(k) - switch k.Kind() { - default: - clone.SetMapIndex(k, v) - - case reflect.Array, reflect.Slice: - if v.Type().Elem().Kind() == reflect.Map { - sliceCopy := reflect.MakeSlice(v.Type(), v.Len(), v.Len()) - for i := 0; i < v.Len(); i++ { - element := v.Index(i) - sliceCopy.Index(i).Set(cloneMap(element)) - } - } else { - sliceCopy := reflect.MakeSlice(v.Type(), 0, v.Len()) - reflect.Copy(sliceCopy, v) - clone.SetMapIndex(k, sliceCopy) - } - - case reflect.Map: - vClone := cloneMap(v) - clone.SetMapIndex(k, vClone) - } - } - - return clone -} - -// Bool returns a value at key that is expected to be a boolean -func (mmap MarshalMap) Bool(key string) (bool, error) { - val, exists := mmap.Value(key) - if !exists { - return false, fmt.Errorf(`"%s" is not set`, key) - } - - boolValue, isBool := val.(bool) - if !isBool { - return false, fmt.Errorf(`"%s" is expected to be a boolean`, key) - } - return boolValue, nil -} - -// Uint returns a value at key that is expected to be an uint64 or compatible -// integer value. -func (mmap MarshalMap) Uint(key string) (uint64, error) { - val, exists := mmap.Value(key) - if !exists { - return 0, fmt.Errorf(`"%s" is not set`, key) - } - - if intVal, isNumber := treflect.Uint64(val); isNumber { - return intVal, nil - } - - return 0, fmt.Errorf(`"%s" is expected to be an unsigned number type`, key) -} - -// Int returns a value at key that is expected to be an int64 or compatible -// integer value. -func (mmap MarshalMap) Int(key string) (int64, error) { - val, exists := mmap.Value(key) - if !exists { - return 0, fmt.Errorf(`"%s" is not set`, key) - } - - if intVal, isNumber := treflect.Int64(val); isNumber { - return intVal, nil - } - - return 0, fmt.Errorf(`"%s" is expected to be a signed number type`, key) -} - -// Float returns a value at key that is expected to be a float64 or compatible -// float value. -func (mmap MarshalMap) Float(key string) (float64, error) { - val, exists := mmap.Value(key) - if !exists { - return 0, fmt.Errorf(`"%s" is not set`, key) - } - - if floatVal, isNumber := treflect.Float64(val); isNumber { - return floatVal, nil - } - - return 0, fmt.Errorf(`"%s" is expected to be a signed number type`, key) -} - -// Duration returns a value at key that is expected to be a string -func (mmap MarshalMap) Duration(key string) (time.Duration, error) { - val, exists := mmap.Value(key) - if !exists { - return time.Duration(0), fmt.Errorf(`"%s" is not set`, key) - } - - switch val.(type) { - case time.Duration: - return val.(time.Duration), nil - case string: - return time.ParseDuration(val.(string)) - } - - return time.Duration(0), fmt.Errorf(`"%s" is expected to be a duration or string`, key) -} - -// String returns a value at key that is expected to be a string -func (mmap MarshalMap) String(key string) (string, error) { - val, exists := mmap.Value(key) - if !exists { - return "", fmt.Errorf(`"%s" is not set`, key) - } - - strValue, isString := val.(string) - if !isString { - return "", fmt.Errorf(`"%s" is expected to be a string`, key) - } - return strValue, nil -} - -// Bytes returns a value at key that is expected to be a []byte -func (mmap MarshalMap) Bytes(key string) ([]byte, error) { - val, exists := mmap.Value(key) - if !exists { - return []byte{}, fmt.Errorf(`"%s" is not set`, key) - } - - bytesValue, isBytes := val.([]byte) - if !isBytes { - return []byte{}, fmt.Errorf(`"%s" is expected to be a []byte`, key) - } - return bytesValue, nil -} - -// Slice is an alias for Array -func (mmap MarshalMap) Slice(key string) ([]interface{}, error) { - return mmap.Array(key) -} - -// Array returns a value at key that is expected to be a []interface{} -func (mmap MarshalMap) Array(key string) ([]interface{}, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - arrayValue, isArray := val.([]interface{}) - if !isArray { - return nil, fmt.Errorf(`"%s" is expected to be an array`, key) - } - return arrayValue, nil -} - -// Map returns a value at key that is expected to be a -// map[interface{}]interface{}. -func (mmap MarshalMap) Map(key string) (map[interface{}]interface{}, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - mapValue, isMap := val.(map[interface{}]interface{}) - if !isMap { - return nil, fmt.Errorf(`"%s" is expected to be a map`, key) - } - return mapValue, nil -} - -func castToStringArray(key string, value interface{}) ([]string, error) { - switch value.(type) { - case string: - return []string{value.(string)}, nil - - case []interface{}: - arrayVal := value.([]interface{}) - stringArray := make([]string, 0, len(arrayVal)) - - for _, val := range arrayVal { - strValue, isString := val.(string) - if !isString { - return nil, fmt.Errorf(`"%s" does not contain string keys`, key) - } - stringArray = append(stringArray, strValue) - } - return stringArray, nil - - case []string: - return value.([]string), nil - - default: - return nil, fmt.Errorf(`"%s" is not a valid string array type`, key) - } -} - -// StringSlice is an alias for StringArray -func (mmap MarshalMap) StringSlice(key string) ([]string, error) { - return mmap.StringArray(key) -} - -// StringArray returns a value at key that is expected to be a []string -// This function supports conversion (by copy) from -// * []interface{} -func (mmap MarshalMap) StringArray(key string) ([]string, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - return castToStringArray(key, val) -} - -func castToInt64Array(key string, value interface{}) ([]int64, error) { - switch value.(type) { - case int: - return []int64{value.(int64)}, nil - - case []interface{}: - arrayVal := value.([]interface{}) - intArray := make([]int64, 0, len(arrayVal)) - - for _, val := range arrayVal { - intValue, isInt := val.(int64) - if !isInt { - return nil, fmt.Errorf(`"%s" does not contain int keys`, key) - } - intArray = append(intArray, intValue) - } - return intArray, nil - - case []int64: - return value.([]int64), nil - - default: - return nil, fmt.Errorf(`"%s" is not a valid string array type`, key) - } -} - -// Int64Slice is an alias for Int64Array -func (mmap MarshalMap) Int64Slice(key string) ([]int64, error) { - return mmap.Int64Array(key) -} - -// Int64Array returns a value at key that is expected to be a []int64 -// This function supports conversion (by copy) from -// * []interface{} -func (mmap MarshalMap) Int64Array(key string) ([]int64, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - return castToInt64Array(key, val) -} - -// StringMap returns a value at key that is expected to be a map[string]string. -// This function supports conversion (by copy) from -// * map[interface{}]interface{} -// * map[string]interface{} -func (mmap MarshalMap) StringMap(key string) (map[string]string, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - switch val.(type) { - case map[string]string: - return val.(map[string]string), nil - - default: - valueMeta := reflect.ValueOf(val) - if valueMeta.Kind() != reflect.Map { - return nil, fmt.Errorf(`"%s" is expected to be a map[string]string but is %T`, key, val) - } - - result := make(map[string]string) - for _, keyMeta := range valueMeta.MapKeys() { - strKey, isString := keyMeta.Interface().(string) - if !isString { - return nil, fmt.Errorf(`"%s" is expected to be a map[string]string. Key is not a string`, key) - } - - value := valueMeta.MapIndex(keyMeta) - strValue, isString := value.Interface().(string) - if !isString { - return nil, fmt.Errorf(`"%s" is expected to be a map[string]string. Value is not a string`, key) - } - - result[strKey] = strValue - } - - return result, nil - } -} - -// StringSliceMap is an alias for StringArrayMap -func (mmap MarshalMap) StringSliceMap(key string) (map[string][]string, error) { - return mmap.StringArrayMap(key) -} - -// StringArrayMap returns a value at key that is expected to be a -// map[string][]string. This function supports conversion (by copy) from -// * map[interface{}][]interface{} -// * map[interface{}]interface{} -// * map[string]interface{} -func (mmap MarshalMap) StringArrayMap(key string) (map[string][]string, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - switch val.(type) { - case map[string][]string: - return val.(map[string][]string), nil - - default: - valueMeta := reflect.ValueOf(val) - if valueMeta.Kind() != reflect.Map { - return nil, fmt.Errorf(`"%s" is expected to be a map[string][]string but is %T`, key, val) - } - - result := make(map[string][]string) - for _, keyMeta := range valueMeta.MapKeys() { - strKey, isString := keyMeta.Interface().(string) - if !isString { - return nil, fmt.Errorf(`"%s" is expected to be a map[string][]string. Key is not a string`, key) - } - - value := valueMeta.MapIndex(keyMeta) - arrayValue, err := castToStringArray(strKey, value.Interface()) - if err != nil { - return nil, fmt.Errorf(`"%s" is expected to be a map[string][]string. Value is not a []string`, key) - } - - result[strKey] = arrayValue - } - - return result, nil - } -} - -// MarshalMap returns a value at key that is expected to be another MarshalMap -// This function supports conversion (by copy) from -// * map[interface{}]interface{} -func (mmap MarshalMap) MarshalMap(key string) (MarshalMap, error) { - val, exists := mmap.Value(key) - if !exists { - return nil, fmt.Errorf(`"%s" is not set`, key) - } - - return ConvertToMarshalMap(val, nil) -} - -// Value returns a value from a given value path. -// Fields can be accessed by their name. Nested fields can be accessed by using -// "/" as a separator. Arrays can be addressed using the standard array -// notation "[]". -// Examples: -// "key" -> mmap["key"] single value -// "key1/key2" -> mmap["key1"]["key2"] nested map -// "key1[0]" -> mmap["key1"][0] nested array -// "key1[0]key2" -> mmap["key1"][0]["key2"] nested array, nested map -func (mmap MarshalMap) Value(key string) (val interface{}, exists bool) { - exists = mmap.resolvePath(key, mmap, func(p, k reflect.Value, v interface{}) { - val = v - }) - return val, exists -} - -// Delete a value from a given path. -// The path must point to a map key. Deleting from arrays is not supported. -func (mmap MarshalMap) Delete(key string) { - mmap.resolvePath(key, mmap, func(p, k reflect.Value, v interface{}) { - if v != nil { - p.SetMapIndex(k, reflect.Value{}) - } - }) -} - -// Set a value for a given path. -// The path must point to a map key. Setting array elements is not supported. -func (mmap MarshalMap) Set(key string, val interface{}) { - mmap.resolvePath(key, mmap, func(p, k reflect.Value, v interface{}) { - p.SetMapIndex(k, reflect.ValueOf(val)) - }) -} - -func (mmap MarshalMap) resolvePathKey(key string) (int, int) { - keyEnd := len(key) - nextKeyStart := keyEnd - pathIdx := strings.IndexRune(key, MarshalMapSeparator) - arrayIdx := strings.IndexRune(key, MarshalMapArrayBegin) - - if pathIdx > -1 && pathIdx < keyEnd { - keyEnd = pathIdx - nextKeyStart = pathIdx + 1 // don't include slash - } - if arrayIdx > -1 && arrayIdx < keyEnd { - keyEnd = arrayIdx - nextKeyStart = arrayIdx // include bracket because of multidimensional arrays - } - - // a -> key: "a", remain: "" -- value - // a/b/c -> key: "a", remain: "b/c" -- nested map - // a[1]b/c -> key: "a", remain: "[1]b/c" -- nested array - - return keyEnd, nextKeyStart -} - -func (mmap MarshalMap) resolvePath(k string, v interface{}, action func(p, k reflect.Value, v interface{})) bool { - if len(k) == 0 { - action(reflect.Value{}, reflect.ValueOf(k), v) // ### return, found requested value ### - return true - } - - vValue := reflect.ValueOf(v) - switch vValue.Kind() { - case reflect.Array, reflect.Slice: - startIdx := strings.IndexRune(k, MarshalMapArrayBegin) // Must be first char, otherwise malformed - endIdx := strings.IndexRune(k, MarshalMapArrayEnd) // Must be > startIdx, otherwise malformed - - if startIdx == -1 || endIdx == -1 { - return false - } - - if startIdx == 0 && endIdx > startIdx { - index, err := strconv.Atoi(k[startIdx+1 : endIdx]) - - // [1] -> index: "1", remain: "" -- value - // [1]a/b -> index: "1", remain: "a/b" -- nested map - // [1][2] -> index: "1", remain: "[2]" -- nested array - - if err == nil && index < vValue.Len() { - item := vValue.Index(index).Interface() - key := k[endIdx+1:] - return mmap.resolvePath(key, item, action) // ### return, nested array ### - } - } - - case reflect.Map: - kValue := reflect.ValueOf(k) - if storedValue := vValue.MapIndex(kValue); storedValue.IsValid() { - action(vValue, kValue, storedValue.Interface()) - return true - } - - keyEnd, nextKeyStart := mmap.resolvePathKey(k) - if keyEnd == len(k) { - action(vValue, kValue, nil) // call action to support setting non-existing keys - return false // ### return, key not found ### - } - - nextKey := k[:keyEnd] - nkValue := reflect.ValueOf(nextKey) - - if storedValue := vValue.MapIndex(nkValue); storedValue.IsValid() { - remain := k[nextKeyStart:] - return mmap.resolvePath(remain, storedValue.Interface(), action) // ### return, nested map ### - } - } - - return false -} diff --git a/vendor/github.com/trivago/tgo/tcontainer/trie.go b/vendor/github.com/trivago/tgo/tcontainer/trie.go deleted file mode 100644 index f72170937c8..00000000000 --- a/vendor/github.com/trivago/tgo/tcontainer/trie.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 tcontainer - -// TrieNode represents a single node inside a trie. -// Each node can contain a payload which can be retrieved after a successfull -// match. In addition to that PathLen will contain the length of the match. -type TrieNode struct { - suffix []byte - children []*TrieNode - longestPath int - PathLen int - Payload interface{} -} - -// NewTrie creates a new root TrieNode -func NewTrie(data []byte, payload interface{}) *TrieNode { - return &TrieNode{ - suffix: data, - children: []*TrieNode{}, - longestPath: len(data), - PathLen: len(data), - Payload: payload, - } -} - -func (node *TrieNode) addNewChild(data []byte, payload interface{}, pathLen int) { - if node.longestPath < pathLen { - node.longestPath = pathLen - } - - idx := len(node.children) - node.children = append(node.children, nil) - - for idx > 0 { - nextIdx := idx - 1 - if node.children[nextIdx].longestPath > pathLen { - break - } - node.children[idx] = node.children[nextIdx] - idx = nextIdx - } - - node.children[idx] = &TrieNode{ - suffix: data, - children: []*TrieNode{}, - longestPath: pathLen, - PathLen: pathLen, - Payload: payload, - } -} - -func (node *TrieNode) replace(oldChild *TrieNode, newChild *TrieNode) { - for i, child := range node.children { - if child == oldChild { - node.children[i] = newChild - return // ### return, replaced ### - } - } -} - -// ForEach applies a function to each node in the tree including and below the -// passed node. -func (node *TrieNode) ForEach(callback func(*TrieNode)) { - callback(node) - for _, child := range node.children { - child.ForEach(callback) - } -} - -// Add adds a new data path to the trie. -// The TrieNode returned is the (new) root node so you should always reassign -// the root with the return value of Add. -func (node *TrieNode) Add(data []byte, payload interface{}) *TrieNode { - return node.addPath(data, payload, len(data), nil) -} - -func (node *TrieNode) addPath(data []byte, payload interface{}, pathLen int, parent *TrieNode) *TrieNode { - dataLen := len(data) - suffixLen := len(node.suffix) - testLen := suffixLen - if dataLen < suffixLen { - testLen = dataLen - } - - var splitIdx int - for splitIdx = 0; splitIdx < testLen; splitIdx++ { - if data[splitIdx] != node.suffix[splitIdx] { - break // ### break, split found ### - } - } - - if splitIdx == suffixLen { - // Continue down or stop here (full suffix match) - - if splitIdx == dataLen { - node.Payload = payload // may overwrite - return node // ### return, path already stored ### - } - - data = data[splitIdx:] - if suffixLen > 0 { - for _, child := range node.children { - if child.suffix[0] == data[0] { - child.addPath(data, payload, pathLen, node) - return node // ### return, continue on path ### - } - } - } - - node.addNewChild(data, payload, pathLen) - return node // ### return, new leaf ### - } - - if splitIdx == dataLen { - // Make current node a subpath of new data node (full data match) - // This case implies that dataLen < suffixLen as splitIdx == suffixLen - // did not match. - - node.suffix = node.suffix[splitIdx:] - - newParent := NewTrie(data, payload) - newParent.PathLen = pathLen - newParent.longestPath = node.longestPath - newParent.children = []*TrieNode{node} - - if parent != nil { - parent.replace(node, newParent) - } - return newParent // ### return, rotation ### - } - - // New parent required with both nodes as children (partial match) - - node.suffix = node.suffix[splitIdx:] - - newParent := NewTrie(data[:splitIdx], nil) - newParent.PathLen = 0 - newParent.longestPath = node.longestPath - newParent.children = []*TrieNode{node} - newParent.addNewChild(data[splitIdx:], payload, pathLen) - - if parent != nil { - parent.replace(node, newParent) - } - return newParent // ### return, new parent ### -} - -// Match compares the trie to the given data stream. -// Match returns true if data can be completely matched to the trie. -func (node *TrieNode) Match(data []byte) *TrieNode { - dataLen := len(data) - suffixLen := len(node.suffix) - if dataLen < suffixLen { - return nil // ### return, cannot be fully matched ### - } - - for i := 0; i < suffixLen; i++ { - if data[i] != node.suffix[i] { - return nil // ### return, no match ### - } - } - - if dataLen == suffixLen { - if node.PathLen > 0 { - return node // ### return, full match ### - } - return nil // ### return, invalid match ### - } - - data = data[suffixLen:] - numChildren := len(node.children) - for i := 0; i < numChildren; i++ { - matchedNode := node.children[i].Match(data) - if matchedNode != nil { - return matchedNode // ### return, match found ### - } - } - - return nil // ### return, no valid path ### -} - -// MatchStart compares the trie to the beginning of the given data stream. -// MatchStart returns true if the beginning of data can be matched to the trie. -func (node *TrieNode) MatchStart(data []byte) *TrieNode { - dataLen := len(data) - suffixLen := len(node.suffix) - if dataLen < suffixLen { - return nil // ### return, cannot be fully matched ### - } - - for i := 0; i < suffixLen; i++ { - if data[i] != node.suffix[i] { - return nil // ### return, no match ### - } - } - - // Match longest path first - - data = data[suffixLen:] - numChildren := len(node.children) - for i := 0; i < numChildren; i++ { - matchedNode := node.children[i].MatchStart(data) - if matchedNode != nil { - return matchedNode // ### return, match found ### - } - } - - // May be only a part of data but we have a valid match - - if node.PathLen > 0 { - return node // ### return, full match ### - } - return nil // ### return, no valid path ### -} diff --git a/vendor/github.com/trivago/tgo/treflect/clone.go b/vendor/github.com/trivago/tgo/treflect/clone.go deleted file mode 100644 index b8871262632..00000000000 --- a/vendor/github.com/trivago/tgo/treflect/clone.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 treflect - -import ( - "reflect" -) - -// Clone does a deep copy of the given value. -// Please note that field have to be public in order to be copied. -// Private fields will be ignored. -func Clone(v interface{}) interface{} { - value := reflect.ValueOf(v) - copy := clone(value) - return copy.Interface() -} - -func clone(v reflect.Value) reflect.Value { - switch v.Kind() { - case reflect.Struct: - copy := reflect.New(v.Type()) - - for i := 0; i < v.Type().NumField(); i++ { - field := v.Field(i) - targetField := copy.Elem().Field(i) - if !targetField.CanSet() { - continue // ignore private fields - } - fieldCopy := clone(field) - targetField.Set(fieldCopy) - } - return copy.Elem() - - case reflect.Chan: - copy := reflect.MakeChan(v.Type(), v.Len()) - return copy - - case reflect.Map: - copy := reflect.MakeMap(v.Type()) - keys := v.MapKeys() - for _, k := range keys { - fieldCopy := clone(v.MapIndex(k)) - copy.SetMapIndex(k, fieldCopy) - } - return copy - - case reflect.Slice: - copy := reflect.MakeSlice(v.Type(), v.Len(), v.Len()) - for i := 0; i < v.Len(); i++ { - elementCopy := clone(v.Index(i)) - copy.Index(i).Set(elementCopy) - } - return copy - - case reflect.Array: - copy := reflect.New(v.Type()).Elem() - for i := 0; i < v.Len(); i++ { - elementCopy := clone(v.Index(i)) - copy.Index(i).Set(elementCopy) - } - return copy - - default: - copy := reflect.New(v.Type()) - copy.Elem().Set(v) - return copy.Elem() - } -} diff --git a/vendor/github.com/trivago/tgo/treflect/reflection.go b/vendor/github.com/trivago/tgo/treflect/reflection.go deleted file mode 100644 index 48a11f477e7..00000000000 --- a/vendor/github.com/trivago/tgo/treflect/reflection.go +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 treflect - -import ( - "fmt" - "reflect" - "unsafe" -) - -// GetMissingMethods checks if a given object implements all methods of a -// given interface. It returns the interface coverage [0..1] as well as an array -// of error messages. If the interface is correctly implemented the coverage is -// 1 and the error message array is empty. -func GetMissingMethods(objType reflect.Type, ifaceType reflect.Type) (float32, []string) { - missing := []string{} - if objType.Implements(ifaceType) { - return 1.0, missing - } - - methodCount := ifaceType.NumMethod() - for mIdx := 0; mIdx < methodCount; mIdx++ { - ifaceMethod := ifaceType.Method(mIdx) - objMethod, exists := objType.MethodByName(ifaceMethod.Name) - signatureMismatch := false - - switch { - case !exists: - missing = append(missing, fmt.Sprintf("Missing: \"%s\" %v", ifaceMethod.Name, ifaceMethod.Type)) - continue // ### continue, error found ### - - case ifaceMethod.Type.NumOut() != objMethod.Type.NumOut(): - signatureMismatch = true - - case ifaceMethod.Type.NumIn()+1 != objMethod.Type.NumIn(): - signatureMismatch = true - - default: - for oIdx := 0; !signatureMismatch && oIdx < ifaceMethod.Type.NumOut(); oIdx++ { - signatureMismatch = ifaceMethod.Type.Out(oIdx) != objMethod.Type.Out(oIdx) - } - for iIdx := 0; !signatureMismatch && iIdx < ifaceMethod.Type.NumIn(); iIdx++ { - signatureMismatch = ifaceMethod.Type.In(iIdx) != objMethod.Type.In(iIdx+1) - } - } - - if signatureMismatch { - missing = append(missing, fmt.Sprintf("Invalid: \"%s\" %v is not %v", ifaceMethod.Name, objMethod.Type, ifaceMethod.Type)) - } - } - - return float32(methodCount-len(missing)) / float32(methodCount), missing -} - -// Int64 converts any signed number type to an int64. -// The second parameter is returned as false if a non-number type was given. -func Int64(v interface{}) (int64, bool) { - - switch reflect.TypeOf(v).Kind() { - case reflect.Int: - return int64(v.(int)), true - case reflect.Int8: - return int64(v.(int8)), true - case reflect.Int16: - return int64(v.(int16)), true - case reflect.Int32: - return int64(v.(int32)), true - case reflect.Int64: - return v.(int64), true - case reflect.Float32: - return int64(v.(float32)), true - case reflect.Float64: - return int64(v.(float64)), true - } - - return 0, false -} - -// Uint64 converts any unsigned number type to an uint64. -// The second parameter is returned as false if a non-number type was given. -func Uint64(v interface{}) (uint64, bool) { - - switch reflect.TypeOf(v).Kind() { - case reflect.Uint: - return uint64(v.(uint)), true - case reflect.Uint8: - return uint64(v.(uint8)), true - case reflect.Uint16: - return uint64(v.(uint16)), true - case reflect.Uint32: - return uint64(v.(uint32)), true - case reflect.Uint64: - return v.(uint64), true - } - - return 0, false -} - -// Float32 converts any number type to an float32. -// The second parameter is returned as false if a non-number type was given. -func Float32(v interface{}) (float32, bool) { - - switch reflect.TypeOf(v).Kind() { - case reflect.Int: - return float32(v.(int)), true - case reflect.Uint: - return float32(v.(uint)), true - case reflect.Int8: - return float32(v.(int8)), true - case reflect.Uint8: - return float32(v.(uint8)), true - case reflect.Int16: - return float32(v.(int16)), true - case reflect.Uint16: - return float32(v.(uint16)), true - case reflect.Int32: - return float32(v.(int32)), true - case reflect.Uint32: - return float32(v.(uint32)), true - case reflect.Int64: - return float32(v.(int64)), true - case reflect.Uint64: - return float32(v.(uint64)), true - case reflect.Float32: - return v.(float32), true - case reflect.Float64: - return float32(v.(float64)), true - } - - return 0, false -} - -// Float64 converts any number type to an float64. -// The second parameter is returned as false if a non-number type was given. -func Float64(v interface{}) (float64, bool) { - - switch reflect.TypeOf(v).Kind() { - case reflect.Int: - return float64(v.(int)), true - case reflect.Uint: - return float64(v.(uint)), true - case reflect.Int8: - return float64(v.(int8)), true - case reflect.Uint8: - return float64(v.(uint8)), true - case reflect.Int16: - return float64(v.(int16)), true - case reflect.Uint16: - return float64(v.(uint16)), true - case reflect.Int32: - return float64(v.(int32)), true - case reflect.Uint32: - return float64(v.(uint32)), true - case reflect.Int64: - return float64(v.(int64)), true - case reflect.Uint64: - return float64(v.(uint64)), true - case reflect.Float32: - return float64(v.(float32)), true - case reflect.Float64: - return v.(float64), true - } - - return 0, false -} - -// RemovePtrFromType will return the type of t and strips away any pointer(s) -// in front of the actual type. -func RemovePtrFromType(t interface{}) reflect.Type { - var v reflect.Type - if rt, isType := t.(reflect.Type); isType { - v = rt - } else { - v = reflect.TypeOf(t) - } - for v.Kind() == reflect.Ptr { - v = v.Elem() - } - return v -} - -// RemovePtrFromValue will return the value of t and strips away any pointer(s) -// in front of the actual type. -func RemovePtrFromValue(t interface{}) reflect.Value { - var v reflect.Value - if rv, isValue := t.(reflect.Value); isValue { - v = rv - } else { - v = reflect.ValueOf(t) - } - for v.Type().Kind() == reflect.Ptr { - v = v.Elem() - } - return v -} - -// UnsafeCopy will copy data from src to dst while ignoring type information. -// Both types need to be of the same size and dst and src have to be pointers. -// UnsafeCopy will panic if these requirements are not met. -func UnsafeCopy(dst, src interface{}) { - dstValue := reflect.ValueOf(dst) - srcValue := reflect.ValueOf(src) - UnsafeCopyValue(dstValue, srcValue) -} - -// UnsafeCopyValue will copy data from src to dst while ignoring type -// information. Both types need to be of the same size or this function will -// panic. Also both types must support dereferencing via reflect.Elem() -func UnsafeCopyValue(dstValue reflect.Value, srcValue reflect.Value) { - dstType := dstValue.Elem().Type() - srcType := srcValue.Type() - - var srcPtr uintptr - if srcValue.Kind() != reflect.Ptr { - // If we don't get a pointer to our source data we need to forcefully - // retrieve it by accessing the interface pointer. This is ok as we - // only read from it. - iface := srcValue.Interface() - srcPtr = reflect.ValueOf(&iface).Elem().InterfaceData()[1] // Pointer to data - } else { - srcType = srcValue.Elem().Type() - srcPtr = srcValue.Pointer() - } - - if dstType.Size() != srcType.Size() { - panic("Type size mismatch between " + dstType.String() + " and " + srcType.String()) - } - - dstAsSlice := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ - Data: dstValue.Pointer(), - Len: int(dstType.Size()), - Cap: int(dstType.Size()), - })) - - srcAsSlice := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ - Data: srcPtr, - Len: int(srcType.Size()), - Cap: int(srcType.Size()), - })) - - copy(dstAsSlice, srcAsSlice) -} - -// SetMemberByName sets member name of the given pointer-to-struct to the data -// passed to this function. The member may be private, too. -func SetMemberByName(ptrToStruct interface{}, name string, data interface{}) { - structVal := reflect.Indirect(reflect.ValueOf(ptrToStruct)) - member := structVal.FieldByName(name) - - SetValue(member, data) -} - -// SetMemberByIndex sets member idx of the given pointer-to-struct to the data -// passed to this function. The member may be private, too. -func SetMemberByIndex(ptrToStruct interface{}, idx int, data interface{}) { - structVal := reflect.Indirect(reflect.ValueOf(ptrToStruct)) - member := structVal.Field(idx) - - SetValue(member, data) -} - -// SetValue sets an addressable value to the data passed to this function. -// In contrast to golangs reflect package this will also work with private -// variables. Please note that this function may not support all types, yet. -func SetValue(member reflect.Value, data interface{}) { - if member.CanSet() { - member.Set(reflect.ValueOf(data).Convert(member.Type())) - return // ### return, easy way ### - } - - if !member.CanAddr() { - panic("SetValue requires addressable member type") - } - - ptrToMember := unsafe.Pointer(member.UnsafeAddr()) - dataValue := reflect.ValueOf(data) - - switch member.Kind() { - case reflect.Bool: - *(*bool)(ptrToMember) = dataValue.Bool() - - case reflect.Uint: - *(*uint)(ptrToMember) = uint(dataValue.Uint()) - - case reflect.Uint8: - *(*uint8)(ptrToMember) = uint8(dataValue.Uint()) - - case reflect.Uint16: - *(*uint16)(ptrToMember) = uint16(dataValue.Uint()) - - case reflect.Uint32: - *(*uint32)(ptrToMember) = uint32(dataValue.Uint()) - - case reflect.Uint64: - *(*uint64)(ptrToMember) = dataValue.Uint() - - case reflect.Int: - *(*int)(ptrToMember) = int(dataValue.Int()) - - case reflect.Int8: - *(*int8)(ptrToMember) = int8(dataValue.Int()) - - case reflect.Int16: - *(*int16)(ptrToMember) = int16(dataValue.Int()) - - case reflect.Int32: - *(*int32)(ptrToMember) = int32(dataValue.Int()) - - case reflect.Int64: - *(*int64)(ptrToMember) = dataValue.Int() - - case reflect.Float32: - *(*float32)(ptrToMember) = float32(dataValue.Float()) - - case reflect.Float64: - *(*float64)(ptrToMember) = dataValue.Float() - - case reflect.Complex64: - *(*complex64)(ptrToMember) = complex64(dataValue.Complex()) - - case reflect.Complex128: - *(*complex128)(ptrToMember) = dataValue.Complex() - - case reflect.String: - *(*string)(ptrToMember) = dataValue.String() - - case reflect.Map, reflect.Chan: - // Exploit the fact that "map" is actually "*runtime.hmap" and force - // overwrite that pointer in the passed struct. - // Same foes for "chan" which is actually "*runtime.hchan". - - // Note: Assigning a map or channel to another variable does NOT copy - // the contents so copying the pointer follows go's standard behavior. - dataAsPtr := unsafe.Pointer(dataValue.Pointer()) - *(**uintptr)(ptrToMember) = (*uintptr)(dataAsPtr) - - case reflect.Interface: - // Interfaces are basically two pointers, see runtime.iface. - // We want to modify exactly that data, which is returned by - // the InterfaceData() method. - - if dataValue.Kind() != reflect.Interface { - // A type reference was passed. In order to overwrite the memory - // Representation of an interface we need to generate it first. - // Reflect does not allow us to do that unless we use the - // InterfaceData method which exposes the internal representation - // of an interface. - interfaceData := reflect.ValueOf(&data).Elem().InterfaceData() - dataValue = reflect.ValueOf(interfaceData) - } - fallthrough - - default: - // Complex types are assigned memcpy style. - // Note: This should not break the garbage collector although we cannot - // be 100% sure on this. - UnsafeCopyValue(member.Addr(), dataValue) - } -} diff --git a/vendor/github.com/trivago/tgo/treflect/typeregistry.go b/vendor/github.com/trivago/tgo/treflect/typeregistry.go deleted file mode 100644 index d3e3d7eff89..00000000000 --- a/vendor/github.com/trivago/tgo/treflect/typeregistry.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2015-2018 trivago N.V. -// -// 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 treflect - -import ( - "fmt" - "reflect" - "strings" -) - -// TypeRegistry is a name to type registry used to create objects by name. -type TypeRegistry struct { - namedType map[string]reflect.Type -} - -// NewTypeRegistry creates a new TypeRegistry. Note that there is a global type -// registry available in the main tgo package (tgo.TypeRegistry). -func NewTypeRegistry() TypeRegistry { - return TypeRegistry{ - namedType: make(map[string]reflect.Type), - } -} - -// Register a plugin to the TypeRegistry by passing an uninitialized object. -func (registry TypeRegistry) Register(typeInstance interface{}) { - registry.RegisterWithDepth(typeInstance, 1) -} - -// RegisterWithDepth to register a plugin to the TypeRegistry by passing an uninitialized object. -func (registry TypeRegistry) RegisterWithDepth(typeInstance interface{}, depth int) { - structType := reflect.TypeOf(typeInstance) - packageName := structType.PkgPath() - typeName := structType.Name() - - pathTokens := strings.Split(packageName, "/") - maxDepth := 3 - if len(pathTokens) < maxDepth { - maxDepth = len(pathTokens) - } - - for n := depth; n <= maxDepth; n++ { - shortTypeName := strings.Join(pathTokens[len(pathTokens)-n:], ".") + "." + typeName - registry.namedType[shortTypeName] = structType - } -} - -// New creates an uninitialized object by class name. -// The class name has to be "package.class" or "package/subpackage.class". -// The gollum package is omitted from the package path. -func (registry TypeRegistry) New(typeName string) (interface{}, error) { - structType, exists := registry.namedType[typeName] - if exists { - return reflect.New(structType).Interface(), nil - } - return nil, fmt.Errorf("Unknown class: %s", typeName) -} - -// GetTypeOf returns only the type asscociated with the given name. -// If the name is not registered, nil is returned. -// The type returned will be a pointer type. -func (registry TypeRegistry) GetTypeOf(typeName string) reflect.Type { - if structType, exists := registry.namedType[typeName]; exists { - return reflect.PtrTo(structType) - } - return nil -} - -// IsTypeRegistered returns true if a type is registered to this registry. -// Note that GetTypeOf can do the same thing by checking for nil but also -// returns the type, so in many cases you will want to call this function. -func (registry TypeRegistry) IsTypeRegistered(typeName string) bool { - _, exists := registry.namedType[typeName] - return exists -} - -// GetRegistered returns the names of all registered types for a given package -func (registry TypeRegistry) GetRegistered(packageName string) []string { - var result []string - for key := range registry.namedType { - if strings.HasPrefix(key, packageName) { - result = append(result, key) - } - } - return result -} diff --git a/vendor/github.com/twpayne/go-geom/.gitignore b/vendor/github.com/twpayne/go-geom/.gitignore new file mode 100644 index 00000000000..73fba366f9f --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/.gitignore @@ -0,0 +1,2 @@ +/bin +/coverage.out diff --git a/vendor/github.com/twpayne/go-geom/.golangci.yml b/vendor/github.com/twpayne/go-geom/.golangci.yml new file mode 100644 index 00000000000..ad896dcf456 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/.golangci.yml @@ -0,0 +1,174 @@ +version: "2" +run: + go: "1.22" +linters: + enable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - canonicalheader + - containedctx + - contextcheck + - copyloopvar + - decorder + - dogsled + - dupl + - dupword + - durationcheck + - err113 + - errchkjson + - errorlint + - exptostd + - fatcontext + - forbidigo + - forcetypeassert + - ginkgolinter + - gocheckcompilerdirectives + - gochecknoinits + - gochecksumtype + - gocritic + - godot + - goheader + - gomoddirectives + - gomodguard + - goprintffuncname + - gosmopolitan + - grouper + - iface + - importas + - inamedparam + - interfacebloat + - intrange + - ireturn + - loggercheck + - makezero + - mirror + - misspell + - musttag + - nakedret + - nilerr + - nilnesserr + - nilnil + - noctx + - nolintlint + - nosprintfhostport + - perfsprint + - prealloc + - predeclared + - promlinter + - protogetter + - reassign + - recvcheck + - revive + - rowserrcheck + - sloglint + - spancheck + - sqlclosecheck + - staticcheck + - tagalign + - tagliatelle + - testableexamples + - testifylint + - thelper + - tparallel + - unconvert + - unparam + - usestdlibvars + - usetesting + - wastedassign + - whitespace + - zerologlint + disable: + - cyclop + - depguard + - errname + - exhaustive + - exhaustruct + - funlen + - gochecknoglobals + - gocognit + - goconst + - gocyclo + - godox + - gosec + - lll + - maintidx + - mnd + - nestif + - nlreturn + - nonamedreturns + - paralleltest + - testpackage + - varnamelen + - wrapcheck + - wsl + settings: + ireturn: + allow: + - error + - stdlib + - ^github\.com/twpayne/go-geom\.T$ + - ^github\.com/twpayne/go-kml/v3\.Element$ + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - dupl + - scopelint + path: _test\.go + - linters: + - godot + path: ^bigxy/ + - linters: + - gocritic + path: _example_test\.go$ + - linters: + - godot + path: ^sorting/ + - linters: + - godot + path: ^transform/ + - linters: + - gocritic + - godot + path: ^xy/ + - linters: + - godot + path: ^xyz/ + - linters: + - err113 + text: do not define dynamic errors, use wrapped static errors instead + - linters: + - forbidigo + path: ^internal/cmd/ + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + settings: + gci: + sections: + - standard + - default + - prefix(github.com/twpayne/go-geom) + goimports: + local-prefixes: + - github.com/twpayne/go-geom + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/vendor/github.com/twpayne/go-geom/INTERNALS.md b/vendor/github.com/twpayne/go-geom/INTERNALS.md new file mode 100644 index 00000000000..8e1530105f9 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/INTERNALS.md @@ -0,0 +1,119 @@ +# `go-geom` Internals + + +## Introduction + +`go-geom` attempts to implement efficient, standards-compatible OGC-style +geometries for Go. This document describes some of the key ideas required to +understand its implementation. + +`go-geom` is an evolution of the techniques developed for the [OpenLayers 3 +geometry library](http://openlayers.org/en/master/apidoc/ol.geom.html), +designed to efficiently handle large geometries in a resource-constrained, +garbage-collected environment, but adapted to the Go programming language and +its type system. + + +## Type flexibility + +There are three priniciple 2D geometry types: `Point`s, `LineString`s, and +`Polygon`s. + +OGC extends these three into collections of the principle types: `MultiPoint`, +`MultiLineString`, and `MultiPolygon`. This gives 3 geometry types * 2 +multi-or-not-multi = 6 combinations. + +On top of this, there are multiple combinations of dimensions, e.g. 2D (XY), 3D +(XYZ), 2D varying over time/distance (XYM), and 3D varying over time/distance +(XYZM). + +3 geometry types * 2 multi-or-not-multi * 4 different dimensionalities = 24 +distinct types. + +Go has neither generics, nor macros, nor a rich type system. `go-geom` attempts +to manage this combinatorial explosion while maintaining an idiomatic Go API, +implementation efficiency. and high runtime performance. + + +## Structural similarity + +`go-geom` exploits structural similarity between different geometry types to +share code. Consider: + +0. A `Point` consists of a single coordinate. This single coordinate is a + `geom.Coord`. + +1. A `LineString`, `LinearRing`, and `MultiPoint` consist of a collection of + coordinates. They all have different semantics (a `LineString` is ordered, +a `LinearRing` is ordered and closed, a `MultiPoint` is neither ordered nor +closed) yet all share a similar underlying structure. + +2. A `Polygon` and a `MultiLineString` are a collection of collections of + coordinates. Again, the semantics vary: a `Polygon` is a weakly ordered +collection of `LinearRing`s (the first `LinearRing` is the outer boundary, +subsequent `LinearRing`s are inner boundaries (holes)). A `MultiLineString` is +an unordered collection of `LineString`s. + +3. A `MultiPolygon` is an unordered collection of `Polygon`s. + +`go-geom` makes these structural similarities explicit: + +0. A `Point` is a `geom.Coord`, also known as `geom0`. + +1. `LineString`s, `LinearRing`s, and and `MultiPoint`s are `[]geom.Coord`, also + known as `geom1`. + +2. `Polygon`s and `MultiLineString`s are `[][]geom.Coord`, also known as + `geom2`. + +3. `MultiPolygon`s are `[][][]geom.Coord`, also known as `geom3`. + +Under the hood, `go-geom` uses Go's structural composition to share common +code. For example, `LineString`s, `LinearRing`s, and `MultiPoint`s all embed a +single anonymous `geom1`. + +The hierarchy of embedding is: + + geom0 + +- geom1 + +- geom2 + +- geom3 + +Note that `geom2` and `geom3` independently embed `geom1`. Despite their +numerical ordering, `geom2` and `geom3` are separate branches of the geometry +tree. + +We can exploit these structural similarities to share code. For example, +calculating the bounds of a geometry only involves finding the minimum and +maximum values in each dimension, which can be found by iterating over all +coordinates in the geometry. The semantic meaning of these coordinates - +whether they're points on a line, or points on a polygon inner or outer +boundary, or something else - does not matter. Therefore, as long as we can +treat any geometry as a collection of coordinates, we can use the same code to +calculate bounds across all geometry types. + +Similarly, we can exploit higher-level similarities. For example, the "length" +of a `MultiLineString` is the sum of the lengths of its component +`LineString`s, and the "length" (perimeter) of a `Polygon` is the sum of the +lengths (perimeters) of its component `LinearRing`s. + + +## Efficient + +At the time of writing (2016), CPUs are fast, cache hits are quite fast, cache +misses are slow, memory is very slow, and garbage collection takes an eternity. + +Typical geometry libraries use multiple levels of nested arrays, e.g. a +`[][][]float64` for a polygon. This requires multiple levels of indirection to +access a single coordinate value, and as different sub-arrays might be stored +in different parts of memory, is more likely to lead to cache miss. + +In contrast, `go-geom` packs all the coordinates for a geometry, whatever its +structure, into a single `[]float64`. The underlying array is stored in a +single blob of memory. Most operations do a linear scan over the array, which +is particularly cache friendly. There are also fewer objects for the garbage +collector to manage. + +Parts of the underlying array can be shared between multitple objects. For +example, retrieving the outer ring of a `Polygon` returns a `LinearRing` that +references the coordinates of the `Polygon`. No coordinate data are copied. diff --git a/vendor/github.com/twpayne/go-geom/LICENSE b/vendor/github.com/twpayne/go-geom/LICENSE new file mode 100644 index 00000000000..3bc8155e40f --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Tom Payne +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. + +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 HOLDER 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. \ No newline at end of file diff --git a/vendor/github.com/twpayne/go-geom/Makefile b/vendor/github.com/twpayne/go-geom/Makefile new file mode 100644 index 00000000000..17994aa2da1 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/Makefile @@ -0,0 +1,56 @@ +GO?=go +GOFUMPT_VERSION=$(shell awk '/GOFUMPT_VERSION:/ { print $$2 }' .github/workflows/main.yml) +GOLANGCI_LINT_VERSION=$(shell awk '/GOLANGCI_LINT_VERSION:/ { print $$2 }' .github/workflows/main.yml) + +.PHONY: all +all: test lint + +.PHONY: test +test: + ${GO} test ./... + +.PHONY: coverage.out +coverage.out: + ${GO} test -covermode=count --coverprofile=$@ ./... + +.PHONY: lint +lint: ensure-golangci-lint + ./bin/golangci-lint run + +.PHONY: format +format: ensure-gofumpt + find . -name \*.go | xargs ./bin/gofumpt -extra -w + +.PHONY: generate +generate: ensure-goderive ensure-goyacc + PATH=$$PATH:$(shell pwd)/bin ${GO} generate ./... + +.PHONY: install-tools +install-tools: ensure-goderive ensure-gofumpt ensure-golangci-lint ensure-goyacc + +.PHONY: ensure-goderive +ensure-goderive: + if [ ! -x bin/goderive ] ; then \ + mkdir -p bin ; \ + GOBIN=$(shell pwd)/bin ${GO} install "github.com/awalterschulze/goderive@latest" ; \ + fi + +.PHONY: ensure-gofumpt +ensure-gofumpt: + if [ ! -x bin/gofumpt ] || ( ./bin/gofumpt --version | grep -Fqv "v${GOFUMPT_VERSION}" ) ; then \ + mkdir -p bin ; \ + GOBIN=$(shell pwd)/bin ${GO} install "mvdan.cc/gofumpt@v${GOFUMPT_VERSION}" ; \ + fi + +.PHONY: ensure-golangci-lint +ensure-golangci-lint: + if [ ! -x bin/golangci-lint ] || ( ./bin/golangci-lint --version | grep -Fqv "version ${GOLANGCI_LINT_VERSION}" ) ; then \ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- v${GOLANGCI_LINT_VERSION} ; \ + fi + +.PHONY: ensure-goyacc +ensure-goyacc: + if [ ! -x bin/goyacc ] ; then \ + mkdir -p bin ; \ + GOBIN=$(shell pwd)/bin ${GO} install "golang.org/x/tools/cmd/goyacc@latest" ; \ + fi diff --git a/vendor/github.com/twpayne/go-geom/README.md b/vendor/github.com/twpayne/go-geom/README.md new file mode 100644 index 00000000000..7ca719fdd4c --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/README.md @@ -0,0 +1,75 @@ +# go-geom + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/twpayne/go-geom)](https://pkg.go.dev/github.com/twpayne/go-geom) +[![Go Report Card](https://goreportcard.com/badge/github.com/twpayne/go-geom)](https://goreportcard.com/report/github.com/twpayne/go-geom) + +Package `geom` implements efficient geometry types for geospatial applications. + +## Key features + +* OpenGeo Consortium-style geometries. +* Support for 2D and 3D geometries, measures (time and/or distance), and + unlimited extra dimensions. +* Encoding and decoding of common geometry formats (GeoJSON, KML, WKB, and + others) including [`sql.Scanner`](https://pkg.go.dev/database/sql#Scanner) and + [`driver.Value`](https://pkg.go.dev/database/sql/driver#Value) interface + implementations for easy database integration. +* [2D](https://pkg.go.dev/github.com/twpayne/go-geom/xy) and + [3D](https://pkg.go.dev/github.com/twpayne/go-geom/xyz) topology functions. +* Efficient, cache-friendly [internal representation](INTERNALS.md). +* Optional protection against malicious or malformed inputs. + +## Examples + +* [PostGIS, EWKB, and GeoJSON](https://github.com/twpayne/go-geom/tree/master/examples/postgis). + +## Detailed features + +### Geometry types + +* [Point](https://pkg.go.dev/github.com/twpayne/go-geom#Point) +* [LineString](https://pkg.go.dev/github.com/twpayne/go-geom#LineString) +* [Polygon](https://pkg.go.dev/github.com/twpayne/go-geom#Polygon) +* [MultiPoint](https://pkg.go.dev/github.com/twpayne/go-geom#MultiPoint) +* [MultiLineString](https://pkg.go.dev/github.com/twpayne/go-geom#MultiLineString) +* [MultiPolygon](https://pkg.go.dev/github.com/twpayne/go-geom#MultiPolygon) +* [GeometryCollection](https://pkg.go.dev/github.com/twpayne/go-geom#GeometryCollection) + +### Encoding and decoding + +* [GeoJSON](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/geojson) +* [IGC](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/igc) +* [KML](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/kml) (encoding only) +* [WKB](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/wkb) +* [EWKB](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/ewkb) +* [WKT](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/wkt) (encoding only) +* [WKB Hex](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/wkbhex) +* [EWKB Hex](https://pkg.go.dev/github.com/twpayne/go-geom/encoding/ewkbhex) + +### Geometry functions + +* [XY](https://pkg.go.dev/github.com/twpayne/go-geom/xy) 2D geometry functions +* [XYZ](https://pkg.go.dev/github.com/twpayne/go-geom/xyz) 3D geometry functions + +## Protection against malicious or malformed inputs + +The WKB and EWKB formats encode geometry sizes, and memory is allocated for +those geometries. If the input is malicious or malformed, the memory allocation +can be very large, leading to a memory starvation denial-of-service attack +against the server. For example, a client might send a `MultiPoint` with header +indicating that it contains 2^32-1 points. This will result in the server +reading that geometry to allocate 2 × `sizeof(float64)` × (2^32-1) = 64GB of +memory to store those points. By default, malicious or malformed input +protection is disabled, but can be enabled by setting positive values for +`wkbcommon.MaxGeometryElements`. + +## Related libraries + +* [github.com/twpayne/go-gpx](https://github.com/twpayne/go-gpx) GPX encoding and decoding +* [github.com/twpayne/go-kml](https://github.com/twpayne/go-kml) KML encoding +* [github.com/twpayne/go-polyline](https://github.com/twpayne/go-polyline) Google Maps Polyline encoding and decoding +* [github.com/twpayne/go-vali](https://github.com/twpayne/go-vali) IGC validation + +## License + +BSD-2-Clause \ No newline at end of file diff --git a/vendor/github.com/twpayne/go-geom/bounds.go b/vendor/github.com/twpayne/go-geom/bounds.go new file mode 100644 index 00000000000..db4e2b02aa3 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/bounds.go @@ -0,0 +1,178 @@ +package geom + +import "math" + +// A Bounds represents a multi-dimensional bounding box. +type Bounds struct { + layout Layout + min Coord + max Coord +} + +// NewBounds creates a new Bounds. +func NewBounds(layout Layout) *Bounds { + stride := layout.Stride() + minValue, maxValue := make(Coord, stride), make(Coord, stride) + for i := range stride { + minValue[i], maxValue[i] = math.Inf(1), math.Inf(-1) + } + return &Bounds{ + layout: layout, + min: minValue, + max: maxValue, + } +} + +// Clone returns a deep copy of b. +func (b *Bounds) Clone() *Bounds { + return deriveCloneBounds(b) +} + +// Extend extends b to include geometry g. +func (b *Bounds) Extend(g T) *Bounds { + b.extendLayout(g.Layout()) + if b.layout == XYZM && g.Layout() == XYM { + return b.extendXYZMFlatCoordsWithXYM(g.FlatCoords(), 0, len(g.FlatCoords())) + } + return b.extendFlatCoords(g.FlatCoords(), 0, len(g.FlatCoords()), g.Stride()) +} + +// IsEmpty returns true if b is empty. +func (b *Bounds) IsEmpty() bool { + if b.layout == NoLayout { + return true + } + for i, stride := 0, b.layout.Stride(); i < stride; i++ { + if b.max[i] < b.min[i] { + return true + } + } + return false +} + +// Layout returns b's layout. +func (b *Bounds) Layout() Layout { + return b.layout +} + +// Max returns the maximum value in dimension dim. +func (b *Bounds) Max(dim int) float64 { + return b.max[dim] +} + +// Min returns the minimum value in dimension dim. +func (b *Bounds) Min(dim int) float64 { + return b.min[dim] +} + +// Overlaps returns true if b overlaps b2 in layout. +func (b *Bounds) Overlaps(layout Layout, b2 *Bounds) bool { + for i, stride := 0, layout.Stride(); i < stride; i++ { + if b.min[i] > b2.max[i] || b.max[i] < b2.min[i] { + return false + } + } + return true +} + +// Polygon returns b as a two-dimensional Polygon. +func (b *Bounds) Polygon() *Polygon { + if b.IsEmpty() { + return NewPolygonFlat(XY, nil, nil) + } + x1, y1 := b.min[0], b.min[1] + x2, y2 := b.max[0], b.max[1] + flatCoords := []float64{ + x1, y1, + x1, y2, + x2, y2, + x2, y1, + x1, y1, + } + return NewPolygonFlat(XY, flatCoords, []int{len(flatCoords)}) +} + +// Set sets the minimum and maximum values. args must be an even number of +// values: the first half are the minimum values for each dimension and the +// second half are the maximum values for each dimension. If necessary, the +// layout of b will be extended to cover all the supplied dimensions implied by +// args. +func (b *Bounds) Set(args ...float64) *Bounds { + if len(args)&1 != 0 { + panic("geom: even number of arguments required") + } + stride := len(args) / 2 + b.extendStride(stride) + for i := range stride { + b.min[i], b.max[i] = args[i], args[i+stride] + } + return b +} + +// SetCoords sets the minimum and maximum values of the Bounds. +func (b *Bounds) SetCoords(minCoord, maxCoord Coord) *Bounds { + b.min = Coord(make([]float64, b.layout.Stride())) + b.max = Coord(make([]float64, b.layout.Stride())) + for i := range b.layout.Stride() { + b.min[i] = math.Min(minCoord[i], maxCoord[i]) + b.max[i] = math.Max(minCoord[i], maxCoord[i]) + } + return b +} + +// OverlapsPoint determines if the bounding box overlaps the point (point is +// within or on the border of the bounds). +func (b *Bounds) OverlapsPoint(layout Layout, point Coord) bool { + for i, stride := 0, layout.Stride(); i < stride; i++ { + if b.min[i] > point[i] || b.max[i] < point[i] { + return false + } + } + return true +} + +func (b *Bounds) extendFlatCoords(flatCoords []float64, offset, end, stride int) *Bounds { + b.extendStride(stride) + for i := offset; i < end; i += stride { + for j := range stride { + b.min[j] = math.Min(b.min[j], flatCoords[i+j]) + b.max[j] = math.Max(b.max[j], flatCoords[i+j]) + } + } + return b +} + +func (b *Bounds) extendLayout(layout Layout) { + switch { + case b.layout == XYZ && layout == XYM: + b.min = append(b.min, math.Inf(1)) + b.max = append(b.max, math.Inf(-1)) + b.layout = XYZM + case b.layout == XYM && (layout == XYZ || layout == XYZM): + b.min = append(b.min[:2], math.Inf(1), b.min[2]) + b.max = append(b.max[:2], math.Inf(-1), b.max[2]) + b.layout = XYZM + case b.layout < layout: + b.extendStride(layout.Stride()) + b.layout = layout + } +} + +func (b *Bounds) extendStride(stride int) { + for s := b.layout.Stride(); s < stride; s++ { + b.min = append(b.min, math.Inf(1)) + b.max = append(b.max, math.Inf(-1)) + } +} + +func (b *Bounds) extendXYZMFlatCoordsWithXYM(flatCoords []float64, offset, end int) *Bounds { + for i := offset; i < end; i += 3 { + b.min[0] = math.Min(b.min[0], flatCoords[i+0]) + b.max[0] = math.Max(b.max[0], flatCoords[i+0]) + b.min[1] = math.Min(b.min[1], flatCoords[i+1]) + b.max[1] = math.Max(b.max[1], flatCoords[i+1]) + b.min[3] = math.Min(b.min[3], flatCoords[i+2]) + b.max[3] = math.Max(b.max[3], flatCoords[i+2]) + } + return b +} diff --git a/vendor/github.com/twpayne/go-geom/derived.gen.go b/vendor/github.com/twpayne/go-geom/derived.gen.go new file mode 100644 index 00000000000..44fda319047 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/derived.gen.go @@ -0,0 +1,314 @@ +// Code generated by goderive DO NOT EDIT. + +package geom + +// deriveCloneBounds returns a clone of the src parameter. +func deriveCloneBounds(src *Bounds) *Bounds { + if src == nil { + return nil + } + dst := new(Bounds) + deriveDeepCopy(dst, src) + return dst +} + +// deriveCloneCoord returns a clone of the src parameter. +func deriveCloneCoord(src Coord) Coord { + if src == nil { + return nil + } + dst := make(Coord, len(src)) + deriveDeepCopy_(dst, src) + return dst +} + +// deriveCloneLinearRing returns a clone of the src parameter. +func deriveCloneLinearRing(src *LinearRing) *LinearRing { + if src == nil { + return nil + } + dst := new(LinearRing) + deriveDeepCopy_1(dst, src) + return dst +} + +// deriveCloneLineString returns a clone of the src parameter. +func deriveCloneLineString(src *LineString) *LineString { + if src == nil { + return nil + } + dst := new(LineString) + deriveDeepCopy_2(dst, src) + return dst +} + +// deriveCloneMultiLineString returns a clone of the src parameter. +func deriveCloneMultiLineString(src *MultiLineString) *MultiLineString { + if src == nil { + return nil + } + dst := new(MultiLineString) + deriveDeepCopy_3(dst, src) + return dst +} + +// deriveCloneMultiPoint returns a clone of the src parameter. +func deriveCloneMultiPoint(src *MultiPoint) *MultiPoint { + if src == nil { + return nil + } + dst := new(MultiPoint) + deriveDeepCopy_4(dst, src) + return dst +} + +// deriveCloneMultiPolygon returns a clone of the src parameter. +func deriveCloneMultiPolygon(src *MultiPolygon) *MultiPolygon { + if src == nil { + return nil + } + dst := new(MultiPolygon) + deriveDeepCopy_5(dst, src) + return dst +} + +// deriveClonePoint returns a clone of the src parameter. +func deriveClonePoint(src *Point) *Point { + if src == nil { + return nil + } + dst := new(Point) + deriveDeepCopy_6(dst, src) + return dst +} + +// deriveClonePolygon returns a clone of the src parameter. +func deriveClonePolygon(src *Polygon) *Polygon { + if src == nil { + return nil + } + dst := new(Polygon) + deriveDeepCopy_7(dst, src) + return dst +} + +// deriveDeepCopy recursively copies the contents of src into dst. +func deriveDeepCopy(dst, src *Bounds) { + dst.layout = src.layout + if src.min == nil { + dst.min = nil + } else { + if dst.min != nil { + if len(src.min) > len(dst.min) { + if cap(dst.min) >= len(src.min) { + dst.min = (dst.min)[:len(src.min)] + } else { + dst.min = make([]float64, len(src.min)) + } + } else if len(src.min) < len(dst.min) { + dst.min = (dst.min)[:len(src.min)] + } + } else { + dst.min = make([]float64, len(src.min)) + } + copy(dst.min, src.min) + } + if src.max == nil { + dst.max = nil + } else { + if dst.max != nil { + if len(src.max) > len(dst.max) { + if cap(dst.max) >= len(src.max) { + dst.max = (dst.max)[:len(src.max)] + } else { + dst.max = make([]float64, len(src.max)) + } + } else if len(src.max) < len(dst.max) { + dst.max = (dst.max)[:len(src.max)] + } + } else { + dst.max = make([]float64, len(src.max)) + } + copy(dst.max, src.max) + } +} + +// deriveDeepCopy_ recursively copies the contents of src into dst. +func deriveDeepCopy_(dst, src Coord) { + copy(dst, src) +} + +// deriveDeepCopy_1 recursively copies the contents of src into dst. +func deriveDeepCopy_1(dst, src *LinearRing) { + func() { + field := new(geom1) + deriveDeepCopy_8(field, &src.geom1) + dst.geom1 = *field + }() +} + +// deriveDeepCopy_2 recursively copies the contents of src into dst. +func deriveDeepCopy_2(dst, src *LineString) { + func() { + field := new(geom1) + deriveDeepCopy_8(field, &src.geom1) + dst.geom1 = *field + }() +} + +// deriveDeepCopy_3 recursively copies the contents of src into dst. +func deriveDeepCopy_3(dst, src *MultiLineString) { + func() { + field := new(geom2) + deriveDeepCopy_9(field, &src.geom2) + dst.geom2 = *field + }() +} + +// deriveDeepCopy_4 recursively copies the contents of src into dst. +func deriveDeepCopy_4(dst, src *MultiPoint) { + func() { + field := new(geom2) + deriveDeepCopy_9(field, &src.geom2) + dst.geom2 = *field + }() +} + +// deriveDeepCopy_5 recursively copies the contents of src into dst. +func deriveDeepCopy_5(dst, src *MultiPolygon) { + func() { + field := new(geom3) + deriveDeepCopy_10(field, &src.geom3) + dst.geom3 = *field + }() +} + +// deriveDeepCopy_6 recursively copies the contents of src into dst. +func deriveDeepCopy_6(dst, src *Point) { + func() { + field := new(geom0) + deriveDeepCopy_11(field, &src.geom0) + dst.geom0 = *field + }() +} + +// deriveDeepCopy_7 recursively copies the contents of src into dst. +func deriveDeepCopy_7(dst, src *Polygon) { + func() { + field := new(geom2) + deriveDeepCopy_9(field, &src.geom2) + dst.geom2 = *field + }() +} + +// deriveDeepCopy_8 recursively copies the contents of src into dst. +func deriveDeepCopy_8(dst, src *geom1) { + func() { + field := new(geom0) + deriveDeepCopy_11(field, &src.geom0) + dst.geom0 = *field + }() +} + +// deriveDeepCopy_9 recursively copies the contents of src into dst. +func deriveDeepCopy_9(dst, src *geom2) { + func() { + field := new(geom1) + deriveDeepCopy_8(field, &src.geom1) + dst.geom1 = *field + }() + if src.ends == nil { + dst.ends = nil + } else { + if dst.ends != nil { + if len(src.ends) > len(dst.ends) { + if cap(dst.ends) >= len(src.ends) { + dst.ends = (dst.ends)[:len(src.ends)] + } else { + dst.ends = make([]int, len(src.ends)) + } + } else if len(src.ends) < len(dst.ends) { + dst.ends = (dst.ends)[:len(src.ends)] + } + } else { + dst.ends = make([]int, len(src.ends)) + } + copy(dst.ends, src.ends) + } +} + +// deriveDeepCopy_10 recursively copies the contents of src into dst. +func deriveDeepCopy_10(dst, src *geom3) { + func() { + field := new(geom1) + deriveDeepCopy_8(field, &src.geom1) + dst.geom1 = *field + }() + if src.endss == nil { + dst.endss = nil + } else { + if dst.endss != nil { + if len(src.endss) > len(dst.endss) { + if cap(dst.endss) >= len(src.endss) { + dst.endss = (dst.endss)[:len(src.endss)] + } else { + dst.endss = make([][]int, len(src.endss)) + } + } else if len(src.endss) < len(dst.endss) { + dst.endss = (dst.endss)[:len(src.endss)] + } + } else { + dst.endss = make([][]int, len(src.endss)) + } + deriveDeepCopy_12(dst.endss, src.endss) + } +} + +// deriveDeepCopy_11 recursively copies the contents of src into dst. +func deriveDeepCopy_11(dst, src *geom0) { + dst.layout = src.layout + dst.stride = src.stride + if src.flatCoords == nil { + dst.flatCoords = nil + } else { + if dst.flatCoords != nil { + if len(src.flatCoords) > len(dst.flatCoords) { + if cap(dst.flatCoords) >= len(src.flatCoords) { + dst.flatCoords = (dst.flatCoords)[:len(src.flatCoords)] + } else { + dst.flatCoords = make([]float64, len(src.flatCoords)) + } + } else if len(src.flatCoords) < len(dst.flatCoords) { + dst.flatCoords = (dst.flatCoords)[:len(src.flatCoords)] + } + } else { + dst.flatCoords = make([]float64, len(src.flatCoords)) + } + copy(dst.flatCoords, src.flatCoords) + } + dst.srid = src.srid +} + +// deriveDeepCopy_12 recursively copies the contents of src into dst. +func deriveDeepCopy_12(dst, src [][]int) { + for src_i, src_value := range src { + if src_value == nil { + dst[src_i] = nil + } else { + if dst[src_i] != nil { + if len(src_value) > len(dst[src_i]) { + if cap(dst[src_i]) >= len(src_value) { + dst[src_i] = (dst[src_i])[:len(src_value)] + } else { + dst[src_i] = make([]int, len(src_value)) + } + } else if len(src_value) < len(dst[src_i]) { + dst[src_i] = (dst[src_i])[:len(src_value)] + } + } else { + dst[src_i] = make([]int, len(src_value)) + } + copy(dst[src_i], src_value) + } + } +} diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkb/.gitignore b/vendor/github.com/twpayne/go-geom/encoding/wkb/.gitignore new file mode 100644 index 00000000000..4b8c16c35c9 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkb/.gitignore @@ -0,0 +1 @@ +wkb-fuzz.zip diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkb/Makefile b/vendor/github.com/twpayne/go-geom/encoding/wkb/Makefile new file mode 100644 index 00000000000..f0d8126fc95 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkb/Makefile @@ -0,0 +1,3 @@ +fuzz: + go-fuzz-build github.com/twpayne/go-geom/encoding/wkb + go-fuzz -bin=wkb-fuzz.zip -workdir=workdir diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkb/fuzz.go b/vendor/github.com/twpayne/go-geom/encoding/wkb/fuzz.go new file mode 100644 index 00000000000..8a5e7f4e86b --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkb/fuzz.go @@ -0,0 +1,11 @@ +//go:build gofuzz +// +build gofuzz + +package wkb + +func Fuzz(data []byte) int { + if _, err := Unmarshal(data); err != nil { + return 0 + } + return 1 +} diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkb/sql.go b/vendor/github.com/twpayne/go-geom/encoding/wkb/sql.go new file mode 100644 index 00000000000..75cbad9969c --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkb/sql.go @@ -0,0 +1,270 @@ +package wkb + +import ( + "database/sql/driver" + "fmt" + "strings" + + "github.com/twpayne/go-geom" + "github.com/twpayne/go-geom/encoding/wkbcommon" +) + +// ErrExpectedByteSlice is returned when a []byte is expected. +type ErrExpectedByteSlice struct { + Value interface{} +} + +func (e ErrExpectedByteSlice) Error() string { + return fmt.Sprintf("wkb: want []byte, got %T", e.Value) +} + +// A Geom is a WKB-ecoded Geometry that implements the sql.Scanner and +// driver.Value interfaces. +// It can be used when the geometry shape is not defined. +type Geom struct { + geom.T + opts []wkbcommon.WKBOption +} + +// A Point is a WKB-encoded Point that implements the sql.Scanner and +// driver.Valuer interfaces. +type Point struct { + *geom.Point + opts []wkbcommon.WKBOption +} + +// A LineString is a WKB-encoded LineString that implements the sql.Scanner and +// driver.Valuer interfaces. +type LineString struct { + *geom.LineString + opts []wkbcommon.WKBOption +} + +// A Polygon is a WKB-encoded Polygon that implements the sql.Scanner and +// driver.Valuer interfaces. +type Polygon struct { + *geom.Polygon + opts []wkbcommon.WKBOption +} + +// A MultiPoint is a WKB-encoded MultiPoint that implements the sql.Scanner and +// driver.Valuer interfaces. +type MultiPoint struct { + *geom.MultiPoint + opts []wkbcommon.WKBOption +} + +// A MultiLineString is a WKB-encoded MultiLineString that implements the +// sql.Scanner and driver.Valuer interfaces. +type MultiLineString struct { + *geom.MultiLineString + opts []wkbcommon.WKBOption +} + +// A MultiPolygon is a WKB-encoded MultiPolygon that implements the sql.Scanner +// and driver.Valuer interfaces. +type MultiPolygon struct { + *geom.MultiPolygon + opts []wkbcommon.WKBOption +} + +// A GeometryCollection is a WKB-encoded GeometryCollection that implements the +// sql.Scanner and driver.Valuer interfaces. +type GeometryCollection struct { + *geom.GeometryCollection + opts []wkbcommon.WKBOption +} + +// Scan scans from a []byte. +func (g *Geom) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + // NOTE(tb) other Scanners do not check the len of b, is it really useful ? + if len(b) == 0 { + return nil + } + var err error + g.T, err = Unmarshal(b, g.opts...) + return err +} + +// Value returns the WKB encoding of g. +func (g *Geom) Value() (driver.Value, error) { + return value(g.T) +} + +// Geom returns the underlying geom.T. +func (g *Geom) Geom() geom.T { + return g.T +} + +// Scan scans from a []byte. +func (p *Point) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, p.opts...) + if err != nil { + return err + } + p1, ok := got.(*geom.Point) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: p} + } + p.Point = p1 + return nil +} + +// Value returns the WKB encoding of p. +func (p *Point) Value() (driver.Value, error) { + return value(p.Point) +} + +// Scan scans from a []byte. +func (ls *LineString) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, ls.opts...) + if err != nil { + return err + } + ls1, ok := got.(*geom.LineString) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: ls} + } + ls.LineString = ls1 + return nil +} + +// Value returns the WKB encoding of ls. +func (ls *LineString) Value() (driver.Value, error) { + return value(ls.LineString) +} + +// Scan scans from a []byte. +func (p *Polygon) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, p.opts...) + if err != nil { + return err + } + p1, ok := got.(*geom.Polygon) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: p} + } + p.Polygon = p1 + return nil +} + +// Value returns the WKB encoding of p. +func (p *Polygon) Value() (driver.Value, error) { + return value(p.Polygon) +} + +// Scan scans from a []byte. +func (mp *MultiPoint) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, mp.opts...) + if err != nil { + return err + } + mp1, ok := got.(*geom.MultiPoint) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: mp} + } + mp.MultiPoint = mp1 + return nil +} + +// Value returns the WKB encoding of mp. +func (mp *MultiPoint) Value() (driver.Value, error) { + return value(mp.MultiPoint) +} + +// Scan scans from a []byte. +func (mls *MultiLineString) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, mls.opts...) + if err != nil { + return err + } + mls1, ok := got.(*geom.MultiLineString) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: mls} + } + mls.MultiLineString = mls1 + return nil +} + +// Value returns the WKB encoding of mls. +func (mls *MultiLineString) Value() (driver.Value, error) { + return value(mls.MultiLineString) +} + +// Scan scans from a []byte. +func (mp *MultiPolygon) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, mp.opts...) + if err != nil { + return err + } + mp1, ok := got.(*geom.MultiPolygon) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: mp} + } + mp.MultiPolygon = mp1 + return nil +} + +// Value returns the WKB encoding of mp. +func (mp *MultiPolygon) Value() (driver.Value, error) { + return value(mp.MultiPolygon) +} + +// Scan scans from a []byte. +func (gc *GeometryCollection) Scan(src interface{}) error { + b, ok := src.([]byte) + if !ok { + return ErrExpectedByteSlice{Value: src} + } + got, err := Unmarshal(b, gc.opts...) + if err != nil { + return err + } + gc1, ok := got.(*geom.GeometryCollection) + if !ok { + return wkbcommon.ErrUnexpectedType{Got: got, Want: gc} + } + gc.GeometryCollection = gc1 + return nil +} + +// Value returns the WKB encoding of gc. +func (gc *GeometryCollection) Value() (driver.Value, error) { + return value(gc.GeometryCollection) +} + +func value(g geom.T) (driver.Value, error) { + sb := &strings.Builder{} + if err := Write(sb, NDR, g); err != nil { + return nil, err + } + return []byte(sb.String()), nil +} diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkb/wkb.go b/vendor/github.com/twpayne/go-geom/encoding/wkb/wkb.go new file mode 100644 index 00000000000..b3bf840737d --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkb/wkb.go @@ -0,0 +1,335 @@ +// Package wkb implements Well Known Binary encoding and decoding. +// +// If you are encoding geometries in WKB to send to PostgreSQL/PostGIS, then +// you must specify binary_parameters=yes in the data source name that you pass +// to sql.Open. +package wkb + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + + "github.com/twpayne/go-geom" + "github.com/twpayne/go-geom/encoding/wkbcommon" +) + +var ( + // XDR is big endian. + XDR = wkbcommon.XDR + // NDR is little endian. + NDR = wkbcommon.NDR +) + +const ( + wkbXYID = 0 + wkbXYZID = 1000 + wkbXYMID = 2000 + wkbXYZMID = 3000 +) + +// Read reads an arbitrary geometry from r. +func Read(r io.Reader, opts ...wkbcommon.WKBOption) (geom.T, error) { + params := wkbcommon.InitWKBParams( + wkbcommon.WKBParams{ + EmptyPointHandling: wkbcommon.EmptyPointHandlingError, + }, + opts..., + ) + + wkbByteOrder, err := wkbcommon.ReadByte(r) + if err != nil { + return nil, err + } + var byteOrder binary.ByteOrder + switch wkbByteOrder { + case wkbcommon.XDRID: + byteOrder = XDR + case wkbcommon.NDRID: + byteOrder = NDR + default: + return nil, wkbcommon.ErrUnknownByteOrder(wkbByteOrder) + } + + wkbGeometryType, err := wkbcommon.ReadUInt32(r, byteOrder) + if err != nil { + return nil, err + } + t := wkbcommon.Type(wkbGeometryType) + + var layout geom.Layout + switch 1000 * (t / 1000) { + case wkbXYID: + layout = geom.XY + case wkbXYZID: + layout = geom.XYZ + case wkbXYMID: + layout = geom.XYM + case wkbXYZMID: + layout = geom.XYZM + default: + return nil, wkbcommon.ErrUnknownType(t) + } + + switch t % 1000 { + case wkbcommon.PointID: + flatCoords, err := wkbcommon.ReadFlatCoords0(r, byteOrder, layout.Stride()) + if err != nil { + return nil, err + } + if params.EmptyPointHandling == wkbcommon.EmptyPointHandlingNaN { + return geom.NewPointFlatMaybeEmpty(layout, flatCoords), nil + } + return geom.NewPointFlat(layout, flatCoords), nil + case wkbcommon.LineStringID: + flatCoords, err := wkbcommon.ReadFlatCoords1(r, byteOrder, layout.Stride()) + if err != nil { + return nil, err + } + return geom.NewLineStringFlat(layout, flatCoords), nil + case wkbcommon.PolygonID: + flatCoords, ends, err := wkbcommon.ReadFlatCoords2(r, byteOrder, layout.Stride()) + if err != nil { + return nil, err + } + return geom.NewPolygonFlat(layout, flatCoords, ends), nil + case wkbcommon.MultiPointID: + n, err := wkbcommon.ReadUInt32(r, byteOrder) + if err != nil { + return nil, err + } + if limit := wkbcommon.MaxGeometryElements[1]; limit >= 0 && int(n) > limit { + return nil, wkbcommon.ErrGeometryTooLarge{Level: 1, N: int(n), Limit: limit} + } + mp := geom.NewMultiPoint(layout) + for range n { + g, err := Read(r, opts...) + if err != nil { + return nil, err + } + p, ok := g.(*geom.Point) + if !ok { + return nil, wkbcommon.ErrUnexpectedType{Got: g, Want: &geom.Point{}} + } + if err = mp.Push(p); err != nil { + return nil, err + } + } + return mp, nil + case wkbcommon.MultiLineStringID: + n, err := wkbcommon.ReadUInt32(r, byteOrder) + if err != nil { + return nil, err + } + if limit := wkbcommon.MaxGeometryElements[2]; limit >= 0 && int(n) > limit { + return nil, wkbcommon.ErrGeometryTooLarge{Level: 2, N: int(n), Limit: limit} + } + mls := geom.NewMultiLineString(layout) + for range n { + g, err := Read(r, opts...) + if err != nil { + return nil, err + } + p, ok := g.(*geom.LineString) + if !ok { + return nil, wkbcommon.ErrUnexpectedType{Got: g, Want: &geom.LineString{}} + } + if err = mls.Push(p); err != nil { + return nil, err + } + } + return mls, nil + case wkbcommon.MultiPolygonID: + n, err := wkbcommon.ReadUInt32(r, byteOrder) + if err != nil { + return nil, err + } + if limit := wkbcommon.MaxGeometryElements[3]; limit >= 0 && int(n) > limit { + return nil, wkbcommon.ErrGeometryTooLarge{Level: 3, N: int(n), Limit: limit} + } + mp := geom.NewMultiPolygon(layout) + for range n { + g, err := Read(r, opts...) + if err != nil { + return nil, err + } + p, ok := g.(*geom.Polygon) + if !ok { + return nil, wkbcommon.ErrUnexpectedType{Got: g, Want: &geom.Polygon{}} + } + if err = mp.Push(p); err != nil { + return nil, err + } + } + return mp, nil + case wkbcommon.GeometryCollectionID: + n, err := wkbcommon.ReadUInt32(r, byteOrder) + if err != nil { + return nil, err + } + gc := geom.NewGeometryCollection() + for range n { + g, err := Read(r, opts...) + if err != nil { + return nil, err + } + if err := gc.Push(g); err != nil { + return nil, err + } + } + // If EMPTY, mark the collection with a fixed layout to differentiate + // GEOMETRYCOLLECTION EMPTY between 2D/Z/M/ZM. + if gc.Empty() && gc.NumGeoms() == 0 { + if err := gc.SetLayout(layout); err != nil { + return nil, err + } + } + return gc, nil + default: + return nil, wkbcommon.ErrUnsupportedType(wkbGeometryType) + } +} + +// Unmarshal unmrshals an arbitrary geometry from a []byte. +func Unmarshal(data []byte, opts ...wkbcommon.WKBOption) (geom.T, error) { + return Read(bytes.NewBuffer(data), opts...) +} + +// Write writes an arbitrary geometry to w. +func Write(w io.Writer, byteOrder binary.ByteOrder, g geom.T, opts ...wkbcommon.WKBOption) error { + params := wkbcommon.InitWKBParams( + wkbcommon.WKBParams{ + EmptyPointHandling: wkbcommon.EmptyPointHandlingError, + }, + opts..., + ) + + var wkbByteOrder byte + switch byteOrder { + case XDR: + wkbByteOrder = wkbcommon.XDRID + case NDR: + wkbByteOrder = wkbcommon.NDRID + default: + return wkbcommon.ErrUnsupportedByteOrder{} + } + if err := wkbcommon.WriteByte(w, wkbByteOrder); err != nil { + return err + } + + var wkbGeometryType uint32 + switch g.(type) { + case *geom.Point: + wkbGeometryType = wkbcommon.PointID + case *geom.LineString: + wkbGeometryType = wkbcommon.LineStringID + case *geom.Polygon: + wkbGeometryType = wkbcommon.PolygonID + case *geom.MultiPoint: + wkbGeometryType = wkbcommon.MultiPointID + case *geom.MultiLineString: + wkbGeometryType = wkbcommon.MultiLineStringID + case *geom.MultiPolygon: + wkbGeometryType = wkbcommon.MultiPolygonID + case *geom.GeometryCollection: + wkbGeometryType = wkbcommon.GeometryCollectionID + default: + return geom.ErrUnsupportedType{Value: g} + } + switch g.Layout() { + case geom.NoLayout: + // Special case for empty GeometryCollections + if _, ok := g.(*geom.GeometryCollection); !ok || !g.Empty() { + return geom.ErrUnsupportedLayout(g.Layout()) + } + case geom.XY: + wkbGeometryType += wkbXYID + case geom.XYZ: + wkbGeometryType += wkbXYZID + case geom.XYM: + wkbGeometryType += wkbXYMID + case geom.XYZM: + wkbGeometryType += wkbXYZMID + default: + return geom.ErrUnsupportedLayout(g.Layout()) + } + if err := wkbcommon.WriteUInt32(w, byteOrder, wkbGeometryType); err != nil { + return err + } + + switch g := g.(type) { + case *geom.Point: + if g.Empty() { + switch params.EmptyPointHandling { + case wkbcommon.EmptyPointHandlingNaN: + return wkbcommon.WriteEmptyPointAsNaN(w, byteOrder, g.Stride()) + case wkbcommon.EmptyPointHandlingError: + return errors.New("cannot encode empty Point in WKB") + default: + return fmt.Errorf("cannot encode empty Point in WKB (unknown option: %d)", wkbcommon.EmptyPointHandlingNaN) + } + } + return wkbcommon.WriteFlatCoords0(w, byteOrder, g.FlatCoords()) + case *geom.LineString: + return wkbcommon.WriteFlatCoords1(w, byteOrder, g.FlatCoords(), g.Stride()) + case *geom.Polygon: + return wkbcommon.WriteFlatCoords2(w, byteOrder, g.FlatCoords(), g.Ends(), g.Stride()) + case *geom.MultiPoint: + n := g.NumPoints() + if err := wkbcommon.WriteUInt32(w, byteOrder, uint32(n)); err != nil { + return err + } + for i := range n { + if err := Write(w, byteOrder, g.Point(i), opts...); err != nil { + return err + } + } + return nil + case *geom.MultiLineString: + n := g.NumLineStrings() + if err := wkbcommon.WriteUInt32(w, byteOrder, uint32(n)); err != nil { + return err + } + for i := range n { + if err := Write(w, byteOrder, g.LineString(i), opts...); err != nil { + return err + } + } + return nil + case *geom.MultiPolygon: + n := g.NumPolygons() + if err := wkbcommon.WriteUInt32(w, byteOrder, uint32(n)); err != nil { + return err + } + for i := range n { + if err := Write(w, byteOrder, g.Polygon(i), opts...); err != nil { + return err + } + } + return nil + case *geom.GeometryCollection: + n := g.NumGeoms() + if err := wkbcommon.WriteUInt32(w, byteOrder, uint32(n)); err != nil { + return err + } + for i := range n { + if err := Write(w, byteOrder, g.Geom(i), opts...); err != nil { + return err + } + } + return nil + default: + return geom.ErrUnsupportedType{Value: g} + } +} + +// Marshal marshals an arbitrary geometry to a []byte. +func Marshal(g geom.T, byteOrder binary.ByteOrder, opts ...wkbcommon.WKBOption) ([]byte, error) { + w := bytes.NewBuffer(nil) + if err := Write(w, byteOrder, g, opts...); err != nil { + return nil, err + } + return w.Bytes(), nil +} diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/binary.go b/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/binary.go new file mode 100644 index 00000000000..ceec0ed2b1e --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/binary.go @@ -0,0 +1,86 @@ +// Package wkbcommon contains code common to WKB and EWKB encoding. +package wkbcommon + +import ( + "encoding/binary" + "io" + "math" + + "github.com/twpayne/go-geom" +) + +func readFloat(buf []byte, byteOrder binary.ByteOrder) float64 { + u := byteOrder.Uint64(buf) + return math.Float64frombits(u) +} + +// ReadUInt32 reads a uint32 from r. +func ReadUInt32(r io.Reader, byteOrder binary.ByteOrder) (uint32, error) { + var buf [4]byte + if _, err := io.ReadFull(r, buf[:]); err != nil { + return 0, err + } + return byteOrder.Uint32(buf[:]), nil +} + +// ReadFloatArray reads a []float64 from r. +func ReadFloatArray(r io.Reader, byteOrder binary.ByteOrder, array []float64) error { + buf := make([]byte, 8*len(array)) + if _, err := io.ReadFull(r, buf); err != nil { + return err + } + // Convert to an array of floats + for i := range array { + array[i] = readFloat(buf[8*i:], byteOrder) + } + return nil +} + +// ReadByte reads a byte from r. +func ReadByte(r io.Reader) (byte, error) { + var buf [1]byte + if _, err := r.Read(buf[:]); err != nil { + return 0, err + } + return buf[0], nil +} + +func writeFloat(buf []byte, byteOrder binary.ByteOrder, value float64) { + u := math.Float64bits(value) + byteOrder.PutUint64(buf, u) +} + +// WriteFloatArray writes a []float64 to w. +func WriteFloatArray(w io.Writer, byteOrder binary.ByteOrder, array []float64) error { + buf := make([]byte, 8*len(array)) + for i, f := range array { + writeFloat(buf[8*i:], byteOrder, f) + } + _, err := w.Write(buf) + return err +} + +// WriteUInt32 writes a uint32 to w. +func WriteUInt32(w io.Writer, byteOrder binary.ByteOrder, value uint32) error { + var buf [4]byte + byteOrder.PutUint32(buf[:], value) + _, err := w.Write(buf[:]) + return err +} + +// WriteByte wrties a byte to w. +func WriteByte(w io.Writer, value byte) error { + var buf [1]byte + buf[0] = value + _, err := w.Write(buf[:]) + return err +} + +// WriteEmptyPointAsNaN outputs EmptyPoint as NaN values. +func WriteEmptyPointAsNaN(w io.Writer, byteOrder binary.ByteOrder, numCoords int) error { + coords := make([]float64, numCoords) + for i := range numCoords { + coords[i] = geom.PointEmptyCoord() + } + return WriteFlatCoords0(w, byteOrder, coords) +} diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/options.go b/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/options.go new file mode 100644 index 00000000000..b6e5cb8938d --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/options.go @@ -0,0 +1,36 @@ +package wkbcommon + +// EmptyPointHandling is the mechanism to handle an empty point. +type EmptyPointHandling uint8 + +const ( + // EmptyPointHandlingError will error if an empty point is found. + EmptyPointHandlingError EmptyPointHandling = iota + // EmptyPointHandlingNaN will decipher empty points with NaN as coordinates. + // This is in line with Requirement 152 of the GeoPackage spec (http://www.geopackage.org/spec/). + EmptyPointHandlingNaN +) + +// WKBParams are parameters for encoding and decoding WKB items. +type WKBParams struct { + EmptyPointHandling EmptyPointHandling +} + +// WKBOption is an option to set on WKBParams. +type WKBOption func(WKBParams) WKBParams + +// WKBOptionEmptyPointHandling sets the params to the specified EmptyPointHandling. +func WKBOptionEmptyPointHandling(h EmptyPointHandling) WKBOption { + return func(p WKBParams) WKBParams { + p.EmptyPointHandling = h + return p + } +} + +// InitWKBParams initializes WKBParams from an initial parameter and some options. +func InitWKBParams(params WKBParams, opts ...WKBOption) WKBParams { + for _, opt := range opts { + params = opt(params) + } + return params +} diff --git a/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/wkbcommon.go b/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/wkbcommon.go new file mode 100644 index 00000000000..1431aa35b48 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/encoding/wkbcommon/wkbcommon.go @@ -0,0 +1,179 @@ +// Package wkbcommon contains code common to WKB and EWKB encoding. +package wkbcommon + +import ( + "encoding/binary" + "fmt" + "io" +) + +// Byte order IDs. +const ( + XDRID = 0 + NDRID = 1 +) + +// Byte orders. +var ( + XDR = binary.BigEndian + NDR = binary.LittleEndian +) + +// An ErrUnknownByteOrder is returned when an unknown byte order is encountered. +type ErrUnknownByteOrder byte + +func (e ErrUnknownByteOrder) Error() string { + return fmt.Sprintf("wkb: unknown byte order: %b", byte(e)) +} + +// An ErrUnsupportedByteOrder is returned when an unsupported byte order is encountered. +type ErrUnsupportedByteOrder struct{} + +func (e ErrUnsupportedByteOrder) Error() string { + return "wkb: unsupported byte order" +} + +// A Type is a WKB code. +type Type uint32 + +// An ErrUnknownType is returned when an unknown type is encountered. +type ErrUnknownType Type + +func (e ErrUnknownType) Error() string { + return fmt.Sprintf("wkb: unknown type: %d", uint(e)) +} + +// An ErrUnsupportedType is returned when an unsupported type is encountered. +type ErrUnsupportedType Type + +func (e ErrUnsupportedType) Error() string { + return fmt.Sprintf("wkb: unsupported type: %d", uint(e)) +} + +// An ErrUnexpectedType is returned when an unexpected type is encountered. +type ErrUnexpectedType struct { + Got interface{} + Want interface{} +} + +func (e ErrUnexpectedType) Error() string { + return fmt.Sprintf("wkb: got %T, want %T", e.Got, e.Want) +} + +// MaxGeometryElements is the maximum number of elements that will be decoded +// at different levels. Its primary purpose is to prevent corrupt inputs from +// causing excessive memory allocations (which could be used as a denial of +// service attack). +// +// This is a variable, so you can override it in your application code by +// importing the `github.com/twpayne/go-geom/encoding/wkbcommon` module and +// setting the value of `wkbcommon.MaxGeometryElements`. +// +// FIXME This should be Codec-specific, not global. +// FIXME Consider overall per-geometry limit rather than per-level limit. +var MaxGeometryElements = [4]int{ + 0, // Unused + -1, // LineString, LinearRing, and MultiPoint + -1, // MultiLineString and Polygon + -1, // MultiPolygon +} + +// An ErrGeometryTooLarge is returned when the geometry is too large. +type ErrGeometryTooLarge struct { + Level int + N int + Limit int +} + +func (e ErrGeometryTooLarge) Error() string { + return fmt.Sprintf("wkb: number of elements at level %d (%d) exceeds %d", e.Level, e.N, e.Limit) +} + +// Geometry type IDs. +const ( + PointID = 1 + LineStringID = 2 + PolygonID = 3 + MultiPointID = 4 + MultiLineStringID = 5 + MultiPolygonID = 6 + GeometryCollectionID = 7 + PolyhedralSurfaceID = 15 + TINID = 16 + TriangleID = 17 +) + +// ReadFlatCoords0 reads flat coordinates 0. +func ReadFlatCoords0(r io.Reader, byteOrder binary.ByteOrder, stride int) ([]float64, error) { + coord := make([]float64, stride) + if err := ReadFloatArray(r, byteOrder, coord); err != nil { + return nil, err + } + return coord, nil +} + +// ReadFlatCoords1 reads flat coordinates 1. +func ReadFlatCoords1(r io.Reader, byteOrder binary.ByteOrder, stride int) ([]float64, error) { + n, err := ReadUInt32(r, byteOrder) + if err != nil { + return nil, err + } + if limit := MaxGeometryElements[1]; limit >= 0 && int(n) > limit { + return nil, ErrGeometryTooLarge{Level: 1, N: int(n), Limit: limit} + } + flatCoords := make([]float64, int(n)*stride) + if err := ReadFloatArray(r, byteOrder, flatCoords); err != nil { + return nil, err + } + return flatCoords, nil +} + +// ReadFlatCoords2 reads flat coordinates 2. +func ReadFlatCoords2(r io.Reader, byteOrder binary.ByteOrder, stride int) ([]float64, []int, error) { + n, err := ReadUInt32(r, byteOrder) + if err != nil { + return nil, nil, err + } + if limit := MaxGeometryElements[2]; limit >= 0 && int(n) > limit { + return nil, nil, ErrGeometryTooLarge{Level: 2, N: int(n), Limit: limit} + } + var flatCoordss []float64 + ends := make([]int, n) + for i := range n { + flatCoords, err := ReadFlatCoords1(r, byteOrder, stride) + if err != nil { + return nil, nil, err + } + flatCoordss = append(flatCoordss, flatCoords...) + ends[i] = len(flatCoordss) + } + return flatCoordss, ends, nil +} + +// WriteFlatCoords0 writes flat coordinates 0. +func WriteFlatCoords0(w io.Writer, byteOrder binary.ByteOrder, coord []float64) error { + return WriteFloatArray(w, byteOrder, coord) +} + +// WriteFlatCoords1 writes flat coordinates 1. +func WriteFlatCoords1(w io.Writer, byteOrder binary.ByteOrder, coords []float64, stride int) error { + if err := WriteUInt32(w, byteOrder, uint32(len(coords)/stride)); err != nil { + return err + } + return WriteFloatArray(w, byteOrder, coords) +} + +// WriteFlatCoords2 writes flat coordinates 2. +func WriteFlatCoords2(w io.Writer, byteOrder binary.ByteOrder, flatCoords []float64, ends []int, stride int) error { + if err := WriteUInt32(w, byteOrder, uint32(len(ends))); err != nil { + return err + } + offset := 0 + for _, end := range ends { + if err := WriteFlatCoords1(w, byteOrder, flatCoords[offset:end], stride); err != nil { + return err + } + offset = end + } + return nil +} diff --git a/vendor/github.com/twpayne/go-geom/flat.go b/vendor/github.com/twpayne/go-geom/flat.go new file mode 100644 index 00000000000..8b85b1db76e --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/flat.go @@ -0,0 +1,423 @@ +package geom + +import "math" + +type geom0 struct { + layout Layout + stride int + flatCoords []float64 + srid int +} + +type geom1 struct { + geom0 +} + +type geom2 struct { + geom1 + ends []int +} + +type geom3 struct { + geom1 + endss [][]int +} + +// Bounds returns the bounds of g. +func (g *geom0) Bounds() *Bounds { + return NewBounds(g.layout).extendFlatCoords(g.flatCoords, 0, len(g.flatCoords), g.stride) +} + +// Coords returns all the coordinates in g, i.e. a single coordinate. +func (g *geom0) Coords() Coord { + return inflate0(g.flatCoords, 0, len(g.flatCoords), g.stride) +} + +// Empty returns true if g contains no coordinates. +func (g *geom0) Empty() bool { + return len(g.flatCoords) == 0 +} + +// Ends returns the end indexes of sub-structures of g, i.e. an empty slice. +func (g *geom0) Ends() []int { + return nil +} + +// Endss returns the end indexes of sub-sub-structures of g, i.e. an empty +// slice. +func (g *geom0) Endss() [][]int { + return nil +} + +// FlatCoords returns the flat coordinates of g. +func (g *geom0) FlatCoords() []float64 { + return g.flatCoords +} + +// Layout returns g's layout. +func (g *geom0) Layout() Layout { + return g.layout +} + +// NumCoords returns the number of coordinates in g, i.e. 1. +func (g *geom0) NumCoords() int { + return 1 +} + +// Reserve reserves space in g for n coordinates. +func (g *geom0) Reserve(n int) { + if cap(g.flatCoords) < n*g.stride { + fcs := make([]float64, len(g.flatCoords), n*g.stride) + copy(fcs, g.flatCoords) + g.flatCoords = fcs + } +} + +// SRID returns g's SRID. +func (g *geom0) SRID() int { + return g.srid +} + +func (g *geom0) setCoords(coords0 []float64) error { + var err error + g.flatCoords, err = deflate0(nil, coords0, g.stride) + return err +} + +// Stride returns g's stride. +func (g *geom0) Stride() int { + return g.stride +} + +func (g *geom0) verify() error { + if g.stride != g.layout.Stride() { + return errStrideLayoutMismatch + } + if g.stride == 0 { + if len(g.flatCoords) != 0 { + return errNonEmptyFlatCoords + } + return nil + } + if len(g.flatCoords) != g.stride { + return errLengthStrideMismatch + } + return nil +} + +// Coord returns the ith coord of g. +func (g *geom1) Coord(i int) Coord { + return g.flatCoords[i*g.stride : (i+1)*g.stride] +} + +// Coords unpacks and returns all of g's coordinates. +func (g *geom1) Coords() []Coord { + return inflate1(g.flatCoords, 0, len(g.flatCoords), g.stride) +} + +// NumCoords returns the number of coordinates in g. +func (g *geom1) NumCoords() int { + return len(g.flatCoords) / g.stride +} + +// Reverse reverses the order of g's coordinates. +func (g *geom1) Reverse() { + reverse1(g.flatCoords, 0, len(g.flatCoords), g.stride) +} + +func (g *geom1) setCoords(coords1 []Coord) error { + var err error + g.flatCoords, err = deflate1(nil, coords1, g.stride) + return err +} + +func (g *geom1) verify() error { + if g.stride != g.layout.Stride() { + return errStrideLayoutMismatch + } + if g.stride == 0 { + if len(g.flatCoords) != 0 { + return errNonEmptyFlatCoords + } + } else { + if len(g.flatCoords)%g.stride != 0 { + return errLengthStrideMismatch + } + } + return nil +} + +// Coords returns all of g's coordinates. +func (g *geom2) Coords() [][]Coord { + return inflate2(g.flatCoords, 0, g.ends, g.stride) +} + +// Ends returns the end indexes of all sub-structures in g. +func (g *geom2) Ends() []int { + return g.ends +} + +// Reverse reverses the order of coordinates for each sub-structure in g. +func (g *geom2) Reverse() { + reverse2(g.flatCoords, 0, g.ends, g.stride) +} + +func (g *geom2) setCoords(coords2 [][]Coord) error { + var err error + g.flatCoords, g.ends, err = deflate2(nil, nil, coords2, g.stride) + return err +} + +func (g *geom2) verify() error { + if g.stride != g.layout.Stride() { + return errStrideLayoutMismatch + } + if g.stride == 0 { + if len(g.flatCoords) != 0 { + return errNonEmptyFlatCoords + } + if len(g.ends) != 0 { + return errNonEmptyEnds + } + return nil + } + if len(g.flatCoords)%g.stride != 0 { + return errLengthStrideMismatch + } + offset := 0 + for _, end := range g.ends { + if end%g.stride != 0 { + return errMisalignedEnd + } + if end < offset { + return errOutOfOrderEnd + } + offset = end + } + if offset != len(g.flatCoords) { + return errIncorrectEnd + } + return nil +} + +// Coords returns all the coordinates in g. +func (g *geom3) Coords() [][][]Coord { + return inflate3(g.flatCoords, 0, g.endss, g.stride) +} + +// Endss returns a list of all the sub-sub-structures in g. +func (g *geom3) Endss() [][]int { + return g.endss +} + +// Reverse reverses the order of coordinates for each sub-sub-structure in g. +func (g *geom3) Reverse() { + reverse3(g.flatCoords, 0, g.endss, g.stride) +} + +func (g *geom3) setCoords(coords3 [][][]Coord) error { + var err error + g.flatCoords, g.endss, err = deflate3(nil, nil, coords3, g.stride) + return err +} + +func (g *geom3) verify() error { + if g.stride != g.layout.Stride() { + return errStrideLayoutMismatch + } + if g.stride == 0 { + if len(g.flatCoords) != 0 { + return errNonEmptyFlatCoords + } + if len(g.endss) != 0 { + return errNonEmptyEndss + } + return nil + } + if len(g.flatCoords)%g.stride != 0 { + return errLengthStrideMismatch + } + offset := 0 + for _, ends := range g.endss { + for _, end := range ends { + if end%g.stride != 0 { + return errMisalignedEnd + } + if end < offset { + return errOutOfOrderEnd + } + offset = end + } + } + if offset != len(g.flatCoords) { + return errIncorrectEnd + } + return nil +} + +func doubleArea1(flatCoords []float64, offset, end, stride int) float64 { + var doubleArea float64 + for i := offset + stride; i < end; i += stride { + doubleArea += (flatCoords[i+1] - flatCoords[i+1-stride]) * (flatCoords[i] + flatCoords[i-stride]) + } + return doubleArea +} + +func doubleArea2(flatCoords []float64, offset int, ends []int, stride int) float64 { + var doubleArea float64 + for _, end := range ends { + doubleArea += doubleArea1(flatCoords, offset, end, stride) + offset = end + } + return doubleArea +} + +func doubleArea3(flatCoords []float64, offset int, endss [][]int, stride int) float64 { + var doubleArea float64 + for _, ends := range endss { + doubleArea += doubleArea2(flatCoords, offset, ends, stride) + offset = ends[len(ends)-1] + } + return doubleArea +} + +func deflate0(flatCoords []float64, c Coord, stride int) ([]float64, error) { + if len(c) != stride { + return nil, ErrStrideMismatch{Got: len(c), Want: stride} + } + flatCoords = append(flatCoords, c...) + return flatCoords, nil +} + +func deflate1(flatCoords []float64, coords1 []Coord, stride int) ([]float64, error) { + for _, c := range coords1 { + var err error + flatCoords, err = deflate0(flatCoords, c, stride) + if err != nil { + return nil, err + } + } + return flatCoords, nil +} + +func deflate2( + flatCoords []float64, ends []int, coords2 [][]Coord, stride int, +) ([]float64, []int, error) { + for _, coords1 := range coords2 { + var err error + flatCoords, err = deflate1(flatCoords, coords1, stride) + if err != nil { + return nil, nil, err + } + ends = append(ends, len(flatCoords)) + } + return flatCoords, ends, nil +} + +func deflate3( + flatCoords []float64, endss [][]int, coords3 [][][]Coord, stride int, +) ([]float64, [][]int, error) { + for _, coords2 := range coords3 { + var err error + var ends []int + flatCoords, ends, err = deflate2(flatCoords, ends, coords2, stride) + if err != nil { + return nil, nil, err + } + endss = append(endss, ends) + } + return flatCoords, endss, nil +} + +func inflate0(flatCoords []float64, offset, end, stride int) Coord { + if offset+stride != end { + panic("geom: stride mismatch") + } + c := make([]float64, stride) + copy(c, flatCoords[offset:end]) + return c +} + +func inflate1(flatCoords []float64, offset, end, stride int) []Coord { + coords1 := make([]Coord, (end-offset)/stride) + for i := range coords1 { + coords1[i] = inflate0(flatCoords, offset, offset+stride, stride) + offset += stride + } + return coords1 +} + +func inflate2(flatCoords []float64, offset int, ends []int, stride int) [][]Coord { + coords2 := make([][]Coord, len(ends)) + for i := range coords2 { + end := ends[i] + coords2[i] = inflate1(flatCoords, offset, end, stride) + offset = end + } + return coords2 +} + +func inflate3(flatCoords []float64, offset int, endss [][]int, stride int) [][][]Coord { + coords3 := make([][][]Coord, len(endss)) + for i := range coords3 { + ends := endss[i] + coords3[i] = inflate2(flatCoords, offset, ends, stride) + if len(ends) > 0 { + offset = ends[len(ends)-1] + } + } + return coords3 +} + +func length1(flatCoords []float64, offset, end, stride int) float64 { + var length float64 + for i := offset + stride; i < end; i += stride { + dx := flatCoords[i] - flatCoords[i-stride] + dy := flatCoords[i+1] - flatCoords[i+1-stride] + length += math.Sqrt(dx*dx + dy*dy) + } + return length +} + +func length2(flatCoords []float64, offset int, ends []int, stride int) float64 { + var length float64 + for _, end := range ends { + length += length1(flatCoords, offset, end, stride) + offset = end + } + return length +} + +func length3(flatCoords []float64, offset int, endss [][]int, stride int) float64 { + var length float64 + for _, ends := range endss { + length += length2(flatCoords, offset, ends, stride) + offset = ends[len(ends)-1] + } + return length +} + +func reverse1(flatCoords []float64, offset, end, stride int) { + for i, j := offset+stride, end; i <= j; i, j = i+stride, j-stride { + for k := range stride { + flatCoords[i-stride+k], flatCoords[j-stride+k] = flatCoords[j-stride+k], flatCoords[i-stride+k] + } + } +} + +func reverse2(flatCoords []float64, offset int, ends []int, stride int) { + for _, end := range ends { + reverse1(flatCoords, offset, end, stride) + offset = end + } +} + +func reverse3(flatCoords []float64, offset int, endss [][]int, stride int) { + for _, ends := range endss { + if len(ends) == 0 { + continue + } + reverse2(flatCoords, offset, ends, stride) + offset = ends[len(ends)-1] + } +} diff --git a/vendor/github.com/twpayne/go-geom/geom.go b/vendor/github.com/twpayne/go-geom/geom.go new file mode 100644 index 00000000000..bacdebf8040 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/geom.go @@ -0,0 +1,251 @@ +// Package geom implements efficient geometry types for geospatial +// applications. +package geom + +//go:generate goderive . + +import ( + "errors" + "fmt" + "math" +) + +// A Layout describes the meaning of an N-dimensional coordinate. Layout(N) for +// N > 4 is a valid layout, in which case the first dimensions are interpreted +// to be X, Y, Z, and M and extra dimensions have no special meaning. M values +// are considered part of a linear referencing system (e.g. classical time or +// distance along a path). 1-dimensional layouts are not supported. +type Layout int + +const ( + // NoLayout is an unknown layout. + NoLayout Layout = iota + // XY is a 2D layout (X and Y). + XY + // XYZ is 3D layout (X, Y, and Z). + XYZ + // XYM is a 2D layout with an M value. + XYM + // XYZM is a 3D layout with an M value. + XYZM +) + +// An ErrLayoutMismatch is returned when geometries with different layouts +// cannot be combined. +type ErrLayoutMismatch struct { + Got Layout + Want Layout +} + +func (e ErrLayoutMismatch) Error() string { + return fmt.Sprintf("geom: layout mismatch, got %s, want %s", e.Got, e.Want) +} + +// An ErrStrideMismatch is returned when the stride does not match the expected +// stride. +type ErrStrideMismatch struct { + Got int + Want int +} + +func (e ErrStrideMismatch) Error() string { + return fmt.Sprintf("geom: stride mismatch, got %d, want %d", e.Got, e.Want) +} + +// An ErrUnsupportedLayout is returned when the requested layout is not +// supported. +type ErrUnsupportedLayout Layout + +func (e ErrUnsupportedLayout) Error() string { + return fmt.Sprintf("geom: unsupported layout %s", Layout(e)) +} + +// An ErrUnsupportedType is returned when the requested type is not supported. +type ErrUnsupportedType struct { + Value interface{} +} + +func (e ErrUnsupportedType) Error() string { + return fmt.Sprintf("geom: unsupported type %T", e.Value) +} + +// A Coord represents an N-dimensional coordinate. +type Coord []float64 + +// Clone returns a deep copy of c. +func (c Coord) Clone() Coord { + return deriveCloneCoord(c) +} + +// X returns the x coordinate of c. X is assumed to be the first ordinate. +func (c Coord) X() float64 { + return c[0] +} + +// Y returns the y coordinate of c. Y is assumed to be the second ordinate. +func (c Coord) Y() float64 { + return c[1] +} + +// Set copies the ordinate data from the other coord to this coord. +func (c Coord) Set(other Coord) { + copy(c, other) +} + +// Equal compares that all ordinates are the same in this and the other coords. +// It is assumed that this coord and other coord both have the same (provided) +// layout. +func (c Coord) Equal(layout Layout, other Coord) bool { + numOrds := len(c) + + if layout.Stride() < numOrds { + numOrds = layout.Stride() + } + + if (len(c) < layout.Stride() || len(other) < layout.Stride()) && len(c) != len(other) { + return false + } + + for i := range numOrds { + if math.IsNaN(c[i]) || math.IsNaN(other[i]) { + if !math.IsNaN(c[i]) || !math.IsNaN(other[i]) { + return false + } + } else if c[i] != other[i] { + return false + } + } + + return true +} + +// T is a generic interface implemented by all geometry types. +type T interface { + Layout() Layout + Stride() int + Bounds() *Bounds + FlatCoords() []float64 + Ends() []int + Endss() [][]int + SRID() int + Empty() bool +} + +// MIndex returns the index of the M dimension, or -1 if the l does not have an +// M dimension. +func (l Layout) MIndex() int { + switch l { + case NoLayout, XY, XYZ: + return -1 + case XYM: + return 2 + case XYZM: + return 3 + default: + return 3 + } +} + +// Stride returns l's number of dimensions. +func (l Layout) Stride() int { + switch l { + case NoLayout: + return 0 + case XY: + return 2 + case XYZ: + return 3 + case XYM: + return 3 + case XYZM: + return 4 + default: + return int(l) + } +} + +// String returns a human-readable string representing l. +func (l Layout) String() string { + switch l { + case NoLayout: + return "NoLayout" + case XY: + return "XY" + case XYZ: + return "XYZ" + case XYM: + return "XYM" + case XYZM: + return "XYZM" + default: + return fmt.Sprintf("Layout(%d)", int(l)) + } +} + +// ZIndex returns the index of l's Z dimension, or -1 if l does not have a Z +// dimension. +func (l Layout) ZIndex() int { + switch l { + case NoLayout, XY, XYM: + return -1 + default: + return 2 + } +} + +// SetSRID sets the SRID of an arbitrary geometry. +func SetSRID(g T, srid int) (T, error) { + switch g := g.(type) { + case *Point: + return g.SetSRID(srid), nil + case *LineString: + return g.SetSRID(srid), nil + case *LinearRing: + return g.SetSRID(srid), nil + case *Polygon: + return g.SetSRID(srid), nil + case *MultiPoint: + return g.SetSRID(srid), nil + case *MultiLineString: + return g.SetSRID(srid), nil + case *MultiPolygon: + return g.SetSRID(srid), nil + case *GeometryCollection: + return g.SetSRID(srid), nil + default: + return g, &ErrUnsupportedType{ + Value: g, + } + } +} + +// TransformInPlace replaces all coordinates in g using f. +func TransformInPlace(g T, f func(Coord)) T { + var ( + flatCoords = g.FlatCoords() + stride = g.Stride() + ) + for i, n := 0, len(flatCoords); i < n; i += stride { + f(flatCoords[i : i+stride]) + } + return g +} + +// Must panics if err is not nil, otherwise it returns g. +func Must(g T, err error) T { + if err != nil { + panic(err) + } + return g +} + +var ( + errIncorrectEnd = errors.New("geom: incorrect end") + errLengthStrideMismatch = errors.New("geom: length/stride mismatch") + errMisalignedEnd = errors.New("geom: misaligned end") + errNonEmptyEnds = errors.New("geom: non-empty ends") + errNonEmptyEndss = errors.New("geom: non-empty endss") + errNonEmptyFlatCoords = errors.New("geom: non-empty flatCoords") + errOutOfOrderEnd = errors.New("geom: out-of-order end") + errStrideLayoutMismatch = errors.New("geom: stride/layout mismatch") +) diff --git a/vendor/github.com/twpayne/go-geom/geometrycollection.go b/vendor/github.com/twpayne/go-geom/geometrycollection.go new file mode 100644 index 00000000000..3b7244b400a --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/geometrycollection.go @@ -0,0 +1,169 @@ +package geom + +// A GeometryCollection is a collection of arbitrary geometries with the same +// SRID. +type GeometryCollection struct { + layout Layout + geoms []T + srid int +} + +// NewGeometryCollection returns a new empty GeometryCollection. +func NewGeometryCollection() *GeometryCollection { + return &GeometryCollection{} +} + +// Geom returns the ith geometry in g. +func (g *GeometryCollection) Geom(i int) T { + return g.geoms[i] +} + +// Geoms returns the geometries in g. +func (g *GeometryCollection) Geoms() []T { + return g.geoms +} + +// Layout returns the smallest layout that covers all of the layouts in g's +// geometries. +func (g *GeometryCollection) Layout() Layout { + if g.layout != NoLayout { + return g.layout + } + maxLayout := NoLayout + for _, g := range g.geoms { + switch l := g.Layout(); l { + case XYZ: + if maxLayout == XYM { + maxLayout = XYZM + } else if l > maxLayout { + maxLayout = l + } + case XYM: + if maxLayout == XYZ { + maxLayout = XYZM + } else if l > maxLayout { + maxLayout = l + } + default: + if l > maxLayout { + maxLayout = l + } + } + } + return maxLayout +} + +// NumGeoms returns the number of geometries in g. +func (g *GeometryCollection) NumGeoms() int { + return len(g.geoms) +} + +// Stride returns the stride of g's layout. +func (g *GeometryCollection) Stride() int { + return g.Layout().Stride() +} + +// Bounds returns the bounds of all the geometries in g. +func (g *GeometryCollection) Bounds() *Bounds { + // FIXME this needs work for mixing layouts, e.g. XYZ and XYM + b := NewBounds(g.Layout()) + for _, g := range g.geoms { + b = b.Extend(g) + } + return b +} + +// Empty returns true if the collection is empty. +// This can return true if the GeometryCollection contains multiple Geometry objects +// which are all empty. +func (g *GeometryCollection) Empty() bool { + for _, g := range g.geoms { + if !g.Empty() { + return false + } + } + return true +} + +// FlatCoords panics. +func (g *GeometryCollection) FlatCoords() []float64 { + panic("FlatCoords() called on a GeometryCollection") +} + +// Ends panics. +func (g *GeometryCollection) Ends() []int { + panic("Ends() called on a GeometryCollection") +} + +// Endss panics. +func (g *GeometryCollection) Endss() [][]int { + panic("Endss() called on a GeometryCollection") +} + +// SRID returns g's SRID. +func (g *GeometryCollection) SRID() int { + return g.srid +} + +// MustPush pushes gs to g. It panics on any error. +func (g *GeometryCollection) MustPush(gs ...T) *GeometryCollection { + if err := g.Push(gs...); err != nil { + panic(err) + } + return g +} + +// CheckLayout checks all geometries in the collection match the given +// layout. +func (g *GeometryCollection) CheckLayout(layout Layout) error { + if layout != NoLayout { + for _, geom := range g.geoms { + if geomLayout := geom.Layout(); geomLayout != layout { + return ErrLayoutMismatch{ + Got: layout, + Want: geomLayout, + } + } + } + } + return nil +} + +// MustSetLayout sets g's layout. It panics on any error. +func (g *GeometryCollection) MustSetLayout(layout Layout) *GeometryCollection { + if err := g.SetLayout(layout); err != nil { + panic(err) + } + return g +} + +// Push appends geometries. +func (g *GeometryCollection) Push(gs ...T) error { + if g.layout != NoLayout { + for _, geom := range gs { + if geomLayout := geom.Layout(); geomLayout != g.layout { + return ErrLayoutMismatch{ + Got: geomLayout, + Want: g.layout, + } + } + } + } + g.geoms = append(g.geoms, gs...) + return nil +} + +// SetLayout sets g's layout. +func (g *GeometryCollection) SetLayout(layout Layout) error { + if err := g.CheckLayout(layout); err != nil { + return err + } + g.layout = layout + return nil +} + +// SetSRID sets g's SRID and the SRID of all its elements. +func (g *GeometryCollection) SetSRID(srid int) *GeometryCollection { + g.srid = srid + return g +} diff --git a/vendor/github.com/twpayne/go-geom/linearring.go b/vendor/github.com/twpayne/go-geom/linearring.go new file mode 100644 index 00000000000..d46dae57446 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/linearring.go @@ -0,0 +1,60 @@ +package geom + +// A LinearRing is a linear ring. +type LinearRing struct { + geom1 +} + +// NewLinearRing returns a new LinearRing with no coordinates. +func NewLinearRing(layout Layout) *LinearRing { + return NewLinearRingFlat(layout, nil) +} + +// NewLinearRingFlat returns a new LinearRing with the given flat coordinates. +func NewLinearRingFlat(layout Layout, flatCoords []float64) *LinearRing { + g := new(LinearRing) + g.layout = layout + g.stride = layout.Stride() + g.flatCoords = flatCoords + return g +} + +// Area returns the area. +func (g *LinearRing) Area() float64 { + return doubleArea1(g.flatCoords, 0, len(g.flatCoords), g.stride) / 2 +} + +// Clone returns a deep copy. +func (g *LinearRing) Clone() *LinearRing { + return deriveCloneLinearRing(g) +} + +// Length returns the length of the perimeter. +func (g *LinearRing) Length() float64 { + return length1(g.flatCoords, 0, len(g.flatCoords), g.stride) +} + +// MustSetCoords sets the coordinates and panics if there is any error. +func (g *LinearRing) MustSetCoords(coords []Coord) *LinearRing { + Must(g.SetCoords(coords)) + return g +} + +// SetCoords sets the coordinates. +func (g *LinearRing) SetCoords(coords []Coord) (*LinearRing, error) { + if err := g.setCoords(coords); err != nil { + return nil, err + } + return g, nil +} + +// SetSRID sets the SRID of g. +func (g *LinearRing) SetSRID(srid int) *LinearRing { + g.srid = srid + return g +} + +// Swap swaps the values of g and g2. +func (g *LinearRing) Swap(g2 *LinearRing) { + *g, *g2 = *g2, *g +} diff --git a/vendor/github.com/twpayne/go-geom/linestring.go b/vendor/github.com/twpayne/go-geom/linestring.go new file mode 100644 index 00000000000..2c7ea905071 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/linestring.go @@ -0,0 +1,99 @@ +package geom + +// A LineString represents a single, unbroken line, linearly interpreted +// between zero or more control points. +type LineString struct { + geom1 +} + +// NewLineString returns a new LineString with layout l and no control points. +func NewLineString(l Layout) *LineString { + return NewLineStringFlat(l, nil) +} + +// NewLineStringFlat returns a new LineString with layout l and control points +// flatCoords. +func NewLineStringFlat(layout Layout, flatCoords []float64) *LineString { + g := new(LineString) + g.layout = layout + g.stride = layout.Stride() + g.flatCoords = flatCoords + return g +} + +// Area returns the area of g, i.e. zero. +func (g *LineString) Area() float64 { + return 0 +} + +// Clone returns a copy of g that does not alias g. +func (g *LineString) Clone() *LineString { + return deriveCloneLineString(g) +} + +// Interpolate returns the index and delta of val in dimension dim. +func (g *LineString) Interpolate(val float64, dim int) (int, float64) { + n := len(g.flatCoords) + if n == 0 { + panic("geom: empty linestring") + } + if val <= g.flatCoords[dim] { + return 0, 0 + } + if g.flatCoords[n-g.stride+dim] <= val { + return (n - 1) / g.stride, 0 + } + low := 0 + high := n / g.stride + for low < high { + mid := (low + high) / 2 + if val < g.flatCoords[mid*g.stride+dim] { + high = mid + } else { + low = mid + 1 + } + } + low-- + val0 := g.flatCoords[low*g.stride+dim] + if val == val0 { + return low, 0 + } + val1 := g.flatCoords[(low+1)*g.stride+dim] + return low, (val - val0) / (val1 - val0) +} + +// Length returns the length of g. +func (g *LineString) Length() float64 { + return length1(g.flatCoords, 0, len(g.flatCoords), g.stride) +} + +// MustSetCoords is like SetCoords but it panics on any error. +func (g *LineString) MustSetCoords(coords []Coord) *LineString { + Must(g.SetCoords(coords)) + return g +} + +// SetCoords sets the coordinates of g. +func (g *LineString) SetCoords(coords []Coord) (*LineString, error) { + if err := g.setCoords(coords); err != nil { + return nil, err + } + return g, nil +} + +// SetSRID sets the SRID of g. +func (g *LineString) SetSRID(srid int) *LineString { + g.srid = srid + return g +} + +// SubLineString returns a LineString from starts at index start and stops at +// index stop of g. The returned LineString aliases g. +func (g *LineString) SubLineString(start, stop int) *LineString { + return NewLineStringFlat(g.layout, g.flatCoords[start*g.stride:stop*g.stride]) +} + +// Swap swaps the values of g and g2. +func (g *LineString) Swap(g2 *LineString) { + *g, *g2 = *g2, *g +} diff --git a/vendor/github.com/twpayne/go-geom/multilinestring.go b/vendor/github.com/twpayne/go-geom/multilinestring.go new file mode 100644 index 00000000000..645f74dde20 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/multilinestring.go @@ -0,0 +1,88 @@ +package geom + +// A MultiLineString is a collection of LineStrings. +type MultiLineString struct { + geom2 +} + +// NewMultiLineString returns a new MultiLineString with no LineStrings. +func NewMultiLineString(layout Layout) *MultiLineString { + return NewMultiLineStringFlat(layout, nil, nil) +} + +// NewMultiLineStringFlat returns a new MultiLineString with the given flat coordinates. +func NewMultiLineStringFlat(layout Layout, flatCoords []float64, ends []int) *MultiLineString { + g := new(MultiLineString) + g.layout = layout + g.stride = layout.Stride() + g.flatCoords = flatCoords + g.ends = ends + return g +} + +// Area returns the area of g, i.e. 0. +func (g *MultiLineString) Area() float64 { + return 0 +} + +// Clone returns a deep copy. +func (g *MultiLineString) Clone() *MultiLineString { + return deriveCloneMultiLineString(g) +} + +// Length returns the sum of the length of the LineStrings. +func (g *MultiLineString) Length() float64 { + return length2(g.flatCoords, 0, g.ends, g.stride) +} + +// LineString returns the ith LineString. +func (g *MultiLineString) LineString(i int) *LineString { + offset := 0 + if i > 0 { + offset = g.ends[i-1] + } + if offset == g.ends[i] { + return NewLineString(g.layout) + } + return NewLineStringFlat(g.layout, g.flatCoords[offset:g.ends[i]]) +} + +// MustSetCoords sets the coordinates and panics on any error. +func (g *MultiLineString) MustSetCoords(coords [][]Coord) *MultiLineString { + Must(g.SetCoords(coords)) + return g +} + +// NumLineStrings returns the number of LineStrings. +func (g *MultiLineString) NumLineStrings() int { + return len(g.ends) +} + +// Push appends a LineString. +func (g *MultiLineString) Push(ls *LineString) error { + if ls.layout != g.layout { + return ErrLayoutMismatch{Got: ls.layout, Want: g.layout} + } + g.flatCoords = append(g.flatCoords, ls.flatCoords...) + g.ends = append(g.ends, len(g.flatCoords)) + return nil +} + +// SetCoords sets the coordinates. +func (g *MultiLineString) SetCoords(coords [][]Coord) (*MultiLineString, error) { + if err := g.setCoords(coords); err != nil { + return nil, err + } + return g, nil +} + +// SetSRID sets the SRID of g. +func (g *MultiLineString) SetSRID(srid int) *MultiLineString { + g.srid = srid + return g +} + +// Swap swaps the values of g and g2. +func (g *MultiLineString) Swap(g2 *MultiLineString) { + *g, *g2 = *g2, *g +} diff --git a/vendor/github.com/twpayne/go-geom/multipoint.go b/vendor/github.com/twpayne/go-geom/multipoint.go new file mode 100644 index 00000000000..2d37f9f6f26 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/multipoint.go @@ -0,0 +1,160 @@ +package geom + +// A MultiPoint is a collection of Points. +type MultiPoint struct { + // To represent an MultiPoint that allows EMPTY elements, e.g. + // MULTIPOINT ( EMPTY, POINT(1.0 1.0), EMPTY), we have to allow + // record ends. If there is an empty point, ends[i] == ends[i-1]. + geom2 +} + +// NewMultiPoint returns a new, empty, MultiPoint. +func NewMultiPoint(layout Layout) *MultiPoint { + return NewMultiPointFlat(layout, nil) +} + +// NewMultiPointFlatOption represents an option that can be passed into +// NewMultiPointFlat. +type NewMultiPointFlatOption func(*MultiPoint) + +// NewMultiPointFlatOptionWithEnds allows passing ends to NewMultiPointFlat, +// which allows the representation of empty points. +func NewMultiPointFlatOptionWithEnds(ends []int) NewMultiPointFlatOption { + return func(mp *MultiPoint) { + mp.ends = ends + } +} + +// NewMultiPointFlat returns a new MultiPoint with the given flat coordinates. +// Assumes no points are empty by default. Use `NewMultiPointFlatOptionWithEnds` +// to specify empty points. +func NewMultiPointFlat( + layout Layout, flatCoords []float64, opts ...NewMultiPointFlatOption, +) *MultiPoint { + g := new(MultiPoint) + g.layout = layout + g.stride = layout.Stride() + g.flatCoords = flatCoords + for _, opt := range opts { + opt(g) + } + // If no ends are provided, assume all points are non empty. + if g.ends == nil && len(g.flatCoords) > 0 { + numCoords := 0 + if g.stride > 0 { + numCoords = len(flatCoords) / g.stride + } + g.ends = make([]int, numCoords) + for i := range numCoords { + g.ends[i] = (i + 1) * g.stride + } + } + return g +} + +// Area returns the area of g, i.e. zero. +func (g *MultiPoint) Area() float64 { + return 0 +} + +// Clone returns a deep copy. +func (g *MultiPoint) Clone() *MultiPoint { + return deriveCloneMultiPoint(g) +} + +// Length returns zero. +func (g *MultiPoint) Length() float64 { + return 0 +} + +// MustSetCoords sets the coordinates and panics on any error. +func (g *MultiPoint) MustSetCoords(coords []Coord) *MultiPoint { + Must(g.SetCoords(coords)) + return g +} + +// Coord returns the ith coord of g. +func (g *MultiPoint) Coord(i int) Coord { + before := 0 + if i > 0 { + before = g.ends[i-1] + } + if g.ends[i] == before { + return nil + } + return g.flatCoords[before:g.ends[i]] +} + +// SetCoords sets the coordinates. +func (g *MultiPoint) SetCoords(coords []Coord) (*MultiPoint, error) { + g.flatCoords = nil + g.ends = nil + for _, c := range coords { + if c != nil { + var err error + g.flatCoords, err = deflate0(g.flatCoords, c, g.stride) + if err != nil { + return nil, err + } + } + g.ends = append(g.ends, len(g.flatCoords)) + } + return g, nil +} + +// Coords unpacks and returns all of g's coordinates. +func (g *MultiPoint) Coords() []Coord { + coords1 := make([]Coord, len(g.ends)) + offset := 0 + prevEnd := 0 + for i, end := range g.ends { + if end != prevEnd { + coords1[i] = inflate0(g.flatCoords, offset, offset+g.stride, g.stride) + offset += g.stride + } + prevEnd = end + } + return coords1 +} + +// NumCoords returns the number of coordinates in g. +func (g *MultiPoint) NumCoords() int { + return len(g.ends) +} + +// SetSRID sets the SRID of g. +func (g *MultiPoint) SetSRID(srid int) *MultiPoint { + g.srid = srid + return g +} + +// NumPoints returns the number of Points. +func (g *MultiPoint) NumPoints() int { + return len(g.ends) +} + +// Point returns the ith Point. +func (g *MultiPoint) Point(i int) *Point { + coord := g.Coord(i) + if coord == nil { + return NewPointEmpty(g.layout) + } + return NewPointFlat(g.layout, coord) +} + +// Push appends a point. +func (g *MultiPoint) Push(p *Point) error { + if p.layout != g.layout { + return ErrLayoutMismatch{Got: p.layout, Want: g.layout} + } + if !p.Empty() { + g.flatCoords = append(g.flatCoords, p.flatCoords...) + } + g.ends = append(g.ends, len(g.flatCoords)) + return nil +} + +// Swap swaps the values of g and g2. +func (g *MultiPoint) Swap(g2 *MultiPoint) { + *g, *g2 = *g2, *g +} diff --git a/vendor/github.com/twpayne/go-geom/multipolygon.go b/vendor/github.com/twpayne/go-geom/multipolygon.go new file mode 100644 index 00000000000..b9c8ca60862 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/multipolygon.go @@ -0,0 +1,115 @@ +package geom + +// A MultiPolygon is a collection of Polygons. +type MultiPolygon struct { + geom3 +} + +// NewMultiPolygon returns a new MultiPolygon with no Polygons. +func NewMultiPolygon(layout Layout) *MultiPolygon { + return NewMultiPolygonFlat(layout, nil, nil) +} + +// NewMultiPolygonFlat returns a new MultiPolygon with the given flat coordinates. +func NewMultiPolygonFlat(layout Layout, flatCoords []float64, endss [][]int) *MultiPolygon { + g := new(MultiPolygon) + g.layout = layout + g.stride = layout.Stride() + g.flatCoords = flatCoords + g.endss = endss + return g +} + +// Area returns the sum of the area of the individual Polygons. +func (g *MultiPolygon) Area() float64 { + return doubleArea3(g.flatCoords, 0, g.endss, g.stride) / 2 +} + +// Clone returns a deep copy. +func (g *MultiPolygon) Clone() *MultiPolygon { + return deriveCloneMultiPolygon(g) +} + +// Length returns the sum of the perimeters of the Polygons. +func (g *MultiPolygon) Length() float64 { + return length3(g.flatCoords, 0, g.endss, g.stride) +} + +// MustSetCoords sets the coordinates and panics on any error. +func (g *MultiPolygon) MustSetCoords(coords [][][]Coord) *MultiPolygon { + Must(g.SetCoords(coords)) + return g +} + +// NumPolygons returns the number of Polygons. +func (g *MultiPolygon) NumPolygons() int { + return len(g.endss) +} + +// Polygon returns the ith Polygon. +func (g *MultiPolygon) Polygon(i int) *Polygon { + if len(g.endss[i]) == 0 { + return NewPolygon(g.layout) + } + // Find the offset from the previous non-empty polygon element. + offset := 0 + lastNonEmptyIdx := i - 1 + for lastNonEmptyIdx >= 0 { + ends := g.endss[lastNonEmptyIdx] + if len(ends) > 0 { + offset = ends[len(ends)-1] + break + } + lastNonEmptyIdx-- + } + ends := make([]int, len(g.endss[i])) + if offset == 0 { + copy(ends, g.endss[i]) + } else { + for j, end := range g.endss[i] { + ends[j] = end - offset + } + } + return NewPolygonFlat(g.layout, g.flatCoords[offset:g.endss[i][len(g.endss[i])-1]], ends) +} + +// Push appends a Polygon. +func (g *MultiPolygon) Push(p *Polygon) error { + if p.layout != g.layout { + return ErrLayoutMismatch{Got: p.layout, Want: g.layout} + } + offset := len(g.flatCoords) + var ends []int + if len(p.ends) > 0 { + ends = make([]int, len(p.ends)) + if offset == 0 { + copy(ends, p.ends) + } else { + for i, end := range p.ends { + ends[i] = end + offset + } + } + } + g.flatCoords = append(g.flatCoords, p.flatCoords...) + g.endss = append(g.endss, ends) + return nil +} + +// SetCoords sets the coordinates. +func (g *MultiPolygon) SetCoords(coords [][][]Coord) (*MultiPolygon, error) { + if err := g.setCoords(coords); err != nil { + return nil, err + } + return g, nil +} + +// SetSRID sets the SRID of g. +func (g *MultiPolygon) SetSRID(srid int) *MultiPolygon { + g.srid = srid + return g +} + +// Swap swaps the values of g and g2. +func (g *MultiPolygon) Swap(g2 *MultiPolygon) { + *g, *g2 = *g2, *g +} diff --git a/vendor/github.com/twpayne/go-geom/point.go b/vendor/github.com/twpayne/go-geom/point.go new file mode 100644 index 00000000000..69dc6d6c413 --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/point.go @@ -0,0 +1,120 @@ +package geom + +import "math" + +// PointEmptyCoordHex is the hex representation of a NaN that represents +// an empty coord in a shape. +const PointEmptyCoordHex = 0x7FF8000000000000 + +// PointEmptyCoord is the NaN float64 representation of the empty coordinate. +func PointEmptyCoord() float64 { + return math.Float64frombits(PointEmptyCoordHex) +} + +// A Point represents a single point. +type Point struct { + geom0 +} + +// NewPoint allocates a new Point with layout l and all values zero. +func NewPoint(l Layout) *Point { + return NewPointFlat(l, make([]float64, l.Stride())) +} + +// NewPointEmpty allocates a new Point with no coordinates. +func NewPointEmpty(l Layout) *Point { + return NewPointFlat(l, nil) +} + +// NewPointFlat allocates a new Point with layout l and flat coordinates flatCoords. +func NewPointFlat(l Layout, flatCoords []float64) *Point { + g := new(Point) + g.layout = l + g.stride = l.Stride() + g.flatCoords = flatCoords + return g +} + +// NewPointFlatMaybeEmpty returns a new point, checking whether the point may be empty +// by checking wther all the points are NaN. +func NewPointFlatMaybeEmpty(layout Layout, flatCoords []float64) *Point { + isEmpty := true + for _, coord := range flatCoords { + if math.Float64bits(coord) != PointEmptyCoordHex { + isEmpty = false + break + } + } + if isEmpty { + return NewPointEmpty(layout) + } + return NewPointFlat(layout, flatCoords) +} + +// Area returns g's area, i.e. zero. +func (g *Point) Area() float64 { + return 0 +} + +// Clone returns a copy of g that does not alias g. +func (g *Point) Clone() *Point { + return deriveClonePoint(g) +} + +// Length returns the length of g, i.e. zero. +func (g *Point) Length() float64 { + return 0 +} + +// MustSetCoords is like SetCoords but panics on any error. +func (g *Point) MustSetCoords(coords Coord) *Point { + Must(g.SetCoords(coords)) + return g +} + +// SetCoords sets the coordinates of g. +func (g *Point) SetCoords(coords Coord) (*Point, error) { + if err := g.setCoords(coords); err != nil { + return nil, err + } + return g, nil +} + +// SetSRID sets the SRID of g. +func (g *Point) SetSRID(srid int) *Point { + g.srid = srid + return g +} + +// Swap swaps the values of g and g2. +func (g *Point) Swap(g2 *Point) { + *g, *g2 = *g2, *g +} + +// X returns g's X-coordinate. +func (g *Point) X() float64 { + return g.flatCoords[0] +} + +// Y returns g's Y-coordinate. +func (g *Point) Y() float64 { + return g.flatCoords[1] +} + +// Z returns g's Z-coordinate, or zero if g has no Z-coordinate. +func (g *Point) Z() float64 { + zIndex := g.layout.ZIndex() + if zIndex == -1 { + return 0 + } + return g.flatCoords[zIndex] +} + +// M returns g's M-coordinate, or zero if g has no M-coordinate. +func (g *Point) M() float64 { + mIndex := g.layout.MIndex() + if mIndex == -1 { + return 0 + } + return g.flatCoords[mIndex] +} diff --git a/vendor/github.com/twpayne/go-geom/polygon.go b/vendor/github.com/twpayne/go-geom/polygon.go new file mode 100644 index 00000000000..e6d0b4791da --- /dev/null +++ b/vendor/github.com/twpayne/go-geom/polygon.go @@ -0,0 +1,87 @@ +package geom + +// A Polygon represents a polygon as a collection of LinearRings. The first +// LinearRing is the outer boundary. Subsequent LinearRings are inner +// boundaries (holes). +type Polygon struct { + geom2 +} + +// NewPolygon returns a new, empty, Polygon. +func NewPolygon(layout Layout) *Polygon { + return NewPolygonFlat(layout, nil, nil) +} + +// NewPolygonFlat returns a new Polygon with the given flat coordinates. +func NewPolygonFlat(layout Layout, flatCoords []float64, ends []int) *Polygon { + g := new(Polygon) + g.layout = layout + g.stride = layout.Stride() + g.flatCoords = flatCoords + g.ends = ends + return g +} + +// Area returns the area. +func (g *Polygon) Area() float64 { + return doubleArea2(g.flatCoords, 0, g.ends, g.stride) / 2 +} + +// Clone returns a deep copy. +func (g *Polygon) Clone() *Polygon { + return deriveClonePolygon(g) +} + +// Length returns the perimter. +func (g *Polygon) Length() float64 { + return length2(g.flatCoords, 0, g.ends, g.stride) +} + +// LinearRing returns the ith LinearRing. +func (g *Polygon) LinearRing(i int) *LinearRing { + offset := 0 + if i > 0 { + offset = g.ends[i-1] + } + return NewLinearRingFlat(g.layout, g.flatCoords[offset:g.ends[i]]) +} + +// MustSetCoords sets the coordinates and panics on any error. +func (g *Polygon) MustSetCoords(coords [][]Coord) *Polygon { + Must(g.SetCoords(coords)) + return g +} + +// NumLinearRings returns the number of LinearRings. +func (g *Polygon) NumLinearRings() int { + return len(g.ends) +} + +// Push appends a LinearRing. +func (g *Polygon) Push(lr *LinearRing) error { + if lr.layout != g.layout { + return ErrLayoutMismatch{Got: lr.layout, Want: g.layout} + } + g.flatCoords = append(g.flatCoords, lr.flatCoords...) + g.ends = append(g.ends, len(g.flatCoords)) + return nil +} + +// SetCoords sets the coordinates. +func (g *Polygon) SetCoords(coords [][]Coord) (*Polygon, error) { + if err := g.setCoords(coords); err != nil { + return nil, err + } + return g, nil +} + +// SetSRID sets the SRID of g. +func (g *Polygon) SetSRID(srid int) *Polygon { + g.srid = srid + return g +} + +// Swap swaps the values of g and g2. +func (g *Polygon) Swap(g2 *Polygon) { + *g, *g2 = *g2, *g +} diff --git a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go b/vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go index 16affcd62cf..37374c5a711 100644 --- a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go +++ b/vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go @@ -232,29 +232,30 @@ func init() { func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) } var fileDescriptor_8bbd6f3875b0e874 = []byte{ - // 338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xea, 0x40, - 0x14, 0xc6, 0x3b, 0xb4, 0x70, 0xdb, 0xc3, 0x85, 0x90, 0x13, 0x72, 0x6f, 0x83, 0x49, 0x6d, 0xba, - 0x6a, 0x5c, 0x54, 0x85, 0x8d, 0x5b, 0x8c, 0x2c, 0x5c, 0x49, 0x26, 0x18, 0x97, 0xa4, 0xa4, 0x13, - 0x24, 0xc0, 0x4c, 0x33, 0x83, 0x31, 0x6c, 0x7c, 0x0e, 0x17, 0x3e, 0x10, 0x4b, 0x1e, 0x41, 0xf0, - 0x45, 0x4c, 0x67, 0xf8, 0x13, 0xa2, 0xbb, 0xef, 0x7c, 0xe7, 0xfb, 0x66, 0x7e, 0x99, 0x01, 0x48, - 0x5f, 0x16, 0xcf, 0x49, 0x2e, 0xc5, 0x42, 0x60, 0xa5, 0xd0, 0xf9, 0xa8, 0xd5, 0x1c, 0x8b, 0xb1, - 0xd0, 0xd6, 0x65, 0xa1, 0xcc, 0x36, 0xba, 0x86, 0xfa, 0xa3, 0x62, 0xb2, 0x9b, 0x65, 0x0f, 0xf9, - 0x62, 0x22, 0xb8, 0xc2, 0x73, 0xa8, 0x72, 0x31, 0xcc, 0x53, 0xa5, 0x5e, 0x85, 0xcc, 0x7c, 0x12, - 0x92, 0xd8, 0xa5, 0xc0, 0x45, 0x7f, 0xe7, 0x44, 0x6f, 0xe0, 0x14, 0x15, 0x44, 0x70, 0x78, 0x3a, - 0x67, 0x3a, 0xf1, 0x97, 0x6a, 0x8d, 0x2d, 0x70, 0x0f, 0xcd, 0x92, 0xf6, 0x0f, 0x33, 0x36, 0xa1, - 0x2c, 0xc5, 0x8c, 0x29, 0xdf, 0x0e, 0xed, 0xd8, 0xa3, 0x66, 0xc0, 0x2b, 0xf8, 0x23, 0xcc, 0xcd, - 0xbe, 0x13, 0x92, 0xb8, 0xda, 0xfe, 0x97, 0x18, 0xe0, 0xe4, 0x94, 0x8b, 0xee, 0x63, 0xd1, 0x07, - 0x01, 0xe8, 0x33, 0x39, 0x9f, 0x28, 0x35, 0x11, 0x1c, 0x3b, 0xe0, 0xe6, 0x4c, 0xce, 0x07, 0xcb, - 0xdc, 0xa0, 0xd4, 0xdb, 0xff, 0xf7, 0x27, 0x1c, 0x53, 0x49, 0xb1, 0xa6, 0x87, 0x20, 0x36, 0xc0, - 0x9e, 0xb2, 0xe5, 0x0e, 0xb1, 0x90, 0x78, 0x06, 0x9e, 0x4c, 0xf9, 0x98, 0x0d, 0x19, 0xcf, 0x7c, - 0xdb, 0xa0, 0x6b, 0xa3, 0xc7, 0xb3, 0xe8, 0x02, 0x1c, 0x5d, 0x73, 0xc1, 0xa1, 0xbd, 0xee, 0x5d, - 0xc3, 0x42, 0x0f, 0xca, 0x4f, 0xf4, 0x7e, 0xd0, 0x6b, 0x10, 0xac, 0x81, 0x57, 0x98, 0x66, 0x2c, - 0x45, 0x03, 0x70, 0xa8, 0x98, 0xb1, 0x5f, 0x9f, 0xe7, 0x06, 0x6a, 0x53, 0xb6, 0x3c, 0x62, 0xf9, - 0xa5, 0xd0, 0x8e, 0xab, 0x6d, 0xfc, 0x09, 0x4c, 0x4f, 0x83, 0xb7, 0xfe, 0x6a, 0x13, 0x58, 0xeb, - 0x4d, 0x60, 0xad, 0xb6, 0x01, 0x59, 0x6f, 0x03, 0xf2, 0xb9, 0x0d, 0xc8, 0xfb, 0x57, 0x60, 0x8d, - 0x2a, 0xfa, 0x23, 0x3b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0x66, 0xc6, 0x9d, 0xf4, 0x01, - 0x00, 0x00, + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xc2, 0x40, + 0x10, 0xc6, 0xbb, 0xb4, 0x60, 0x3b, 0x08, 0x21, 0x1b, 0xa2, 0x0d, 0xc6, 0xda, 0xf4, 0xd4, 0x78, + 0x68, 0x15, 0x0e, 0x7a, 0xc5, 0xc8, 0xc1, 0x93, 0x64, 0x83, 0x31, 0xf1, 0x42, 0x8a, 0xdd, 0xd4, + 0x06, 0xd8, 0x6d, 0xda, 0xaa, 0xe1, 0xe2, 0x73, 0x78, 0xf0, 0x81, 0x38, 0xf2, 0x08, 0x82, 0x2f, + 0x62, 0xba, 0xcb, 0x9f, 0x10, 0x3d, 0xed, 0x37, 0xdf, 0x7c, 0x33, 0xfb, 0xcb, 0x2e, 0x40, 0xf0, + 0x9a, 0xbf, 0x78, 0x49, 0xca, 0x73, 0x8e, 0x2b, 0x85, 0x4e, 0x46, 0xad, 0x66, 0xc4, 0x23, 0x2e, + 0x2c, 0xbf, 0x50, 0xb2, 0xeb, 0x5c, 0x42, 0xfd, 0x21, 0xa3, 0x69, 0x37, 0x0c, 0xef, 0x93, 0x3c, + 0xe6, 0x2c, 0xc3, 0x67, 0x50, 0x65, 0x7c, 0x98, 0x04, 0x59, 0xf6, 0xce, 0xd3, 0xd0, 0x44, 0x36, + 0x72, 0x75, 0x02, 0x8c, 0xf7, 0xd7, 0x8e, 0xf3, 0x01, 0x5a, 0x31, 0x82, 0x31, 0x68, 0x2c, 0x98, + 0x52, 0x91, 0x38, 0x24, 0x42, 0xe3, 0x16, 0xe8, 0xdb, 0xc9, 0x92, 0xf0, 0xb7, 0x35, 0x6e, 0x42, + 0x39, 0xe5, 0x13, 0x9a, 0x99, 0xaa, 0xad, 0xba, 0x06, 0x91, 0x05, 0xbe, 0x80, 0x03, 0x2e, 0x6f, + 0x36, 0x35, 0x1b, 0xb9, 0xd5, 0xf6, 0x91, 0x27, 0x81, 0xbd, 0x7d, 0x2e, 0xb2, 0x89, 0x39, 0x5f, + 0x08, 0xa0, 0x4f, 0xd3, 0x69, 0x9c, 0x65, 0x31, 0x67, 0xb8, 0x03, 0x7a, 0x42, 0xd3, 0xe9, 0x60, + 0x96, 0x48, 0x94, 0x7a, 0xfb, 0x78, 0xb3, 0x61, 0x97, 0xf2, 0x8a, 0x36, 0xd9, 0x06, 0x71, 0x03, + 0xd4, 0x31, 0x9d, 0xad, 0x11, 0x0b, 0x89, 0x4f, 0xc0, 0x48, 0x03, 0x16, 0xd1, 0x21, 0x65, 0xa1, + 0xa9, 0x4a, 0x74, 0x61, 0xf4, 0x58, 0xe8, 0x9c, 0x83, 0x26, 0xc6, 0x74, 0xd0, 0x48, 0xaf, 0x7b, + 0xdb, 0x50, 0xb0, 0x01, 0xe5, 0x47, 0x72, 0x37, 0xe8, 0x35, 0x10, 0xae, 0x81, 0x51, 0x98, 0xb2, + 0x2c, 0x39, 0x03, 0xd0, 0x08, 0x9f, 0xd0, 0x7f, 0x9f, 0xe7, 0x1a, 0x6a, 0x63, 0x3a, 0xdb, 0x61, + 0x99, 0x25, 0x5b, 0x75, 0xab, 0x6d, 0xfc, 0x17, 0x98, 0xec, 0x07, 0x6f, 0xae, 0xe6, 0x4b, 0x4b, + 0x59, 0x2c, 0x2d, 0x65, 0xbe, 0xb2, 0xd0, 0x62, 0x65, 0xa1, 0xef, 0x95, 0x85, 0x3e, 0x7f, 0x2c, + 0xe5, 0xe9, 0x34, 0xe2, 0x1e, 0xcd, 0x9f, 0x43, 0x2f, 0xe6, 0x7e, 0x71, 0xfa, 0x41, 0x12, 0xfb, + 0x6f, 0x1d, 0x5f, 0xae, 0x1c, 0x55, 0xc4, 0x3f, 0x77, 0x7e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x61, + 0x5a, 0xfe, 0x48, 0x13, 0x02, 0x00, 0x00, } func (m *UserAddOptions) Marshal() (dAtA []byte, err error) { diff --git a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto b/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto index 8f82b7cf1e4..5a7856bb73d 100644 --- a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto +++ b/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto @@ -3,6 +3,8 @@ package authpb; import "gogoproto/gogo.proto"; +option go_package = "go.etcd.io/etcd/api/v3/authpb"; + option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go index 38434d09c56..eaefa2d2088 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go @@ -129,31 +129,33 @@ func init() { func init() { proto.RegisterFile("etcdserver.proto", fileDescriptor_09ffbeb3bebbce7e) } var fileDescriptor_09ffbeb3bebbce7e = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0xdd, 0x6e, 0xda, 0x30, - 0x14, 0x07, 0x70, 0x0c, 0xe1, 0xcb, 0x63, 0x1b, 0xb3, 0xd0, 0x74, 0x84, 0xa6, 0x2c, 0x42, 0xbb, - 0xc8, 0xd5, 0xf6, 0x0e, 0x2c, 0x5c, 0x44, 0x2a, 0x15, 0x0d, 0x15, 0xbd, 0x76, 0xc9, 0x29, 0x58, - 0x02, 0x4c, 0x1d, 0x07, 0xf1, 0x06, 0x7d, 0x85, 0x3e, 0x12, 0x97, 0x7d, 0x82, 0xaa, 0xa5, 0x2f, - 0x52, 0x39, 0x24, 0xc4, 0xed, 0x5d, 0xf4, 0xfb, 0x9f, 0x1c, 0x1f, 0x7f, 0xd0, 0x2e, 0xea, 0x79, - 0x9c, 0xa0, 0xda, 0xa1, 0xfa, 0xbb, 0x55, 0x52, 0x4b, 0xd6, 0x29, 0x65, 0x7b, 0xdb, 0xef, 0x2d, - 0xe4, 0x42, 0x66, 0xc1, 0x3f, 0xf3, 0x75, 0xaa, 0x19, 0x3c, 0x38, 0xb4, 0x19, 0xe1, 0x7d, 0x8a, - 0x89, 0x66, 0x3d, 0x5a, 0x0d, 0x03, 0x20, 0x1e, 0xf1, 0x9d, 0xa1, 0x73, 0x78, 0xfe, 0x5d, 0x89, - 0xaa, 0x61, 0xc0, 0x7e, 0xd1, 0xc6, 0x18, 0xf5, 0x52, 0xc6, 0x50, 0xf5, 0x88, 0xdf, 0xce, 0x93, - 0xdc, 0x18, 0x50, 0x67, 0xc2, 0xf5, 0x12, 0x6a, 0x56, 0x96, 0x09, 0xfb, 0x49, 0x6b, 0x33, 0xbe, - 0x02, 0xc7, 0x0a, 0x0c, 0x18, 0x0f, 0x84, 0x82, 0xba, 0x47, 0xfc, 0x56, 0xe1, 0x81, 0x50, 0x6c, - 0x40, 0xdb, 0x13, 0x85, 0xbb, 0x19, 0x5f, 0xa5, 0x08, 0x0d, 0xeb, 0xaf, 0x92, 0x8b, 0x9a, 0x70, - 0x13, 0xe3, 0x1e, 0x9a, 0xd6, 0xa0, 0x25, 0x17, 0x35, 0xa3, 0xbd, 0x48, 0x34, 0xb4, 0xce, 0xab, - 0x90, 0xa8, 0x64, 0xf6, 0x87, 0xd2, 0xd1, 0x7e, 0x2b, 0x14, 0xd7, 0x42, 0x6e, 0xa0, 0xed, 0x11, - 0xbf, 0x96, 0x37, 0xb2, 0xdc, 0xec, 0xed, 0x86, 0x0b, 0x0d, 0xd4, 0x1a, 0x35, 0x13, 0xd6, 0xa7, - 0xf5, 0xa9, 0xd8, 0xcc, 0x11, 0xbe, 0x58, 0x33, 0x9c, 0xc8, 0xac, 0x1f, 0xe1, 0x3c, 0x55, 0x89, - 0xd8, 0x21, 0x74, 0xac, 0x5f, 0x4b, 0x36, 0x67, 0x3a, 0x95, 0x4a, 0x63, 0x0c, 0x5f, 0xad, 0x82, - 0xdc, 0x4c, 0x7a, 0x95, 0x4a, 0x95, 0xae, 0xe1, 0x9b, 0x9d, 0x9e, 0xcc, 0x4c, 0x75, 0x2d, 0xd6, - 0x08, 0xdf, 0xad, 0xa9, 0x33, 0xc9, 0xba, 0x6a, 0x85, 0x7c, 0x0d, 0xdd, 0x0f, 0x5d, 0x33, 0x63, - 0xae, 0xb9, 0xe8, 0x3b, 0x85, 0xc9, 0x12, 0x7e, 0x58, 0xa7, 0x52, 0xe0, 0xe0, 0x82, 0xb6, 0xc6, - 0xa8, 0x79, 0xcc, 0x35, 0x37, 0x9d, 0x2e, 0x65, 0x8c, 0x9f, 0x5e, 0x43, 0x6e, 0x66, 0x87, 0xff, - 0x57, 0x69, 0xa2, 0x51, 0x85, 0x41, 0xf6, 0x28, 0xce, 0xb7, 0x70, 0xe6, 0x61, 0xef, 0xf0, 0xea, - 0x56, 0x0e, 0x47, 0x97, 0x3c, 0x1d, 0x5d, 0xf2, 0x72, 0x74, 0xc9, 0xe3, 0x9b, 0x5b, 0x79, 0x0f, - 0x00, 0x00, 0xff, 0xff, 0xee, 0x40, 0xba, 0xd6, 0xa4, 0x02, 0x00, 0x00, + // 402 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0x41, 0xef, 0xd2, 0x30, + 0x14, 0x00, 0x70, 0x0a, 0xfb, 0xff, 0x81, 0x8a, 0x8a, 0x0d, 0x31, 0x2f, 0xc4, 0xcc, 0x05, 0x3d, + 0xec, 0xc4, 0x0e, 0x9e, 0xbc, 0xe2, 0x38, 0x2c, 0x11, 0x83, 0xc3, 0x60, 0xe2, 0xad, 0xb2, 0x27, + 0x34, 0x01, 0x3a, 0xbb, 0x6e, 0xe1, 0x1b, 0xf8, 0x15, 0xfc, 0x48, 0x1c, 0xfd, 0x04, 0x46, 0xf1, + 0x8b, 0x98, 0x8e, 0x8d, 0x55, 0x4f, 0x5b, 0x7e, 0xef, 0xf5, 0xf5, 0xb5, 0x7d, 0x74, 0x88, 0x7a, + 0x93, 0x64, 0xa8, 0x0a, 0x54, 0xd3, 0x54, 0x49, 0x2d, 0xd9, 0xa0, 0x91, 0xf4, 0xf3, 0x78, 0xb4, + 0x95, 0x5b, 0x59, 0x06, 0x02, 0xf3, 0x77, 0xcd, 0x99, 0x7c, 0x73, 0x68, 0x37, 0xc6, 0xaf, 0x39, + 0x66, 0x9a, 0x8d, 0x68, 0x3b, 0x0a, 0x81, 0x78, 0xc4, 0x77, 0x66, 0xce, 0xf9, 0xe7, 0xf3, 0x56, + 0xdc, 0x8e, 0x42, 0xf6, 0x8c, 0xde, 0x2f, 0x50, 0xef, 0x64, 0x02, 0x6d, 0x8f, 0xf8, 0xfd, 0x2a, + 0x52, 0x19, 0x03, 0xea, 0x2c, 0xb9, 0xde, 0x41, 0xc7, 0x8a, 0x95, 0xc2, 0x9e, 0xd2, 0xce, 0x9a, + 0xef, 0xc1, 0xb1, 0x02, 0x06, 0x8c, 0x87, 0x42, 0xc1, 0x9d, 0x47, 0xfc, 0x5e, 0xed, 0xa1, 0x50, + 0x6c, 0x42, 0xfb, 0x4b, 0x85, 0xc5, 0x9a, 0xef, 0x73, 0x84, 0x7b, 0x6b, 0x55, 0xc3, 0x75, 0x4e, + 0x74, 0x4c, 0xf0, 0x04, 0x5d, 0xab, 0xd1, 0x86, 0xeb, 0x9c, 0xf9, 0x49, 0x64, 0x1a, 0x7a, 0xb7, + 0x5d, 0x48, 0xdc, 0x30, 0x7b, 0x49, 0xe9, 0xfc, 0x94, 0x0a, 0xc5, 0xb5, 0x90, 0x47, 0xe8, 0x7b, + 0xc4, 0xef, 0x54, 0x85, 0x2c, 0x37, 0x67, 0xfb, 0xc8, 0x85, 0x06, 0x6a, 0xb5, 0x5a, 0x0a, 0x1b, + 0xd3, 0xbb, 0x95, 0x38, 0x6e, 0x10, 0x1e, 0x58, 0x3d, 0x5c, 0xc9, 0xec, 0x1f, 0xe3, 0x26, 0x57, + 0x99, 0x28, 0x10, 0x06, 0xd6, 0xd2, 0x86, 0xcd, 0x9d, 0xae, 0xa4, 0xd2, 0x98, 0xc0, 0x43, 0x2b, + 0xa1, 0x32, 0x13, 0x7d, 0x9f, 0x4b, 0x95, 0x1f, 0xe0, 0x91, 0x1d, 0xbd, 0x9a, 0xe9, 0xea, 0x83, + 0x38, 0x20, 0x3c, 0xb6, 0xba, 0x2e, 0xa5, 0xac, 0xaa, 0x15, 0xf2, 0x03, 0x0c, 0xff, 0xa9, 0x5a, + 0x1a, 0x73, 0xcd, 0x43, 0x7f, 0x51, 0x98, 0xed, 0xe0, 0x89, 0x75, 0x2b, 0x35, 0x4e, 0xde, 0xd2, + 0xde, 0x02, 0x35, 0x4f, 0xb8, 0xe6, 0xa6, 0xd2, 0x3b, 0x99, 0xe0, 0x7f, 0xd3, 0x50, 0x99, 0x39, + 0xe1, 0x9b, 0x7d, 0x9e, 0x69, 0x54, 0x51, 0x58, 0x0e, 0xc5, 0xed, 0x15, 0x6e, 0x3c, 0x7b, 0x7d, + 0xfe, 0xed, 0xb6, 0xce, 0x17, 0x97, 0xfc, 0xb8, 0xb8, 0xe4, 0xd7, 0xc5, 0x25, 0xdf, 0xff, 0xb8, + 0xad, 0x4f, 0x2f, 0xb6, 0x72, 0x6a, 0x86, 0x72, 0x2a, 0x64, 0x60, 0xbe, 0x01, 0x4f, 0x45, 0x50, + 0xbc, 0x0a, 0xec, 0x41, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x79, 0xf9, 0xf5, 0xc9, 0x02, + 0x00, 0x00, } func (m *Request) Marshal() (dAtA []byte, err error) { diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto index 25e0aca5d9f..ff639b9c96c 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto @@ -3,6 +3,8 @@ package etcdserverpb; import "gogoproto/gogo.proto"; +option go_package = "go.etcd.io/etcd/api/v3/etcdserverpb"; + option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go index b94a7bfd9d9..e1cd9ebecd6 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go @@ -12,6 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" membershippb "go.etcd.io/etcd/api/v3/membershippb" + _ "go.etcd.io/etcd/api/v3/versionpb" ) // Reference imports to suppress errors if they are not otherwise used. @@ -104,6 +105,7 @@ type InternalRaftRequest struct { ClusterVersionSet *membershippb.ClusterVersionSetRequest `protobuf:"bytes,1300,opt,name=cluster_version_set,json=clusterVersionSet,proto3" json:"cluster_version_set,omitempty"` ClusterMemberAttrSet *membershippb.ClusterMemberAttrSetRequest `protobuf:"bytes,1301,opt,name=cluster_member_attr_set,json=clusterMemberAttrSet,proto3" json:"cluster_member_attr_set,omitempty"` DowngradeInfoSet *membershippb.DowngradeInfoSetRequest `protobuf:"bytes,1302,opt,name=downgrade_info_set,json=downgradeInfoSet,proto3" json:"downgrade_info_set,omitempty"` + DowngradeVersionTest *DowngradeVersionTestRequest `protobuf:"bytes,9900,opt,name=downgrade_version_test,json=downgradeVersionTest,proto3" json:"downgrade_version_test,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -237,70 +239,76 @@ func init() { func init() { proto.RegisterFile("raft_internal.proto", fileDescriptor_b4c9a9be0cfca103) } var fileDescriptor_b4c9a9be0cfca103 = []byte{ - // 1003 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x96, 0xd9, 0x72, 0x1b, 0x45, - 0x14, 0x86, 0x23, 0xc5, 0x71, 0xac, 0x96, 0xed, 0x38, 0x6d, 0x87, 0x34, 0x72, 0x95, 0x70, 0x1c, - 0x12, 0xcc, 0x66, 0x53, 0xca, 0x03, 0x80, 0x90, 0x5c, 0x8e, 0xab, 0x42, 0x70, 0x4d, 0xcc, 0x52, - 0xc5, 0xc5, 0xd0, 0x9a, 0x39, 0x96, 0x06, 0xcf, 0x46, 0x77, 0x4b, 0x31, 0xef, 0x11, 0x28, 0x1e, - 0x83, 0xed, 0x21, 0x72, 0xc1, 0x62, 0xe0, 0x05, 0xc0, 0xdc, 0x70, 0x0f, 0xdc, 0x53, 0xbd, 0xcc, - 0x26, 0xb5, 0x7c, 0xa7, 0xf9, 0xcf, 0x7f, 0xbe, 0x73, 0xba, 0xe7, 0xf4, 0xa8, 0xd1, 0x3a, 0xa3, - 0x27, 0xc2, 0x0d, 0x62, 0x01, 0x2c, 0xa6, 0xe1, 0x6e, 0xca, 0x12, 0x91, 0xe0, 0x65, 0x10, 0x9e, - 0xcf, 0x81, 0x4d, 0x80, 0xa5, 0x83, 0xd6, 0xc6, 0x30, 0x19, 0x26, 0x2a, 0xb0, 0x27, 0x7f, 0x69, - 0x4f, 0x6b, 0xad, 0xf0, 0x18, 0xa5, 0xc1, 0x52, 0xcf, 0xfc, 0xbc, 0x2f, 0x83, 0x7b, 0x34, 0x0d, - 0xf6, 0x22, 0x88, 0x06, 0xc0, 0xf8, 0x28, 0x48, 0xd3, 0x41, 0xe9, 0x41, 0xfb, 0xb6, 0x3f, 0x45, - 0x2b, 0x0e, 0x7c, 0x3e, 0x06, 0x2e, 0x1e, 0x02, 0xf5, 0x81, 0xe1, 0x55, 0x54, 0x3f, 0xec, 0x93, - 0xda, 0x56, 0x6d, 0x67, 0xc1, 0xa9, 0x1f, 0xf6, 0x71, 0x0b, 0x2d, 0x8d, 0xb9, 0x6c, 0x2d, 0x02, - 0x52, 0xdf, 0xaa, 0xed, 0x34, 0x9c, 0xfc, 0x19, 0xdf, 0x45, 0x2b, 0x74, 0x2c, 0x46, 0x2e, 0x83, - 0x49, 0xc0, 0x83, 0x24, 0x26, 0x57, 0x55, 0xda, 0xb2, 0x14, 0x1d, 0xa3, 0x6d, 0x3f, 0xc3, 0x68, - 0xfd, 0xd0, 0xac, 0xce, 0xa1, 0x27, 0xc2, 0x94, 0xc3, 0x0f, 0xd0, 0xe2, 0x48, 0x95, 0x24, 0xfe, - 0x56, 0x6d, 0xa7, 0xd9, 0xd9, 0xdc, 0x2d, 0xaf, 0x79, 0xb7, 0xd2, 0x95, 0x63, 0xac, 0x33, 0xdd, - 0xdd, 0x43, 0xf5, 0x49, 0x47, 0xf5, 0xd5, 0xec, 0xdc, 0xb2, 0x02, 0x9c, 0xfa, 0xa4, 0x83, 0xdf, - 0x42, 0xd7, 0x18, 0x8d, 0x87, 0xa0, 0x1a, 0x6c, 0x76, 0x5a, 0x53, 0x4e, 0x19, 0xca, 0xec, 0xda, - 0x88, 0x5f, 0x43, 0x57, 0xd3, 0xb1, 0x20, 0x0b, 0xca, 0x4f, 0xaa, 0xfe, 0xa3, 0x71, 0xb6, 0x08, - 0x47, 0x9a, 0x70, 0x0f, 0x2d, 0xfb, 0x10, 0x82, 0x00, 0x57, 0x17, 0xb9, 0xa6, 0x92, 0xb6, 0xaa, - 0x49, 0x7d, 0xe5, 0xa8, 0x94, 0x6a, 0xfa, 0x85, 0x26, 0x0b, 0x8a, 0xb3, 0x98, 0x2c, 0xda, 0x0a, - 0x1e, 0x9f, 0xc5, 0x79, 0x41, 0x71, 0x16, 0xe3, 0xb7, 0x11, 0xf2, 0x92, 0x28, 0xa5, 0x9e, 0x90, - 0x9b, 0x7e, 0x5d, 0xa5, 0xbc, 0x54, 0x4d, 0xe9, 0xe5, 0xf1, 0x2c, 0xb3, 0x94, 0x82, 0xdf, 0x41, - 0xcd, 0x10, 0x28, 0x07, 0x77, 0xc8, 0x68, 0x2c, 0xc8, 0x92, 0x8d, 0xf0, 0x48, 0x1a, 0x0e, 0x64, - 0x3c, 0x27, 0x84, 0xb9, 0x24, 0xd7, 0xac, 0x09, 0x0c, 0x26, 0xc9, 0x29, 0x90, 0x86, 0x6d, 0xcd, - 0x0a, 0xe1, 0x28, 0x43, 0xbe, 0xe6, 0xb0, 0xd0, 0xe4, 0x6b, 0xa1, 0x21, 0x65, 0x11, 0x41, 0xb6, - 0xd7, 0xd2, 0x95, 0xa1, 0xfc, 0xb5, 0x28, 0x23, 0x7e, 0x1f, 0xad, 0xe9, 0xb2, 0xde, 0x08, 0xbc, - 0xd3, 0x34, 0x09, 0x62, 0x41, 0x9a, 0x2a, 0xf9, 0x65, 0x4b, 0xe9, 0x5e, 0x6e, 0xca, 0x30, 0x37, - 0xc2, 0xaa, 0x8e, 0xbb, 0xa8, 0xa9, 0x46, 0x18, 0x62, 0x3a, 0x08, 0x81, 0xfc, 0x6d, 0xdd, 0xcc, - 0xee, 0x58, 0x8c, 0xf6, 0x95, 0x21, 0xdf, 0x0a, 0x9a, 0x4b, 0xb8, 0x8f, 0xd4, 0xc0, 0xbb, 0x7e, - 0xc0, 0x15, 0xe3, 0x9f, 0xeb, 0xb6, 0xbd, 0x90, 0x8c, 0xbe, 0x76, 0xe4, 0x7b, 0x41, 0x0b, 0x2d, - 0x6f, 0x84, 0x0b, 0x2a, 0xc6, 0x9c, 0xfc, 0x37, 0xb7, 0x91, 0x27, 0xca, 0x50, 0x69, 0x44, 0x4b, - 0xf8, 0xb1, 0x6e, 0x04, 0x62, 0x11, 0x78, 0x54, 0x00, 0xf9, 0x57, 0x33, 0x5e, 0xad, 0x32, 0xb2, - 0xb3, 0xd8, 0x2d, 0x59, 0x33, 0x5a, 0x25, 0x1f, 0xef, 0x9b, 0xe3, 0x2d, 0xcf, 0xbb, 0x4b, 0x7d, - 0x9f, 0xfc, 0xb8, 0x34, 0x6f, 0x65, 0x1f, 0x70, 0x60, 0x5d, 0xdf, 0xaf, 0xac, 0xcc, 0x68, 0xf8, - 0x31, 0x5a, 0x2b, 0x30, 0x7a, 0xe4, 0xc9, 0x4f, 0x9a, 0x74, 0xd7, 0x4e, 0x32, 0x67, 0xc5, 0xc0, - 0x56, 0x69, 0x45, 0xae, 0xb6, 0x35, 0x04, 0x41, 0x7e, 0xbe, 0xb4, 0xad, 0x03, 0x10, 0x33, 0x6d, - 0x1d, 0x80, 0xc0, 0x43, 0xf4, 0x62, 0x81, 0xf1, 0x46, 0xf2, 0x10, 0xba, 0x29, 0xe5, 0xfc, 0x69, - 0xc2, 0x7c, 0xf2, 0x8b, 0x46, 0xbe, 0x6e, 0x47, 0xf6, 0x94, 0xfb, 0xc8, 0x98, 0x33, 0xfa, 0x0b, - 0xd4, 0x1a, 0xc6, 0x1f, 0xa3, 0x8d, 0x52, 0xbf, 0xf2, 0xf4, 0xb8, 0x2c, 0x09, 0x81, 0x9c, 0xeb, - 0x1a, 0xf7, 0xe7, 0xb4, 0xad, 0x4e, 0x5e, 0x52, 0x4c, 0xcb, 0x4d, 0x3a, 0x1d, 0xc1, 0x9f, 0xa0, - 0x5b, 0x05, 0x59, 0x1f, 0x44, 0x8d, 0xfe, 0x55, 0xa3, 0x5f, 0xb1, 0xa3, 0xcd, 0x89, 0x2c, 0xb1, - 0x31, 0x9d, 0x09, 0xe1, 0x87, 0x68, 0xb5, 0x80, 0x87, 0x01, 0x17, 0xe4, 0x37, 0x4d, 0xbd, 0x63, - 0xa7, 0x3e, 0x0a, 0xb8, 0xa8, 0xcc, 0x51, 0x26, 0xe6, 0x24, 0xd9, 0x9a, 0x26, 0xfd, 0x3e, 0x97, - 0x24, 0x4b, 0xcf, 0x90, 0x32, 0x31, 0x7f, 0xf5, 0x8a, 0x24, 0x27, 0xf2, 0x9b, 0xc6, 0xbc, 0x57, - 0x2f, 0x73, 0xa6, 0x27, 0xd2, 0x68, 0xf9, 0x44, 0x2a, 0x8c, 0x99, 0xc8, 0x6f, 0x1b, 0xf3, 0x26, - 0x52, 0x66, 0x59, 0x26, 0xb2, 0x90, 0xab, 0x6d, 0xc9, 0x89, 0xfc, 0xee, 0xd2, 0xb6, 0xa6, 0x27, - 0xd2, 0x68, 0xf8, 0x33, 0xd4, 0x2a, 0x61, 0xd4, 0xa0, 0xa4, 0xc0, 0xa2, 0x80, 0xab, 0xff, 0xd6, - 0xef, 0x35, 0xf3, 0x8d, 0x39, 0x4c, 0x69, 0x3f, 0xca, 0xdd, 0x19, 0xff, 0x36, 0xb5, 0xc7, 0x71, - 0x84, 0x36, 0x8b, 0x5a, 0x66, 0x74, 0x4a, 0xc5, 0x7e, 0xd0, 0xc5, 0xde, 0xb4, 0x17, 0xd3, 0x53, - 0x32, 0x5b, 0x8d, 0xd0, 0x39, 0x06, 0xfc, 0x11, 0x5a, 0xf7, 0xc2, 0x31, 0x17, 0xc0, 0xdc, 0x09, - 0x30, 0x29, 0xb9, 0x1c, 0x04, 0x79, 0x86, 0xcc, 0x11, 0x28, 0x5f, 0x52, 0x76, 0x7b, 0xda, 0xf9, - 0xa1, 0x36, 0x3e, 0x29, 0x76, 0xeb, 0xa6, 0x37, 0x1d, 0xc1, 0x14, 0xdd, 0xce, 0xc0, 0x9a, 0xe1, - 0x52, 0x21, 0x98, 0x82, 0x7f, 0x89, 0xcc, 0xe7, 0xcf, 0x06, 0x7f, 0x4f, 0x69, 0x5d, 0x21, 0x58, - 0x89, 0xbf, 0xe1, 0x59, 0x82, 0xf8, 0x18, 0x61, 0x3f, 0x79, 0x1a, 0x0f, 0x19, 0xf5, 0xc1, 0x0d, - 0xe2, 0x93, 0x44, 0xd1, 0xbf, 0xd2, 0xf4, 0x7b, 0x55, 0x7a, 0x3f, 0x33, 0x1e, 0xc6, 0x27, 0x49, - 0x89, 0xbc, 0xe6, 0x4f, 0x05, 0xb6, 0x6f, 0xa0, 0x95, 0xfd, 0x28, 0x15, 0x5f, 0x38, 0xc0, 0xd3, - 0x24, 0xe6, 0xb0, 0x9d, 0xa2, 0xcd, 0x4b, 0x3e, 0xcd, 0x18, 0xa3, 0x05, 0x75, 0x07, 0xab, 0xa9, - 0x3b, 0x98, 0xfa, 0x2d, 0xef, 0x66, 0xf9, 0x17, 0xcb, 0xdc, 0xcd, 0xb2, 0x67, 0x7c, 0x07, 0x2d, - 0xf3, 0x20, 0x4a, 0x43, 0x70, 0x45, 0x72, 0x0a, 0xfa, 0x6a, 0xd6, 0x70, 0x9a, 0x5a, 0x3b, 0x96, - 0xd2, 0xbb, 0x1b, 0xcf, 0xff, 0x6c, 0x5f, 0x79, 0x7e, 0xd1, 0xae, 0x9d, 0x5f, 0xb4, 0x6b, 0x7f, - 0x5c, 0xb4, 0x6b, 0x5f, 0xff, 0xd5, 0xbe, 0x32, 0x58, 0x54, 0x17, 0xc3, 0x07, 0xff, 0x07, 0x00, - 0x00, 0xff, 0xff, 0x94, 0x6f, 0x64, 0x0a, 0x98, 0x0a, 0x00, 0x00, + // 1101 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x56, 0xcb, 0x72, 0x1b, 0x45, + 0x14, 0x8d, 0x6c, 0xc7, 0xb6, 0x5a, 0xb6, 0xe3, 0xb4, 0x9d, 0xa4, 0xb1, 0xab, 0x8c, 0xe3, 0x90, + 0x60, 0x20, 0xc8, 0xc1, 0x06, 0xaa, 0x60, 0x03, 0x8a, 0xe5, 0x72, 0x4c, 0x25, 0x29, 0xd7, 0xc4, + 0x50, 0x29, 0x28, 0x6a, 0x68, 0xcd, 0x5c, 0x4b, 0x13, 0x8f, 0x66, 0x86, 0xee, 0x96, 0xe2, 0x6c, + 0x59, 0xb2, 0x06, 0x8a, 0x8f, 0x60, 0xc1, 0x2b, 0xff, 0x90, 0x05, 0x8f, 0x00, 0x3f, 0x00, 0x66, + 0xc3, 0x1e, 0xd8, 0xa7, 0xfa, 0x31, 0x2f, 0xa9, 0xe5, 0xdd, 0xe8, 0xde, 0x73, 0xcf, 0x39, 0xdd, + 0x7d, 0xbb, 0x75, 0xd1, 0x02, 0xa3, 0x87, 0xc2, 0x0d, 0x22, 0x01, 0x2c, 0xa2, 0x61, 0x3d, 0x61, + 0xb1, 0x88, 0xf1, 0x0c, 0x08, 0xcf, 0xe7, 0xc0, 0xfa, 0xc0, 0x92, 0xd6, 0xd2, 0x62, 0x3b, 0x6e, + 0xc7, 0x2a, 0xb1, 0x21, 0xbf, 0x34, 0x66, 0x69, 0x3e, 0xc7, 0x98, 0x48, 0x95, 0x25, 0x9e, 0xf9, + 0x5c, 0x95, 0xc9, 0x0d, 0x9a, 0x04, 0x1b, 0x7d, 0x60, 0x3c, 0x88, 0xa3, 0xa4, 0x95, 0x7e, 0x19, + 0xc4, 0xb5, 0x0c, 0xd1, 0x85, 0x6e, 0x0b, 0x18, 0xef, 0x04, 0x49, 0xd2, 0x2a, 0xfc, 0xd0, 0xb8, + 0x35, 0x86, 0x66, 0x1d, 0xf8, 0xb4, 0x07, 0x5c, 0xdc, 0x02, 0xea, 0x03, 0xc3, 0x73, 0x68, 0x6c, + 0xaf, 0x49, 0x2a, 0xab, 0x95, 0xf5, 0x09, 0x67, 0x6c, 0xaf, 0x89, 0x97, 0xd0, 0x74, 0x8f, 0x4b, + 0xf3, 0x5d, 0x20, 0x63, 0xab, 0x95, 0xf5, 0xaa, 0x93, 0xfd, 0xc6, 0xd7, 0xd1, 0x2c, 0xed, 0x89, + 0x8e, 0xcb, 0xa0, 0x1f, 0x48, 0x6d, 0x32, 0x2e, 0xcb, 0x6e, 0x4e, 0x7d, 0xfe, 0x98, 0x8c, 0x6f, + 0xd5, 0x5f, 0x73, 0x66, 0x64, 0xd6, 0x31, 0xc9, 0xb7, 0xa7, 0x3e, 0x53, 0xe1, 0x1b, 0x6b, 0x8f, + 0x17, 0xd0, 0xc2, 0x9e, 0xd9, 0x11, 0x87, 0x1e, 0x0a, 0x63, 0x00, 0x6f, 0xa1, 0xc9, 0x8e, 0x32, + 0x41, 0xfc, 0xd5, 0xca, 0x7a, 0x6d, 0x73, 0xb9, 0x5e, 0xdc, 0xa7, 0x7a, 0xc9, 0xa7, 0x63, 0xa0, + 0x43, 0x7e, 0xaf, 0xa2, 0xb1, 0xfe, 0xa6, 0x72, 0x5a, 0xdb, 0xbc, 0x60, 0x25, 0x70, 0xc6, 0xfa, + 0x9b, 0xf8, 0x06, 0x3a, 0xcb, 0x68, 0xd4, 0x06, 0x65, 0xb9, 0xb6, 0xb9, 0x34, 0x80, 0x94, 0xa9, + 0x14, 0xae, 0x81, 0xf8, 0x65, 0x34, 0x9e, 0xf4, 0x04, 0x99, 0x50, 0x78, 0x52, 0xc6, 0xef, 0xf7, + 0xd2, 0x45, 0x38, 0x12, 0x84, 0xb7, 0xd1, 0x8c, 0x0f, 0x21, 0x08, 0x70, 0xb5, 0xc8, 0x59, 0x55, + 0xb4, 0x5a, 0x2e, 0x6a, 0x2a, 0x44, 0x49, 0xaa, 0xe6, 0xe7, 0x31, 0x29, 0x28, 0x8e, 0x23, 0x32, + 0x69, 0x13, 0x3c, 0x38, 0x8e, 0x32, 0x41, 0x71, 0x1c, 0xe1, 0x77, 0x10, 0xf2, 0xe2, 0x6e, 0x42, + 0x3d, 0x21, 0x8f, 0x61, 0x4a, 0x95, 0x3c, 0x5f, 0x2e, 0xd9, 0xce, 0xf2, 0x69, 0x65, 0xa1, 0x04, + 0xbf, 0x8b, 0x6a, 0x21, 0x50, 0x0e, 0x6e, 0x9b, 0xd1, 0x48, 0x90, 0x69, 0x1b, 0xc3, 0x6d, 0x09, + 0xd8, 0x95, 0xf9, 0x8c, 0x21, 0xcc, 0x42, 0x72, 0xcd, 0x9a, 0x81, 0x41, 0x3f, 0x3e, 0x02, 0x52, + 0xb5, 0xad, 0x59, 0x51, 0x38, 0x0a, 0x90, 0xad, 0x39, 0xcc, 0x63, 0xf2, 0x58, 0x68, 0x48, 0x59, + 0x97, 0x20, 0xdb, 0xb1, 0x34, 0x64, 0x2a, 0x3b, 0x16, 0x05, 0xc4, 0xf7, 0xd1, 0xbc, 0x96, 0xf5, + 0x3a, 0xe0, 0x1d, 0x25, 0x71, 0x10, 0x09, 0x52, 0x53, 0xc5, 0x2f, 0x58, 0xa4, 0xb7, 0x33, 0x90, + 0xa1, 0x49, 0x9b, 0xf5, 0x75, 0xe7, 0x5c, 0x58, 0x06, 0xe0, 0x06, 0xaa, 0xa9, 0xee, 0x86, 0x88, + 0xb6, 0x42, 0x20, 0xff, 0x58, 0x77, 0xb5, 0xd1, 0x13, 0x9d, 0x1d, 0x05, 0xc8, 0xf6, 0x84, 0x66, + 0x21, 0xdc, 0x44, 0xea, 0x0a, 0xb8, 0x7e, 0xc0, 0x15, 0xc7, 0xbf, 0x53, 0xb6, 0x4d, 0x91, 0x1c, + 0x4d, 0x8d, 0xc8, 0x36, 0x85, 0xe6, 0x31, 0xfc, 0x9e, 0x31, 0xc2, 0x05, 0x15, 0x3d, 0x4e, 0xfe, + 0x1f, 0x69, 0xe4, 0x9e, 0x02, 0x0c, 0xac, 0xec, 0x0d, 0xed, 0x48, 0xe7, 0xf0, 0x5d, 0xed, 0x08, + 0x22, 0x11, 0x78, 0x54, 0x00, 0xf9, 0x4f, 0x93, 0xbd, 0x54, 0x26, 0x4b, 0x6f, 0x67, 0xa3, 0x00, + 0x4d, 0xad, 0x95, 0xea, 0xf1, 0x8e, 0x79, 0x02, 0xe4, 0x9b, 0xe0, 0x52, 0xdf, 0x27, 0x3f, 0x4d, + 0x8f, 0x5a, 0xe2, 0xfb, 0x1c, 0x58, 0xc3, 0xf7, 0x4b, 0x4b, 0x34, 0x31, 0x7c, 0x17, 0xcd, 0xe7, + 0x34, 0xfa, 0x12, 0x90, 0x9f, 0x35, 0xd3, 0x15, 0x3b, 0x93, 0xb9, 0x3d, 0x86, 0x6c, 0x8e, 0x96, + 0xc2, 0x65, 0x5b, 0x6d, 0x10, 0xe4, 0x97, 0x53, 0x6d, 0xed, 0x82, 0x18, 0xb2, 0xb5, 0x0b, 0x02, + 0xb7, 0xd1, 0x73, 0x39, 0x8d, 0xd7, 0x91, 0xd7, 0xd2, 0x4d, 0x28, 0xe7, 0x0f, 0x63, 0xe6, 0x93, + 0x5f, 0x35, 0xe5, 0x2b, 0x76, 0xca, 0x6d, 0x85, 0xde, 0x37, 0xe0, 0x94, 0xfd, 0x22, 0xb5, 0xa6, + 0xf1, 0x7d, 0xb4, 0x58, 0xf0, 0x2b, 0xef, 0x93, 0xcb, 0xe2, 0x10, 0xc8, 0x53, 0xad, 0x71, 0x6d, + 0x84, 0x6d, 0x75, 0x17, 0xe3, 0xbc, 0x6d, 0xce, 0xd3, 0xc1, 0x0c, 0xfe, 0x08, 0x5d, 0xc8, 0x99, + 0xf5, 0xd5, 0xd4, 0xd4, 0xbf, 0x69, 0xea, 0x17, 0xed, 0xd4, 0xe6, 0x8e, 0x16, 0xb8, 0x31, 0x1d, + 0x4a, 0xe1, 0x5b, 0x68, 0x2e, 0x27, 0x0f, 0x03, 0x2e, 0xc8, 0xef, 0x9a, 0xf5, 0xb2, 0x9d, 0xf5, + 0x76, 0xc0, 0x45, 0xa9, 0x8f, 0xd2, 0x60, 0xc6, 0x24, 0xad, 0x69, 0xa6, 0x3f, 0x46, 0x32, 0x49, + 0xe9, 0x21, 0xa6, 0x34, 0x98, 0x1d, 0xbd, 0x62, 0x92, 0x1d, 0xf9, 0x6d, 0x75, 0xd4, 0xd1, 0xcb, + 0x9a, 0xc1, 0x8e, 0x34, 0xb1, 0xac, 0x23, 0x15, 0x8d, 0xe9, 0xc8, 0xef, 0xaa, 0xa3, 0x3a, 0x52, + 0x56, 0x59, 0x3a, 0x32, 0x0f, 0x97, 0x6d, 0xc9, 0x8e, 0xfc, 0xfe, 0x54, 0x5b, 0x83, 0x1d, 0x69, + 0x62, 0xf8, 0x01, 0x5a, 0x2a, 0xd0, 0xa8, 0x46, 0x49, 0x80, 0x75, 0x03, 0xae, 0xfe, 0x7f, 0x7f, + 0xd0, 0x9c, 0xd7, 0x47, 0x70, 0x4a, 0xf8, 0x7e, 0x86, 0x4e, 0xf9, 0x2f, 0x51, 0x7b, 0x1e, 0x77, + 0xd1, 0x72, 0xae, 0x65, 0x5a, 0xa7, 0x20, 0xf6, 0xa3, 0x16, 0x7b, 0xd5, 0x2e, 0xa6, 0xbb, 0x64, + 0x58, 0x8d, 0xd0, 0x11, 0x00, 0xfc, 0x09, 0x5a, 0xf0, 0xc2, 0x1e, 0x17, 0xc0, 0x5c, 0x33, 0xcb, + 0xb8, 0x1c, 0x04, 0xf9, 0x02, 0x99, 0x2b, 0x50, 0x1c, 0x64, 0xea, 0xdb, 0x1a, 0xf9, 0x81, 0x06, + 0xde, 0x03, 0x31, 0xf4, 0xea, 0x9d, 0xf7, 0x06, 0x21, 0xf8, 0x01, 0xba, 0x94, 0x2a, 0x68, 0x32, + 0x97, 0x0a, 0xc1, 0x94, 0xca, 0x97, 0xc8, 0xbc, 0x83, 0x36, 0x95, 0x3b, 0x2a, 0xd6, 0x10, 0x82, + 0xd9, 0x84, 0x16, 0x3d, 0x0b, 0x0a, 0x7f, 0x8c, 0xb0, 0x1f, 0x3f, 0x8c, 0xda, 0x8c, 0xfa, 0xe0, + 0x06, 0xd1, 0x61, 0xac, 0x64, 0xbe, 0xd2, 0x32, 0x57, 0xcb, 0x32, 0xcd, 0x14, 0xb8, 0x17, 0x1d, + 0xc6, 0x36, 0x89, 0x79, 0x7f, 0x00, 0x81, 0x03, 0x74, 0x31, 0xa7, 0x4f, 0xb7, 0x4b, 0x00, 0x17, + 0xe4, 0x9b, 0x3b, 0xb6, 0x17, 0x3d, 0x93, 0x30, 0xdb, 0x71, 0x00, 0x7c, 0x50, 0xe6, 0x4d, 0x67, + 0xd1, 0xb7, 0xa0, 0xf2, 0xb9, 0xed, 0x1c, 0x9a, 0xdd, 0xe9, 0x26, 0xe2, 0x91, 0x03, 0x3c, 0x89, + 0x23, 0x0e, 0x6b, 0x8f, 0xd0, 0xf2, 0x29, 0xff, 0x14, 0x18, 0xa3, 0x09, 0x35, 0x36, 0x56, 0xd4, + 0xd8, 0xa8, 0xbe, 0xe5, 0x38, 0x99, 0x3d, 0xa0, 0x66, 0x9c, 0x4c, 0x7f, 0xe3, 0xcb, 0x68, 0x86, + 0x07, 0xdd, 0x24, 0x04, 0x57, 0xc4, 0x47, 0xa0, 0xa7, 0xc9, 0xaa, 0x53, 0xd3, 0xb1, 0x03, 0x19, + 0xca, 0xbc, 0xdc, 0x7c, 0xeb, 0xc9, 0x5f, 0x2b, 0x67, 0x9e, 0x9c, 0xac, 0x54, 0x9e, 0x9e, 0xac, + 0x54, 0xfe, 0x3c, 0x59, 0xa9, 0x7c, 0xfd, 0xf7, 0xca, 0x99, 0x0f, 0xaf, 0xb4, 0x63, 0xb5, 0xec, + 0x7a, 0x10, 0x6f, 0xe4, 0x23, 0xf2, 0xd6, 0x46, 0x71, 0x2b, 0x5a, 0x93, 0x6a, 0xf2, 0xdd, 0x7a, + 0x16, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xa0, 0x15, 0x1f, 0x9b, 0x0b, 0x00, 0x00, } func (m *RequestHeader) Marshal() (dAtA []byte, err error) { @@ -371,6 +379,22 @@ func (m *InternalRaftRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.DowngradeVersionTest != nil { + { + size, err := m.DowngradeVersionTest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRaftInternal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4 + i-- + dAtA[i] = 0xea + i-- + dAtA[i] = 0xe2 + } if m.DowngradeInfoSet != nil { { size, err := m.DowngradeInfoSet.MarshalToSizedBuffer(dAtA[:i]) @@ -1034,6 +1058,10 @@ func (m *InternalRaftRequest) Size() (n int) { l = m.DowngradeInfoSet.Size() n += 2 + l + sovRaftInternal(uint64(l)) } + if m.DowngradeVersionTest != nil { + l = m.DowngradeVersionTest.Size() + n += 3 + l + sovRaftInternal(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2367,6 +2395,42 @@ func (m *InternalRaftRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 9900: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DowngradeVersionTest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaftInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRaftInternal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRaftInternal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DowngradeVersionTest == nil { + m.DowngradeVersionTest = &DowngradeVersionTestRequest{} + } + if err := m.DowngradeVersionTest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRaftInternal(dAtA[iNdEx:]) diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto index 68926e59f6c..88b8ab5279e 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto @@ -4,24 +4,31 @@ package etcdserverpb; import "gogoproto/gogo.proto"; import "etcdserver.proto"; import "rpc.proto"; +import "etcd/api/versionpb/version.proto"; import "etcd/api/membershippb/membership.proto"; +option go_package = "go.etcd.io/etcd/api/v3/etcdserverpb"; + option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; option (gogoproto.goproto_getters_all) = false; message RequestHeader { + option (versionpb.etcd_version_msg) = "3.0"; + uint64 ID = 1; // username is a username that is associated with an auth token of gRPC connection string username = 2; // auth_revision is a revision number of auth.authStore. It is not related to mvcc - uint64 auth_revision = 3; + uint64 auth_revision = 3 [(versionpb.etcd_version_field) = "3.1"]; } // An InternalRaftRequest is the union of all requests which can be // sent via raft. message InternalRaftRequest { + option (versionpb.etcd_version_msg) = "3.0"; + RequestHeader header = 100; uint64 ID = 1; @@ -38,11 +45,11 @@ message InternalRaftRequest { AlarmRequest alarm = 10; - LeaseCheckpointRequest lease_checkpoint = 11; + LeaseCheckpointRequest lease_checkpoint = 11 [(versionpb.etcd_version_field) = "3.4"]; AuthEnableRequest auth_enable = 1000; AuthDisableRequest auth_disable = 1011; - AuthStatusRequest auth_status = 1013; + AuthStatusRequest auth_status = 1013 [(versionpb.etcd_version_field) = "3.5"]; InternalAuthenticateRequest authenticate = 1012; @@ -61,9 +68,11 @@ message InternalRaftRequest { AuthRoleGrantPermissionRequest auth_role_grant_permission = 1203; AuthRoleRevokePermissionRequest auth_role_revoke_permission = 1204; - membershippb.ClusterVersionSetRequest cluster_version_set = 1300; - membershippb.ClusterMemberAttrSetRequest cluster_member_attr_set = 1301; - membershippb.DowngradeInfoSetRequest downgrade_info_set = 1302; + membershippb.ClusterVersionSetRequest cluster_version_set = 1300 [(versionpb.etcd_version_field) = "3.5"]; + membershippb.ClusterMemberAttrSetRequest cluster_member_attr_set = 1301 [(versionpb.etcd_version_field) = "3.5"]; + membershippb.DowngradeInfoSetRequest downgrade_info_set = 1302 [(versionpb.etcd_version_field) = "3.5"]; + + DowngradeVersionTestRequest downgrade_version_test = 9900 [(versionpb.etcd_version_field) = "3.6"]; } message EmptyResponse { @@ -73,6 +82,7 @@ message EmptyResponse { // InternalAuthenticateRequest has a member that is filled by etcdserver and shouldn't be user-facing. // For avoiding misusage the field, we have an internal version of AuthenticateRequest. message InternalAuthenticateRequest { + option (versionpb.etcd_version_msg) = "3.0"; string name = 1; string password = 2; diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go index 31e121ee0a6..a9431d52542 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go @@ -72,13 +72,13 @@ func (as *InternalRaftStringer) String() string { return as.Request.String() } -// txnRequestStringer implements a custom proto String to replace value bytes fields with value size -// fields in any nested txn and put operations. +// txnRequestStringer implements fmt.Stringer, a custom proto String to replace value bytes +// fields with value size fields in any nested txn and put operations. type txnRequestStringer struct { Request *TxnRequest } -func NewLoggableTxnRequest(request *TxnRequest) *txnRequestStringer { +func NewLoggableTxnRequest(request *TxnRequest) fmt.Stringer { return &txnRequestStringer{request} } @@ -155,8 +155,8 @@ func (m *loggableValueCompare) Reset() { *m = loggableValueCompare{} } func (m *loggableValueCompare) String() string { return proto.CompactTextString(m) } func (*loggableValueCompare) ProtoMessage() {} -// loggablePutRequest implements a custom proto String to replace value bytes field with a value -// size field. +// loggablePutRequest implements proto.Message, a custom proto String to replace value bytes +// field with a value size field. // To preserve proto encoding of the key bytes, a faked out proto type is used here. type loggablePutRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3"` @@ -167,7 +167,7 @@ type loggablePutRequest struct { IgnoreLease bool `protobuf:"varint,6,opt,name=ignore_lease,proto3"` } -func NewLoggablePutRequest(request *PutRequest) *loggablePutRequest { +func NewLoggablePutRequest(request *PutRequest) proto.Message { return &loggablePutRequest{ request.Key, int64(len(request.Value)), diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go index 8120907d91d..42bf641db6b 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go @@ -12,8 +12,10 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" authpb "go.etcd.io/etcd/api/v3/authpb" mvccpb "go.etcd.io/etcd/api/v3/mvccpb" + _ "go.etcd.io/etcd/api/v3/versionpb" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -274,9 +276,10 @@ type ResponseHeader struct { ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` // member_id is the ID of the member which sent the response. MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` - // revision is the key-value store revision when the request was applied. + // revision is the key-value store revision when the request was applied, and it's + // unset (so 0) in case of calls not interacting with key-value store. // For watch progress responses, the header.revision indicates progress. All future events - // recieved in this stream are guaranteed to have a higher revision number than the + // received in this stream are guaranteed to have a higher revision number than the // header.revision number. Revision int64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"` // raft_term is the raft term when the request was applied. @@ -526,7 +529,9 @@ type RangeResponse struct { Kvs []*mvccpb.KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"` // more indicates if there are more keys to return in the requested range. More bool `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"` - // count is set to the number of keys within the range when requested. + // count is set to the actual number of keys within the range when requested. + // Unlike Kvs, it is unaffected by limits and filters (e.g., Min/Max, Create/Modify, Revisions) + // and reflects the full count within the specified range. Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1630,7 +1635,9 @@ type HashKVResponse struct { // hash is the hash value computed from the responding member's MVCC keys up to a given revision. Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"` // compact_revision is the compacted revision of key-value store when hash begins. - CompactRevision int64 `protobuf:"varint,3,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"` + CompactRevision int64 `protobuf:"varint,3,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"` + // hash_revision is the revision up to which the hash is calculated. + HashRevision int64 `protobuf:"varint,4,opt,name=hash_revision,json=hashRevision,proto3" json:"hash_revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1690,6 +1697,13 @@ func (m *HashKVResponse) GetCompactRevision() int64 { return 0 } +func (m *HashKVResponse) GetHashRevision() int64 { + if m != nil { + return m.HashRevision + } + return 0 +} + type HashResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` // hash is the hash value computed from the responding member's KV's backend. @@ -1792,7 +1806,11 @@ type SnapshotResponse struct { // remaining_bytes is the number of blob bytes to be sent after this message RemainingBytes uint64 `protobuf:"varint,2,opt,name=remaining_bytes,json=remainingBytes,proto3" json:"remaining_bytes,omitempty"` // blob contains the next chunk of the snapshot in the snapshot stream. - Blob []byte `protobuf:"bytes,3,opt,name=blob,proto3" json:"blob,omitempty"` + Blob []byte `protobuf:"bytes,3,opt,name=blob,proto3" json:"blob,omitempty"` + // local version of server that created the snapshot. + // In cluster with binaries with different version, each cluster can return different result. + // Informs which etcd server version should be used when restoring the snapshot. + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1852,6 +1870,13 @@ func (m *SnapshotResponse) GetBlob() []byte { return nil } +func (m *SnapshotResponse) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + type WatchRequest struct { // request_union is a request to either create a new watcher or cancel an existing watcher. // @@ -2176,7 +2201,8 @@ type WatchResponse struct { // the created watcher from the same stream. // All events sent to the created watcher will attach with the same watch_id. Created bool `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` - // canceled is set to true if the response is for a cancel watch request. + // canceled is set to true if the response is for a cancel watch request + // or if the start_revision has already been compacted. // No further events will be sent to the canceled watcher. Canceled bool `protobuf:"varint,4,opt,name=canceled,proto3" json:"canceled,omitempty"` // compact_revision is set to the minimum index if a watcher tries to watch @@ -4165,6 +4191,57 @@ func (m *DowngradeResponse) GetVersion() string { return "" } +// DowngradeVersionTestRequest is used for test only. The version in +// this request will be read as the WAL record version.If the downgrade +// target version is less than this version, then the downgrade(online) +// or migration(offline) isn't safe, so shouldn't be allowed. +type DowngradeVersionTestRequest struct { + Ver string `protobuf:"bytes,1,opt,name=ver,proto3" json:"ver,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DowngradeVersionTestRequest) Reset() { *m = DowngradeVersionTestRequest{} } +func (m *DowngradeVersionTestRequest) String() string { return proto.CompactTextString(m) } +func (*DowngradeVersionTestRequest) ProtoMessage() {} +func (*DowngradeVersionTestRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_77a6da22d6a3feb1, []int{59} +} +func (m *DowngradeVersionTestRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DowngradeVersionTestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DowngradeVersionTestRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DowngradeVersionTestRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DowngradeVersionTestRequest.Merge(m, src) +} +func (m *DowngradeVersionTestRequest) XXX_Size() int { + return m.Size() +} +func (m *DowngradeVersionTestRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DowngradeVersionTestRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DowngradeVersionTestRequest proto.InternalMessageInfo + +func (m *DowngradeVersionTestRequest) GetVer() string { + if m != nil { + return m.Ver + } + return "" +} + type StatusRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -4175,7 +4252,7 @@ func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (m *StatusRequest) String() string { return proto.CompactTextString(m) } func (*StatusRequest) ProtoMessage() {} func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{59} + return fileDescriptor_77a6da22d6a3feb1, []int{60} } func (m *StatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4223,17 +4300,23 @@ type StatusResponse struct { // dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member. DbSizeInUse int64 `protobuf:"varint,9,opt,name=dbSizeInUse,proto3" json:"dbSizeInUse,omitempty"` // isLearner indicates if the member is raft learner. - IsLearner bool `protobuf:"varint,10,opt,name=isLearner,proto3" json:"isLearner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + IsLearner bool `protobuf:"varint,10,opt,name=isLearner,proto3" json:"isLearner,omitempty"` + // storageVersion is the version of the db file. It might be updated with delay in relationship to the target cluster version. + StorageVersion string `protobuf:"bytes,11,opt,name=storageVersion,proto3" json:"storageVersion,omitempty"` + // dbSizeQuota is the configured etcd storage quota in bytes (the value passed to etcd instance by flag --quota-backend-bytes) + DbSizeQuota int64 `protobuf:"varint,12,opt,name=dbSizeQuota,proto3" json:"dbSizeQuota,omitempty"` + // downgradeInfo indicates if there is downgrade process. + DowngradeInfo *DowngradeInfo `protobuf:"bytes,13,opt,name=downgradeInfo,proto3" json:"downgradeInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (m *StatusResponse) String() string { return proto.CompactTextString(m) } func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{60} + return fileDescriptor_77a6da22d6a3feb1, []int{61} } func (m *StatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4332,6 +4415,84 @@ func (m *StatusResponse) GetIsLearner() bool { return false } +func (m *StatusResponse) GetStorageVersion() string { + if m != nil { + return m.StorageVersion + } + return "" +} + +func (m *StatusResponse) GetDbSizeQuota() int64 { + if m != nil { + return m.DbSizeQuota + } + return 0 +} + +func (m *StatusResponse) GetDowngradeInfo() *DowngradeInfo { + if m != nil { + return m.DowngradeInfo + } + return nil +} + +type DowngradeInfo struct { + // enabled indicates whether the cluster is enabled to downgrade. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // targetVersion is the target downgrade version. + TargetVersion string `protobuf:"bytes,2,opt,name=targetVersion,proto3" json:"targetVersion,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DowngradeInfo) Reset() { *m = DowngradeInfo{} } +func (m *DowngradeInfo) String() string { return proto.CompactTextString(m) } +func (*DowngradeInfo) ProtoMessage() {} +func (*DowngradeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_77a6da22d6a3feb1, []int{62} +} +func (m *DowngradeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DowngradeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DowngradeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DowngradeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DowngradeInfo.Merge(m, src) +} +func (m *DowngradeInfo) XXX_Size() int { + return m.Size() +} +func (m *DowngradeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DowngradeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_DowngradeInfo proto.InternalMessageInfo + +func (m *DowngradeInfo) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func (m *DowngradeInfo) GetTargetVersion() string { + if m != nil { + return m.TargetVersion + } + return "" +} + type AuthEnableRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -4342,7 +4503,7 @@ func (m *AuthEnableRequest) Reset() { *m = AuthEnableRequest{} } func (m *AuthEnableRequest) String() string { return proto.CompactTextString(m) } func (*AuthEnableRequest) ProtoMessage() {} func (*AuthEnableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{61} + return fileDescriptor_77a6da22d6a3feb1, []int{63} } func (m *AuthEnableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4381,7 +4542,7 @@ func (m *AuthDisableRequest) Reset() { *m = AuthDisableRequest{} } func (m *AuthDisableRequest) String() string { return proto.CompactTextString(m) } func (*AuthDisableRequest) ProtoMessage() {} func (*AuthDisableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{62} + return fileDescriptor_77a6da22d6a3feb1, []int{64} } func (m *AuthDisableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4420,7 +4581,7 @@ func (m *AuthStatusRequest) Reset() { *m = AuthStatusRequest{} } func (m *AuthStatusRequest) String() string { return proto.CompactTextString(m) } func (*AuthStatusRequest) ProtoMessage() {} func (*AuthStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{63} + return fileDescriptor_77a6da22d6a3feb1, []int{65} } func (m *AuthStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4461,7 +4622,7 @@ func (m *AuthenticateRequest) Reset() { *m = AuthenticateRequest{} } func (m *AuthenticateRequest) String() string { return proto.CompactTextString(m) } func (*AuthenticateRequest) ProtoMessage() {} func (*AuthenticateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{64} + return fileDescriptor_77a6da22d6a3feb1, []int{66} } func (m *AuthenticateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4518,7 +4679,7 @@ func (m *AuthUserAddRequest) Reset() { *m = AuthUserAddRequest{} } func (m *AuthUserAddRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserAddRequest) ProtoMessage() {} func (*AuthUserAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{65} + return fileDescriptor_77a6da22d6a3feb1, []int{67} } func (m *AuthUserAddRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4586,7 +4747,7 @@ func (m *AuthUserGetRequest) Reset() { *m = AuthUserGetRequest{} } func (m *AuthUserGetRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserGetRequest) ProtoMessage() {} func (*AuthUserGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{66} + return fileDescriptor_77a6da22d6a3feb1, []int{68} } func (m *AuthUserGetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4634,7 +4795,7 @@ func (m *AuthUserDeleteRequest) Reset() { *m = AuthUserDeleteRequest{} } func (m *AuthUserDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserDeleteRequest) ProtoMessage() {} func (*AuthUserDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{67} + return fileDescriptor_77a6da22d6a3feb1, []int{69} } func (m *AuthUserDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4686,7 +4847,7 @@ func (m *AuthUserChangePasswordRequest) Reset() { *m = AuthUserChangePas func (m *AuthUserChangePasswordRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserChangePasswordRequest) ProtoMessage() {} func (*AuthUserChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{68} + return fileDescriptor_77a6da22d6a3feb1, []int{70} } func (m *AuthUserChangePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4750,7 +4911,7 @@ func (m *AuthUserGrantRoleRequest) Reset() { *m = AuthUserGrantRoleReque func (m *AuthUserGrantRoleRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserGrantRoleRequest) ProtoMessage() {} func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{69} + return fileDescriptor_77a6da22d6a3feb1, []int{71} } func (m *AuthUserGrantRoleRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4805,7 +4966,7 @@ func (m *AuthUserRevokeRoleRequest) Reset() { *m = AuthUserRevokeRoleReq func (m *AuthUserRevokeRoleRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserRevokeRoleRequest) ProtoMessage() {} func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{70} + return fileDescriptor_77a6da22d6a3feb1, []int{72} } func (m *AuthUserRevokeRoleRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4860,7 +5021,7 @@ func (m *AuthRoleAddRequest) Reset() { *m = AuthRoleAddRequest{} } func (m *AuthRoleAddRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleAddRequest) ProtoMessage() {} func (*AuthRoleAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{71} + return fileDescriptor_77a6da22d6a3feb1, []int{73} } func (m *AuthRoleAddRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4907,7 +5068,7 @@ func (m *AuthRoleGetRequest) Reset() { *m = AuthRoleGetRequest{} } func (m *AuthRoleGetRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleGetRequest) ProtoMessage() {} func (*AuthRoleGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{72} + return fileDescriptor_77a6da22d6a3feb1, []int{74} } func (m *AuthRoleGetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4953,7 +5114,7 @@ func (m *AuthUserListRequest) Reset() { *m = AuthUserListRequest{} } func (m *AuthUserListRequest) String() string { return proto.CompactTextString(m) } func (*AuthUserListRequest) ProtoMessage() {} func (*AuthUserListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{73} + return fileDescriptor_77a6da22d6a3feb1, []int{75} } func (m *AuthUserListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4992,7 +5153,7 @@ func (m *AuthRoleListRequest) Reset() { *m = AuthRoleListRequest{} } func (m *AuthRoleListRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleListRequest) ProtoMessage() {} func (*AuthRoleListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{74} + return fileDescriptor_77a6da22d6a3feb1, []int{76} } func (m *AuthRoleListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5032,7 +5193,7 @@ func (m *AuthRoleDeleteRequest) Reset() { *m = AuthRoleDeleteRequest{} } func (m *AuthRoleDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleDeleteRequest) ProtoMessage() {} func (*AuthRoleDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{75} + return fileDescriptor_77a6da22d6a3feb1, []int{77} } func (m *AuthRoleDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5082,7 +5243,7 @@ func (m *AuthRoleGrantPermissionRequest) Reset() { *m = AuthRoleGrantPer func (m *AuthRoleGrantPermissionRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleGrantPermissionRequest) ProtoMessage() {} func (*AuthRoleGrantPermissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{76} + return fileDescriptor_77a6da22d6a3feb1, []int{78} } func (m *AuthRoleGrantPermissionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5138,7 +5299,7 @@ func (m *AuthRoleRevokePermissionRequest) Reset() { *m = AuthRoleRevokeP func (m *AuthRoleRevokePermissionRequest) String() string { return proto.CompactTextString(m) } func (*AuthRoleRevokePermissionRequest) ProtoMessage() {} func (*AuthRoleRevokePermissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{77} + return fileDescriptor_77a6da22d6a3feb1, []int{79} } func (m *AuthRoleRevokePermissionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5199,7 +5360,7 @@ func (m *AuthEnableResponse) Reset() { *m = AuthEnableResponse{} } func (m *AuthEnableResponse) String() string { return proto.CompactTextString(m) } func (*AuthEnableResponse) ProtoMessage() {} func (*AuthEnableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{78} + return fileDescriptor_77a6da22d6a3feb1, []int{80} } func (m *AuthEnableResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5246,7 +5407,7 @@ func (m *AuthDisableResponse) Reset() { *m = AuthDisableResponse{} } func (m *AuthDisableResponse) String() string { return proto.CompactTextString(m) } func (*AuthDisableResponse) ProtoMessage() {} func (*AuthDisableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{79} + return fileDescriptor_77a6da22d6a3feb1, []int{81} } func (m *AuthDisableResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5296,7 +5457,7 @@ func (m *AuthStatusResponse) Reset() { *m = AuthStatusResponse{} } func (m *AuthStatusResponse) String() string { return proto.CompactTextString(m) } func (*AuthStatusResponse) ProtoMessage() {} func (*AuthStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{80} + return fileDescriptor_77a6da22d6a3feb1, []int{82} } func (m *AuthStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5359,7 +5520,7 @@ func (m *AuthenticateResponse) Reset() { *m = AuthenticateResponse{} } func (m *AuthenticateResponse) String() string { return proto.CompactTextString(m) } func (*AuthenticateResponse) ProtoMessage() {} func (*AuthenticateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{81} + return fileDescriptor_77a6da22d6a3feb1, []int{83} } func (m *AuthenticateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5413,7 +5574,7 @@ func (m *AuthUserAddResponse) Reset() { *m = AuthUserAddResponse{} } func (m *AuthUserAddResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserAddResponse) ProtoMessage() {} func (*AuthUserAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{82} + return fileDescriptor_77a6da22d6a3feb1, []int{84} } func (m *AuthUserAddResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5461,7 +5622,7 @@ func (m *AuthUserGetResponse) Reset() { *m = AuthUserGetResponse{} } func (m *AuthUserGetResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserGetResponse) ProtoMessage() {} func (*AuthUserGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{83} + return fileDescriptor_77a6da22d6a3feb1, []int{85} } func (m *AuthUserGetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5515,7 +5676,7 @@ func (m *AuthUserDeleteResponse) Reset() { *m = AuthUserDeleteResponse{} func (m *AuthUserDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserDeleteResponse) ProtoMessage() {} func (*AuthUserDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{84} + return fileDescriptor_77a6da22d6a3feb1, []int{86} } func (m *AuthUserDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5562,7 +5723,7 @@ func (m *AuthUserChangePasswordResponse) Reset() { *m = AuthUserChangePa func (m *AuthUserChangePasswordResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserChangePasswordResponse) ProtoMessage() {} func (*AuthUserChangePasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{85} + return fileDescriptor_77a6da22d6a3feb1, []int{87} } func (m *AuthUserChangePasswordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5609,7 +5770,7 @@ func (m *AuthUserGrantRoleResponse) Reset() { *m = AuthUserGrantRoleResp func (m *AuthUserGrantRoleResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserGrantRoleResponse) ProtoMessage() {} func (*AuthUserGrantRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{86} + return fileDescriptor_77a6da22d6a3feb1, []int{88} } func (m *AuthUserGrantRoleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5656,7 +5817,7 @@ func (m *AuthUserRevokeRoleResponse) Reset() { *m = AuthUserRevokeRoleRe func (m *AuthUserRevokeRoleResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserRevokeRoleResponse) ProtoMessage() {} func (*AuthUserRevokeRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{87} + return fileDescriptor_77a6da22d6a3feb1, []int{89} } func (m *AuthUserRevokeRoleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5703,7 +5864,7 @@ func (m *AuthRoleAddResponse) Reset() { *m = AuthRoleAddResponse{} } func (m *AuthRoleAddResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleAddResponse) ProtoMessage() {} func (*AuthRoleAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{88} + return fileDescriptor_77a6da22d6a3feb1, []int{90} } func (m *AuthRoleAddResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5751,7 +5912,7 @@ func (m *AuthRoleGetResponse) Reset() { *m = AuthRoleGetResponse{} } func (m *AuthRoleGetResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleGetResponse) ProtoMessage() {} func (*AuthRoleGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{89} + return fileDescriptor_77a6da22d6a3feb1, []int{91} } func (m *AuthRoleGetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5806,7 +5967,7 @@ func (m *AuthRoleListResponse) Reset() { *m = AuthRoleListResponse{} } func (m *AuthRoleListResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleListResponse) ProtoMessage() {} func (*AuthRoleListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{90} + return fileDescriptor_77a6da22d6a3feb1, []int{92} } func (m *AuthRoleListResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5861,7 +6022,7 @@ func (m *AuthUserListResponse) Reset() { *m = AuthUserListResponse{} } func (m *AuthUserListResponse) String() string { return proto.CompactTextString(m) } func (*AuthUserListResponse) ProtoMessage() {} func (*AuthUserListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{91} + return fileDescriptor_77a6da22d6a3feb1, []int{93} } func (m *AuthUserListResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5915,7 +6076,7 @@ func (m *AuthRoleDeleteResponse) Reset() { *m = AuthRoleDeleteResponse{} func (m *AuthRoleDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleDeleteResponse) ProtoMessage() {} func (*AuthRoleDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{92} + return fileDescriptor_77a6da22d6a3feb1, []int{94} } func (m *AuthRoleDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5962,7 +6123,7 @@ func (m *AuthRoleGrantPermissionResponse) Reset() { *m = AuthRoleGrantPe func (m *AuthRoleGrantPermissionResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleGrantPermissionResponse) ProtoMessage() {} func (*AuthRoleGrantPermissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{93} + return fileDescriptor_77a6da22d6a3feb1, []int{95} } func (m *AuthRoleGrantPermissionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6009,7 +6170,7 @@ func (m *AuthRoleRevokePermissionResponse) Reset() { *m = AuthRoleRevoke func (m *AuthRoleRevokePermissionResponse) String() string { return proto.CompactTextString(m) } func (*AuthRoleRevokePermissionResponse) ProtoMessage() {} func (*AuthRoleRevokePermissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{94} + return fileDescriptor_77a6da22d6a3feb1, []int{96} } func (m *AuthRoleRevokePermissionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6113,8 +6274,10 @@ func init() { proto.RegisterType((*AlarmResponse)(nil), "etcdserverpb.AlarmResponse") proto.RegisterType((*DowngradeRequest)(nil), "etcdserverpb.DowngradeRequest") proto.RegisterType((*DowngradeResponse)(nil), "etcdserverpb.DowngradeResponse") + proto.RegisterType((*DowngradeVersionTestRequest)(nil), "etcdserverpb.DowngradeVersionTestRequest") proto.RegisterType((*StatusRequest)(nil), "etcdserverpb.StatusRequest") proto.RegisterType((*StatusResponse)(nil), "etcdserverpb.StatusResponse") + proto.RegisterType((*DowngradeInfo)(nil), "etcdserverpb.DowngradeInfo") proto.RegisterType((*AuthEnableRequest)(nil), "etcdserverpb.AuthEnableRequest") proto.RegisterType((*AuthDisableRequest)(nil), "etcdserverpb.AuthDisableRequest") proto.RegisterType((*AuthStatusRequest)(nil), "etcdserverpb.AuthStatusRequest") @@ -6154,264 +6317,293 @@ func init() { func init() { proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) } var fileDescriptor_77a6da22d6a3feb1 = []byte{ - // 4110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5b, 0xdd, 0x73, 0x1b, 0xc9, - 0x71, 0xe7, 0x02, 0x24, 0x01, 0x34, 0x3e, 0x08, 0x0e, 0x29, 0x0a, 0xc2, 0x49, 0x14, 0x6f, 0x74, - 0xd2, 0xf1, 0xa4, 0x3b, 0xe2, 0x4c, 0xdb, 0xb9, 0x2a, 0x25, 0x71, 0x0c, 0x91, 0x38, 0x89, 0x47, - 0x8a, 0xe4, 0x2d, 0x21, 0xdd, 0x47, 0xb9, 0xc2, 0x5a, 0x02, 0x23, 0x72, 0x43, 0x60, 0x17, 0xde, - 0x5d, 0x40, 0xe4, 0xe5, 0xc3, 0x2e, 0x97, 0xe3, 0x4a, 0x5e, 0xed, 0xaa, 0x54, 0xf2, 0x90, 0xbc, - 0xa4, 0x52, 0x2e, 0x3f, 0xf8, 0x39, 0xff, 0x42, 0x9e, 0xf2, 0x51, 0xf9, 0x07, 0x52, 0x17, 0xbf, - 0x24, 0x7f, 0x85, 0x6b, 0xbe, 0x76, 0x67, 0xf6, 0x83, 0x92, 0x8d, 0xbb, 0x7b, 0x11, 0x31, 0x3d, - 0x3d, 0xfd, 0xeb, 0xe9, 0x99, 0xe9, 0xee, 0xe9, 0x59, 0x41, 0xc9, 0x1b, 0xf5, 0x36, 0x46, 0x9e, - 0x1b, 0xb8, 0xa8, 0x42, 0x82, 0x5e, 0xdf, 0x27, 0xde, 0x84, 0x78, 0xa3, 0x93, 0xe6, 0xf2, 0xa9, - 0x7b, 0xea, 0xb2, 0x8e, 0x16, 0xfd, 0xc5, 0x79, 0x9a, 0x0d, 0xca, 0xd3, 0xb2, 0x46, 0x76, 0x6b, - 0x38, 0xe9, 0xf5, 0x46, 0x27, 0xad, 0xf3, 0x89, 0xe8, 0x69, 0x86, 0x3d, 0xd6, 0x38, 0x38, 0x1b, - 0x9d, 0xb0, 0x3f, 0xa2, 0xef, 0xe6, 0xa9, 0xeb, 0x9e, 0x0e, 0x08, 0xef, 0x75, 0x1c, 0x37, 0xb0, - 0x02, 0xdb, 0x75, 0x7c, 0xde, 0x8b, 0xff, 0xda, 0x80, 0x9a, 0x49, 0xfc, 0x91, 0xeb, 0xf8, 0xe4, - 0x09, 0xb1, 0xfa, 0xc4, 0x43, 0xb7, 0x00, 0x7a, 0x83, 0xb1, 0x1f, 0x10, 0xef, 0xd8, 0xee, 0x37, - 0x8c, 0x35, 0x63, 0x7d, 0xd6, 0x2c, 0x09, 0xca, 0x4e, 0x1f, 0xbd, 0x01, 0xa5, 0x21, 0x19, 0x9e, - 0xf0, 0xde, 0x1c, 0xeb, 0x2d, 0x72, 0xc2, 0x4e, 0x1f, 0x35, 0xa1, 0xe8, 0x91, 0x89, 0xed, 0xdb, - 0xae, 0xd3, 0xc8, 0xaf, 0x19, 0xeb, 0x79, 0x33, 0x6c, 0xd3, 0x81, 0x9e, 0xf5, 0x22, 0x38, 0x0e, - 0x88, 0x37, 0x6c, 0xcc, 0xf2, 0x81, 0x94, 0xd0, 0x25, 0xde, 0x10, 0xff, 0x74, 0x0e, 0x2a, 0xa6, - 0xe5, 0x9c, 0x12, 0x93, 0xfc, 0x70, 0x4c, 0xfc, 0x00, 0xd5, 0x21, 0x7f, 0x4e, 0x2e, 0x19, 0x7c, - 0xc5, 0xa4, 0x3f, 0xf9, 0x78, 0xe7, 0x94, 0x1c, 0x13, 0x87, 0x03, 0x57, 0xe8, 0x78, 0xe7, 0x94, - 0x74, 0x9c, 0x3e, 0x5a, 0x86, 0xb9, 0x81, 0x3d, 0xb4, 0x03, 0x81, 0xca, 0x1b, 0x9a, 0x3a, 0xb3, - 0x31, 0x75, 0xb6, 0x00, 0x7c, 0xd7, 0x0b, 0x8e, 0x5d, 0xaf, 0x4f, 0xbc, 0xc6, 0xdc, 0x9a, 0xb1, - 0x5e, 0xdb, 0x7c, 0x6b, 0x43, 0x5d, 0x86, 0x0d, 0x55, 0xa1, 0x8d, 0x23, 0xd7, 0x0b, 0x0e, 0x28, - 0xaf, 0x59, 0xf2, 0xe5, 0x4f, 0xf4, 0x21, 0x94, 0x99, 0x90, 0xc0, 0xf2, 0x4e, 0x49, 0xd0, 0x98, - 0x67, 0x52, 0xee, 0xbe, 0x42, 0x4a, 0x97, 0x31, 0x9b, 0x0c, 0x9e, 0xff, 0x46, 0x18, 0x2a, 0x3e, - 0xf1, 0x6c, 0x6b, 0x60, 0x7f, 0x61, 0x9d, 0x0c, 0x48, 0xa3, 0xb0, 0x66, 0xac, 0x17, 0x4d, 0x8d, - 0x46, 0xe7, 0x7f, 0x4e, 0x2e, 0xfd, 0x63, 0xd7, 0x19, 0x5c, 0x36, 0x8a, 0x8c, 0xa1, 0x48, 0x09, - 0x07, 0xce, 0xe0, 0x92, 0x2d, 0x9a, 0x3b, 0x76, 0x02, 0xde, 0x5b, 0x62, 0xbd, 0x25, 0x46, 0x61, - 0xdd, 0xeb, 0x50, 0x1f, 0xda, 0xce, 0xf1, 0xd0, 0xed, 0x1f, 0x87, 0x06, 0x01, 0x66, 0x90, 0xda, - 0xd0, 0x76, 0x9e, 0xba, 0x7d, 0x53, 0x9a, 0x85, 0x72, 0x5a, 0x17, 0x3a, 0x67, 0x59, 0x70, 0x5a, - 0x17, 0x2a, 0xe7, 0x06, 0x2c, 0x51, 0x99, 0x3d, 0x8f, 0x58, 0x01, 0x89, 0x98, 0x2b, 0x8c, 0x79, - 0x71, 0x68, 0x3b, 0x5b, 0xac, 0x47, 0xe3, 0xb7, 0x2e, 0x12, 0xfc, 0x55, 0xc1, 0x6f, 0x5d, 0xe8, - 0xfc, 0x78, 0x03, 0x4a, 0xa1, 0xcd, 0x51, 0x11, 0x66, 0xf7, 0x0f, 0xf6, 0x3b, 0xf5, 0x19, 0x04, - 0x30, 0xdf, 0x3e, 0xda, 0xea, 0xec, 0x6f, 0xd7, 0x0d, 0x54, 0x86, 0xc2, 0x76, 0x87, 0x37, 0x72, - 0xf8, 0x11, 0x40, 0x64, 0x5d, 0x54, 0x80, 0xfc, 0x6e, 0xe7, 0xb3, 0xfa, 0x0c, 0xe5, 0x79, 0xde, - 0x31, 0x8f, 0x76, 0x0e, 0xf6, 0xeb, 0x06, 0x1d, 0xbc, 0x65, 0x76, 0xda, 0xdd, 0x4e, 0x3d, 0x47, - 0x39, 0x9e, 0x1e, 0x6c, 0xd7, 0xf3, 0xa8, 0x04, 0x73, 0xcf, 0xdb, 0x7b, 0xcf, 0x3a, 0xf5, 0x59, - 0xfc, 0x0b, 0x03, 0xaa, 0x62, 0xbd, 0xf8, 0x99, 0x40, 0xdf, 0x81, 0xf9, 0x33, 0x76, 0x2e, 0xd8, - 0x56, 0x2c, 0x6f, 0xde, 0x8c, 0x2d, 0xae, 0x76, 0x76, 0x4c, 0xc1, 0x8b, 0x30, 0xe4, 0xcf, 0x27, - 0x7e, 0x23, 0xb7, 0x96, 0x5f, 0x2f, 0x6f, 0xd6, 0x37, 0xf8, 0x79, 0xdd, 0xd8, 0x25, 0x97, 0xcf, - 0xad, 0xc1, 0x98, 0x98, 0xb4, 0x13, 0x21, 0x98, 0x1d, 0xba, 0x1e, 0x61, 0x3b, 0xb6, 0x68, 0xb2, - 0xdf, 0x74, 0x1b, 0xb3, 0x45, 0x13, 0xbb, 0x95, 0x37, 0xf0, 0xaf, 0x0c, 0x80, 0xc3, 0x71, 0x90, - 0x7d, 0x34, 0x96, 0x61, 0x6e, 0x42, 0x05, 0x8b, 0x63, 0xc1, 0x1b, 0xec, 0x4c, 0x10, 0xcb, 0x27, - 0xe1, 0x99, 0xa0, 0x0d, 0x74, 0x1d, 0x0a, 0x23, 0x8f, 0x4c, 0x8e, 0xcf, 0x27, 0x0c, 0xa4, 0x68, - 0xce, 0xd3, 0xe6, 0xee, 0x04, 0xbd, 0x09, 0x15, 0xfb, 0xd4, 0x71, 0x3d, 0x72, 0xcc, 0x65, 0xcd, - 0xb1, 0xde, 0x32, 0xa7, 0x31, 0xbd, 0x15, 0x16, 0x2e, 0x78, 0x5e, 0x65, 0xd9, 0xa3, 0x24, 0xec, - 0x40, 0x99, 0xa9, 0x3a, 0x95, 0xf9, 0xde, 0x89, 0x74, 0xcc, 0xb1, 0x61, 0x49, 0x13, 0x0a, 0xad, - 0xf1, 0x0f, 0x00, 0x6d, 0x93, 0x01, 0x09, 0xc8, 0x34, 0xde, 0x43, 0xb1, 0x49, 0x5e, 0xb5, 0x09, - 0xfe, 0xb9, 0x01, 0x4b, 0x9a, 0xf8, 0xa9, 0xa6, 0xd5, 0x80, 0x42, 0x9f, 0x09, 0xe3, 0x1a, 0xe4, - 0x4d, 0xd9, 0x44, 0x0f, 0xa0, 0x28, 0x14, 0xf0, 0x1b, 0xf9, 0x8c, 0x4d, 0x53, 0xe0, 0x3a, 0xf9, - 0xf8, 0x57, 0x39, 0x28, 0x89, 0x89, 0x1e, 0x8c, 0x50, 0x1b, 0xaa, 0x1e, 0x6f, 0x1c, 0xb3, 0xf9, - 0x08, 0x8d, 0x9a, 0xd9, 0x4e, 0xe8, 0xc9, 0x8c, 0x59, 0x11, 0x43, 0x18, 0x19, 0xfd, 0x21, 0x94, - 0xa5, 0x88, 0xd1, 0x38, 0x10, 0x26, 0x6f, 0xe8, 0x02, 0xa2, 0xfd, 0xf7, 0x64, 0xc6, 0x04, 0xc1, - 0x7e, 0x38, 0x0e, 0x50, 0x17, 0x96, 0xe5, 0x60, 0x3e, 0x1b, 0xa1, 0x46, 0x9e, 0x49, 0x59, 0xd3, - 0xa5, 0x24, 0x97, 0xea, 0xc9, 0x8c, 0x89, 0xc4, 0x78, 0xa5, 0x53, 0x55, 0x29, 0xb8, 0xe0, 0xce, - 0x3b, 0xa1, 0x52, 0xf7, 0xc2, 0x49, 0xaa, 0xd4, 0xbd, 0x70, 0x1e, 0x95, 0xa0, 0x20, 0x5a, 0xf8, - 0x5f, 0x73, 0x00, 0x72, 0x35, 0x0e, 0x46, 0x68, 0x1b, 0x6a, 0x9e, 0x68, 0x69, 0xd6, 0x7a, 0x23, - 0xd5, 0x5a, 0x62, 0x11, 0x67, 0xcc, 0xaa, 0x1c, 0xc4, 0x95, 0xfb, 0x1e, 0x54, 0x42, 0x29, 0x91, - 0xc1, 0x6e, 0xa4, 0x18, 0x2c, 0x94, 0x50, 0x96, 0x03, 0xa8, 0xc9, 0x3e, 0x81, 0x6b, 0xe1, 0xf8, - 0x14, 0x9b, 0xbd, 0x79, 0x85, 0xcd, 0x42, 0x81, 0x4b, 0x52, 0x82, 0x6a, 0x35, 0x55, 0xb1, 0xc8, - 0x6c, 0x37, 0x52, 0xcc, 0x96, 0x54, 0x8c, 0x1a, 0x0e, 0x68, 0xbc, 0xe4, 0x4d, 0xfc, 0x7f, 0x79, - 0x28, 0x6c, 0xb9, 0xc3, 0x91, 0xe5, 0xd1, 0xd5, 0x98, 0xf7, 0x88, 0x3f, 0x1e, 0x04, 0xcc, 0x5c, - 0xb5, 0xcd, 0x3b, 0xba, 0x44, 0xc1, 0x26, 0xff, 0x9a, 0x8c, 0xd5, 0x14, 0x43, 0xe8, 0x60, 0x11, - 0x1e, 0x73, 0xaf, 0x31, 0x58, 0x04, 0x47, 0x31, 0x44, 0x1e, 0xe4, 0x7c, 0x74, 0x90, 0x9b, 0x50, - 0x98, 0x10, 0x2f, 0x0a, 0xe9, 0x4f, 0x66, 0x4c, 0x49, 0x40, 0xef, 0xc0, 0x42, 0x3c, 0xbc, 0xcc, - 0x09, 0x9e, 0x5a, 0x4f, 0x8f, 0x46, 0x77, 0xa0, 0xa2, 0xc5, 0xb8, 0x79, 0xc1, 0x57, 0x1e, 0x2a, - 0x21, 0x6e, 0x45, 0xfa, 0x55, 0x1a, 0x8f, 0x2b, 0x4f, 0x66, 0xa4, 0x67, 0x5d, 0x91, 0x9e, 0xb5, - 0x28, 0x46, 0x09, 0xdf, 0xaa, 0x39, 0x99, 0xef, 0xeb, 0x4e, 0x06, 0x7f, 0x1f, 0xaa, 0x9a, 0x81, - 0x68, 0xdc, 0xe9, 0x7c, 0xfc, 0xac, 0xbd, 0xc7, 0x83, 0xd4, 0x63, 0x16, 0x97, 0xcc, 0xba, 0x41, - 0x63, 0xdd, 0x5e, 0xe7, 0xe8, 0xa8, 0x9e, 0x43, 0x55, 0x28, 0xed, 0x1f, 0x74, 0x8f, 0x39, 0x57, - 0x1e, 0x3f, 0x0e, 0x25, 0x88, 0x20, 0xa7, 0xc4, 0xb6, 0x19, 0x25, 0xb6, 0x19, 0x32, 0xb6, 0xe5, - 0xa2, 0xd8, 0xc6, 0xc2, 0xdc, 0x5e, 0xa7, 0x7d, 0xd4, 0xa9, 0xcf, 0x3e, 0xaa, 0x41, 0x85, 0xdb, - 0xf7, 0x78, 0xec, 0xd0, 0x50, 0xfb, 0xcf, 0x06, 0x40, 0x74, 0x9a, 0x50, 0x0b, 0x0a, 0x3d, 0x8e, - 0xd3, 0x30, 0x98, 0x33, 0xba, 0x96, 0xba, 0x64, 0xa6, 0xe4, 0x42, 0xdf, 0x82, 0x82, 0x3f, 0xee, - 0xf5, 0x88, 0x2f, 0x43, 0xde, 0xf5, 0xb8, 0x3f, 0x14, 0xde, 0xca, 0x94, 0x7c, 0x74, 0xc8, 0x0b, - 0xcb, 0x1e, 0x8c, 0x59, 0x00, 0xbc, 0x7a, 0x88, 0xe0, 0xc3, 0xff, 0x60, 0x40, 0x59, 0xd9, 0xbc, - 0xbf, 0xa7, 0x13, 0xbe, 0x09, 0x25, 0xa6, 0x03, 0xe9, 0x0b, 0x37, 0x5c, 0x34, 0x23, 0x02, 0xfa, - 0x03, 0x28, 0xc9, 0x13, 0x20, 0x3d, 0x71, 0x23, 0x5d, 0xec, 0xc1, 0xc8, 0x8c, 0x58, 0xf1, 0x2e, - 0x2c, 0x32, 0xab, 0xf4, 0x68, 0x72, 0x2d, 0xed, 0xa8, 0xa6, 0x9f, 0x46, 0x2c, 0xfd, 0x6c, 0x42, - 0x71, 0x74, 0x76, 0xe9, 0xdb, 0x3d, 0x6b, 0x20, 0xb4, 0x08, 0xdb, 0xf8, 0x23, 0x40, 0xaa, 0xb0, - 0x69, 0xa6, 0x8b, 0xab, 0x50, 0x7e, 0x62, 0xf9, 0x67, 0x42, 0x25, 0xfc, 0x00, 0xaa, 0xb4, 0xb9, - 0xfb, 0xfc, 0x35, 0x74, 0x64, 0x97, 0x03, 0xc9, 0x3d, 0x95, 0xcd, 0x11, 0xcc, 0x9e, 0x59, 0xfe, - 0x19, 0x9b, 0x68, 0xd5, 0x64, 0xbf, 0xd1, 0x3b, 0x50, 0xef, 0xf1, 0x49, 0x1e, 0xc7, 0xae, 0x0c, - 0x0b, 0x82, 0x1e, 0x66, 0x82, 0x9f, 0x42, 0x85, 0xcf, 0xe1, 0xab, 0x56, 0x02, 0x2f, 0xc2, 0xc2, - 0x91, 0x63, 0x8d, 0xfc, 0x33, 0x57, 0x46, 0x37, 0x3a, 0xe9, 0x7a, 0x44, 0x9b, 0x0a, 0xf1, 0x6d, - 0x58, 0xf0, 0xc8, 0xd0, 0xb2, 0x1d, 0xdb, 0x39, 0x3d, 0x3e, 0xb9, 0x0c, 0x88, 0x2f, 0x2e, 0x4c, - 0xb5, 0x90, 0xfc, 0x88, 0x52, 0xa9, 0x6a, 0x27, 0x03, 0xf7, 0x44, 0xb8, 0x39, 0xf6, 0x1b, 0xff, - 0x2c, 0x07, 0x95, 0x4f, 0xac, 0xa0, 0x27, 0x97, 0x0e, 0xed, 0x40, 0x2d, 0x74, 0x6e, 0x8c, 0x22, - 0x74, 0x89, 0x85, 0x58, 0x36, 0x46, 0xa6, 0xd2, 0x32, 0x3a, 0x56, 0x7b, 0x2a, 0x81, 0x89, 0xb2, - 0x9c, 0x1e, 0x19, 0x84, 0xa2, 0x72, 0xd9, 0xa2, 0x18, 0xa3, 0x2a, 0x4a, 0x25, 0xa0, 0x03, 0xa8, - 0x8f, 0x3c, 0xf7, 0xd4, 0x23, 0xbe, 0x1f, 0x0a, 0xe3, 0x61, 0x0c, 0xa7, 0x08, 0x3b, 0x14, 0xac, - 0x91, 0xb8, 0x85, 0x91, 0x4e, 0x7a, 0xb4, 0x10, 0xe5, 0x33, 0xdc, 0x39, 0xfd, 0x57, 0x0e, 0x50, - 0x72, 0x52, 0xbf, 0x6b, 0x8a, 0x77, 0x17, 0x6a, 0x7e, 0x60, 0x79, 0x89, 0xcd, 0x56, 0x65, 0xd4, - 0xd0, 0xe3, 0xbf, 0x0d, 0xa1, 0x42, 0xc7, 0x8e, 0x1b, 0xd8, 0x2f, 0x2e, 0x45, 0x96, 0x5c, 0x93, - 0xe4, 0x7d, 0x46, 0x45, 0x1d, 0x28, 0xbc, 0xb0, 0x07, 0x01, 0xf1, 0xfc, 0xc6, 0xdc, 0x5a, 0x7e, - 0xbd, 0xb6, 0xf9, 0xe0, 0x55, 0xcb, 0xb0, 0xf1, 0x21, 0xe3, 0xef, 0x5e, 0x8e, 0x88, 0x29, 0xc7, - 0xaa, 0x99, 0xe7, 0xbc, 0x96, 0x8d, 0xdf, 0x80, 0xe2, 0x4b, 0x2a, 0x82, 0xde, 0xb2, 0x0b, 0x3c, - 0x59, 0x64, 0x6d, 0x7e, 0xc9, 0x7e, 0xe1, 0x59, 0xa7, 0x43, 0xe2, 0x04, 0xf2, 0x1e, 0x28, 0xdb, - 0xf8, 0x2e, 0x40, 0x04, 0x43, 0x5d, 0xfe, 0xfe, 0xc1, 0xe1, 0xb3, 0x6e, 0x7d, 0x06, 0x55, 0xa0, - 0xb8, 0x7f, 0xb0, 0xdd, 0xd9, 0xeb, 0xd0, 0xf8, 0x80, 0x5b, 0xd2, 0xa4, 0xda, 0x5a, 0xaa, 0x98, - 0x86, 0x86, 0x89, 0x57, 0x60, 0x39, 0x6d, 0x01, 0x69, 0x2e, 0x5a, 0x15, 0xbb, 0x74, 0xaa, 0xa3, - 0xa2, 0x42, 0xe7, 0xf4, 0xe9, 0x36, 0xa0, 0xc0, 0x77, 0x6f, 0x5f, 0x24, 0xe7, 0xb2, 0x49, 0x0d, - 0xc1, 0x37, 0x23, 0xe9, 0x8b, 0x55, 0x0a, 0xdb, 0xa9, 0xee, 0x65, 0x2e, 0xd5, 0xbd, 0xa0, 0x3b, - 0x50, 0x0d, 0x4f, 0x83, 0xe5, 0x8b, 0x5c, 0xa0, 0x64, 0x56, 0xe4, 0x46, 0xa7, 0x34, 0xcd, 0xe8, - 0x05, 0xdd, 0xe8, 0xe8, 0x2e, 0xcc, 0x93, 0x09, 0x71, 0x02, 0xbf, 0x51, 0x66, 0x11, 0xa3, 0x2a, - 0x73, 0xf7, 0x0e, 0xa5, 0x9a, 0xa2, 0x13, 0x7f, 0x17, 0x16, 0xd9, 0x1d, 0xe9, 0xb1, 0x67, 0x39, - 0xea, 0x65, 0xae, 0xdb, 0xdd, 0x13, 0xe6, 0xa6, 0x3f, 0x51, 0x0d, 0x72, 0x3b, 0xdb, 0xc2, 0x08, - 0xb9, 0x9d, 0x6d, 0xfc, 0x13, 0x03, 0x90, 0x3a, 0x6e, 0x2a, 0x3b, 0xc7, 0x84, 0x4b, 0xf8, 0x7c, - 0x04, 0xbf, 0x0c, 0x73, 0xc4, 0xf3, 0x5c, 0x8f, 0x59, 0xb4, 0x64, 0xf2, 0x06, 0x7e, 0x4b, 0xe8, - 0x60, 0x92, 0x89, 0x7b, 0x1e, 0x9e, 0x41, 0x2e, 0xcd, 0x08, 0x55, 0xdd, 0x85, 0x25, 0x8d, 0x6b, - 0xaa, 0xc8, 0xf5, 0x21, 0x2c, 0x30, 0x61, 0x5b, 0x67, 0xa4, 0x77, 0x3e, 0x72, 0x6d, 0x27, 0x81, - 0x47, 0x57, 0x2e, 0x72, 0xb0, 0x74, 0x1e, 0x7c, 0x62, 0x95, 0x90, 0xd8, 0xed, 0xee, 0xe1, 0xcf, - 0x60, 0x25, 0x26, 0x47, 0xaa, 0xff, 0x27, 0x50, 0xee, 0x85, 0x44, 0x5f, 0xe4, 0x3a, 0xb7, 0x74, - 0xe5, 0xe2, 0x43, 0xd5, 0x11, 0xf8, 0x00, 0xae, 0x27, 0x44, 0x4f, 0x35, 0xe7, 0xb7, 0xe1, 0x1a, - 0x13, 0xb8, 0x4b, 0xc8, 0xa8, 0x3d, 0xb0, 0x27, 0x99, 0x96, 0x1e, 0x89, 0x49, 0x29, 0x8c, 0x5f, - 0xef, 0xbe, 0xc0, 0x7f, 0x24, 0x10, 0xbb, 0xf6, 0x90, 0x74, 0xdd, 0xbd, 0x6c, 0xdd, 0x68, 0x34, - 0x3b, 0x27, 0x97, 0xbe, 0x48, 0x6b, 0xd8, 0x6f, 0xfc, 0x2f, 0x86, 0x30, 0x95, 0x3a, 0xfc, 0x6b, - 0xde, 0xc9, 0xab, 0x00, 0xa7, 0xf4, 0xc8, 0x90, 0x3e, 0xed, 0xe0, 0x15, 0x15, 0x85, 0x12, 0xea, - 0x49, 0xfd, 0x77, 0x45, 0xe8, 0xb9, 0x2c, 0xf6, 0x39, 0xfb, 0x27, 0xf4, 0x72, 0xb7, 0xa0, 0xcc, - 0x08, 0x47, 0x81, 0x15, 0x8c, 0xfd, 0xc4, 0x62, 0xfc, 0x95, 0xd8, 0xf6, 0x72, 0xd0, 0x54, 0xf3, - 0xfa, 0x16, 0xcc, 0xb3, 0xcb, 0x84, 0x4c, 0xa5, 0x6f, 0xa4, 0xec, 0x47, 0xae, 0x87, 0x29, 0x18, - 0xf1, 0xcf, 0x0c, 0x98, 0x7f, 0xca, 0x4a, 0xb0, 0x8a, 0x6a, 0xb3, 0x72, 0x2d, 0x1c, 0x6b, 0xc8, - 0x0b, 0x43, 0x25, 0x93, 0xfd, 0x66, 0xa9, 0x27, 0x21, 0xde, 0x33, 0x73, 0x8f, 0xa7, 0xb8, 0x25, - 0x33, 0x6c, 0x53, 0x9b, 0xf5, 0x06, 0x36, 0x71, 0x02, 0xd6, 0x3b, 0xcb, 0x7a, 0x15, 0x0a, 0xcd, - 0x9e, 0x6d, 0x7f, 0x8f, 0x58, 0x9e, 0x23, 0x8a, 0xa6, 0x45, 0x33, 0x22, 0xe0, 0x3d, 0xa8, 0x73, - 0x3d, 0xda, 0xfd, 0xbe, 0x92, 0x60, 0x86, 0x68, 0x46, 0x0c, 0x4d, 0x93, 0x96, 0x8b, 0x4b, 0xfb, - 0xa5, 0x01, 0x8b, 0x8a, 0xb8, 0xa9, 0xac, 0xfa, 0x2e, 0xcc, 0xf3, 0x22, 0xb5, 0xc8, 0x74, 0x96, - 0xf5, 0x51, 0x1c, 0xc6, 0x14, 0x3c, 0x68, 0x03, 0x0a, 0xfc, 0x97, 0xbc, 0x03, 0xa4, 0xb3, 0x4b, - 0x26, 0x7c, 0x17, 0x96, 0x04, 0x89, 0x0c, 0xdd, 0xb4, 0x83, 0xc1, 0x16, 0x03, 0xff, 0x05, 0x2c, - 0xeb, 0x6c, 0x53, 0x4d, 0x49, 0x51, 0x32, 0xf7, 0x3a, 0x4a, 0xb6, 0xa5, 0x92, 0xcf, 0x46, 0x7d, - 0x25, 0x8f, 0x8a, 0xef, 0x18, 0x75, 0xbd, 0x72, 0xfa, 0x7a, 0x45, 0x13, 0x90, 0x22, 0xbe, 0xd1, - 0x09, 0x7c, 0x20, 0xb7, 0xc3, 0x9e, 0xed, 0x87, 0x3e, 0x1c, 0x43, 0x65, 0x60, 0x3b, 0xc4, 0xf2, - 0x44, 0xe5, 0xdc, 0xe0, 0x95, 0x73, 0x95, 0x86, 0xbf, 0x00, 0xa4, 0x0e, 0xfc, 0x46, 0x95, 0xbe, - 0x27, 0x4d, 0x76, 0xe8, 0xb9, 0x43, 0x37, 0xd3, 0xec, 0xf8, 0x2f, 0xe1, 0x5a, 0x8c, 0xef, 0x1b, - 0x55, 0x73, 0x09, 0x16, 0xb7, 0x89, 0x4c, 0x68, 0xa4, 0xdb, 0xfb, 0x08, 0x90, 0x4a, 0x9c, 0x2a, - 0xb2, 0xb5, 0x60, 0xf1, 0xa9, 0x3b, 0xa1, 0x2e, 0x92, 0x52, 0x23, 0xdf, 0xc0, 0xeb, 0x10, 0xa1, - 0x29, 0xc2, 0x36, 0x05, 0x57, 0x07, 0x4c, 0x05, 0xfe, 0x1f, 0x06, 0x54, 0xda, 0x03, 0xcb, 0x1b, - 0x4a, 0xe0, 0xef, 0xc1, 0x3c, 0xbf, 0x5d, 0x8b, 0x82, 0xd6, 0x3d, 0x5d, 0x8c, 0xca, 0xcb, 0x1b, - 0x6d, 0x7e, 0x17, 0x17, 0xa3, 0xa8, 0xe2, 0xe2, 0xcd, 0x6b, 0x3b, 0xf6, 0x06, 0xb6, 0x8d, 0xde, - 0x83, 0x39, 0x8b, 0x0e, 0x61, 0xa1, 0xa8, 0x16, 0xaf, 0x6b, 0x30, 0x69, 0xec, 0x0e, 0xc0, 0xb9, - 0xf0, 0x77, 0xa0, 0xac, 0x20, 0xa0, 0x02, 0xe4, 0x1f, 0x77, 0x44, 0xc2, 0xde, 0xde, 0xea, 0xee, - 0x3c, 0xe7, 0x05, 0x9d, 0x1a, 0xc0, 0x76, 0x27, 0x6c, 0xe7, 0xf0, 0xa7, 0x62, 0x94, 0x70, 0xfb, - 0xaa, 0x3e, 0x46, 0x96, 0x3e, 0xb9, 0xd7, 0xd2, 0xe7, 0x02, 0xaa, 0x62, 0xfa, 0xd3, 0x86, 0x31, - 0x26, 0x2f, 0x23, 0x8c, 0x29, 0xca, 0x9b, 0x82, 0x11, 0xff, 0xda, 0x80, 0xfa, 0xb6, 0xfb, 0xd2, - 0x39, 0xf5, 0xac, 0x7e, 0x78, 0x4e, 0x3e, 0x8c, 0xad, 0xd4, 0x46, 0xac, 0x38, 0x1a, 0xe3, 0x8f, - 0x08, 0xb1, 0x15, 0x6b, 0x44, 0x65, 0x43, 0x1e, 0x0b, 0x65, 0x13, 0x7f, 0x00, 0x0b, 0xb1, 0x41, - 0xd4, 0xf6, 0xcf, 0xdb, 0x7b, 0x3b, 0xdb, 0xd4, 0xd6, 0xac, 0xb0, 0xd6, 0xd9, 0x6f, 0x3f, 0xda, - 0xeb, 0x88, 0x07, 0xa4, 0xf6, 0xfe, 0x56, 0x67, 0xaf, 0x9e, 0xc3, 0x3d, 0x58, 0x54, 0xe0, 0xa7, - 0x7d, 0x19, 0xc8, 0xd0, 0x6e, 0x01, 0xaa, 0x22, 0xda, 0x8b, 0x43, 0xf9, 0xef, 0x39, 0xa8, 0x49, - 0xca, 0xd7, 0x83, 0x89, 0x56, 0x60, 0xbe, 0x7f, 0x72, 0x64, 0x7f, 0x21, 0x5f, 0x8e, 0x44, 0x8b, - 0xd2, 0x07, 0x1c, 0x87, 0x3f, 0xdf, 0x8a, 0x16, 0x0d, 0xe3, 0x9e, 0xf5, 0x22, 0xd8, 0x71, 0xfa, - 0xe4, 0x82, 0x25, 0x05, 0xb3, 0x66, 0x44, 0x60, 0x15, 0x26, 0xf1, 0xcc, 0xcb, 0x6e, 0x56, 0xca, - 0xb3, 0x2f, 0xba, 0x0f, 0x75, 0xfa, 0xbb, 0x3d, 0x1a, 0x0d, 0x6c, 0xd2, 0xe7, 0x02, 0x0a, 0x8c, - 0x27, 0x41, 0xa7, 0xe8, 0xec, 0x2e, 0xe2, 0x37, 0x8a, 0x2c, 0x2c, 0x89, 0x16, 0x5a, 0x83, 0x32, - 0xd7, 0x6f, 0xc7, 0x79, 0xe6, 0x13, 0xf6, 0xf6, 0x99, 0x37, 0x55, 0x92, 0x9e, 0x66, 0x40, 0x3c, - 0xcd, 0x58, 0x82, 0xc5, 0xf6, 0x38, 0x38, 0xeb, 0x38, 0x34, 0x56, 0x48, 0x2b, 0x2f, 0x03, 0xa2, - 0xc4, 0x6d, 0xdb, 0x57, 0xa9, 0x82, 0x55, 0x5f, 0x90, 0x0e, 0x2c, 0x51, 0x22, 0x71, 0x02, 0xbb, - 0xa7, 0xc4, 0x55, 0x99, 0x79, 0x19, 0xb1, 0xcc, 0xcb, 0xf2, 0xfd, 0x97, 0xae, 0xd7, 0x17, 0x36, - 0x0f, 0xdb, 0xf8, 0x9f, 0x0c, 0x0e, 0xf9, 0xcc, 0xd7, 0xd2, 0xa7, 0xdf, 0x51, 0x0c, 0x7a, 0x1f, - 0x0a, 0xee, 0x88, 0xbd, 0xf0, 0x8b, 0x32, 0xcc, 0xca, 0x06, 0xff, 0x26, 0x60, 0x43, 0x08, 0x3e, - 0xe0, 0xbd, 0xa6, 0x64, 0x43, 0xf7, 0xa0, 0x76, 0x66, 0xf9, 0x67, 0xa4, 0x7f, 0x28, 0x65, 0xf2, - 0x9b, 0x5f, 0x8c, 0x8a, 0xd7, 0x23, 0xfd, 0x1e, 0x93, 0xe0, 0x0a, 0xfd, 0xf0, 0x03, 0xb8, 0x26, - 0x39, 0xc5, 0xeb, 0xc4, 0x15, 0xcc, 0x2f, 0xe1, 0x96, 0x64, 0xde, 0x3a, 0xb3, 0x9c, 0x53, 0x22, - 0x01, 0x7f, 0x5f, 0x0b, 0x24, 0xe7, 0x93, 0x4f, 0x9d, 0xcf, 0x23, 0x68, 0x84, 0xf3, 0x61, 0x37, - 0x6b, 0x77, 0xa0, 0x2a, 0x3a, 0xf6, 0xc5, 0x79, 0x2a, 0x99, 0xec, 0x37, 0xa5, 0x79, 0xee, 0x20, - 0x4c, 0xa5, 0xe9, 0x6f, 0xbc, 0x05, 0x37, 0xa4, 0x0c, 0x71, 0xe7, 0xd5, 0x85, 0x24, 0x14, 0x4f, - 0x13, 0x22, 0x0c, 0x4b, 0x87, 0x5e, 0xbd, 0xf0, 0x2a, 0xa7, 0xbe, 0x04, 0x4c, 0xa6, 0xa1, 0xc8, - 0xbc, 0xc6, 0x37, 0x25, 0x55, 0x4c, 0xc9, 0x96, 0x24, 0x99, 0x0a, 0x50, 0xc9, 0x62, 0xc1, 0x28, - 0x39, 0xb1, 0x60, 0x09, 0xd1, 0x3f, 0x80, 0xd5, 0x50, 0x09, 0x6a, 0xb7, 0x43, 0xe2, 0x0d, 0x6d, - 0xdf, 0x57, 0xea, 0xde, 0x69, 0x13, 0xbf, 0x07, 0xb3, 0x23, 0x22, 0x82, 0x50, 0x79, 0x13, 0xc9, - 0x4d, 0xa9, 0x0c, 0x66, 0xfd, 0xb8, 0x0f, 0xb7, 0xa5, 0x74, 0x6e, 0xd1, 0x54, 0xf1, 0x71, 0xa5, - 0x64, 0x35, 0x30, 0x97, 0x51, 0x0d, 0xcc, 0xc7, 0xde, 0x62, 0x3e, 0xe2, 0x86, 0x94, 0x67, 0x7e, - 0xaa, 0xe4, 0x62, 0x97, 0xdb, 0x34, 0x74, 0x15, 0x53, 0x09, 0xfb, 0x1b, 0xe1, 0x05, 0xbe, 0x2a, - 0x0f, 0x4f, 0xd8, 0x0c, 0xe5, 0x43, 0x87, 0x6c, 0xd2, 0xac, 0x99, 0x2e, 0x80, 0xa9, 0xd6, 0x42, - 0x67, 0x4d, 0x8d, 0x86, 0x4f, 0x60, 0x59, 0xf7, 0x6b, 0x53, 0xe9, 0xb2, 0x0c, 0x73, 0x81, 0x7b, - 0x4e, 0x64, 0xac, 0xe1, 0x0d, 0x69, 0xbb, 0xd0, 0xe7, 0x4d, 0x65, 0x3b, 0x2b, 0x12, 0xc6, 0x4e, - 0xc7, 0xb4, 0xfa, 0xd2, 0x8d, 0x25, 0xef, 0x40, 0xbc, 0x81, 0xf7, 0x61, 0x25, 0xee, 0xd9, 0xa6, - 0x52, 0xf9, 0x39, 0x3f, 0x4b, 0x69, 0xce, 0x6f, 0x2a, 0xb9, 0x1f, 0x47, 0x7e, 0x49, 0xf1, 0x6d, - 0x53, 0x89, 0x34, 0xa1, 0x99, 0xe6, 0xea, 0xbe, 0x8a, 0xa3, 0x13, 0x7a, 0xbe, 0xa9, 0x84, 0xf9, - 0x91, 0xb0, 0xe9, 0x97, 0x3f, 0x72, 0x57, 0xf9, 0x2b, 0xdd, 0x95, 0x38, 0x24, 0x91, 0x43, 0xfd, - 0x1a, 0x36, 0x9d, 0xc0, 0x88, 0x7c, 0xf9, 0xb4, 0x18, 0x34, 0x9c, 0x85, 0x18, 0xac, 0x21, 0x37, - 0xb6, 0x1a, 0x01, 0xa6, 0x5a, 0x8c, 0x4f, 0x22, 0x37, 0x9e, 0x08, 0x12, 0x53, 0x09, 0xfe, 0x14, - 0xd6, 0xb2, 0xe3, 0xc3, 0x34, 0x92, 0xef, 0xb7, 0xa0, 0x14, 0x5e, 0x86, 0x94, 0xef, 0xcd, 0xca, - 0x50, 0xd8, 0x3f, 0x38, 0x3a, 0x6c, 0x6f, 0x75, 0xf8, 0x07, 0x67, 0x5b, 0x07, 0xa6, 0xf9, 0xec, - 0xb0, 0x5b, 0xcf, 0x6d, 0xfe, 0x26, 0x0f, 0xb9, 0xdd, 0xe7, 0xe8, 0x33, 0x98, 0xe3, 0x5f, 0x5f, - 0x5c, 0xf1, 0xc9, 0x4d, 0xf3, 0xaa, 0x0f, 0x4c, 0xf0, 0xf5, 0x9f, 0xfc, 0xf7, 0x6f, 0x7e, 0x91, - 0x5b, 0xc4, 0x95, 0xd6, 0xe4, 0xdb, 0xad, 0xf3, 0x49, 0x8b, 0x85, 0xa9, 0x87, 0xc6, 0x7d, 0xf4, - 0x31, 0xe4, 0x0f, 0xc7, 0x01, 0xca, 0xfc, 0x14, 0xa7, 0x99, 0xfd, 0xcd, 0x09, 0xbe, 0xc6, 0x84, - 0x2e, 0x60, 0x10, 0x42, 0x47, 0xe3, 0x80, 0x8a, 0xfc, 0x21, 0x94, 0xd5, 0x2f, 0x46, 0x5e, 0xf9, - 0x7d, 0x4e, 0xf3, 0xd5, 0x5f, 0xa3, 0xe0, 0x5b, 0x0c, 0xea, 0x3a, 0x46, 0x02, 0x8a, 0x7f, 0xd3, - 0xa2, 0xce, 0xa2, 0x7b, 0xe1, 0xa0, 0xcc, 0xaf, 0x77, 0x9a, 0xd9, 0x1f, 0xa8, 0x24, 0x66, 0x11, - 0x5c, 0x38, 0x54, 0xe4, 0x9f, 0x89, 0x6f, 0x53, 0x7a, 0x01, 0xba, 0x9d, 0xf2, 0x6d, 0x82, 0xfa, - 0x0a, 0xdf, 0x5c, 0xcb, 0x66, 0x10, 0x20, 0x37, 0x19, 0xc8, 0x0a, 0x5e, 0x14, 0x20, 0xbd, 0x90, - 0xe5, 0xa1, 0x71, 0x7f, 0xb3, 0x07, 0x73, 0xec, 0x85, 0x0b, 0x7d, 0x2e, 0x7f, 0x34, 0x53, 0x9e, - 0xfa, 0x32, 0x16, 0x5a, 0x7b, 0x1b, 0xc3, 0xcb, 0x0c, 0xa8, 0x86, 0x4b, 0x14, 0x88, 0xbd, 0x6f, - 0x3d, 0x34, 0xee, 0xaf, 0x1b, 0xef, 0x1b, 0x9b, 0xbf, 0x9e, 0x83, 0x39, 0x56, 0xda, 0x45, 0xe7, - 0x00, 0xd1, 0x6b, 0x4f, 0x7c, 0x76, 0x89, 0xf7, 0xa3, 0xf8, 0xec, 0x92, 0x0f, 0x45, 0xb8, 0xc9, - 0x40, 0x97, 0xf1, 0x02, 0x05, 0x65, 0x15, 0xe3, 0x16, 0x2b, 0x82, 0x53, 0x3b, 0xfe, 0xad, 0x21, - 0x2a, 0xdb, 0xfc, 0x2c, 0xa1, 0x34, 0x69, 0xda, 0x93, 0x4f, 0x7c, 0x3b, 0xa4, 0x3c, 0xf7, 0xe0, - 0xef, 0x32, 0xc0, 0x16, 0xae, 0x47, 0x80, 0x1e, 0xe3, 0x78, 0x68, 0xdc, 0xff, 0xbc, 0x81, 0x97, - 0x84, 0x95, 0x63, 0x3d, 0xe8, 0x47, 0x50, 0xd3, 0x9f, 0x34, 0xd0, 0x9d, 0x14, 0xac, 0xf8, 0xcb, - 0x48, 0xf3, 0xad, 0xab, 0x99, 0x84, 0x4e, 0xab, 0x4c, 0x27, 0x01, 0xce, 0x91, 0xcf, 0x09, 0x19, - 0x59, 0x94, 0x49, 0xac, 0x01, 0xfa, 0x47, 0x43, 0xbc, 0x38, 0x45, 0x6f, 0x14, 0x28, 0x4d, 0x7a, - 0xe2, 0x05, 0xa4, 0x79, 0xf7, 0x15, 0x5c, 0x42, 0x89, 0x3f, 0x66, 0x4a, 0x7c, 0x80, 0x97, 0x23, - 0x25, 0x02, 0x7b, 0x48, 0x02, 0x57, 0x68, 0xf1, 0xf9, 0x4d, 0x7c, 0x5d, 0x33, 0x8e, 0xd6, 0x1b, - 0x2d, 0x16, 0x7f, 0x67, 0x48, 0x5d, 0x2c, 0xed, 0xdd, 0x22, 0x75, 0xb1, 0xf4, 0x47, 0x8a, 0xb4, - 0xc5, 0xe2, 0xaf, 0x0a, 0x69, 0x8b, 0x15, 0xf6, 0x6c, 0xfe, 0xff, 0x2c, 0x14, 0xb6, 0xf8, 0x37, - 0xe1, 0xc8, 0x85, 0x52, 0x58, 0xa6, 0x47, 0xab, 0x69, 0x75, 0xc6, 0xe8, 0x5a, 0xd3, 0xbc, 0x9d, - 0xd9, 0x2f, 0x14, 0x7a, 0x93, 0x29, 0xf4, 0x06, 0x5e, 0xa1, 0xc8, 0xe2, 0xb3, 0xf3, 0x16, 0x2f, - 0x66, 0xb5, 0xac, 0x7e, 0x9f, 0x1a, 0xe2, 0xcf, 0xa1, 0xa2, 0xd6, 0xd1, 0xd1, 0x9b, 0xa9, 0xb5, - 0x4d, 0xb5, 0x14, 0xdf, 0xc4, 0x57, 0xb1, 0x08, 0xe4, 0xb7, 0x18, 0xf2, 0x2a, 0xbe, 0x91, 0x82, - 0xec, 0x31, 0x56, 0x0d, 0x9c, 0xd7, 0xc0, 0xd3, 0xc1, 0xb5, 0x12, 0x7b, 0x3a, 0xb8, 0x5e, 0x42, - 0xbf, 0x12, 0x7c, 0xcc, 0x58, 0x29, 0xb8, 0x0f, 0x10, 0x55, 0xb2, 0x51, 0xaa, 0x2d, 0x95, 0x7b, - 0x5d, 0xdc, 0x39, 0x24, 0x8b, 0xe0, 0x18, 0x33, 0x58, 0xb1, 0xef, 0x62, 0xb0, 0x03, 0xdb, 0x0f, - 0xf8, 0xc1, 0xac, 0x6a, 0xa5, 0x69, 0x94, 0x3a, 0x1f, 0xbd, 0xbe, 0xdd, 0xbc, 0x73, 0x25, 0x8f, - 0x40, 0xbf, 0xcb, 0xd0, 0x6f, 0xe3, 0x66, 0x0a, 0xfa, 0x88, 0xf3, 0xd2, 0xcd, 0xf6, 0xe3, 0x02, - 0x94, 0x9f, 0x5a, 0xb6, 0x13, 0x10, 0xc7, 0x72, 0x7a, 0x04, 0x9d, 0xc0, 0x1c, 0x8b, 0xd4, 0x71, - 0x47, 0xac, 0x96, 0x6d, 0xe3, 0x8e, 0x58, 0xab, 0x69, 0xe2, 0x35, 0x06, 0xdc, 0xc4, 0xd7, 0x28, - 0xf0, 0x30, 0x12, 0xdd, 0x62, 0xa5, 0x48, 0x3a, 0xe9, 0x17, 0x30, 0x2f, 0x5e, 0xfb, 0x62, 0x82, - 0xb4, 0xe2, 0x4f, 0xf3, 0x66, 0x7a, 0x67, 0xda, 0x5e, 0x56, 0x61, 0x7c, 0xc6, 0x47, 0x71, 0x26, - 0x00, 0x51, 0x8d, 0x3d, 0xbe, 0xa2, 0x89, 0x92, 0x7c, 0x73, 0x2d, 0x9b, 0x21, 0xcd, 0xa6, 0x2a, - 0x66, 0x3f, 0xe4, 0xa5, 0xb8, 0x7f, 0x0a, 0xb3, 0x4f, 0x2c, 0xff, 0x0c, 0xc5, 0x62, 0xaf, 0xf2, - 0xad, 0x58, 0xb3, 0x99, 0xd6, 0x25, 0x50, 0x6e, 0x33, 0x94, 0x1b, 0xdc, 0x95, 0xa9, 0x28, 0x67, - 0x96, 0x7f, 0x26, 0xec, 0xc7, 0x3f, 0x1d, 0x8b, 0xdb, 0x4f, 0xfb, 0xfc, 0x2c, 0x6e, 0x3f, 0xfd, - 0x6b, 0xb3, 0x6c, 0xfb, 0x51, 0x94, 0xf3, 0x09, 0xc5, 0x19, 0x41, 0x51, 0x7e, 0xad, 0x85, 0x62, - 0x4f, 0xf7, 0xb1, 0x2f, 0xbb, 0x9a, 0xab, 0x59, 0xdd, 0x02, 0xed, 0x0e, 0x43, 0xbb, 0x85, 0x1b, - 0x89, 0xd5, 0x12, 0x9c, 0x0f, 0x8d, 0xfb, 0xef, 0x1b, 0xe8, 0x47, 0x00, 0xd1, 0xc3, 0x44, 0xe2, - 0x0c, 0xc6, 0xdf, 0x38, 0x12, 0x67, 0x30, 0xf1, 0xa6, 0x81, 0x37, 0x18, 0xee, 0x3a, 0xbe, 0x13, - 0xc7, 0x0d, 0x3c, 0xcb, 0xf1, 0x5f, 0x10, 0xef, 0x3d, 0x5e, 0x67, 0xf5, 0xcf, 0xec, 0x11, 0x9d, - 0xb2, 0x07, 0xa5, 0xb0, 0xee, 0x1c, 0xf7, 0xb7, 0xf1, 0x7a, 0x78, 0xdc, 0xdf, 0x26, 0x0a, 0xd6, - 0xba, 0xe3, 0xd1, 0xf6, 0x8b, 0x64, 0xa5, 0x47, 0xf0, 0x97, 0x75, 0x98, 0xa5, 0x79, 0x37, 0x4d, - 0x4f, 0xa2, 0xca, 0x49, 0x7c, 0xf6, 0x89, 0x3a, 0x6a, 0x7c, 0xf6, 0xc9, 0xa2, 0x8b, 0x9e, 0x9e, - 0xd0, 0x6b, 0x56, 0x8b, 0x17, 0x29, 0xe8, 0x4c, 0x5d, 0x28, 0x2b, 0xa5, 0x15, 0x94, 0x22, 0x4c, - 0x2f, 0xd0, 0xc6, 0x03, 0x5e, 0x4a, 0x5d, 0x06, 0xbf, 0xc1, 0xf0, 0xae, 0xf1, 0x80, 0xc7, 0xf0, - 0xfa, 0x9c, 0x83, 0x02, 0x8a, 0xd9, 0x89, 0x93, 0x9f, 0x32, 0x3b, 0xfd, 0xf4, 0xaf, 0x65, 0x33, - 0x64, 0xce, 0x2e, 0x3a, 0xfa, 0x2f, 0xa1, 0xa2, 0x16, 0x58, 0x50, 0x8a, 0xf2, 0xb1, 0xa2, 0x72, - 0x3c, 0x92, 0xa4, 0xd5, 0x67, 0x74, 0xdf, 0xc6, 0x20, 0x2d, 0x85, 0x8d, 0x02, 0x0f, 0xa0, 0x20, - 0x2a, 0x2e, 0x69, 0x26, 0xd5, 0x0b, 0xd0, 0x69, 0x26, 0x8d, 0x95, 0x6b, 0xf4, 0xfc, 0x99, 0x21, - 0xd2, 0x4b, 0xa5, 0x8c, 0xd6, 0x02, 0xed, 0x31, 0x09, 0xb2, 0xd0, 0xa2, 0x5a, 0x66, 0x16, 0x9a, - 0x72, 0xa1, 0xcf, 0x42, 0x3b, 0x25, 0x81, 0xf0, 0x07, 0xf2, 0xa2, 0x8c, 0x32, 0x84, 0xa9, 0x11, - 0x12, 0x5f, 0xc5, 0x92, 0x76, 0xbd, 0x89, 0x00, 0x65, 0x78, 0xbc, 0x00, 0x88, 0xea, 0x41, 0xf1, - 0x9c, 0x35, 0xb5, 0x0e, 0x1e, 0xcf, 0x59, 0xd3, 0x4b, 0x4a, 0xba, 0x8f, 0x8d, 0x70, 0xf9, 0xed, - 0x8a, 0x22, 0xff, 0xdc, 0x00, 0x94, 0x2c, 0x1d, 0xa1, 0x07, 0xe9, 0xd2, 0x53, 0xab, 0xeb, 0xcd, - 0x77, 0x5f, 0x8f, 0x39, 0xcd, 0x21, 0x47, 0x2a, 0xf5, 0x18, 0xf7, 0xe8, 0x25, 0x55, 0xea, 0xc7, - 0x06, 0x54, 0xb5, 0xba, 0x13, 0xba, 0x97, 0xb1, 0xa6, 0xb1, 0xa2, 0x7b, 0xf3, 0xed, 0x57, 0xf2, - 0xa5, 0x25, 0xf3, 0xca, 0x0e, 0x90, 0xb7, 0x9a, 0x9f, 0x1a, 0x50, 0xd3, 0xeb, 0x54, 0x28, 0x43, - 0x76, 0xa2, 0x68, 0xdf, 0x5c, 0x7f, 0x35, 0xe3, 0xd5, 0xcb, 0x13, 0x5d, 0x68, 0x06, 0x50, 0x10, - 0x95, 0xad, 0xb4, 0x8d, 0xaf, 0x97, 0xfb, 0xd3, 0x36, 0x7e, 0xac, 0x2c, 0x96, 0xb2, 0xf1, 0x3d, - 0x77, 0x40, 0x94, 0x63, 0x26, 0x4a, 0x5f, 0x59, 0x68, 0x57, 0x1f, 0xb3, 0x58, 0xdd, 0x2c, 0x0b, - 0x2d, 0x3a, 0x66, 0xb2, 0xe6, 0x85, 0x32, 0x84, 0xbd, 0xe2, 0x98, 0xc5, 0x4b, 0x66, 0x29, 0xc7, - 0x8c, 0x01, 0x2a, 0xc7, 0x2c, 0xaa, 0x4e, 0xa5, 0x1d, 0xb3, 0xc4, 0xeb, 0x45, 0xda, 0x31, 0x4b, - 0x16, 0xb8, 0x52, 0xd6, 0x91, 0xe1, 0x6a, 0xc7, 0x6c, 0x29, 0xa5, 0x90, 0x85, 0xde, 0xcd, 0x30, - 0x62, 0xea, 0xa3, 0x48, 0xf3, 0xbd, 0xd7, 0xe4, 0xce, 0xdc, 0xe3, 0xdc, 0xfc, 0x72, 0x8f, 0xff, - 0x9d, 0x01, 0xcb, 0x69, 0x45, 0x30, 0x94, 0x81, 0x93, 0xf1, 0x98, 0xd2, 0xdc, 0x78, 0x5d, 0xf6, - 0xab, 0xad, 0x15, 0xee, 0xfa, 0x47, 0xf5, 0x7f, 0xfb, 0x72, 0xd5, 0xf8, 0xcf, 0x2f, 0x57, 0x8d, - 0xff, 0xf9, 0x72, 0xd5, 0xf8, 0xfb, 0xff, 0x5d, 0x9d, 0x39, 0x99, 0x67, 0xff, 0xd5, 0xf8, 0xdb, - 0xbf, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x54, 0x11, 0xdf, 0xef, 0x3c, 0x00, 0x00, + // 4574 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x3c, 0x5d, 0x6f, 0x1b, 0x57, + 0x76, 0x1a, 0x92, 0x12, 0xc9, 0xc3, 0x0f, 0xd1, 0xd7, 0xb2, 0x4d, 0xd3, 0xb6, 0xac, 0x8c, 0xed, + 0xc4, 0x71, 0x62, 0xd1, 0x96, 0xec, 0x64, 0xeb, 0x22, 0xe9, 0xd2, 0x12, 0x63, 0x6b, 0x2d, 0x4b, + 0xca, 0x88, 0x76, 0x36, 0x2e, 0xb0, 0xea, 0x88, 0xbc, 0xa6, 0x66, 0x45, 0xce, 0x70, 0x67, 0x86, + 0xb4, 0x94, 0x3e, 0x6c, 0xba, 0xed, 0x76, 0xb1, 0x2d, 0xb0, 0x40, 0x53, 0xa0, 0x58, 0x14, 0xed, + 0x4b, 0x5b, 0xa0, 0x7d, 0x68, 0x8b, 0xf6, 0xa1, 0x0f, 0x45, 0x0b, 0xf4, 0xa1, 0x7d, 0x68, 0x1f, + 0x0a, 0x14, 0xe8, 0x1f, 0x68, 0xd3, 0x7d, 0xea, 0xaf, 0x58, 0xdc, 0xaf, 0xb9, 0x77, 0xbe, 0x24, + 0x67, 0xa5, 0x60, 0x5f, 0x62, 0xce, 0x3d, 0x9f, 0xf7, 0x9c, 0x7b, 0xcf, 0xb9, 0xf7, 0x9c, 0x1b, + 0x41, 0xd1, 0x1d, 0x75, 0x17, 0x47, 0xae, 0xe3, 0x3b, 0xa8, 0x8c, 0xfd, 0x6e, 0xcf, 0xc3, 0xee, + 0x04, 0xbb, 0xa3, 0xdd, 0xc6, 0x5c, 0xdf, 0xe9, 0x3b, 0x14, 0xd0, 0x24, 0xbf, 0x18, 0x4e, 0xa3, + 0x4e, 0x70, 0x9a, 0xe6, 0xc8, 0x6a, 0x0e, 0x27, 0xdd, 0xee, 0x68, 0xb7, 0xb9, 0x3f, 0xe1, 0x90, + 0x46, 0x00, 0x31, 0xc7, 0xfe, 0xde, 0x68, 0x97, 0xfe, 0xc3, 0x61, 0x0b, 0x01, 0x6c, 0x82, 0x5d, + 0xcf, 0x72, 0xec, 0xd1, 0xae, 0xf8, 0xc5, 0x31, 0x2e, 0xf7, 0x1d, 0xa7, 0x3f, 0xc0, 0x8c, 0xde, + 0xb6, 0x1d, 0xdf, 0xf4, 0x2d, 0xc7, 0xf6, 0x38, 0x94, 0xfd, 0xd3, 0xbd, 0xdd, 0xc7, 0xf6, 0x6d, + 0x67, 0x84, 0x6d, 0x73, 0x64, 0x4d, 0x96, 0x9a, 0xce, 0x88, 0xe2, 0xc4, 0xf1, 0xf5, 0x9f, 0x68, + 0x50, 0x35, 0xb0, 0x37, 0x72, 0x6c, 0x0f, 0x3f, 0xc6, 0x66, 0x0f, 0xbb, 0xe8, 0x0a, 0x40, 0x77, + 0x30, 0xf6, 0x7c, 0xec, 0xee, 0x58, 0xbd, 0xba, 0xb6, 0xa0, 0xdd, 0xcc, 0x19, 0x45, 0x3e, 0xb2, + 0xd6, 0x43, 0x97, 0xa0, 0x38, 0xc4, 0xc3, 0x5d, 0x06, 0xcd, 0x50, 0x68, 0x81, 0x0d, 0xac, 0xf5, + 0x50, 0x03, 0x0a, 0x2e, 0x9e, 0x58, 0x44, 0xdd, 0x7a, 0x76, 0x41, 0xbb, 0x99, 0x35, 0x82, 0x6f, + 0x42, 0xe8, 0x9a, 0x2f, 0xfd, 0x1d, 0x1f, 0xbb, 0xc3, 0x7a, 0x8e, 0x11, 0x92, 0x81, 0x0e, 0x76, + 0x87, 0x0f, 0xf2, 0x3f, 0xf8, 0x87, 0x7a, 0x76, 0x79, 0xf1, 0x8e, 0xfe, 0xaf, 0xd3, 0x50, 0x36, + 0x4c, 0xbb, 0x8f, 0x0d, 0xfc, 0xbd, 0x31, 0xf6, 0x7c, 0x54, 0x83, 0xec, 0x3e, 0x3e, 0xa4, 0x7a, + 0x94, 0x0d, 0xf2, 0x93, 0x31, 0xb2, 0xfb, 0x78, 0x07, 0xdb, 0x4c, 0x83, 0x32, 0x61, 0x64, 0xf7, + 0x71, 0xdb, 0xee, 0xa1, 0x39, 0x98, 0x1e, 0x58, 0x43, 0xcb, 0xe7, 0xe2, 0xd9, 0x47, 0x48, 0xaf, + 0x5c, 0x44, 0xaf, 0x15, 0x00, 0xcf, 0x71, 0xfd, 0x1d, 0xc7, 0xed, 0x61, 0xb7, 0x3e, 0xbd, 0xa0, + 0xdd, 0xac, 0x2e, 0x5d, 0x5f, 0x54, 0x3d, 0xbc, 0xa8, 0x2a, 0xb4, 0xb8, 0xed, 0xb8, 0xfe, 0x26, + 0xc1, 0x35, 0x8a, 0x9e, 0xf8, 0x89, 0x3e, 0x82, 0x12, 0x65, 0xe2, 0x9b, 0x6e, 0x1f, 0xfb, 0xf5, + 0x19, 0xca, 0xe5, 0xc6, 0x31, 0x5c, 0x3a, 0x14, 0xd9, 0xa0, 0xe2, 0xd9, 0x6f, 0xa4, 0x43, 0xd9, + 0xc3, 0xae, 0x65, 0x0e, 0xac, 0xcf, 0xcc, 0xdd, 0x01, 0xae, 0xe7, 0x17, 0xb4, 0x9b, 0x05, 0x23, + 0x34, 0x46, 0xe6, 0xbf, 0x8f, 0x0f, 0xbd, 0x1d, 0xc7, 0x1e, 0x1c, 0xd6, 0x0b, 0x14, 0xa1, 0x40, + 0x06, 0x36, 0xed, 0xc1, 0x21, 0xf5, 0x9e, 0x33, 0xb6, 0x7d, 0x06, 0x2d, 0x52, 0x68, 0x91, 0x8e, + 0x50, 0xf0, 0x5d, 0xa8, 0x0d, 0x2d, 0x7b, 0x67, 0xe8, 0xf4, 0x76, 0x02, 0x83, 0x00, 0x31, 0xc8, + 0xc3, 0xfc, 0xef, 0x51, 0x0f, 0xdc, 0x35, 0xaa, 0x43, 0xcb, 0x7e, 0xea, 0xf4, 0x0c, 0x61, 0x1f, + 0x42, 0x62, 0x1e, 0x84, 0x49, 0x4a, 0x51, 0x12, 0xf3, 0x40, 0x25, 0x79, 0x1f, 0xce, 0x12, 0x29, + 0x5d, 0x17, 0x9b, 0x3e, 0x96, 0x54, 0xe5, 0x30, 0xd5, 0x99, 0xa1, 0x65, 0xaf, 0x50, 0x94, 0x10, + 0xa1, 0x79, 0x10, 0x23, 0xac, 0x44, 0x09, 0xcd, 0x83, 0x30, 0xa1, 0xfe, 0x3e, 0x14, 0x03, 0xbf, + 0xa0, 0x02, 0xe4, 0x36, 0x36, 0x37, 0xda, 0xb5, 0x29, 0x04, 0x30, 0xd3, 0xda, 0x5e, 0x69, 0x6f, + 0xac, 0xd6, 0x34, 0x54, 0x82, 0xfc, 0x6a, 0x9b, 0x7d, 0x64, 0x1a, 0xf9, 0x2f, 0xf8, 0x7a, 0x7b, + 0x02, 0x20, 0x5d, 0x81, 0xf2, 0x90, 0x7d, 0xd2, 0xfe, 0xb4, 0x36, 0x45, 0x90, 0x9f, 0xb7, 0x8d, + 0xed, 0xb5, 0xcd, 0x8d, 0x9a, 0x46, 0xb8, 0xac, 0x18, 0xed, 0x56, 0xa7, 0x5d, 0xcb, 0x10, 0x8c, + 0xa7, 0x9b, 0xab, 0xb5, 0x2c, 0x2a, 0xc2, 0xf4, 0xf3, 0xd6, 0xfa, 0xb3, 0x76, 0x2d, 0x17, 0x30, + 0x93, 0xab, 0xf8, 0x4f, 0x34, 0xa8, 0x70, 0x77, 0xb3, 0xbd, 0x85, 0xee, 0xc1, 0xcc, 0x1e, 0xdd, + 0x5f, 0x74, 0x25, 0x97, 0x96, 0x2e, 0x47, 0xd6, 0x46, 0x68, 0x0f, 0x1a, 0x1c, 0x17, 0xe9, 0x90, + 0xdd, 0x9f, 0x78, 0xf5, 0xcc, 0x42, 0xf6, 0x66, 0x69, 0xa9, 0xb6, 0xc8, 0x22, 0xc9, 0xe2, 0x13, + 0x7c, 0xf8, 0xdc, 0x1c, 0x8c, 0xb1, 0x41, 0x80, 0x08, 0x41, 0x6e, 0xe8, 0xb8, 0x98, 0x2e, 0xf8, + 0x82, 0x41, 0x7f, 0x93, 0x5d, 0x40, 0x7d, 0xce, 0x17, 0x3b, 0xfb, 0x90, 0xea, 0xfd, 0xa7, 0x06, + 0xb0, 0x35, 0xf6, 0xd3, 0xb7, 0xd8, 0x1c, 0x4c, 0x4f, 0x88, 0x04, 0xbe, 0xbd, 0xd8, 0x07, 0xdd, + 0x5b, 0xd8, 0xf4, 0x70, 0xb0, 0xb7, 0xc8, 0x07, 0x5a, 0x80, 0xfc, 0xc8, 0xc5, 0x93, 0x9d, 0xfd, + 0x09, 0x95, 0x56, 0x90, 0x7e, 0x9a, 0x21, 0xe3, 0x4f, 0x26, 0xe8, 0x16, 0x94, 0xad, 0xbe, 0xed, + 0xb8, 0x78, 0x87, 0x31, 0x9d, 0x56, 0xd1, 0x96, 0x8c, 0x12, 0x03, 0xd2, 0x29, 0x29, 0xb8, 0x4c, + 0xd4, 0x4c, 0x22, 0xee, 0x3a, 0x81, 0xc9, 0xf9, 0x7c, 0xae, 0x41, 0x89, 0xce, 0xe7, 0x44, 0xc6, + 0x5e, 0x92, 0x13, 0xc9, 0x50, 0xb2, 0x98, 0xc1, 0x63, 0x53, 0x93, 0x2a, 0xd8, 0x80, 0x56, 0xf1, + 0x00, 0xfb, 0xf8, 0x24, 0xc1, 0x4b, 0x31, 0x65, 0x36, 0xd1, 0x94, 0x52, 0xde, 0x5f, 0x68, 0x70, + 0x36, 0x24, 0xf0, 0x44, 0x53, 0xaf, 0x43, 0xbe, 0x47, 0x99, 0x31, 0x9d, 0xb2, 0x86, 0xf8, 0x44, + 0xf7, 0xa0, 0xc0, 0x55, 0xf2, 0xea, 0xd9, 0xe4, 0x65, 0x28, 0xb5, 0xcc, 0x33, 0x2d, 0x3d, 0xa9, + 0xe6, 0x3f, 0x65, 0xa0, 0xc8, 0x8d, 0xb1, 0x39, 0x42, 0x2d, 0xa8, 0xb8, 0xec, 0x63, 0x87, 0xce, + 0x99, 0xeb, 0xd8, 0x48, 0x8f, 0x93, 0x8f, 0xa7, 0x8c, 0x32, 0x27, 0xa1, 0xc3, 0xe8, 0x57, 0xa1, + 0x24, 0x58, 0x8c, 0xc6, 0x3e, 0x77, 0x54, 0x3d, 0xcc, 0x40, 0x2e, 0xed, 0xc7, 0x53, 0x06, 0x70, + 0xf4, 0xad, 0xb1, 0x8f, 0x3a, 0x30, 0x27, 0x88, 0xd9, 0xfc, 0xb8, 0x1a, 0x59, 0xca, 0x65, 0x21, + 0xcc, 0x25, 0xee, 0xce, 0xc7, 0x53, 0x06, 0xe2, 0xf4, 0x0a, 0x10, 0xad, 0x4a, 0x95, 0xfc, 0x03, + 0x96, 0x5f, 0x62, 0x2a, 0x75, 0x0e, 0x6c, 0xce, 0x44, 0x58, 0x6b, 0x59, 0xd1, 0xad, 0x73, 0x60, + 0x07, 0x26, 0x7b, 0x58, 0x84, 0x3c, 0x1f, 0xd6, 0xff, 0x23, 0x03, 0x20, 0x3c, 0xb6, 0x39, 0x42, + 0xab, 0x50, 0x75, 0xf9, 0x57, 0xc8, 0x7e, 0x97, 0x12, 0xed, 0xc7, 0x1d, 0x3d, 0x65, 0x54, 0x04, + 0x11, 0x53, 0xf7, 0x43, 0x28, 0x07, 0x5c, 0xa4, 0x09, 0x2f, 0x26, 0x98, 0x30, 0xe0, 0x50, 0x12, + 0x04, 0xc4, 0x88, 0x9f, 0xc0, 0xb9, 0x80, 0x3e, 0xc1, 0x8a, 0x6f, 0x1c, 0x61, 0xc5, 0x80, 0xe1, + 0x59, 0xc1, 0x41, 0xb5, 0xe3, 0x23, 0x45, 0x31, 0x69, 0xc8, 0x8b, 0x09, 0x86, 0x64, 0x48, 0xaa, + 0x25, 0x03, 0x0d, 0x43, 0xa6, 0x04, 0x92, 0xf6, 0xd9, 0xb8, 0xfe, 0x57, 0x39, 0xc8, 0xaf, 0x38, + 0xc3, 0x91, 0xe9, 0x92, 0x45, 0x34, 0xe3, 0x62, 0x6f, 0x3c, 0xf0, 0xa9, 0x01, 0xab, 0x4b, 0xd7, + 0xc2, 0x32, 0x38, 0x9a, 0xf8, 0xd7, 0xa0, 0xa8, 0x06, 0x27, 0x21, 0xc4, 0x3c, 0xcb, 0x67, 0x5e, + 0x83, 0x98, 0xe7, 0x78, 0x4e, 0x22, 0x02, 0x42, 0x56, 0x06, 0x84, 0x06, 0xe4, 0xf9, 0x01, 0x8f, + 0x05, 0xeb, 0xc7, 0x53, 0x86, 0x18, 0x40, 0x6f, 0xc3, 0x6c, 0x34, 0x15, 0x4e, 0x73, 0x9c, 0x6a, + 0x37, 0x9c, 0x39, 0xaf, 0x41, 0x39, 0x94, 0xa1, 0x67, 0x38, 0x5e, 0x69, 0xa8, 0xe4, 0xe5, 0xf3, + 0x22, 0xac, 0x93, 0x63, 0x45, 0xf9, 0xf1, 0x94, 0x08, 0xec, 0x57, 0x45, 0x60, 0x2f, 0xa8, 0x89, + 0x96, 0xd8, 0x95, 0xc7, 0xf8, 0xeb, 0x6a, 0xd4, 0xfa, 0x26, 0x21, 0x0e, 0x90, 0x64, 0xf8, 0xd2, + 0x0d, 0xa8, 0x84, 0x4c, 0x46, 0x72, 0x64, 0xfb, 0xe3, 0x67, 0xad, 0x75, 0x96, 0x50, 0x1f, 0xd1, + 0x1c, 0x6a, 0xd4, 0x34, 0x92, 0xa0, 0xd7, 0xdb, 0xdb, 0xdb, 0xb5, 0x0c, 0x3a, 0x0f, 0xc5, 0x8d, + 0xcd, 0xce, 0x0e, 0xc3, 0xca, 0x36, 0xf2, 0x7f, 0xcc, 0x22, 0x89, 0xcc, 0xcf, 0x9f, 0x06, 0x3c, + 0x79, 0x8a, 0x56, 0x32, 0xf3, 0x94, 0x92, 0x99, 0x35, 0x91, 0x99, 0x33, 0x32, 0x33, 0x67, 0x11, + 0x82, 0xe9, 0xf5, 0x76, 0x6b, 0x9b, 0x26, 0x69, 0xc6, 0x7a, 0x39, 0x9e, 0xad, 0x1f, 0x56, 0xa1, + 0xcc, 0xdc, 0xb3, 0x33, 0xb6, 0xc9, 0x61, 0xe2, 0xaf, 0x35, 0x00, 0xb9, 0x61, 0x51, 0x13, 0xf2, + 0x5d, 0xa6, 0x42, 0x5d, 0xa3, 0x11, 0xf0, 0x5c, 0xa2, 0xc7, 0x0d, 0x81, 0x85, 0xee, 0x42, 0xde, + 0x1b, 0x77, 0xbb, 0xd8, 0x13, 0x99, 0xfb, 0x42, 0x34, 0x08, 0xf3, 0x80, 0x68, 0x08, 0x3c, 0x42, + 0xf2, 0xd2, 0xb4, 0x06, 0x63, 0x9a, 0xc7, 0x8f, 0x26, 0xe1, 0x78, 0x32, 0xc6, 0xfe, 0x99, 0x06, + 0x25, 0x65, 0x5b, 0xfc, 0x82, 0x29, 0xe0, 0x32, 0x14, 0xa9, 0x32, 0xb8, 0xc7, 0x93, 0x40, 0xc1, + 0x90, 0x03, 0xe8, 0x3d, 0x28, 0x8a, 0x9d, 0x24, 0xf2, 0x40, 0x3d, 0x99, 0xed, 0xe6, 0xc8, 0x90, + 0xa8, 0x52, 0xc9, 0x0e, 0x9c, 0xa1, 0x76, 0xea, 0x92, 0xdb, 0x87, 0xb0, 0xac, 0x7a, 0x2c, 0xd7, + 0x22, 0xc7, 0xf2, 0x06, 0x14, 0x46, 0x7b, 0x87, 0x9e, 0xd5, 0x35, 0x07, 0x5c, 0x9d, 0xe0, 0x5b, + 0x72, 0xdd, 0x06, 0xa4, 0x72, 0x3d, 0x89, 0x01, 0x24, 0xd3, 0xf3, 0x50, 0x7a, 0x6c, 0x7a, 0x7b, + 0x5c, 0x49, 0x39, 0x7e, 0x0f, 0x2a, 0x64, 0xfc, 0xc9, 0xf3, 0xd7, 0x50, 0x5f, 0x50, 0x2d, 0xeb, + 0xff, 0xac, 0x41, 0x55, 0x90, 0x9d, 0xc8, 0x41, 0x08, 0x72, 0x7b, 0xa6, 0xb7, 0x47, 0x8d, 0x51, + 0x31, 0xe8, 0x6f, 0xf4, 0x36, 0xd4, 0xba, 0x6c, 0xfe, 0x3b, 0x91, 0x7b, 0xd7, 0x2c, 0x1f, 0x0f, + 0xf6, 0xfe, 0xbb, 0x50, 0x21, 0x24, 0x3b, 0xe1, 0x7b, 0x90, 0xd8, 0xc6, 0xef, 0x19, 0xe5, 0x3d, + 0x3a, 0xe7, 0xa8, 0xfa, 0x26, 0x94, 0x99, 0x31, 0x4e, 0x5b, 0x77, 0x69, 0xd7, 0x06, 0xcc, 0x6e, + 0xdb, 0xe6, 0xc8, 0xdb, 0x73, 0xfc, 0x88, 0xcd, 0x97, 0xf5, 0xbf, 0xd7, 0xa0, 0x26, 0x81, 0x27, + 0xd2, 0xe1, 0x2d, 0x98, 0x75, 0xf1, 0xd0, 0xb4, 0x6c, 0xcb, 0xee, 0xef, 0xec, 0x1e, 0xfa, 0xd8, + 0xe3, 0xd7, 0xd7, 0x6a, 0x30, 0xfc, 0x90, 0x8c, 0x12, 0x65, 0x77, 0x07, 0xce, 0x2e, 0x0f, 0xd2, + 0xf4, 0x37, 0x7a, 0x23, 0x1c, 0xa5, 0x8b, 0xd2, 0x6e, 0x62, 0x5c, 0xea, 0xfc, 0xd3, 0x0c, 0x94, + 0x3f, 0x31, 0xfd, 0xae, 0x58, 0x41, 0x68, 0x0d, 0xaa, 0x41, 0x18, 0xa7, 0x23, 0x5c, 0xef, 0xc8, + 0x81, 0x83, 0xd2, 0x88, 0x7b, 0x8d, 0x38, 0x70, 0x54, 0xba, 0xea, 0x00, 0x65, 0x65, 0xda, 0x5d, + 0x3c, 0x08, 0x58, 0x65, 0xd2, 0x59, 0x51, 0x44, 0x95, 0x95, 0x3a, 0x80, 0xbe, 0x0d, 0xb5, 0x91, + 0xeb, 0xf4, 0x5d, 0xec, 0x79, 0x01, 0x33, 0x96, 0xc2, 0xf5, 0x04, 0x66, 0x5b, 0x1c, 0x35, 0x72, + 0x8a, 0xb9, 0xf7, 0x78, 0xca, 0x98, 0x1d, 0x85, 0x61, 0x32, 0xb0, 0xce, 0xca, 0xf3, 0x1e, 0x8b, + 0xac, 0x3f, 0xca, 0x02, 0x8a, 0x4f, 0xf3, 0xab, 0x1e, 0x93, 0x6f, 0x40, 0xd5, 0xf3, 0x4d, 0x37, + 0xb6, 0xe6, 0x2b, 0x74, 0x34, 0x58, 0xf1, 0x6f, 0x41, 0xa0, 0xd9, 0x8e, 0xed, 0xf8, 0xd6, 0xcb, + 0x43, 0x76, 0x41, 0x31, 0xaa, 0x62, 0x78, 0x83, 0x8e, 0xa2, 0x0d, 0xc8, 0xbf, 0xb4, 0x06, 0x3e, + 0x76, 0xbd, 0xfa, 0xf4, 0x42, 0xf6, 0x66, 0x75, 0xe9, 0x9d, 0xe3, 0x1c, 0xb3, 0xf8, 0x11, 0xc5, + 0xef, 0x1c, 0x8e, 0xd4, 0xd3, 0x2f, 0x67, 0xa2, 0x1e, 0xe3, 0x67, 0x92, 0x6f, 0x44, 0x3a, 0x14, + 0x5e, 0x11, 0xa6, 0x3b, 0x56, 0x8f, 0xe6, 0xe2, 0x60, 0x1f, 0xde, 0x33, 0xf2, 0x14, 0xb0, 0xd6, + 0x43, 0xd7, 0xa0, 0xf0, 0xd2, 0x35, 0xfb, 0x43, 0x6c, 0xfb, 0xec, 0x96, 0x2f, 0x71, 0x02, 0x80, + 0xbe, 0x08, 0x20, 0x55, 0x21, 0x99, 0x6f, 0x63, 0x73, 0xeb, 0x59, 0xa7, 0x36, 0x85, 0xca, 0x50, + 0xd8, 0xd8, 0x5c, 0x6d, 0xaf, 0xb7, 0x49, 0x6e, 0x14, 0x39, 0xef, 0xae, 0xdc, 0x74, 0x2d, 0xe1, + 0x88, 0xd0, 0x9a, 0x50, 0xf5, 0xd2, 0xc2, 0x97, 0x6e, 0xa1, 0x97, 0x60, 0x71, 0x57, 0xbf, 0x0a, + 0x73, 0x49, 0x4b, 0x43, 0x20, 0xdc, 0xd3, 0xff, 0x2d, 0x03, 0x15, 0xbe, 0x11, 0x4e, 0xb4, 0x73, + 0x2f, 0x2a, 0x5a, 0xf1, 0xeb, 0x89, 0x30, 0x52, 0x1d, 0xf2, 0x6c, 0x83, 0xf4, 0xf8, 0xfd, 0x57, + 0x7c, 0x92, 0xe0, 0xcc, 0xd6, 0x3b, 0xee, 0x71, 0xb7, 0x07, 0xdf, 0x89, 0x61, 0x73, 0x3a, 0x35, + 0x6c, 0x06, 0x1b, 0xce, 0xf4, 0xf8, 0xc1, 0xaa, 0x28, 0x5d, 0x51, 0x16, 0x9b, 0x8a, 0x00, 0x43, + 0x3e, 0xcb, 0xa7, 0xf8, 0x0c, 0xdd, 0x80, 0x19, 0x3c, 0xc1, 0xb6, 0xef, 0xd5, 0x4b, 0x34, 0x91, + 0x56, 0xc4, 0x85, 0xaa, 0x4d, 0x46, 0x0d, 0x0e, 0x94, 0xae, 0xfa, 0x10, 0xce, 0xd0, 0xfb, 0xee, + 0x23, 0xd7, 0xb4, 0xd5, 0x3b, 0x7b, 0xa7, 0xb3, 0xce, 0xd3, 0x0e, 0xf9, 0x89, 0xaa, 0x90, 0x59, + 0x5b, 0xe5, 0xf6, 0xc9, 0xac, 0xad, 0x4a, 0xfa, 0xdf, 0xd7, 0x00, 0xa9, 0x0c, 0x4e, 0xe4, 0x8b, + 0x88, 0x14, 0xa1, 0x47, 0x56, 0xea, 0x31, 0x07, 0xd3, 0xd8, 0x75, 0x1d, 0x97, 0x05, 0x4a, 0x83, + 0x7d, 0x48, 0x6d, 0x6e, 0x73, 0x65, 0x0c, 0x3c, 0x71, 0xf6, 0x83, 0x08, 0xc0, 0xd8, 0x6a, 0x71, + 0xe5, 0x3b, 0x70, 0x36, 0x84, 0x7e, 0x3a, 0x29, 0x7e, 0x13, 0x66, 0x29, 0xd7, 0x95, 0x3d, 0xdc, + 0xdd, 0x1f, 0x39, 0x96, 0x1d, 0xd3, 0x00, 0x5d, 0x23, 0xb1, 0x4b, 0xa4, 0x0b, 0x32, 0x45, 0x36, + 0xe7, 0x72, 0x30, 0xd8, 0xe9, 0xac, 0xcb, 0xa5, 0xbe, 0x0b, 0xe7, 0x23, 0x0c, 0xc5, 0xcc, 0x7e, + 0x0d, 0x4a, 0xdd, 0x60, 0xd0, 0xe3, 0x27, 0xc8, 0x2b, 0x61, 0x75, 0xa3, 0xa4, 0x2a, 0x85, 0x94, + 0xf1, 0x6d, 0xb8, 0x10, 0x93, 0x71, 0x1a, 0xe6, 0xb8, 0xa7, 0xdf, 0x81, 0x73, 0x94, 0xf3, 0x13, + 0x8c, 0x47, 0xad, 0x81, 0x35, 0x39, 0xde, 0x2d, 0x87, 0x7c, 0xbe, 0x0a, 0xc5, 0xd7, 0xbb, 0xac, + 0xa4, 0xe8, 0x36, 0x17, 0xdd, 0xb1, 0x86, 0xb8, 0xe3, 0xac, 0xa7, 0x6b, 0x4b, 0x12, 0xf9, 0x3e, + 0x3e, 0xf4, 0xf8, 0xf1, 0x91, 0xfe, 0x96, 0xd1, 0xeb, 0x6f, 0x35, 0x6e, 0x4e, 0x95, 0xcf, 0xd7, + 0xbc, 0x35, 0xe6, 0x01, 0xfa, 0x64, 0x0f, 0xe2, 0x1e, 0x01, 0xb0, 0xda, 0x9c, 0x32, 0x12, 0x28, + 0x4c, 0xb2, 0x50, 0x39, 0xaa, 0xf0, 0x15, 0xbe, 0x71, 0xe8, 0x7f, 0xbc, 0xd8, 0x49, 0xe9, 0x4d, + 0x28, 0x51, 0xc8, 0xb6, 0x6f, 0xfa, 0x63, 0x2f, 0xcd, 0x73, 0xcb, 0xfa, 0x8f, 0x34, 0xbe, 0xa3, + 0x04, 0x9f, 0x13, 0xcd, 0xf9, 0x2e, 0xcc, 0xd0, 0x1b, 0xa2, 0xb8, 0xe9, 0x5c, 0x4c, 0x58, 0xd8, + 0x4c, 0x23, 0x83, 0x23, 0x2a, 0xe7, 0x24, 0x0d, 0x66, 0x9e, 0xd2, 0xce, 0x81, 0xa2, 0x6d, 0x4e, + 0x78, 0xce, 0x36, 0x87, 0xac, 0xfc, 0x58, 0x34, 0xe8, 0x6f, 0x7a, 0x21, 0xc0, 0xd8, 0x7d, 0x66, + 0xac, 0xb3, 0x1b, 0x48, 0xd1, 0x08, 0xbe, 0x89, 0x61, 0xbb, 0x03, 0x0b, 0xdb, 0x3e, 0x85, 0xe6, + 0x28, 0x54, 0x19, 0x41, 0x37, 0xa0, 0x68, 0x79, 0xeb, 0xd8, 0x74, 0x6d, 0x5e, 0xe2, 0x57, 0x02, + 0xb3, 0x84, 0xc8, 0x35, 0xf6, 0x1d, 0xa8, 0x31, 0xcd, 0x5a, 0xbd, 0x9e, 0x72, 0xda, 0x0f, 0xe4, + 0x6b, 0x11, 0xf9, 0x21, 0xfe, 0x99, 0xe3, 0xf9, 0xff, 0x9d, 0x06, 0x67, 0x14, 0x01, 0x27, 0x72, + 0xc1, 0xbb, 0x30, 0xc3, 0xfa, 0x2f, 0xfc, 0x28, 0x38, 0x17, 0xa6, 0x62, 0x62, 0x0c, 0x8e, 0x83, + 0x16, 0x21, 0xcf, 0x7e, 0x89, 0x6b, 0x5c, 0x32, 0xba, 0x40, 0x92, 0x2a, 0x2f, 0xc2, 0x59, 0x0e, + 0xc3, 0x43, 0x27, 0x69, 0xcf, 0xe5, 0xc2, 0x11, 0xe2, 0x87, 0x1a, 0xcc, 0x85, 0x09, 0x4e, 0x34, + 0x4b, 0x45, 0xef, 0xcc, 0x57, 0xd2, 0xfb, 0x5b, 0x42, 0xef, 0x67, 0xa3, 0x9e, 0x72, 0xe4, 0x8c, + 0xae, 0x38, 0xd5, 0xbb, 0x99, 0xb0, 0x77, 0x25, 0xaf, 0x9f, 0x04, 0x73, 0x12, 0xcc, 0x4e, 0x34, + 0xa7, 0xf7, 0x5f, 0x6b, 0x4e, 0xca, 0x11, 0x2c, 0x36, 0xb9, 0x35, 0xb1, 0x8c, 0xd6, 0x2d, 0x2f, + 0xc8, 0x38, 0xef, 0x40, 0x79, 0x60, 0xd9, 0xd8, 0x74, 0x79, 0x0f, 0x49, 0x53, 0xd7, 0xe3, 0x7d, + 0x23, 0x04, 0x94, 0xac, 0x7e, 0x5b, 0x03, 0xa4, 0xf2, 0xfa, 0xe5, 0x78, 0xab, 0x29, 0x0c, 0xbc, + 0xe5, 0x3a, 0x43, 0xc7, 0x3f, 0x6e, 0x99, 0xdd, 0xd3, 0x7f, 0x57, 0x83, 0x73, 0x11, 0x8a, 0x5f, + 0x86, 0xe6, 0xf7, 0xf4, 0xcb, 0x70, 0x66, 0x15, 0x8b, 0x33, 0x5e, 0xac, 0x76, 0xb0, 0x0d, 0x48, + 0x85, 0x9e, 0xce, 0x29, 0xe6, 0x1b, 0x70, 0xe6, 0xa9, 0x33, 0x21, 0x81, 0x9c, 0x80, 0x65, 0x98, + 0x62, 0xc5, 0xac, 0xc0, 0x5e, 0xc1, 0xb7, 0x0c, 0xbd, 0xdb, 0x80, 0x54, 0xca, 0xd3, 0x50, 0x67, + 0x59, 0xff, 0x5f, 0x0d, 0xca, 0xad, 0x81, 0xe9, 0x0e, 0x85, 0x2a, 0x1f, 0xc2, 0x0c, 0xab, 0xcc, + 0xf0, 0x32, 0xeb, 0x9b, 0x61, 0x7e, 0x2a, 0x2e, 0xfb, 0x68, 0xb1, 0x3a, 0x0e, 0xa7, 0x22, 0x53, + 0xe1, 0x9d, 0xe5, 0xd5, 0x48, 0xa7, 0x79, 0x15, 0xdd, 0x86, 0x69, 0x93, 0x90, 0xd0, 0xf4, 0x5a, + 0x8d, 0x96, 0xcb, 0x28, 0x37, 0x72, 0x25, 0x32, 0x18, 0x96, 0xfe, 0x01, 0x94, 0x14, 0x09, 0x28, + 0x0f, 0xd9, 0x47, 0x6d, 0x7e, 0x4d, 0x6a, 0xad, 0x74, 0xd6, 0x9e, 0xb3, 0x12, 0x62, 0x15, 0x60, + 0xb5, 0x1d, 0x7c, 0x67, 0x12, 0x1a, 0x7b, 0x26, 0xe7, 0xc3, 0xf3, 0x96, 0xaa, 0xa1, 0x96, 0xa6, + 0x61, 0xe6, 0x75, 0x34, 0x94, 0x22, 0x7e, 0x4b, 0x83, 0x0a, 0x37, 0xcd, 0x49, 0x53, 0x33, 0xe5, + 0x9c, 0x92, 0x9a, 0x95, 0x69, 0x18, 0x1c, 0x51, 0xea, 0xf0, 0x2f, 0x1a, 0xd4, 0x56, 0x9d, 0x57, + 0x76, 0xdf, 0x35, 0x7b, 0xc1, 0x1e, 0xfc, 0x28, 0xe2, 0xce, 0xc5, 0x48, 0xa5, 0x3f, 0x82, 0x2f, + 0x07, 0x22, 0x6e, 0xad, 0xcb, 0x5a, 0x0a, 0xcb, 0xef, 0xe2, 0x53, 0xff, 0x26, 0xcc, 0x46, 0x88, + 0x88, 0x83, 0x9e, 0xb7, 0xd6, 0xd7, 0x56, 0x89, 0x43, 0x68, 0xbd, 0xb7, 0xbd, 0xd1, 0x7a, 0xb8, + 0xde, 0xe6, 0x5d, 0xd9, 0xd6, 0xc6, 0x4a, 0x7b, 0x5d, 0x3a, 0xea, 0xbe, 0x98, 0xc1, 0x7d, 0x7d, + 0x00, 0x67, 0x14, 0x85, 0x4e, 0xda, 0x1c, 0x4b, 0xd6, 0x57, 0x4a, 0xfb, 0x06, 0x5c, 0x0a, 0xa4, + 0x3d, 0x67, 0xc0, 0x0e, 0xf6, 0xd4, 0xcb, 0xda, 0x84, 0x0b, 0x2d, 0x1a, 0xe4, 0xa7, 0xa0, 0x7c, + 0x4f, 0xaf, 0x43, 0x85, 0x9f, 0x8f, 0xa2, 0x21, 0xe3, 0xcf, 0x73, 0x50, 0x15, 0xa0, 0xaf, 0x47, + 0x7f, 0x74, 0x1e, 0x66, 0x7a, 0xbb, 0xdb, 0xd6, 0x67, 0xa2, 0xa3, 0xcb, 0xbf, 0xc8, 0xf8, 0x80, + 0xc9, 0x61, 0xef, 0x34, 0xf8, 0x17, 0xba, 0xcc, 0x9e, 0x70, 0xac, 0xd9, 0x3d, 0x7c, 0x40, 0x8f, + 0x51, 0x39, 0x43, 0x0e, 0xd0, 0x72, 0x28, 0x7f, 0xcf, 0x41, 0x6f, 0xc9, 0xca, 0xfb, 0x0e, 0xb4, + 0x0c, 0x35, 0xf2, 0xbb, 0x35, 0x1a, 0x0d, 0x2c, 0xdc, 0x63, 0x0c, 0xc8, 0x05, 0x39, 0x27, 0xcf, + 0x49, 0x31, 0x04, 0x74, 0x15, 0x66, 0xe8, 0xe5, 0xd1, 0xab, 0x17, 0x48, 0x46, 0x96, 0xa8, 0x7c, + 0x18, 0xbd, 0x0d, 0x25, 0xa6, 0xf1, 0x9a, 0xfd, 0xcc, 0xc3, 0xf4, 0xb5, 0x83, 0x52, 0x49, 0x51, + 0x61, 0xe1, 0x13, 0x1a, 0xa4, 0x9d, 0xd0, 0x50, 0x13, 0xaa, 0x9e, 0xef, 0xb8, 0x66, 0x5f, 0xb8, + 0x91, 0x3e, 0x75, 0x50, 0xca, 0x7d, 0x11, 0xb0, 0x54, 0xe1, 0xe3, 0xb1, 0xe3, 0x9b, 0xe1, 0x27, + 0x0e, 0xef, 0x19, 0x2a, 0x0c, 0x7d, 0x0b, 0x2a, 0x3d, 0xb1, 0x48, 0xd6, 0xec, 0x97, 0x0e, 0x7d, + 0xd6, 0x10, 0xeb, 0xde, 0xad, 0xaa, 0x28, 0x92, 0x53, 0x98, 0x54, 0xbd, 0xc9, 0x56, 0x42, 0x14, + 0xc4, 0xdb, 0xd8, 0x26, 0xa9, 0x9d, 0x55, 0x70, 0x0a, 0x86, 0xf8, 0x44, 0xd7, 0xa1, 0xc2, 0x32, + 0xc1, 0xf3, 0xd0, 0x6a, 0x08, 0x0f, 0x92, 0x3c, 0xd6, 0x1a, 0xfb, 0x7b, 0x6d, 0x4a, 0x14, 0x5b, + 0x94, 0x57, 0x00, 0x11, 0xe8, 0xaa, 0xe5, 0x25, 0x82, 0x39, 0x71, 0xe2, 0x8a, 0xbe, 0xaf, 0x6f, + 0xc0, 0x59, 0x02, 0xc5, 0xb6, 0x6f, 0x75, 0x95, 0xa3, 0x98, 0x38, 0xec, 0x6b, 0x91, 0xc3, 0xbe, + 0xe9, 0x79, 0xaf, 0x1c, 0xb7, 0xc7, 0xd5, 0x0c, 0xbe, 0xa5, 0xb4, 0x7f, 0xd4, 0x98, 0x36, 0xcf, + 0xbc, 0xd0, 0x41, 0xfd, 0x2b, 0xf2, 0x43, 0xbf, 0x02, 0x79, 0xfe, 0x40, 0x8a, 0xd7, 0x3f, 0xcf, + 0x2f, 0xb2, 0x87, 0x59, 0x8b, 0x9c, 0xf1, 0x26, 0x83, 0x2a, 0x35, 0x3a, 0x8e, 0x4f, 0x96, 0xcb, + 0x9e, 0xe9, 0xed, 0xe1, 0xde, 0x96, 0x60, 0x1e, 0xaa, 0x0e, 0xdf, 0x37, 0x22, 0x60, 0xa9, 0xfb, + 0x5d, 0xa9, 0xfa, 0x23, 0xec, 0x1f, 0xa1, 0xba, 0xda, 0x7f, 0x38, 0x27, 0x48, 0x78, 0xdb, 0xf4, + 0x75, 0xa8, 0x7e, 0xac, 0xc1, 0x15, 0x41, 0xb6, 0xb2, 0x67, 0xda, 0x7d, 0x2c, 0x94, 0xf9, 0x45, + 0xed, 0x15, 0x9f, 0x74, 0xf6, 0x35, 0x27, 0xfd, 0x04, 0xea, 0xc1, 0xa4, 0x69, 0x2d, 0xca, 0x19, + 0xa8, 0x93, 0x18, 0x7b, 0x41, 0x90, 0xa4, 0xbf, 0xc9, 0x98, 0xeb, 0x0c, 0x82, 0x6b, 0x20, 0xf9, + 0x2d, 0x99, 0xad, 0xc3, 0x45, 0xc1, 0x8c, 0x17, 0x87, 0xc2, 0xdc, 0x62, 0x73, 0x3a, 0x92, 0x1b, + 0xf7, 0x07, 0xe1, 0x71, 0xf4, 0x52, 0x4a, 0x24, 0x09, 0xbb, 0x90, 0x4a, 0xd1, 0x92, 0xa4, 0xcc, + 0xb3, 0x1d, 0x40, 0x74, 0x56, 0x4e, 0xec, 0x31, 0x38, 0x61, 0x99, 0x08, 0xe7, 0x4b, 0x80, 0xc0, + 0x63, 0x4b, 0x20, 0x5d, 0x2a, 0x86, 0xf9, 0x40, 0x51, 0x62, 0xf6, 0x2d, 0xec, 0x0e, 0x2d, 0xcf, + 0x53, 0x1a, 0x71, 0x49, 0xe6, 0x7a, 0x13, 0x72, 0x23, 0xcc, 0x8f, 0x2f, 0xa5, 0x25, 0x24, 0xf6, + 0x84, 0x42, 0x4c, 0xe1, 0x52, 0xcc, 0x10, 0xae, 0x0a, 0x31, 0xcc, 0x21, 0x89, 0x72, 0xa2, 0x6a, + 0x8a, 0xe2, 0x7f, 0x26, 0xa5, 0xf8, 0x9f, 0x0d, 0x17, 0xff, 0x43, 0x47, 0x6a, 0x35, 0x50, 0x9d, + 0xce, 0x91, 0xba, 0xc3, 0x1c, 0x10, 0xc4, 0xb7, 0xd3, 0xe1, 0xfa, 0x07, 0x3c, 0x50, 0x9d, 0x56, + 0x3a, 0x17, 0x01, 0x3e, 0x13, 0x0e, 0xf0, 0x3a, 0x94, 0x89, 0x93, 0x0c, 0xb5, 0x2b, 0x92, 0x33, + 0x42, 0x63, 0x32, 0x18, 0xef, 0xc3, 0x5c, 0x38, 0x18, 0x9f, 0x48, 0xa9, 0x39, 0x98, 0xf6, 0x9d, + 0x7d, 0x2c, 0x72, 0x0a, 0xfb, 0x88, 0x99, 0x35, 0x08, 0xd4, 0xa7, 0x63, 0xd6, 0xef, 0x4a, 0xae, + 0x74, 0x03, 0x9e, 0x74, 0x06, 0x64, 0x39, 0x8a, 0xdb, 0x3f, 0xfb, 0x90, 0xb2, 0x3e, 0x81, 0xf3, + 0xd1, 0xe0, 0x7b, 0x3a, 0x93, 0xd8, 0x61, 0x9b, 0x33, 0x29, 0x3c, 0x9f, 0x8e, 0x80, 0x17, 0x32, + 0x4e, 0x2a, 0x41, 0xf7, 0x74, 0x78, 0xff, 0x3a, 0x34, 0x92, 0x62, 0xf0, 0xa9, 0xee, 0xc5, 0x20, + 0x24, 0x9f, 0x0e, 0xd7, 0x1f, 0x6a, 0x92, 0xad, 0xba, 0x6a, 0x3e, 0xf8, 0x2a, 0x6c, 0x45, 0xae, + 0xbb, 0x13, 0x2c, 0x9f, 0x66, 0x10, 0x2d, 0xb3, 0xc9, 0xd1, 0x52, 0x92, 0x50, 0x44, 0xb1, 0xff, + 0x64, 0xa8, 0xff, 0x3a, 0x57, 0x2f, 0x17, 0x26, 0xf3, 0xce, 0x49, 0x85, 0x91, 0xf4, 0x1c, 0x08, + 0xa3, 0x1f, 0xb1, 0xad, 0xa2, 0x26, 0xa9, 0xd3, 0x71, 0xdd, 0x6f, 0xc8, 0x04, 0x13, 0xcb, 0x63, + 0xa7, 0x23, 0xc1, 0x84, 0x85, 0xf4, 0x14, 0x76, 0x2a, 0x22, 0x6e, 0xb5, 0xa0, 0x18, 0xdc, 0xfd, + 0x95, 0x97, 0xca, 0x25, 0xc8, 0x6f, 0x6c, 0x6e, 0x6f, 0xb5, 0x56, 0xc8, 0xd5, 0x76, 0x0e, 0xf2, + 0x2b, 0x9b, 0x86, 0xf1, 0x6c, 0xab, 0x43, 0xee, 0xb6, 0xd1, 0x87, 0x4b, 0x4b, 0x3f, 0xcb, 0x42, + 0xe6, 0xc9, 0x73, 0xf4, 0x29, 0x4c, 0xb3, 0x87, 0x73, 0x47, 0xbc, 0x9f, 0x6c, 0x1c, 0xf5, 0x36, + 0x50, 0xbf, 0xf0, 0x83, 0xff, 0xfe, 0xd9, 0x1f, 0x66, 0xce, 0xe8, 0xe5, 0xe6, 0x64, 0xb9, 0xb9, + 0x3f, 0x69, 0xd2, 0x24, 0xfb, 0x40, 0xbb, 0x85, 0x3e, 0x86, 0xec, 0xd6, 0xd8, 0x47, 0xa9, 0xef, + 0x2a, 0x1b, 0xe9, 0xcf, 0x05, 0xf5, 0x73, 0x94, 0xe9, 0xac, 0x0e, 0x9c, 0xe9, 0x68, 0xec, 0x13, + 0x96, 0xdf, 0x83, 0x92, 0xfa, 0xd8, 0xef, 0xd8, 0xc7, 0x96, 0x8d, 0xe3, 0x1f, 0x12, 0xea, 0x57, + 0xa8, 0xa8, 0x0b, 0x3a, 0xe2, 0xa2, 0xd8, 0x73, 0x44, 0x75, 0x16, 0x9d, 0x03, 0x1b, 0xa5, 0x3e, + 0xc5, 0x6c, 0xa4, 0xbf, 0x2d, 0x8c, 0xcd, 0xc2, 0x3f, 0xb0, 0x09, 0xcb, 0xef, 0xf2, 0x47, 0x84, + 0x5d, 0x1f, 0x5d, 0x4d, 0x78, 0x05, 0xa6, 0xbe, 0x6e, 0x6a, 0x2c, 0xa4, 0x23, 0x70, 0x21, 0x97, + 0xa9, 0x90, 0xf3, 0xfa, 0x19, 0x2e, 0xa4, 0x1b, 0xa0, 0x3c, 0xd0, 0x6e, 0x2d, 0x75, 0x61, 0x9a, + 0x76, 0xcf, 0xd1, 0x0b, 0xf1, 0xa3, 0x91, 0xf0, 0x2e, 0x21, 0xc5, 0xd1, 0xa1, 0xbe, 0xbb, 0x3e, + 0x47, 0x05, 0x55, 0xf5, 0x22, 0x11, 0x44, 0x7b, 0xe7, 0x0f, 0xb4, 0x5b, 0x37, 0xb5, 0x3b, 0xda, + 0xd2, 0xdf, 0x4c, 0xc3, 0x34, 0xed, 0xd2, 0xa0, 0x7d, 0x00, 0xd9, 0x25, 0x8e, 0xce, 0x2e, 0xd6, + 0x80, 0x8e, 0xce, 0x2e, 0xde, 0x60, 0xd6, 0x1b, 0x54, 0xe8, 0x9c, 0x3e, 0x4b, 0x84, 0xd2, 0xe6, + 0x4f, 0x93, 0xf6, 0xba, 0x88, 0x1d, 0x7f, 0xac, 0xf1, 0x76, 0x15, 0xdb, 0x66, 0x28, 0x89, 0x5b, + 0xa8, 0x43, 0x1c, 0x5d, 0x0e, 0x09, 0x4d, 0x61, 0xfd, 0x3e, 0x15, 0xd8, 0xd4, 0x6b, 0x52, 0xa0, + 0x4b, 0x31, 0x1e, 0x68, 0xb7, 0x5e, 0xd4, 0xf5, 0xb3, 0xdc, 0xca, 0x11, 0x08, 0xfa, 0x3e, 0x54, + 0xc3, 0xbd, 0x4c, 0x74, 0x2d, 0x41, 0x56, 0xb4, 0x37, 0xda, 0xb8, 0x7e, 0x34, 0x12, 0xd7, 0x69, + 0x9e, 0xea, 0xc4, 0x85, 0x33, 0xc9, 0xfb, 0x18, 0x8f, 0x4c, 0x82, 0xc4, 0x7d, 0x80, 0xfe, 0x54, + 0xe3, 0xed, 0x68, 0xd9, 0x8a, 0x44, 0x49, 0xdc, 0x63, 0x1d, 0xcf, 0xc6, 0x8d, 0x63, 0xb0, 0xb8, + 0x12, 0x1f, 0x50, 0x25, 0xde, 0xd7, 0xe7, 0xa4, 0x12, 0xbe, 0x35, 0xc4, 0xbe, 0xc3, 0xb5, 0x78, + 0x71, 0x59, 0xbf, 0x10, 0x32, 0x4e, 0x08, 0x2a, 0x9d, 0xc5, 0x5a, 0x86, 0x89, 0xce, 0x0a, 0x75, + 0x25, 0x13, 0x9d, 0x15, 0xee, 0x37, 0x26, 0x39, 0x8b, 0x37, 0x08, 0x13, 0x9c, 0x15, 0x40, 0x96, + 0xfe, 0x3f, 0x07, 0xf9, 0x15, 0xf6, 0x3f, 0x23, 0x21, 0x07, 0x8a, 0x41, 0x13, 0x0d, 0xcd, 0x27, + 0xd5, 0xe9, 0xe5, 0x55, 0xae, 0x71, 0x35, 0x15, 0xce, 0x15, 0x7a, 0x83, 0x2a, 0x74, 0x49, 0x3f, + 0x4f, 0x24, 0xf3, 0xff, 0xdf, 0xa9, 0xc9, 0xaa, 0xb9, 0x4d, 0xb3, 0xd7, 0x23, 0x86, 0xf8, 0x4d, + 0x28, 0xab, 0x2d, 0x2d, 0xf4, 0x46, 0x62, 0x6f, 0x40, 0xed, 0x8f, 0x35, 0xf4, 0xa3, 0x50, 0xb8, + 0xe4, 0xeb, 0x54, 0xf2, 0xbc, 0x7e, 0x31, 0x41, 0xb2, 0x4b, 0x51, 0x43, 0xc2, 0x59, 0xef, 0x29, + 0x59, 0x78, 0xa8, 0xc9, 0x95, 0x2c, 0x3c, 0xdc, 0xba, 0x3a, 0x52, 0xf8, 0x98, 0xa2, 0x12, 0xe1, + 0x1e, 0x80, 0x6c, 0x0e, 0xa1, 0x44, 0x5b, 0x2a, 0x17, 0xd6, 0x68, 0x70, 0x88, 0xf7, 0x95, 0x74, + 0x9d, 0x8a, 0xe5, 0xeb, 0x2e, 0x22, 0x76, 0x60, 0x79, 0x3e, 0xdb, 0x98, 0x95, 0x50, 0x6b, 0x07, + 0x25, 0xce, 0x27, 0xdc, 0x29, 0x6a, 0x5c, 0x3b, 0x12, 0x87, 0x4b, 0xbf, 0x41, 0xa5, 0x5f, 0xd5, + 0x1b, 0x09, 0xd2, 0x47, 0x0c, 0x97, 0x2c, 0xb6, 0xcf, 0xf3, 0x50, 0x7a, 0x6a, 0x5a, 0xb6, 0x8f, + 0x6d, 0xd3, 0xee, 0x62, 0xb4, 0x0b, 0xd3, 0x34, 0x77, 0x47, 0x03, 0xb1, 0xda, 0xc9, 0x88, 0x06, + 0xe2, 0x50, 0x29, 0x5f, 0x5f, 0xa0, 0x82, 0x1b, 0xfa, 0x39, 0x22, 0x78, 0x28, 0x59, 0x37, 0x59, + 0x13, 0x40, 0xbb, 0x85, 0x5e, 0xc2, 0x0c, 0x6f, 0xe1, 0x47, 0x18, 0x85, 0x8a, 0x6a, 0x8d, 0xcb, + 0xc9, 0xc0, 0xa4, 0xb5, 0xac, 0x8a, 0xf1, 0x28, 0x1e, 0x91, 0x33, 0x01, 0x90, 0x1d, 0xa9, 0xa8, + 0x47, 0x63, 0x9d, 0xac, 0xc6, 0x42, 0x3a, 0x42, 0x92, 0x4d, 0x55, 0x99, 0xbd, 0x00, 0x97, 0xc8, + 0xfd, 0x0e, 0xe4, 0x1e, 0x9b, 0xde, 0x1e, 0x8a, 0xe4, 0x5e, 0xe5, 0xc5, 0x6d, 0xa3, 0x91, 0x04, + 0xe2, 0x52, 0xae, 0x52, 0x29, 0x17, 0x59, 0x28, 0x53, 0xa5, 0xd0, 0x37, 0xa5, 0xcc, 0x7e, 0xec, + 0xb9, 0x6d, 0xd4, 0x7e, 0xa1, 0xb7, 0xbb, 0x51, 0xfb, 0x85, 0x5f, 0xe8, 0xa6, 0xdb, 0x8f, 0x48, + 0xd9, 0x9f, 0x10, 0x39, 0x23, 0x28, 0x88, 0x87, 0xa9, 0x28, 0xf2, 0x9c, 0x27, 0xf2, 0x9a, 0xb5, + 0x31, 0x9f, 0x06, 0xe6, 0xd2, 0xae, 0x51, 0x69, 0x57, 0xf4, 0x7a, 0xcc, 0x5b, 0x1c, 0xf3, 0x81, + 0x76, 0xeb, 0x8e, 0x86, 0xbe, 0x0f, 0x20, 0x9b, 0x76, 0xb1, 0x3d, 0x18, 0x6d, 0x04, 0xc6, 0xf6, + 0x60, 0xac, 0xdf, 0xa7, 0x2f, 0x52, 0xb9, 0x37, 0xf5, 0x6b, 0x51, 0xb9, 0xbe, 0x6b, 0xda, 0xde, + 0x4b, 0xec, 0xde, 0x66, 0x75, 0x7f, 0x6f, 0xcf, 0x1a, 0x91, 0x29, 0xbb, 0x50, 0x0c, 0x6a, 0xcd, + 0xd1, 0x78, 0x1b, 0xed, 0xfe, 0x44, 0xe3, 0x6d, 0xac, 0x19, 0x13, 0x0e, 0x3c, 0xa1, 0xf5, 0x22, + 0x50, 0xc9, 0x16, 0xfc, 0xcb, 0x1a, 0xe4, 0xc8, 0x91, 0x9c, 0x1c, 0x4f, 0x64, 0xb9, 0x27, 0x3a, + 0xfb, 0x58, 0xc5, 0x3a, 0x3a, 0xfb, 0x78, 0xa5, 0x28, 0x7c, 0x3c, 0x21, 0xd7, 0xb5, 0x26, 0xab, + 0xa3, 0x90, 0x99, 0x3a, 0x50, 0x52, 0xca, 0x40, 0x28, 0x81, 0x59, 0xb8, 0x02, 0x1e, 0x4d, 0x78, + 0x09, 0x35, 0x24, 0xfd, 0x12, 0x95, 0x77, 0x8e, 0x25, 0x3c, 0x2a, 0xaf, 0xc7, 0x30, 0x88, 0x40, + 0x3e, 0x3b, 0xbe, 0xf3, 0x13, 0x66, 0x17, 0xde, 0xfd, 0x0b, 0xe9, 0x08, 0xa9, 0xb3, 0x93, 0x5b, + 0xff, 0x15, 0x94, 0xd5, 0xd2, 0x0f, 0x4a, 0x50, 0x3e, 0x52, 0xa3, 0x8f, 0x66, 0x92, 0xa4, 0xca, + 0x51, 0x38, 0xb6, 0x51, 0x91, 0xa6, 0x82, 0x46, 0x04, 0x0f, 0x20, 0xcf, 0x4b, 0x40, 0x49, 0x26, + 0x0d, 0x97, 0xf1, 0x93, 0x4c, 0x1a, 0xa9, 0x1f, 0x85, 0xcf, 0xcf, 0x54, 0x22, 0xb9, 0x8a, 0x8a, + 0x6c, 0xcd, 0xa5, 0x3d, 0xc2, 0x7e, 0x9a, 0x34, 0x59, 0xb6, 0x4d, 0x93, 0xa6, 0x54, 0x08, 0xd2, + 0xa4, 0xf5, 0xb1, 0xcf, 0xe3, 0x81, 0xb8, 0x5e, 0xa3, 0x14, 0x66, 0x6a, 0x86, 0xd4, 0x8f, 0x42, + 0x49, 0xba, 0xde, 0x48, 0x81, 0x22, 0x3d, 0x1e, 0x00, 0xc8, 0x72, 0x54, 0xf4, 0xcc, 0x9a, 0xd8, + 0x29, 0x88, 0x9e, 0x59, 0x93, 0x2b, 0x5a, 0xe1, 0x18, 0x2b, 0xe5, 0xb2, 0xdb, 0x15, 0x91, 0xfc, + 0x85, 0x06, 0x28, 0x5e, 0xb0, 0x42, 0xef, 0x24, 0x73, 0x4f, 0xec, 0x3a, 0x34, 0xde, 0x7d, 0x3d, + 0xe4, 0xa4, 0x80, 0x2c, 0x55, 0xea, 0x52, 0xec, 0xd1, 0x2b, 0xa2, 0xd4, 0xe7, 0x1a, 0x54, 0x42, + 0x45, 0x2e, 0xf4, 0x66, 0x8a, 0x4f, 0x23, 0xad, 0x87, 0xc6, 0x5b, 0xc7, 0xe2, 0x25, 0x1d, 0xe6, + 0x95, 0x15, 0x20, 0x6e, 0x35, 0xbf, 0xa3, 0x41, 0x35, 0x5c, 0x0b, 0x43, 0x29, 0xbc, 0x63, 0x1d, + 0x8b, 0xc6, 0xcd, 0xe3, 0x11, 0x8f, 0x76, 0x8f, 0xbc, 0xd0, 0x0c, 0x20, 0xcf, 0x8b, 0x66, 0x49, + 0x0b, 0x3f, 0xdc, 0xe2, 0x48, 0x5a, 0xf8, 0x91, 0x8a, 0x5b, 0xc2, 0xc2, 0x77, 0x9d, 0x01, 0x56, + 0xb6, 0x19, 0xaf, 0xa5, 0xa5, 0x49, 0x3b, 0x7a, 0x9b, 0x45, 0x0a, 0x71, 0x69, 0xd2, 0xe4, 0x36, + 0x13, 0x25, 0x33, 0x94, 0xc2, 0xec, 0x98, 0x6d, 0x16, 0xad, 0xb8, 0x25, 0x6c, 0x33, 0x2a, 0x50, + 0xd9, 0x66, 0xb2, 0x94, 0x95, 0xb4, 0xcd, 0x62, 0xdd, 0x98, 0xa4, 0x6d, 0x16, 0xaf, 0x86, 0x25, + 0xf8, 0x91, 0xca, 0x0d, 0x6d, 0xb3, 0xb3, 0x09, 0xc5, 0x2e, 0xf4, 0x6e, 0x8a, 0x11, 0x13, 0x7b, + 0x3b, 0x8d, 0xdb, 0xaf, 0x89, 0x9d, 0xba, 0xc6, 0x99, 0xf9, 0xc5, 0x1a, 0xff, 0x23, 0x0d, 0xe6, + 0x92, 0xea, 0x63, 0x28, 0x45, 0x4e, 0x4a, 0x2b, 0xa8, 0xb1, 0xf8, 0xba, 0xe8, 0x47, 0x5b, 0x2b, + 0x58, 0xf5, 0x0f, 0xfb, 0x5f, 0xb4, 0x9a, 0x2f, 0xae, 0xc2, 0x15, 0x98, 0x69, 0x8d, 0xac, 0x27, + 0xf8, 0x10, 0x9d, 0x2d, 0x64, 0x1a, 0x15, 0xc2, 0xd7, 0x71, 0xad, 0xcf, 0xe8, 0x5f, 0xbd, 0x58, + 0xc8, 0xec, 0x96, 0x01, 0x02, 0x84, 0xa9, 0x7f, 0xff, 0x72, 0x5e, 0xfb, 0xaf, 0x2f, 0xe7, 0xb5, + 0xff, 0xf9, 0x72, 0x5e, 0xfb, 0xe9, 0xff, 0xcd, 0x4f, 0xbd, 0xb8, 0xd6, 0x77, 0xa8, 0x5a, 0x8b, + 0x96, 0xd3, 0x94, 0x7f, 0x89, 0x63, 0xb9, 0xa9, 0xaa, 0xba, 0x3b, 0x43, 0xff, 0x74, 0xc6, 0xf2, + 0xcf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x82, 0x9b, 0xab, 0xde, 0x11, 0x44, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -9461,6 +9653,11 @@ func (m *HashKVResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.HashRevision != 0 { + i = encodeVarintRpc(dAtA, i, uint64(m.HashRevision)) + i-- + dAtA[i] = 0x20 + } if m.CompactRevision != 0 { i = encodeVarintRpc(dAtA, i, uint64(m.CompactRevision)) i-- @@ -9581,6 +9778,13 @@ func (m *SnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintRpc(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } if len(m.Blob) > 0 { i -= len(m.Blob) copy(dAtA[i:], m.Blob) @@ -11430,6 +11634,40 @@ func (m *DowngradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DowngradeVersionTestRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DowngradeVersionTestRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DowngradeVersionTestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Ver) > 0 { + i -= len(m.Ver) + copy(dAtA[i:], m.Ver) + i = encodeVarintRpc(dAtA, i, uint64(len(m.Ver))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *StatusRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -11481,6 +11719,30 @@ func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.DowngradeInfo != nil { + { + size, err := m.DowngradeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + if m.DbSizeQuota != 0 { + i = encodeVarintRpc(dAtA, i, uint64(m.DbSizeQuota)) + i-- + dAtA[i] = 0x60 + } + if len(m.StorageVersion) > 0 { + i -= len(m.StorageVersion) + copy(dAtA[i:], m.StorageVersion) + i = encodeVarintRpc(dAtA, i, uint64(len(m.StorageVersion))) + i-- + dAtA[i] = 0x5a + } if m.IsLearner { i-- if m.IsLearner { @@ -11552,6 +11814,50 @@ func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DowngradeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DowngradeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DowngradeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.TargetVersion) > 0 { + i -= len(m.TargetVersion) + copy(dAtA[i:], m.TargetVersion) + i = encodeVarintRpc(dAtA, i, uint64(len(m.TargetVersion))) + i-- + dAtA[i] = 0x12 + } + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *AuthEnableRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -13459,6 +13765,9 @@ func (m *HashKVResponse) Size() (n int) { if m.CompactRevision != 0 { n += 1 + sovRpc(uint64(m.CompactRevision)) } + if m.HashRevision != 0 { + n += 1 + sovRpc(uint64(m.HashRevision)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -13513,6 +13822,10 @@ func (m *SnapshotResponse) Size() (n int) { if l > 0 { n += 1 + l + sovRpc(uint64(l)) } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovRpc(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -14336,6 +14649,22 @@ func (m *DowngradeResponse) Size() (n int) { return n } +func (m *DowngradeVersionTestRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ver) + if l > 0 { + n += 1 + l + sovRpc(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *StatusRequest) Size() (n int) { if m == nil { return 0 @@ -14389,6 +14718,36 @@ func (m *StatusResponse) Size() (n int) { if m.IsLearner { n += 2 } + l = len(m.StorageVersion) + if l > 0 { + n += 1 + l + sovRpc(uint64(l)) + } + if m.DbSizeQuota != 0 { + n += 1 + sovRpc(uint64(m.DbSizeQuota)) + } + if m.DowngradeInfo != nil { + l = m.DowngradeInfo.Size() + n += 1 + l + sovRpc(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DowngradeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Enabled { + n += 2 + } + l = len(m.TargetVersion) + if l > 0 { + n += 1 + l + sovRpc(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -17568,6 +17927,25 @@ func (m *HashKVResponse) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HashRevision", wireType) + } + m.HashRevision = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HashRevision |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) @@ -17865,6 +18243,38 @@ func (m *SnapshotResponse) Unmarshal(dAtA []byte) error { m.Blob = []byte{} } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) @@ -22145,6 +22555,89 @@ func (m *DowngradeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *DowngradeVersionTestRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DowngradeVersionTestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DowngradeVersionTestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *StatusRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -22459,6 +22952,196 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error { } } m.IsLearner = bool(v != 0) + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DbSizeQuota", wireType) + } + m.DbSizeQuota = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DbSizeQuota |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DowngradeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DowngradeInfo == nil { + m.DowngradeInfo = &DowngradeInfo{} + } + if err := m.DowngradeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DowngradeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DowngradeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DowngradeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto index 4ccc234744c..983dc01725f 100644 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto +++ b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto @@ -4,13 +4,36 @@ package etcdserverpb; import "gogoproto/gogo.proto"; import "etcd/api/mvccpb/kv.proto"; import "etcd/api/authpb/auth.proto"; +import "etcd/api/versionpb/version.proto"; // for grpc-gateway import "google/api/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +option go_package = "go.etcd.io/etcd/api/v3/etcdserverpb"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + security_definitions: { + security: { + key: "ApiKey"; + value: { + type: TYPE_API_KEY; + in: IN_HEADER; + name: "Authorization"; + } + } + } + security: { + security_requirement: { + key: "ApiKey"; + value: {}; + } + } +}; + service KV { // Range gets the keys in the range from the key-value store. rpc Range(RangeRequest) returns (RangeResponse) { @@ -388,13 +411,16 @@ service Auth { } message ResponseHeader { + option (versionpb.etcd_version_msg) = "3.0"; + // cluster_id is the ID of the cluster which sent the response. uint64 cluster_id = 1; // member_id is the ID of the member which sent the response. uint64 member_id = 2; - // revision is the key-value store revision when the request was applied. + // revision is the key-value store revision when the request was applied, and it's + // unset (so 0) in case of calls not interacting with key-value store. // For watch progress responses, the header.revision indicates progress. All future events - // recieved in this stream are guaranteed to have a higher revision number than the + // received in this stream are guaranteed to have a higher revision number than the // header.revision number. int64 revision = 3; // raft_term is the raft term when the request was applied. @@ -402,17 +428,21 @@ message ResponseHeader { } message RangeRequest { + option (versionpb.etcd_version_msg) = "3.0"; + enum SortOrder { - NONE = 0; // default, no sorting - ASCEND = 1; // lowest target value first - DESCEND = 2; // highest target value first + option (versionpb.etcd_version_enum) = "3.0"; + NONE = 0; // default, no sorting + ASCEND = 1; // lowest target value first + DESCEND = 2; // highest target value first } enum SortTarget { - KEY = 0; - VERSION = 1; - CREATE = 2; - MOD = 3; - VALUE = 4; + option (versionpb.etcd_version_enum) = "3.0"; + KEY = 0; + VERSION = 1; + CREATE = 2; + MOD = 3; + VALUE = 4; } // key is the first key for the range. If range_end is not given, the request only looks up key. @@ -453,33 +483,39 @@ message RangeRequest { // min_mod_revision is the lower bound for returned key mod revisions; all keys with // lesser mod revisions will be filtered away. - int64 min_mod_revision = 10; + int64 min_mod_revision = 10 [(versionpb.etcd_version_field)="3.1"]; // max_mod_revision is the upper bound for returned key mod revisions; all keys with // greater mod revisions will be filtered away. - int64 max_mod_revision = 11; + int64 max_mod_revision = 11 [(versionpb.etcd_version_field)="3.1"]; // min_create_revision is the lower bound for returned key create revisions; all keys with // lesser create revisions will be filtered away. - int64 min_create_revision = 12; + int64 min_create_revision = 12 [(versionpb.etcd_version_field)="3.1"]; // max_create_revision is the upper bound for returned key create revisions; all keys with // greater create revisions will be filtered away. - int64 max_create_revision = 13; + int64 max_create_revision = 13 [(versionpb.etcd_version_field)="3.1"]; } message RangeResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // kvs is the list of key-value pairs matched by the range request. // kvs is empty when count is requested. repeated mvccpb.KeyValue kvs = 2; // more indicates if there are more keys to return in the requested range. bool more = 3; - // count is set to the number of keys within the range when requested. + // count is set to the actual number of keys within the range when requested. + // Unlike Kvs, it is unaffected by limits and filters (e.g., Min/Max, Create/Modify, Revisions) + // and reflects the full count within the specified range. int64 count = 4; } message PutRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // key is the key, in bytes, to put into the key-value store. bytes key = 1; // value is the value, in bytes, to associate with the key in the key-value store. @@ -490,24 +526,28 @@ message PutRequest { // If prev_kv is set, etcd gets the previous key-value pair before changing it. // The previous key-value pair will be returned in the put response. - bool prev_kv = 4; + bool prev_kv = 4 [(versionpb.etcd_version_field)="3.1"]; // If ignore_value is set, etcd updates the key using its current value. // Returns an error if the key does not exist. - bool ignore_value = 5; + bool ignore_value = 5 [(versionpb.etcd_version_field)="3.2"]; // If ignore_lease is set, etcd updates the key using its current lease. // Returns an error if the key does not exist. - bool ignore_lease = 6; + bool ignore_lease = 6 [(versionpb.etcd_version_field)="3.2"]; } message PutResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // if prev_kv is set in the request, the previous key-value pair will be returned. - mvccpb.KeyValue prev_kv = 2; + mvccpb.KeyValue prev_kv = 2 [(versionpb.etcd_version_field)="3.1"]; } message DeleteRangeRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // key is the first key to delete in the range. bytes key = 1; // range_end is the key following the last key to delete for the range [key, range_end). @@ -519,50 +559,61 @@ message DeleteRangeRequest { // If prev_kv is set, etcd gets the previous key-value pairs before deleting it. // The previous key-value pairs will be returned in the delete response. - bool prev_kv = 3; + bool prev_kv = 3 [(versionpb.etcd_version_field)="3.1"]; } message DeleteRangeResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // deleted is the number of keys deleted by the delete range request. int64 deleted = 2; // if prev_kv is set in the request, the previous key-value pairs will be returned. - repeated mvccpb.KeyValue prev_kvs = 3; + repeated mvccpb.KeyValue prev_kvs = 3 [(versionpb.etcd_version_field)="3.1"]; } message RequestOp { + option (versionpb.etcd_version_msg) = "3.0"; // request is a union of request types accepted by a transaction. oneof request { RangeRequest request_range = 1; PutRequest request_put = 2; DeleteRangeRequest request_delete_range = 3; - TxnRequest request_txn = 4; + TxnRequest request_txn = 4 [(versionpb.etcd_version_field)="3.3"]; } } message ResponseOp { + option (versionpb.etcd_version_msg) = "3.0"; + // response is a union of response types returned by a transaction. oneof response { RangeResponse response_range = 1; PutResponse response_put = 2; DeleteRangeResponse response_delete_range = 3; - TxnResponse response_txn = 4; + TxnResponse response_txn = 4 [(versionpb.etcd_version_field)="3.3"]; } } message Compare { + option (versionpb.etcd_version_msg) = "3.0"; + enum CompareResult { + option (versionpb.etcd_version_enum) = "3.0"; + EQUAL = 0; GREATER = 1; LESS = 2; - NOT_EQUAL = 3; + NOT_EQUAL = 3 [(versionpb.etcd_version_enum_value)="3.1"]; } enum CompareTarget { + option (versionpb.etcd_version_enum) = "3.0"; + VERSION = 0; CREATE = 1; MOD = 2; VALUE = 3; - LEASE = 4; + LEASE = 4 [(versionpb.etcd_version_enum_value)="3.3"]; } // result is logical comparison operation for this comparison. CompareResult result = 1; @@ -580,13 +631,13 @@ message Compare { // value is the value of the given key, in bytes. bytes value = 7; // lease is the lease id of the given key. - int64 lease = 8; + int64 lease = 8 [(versionpb.etcd_version_field)="3.3"]; // leave room for more target_union field tags, jump to 64 } // range_end compares the given target to all keys in the range [key, range_end). // See RangeRequest for more details on key ranges. - bytes range_end = 64; + bytes range_end = 64 [(versionpb.etcd_version_field)="3.3"]; // TODO: fill out with most of the rest of RangeRequest fields when needed. } @@ -606,6 +657,8 @@ message Compare { // true. // 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false. message TxnRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // compare is a list of predicates representing a conjunction of terms. // If the comparisons succeed, then the success requests will be processed in order, // and the response will contain their respective responses in order. @@ -619,6 +672,8 @@ message TxnRequest { } message TxnResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // succeeded is set to true if the compare evaluated to true or false otherwise. bool succeeded = 2; @@ -630,6 +685,8 @@ message TxnResponse { // CompactionRequest compacts the key-value store up to a given revision. All superseded keys // with a revision less than the compaction revision will be removed. message CompactionRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // revision is the key-value store revision for the compaction operation. int64 revision = 1; // physical is set so the RPC will wait until the compaction is physically @@ -639,35 +696,48 @@ message CompactionRequest { } message CompactionResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message HashRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message HashKVRequest { + option (versionpb.etcd_version_msg) = "3.3"; // revision is the key-value store revision for the hash operation. int64 revision = 1; } message HashKVResponse { + option (versionpb.etcd_version_msg) = "3.3"; + ResponseHeader header = 1; // hash is the hash value computed from the responding member's MVCC keys up to a given revision. uint32 hash = 2; // compact_revision is the compacted revision of key-value store when hash begins. int64 compact_revision = 3; + // hash_revision is the revision up to which the hash is calculated. + int64 hash_revision = 4 [(versionpb.etcd_version_field)="3.6"]; } message HashResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // hash is the hash value computed from the responding member's KV's backend. uint32 hash = 2; } message SnapshotRequest { + option (versionpb.etcd_version_msg) = "3.3"; } message SnapshotResponse { + option (versionpb.etcd_version_msg) = "3.3"; + // header has the current key-value store information. The first header in the snapshot // stream indicates the point in time of the snapshot. ResponseHeader header = 1; @@ -677,18 +747,26 @@ message SnapshotResponse { // blob contains the next chunk of the snapshot in the snapshot stream. bytes blob = 3; + + // local version of server that created the snapshot. + // In cluster with binaries with different version, each cluster can return different result. + // Informs which etcd server version should be used when restoring the snapshot. + string version = 4 [(versionpb.etcd_version_field)="3.6"]; } message WatchRequest { + option (versionpb.etcd_version_msg) = "3.0"; // request_union is a request to either create a new watcher or cancel an existing watcher. oneof request_union { WatchCreateRequest create_request = 1; WatchCancelRequest cancel_request = 2; - WatchProgressRequest progress_request = 3; + WatchProgressRequest progress_request = 3 [(versionpb.etcd_version_field)="3.4"]; } } message WatchCreateRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // key is the key to register for watching. bytes key = 1; @@ -709,6 +787,8 @@ message WatchCreateRequest { bool progress_notify = 4; enum FilterType { + option (versionpb.etcd_version_enum) = "3.1"; + // filter out put event. NOPUT = 0; // filter out delete event. @@ -716,34 +796,38 @@ message WatchCreateRequest { } // filters filter the events at server side before it sends back to the watcher. - repeated FilterType filters = 5; + repeated FilterType filters = 5 [(versionpb.etcd_version_field)="3.1"]; // If prev_kv is set, created watcher gets the previous KV before the event happens. // If the previous KV is already compacted, nothing will be returned. - bool prev_kv = 6; + bool prev_kv = 6 [(versionpb.etcd_version_field)="3.1"]; // If watch_id is provided and non-zero, it will be assigned to this watcher. // Since creating a watcher in etcd is not a synchronous operation, // this can be used ensure that ordering is correct when creating multiple // watchers on the same stream. Creating a watcher with an ID already in // use on the stream will cause an error to be returned. - int64 watch_id = 7; + int64 watch_id = 7 [(versionpb.etcd_version_field)="3.4"]; // fragment enables splitting large revisions into multiple watch responses. - bool fragment = 8; + bool fragment = 8 [(versionpb.etcd_version_field)="3.4"]; } message WatchCancelRequest { + option (versionpb.etcd_version_msg) = "3.1"; // watch_id is the watcher id to cancel so that no more events are transmitted. - int64 watch_id = 1; + int64 watch_id = 1 [(versionpb.etcd_version_field)="3.1"]; } // Requests the a watch stream progress status be sent in the watch response stream as soon as // possible. message WatchProgressRequest { + option (versionpb.etcd_version_msg) = "3.4"; } message WatchResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // watch_id is the ID of the watcher that corresponds to the response. int64 watch_id = 2; @@ -754,7 +838,8 @@ message WatchResponse { // All events sent to the created watcher will attach with the same watch_id. bool created = 3; - // canceled is set to true if the response is for a cancel watch request. + // canceled is set to true if the response is for a cancel watch request + // or if the start_revision has already been compacted. // No further events will be sent to the canceled watcher. bool canceled = 4; @@ -769,15 +854,17 @@ message WatchResponse { int64 compact_revision = 5; // cancel_reason indicates the reason for canceling the watcher. - string cancel_reason = 6; + string cancel_reason = 6 [(versionpb.etcd_version_field)="3.4"]; // framgment is true if large watch response was split over multiple responses. - bool fragment = 7; + bool fragment = 7 [(versionpb.etcd_version_field)="3.4"]; repeated mvccpb.Event events = 11; } message LeaseGrantRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // TTL is the advisory time-to-live in seconds. Expired lease will return -1. int64 TTL = 1; // ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID. @@ -785,6 +872,8 @@ message LeaseGrantRequest { } message LeaseGrantResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // ID is the lease ID for the granted lease. int64 ID = 2; @@ -794,15 +883,21 @@ message LeaseGrantResponse { } message LeaseRevokeRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted. int64 ID = 1; } message LeaseRevokeResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message LeaseCheckpoint { + option (versionpb.etcd_version_msg) = "3.4"; + // ID is the lease ID to checkpoint. int64 ID = 1; @@ -811,19 +906,26 @@ message LeaseCheckpoint { } message LeaseCheckpointRequest { + option (versionpb.etcd_version_msg) = "3.4"; + repeated LeaseCheckpoint checkpoints = 1; } message LeaseCheckpointResponse { + option (versionpb.etcd_version_msg) = "3.4"; + ResponseHeader header = 1; } message LeaseKeepAliveRequest { + option (versionpb.etcd_version_msg) = "3.0"; // ID is the lease ID for the lease to keep alive. int64 ID = 1; } message LeaseKeepAliveResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // ID is the lease ID from the keep alive request. int64 ID = 2; @@ -832,6 +934,7 @@ message LeaseKeepAliveResponse { } message LeaseTimeToLiveRequest { + option (versionpb.etcd_version_msg) = "3.1"; // ID is the lease ID for the lease. int64 ID = 1; // keys is true to query all the keys attached to this lease. @@ -839,6 +942,8 @@ message LeaseTimeToLiveRequest { } message LeaseTimeToLiveResponse { + option (versionpb.etcd_version_msg) = "3.1"; + ResponseHeader header = 1; // ID is the lease ID from the keep alive request. int64 ID = 2; @@ -851,19 +956,26 @@ message LeaseTimeToLiveResponse { } message LeaseLeasesRequest { + option (versionpb.etcd_version_msg) = "3.3"; } message LeaseStatus { + option (versionpb.etcd_version_msg) = "3.3"; + int64 ID = 1; // TODO: int64 TTL = 2; } message LeaseLeasesResponse { + option (versionpb.etcd_version_msg) = "3.3"; + ResponseHeader header = 1; repeated LeaseStatus leases = 2; } message Member { + option (versionpb.etcd_version_msg) = "3.0"; + // ID is the member ID for this member. uint64 ID = 1; // name is the human-readable name of the member. If the member is not started, the name will be an empty string. @@ -873,17 +985,21 @@ message Member { // clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty. repeated string clientURLs = 4; // isLearner indicates if the member is raft learner. - bool isLearner = 5; + bool isLearner = 5 [(versionpb.etcd_version_field)="3.4"]; } message MemberAddRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // peerURLs is the list of URLs the added member will use to communicate with the cluster. repeated string peerURLs = 1; // isLearner indicates if the added member is raft learner. - bool isLearner = 2; + bool isLearner = 2 [(versionpb.etcd_version_field)="3.4"]; } message MemberAddResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // member is the member information for the added member. Member member = 2; @@ -892,17 +1008,22 @@ message MemberAddResponse { } message MemberRemoveRequest { + option (versionpb.etcd_version_msg) = "3.0"; // ID is the member ID of the member to remove. uint64 ID = 1; } message MemberRemoveResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // members is a list of all members after removing the member. repeated Member members = 2; } message MemberUpdateRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // ID is the member ID of the member to update. uint64 ID = 1; // peerURLs is the new list of URLs the member will use to communicate with the cluster. @@ -910,59 +1031,80 @@ message MemberUpdateRequest { } message MemberUpdateResponse{ + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // members is a list of all members after updating the member. - repeated Member members = 2; + repeated Member members = 2 [(versionpb.etcd_version_field)="3.1"]; } message MemberListRequest { - bool linearizable = 1; + option (versionpb.etcd_version_msg) = "3.0"; + + bool linearizable = 1 [(versionpb.etcd_version_field)="3.5"]; } message MemberListResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // members is a list of all members associated with the cluster. repeated Member members = 2; } message MemberPromoteRequest { + option (versionpb.etcd_version_msg) = "3.4"; // ID is the member ID of the member to promote. uint64 ID = 1; } message MemberPromoteResponse { + option (versionpb.etcd_version_msg) = "3.4"; + ResponseHeader header = 1; // members is a list of all members after promoting the member. repeated Member members = 2; } message DefragmentRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message DefragmentResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message MoveLeaderRequest { + option (versionpb.etcd_version_msg) = "3.3"; // targetID is the node ID for the new leader. uint64 targetID = 1; } message MoveLeaderResponse { + option (versionpb.etcd_version_msg) = "3.3"; + ResponseHeader header = 1; } enum AlarmType { + option (versionpb.etcd_version_enum) = "3.0"; + NONE = 0; // default, used to query if any alarm is active NOSPACE = 1; // space quota is exhausted - CORRUPT = 2; // kv store corruption detected + CORRUPT = 2 [(versionpb.etcd_version_enum_value)="3.3"]; // kv store corruption detected } message AlarmRequest { + option (versionpb.etcd_version_msg) = "3.0"; + enum AlarmAction { - GET = 0; - ACTIVATE = 1; - DEACTIVATE = 2; + option (versionpb.etcd_version_enum) = "3.0"; + + GET = 0; + ACTIVATE = 1; + DEACTIVATE = 2; } // action is the kind of alarm request to issue. The action // may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a @@ -976,6 +1118,7 @@ message AlarmRequest { } message AlarmMember { + option (versionpb.etcd_version_msg) = "3.0"; // memberID is the ID of the member associated with the raised alarm. uint64 memberID = 1; // alarm is the type of alarm which has been raised. @@ -983,13 +1126,19 @@ message AlarmMember { } message AlarmResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // alarms is a list of alarms associated with the alarm request. repeated AlarmMember alarms = 2; } message DowngradeRequest { + option (versionpb.etcd_version_msg) = "3.5"; + enum DowngradeAction { + option (versionpb.etcd_version_enum) = "3.5"; + VALIDATE = 0; ENABLE = 1; CANCEL = 2; @@ -1004,15 +1153,30 @@ message DowngradeRequest { } message DowngradeResponse { + option (versionpb.etcd_version_msg) = "3.5"; + ResponseHeader header = 1; // version is the current cluster version. string version = 2; } +// DowngradeVersionTestRequest is used for test only. The version in +// this request will be read as the WAL record version.If the downgrade +// target version is less than this version, then the downgrade(online) +// or migration(offline) isn't safe, so shouldn't be allowed. +message DowngradeVersionTestRequest { + option (versionpb.etcd_version_msg) = "3.6"; + + string ver = 1; +} + message StatusRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message StatusResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // version is the cluster protocol version used by the responding member. string version = 2; @@ -1025,55 +1189,82 @@ message StatusResponse { // raftTerm is the current raft term of the responding member. uint64 raftTerm = 6; // raftAppliedIndex is the current raft applied index of the responding member. - uint64 raftAppliedIndex = 7; + uint64 raftAppliedIndex = 7 [(versionpb.etcd_version_field)="3.4"]; // errors contains alarm/health information and status. - repeated string errors = 8; + repeated string errors = 8 [(versionpb.etcd_version_field)="3.4"]; // dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member. - int64 dbSizeInUse = 9; + int64 dbSizeInUse = 9 [(versionpb.etcd_version_field)="3.4"]; // isLearner indicates if the member is raft learner. - bool isLearner = 10; + bool isLearner = 10 [(versionpb.etcd_version_field)="3.4"]; + // storageVersion is the version of the db file. It might be updated with delay in relationship to the target cluster version. + string storageVersion = 11 [(versionpb.etcd_version_field)="3.6"]; + // dbSizeQuota is the configured etcd storage quota in bytes (the value passed to etcd instance by flag --quota-backend-bytes) + int64 dbSizeQuota = 12 [(versionpb.etcd_version_field)="3.6"]; + // downgradeInfo indicates if there is downgrade process. + DowngradeInfo downgradeInfo = 13 [(versionpb.etcd_version_field)="3.6"]; +} + +message DowngradeInfo { + // enabled indicates whether the cluster is enabled to downgrade. + bool enabled = 1; + // targetVersion is the target downgrade version. + string targetVersion = 2; } message AuthEnableRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message AuthDisableRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message AuthStatusRequest { + option (versionpb.etcd_version_msg) = "3.5"; } message AuthenticateRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string name = 1; string password = 2; } message AuthUserAddRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string name = 1; string password = 2; - authpb.UserAddOptions options = 3; - string hashedPassword = 4; + authpb.UserAddOptions options = 3 [(versionpb.etcd_version_field)="3.4"]; + string hashedPassword = 4 [(versionpb.etcd_version_field)="3.5"]; } message AuthUserGetRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string name = 1; } message AuthUserDeleteRequest { + option (versionpb.etcd_version_msg) = "3.0"; // name is the name of the user to delete. string name = 1; } message AuthUserChangePasswordRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // name is the name of the user whose password is being changed. string name = 1; // password is the new password for the user. Note that this field will be removed in the API layer. string password = 2; // hashedPassword is the new password for the user. Note that this field will be initialized in the API layer. - string hashedPassword = 3; + string hashedPassword = 3 [(versionpb.etcd_version_field)="3.5"]; } message AuthUserGrantRoleRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // user is the name of the user which should be granted a given role. string user = 1; // role is the name of the role to grant to the user. @@ -1081,30 +1272,42 @@ message AuthUserGrantRoleRequest { } message AuthUserRevokeRoleRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string name = 1; string role = 2; } message AuthRoleAddRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // name is the name of the role to add to the authentication system. string name = 1; } message AuthRoleGetRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string role = 1; } message AuthUserListRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message AuthRoleListRequest { + option (versionpb.etcd_version_msg) = "3.0"; } message AuthRoleDeleteRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string role = 1; } message AuthRoleGrantPermissionRequest { + option (versionpb.etcd_version_msg) = "3.0"; + // name is the name of the role which will be granted the permission. string name = 1; // perm is the permission to grant to the role. @@ -1112,20 +1315,28 @@ message AuthRoleGrantPermissionRequest { } message AuthRoleRevokePermissionRequest { + option (versionpb.etcd_version_msg) = "3.0"; + string role = 1; bytes key = 2; bytes range_end = 3; } message AuthEnableResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthDisableResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthStatusResponse { + option (versionpb.etcd_version_msg) = "3.5"; + ResponseHeader header = 1; bool enabled = 2; // authRevision is the current revision of auth store @@ -1133,67 +1344,93 @@ message AuthStatusResponse { } message AuthenticateResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; // token is an authorized token that can be used in succeeding RPCs string token = 2; } message AuthUserAddResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthUserGetResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; repeated string roles = 2; } message AuthUserDeleteResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthUserChangePasswordResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthUserGrantRoleResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthUserRevokeRoleResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthRoleAddResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthRoleGetResponse { - ResponseHeader header = 1; + ResponseHeader header = 1 [(versionpb.etcd_version_field)="3.0"]; - repeated authpb.Permission perm = 2; + repeated authpb.Permission perm = 2 [(versionpb.etcd_version_field)="3.0"]; } message AuthRoleListResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; repeated string roles = 2; } message AuthUserListResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; repeated string users = 2; } message AuthRoleDeleteResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthRoleGrantPermissionResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } message AuthRoleRevokePermissionResponse { + option (versionpb.etcd_version_msg) = "3.0"; + ResponseHeader header = 1; } diff --git a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go b/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go index cf0d4281806..85a2a741f31 100644 --- a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go +++ b/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go @@ -11,6 +11,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" + _ "go.etcd.io/etcd/api/v3/versionpb" ) // Reference imports to suppress errors if they are not otherwise used. @@ -286,30 +287,34 @@ func init() { func init() { proto.RegisterFile("membership.proto", fileDescriptor_949fe0d019050ef5) } var fileDescriptor_949fe0d019050ef5 = []byte{ - // 367 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x4e, 0xf2, 0x40, - 0x14, 0x85, 0x99, 0x42, 0xf8, 0xdb, 0xcb, 0x1f, 0xc4, 0x09, 0x89, 0x8d, 0x68, 0x25, 0x5d, 0xb1, - 0x30, 0x98, 0xe8, 0x13, 0xa0, 0xb0, 0x20, 0x81, 0xcd, 0x18, 0xdd, 0x92, 0x56, 0x2e, 0xd8, 0xa4, - 0x74, 0xea, 0xcc, 0x54, 0xd7, 0xbe, 0x85, 0x4f, 0xe0, 0xb3, 0xb0, 0xf4, 0x11, 0x14, 0x5f, 0xc4, - 0x74, 0x5a, 0x4a, 0x49, 0xdc, 0xb8, 0xbb, 0x3d, 0xbd, 0xf7, 0x9c, 0xf3, 0x35, 0x85, 0xd6, 0x0a, - 0x57, 0x3e, 0x0a, 0xf9, 0x18, 0xc4, 0xfd, 0x58, 0x70, 0xc5, 0xe9, 0xff, 0x9d, 0x12, 0xfb, 0xc7, - 0xed, 0x25, 0x5f, 0x72, 0xfd, 0xe2, 0x22, 0x9d, 0xb2, 0x1d, 0x77, 0x02, 0x4d, 0xe6, 0x2d, 0xd4, - 0x40, 0x29, 0x11, 0xf8, 0x89, 0x42, 0x49, 0x3b, 0x60, 0xc5, 0x88, 0x62, 0x96, 0x88, 0x50, 0xda, - 0xa4, 0x5b, 0xed, 0x59, 0xcc, 0x4c, 0x85, 0x3b, 0x11, 0x4a, 0x7a, 0x0a, 0x10, 0xc8, 0x59, 0x88, - 0x9e, 0x88, 0x50, 0xd8, 0x46, 0x97, 0xf4, 0x4c, 0x66, 0x05, 0x72, 0x92, 0x09, 0xee, 0x00, 0xa0, - 0xe4, 0x44, 0xa1, 0x16, 0x79, 0x2b, 0xb4, 0x49, 0x97, 0xf4, 0x2c, 0xa6, 0x67, 0x7a, 0x06, 0x8d, - 0x87, 0x30, 0xc0, 0x48, 0x65, 0xfe, 0x86, 0xf6, 0x87, 0x4c, 0x4a, 0x13, 0xdc, 0x77, 0x02, 0xf5, - 0xa9, 0xee, 0x4d, 0x9b, 0x60, 0x8c, 0x87, 0xfa, 0xba, 0xc6, 0x8c, 0xf1, 0x90, 0x8e, 0xe0, 0x40, - 0x78, 0x0b, 0x35, 0xf3, 0x8a, 0x08, 0xdd, 0xa0, 0x71, 0x79, 0xd2, 0x2f, 0x93, 0xf6, 0xf7, 0x81, - 0x58, 0x53, 0xec, 0x03, 0x8e, 0xe0, 0x30, 0x5b, 0x2f, 0x1b, 0x55, 0xb5, 0x91, 0xbd, 0x6f, 0x54, - 0x32, 0xc9, 0xbf, 0xee, 0x4e, 0x71, 0xcf, 0xc1, 0xbe, 0x09, 0x13, 0xa9, 0x50, 0xdc, 0xa3, 0x90, - 0x01, 0x8f, 0x6e, 0x51, 0x31, 0x7c, 0x4a, 0x50, 0x2a, 0xda, 0x82, 0xea, 0x33, 0x8a, 0x1c, 0x3c, - 0x1d, 0xdd, 0x57, 0x02, 0x9d, 0x7c, 0x7d, 0x5a, 0x38, 0x95, 0x2e, 0x3a, 0x60, 0xe5, 0xa5, 0x0a, - 0x64, 0x33, 0x13, 0x34, 0xf8, 0x2f, 0x8d, 0x8d, 0x3f, 0x37, 0x1e, 0xc1, 0xd1, 0x90, 0xbf, 0x44, - 0x4b, 0xe1, 0xcd, 0x71, 0x1c, 0x2d, 0x78, 0x29, 0xde, 0x86, 0x7f, 0x18, 0x79, 0x7e, 0x88, 0x73, - 0x1d, 0x6e, 0xb2, 0xed, 0xe3, 0x16, 0xc5, 0x28, 0x50, 0xae, 0xdb, 0xeb, 0x2f, 0xa7, 0xb2, 0xde, - 0x38, 0xe4, 0x63, 0xe3, 0x90, 0xcf, 0x8d, 0x43, 0xde, 0xbe, 0x9d, 0x8a, 0x5f, 0xd7, 0xff, 0xd3, - 0xd5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x93, 0x7d, 0x0b, 0x87, 0x02, 0x00, 0x00, + // 422 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xed, 0x3a, 0x55, 0x6b, 0x4f, 0x51, 0x28, 0x2b, 0x24, 0xac, 0x06, 0x8c, 0x55, 0x2e, 0x39, + 0xd9, 0x12, 0x51, 0x0f, 0x70, 0x03, 0xd2, 0x43, 0x10, 0xe5, 0xb0, 0xa8, 0x1c, 0xb8, 0x44, 0xeb, + 0x66, 0x62, 0x56, 0x72, 0xbc, 0x66, 0x77, 0x5d, 0xee, 0x1c, 0xf9, 0x02, 0xfe, 0x82, 0x13, 0xff, + 0xd0, 0x23, 0x9f, 0x00, 0xe1, 0x47, 0x90, 0x77, 0x9d, 0xd8, 0x11, 0x9c, 0x7a, 0x1b, 0x3f, 0xcf, + 0xbc, 0x79, 0xef, 0xed, 0xc0, 0xf1, 0x0a, 0x57, 0x19, 0x2a, 0xfd, 0x51, 0x54, 0x49, 0xa5, 0xa4, + 0x91, 0xf4, 0x4e, 0x87, 0x54, 0xd9, 0xc9, 0xfd, 0x5c, 0xe6, 0xd2, 0xfe, 0x48, 0x9b, 0xca, 0xf5, + 0x9c, 0xc4, 0x68, 0xae, 0x16, 0x29, 0xaf, 0x44, 0x7a, 0x8d, 0x4a, 0x0b, 0x59, 0x56, 0xd9, 0xa6, + 0x72, 0x1d, 0xa7, 0x97, 0x30, 0x64, 0x7c, 0x69, 0x5e, 0x18, 0xa3, 0x44, 0x56, 0x1b, 0xd4, 0x74, + 0x04, 0x41, 0x85, 0xa8, 0xe6, 0xb5, 0x2a, 0x74, 0x48, 0xe2, 0xc1, 0x38, 0x60, 0x7e, 0x03, 0x5c, + 0xaa, 0x42, 0xd3, 0x47, 0x00, 0x42, 0xcf, 0x0b, 0xe4, 0xaa, 0x44, 0x15, 0x7a, 0x31, 0x19, 0xfb, + 0x2c, 0x10, 0xfa, 0x8d, 0x03, 0x9e, 0x1f, 0x7e, 0xf9, 0x11, 0x0e, 0x26, 0xc9, 0xd9, 0xe9, 0x6b, + 0x80, 0x1e, 0x25, 0x85, 0xfd, 0x92, 0xaf, 0x30, 0x24, 0x31, 0x19, 0x07, 0xcc, 0xd6, 0xf4, 0x31, + 0x1c, 0x5d, 0x15, 0x02, 0x4b, 0xe3, 0x16, 0x79, 0x76, 0x11, 0x38, 0xa8, 0x59, 0xd5, 0x71, 0x7d, + 0x27, 0x70, 0x70, 0x61, 0xbd, 0xd2, 0x21, 0x78, 0xb3, 0xa9, 0xa5, 0xd9, 0x67, 0xde, 0x6c, 0x4a, + 0xcf, 0xe1, 0xae, 0xe2, 0x4b, 0x33, 0xe7, 0xdb, 0x5d, 0x56, 0xd3, 0xd1, 0xd3, 0x87, 0x49, 0x3f, + 0x9d, 0x64, 0xd7, 0x22, 0x1b, 0xaa, 0x5d, 0xcb, 0xe7, 0x70, 0xcf, 0xb5, 0xf7, 0x89, 0x06, 0x96, + 0x28, 0xdc, 0x25, 0xea, 0x91, 0xb4, 0x2f, 0xd2, 0x21, 0x9d, 0xe2, 0x33, 0x08, 0x5f, 0x15, 0xb5, + 0x36, 0xa8, 0xde, 0xbb, 0xb0, 0xdf, 0xa1, 0x61, 0xf8, 0xa9, 0x46, 0x6d, 0xe8, 0x31, 0x0c, 0xae, + 0x51, 0xb5, 0x51, 0x34, 0x65, 0x37, 0xf6, 0x95, 0xc0, 0xa8, 0x9d, 0xbb, 0xd8, 0x72, 0xf7, 0x46, + 0x47, 0x10, 0xb4, 0x32, 0xb7, 0x21, 0xf8, 0x0e, 0xb0, 0x51, 0xfc, 0xc7, 0x83, 0x77, 0x7b, 0x0f, + 0x6f, 0xe1, 0xc1, 0x54, 0x7e, 0x2e, 0x73, 0xc5, 0x17, 0x38, 0x2b, 0x97, 0xb2, 0xa7, 0x23, 0x84, + 0x43, 0x2c, 0x79, 0x56, 0xe0, 0xc2, 0xaa, 0xf0, 0xd9, 0xe6, 0x73, 0x63, 0xce, 0xfb, 0xd7, 0xdc, + 0xcb, 0x67, 0x37, 0xbf, 0xa3, 0xbd, 0x9b, 0x75, 0x44, 0x7e, 0xae, 0x23, 0xf2, 0x6b, 0x1d, 0x91, + 0x6f, 0x7f, 0xa2, 0xbd, 0x0f, 0x4f, 0x72, 0x99, 0x34, 0x37, 0x9a, 0x08, 0x99, 0x76, 0xb7, 0x3a, + 0x49, 0xfb, 0x82, 0xb3, 0x03, 0x7b, 0xaa, 0x93, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x56, + 0x21, 0x97, 0x04, 0x03, 0x00, 0x00, } func (m *RaftAttributes) Marshal() (dAtA []byte, err error) { diff --git a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto b/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto index e63e9ecc994..cbccfefccf4 100644 --- a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto +++ b/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package membershippb; import "gogoproto/gogo.proto"; +import "etcd/api/versionpb/version.proto"; + +option go_package = "go.etcd.io/etcd/api/v3/membershippb"; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; @@ -10,6 +13,8 @@ option (gogoproto.goproto_getters_all) = false; // RaftAttributes represents the raft related attributes of an etcd member. message RaftAttributes { + option (versionpb.etcd_version_msg) = "3.5"; + // peerURLs is the list of peers in the raft cluster. repeated string peer_urls = 1; // isLearner indicates if the member is raft learner. @@ -18,26 +23,36 @@ message RaftAttributes { // Attributes represents all the non-raft related attributes of an etcd member. message Attributes { + option (versionpb.etcd_version_msg) = "3.5"; + string name = 1; repeated string client_urls = 2; } message Member { + option (versionpb.etcd_version_msg) = "3.5"; + uint64 ID = 1; RaftAttributes raft_attributes = 2; Attributes member_attributes = 3; } message ClusterVersionSetRequest { + option (versionpb.etcd_version_msg) = "3.5"; + string ver = 1; } message ClusterMemberAttrSetRequest { + option (versionpb.etcd_version_msg) = "3.5"; + uint64 member_ID = 1; Attributes member_attributes = 2; } message DowngradeInfoSetRequest { + option (versionpb.etcd_version_msg) = "3.5"; + bool enabled = 1; string ver = 2; } \ No newline at end of file diff --git a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go b/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go index fc258d6c206..2fed4242ccc 100644 --- a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go +++ b/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go @@ -164,26 +164,28 @@ func init() { func init() { proto.RegisterFile("kv.proto", fileDescriptor_2216fe83c9c12408) } var fileDescriptor_2216fe83c9c12408 = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4e, 0xc2, 0x40, - 0x14, 0x86, 0x3b, 0x14, 0x0a, 0x3e, 0x08, 0x36, 0x13, 0x12, 0x27, 0x2e, 0x26, 0x95, 0x8d, 0x18, - 0x13, 0x4c, 0xf0, 0x06, 0xc6, 0xae, 0x70, 0x61, 0x1a, 0x74, 0x4b, 0x4a, 0x79, 0x21, 0xa4, 0x94, - 0x69, 0x4a, 0x9d, 0xa4, 0x37, 0x71, 0xef, 0xde, 0x73, 0xb0, 0xe4, 0x08, 0x52, 0x2f, 0x62, 0xfa, - 0xc6, 0xe2, 0xc6, 0xcd, 0xe4, 0xfd, 0xff, 0xff, 0x65, 0xe6, 0x7f, 0x03, 0x9d, 0x58, 0x8f, 0xd3, - 0x4c, 0xe5, 0x8a, 0x3b, 0x89, 0x8e, 0xa2, 0x74, 0x71, 0x39, 0x58, 0xa9, 0x95, 0x22, 0xeb, 0xae, - 0x9a, 0x4c, 0x3a, 0xfc, 0x64, 0xd0, 0x99, 0x62, 0xf1, 0x1a, 0x6e, 0xde, 0x90, 0xbb, 0x60, 0xc7, - 0x58, 0x08, 0xe6, 0xb1, 0x51, 0x2f, 0xa8, 0x46, 0x7e, 0x0d, 0xe7, 0x51, 0x86, 0x61, 0x8e, 0xf3, - 0x0c, 0xf5, 0x7a, 0xb7, 0x56, 0x5b, 0xd1, 0xf0, 0xd8, 0xc8, 0x0e, 0xfa, 0xc6, 0x0e, 0x7e, 0x5d, - 0x7e, 0x05, 0xbd, 0x44, 0x2d, 0xff, 0x28, 0x9b, 0xa8, 0x6e, 0xa2, 0x96, 0x27, 0x44, 0x40, 0x5b, - 0x63, 0x46, 0x69, 0x93, 0xd2, 0x5a, 0xf2, 0x01, 0xb4, 0x74, 0x55, 0x40, 0xb4, 0xe8, 0x65, 0x23, - 0x2a, 0x77, 0x83, 0xe1, 0x0e, 0x85, 0x43, 0xb4, 0x11, 0xc3, 0x0f, 0x06, 0x2d, 0x5f, 0xe3, 0x36, - 0xe7, 0xb7, 0xd0, 0xcc, 0x8b, 0x14, 0xa9, 0x6e, 0x7f, 0x72, 0x31, 0x36, 0x7b, 0x8e, 0x29, 0x34, - 0xe7, 0xac, 0x48, 0x31, 0x20, 0x88, 0x7b, 0xd0, 0x88, 0x35, 0x75, 0xef, 0x4e, 0xdc, 0x1a, 0xad, - 0x17, 0x0f, 0x1a, 0xb1, 0xe6, 0x37, 0xd0, 0x4e, 0x33, 0xd4, 0xf3, 0x58, 0x53, 0xf9, 0xff, 0x30, - 0xa7, 0x02, 0xa6, 0x7a, 0xe8, 0xc1, 0xd9, 0xe9, 0x7e, 0xde, 0x06, 0xfb, 0xf9, 0x65, 0xe6, 0x5a, - 0x1c, 0xc0, 0x79, 0xf4, 0x9f, 0xfc, 0x99, 0xef, 0xb2, 0x07, 0xb1, 0x3f, 0x4a, 0xeb, 0x70, 0x94, - 0xd6, 0xbe, 0x94, 0xec, 0x50, 0x4a, 0xf6, 0x55, 0x4a, 0xf6, 0xfe, 0x2d, 0xad, 0x85, 0x43, 0xff, - 0x7e, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x45, 0x92, 0x5d, 0xa1, 0x01, 0x00, 0x00, + // 327 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x6a, 0xfa, 0x40, + 0x10, 0xc6, 0xb3, 0x46, 0xa3, 0xff, 0x51, 0xfc, 0x87, 0x45, 0x68, 0x28, 0x34, 0xa4, 0x5e, 0x6a, + 0x29, 0x24, 0xa0, 0x87, 0xde, 0x4b, 0x73, 0xb2, 0x87, 0x12, 0x6c, 0x0f, 0xbd, 0x48, 0x8c, 0x83, + 0x84, 0xa8, 0x1b, 0x62, 0xba, 0x90, 0x37, 0xe9, 0xbd, 0xf7, 0x3e, 0x87, 0x47, 0x1f, 0xa1, 0xda, + 0x17, 0x29, 0x3b, 0x5b, 0xed, 0xa5, 0x97, 0xdd, 0x99, 0xef, 0xfb, 0xb1, 0xf3, 0x0d, 0x0b, 0xad, + 0x4c, 0xfa, 0x79, 0x21, 0x4a, 0xc1, 0xad, 0x95, 0x4c, 0x92, 0x7c, 0x76, 0xde, 0x5b, 0x88, 0x85, + 0x20, 0x29, 0x50, 0x95, 0x76, 0xfb, 0x1f, 0x0c, 0x5a, 0x63, 0xac, 0x9e, 0xe3, 0xe5, 0x2b, 0x72, + 0x1b, 0xcc, 0x0c, 0x2b, 0x87, 0x79, 0x6c, 0xd0, 0x89, 0x54, 0xc9, 0xaf, 0xe0, 0x7f, 0x52, 0x60, + 0x5c, 0xe2, 0xb4, 0x40, 0x99, 0x6e, 0x52, 0xb1, 0x76, 0x6a, 0x1e, 0x1b, 0x98, 0x51, 0x57, 0xcb, + 0xd1, 0x8f, 0xca, 0x2f, 0xa1, 0xb3, 0x12, 0xf3, 0x5f, 0xca, 0x24, 0xaa, 0xbd, 0x12, 0xf3, 0x13, + 0xe2, 0x40, 0x53, 0x62, 0x41, 0x6e, 0x9d, 0xdc, 0x63, 0xcb, 0x7b, 0xd0, 0x90, 0x2a, 0x80, 0xd3, + 0xa0, 0xc9, 0xba, 0x51, 0xea, 0x12, 0xe3, 0x0d, 0x3a, 0x16, 0xd1, 0xba, 0xe9, 0xbf, 0x33, 0x68, + 0x84, 0x12, 0xd7, 0x25, 0xbf, 0x81, 0x7a, 0x59, 0xe5, 0x48, 0x71, 0xbb, 0xc3, 0x33, 0x5f, 0xef, + 0xe9, 0x93, 0xa9, 0xcf, 0x49, 0x95, 0x63, 0x44, 0x10, 0xf7, 0xa0, 0x96, 0x49, 0xca, 0xde, 0x1e, + 0xda, 0x47, 0xf4, 0xb8, 0x78, 0x54, 0xcb, 0x24, 0xbf, 0x86, 0x66, 0x5e, 0xa0, 0x9c, 0x66, 0x92, + 0xc2, 0xff, 0x85, 0x59, 0x0a, 0x18, 0xcb, 0xbe, 0x07, 0xff, 0x4e, 0xef, 0xf3, 0x26, 0x98, 0x8f, + 0x4f, 0x13, 0xdb, 0xe0, 0x00, 0xd6, 0x7d, 0xf8, 0x10, 0x4e, 0x42, 0x9b, 0xdd, 0xdd, 0x6e, 0xf7, + 0xae, 0xb1, 0xdb, 0xbb, 0xc6, 0xf6, 0xe0, 0xb2, 0xdd, 0xc1, 0x65, 0x9f, 0x07, 0x97, 0xbd, 0x7d, + 0xb9, 0xc6, 0xcb, 0xc5, 0x42, 0xf8, 0x58, 0x26, 0x73, 0x3f, 0x15, 0x81, 0xba, 0x83, 0x38, 0x4f, + 0x03, 0x39, 0x0a, 0xf4, 0xac, 0x99, 0x45, 0xdf, 0x32, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x78, + 0x06, 0x46, 0xf5, 0xc0, 0x01, 0x00, 0x00, } func (m *KeyValue) Marshal() (dAtA []byte, err error) { diff --git a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto b/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto index 23c911b7da8..a93479c69f7 100644 --- a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto +++ b/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto @@ -3,6 +3,8 @@ package mvccpb; import "gogoproto/gogo.proto"; +option go_package = "go.etcd.io/etcd/api/v3/mvccpb"; + option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go index 23201302e83..781c73b7bff 100644 --- a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go +++ b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go @@ -21,75 +21,81 @@ import ( // server-side error var ( - ErrGRPCEmptyKey = status.New(codes.InvalidArgument, "etcdserver: key is not provided").Err() - ErrGRPCKeyNotFound = status.New(codes.InvalidArgument, "etcdserver: key not found").Err() - ErrGRPCValueProvided = status.New(codes.InvalidArgument, "etcdserver: value is provided").Err() - ErrGRPCLeaseProvided = status.New(codes.InvalidArgument, "etcdserver: lease is provided").Err() - ErrGRPCTooManyOps = status.New(codes.InvalidArgument, "etcdserver: too many operations in txn request").Err() - ErrGRPCDuplicateKey = status.New(codes.InvalidArgument, "etcdserver: duplicate key given in txn request").Err() - ErrGRPCCompacted = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted").Err() - ErrGRPCFutureRev = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision").Err() - ErrGRPCNoSpace = status.New(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded").Err() + ErrGRPCEmptyKey = status.Error(codes.InvalidArgument, "etcdserver: key is not provided") + ErrGRPCKeyNotFound = status.Error(codes.InvalidArgument, "etcdserver: key not found") + ErrGRPCValueProvided = status.Error(codes.InvalidArgument, "etcdserver: value is provided") + ErrGRPCLeaseProvided = status.Error(codes.InvalidArgument, "etcdserver: lease is provided") + ErrGRPCTooManyOps = status.Error(codes.InvalidArgument, "etcdserver: too many operations in txn request") + ErrGRPCDuplicateKey = status.Error(codes.InvalidArgument, "etcdserver: duplicate key given in txn request") + ErrGRPCInvalidClientAPIVersion = status.Error(codes.InvalidArgument, "etcdserver: invalid client api version") + ErrGRPCInvalidSortOption = status.Error(codes.InvalidArgument, "etcdserver: invalid sort option") + ErrGRPCCompacted = status.Error(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted") + ErrGRPCFutureRev = status.Error(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision") + ErrGRPCNoSpace = status.Error(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded") - ErrGRPCLeaseNotFound = status.New(codes.NotFound, "etcdserver: requested lease not found").Err() - ErrGRPCLeaseExist = status.New(codes.FailedPrecondition, "etcdserver: lease already exists").Err() - ErrGRPCLeaseTTLTooLarge = status.New(codes.OutOfRange, "etcdserver: too large lease TTL").Err() + ErrGRPCLeaseNotFound = status.Error(codes.NotFound, "etcdserver: requested lease not found") + ErrGRPCLeaseExist = status.Error(codes.FailedPrecondition, "etcdserver: lease already exists") + ErrGRPCLeaseTTLTooLarge = status.Error(codes.OutOfRange, "etcdserver: too large lease TTL") - ErrGRPCWatchCanceled = status.New(codes.Canceled, "etcdserver: watch canceled").Err() + ErrGRPCWatchCanceled = status.Error(codes.Canceled, "etcdserver: watch canceled") - ErrGRPCMemberExist = status.New(codes.FailedPrecondition, "etcdserver: member ID already exist").Err() - ErrGRPCPeerURLExist = status.New(codes.FailedPrecondition, "etcdserver: Peer URLs already exists").Err() - ErrGRPCMemberNotEnoughStarted = status.New(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members").Err() - ErrGRPCMemberBadURLs = status.New(codes.InvalidArgument, "etcdserver: given member URLs are invalid").Err() - ErrGRPCMemberNotFound = status.New(codes.NotFound, "etcdserver: member not found").Err() - ErrGRPCMemberNotLearner = status.New(codes.FailedPrecondition, "etcdserver: can only promote a learner member").Err() - ErrGRPCLearnerNotReady = status.New(codes.FailedPrecondition, "etcdserver: can only promote a learner member which is in sync with leader").Err() - ErrGRPCTooManyLearners = status.New(codes.FailedPrecondition, "etcdserver: too many learner members in cluster").Err() - ErrGRPCClusterIdMismatch = status.New(codes.FailedPrecondition, "etcdserver: cluster ID mismatch").Err() + ErrGRPCMemberExist = status.Error(codes.FailedPrecondition, "etcdserver: member ID already exist") + ErrGRPCPeerURLExist = status.Error(codes.FailedPrecondition, "etcdserver: Peer URLs already exists") + ErrGRPCMemberNotEnoughStarted = status.Error(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members") + ErrGRPCMemberBadURLs = status.Error(codes.InvalidArgument, "etcdserver: given member URLs are invalid") + ErrGRPCMemberNotFound = status.Error(codes.NotFound, "etcdserver: member not found") + ErrGRPCMemberNotLearner = status.Error(codes.FailedPrecondition, "etcdserver: can only promote a learner member") + ErrGRPCLearnerNotReady = status.Error(codes.FailedPrecondition, "etcdserver: can only promote a learner member which is in sync with leader") + ErrGRPCTooManyLearners = status.Error(codes.FailedPrecondition, "etcdserver: too many learner members in cluster") + ErrGRPCClusterIDMismatch = status.Error(codes.FailedPrecondition, "etcdserver: cluster ID mismatch") + //revive:disable:var-naming + // Deprecated: Please use ErrGRPCClusterIDMismatch. + ErrGRPCClusterIdMismatch = ErrGRPCClusterIDMismatch + //revive:enable:var-naming - ErrGRPCRequestTooLarge = status.New(codes.InvalidArgument, "etcdserver: request is too large").Err() - ErrGRPCRequestTooManyRequests = status.New(codes.ResourceExhausted, "etcdserver: too many requests").Err() + ErrGRPCRequestTooLarge = status.Error(codes.InvalidArgument, "etcdserver: request is too large") + ErrGRPCRequestTooManyRequests = status.Error(codes.ResourceExhausted, "etcdserver: too many requests") - ErrGRPCRootUserNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not exist").Err() - ErrGRPCRootRoleNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not have root role").Err() - ErrGRPCUserAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: user name already exists").Err() - ErrGRPCUserEmpty = status.New(codes.InvalidArgument, "etcdserver: user name is empty").Err() - ErrGRPCUserNotFound = status.New(codes.FailedPrecondition, "etcdserver: user name not found").Err() - ErrGRPCRoleAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: role name already exists").Err() - ErrGRPCRoleNotFound = status.New(codes.FailedPrecondition, "etcdserver: role name not found").Err() - ErrGRPCRoleEmpty = status.New(codes.InvalidArgument, "etcdserver: role name is empty").Err() - ErrGRPCAuthFailed = status.New(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password").Err() - ErrGRPCPermissionNotGiven = status.New(codes.InvalidArgument, "etcdserver: permission not given").Err() - ErrGRPCPermissionDenied = status.New(codes.PermissionDenied, "etcdserver: permission denied").Err() - ErrGRPCRoleNotGranted = status.New(codes.FailedPrecondition, "etcdserver: role is not granted to the user").Err() - ErrGRPCPermissionNotGranted = status.New(codes.FailedPrecondition, "etcdserver: permission is not granted to the role").Err() - ErrGRPCAuthNotEnabled = status.New(codes.FailedPrecondition, "etcdserver: authentication is not enabled").Err() - ErrGRPCInvalidAuthToken = status.New(codes.Unauthenticated, "etcdserver: invalid auth token").Err() - ErrGRPCInvalidAuthMgmt = status.New(codes.InvalidArgument, "etcdserver: invalid auth management").Err() - ErrGRPCAuthOldRevision = status.New(codes.InvalidArgument, "etcdserver: revision of auth store is old").Err() + ErrGRPCRootUserNotExist = status.Error(codes.FailedPrecondition, "etcdserver: root user does not exist") + ErrGRPCRootRoleNotExist = status.Error(codes.FailedPrecondition, "etcdserver: root user does not have root role") + ErrGRPCUserAlreadyExist = status.Error(codes.FailedPrecondition, "etcdserver: user name already exists") + ErrGRPCUserEmpty = status.Error(codes.InvalidArgument, "etcdserver: user name is empty") + ErrGRPCUserNotFound = status.Error(codes.FailedPrecondition, "etcdserver: user name not found") + ErrGRPCRoleAlreadyExist = status.Error(codes.FailedPrecondition, "etcdserver: role name already exists") + ErrGRPCRoleNotFound = status.Error(codes.FailedPrecondition, "etcdserver: role name not found") + ErrGRPCRoleEmpty = status.Error(codes.InvalidArgument, "etcdserver: role name is empty") + ErrGRPCAuthFailed = status.Error(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password") + ErrGRPCPermissionNotGiven = status.Error(codes.InvalidArgument, "etcdserver: permission not given") + ErrGRPCPermissionDenied = status.Error(codes.PermissionDenied, "etcdserver: permission denied") + ErrGRPCRoleNotGranted = status.Error(codes.FailedPrecondition, "etcdserver: role is not granted to the user") + ErrGRPCPermissionNotGranted = status.Error(codes.FailedPrecondition, "etcdserver: permission is not granted to the role") + ErrGRPCAuthNotEnabled = status.Error(codes.FailedPrecondition, "etcdserver: authentication is not enabled") + ErrGRPCInvalidAuthToken = status.Error(codes.Unauthenticated, "etcdserver: invalid auth token") + ErrGRPCInvalidAuthMgmt = status.Error(codes.InvalidArgument, "etcdserver: invalid auth management") + ErrGRPCAuthOldRevision = status.Error(codes.InvalidArgument, "etcdserver: revision of auth store is old") - ErrGRPCNoLeader = status.New(codes.Unavailable, "etcdserver: no leader").Err() - ErrGRPCNotLeader = status.New(codes.FailedPrecondition, "etcdserver: not leader").Err() - ErrGRPCLeaderChanged = status.New(codes.Unavailable, "etcdserver: leader changed").Err() - ErrGRPCNotCapable = status.New(codes.Unavailable, "etcdserver: not capable").Err() - ErrGRPCStopped = status.New(codes.Unavailable, "etcdserver: server stopped").Err() - ErrGRPCTimeout = status.New(codes.Unavailable, "etcdserver: request timed out").Err() - ErrGRPCTimeoutDueToLeaderFail = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure").Err() - ErrGRPCTimeoutDueToConnectionLost = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost").Err() - ErrGRPCTimeoutWaitAppliedIndex = status.New(codes.Unavailable, "etcdserver: request timed out, waiting for the applied index took too long").Err() - ErrGRPCUnhealthy = status.New(codes.Unavailable, "etcdserver: unhealthy cluster").Err() - ErrGRPCCorrupt = status.New(codes.DataLoss, "etcdserver: corrupt cluster").Err() - ErrGPRCNotSupportedForLearner = status.New(codes.Unavailable, "etcdserver: rpc not supported for learner").Err() - ErrGRPCBadLeaderTransferee = status.New(codes.FailedPrecondition, "etcdserver: bad leader transferee").Err() + ErrGRPCNoLeader = status.Error(codes.Unavailable, "etcdserver: no leader") + ErrGRPCNotLeader = status.Error(codes.FailedPrecondition, "etcdserver: not leader") + ErrGRPCLeaderChanged = status.Error(codes.Unavailable, "etcdserver: leader changed") + ErrGRPCNotCapable = status.Error(codes.FailedPrecondition, "etcdserver: not capable") + ErrGRPCStopped = status.Error(codes.Unavailable, "etcdserver: server stopped") + ErrGRPCTimeout = status.Error(codes.Unavailable, "etcdserver: request timed out") + ErrGRPCTimeoutDueToLeaderFail = status.Error(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure") + ErrGRPCTimeoutDueToConnectionLost = status.Error(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost") + ErrGRPCTimeoutWaitAppliedIndex = status.Error(codes.Unavailable, "etcdserver: request timed out, waiting for the applied index took too long") + ErrGRPCUnhealthy = status.Error(codes.Unavailable, "etcdserver: unhealthy cluster") + ErrGRPCCorrupt = status.Error(codes.DataLoss, "etcdserver: corrupt cluster") + ErrGRPCNotSupportedForLearner = status.Error(codes.FailedPrecondition, "etcdserver: rpc not supported for learner") + ErrGRPCBadLeaderTransferee = status.Error(codes.FailedPrecondition, "etcdserver: bad leader transferee") - ErrGRPCClusterVersionUnavailable = status.New(codes.Unavailable, "etcdserver: cluster version not found during downgrade").Err() - ErrGRPCWrongDowngradeVersionFormat = status.New(codes.InvalidArgument, "etcdserver: wrong downgrade target version format").Err() - ErrGRPCInvalidDowngradeTargetVersion = status.New(codes.InvalidArgument, "etcdserver: invalid downgrade target version").Err() - ErrGRPCDowngradeInProcess = status.New(codes.FailedPrecondition, "etcdserver: cluster has a downgrade job in progress").Err() - ErrGRPCNoInflightDowngrade = status.New(codes.FailedPrecondition, "etcdserver: no inflight downgrade job").Err() + ErrGRPCWrongDowngradeVersionFormat = status.Error(codes.InvalidArgument, "etcdserver: wrong downgrade target version format") + ErrGRPCInvalidDowngradeTargetVersion = status.Error(codes.InvalidArgument, "etcdserver: invalid downgrade target version") + ErrGRPCClusterVersionUnavailable = status.Error(codes.FailedPrecondition, "etcdserver: cluster version not found during downgrade") + ErrGRPCDowngradeInProcess = status.Error(codes.FailedPrecondition, "etcdserver: cluster has a downgrade job in progress") + ErrGRPCNoInflightDowngrade = status.Error(codes.FailedPrecondition, "etcdserver: no inflight downgrade job") - ErrGRPCCanceled = status.New(codes.Canceled, "etcdserver: request canceled").Err() - ErrGRPCDeadlineExceeded = status.New(codes.DeadlineExceeded, "etcdserver: context deadline exceeded").Err() + ErrGRPCCanceled = status.Error(codes.Canceled, "etcdserver: request canceled") + ErrGRPCDeadlineExceeded = status.Error(codes.DeadlineExceeded, "etcdserver: context deadline exceeded") errStringToError = map[string]error{ ErrorDesc(ErrGRPCEmptyKey): ErrGRPCEmptyKey, @@ -97,11 +103,12 @@ var ( ErrorDesc(ErrGRPCValueProvided): ErrGRPCValueProvided, ErrorDesc(ErrGRPCLeaseProvided): ErrGRPCLeaseProvided, - ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps, - ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey, - ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted, - ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev, - ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace, + ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps, + ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey, + ErrorDesc(ErrGRPCInvalidSortOption): ErrGRPCInvalidSortOption, + ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted, + ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev, + ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace, ErrorDesc(ErrGRPCLeaseNotFound): ErrGRPCLeaseNotFound, ErrorDesc(ErrGRPCLeaseExist): ErrGRPCLeaseExist, @@ -115,7 +122,7 @@ var ( ErrorDesc(ErrGRPCMemberNotLearner): ErrGRPCMemberNotLearner, ErrorDesc(ErrGRPCLearnerNotReady): ErrGRPCLearnerNotReady, ErrorDesc(ErrGRPCTooManyLearners): ErrGRPCTooManyLearners, - ErrorDesc(ErrGRPCClusterIdMismatch): ErrGRPCClusterIdMismatch, + ErrorDesc(ErrGRPCClusterIDMismatch): ErrGRPCClusterIDMismatch, ErrorDesc(ErrGRPCRequestTooLarge): ErrGRPCRequestTooLarge, ErrorDesc(ErrGRPCRequestTooManyRequests): ErrGRPCRequestTooManyRequests, @@ -147,7 +154,7 @@ var ( ErrorDesc(ErrGRPCTimeoutDueToConnectionLost): ErrGRPCTimeoutDueToConnectionLost, ErrorDesc(ErrGRPCUnhealthy): ErrGRPCUnhealthy, ErrorDesc(ErrGRPCCorrupt): ErrGRPCCorrupt, - ErrorDesc(ErrGPRCNotSupportedForLearner): ErrGPRCNotSupportedForLearner, + ErrorDesc(ErrGRPCNotSupportedForLearner): ErrGRPCNotSupportedForLearner, ErrorDesc(ErrGRPCBadLeaderTransferee): ErrGRPCBadLeaderTransferee, ErrorDesc(ErrGRPCClusterVersionUnavailable): ErrGRPCClusterVersionUnavailable, @@ -160,15 +167,16 @@ var ( // client-side error var ( - ErrEmptyKey = Error(ErrGRPCEmptyKey) - ErrKeyNotFound = Error(ErrGRPCKeyNotFound) - ErrValueProvided = Error(ErrGRPCValueProvided) - ErrLeaseProvided = Error(ErrGRPCLeaseProvided) - ErrTooManyOps = Error(ErrGRPCTooManyOps) - ErrDuplicateKey = Error(ErrGRPCDuplicateKey) - ErrCompacted = Error(ErrGRPCCompacted) - ErrFutureRev = Error(ErrGRPCFutureRev) - ErrNoSpace = Error(ErrGRPCNoSpace) + ErrEmptyKey = Error(ErrGRPCEmptyKey) + ErrKeyNotFound = Error(ErrGRPCKeyNotFound) + ErrValueProvided = Error(ErrGRPCValueProvided) + ErrLeaseProvided = Error(ErrGRPCLeaseProvided) + ErrTooManyOps = Error(ErrGRPCTooManyOps) + ErrDuplicateKey = Error(ErrGRPCDuplicateKey) + ErrInvalidSortOption = Error(ErrGRPCInvalidSortOption) + ErrCompacted = Error(ErrGRPCCompacted) + ErrFutureRev = Error(ErrGRPCFutureRev) + ErrNoSpace = Error(ErrGRPCNoSpace) ErrLeaseNotFound = Error(ErrGRPCLeaseNotFound) ErrLeaseExist = Error(ErrGRPCLeaseExist) @@ -202,7 +210,11 @@ var ( ErrInvalidAuthToken = Error(ErrGRPCInvalidAuthToken) ErrAuthOldRevision = Error(ErrGRPCAuthOldRevision) ErrInvalidAuthMgmt = Error(ErrGRPCInvalidAuthMgmt) - ErrClusterIdMismatch = Error(ErrGRPCClusterIdMismatch) + ErrClusterIDMismatch = Error(ErrGRPCClusterIDMismatch) + //revive:disable:var-naming + // Deprecated: Please use ErrClusterIDMismatch. + ErrClusterIdMismatch = ErrClusterIDMismatch + //revive:enable:var-naming ErrNoLeader = Error(ErrGRPCNoLeader) ErrNotLeader = Error(ErrGRPCNotLeader) diff --git a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go index 8f8ac60ff22..e5770afb2e8 100644 --- a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go +++ b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go @@ -18,3 +18,6 @@ var ( TokenFieldNameGRPC = "token" TokenFieldNameSwagger = "authorization" ) + +// TokenFieldNameGRPCKey is used as a key of context to store token. +type TokenFieldNameGRPCKey struct{} diff --git a/vendor/go.etcd.io/etcd/api/v3/version/version.go b/vendor/go.etcd.io/etcd/api/v3/version/version.go index ca6efc51367..c0798b6854d 100644 --- a/vendor/go.etcd.io/etcd/api/v3/version/version.go +++ b/vendor/go.etcd.io/etcd/api/v3/version/version.go @@ -26,13 +26,29 @@ import ( var ( // MinClusterVersion is the min cluster version this etcd binary is compatible with. MinClusterVersion = "3.0.0" - Version = "3.5.17" + Version = "3.6.7" APIVersion = "unknown" // Git SHA Value will be set during build GitSHA = "Not provided (use ./build instead of go build)" ) +// Get all constant versions defined in a centralized place. +var ( + V3_0 = semver.Version{Major: 3, Minor: 0} + V3_1 = semver.Version{Major: 3, Minor: 1} + V3_2 = semver.Version{Major: 3, Minor: 2} + V3_3 = semver.Version{Major: 3, Minor: 3} + V3_4 = semver.Version{Major: 3, Minor: 4} + V3_5 = semver.Version{Major: 3, Minor: 5} + V3_6 = semver.Version{Major: 3, Minor: 6} + V3_7 = semver.Version{Major: 3, Minor: 7} + V4_0 = semver.Version{Major: 4, Minor: 0} + + // AllVersions keeps all the versions in ascending order. + AllVersions = []semver.Version{V3_0, V3_1, V3_2, V3_3, V3_4, V3_5, V3_6, V3_7, V4_0} +) + func init() { ver, err := semver.NewVersion(Version) if err == nil { @@ -43,6 +59,7 @@ func init() { type Versions struct { Server string `json:"etcdserver"` Cluster string `json:"etcdcluster"` + Storage string `json:"storage"` // TODO: raft state machine version } @@ -54,3 +71,15 @@ func Cluster(v string) string { } return fmt.Sprintf("%s.%s", vs[0], vs[1]) } + +func Compare(ver1, ver2 semver.Version) int { + return ver1.Compare(ver2) +} + +func LessThan(ver1, ver2 semver.Version) bool { + return ver1.LessThan(ver2) +} + +func Equal(ver1, ver2 semver.Version) bool { + return ver1.Equal(ver2) +} diff --git a/vendor/go.etcd.io/etcd/api/v3/versionpb/version.pb.go b/vendor/go.etcd.io/etcd/api/v3/versionpb/version.pb.go new file mode 100644 index 00000000000..71c74eb7192 --- /dev/null +++ b/vendor/go.etcd.io/etcd/api/v3/versionpb/version.pb.go @@ -0,0 +1,91 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: version.proto + +package versionpb + +import ( + fmt "fmt" + math "math" + + _ "github.com/gogo/protobuf/gogoproto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + proto "github.com/golang/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +var E_EtcdVersionMsg = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50000, + Name: "versionpb.etcd_version_msg", + Tag: "bytes,50000,opt,name=etcd_version_msg", + Filename: "version.proto", +} + +var E_EtcdVersionField = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50001, + Name: "versionpb.etcd_version_field", + Tag: "bytes,50001,opt,name=etcd_version_field", + Filename: "version.proto", +} + +var E_EtcdVersionEnum = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50002, + Name: "versionpb.etcd_version_enum", + Tag: "bytes,50002,opt,name=etcd_version_enum", + Filename: "version.proto", +} + +var E_EtcdVersionEnumValue = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumValueOptions)(nil), + ExtensionType: (*string)(nil), + Field: 50003, + Name: "versionpb.etcd_version_enum_value", + Tag: "bytes,50003,opt,name=etcd_version_enum_value", + Filename: "version.proto", +} + +func init() { + proto.RegisterExtension(E_EtcdVersionMsg) + proto.RegisterExtension(E_EtcdVersionField) + proto.RegisterExtension(E_EtcdVersionEnum) + proto.RegisterExtension(E_EtcdVersionEnumValue) +} + +func init() { proto.RegisterFile("version.proto", fileDescriptor_7d2c07d79758f814) } + +var fileDescriptor_7d2c07d79758f814 = []byte{ + // 284 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd1, 0xc1, 0x4a, 0xc3, 0x30, + 0x18, 0x07, 0x70, 0x83, 0x20, 0x2c, 0xa0, 0xce, 0x30, 0x50, 0x86, 0xd6, 0x7a, 0xf3, 0x94, 0x80, + 0xbb, 0xed, 0x28, 0xe8, 0xad, 0x2a, 0x1e, 0x76, 0x10, 0xa4, 0xb4, 0x6b, 0x16, 0x02, 0x6d, 0xbf, + 0xd0, 0xb4, 0x7d, 0x04, 0xd9, 0x23, 0xf8, 0x48, 0x1e, 0xa7, 0xbe, 0x80, 0xd4, 0x17, 0x91, 0xa4, + 0xa9, 0xac, 0xd6, 0x53, 0xfb, 0x7d, 0xdf, 0xff, 0xff, 0xeb, 0xa1, 0x78, 0xbf, 0xe6, 0x85, 0x96, + 0x90, 0x53, 0x55, 0x40, 0x09, 0x64, 0xe4, 0x46, 0x15, 0x4f, 0x27, 0x02, 0x04, 0xd8, 0x2d, 0x33, + 0x6f, 0x6d, 0x60, 0xea, 0x0b, 0x00, 0x91, 0x72, 0x66, 0xa7, 0xb8, 0x5a, 0xb1, 0x84, 0xeb, 0x65, + 0x21, 0x55, 0x09, 0x45, 0x9b, 0x98, 0xdf, 0xe1, 0x31, 0x2f, 0x97, 0x49, 0xe8, 0xa4, 0x30, 0xd3, + 0x82, 0x9c, 0xd3, 0xb6, 0x46, 0xbb, 0x1a, 0x0d, 0xb8, 0xd6, 0x91, 0xe0, 0xf7, 0xaa, 0x94, 0x90, + 0xeb, 0x93, 0xcd, 0xcb, 0xae, 0x8f, 0x2e, 0x47, 0x8f, 0x07, 0xa6, 0xba, 0x68, 0x9b, 0x81, 0x16, + 0x6b, 0x84, 0xe6, 0x0f, 0x98, 0xf4, 0xbc, 0x95, 0xe4, 0x69, 0x42, 0xce, 0x06, 0xe2, 0xad, 0xd9, + 0x77, 0xde, 0xbb, 0xf3, 0xc6, 0x5b, 0x9e, 0x0d, 0x18, 0x31, 0xc0, 0x47, 0x3d, 0x91, 0xe7, 0x55, + 0x46, 0x4e, 0x07, 0xe0, 0x4d, 0x5e, 0x65, 0x9d, 0xf7, 0xe1, 0xbc, 0xc3, 0x2d, 0xcf, 0xdc, 0x0d, + 0xf7, 0x8c, 0x8f, 0x07, 0x5c, 0x58, 0x47, 0x69, 0xc5, 0xc9, 0xc5, 0xbf, 0xe8, 0xc2, 0xdc, 0x3a, + 0xf9, 0xd3, 0xc9, 0x93, 0x3f, 0xb2, 0x0d, 0xad, 0x11, 0xba, 0xbe, 0x7a, 0x6b, 0x3c, 0xb4, 0x69, + 0x3c, 0xf4, 0xd5, 0x78, 0xe8, 0xf5, 0xdb, 0xdb, 0x79, 0xf2, 0x05, 0x50, 0x93, 0xa6, 0x12, 0x98, + 0x79, 0xb2, 0x48, 0x49, 0x56, 0xcf, 0xd8, 0xef, 0xbf, 0x8b, 0xf7, 0xec, 0xf7, 0x66, 0x3f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xe8, 0x02, 0x15, 0xc0, 0xde, 0x01, 0x00, 0x00, +} diff --git a/vendor/go.etcd.io/etcd/api/v3/versionpb/version.proto b/vendor/go.etcd.io/etcd/api/v3/versionpb/version.proto new file mode 100644 index 00000000000..c81b2f58a44 --- /dev/null +++ b/vendor/go.etcd.io/etcd/api/v3/versionpb/version.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package versionpb; + +import "gogoproto/gogo.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "go.etcd.io/etcd/api/v3/versionpb"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; + +// Indicates etcd version that introduced the message, used to determine minimal etcd version required to interpret wal that includes this message. +extend google.protobuf.MessageOptions { + optional string etcd_version_msg = 50000; +} + +// Indicates etcd version that introduced the field, used to determine minimal etcd version required to interpret wal that sets this field. +extend google.protobuf.FieldOptions { + optional string etcd_version_field = 50001; +} + +// Indicates etcd version that introduced the enum, used to determine minimal etcd version required to interpret wal that uses this enum. +extend google.protobuf.EnumOptions { + optional string etcd_version_enum = 50002; +} + +// Indicates etcd version that introduced the enum value, used to determine minimal etcd version required to interpret wal that sets this enum value. +extend google.protobuf.EnumValueOptions { + optional string etcd_version_enum_value = 50003; +} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_unix.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_unix.go index ca82f765c99..42221f4b90a 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_unix.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_unix.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !windows -// +build !windows package fileutil @@ -21,7 +20,7 @@ import "os" const ( // PrivateDirMode grants owner to make/remove files inside the directory. - PrivateDirMode = 0700 + PrivateDirMode = 0o700 ) // OpenDir opens a directory for syncing. diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_windows.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_windows.go index 849c63c8769..0cb2280cd86 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_windows.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/dir_windows.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build windows -// +build windows package fileutil @@ -24,7 +23,7 @@ import ( const ( // PrivateDirMode grants owner to make/remove files inside the directory. - PrivateDirMode = 0777 + PrivateDirMode = 0o777 ) // OpenDir opens a directory in windows with write access for syncing. diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/fileutil.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/fileutil.go index d31ece3e24e..36394a375a6 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/fileutil.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/fileutil.go @@ -17,16 +17,18 @@ package fileutil import ( "fmt" "io" - "io/ioutil" + "io/fs" "os" "path/filepath" "go.uber.org/zap" + + "go.etcd.io/etcd/client/pkg/v3/verify" ) const ( // PrivateFileMode grants owner to read/write a file. - PrivateFileMode = 0600 + PrivateFileMode = 0o600 ) // IsDirWriteable checks if dir is writable by writing and removing a file @@ -36,7 +38,7 @@ func IsDirWriteable(dir string) error { if err != nil { return err } - if err := ioutil.WriteFile(f, []byte(""), PrivateFileMode); err != nil { + if err := os.WriteFile(f, []byte(""), PrivateFileMode); err != nil { return err } return os.Remove(f) @@ -45,8 +47,9 @@ func IsDirWriteable(dir string) error { // TouchDirAll is similar to os.MkdirAll. It creates directories with 0700 permission if any directory // does not exists. TouchDirAll also ensures the given directory is writable. func TouchDirAll(lg *zap.Logger, dir string) error { + verify.Assert(lg != nil, "nil log isn't allowed") // If path is already a directory, MkdirAll does nothing and returns nil, so, - // first check if dir exist with an expected permission mode. + // first check if dir exists with an expected permission mode. if Exist(dir) { err := CheckDirPermission(dir, PrivateDirMode) if err != nil { @@ -122,7 +125,7 @@ func CheckDirPermission(dir string, perm os.FileMode) error { if !Exist(dir) { return fmt.Errorf("directory %q empty, cannot check permission", dir) } - //check the existing permission on the directory + // check the existing permission on the directory dirInfo, err := os.Stat(dir) if err != nil { return err @@ -157,7 +160,6 @@ func RemoveMatchFile(lg *zap.Logger, dir string, matchFunc func(fileName string) lg.Error("remove file failed", zap.String("file", file), zap.Error(err)) - continue } } } @@ -166,3 +168,16 @@ func RemoveMatchFile(lg *zap.Logger, dir string, matchFunc func(fileName string) } return nil } + +// ListFiles lists files if matchFunc is true on an existing dir +// Returns error if the dir does not exist +func ListFiles(dir string, matchFunc func(fileName string) bool) ([]string, error) { + var files []string + err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { + if matchFunc(path) { + files = append(files, path) + } + return nil + }) + return files, err +} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock.go index 338627f43c8..dd2fa545d22 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock.go @@ -19,8 +19,6 @@ import ( "os" ) -var ( - ErrLocked = errors.New("fileutil: file already locked") -) +var ErrLocked = errors.New("fileutil: file already locked") type LockedFile struct{ *os.File } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_flock.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_flock.go index dcdf226cdbf..178c987a4a3 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_flock.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_flock.go @@ -13,11 +13,11 @@ // limitations under the License. //go:build !windows && !plan9 && !solaris -// +build !windows,!plan9,!solaris package fileutil import ( + "errors" "os" "syscall" ) @@ -29,7 +29,7 @@ func flockTryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, err } if err = syscall.Flock(int(f.Fd()), syscall.LOCK_EX|syscall.LOCK_NB); err != nil { f.Close() - if err == syscall.EWOULDBLOCK { + if errors.Is(err, syscall.EWOULDBLOCK) { err = ErrLocked } return nil, err diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_linux.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_linux.go index d8952cc481b..609ac397849 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_linux.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_linux.go @@ -13,11 +13,11 @@ // limitations under the License. //go:build linux -// +build linux package fileutil import ( + "errors" "fmt" "io" "os" @@ -59,13 +59,13 @@ func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { func ofdTryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { f, err := os.OpenFile(path, flag, perm) if err != nil { - return nil, fmt.Errorf("ofdTryLockFile failed to open %q (%v)", path, err) + return nil, fmt.Errorf("ofdTryLockFile failed to open %q (%w)", path, err) } flock := wrlck if err = syscall.FcntlFlock(f.Fd(), unix.F_OFD_SETLK, &flock); err != nil { f.Close() - if err == syscall.EWOULDBLOCK { + if errors.Is(err, syscall.EWOULDBLOCK) { err = ErrLocked } return nil, err @@ -80,7 +80,7 @@ func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { func ofdLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { f, err := os.OpenFile(path, flag, perm) if err != nil { - return nil, fmt.Errorf("ofdLockFile failed to open %q (%v)", path, err) + return nil, fmt.Errorf("ofdLockFile failed to open %q (%w)", path, err) } flock := wrlck diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_solaris.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_solaris.go index 683cc1db9c4..2e892fecc65 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_solaris.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_solaris.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build solaris -// +build solaris package fileutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_unix.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_unix.go index d89027e1fad..05db5367410 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_unix.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_unix.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !windows && !plan9 && !solaris && !linux -// +build !windows,!plan9,!solaris,!linux package fileutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_windows.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_windows.go index 5cbf2bc3d5e..51010bdf81c 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_windows.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/lock_windows.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build windows -// +build windows package fileutil @@ -22,31 +21,18 @@ import ( "fmt" "os" "syscall" - "unsafe" -) - -var ( - modkernel32 = syscall.NewLazyDLL("kernel32.dll") - procLockFileEx = modkernel32.NewProc("LockFileEx") - errLocked = errors.New("the process cannot access the file because another process has locked a portion of the file") + "golang.org/x/sys/windows" ) -const ( - // https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx - LOCKFILE_EXCLUSIVE_LOCK = 2 - LOCKFILE_FAIL_IMMEDIATELY = 1 - - // see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx - errLockViolation syscall.Errno = 0x21 -) +var errLocked = errors.New("the process cannot access the file because another process has locked a portion of the file") func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { f, err := open(path, flag, perm) if err != nil { return nil, err } - if err := lockFile(syscall.Handle(f.Fd()), LOCKFILE_FAIL_IMMEDIATELY); err != nil { + if err := lockFile(windows.Handle(f.Fd()), windows.LOCKFILE_FAIL_IMMEDIATELY); err != nil { f.Close() return nil, err } @@ -58,7 +44,7 @@ func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { if err != nil { return nil, err } - if err := lockFile(syscall.Handle(f.Fd()), 0); err != nil { + if err := lockFile(windows.Handle(f.Fd()), 0); err != nil { f.Close() return nil, err } @@ -67,7 +53,7 @@ func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { func open(path string, flag int, perm os.FileMode) (*os.File, error) { if path == "" { - return nil, fmt.Errorf("cannot open empty filename") + return nil, errors.New("cannot open empty filename") } var access uint32 switch flag { @@ -95,32 +81,17 @@ func open(path string, flag int, perm os.FileMode) (*os.File, error) { return os.NewFile(uintptr(fd), path), nil } -func lockFile(fd syscall.Handle, flags uint32) error { - var flag uint32 = LOCKFILE_EXCLUSIVE_LOCK - flag |= flags - if fd == syscall.InvalidHandle { +func lockFile(fd windows.Handle, flags uint32) error { + if fd == windows.InvalidHandle { return nil } - err := lockFileEx(fd, flag, 1, 0, &syscall.Overlapped{}) + err := windows.LockFileEx(fd, flags|windows.LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &windows.Overlapped{}) if err == nil { return nil } else if err.Error() == errLocked.Error() { return ErrLocked - } else if err != errLockViolation { + } else if err != windows.ERROR_LOCK_VIOLATION { return err } return nil } - -func lockFileEx(h syscall.Handle, flags, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { - var reserved uint32 = 0 - r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol))) - if r1 == 0 { - if e1 != 0 { - err = error(e1) - } else { - err = syscall.EINVAL - } - } - return err -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate.go index c747b7cf81f..aadbff7131d 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate.go @@ -19,9 +19,9 @@ import ( "os" ) -// Preallocate tries to allocate the space for given -// file. This operation is only supported on linux by a -// few filesystems (btrfs, ext4, etc.). +// Preallocate tries to allocate the space for given file. This +// operation is only supported on darwin and linux by a few +// filesystems (APFS, btrfs, ext4, etc.). // If the operation is unsupported, no error will be returned. // Otherwise, the error encountered will be returned. func Preallocate(f *os.File, sizeInBytes int64, extendFile bool) error { diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_darwin.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_darwin.go index caab143dd30..72430ec273b 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_darwin.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_darwin.go @@ -13,11 +13,11 @@ // limitations under the License. //go:build darwin -// +build darwin package fileutil import ( + "errors" "os" "syscall" @@ -40,7 +40,7 @@ func preallocFixed(f *os.File, sizeInBytes int64) error { Length: sizeInBytes, } err := unix.FcntlFstore(f.Fd(), unix.F_PREALLOCATE, fstore) - if err == nil || err == unix.ENOTSUP { + if err == nil || errors.Is(err, unix.ENOTSUP) { return nil } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unix.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unix.go index ebb8207c340..b0a8166ae14 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unix.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unix.go @@ -13,11 +13,11 @@ // limitations under the License. //go:build linux -// +build linux package fileutil import ( + "errors" "os" "syscall" ) @@ -26,10 +26,10 @@ func preallocExtend(f *os.File, sizeInBytes int64) error { // use mode = 0 to change size err := syscall.Fallocate(int(f.Fd()), 0, 0, sizeInBytes) if err != nil { - errno, ok := err.(syscall.Errno) + var errno syscall.Errno // not supported; fallback // fallocate EINTRs frequently in some environments; fallback - if ok && (errno == syscall.ENOTSUP || errno == syscall.EINTR) { + if errors.As(err, &errno) && (errno == syscall.ENOTSUP || errno == syscall.EINTR) { return preallocExtendTrunc(f, sizeInBytes) } } @@ -40,9 +40,9 @@ func preallocFixed(f *os.File, sizeInBytes int64) error { // use mode = 1 to keep size; see FALLOC_FL_KEEP_SIZE err := syscall.Fallocate(int(f.Fd()), 1, 0, sizeInBytes) if err != nil { - errno, ok := err.(syscall.Errno) + var errno syscall.Errno // treat not supported as nil error - if ok && errno == syscall.ENOTSUP { + if errors.As(err, &errno) && errno == syscall.ENOTSUP { return nil } } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unsupported.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unsupported.go index 2c46dd49075..e7fd937a436 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unsupported.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/preallocate_unsupported.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !linux && !darwin -// +build !linux,!darwin package fileutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/purge.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/purge.go index b314e068fea..026ea03230f 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/purge.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/purge.go @@ -17,7 +17,6 @@ package fileutil import ( "os" "path/filepath" - "sort" "strings" "time" @@ -58,21 +57,14 @@ func purgeFile(lg *zap.Logger, dirname string, suffix string, max uint, interval defer close(donec) } for { - fnames, err := ReadDir(dirname) + fnamesWithSuffix, err := readDirWithSuffix(dirname, suffix) if err != nil { errC <- err return } - newfnames := make([]string, 0) - for _, fname := range fnames { - if strings.HasSuffix(fname, suffix) { - newfnames = append(newfnames, fname) - } - } - sort.Strings(newfnames) - fnames = newfnames - for len(newfnames) > int(max) { - f := filepath.Join(dirname, newfnames[0]) + nPurged := 0 + for nPurged < len(fnamesWithSuffix)-int(max) { + f := filepath.Join(dirname, fnamesWithSuffix[nPurged]) var l *LockedFile if flock { l, err = TryLockFile(f, os.O_WRONLY, PrivateFileMode) @@ -94,11 +86,12 @@ func purgeFile(lg *zap.Logger, dirname string, suffix string, max uint, interval } } lg.Info("purged", zap.String("path", f)) - newfnames = newfnames[1:] + nPurged++ } + if purgec != nil { - for i := 0; i < len(fnames)-len(newfnames); i++ { - purgec <- fnames[i] + for i := 0; i < nPurged; i++ { + purgec <- fnamesWithSuffix[i] } } select { @@ -110,3 +103,18 @@ func purgeFile(lg *zap.Logger, dirname string, suffix string, max uint, interval }() return errC } + +func readDirWithSuffix(dirname string, suffix string) ([]string, error) { + fnames, err := ReadDir(dirname) + if err != nil { + return nil, err + } + // filter in place (ref. https://go.dev/wiki/SliceTricks#filtering-without-allocating) + fnamesWithSuffix := fnames[:0] + for _, fname := range fnames { + if strings.HasSuffix(fname, suffix) { + fnamesWithSuffix = append(fnamesWithSuffix, fname) + } + } + return fnamesWithSuffix, nil +} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync.go index 0a0855309e9..670d01fadcc 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !linux && !darwin -// +build !linux,!darwin package fileutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_darwin.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_darwin.go index 1923b276ea0..7affa78ea64 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_darwin.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_darwin.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build darwin -// +build darwin package fileutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_linux.go b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_linux.go index b9398c23f94..a3172382e5a 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_linux.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/fileutil/sync_linux.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build linux -// +build linux package fileutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_format.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_format.go new file mode 100644 index 00000000000..286d385ba39 --- /dev/null +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_format.go @@ -0,0 +1,42 @@ +// Copyright 2019 The etcd 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 logutil + +import "fmt" + +const ( + JSONLogFormat = "json" + ConsoleLogFormat = "console" + //revive:disable:var-naming + // Deprecated: Please use JSONLogFormat. + JsonLogFormat = JSONLogFormat + //revive:enable:var-naming +) + +var DefaultLogFormat = JSONLogFormat + +// ConvertToZapFormat converts and validated log format string. +func ConvertToZapFormat(format string) (string, error) { + switch format { + case ConsoleLogFormat: + return ConsoleLogFormat, nil + case JSONLogFormat: + return JSONLogFormat, nil + case "": + return DefaultLogFormat, nil + default: + return "", fmt.Errorf("unknown log format: %s, supported values json, console", format) + } +} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go index f0f3739aad8..befa5758475 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go @@ -15,7 +15,7 @@ package logutil import ( - "sort" + "slices" "time" "go.uber.org/zap" @@ -43,7 +43,7 @@ var DefaultZapLoggerConfig = zap.Config{ Thereafter: 100, }, - Encoding: "json", + Encoding: DefaultLogFormat, // copied from "zap.NewProductionEncoderConfig" with some updates EncoderConfig: zapcore.EncoderConfig{ @@ -72,37 +72,22 @@ var DefaultZapLoggerConfig = zap.Config{ // MergeOutputPaths merges logging output paths, resolving conflicts. func MergeOutputPaths(cfg zap.Config) zap.Config { - outputs := make(map[string]struct{}) - for _, v := range cfg.OutputPaths { - outputs[v] = struct{}{} - } - outputSlice := make([]string, 0) - if _, ok := outputs["/dev/null"]; ok { - // "/dev/null" to discard all - outputSlice = []string{"/dev/null"} - } else { - for k := range outputs { - outputSlice = append(outputSlice, k) - } - } - cfg.OutputPaths = outputSlice - sort.Strings(cfg.OutputPaths) + cfg.OutputPaths = mergePaths(cfg.OutputPaths) + cfg.ErrorOutputPaths = mergePaths(cfg.ErrorOutputPaths) + return cfg +} - errOutputs := make(map[string]struct{}) - for _, v := range cfg.ErrorOutputPaths { - errOutputs[v] = struct{}{} +func mergePaths(old []string) []string { + if len(old) == 0 { + // the original implementation ensures the result is non-nil + return []string{} } - errOutputSlice := make([]string, 0) - if _, ok := errOutputs["/dev/null"]; ok { - // "/dev/null" to discard all - errOutputSlice = []string{"/dev/null"} - } else { - for k := range errOutputs { - errOutputSlice = append(errOutputSlice, k) - } + // use "/dev/null" to discard all + if slices.Contains(old, "/dev/null") { + return []string{"/dev/null"} } - cfg.ErrorOutputPaths = errOutputSlice - sort.Strings(cfg.ErrorOutputPaths) - - return cfg + // clone a new one; don't modify the original, in case it matters. + dup := slices.Clone(old) + slices.Sort(dup) + return slices.Compact(dup) } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go index 9daa3e0aab1..06dc40dacd9 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !windows -// +build !windows package logutil @@ -25,10 +24,10 @@ import ( "os" "path/filepath" - "go.etcd.io/etcd/client/pkg/v3/systemd" - "github.com/coreos/go-systemd/v22/journal" "go.uber.org/zap/zapcore" + + "go.etcd.io/etcd/client/pkg/v3/systemd" ) // NewJournalWriter wraps "io.Writer" to redirect log output diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go index 3a5aef089a7..0f79865e805 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go @@ -18,7 +18,7 @@ import ( "crypto/tls" "crypto/x509" "encoding/pem" - "io/ioutil" + "os" ) // NewCertPool creates x509 certPool with provided CA files. @@ -26,7 +26,7 @@ func NewCertPool(CAFiles []string) (*x509.CertPool, error) { certPool := x509.NewCertPool() for _, CAFile := range CAFiles { - pemByte, err := ioutil.ReadFile(CAFile) + pemByte, err := os.ReadFile(CAFile) if err != nil { return nil, err } @@ -51,12 +51,12 @@ func NewCertPool(CAFiles []string) (*x509.CertPool, error) { // NewCert generates TLS cert by using the given cert,key and parse function. func NewCert(certfile, keyfile string, parseFunc func([]byte, []byte) (tls.Certificate, error)) (*tls.Certificate, error) { - cert, err := ioutil.ReadFile(certfile) + cert, err := os.ReadFile(certfile) if err != nil { return nil, err } - key, err := ioutil.ReadFile(keyfile) + key, err := os.ReadFile(keyfile) if err != nil { return nil, err } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/keepalive_listener.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/keepalive_listener.go index d00a93dc19e..d43ac4f078a 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/keepalive_listener.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/keepalive_listener.go @@ -16,6 +16,7 @@ package transport import ( "crypto/tls" + "errors" "fmt" "net" "time" @@ -38,7 +39,7 @@ func NewKeepAliveListener(l net.Listener, scheme string, tlscfg *tls.Config) (ne if scheme == "https" { if tlscfg == nil { - return nil, fmt.Errorf("cannot listen on TLS for given listener: KeyFile and CertFile are not presented") + return nil, errors.New("cannot listen on TLS for given listener: KeyFile and CertFile are not presented") } return newTLSKeepaliveListener(kal, tlscfg), nil } @@ -95,16 +96,17 @@ type tlsKeepaliveListener struct { // Accept waits for and returns the next incoming TLS connection. // The returned connection c is a *tls.Conn. -func (l *tlsKeepaliveListener) Accept() (c net.Conn, err error) { - c, err = l.Listener.Accept() +func (l *tlsKeepaliveListener) Accept() (net.Conn, error) { + c, err := l.Listener.Accept() if err != nil { - return + return nil, err } + c = tls.Server(c, l.config) return c, nil } -// NewListener creates a Listener which accepts connections from an inner +// newTLSKeepaliveListener creates a Listener which accepts connections from an inner // Listener and wraps each connection with Server. // The configuration config must be non-nil and must have // at least one certificate. diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/limit_listen.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/limit_listen.go index 404722ba76e..bf4c4e104a2 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/limit_listen.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/limit_listen.go @@ -23,9 +23,7 @@ import ( "time" ) -var ( - ErrNotTCP = errors.New("only tcp connections have keepalive") -) +var ErrNotTCP = errors.New("only tcp connections have keepalive") // LimitListener returns a Listener that accepts at most n simultaneous // connections from the provided Listener. diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go index a7d37688d92..9c2d29ba998 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go @@ -32,10 +32,11 @@ import ( "strings" "time" + "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/client/pkg/v3/tlsutil" - - "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/verify" ) // NewListener creates a new listner. @@ -43,7 +44,7 @@ func NewListener(addr, scheme string, tlsinfo *TLSInfo) (l net.Listener, err err return newListener(addr, scheme, WithTLSInfo(tlsinfo)) } -// NewListenerWithOpts creates a new listener which accpets listener options. +// NewListenerWithOpts creates a new listener which accepts listener options. func NewListenerWithOpts(addr, scheme string, opts ...ListenerOption) (net.Listener, error) { return newListener(addr, scheme, opts...) } @@ -59,11 +60,7 @@ func newListener(addr, scheme string, opts ...ListenerOption) (net.Listener, err switch { case lnOpts.IsSocketOpts(): // new ListenConfig with socket options. - config, err := newListenConfig(lnOpts.socketOpts) - if err != nil { - return nil, err - } - lnOpts.ListenConfig = config + lnOpts.ListenConfig = newListenConfig(lnOpts.socketOpts) // check for timeout fallthrough case lnOpts.IsTimeout(), lnOpts.IsSocketOpts(): @@ -102,14 +99,17 @@ func newListener(addr, scheme string, opts ...ListenerOption) (net.Listener, err return wrapTLS(scheme, lnOpts.tlsInfo, lnOpts.Listener) } -func newKeepAliveListener(cfg *net.ListenConfig, addr string) (ln net.Listener, err error) { +func newKeepAliveListener(cfg *net.ListenConfig, addr string) (net.Listener, error) { + var ln net.Listener + var err error + if cfg != nil { ln, err = cfg.Listen(context.TODO(), "tcp", addr) } else { ln, err = net.Listen("tcp", addr) } if err != nil { - return + return nil, err } return NewKeepAliveListener(ln, "tcp", nil) @@ -125,7 +125,7 @@ func wrapTLS(scheme string, tlsinfo *TLSInfo, l net.Listener) (net.Listener, err return newTLSListener(l, tlsinfo, checkSAN) } -func newListenConfig(sopts *SocketOpts) (net.ListenConfig, error) { +func newListenConfig(sopts *SocketOpts) net.ListenConfig { lc := net.ListenConfig{} if sopts != nil { ctls := getControls(sopts) @@ -133,7 +133,7 @@ func newListenConfig(sopts *SocketOpts) (net.ListenConfig, error) { lc.Control = ctls.Control } } - return lc, nil + return lc } type TLSInfo struct { @@ -204,6 +204,9 @@ type TLSInfo struct { // EmptyCN indicates that the cert must have empty CN. // If true, ClientConfig() will return an error for a cert with non empty CN. EmptyCN bool + + // LocalAddr is the local IP address to use when communicating with a peer. + LocalAddr string } func (info TLSInfo) String() string { @@ -214,34 +217,35 @@ func (info TLSInfo) Empty() bool { return info.CertFile == "" && info.KeyFile == "" } -func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertValidity uint, additionalUsages ...x509.ExtKeyUsage) (info TLSInfo, err error) { - info.Logger = lg +func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertValidity uint, additionalUsages ...x509.ExtKeyUsage) (TLSInfo, error) { + verify.Assert(lg != nil, "nil log isn't allowed") + + var err error + info := TLSInfo{Logger: lg} if selfSignedCertValidity == 0 { - err = fmt.Errorf("selfSignedCertValidity is invalid,it should be greater than 0") + err = errors.New("selfSignedCertValidity is invalid,it should be greater than 0") info.Logger.Warn( "cannot generate cert", zap.Error(err), ) - return + return info, err } err = fileutil.TouchDirAll(lg, dirpath) if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "cannot create cert directory", - zap.Error(err), - ) - } - return + info.Logger.Warn( + "cannot create cert directory", + zap.Error(err), + ) + return info, err } certPath, err := filepath.Abs(filepath.Join(dirpath, "cert.pem")) if err != nil { - return + return info, err } keyPath, err := filepath.Abs(filepath.Join(dirpath, "key.pem")) if err != nil { - return + return info, err } _, errcert := os.Stat(certPath) _, errkey := os.Stat(keyPath) @@ -251,19 +255,17 @@ func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertVali info.ClientCertFile = certPath info.ClientKeyFile = keyPath info.selfCert = true - return + return info, err } serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "cannot generate random number", - zap.Error(err), - ) - } - return + info.Logger.Warn( + "cannot generate random number", + zap.Error(err), + ) + return info, err } tmpl := x509.Certificate{ @@ -272,17 +274,16 @@ func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertVali NotBefore: time.Now(), NotAfter: time.Now().Add(time.Duration(selfSignedCertValidity) * 365 * (24 * time.Hour)), - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCRLSign, ExtKeyUsage: append([]x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, additionalUsages...), BasicConstraintsValid: true, + IsCA: true, } - if info.Logger != nil { - info.Logger.Warn( - "automatically generate certificates", - zap.Time("certificate-validity-bound-not-after", tmpl.NotAfter), - ) - } + info.Logger.Warn( + "automatically generate certificates", + zap.Time("certificate-validity-bound-not-after", tmpl.NotAfter), + ) for _, host := range hosts { h, _, _ := net.SplitHostPort(host) @@ -295,24 +296,20 @@ func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertVali priv, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "cannot generate ECDSA key", - zap.Error(err), - ) - } - return + info.Logger.Warn( + "cannot generate ECDSA key", + zap.Error(err), + ) + return info, err } derBytes, err := x509.CreateCertificate(rand.Reader, &tmpl, &tmpl, &priv.PublicKey, priv) if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "cannot generate x509 certificate", - zap.Error(err), - ) - } - return + info.Logger.Warn( + "cannot generate x509 certificate", + zap.Error(err), + ) + return info, err } certOut, err := os.Create(certPath) @@ -322,34 +319,29 @@ func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertVali zap.String("path", certPath), zap.Error(err), ) - return + return info, err } pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}) certOut.Close() - if info.Logger != nil { - info.Logger.Info("created cert file", zap.String("path", certPath)) - } + + info.Logger.Info("created cert file", zap.String("path", certPath)) b, err := x509.MarshalECPrivateKey(priv) if err != nil { - return + return info, err } - keyOut, err := os.OpenFile(keyPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) + keyOut, err := os.OpenFile(keyPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o600) if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "cannot key file", - zap.String("path", keyPath), - zap.Error(err), - ) - } - return + info.Logger.Warn( + "cannot key file", + zap.String("path", keyPath), + zap.Error(err), + ) + return info, err } pem.Encode(keyOut, &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}) keyOut.Close() - if info.Logger != nil { - info.Logger.Info("created key file", zap.String("path", keyPath)) - } + info.Logger.Info("created key file", zap.String("path", keyPath)) return SelfCert(lg, dirpath, hosts, selfSignedCertValidity) } @@ -482,23 +474,19 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) { cfg.GetCertificate = func(clientHello *tls.ClientHelloInfo) (cert *tls.Certificate, err error) { cert, err = tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc) if os.IsNotExist(err) { - if info.Logger != nil { - info.Logger.Warn( - "failed to find peer cert files", - zap.String("cert-file", info.CertFile), - zap.String("key-file", info.KeyFile), - zap.Error(err), - ) - } + info.Logger.Warn( + "failed to find peer cert files", + zap.String("cert-file", info.CertFile), + zap.String("key-file", info.KeyFile), + zap.Error(err), + ) } else if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "failed to create peer certificate", - zap.String("cert-file", info.CertFile), - zap.String("key-file", info.KeyFile), - zap.Error(err), - ) - } + info.Logger.Warn( + "failed to create peer certificate", + zap.String("cert-file", info.CertFile), + zap.String("key-file", info.KeyFile), + zap.Error(err), + ) } return cert, err } @@ -509,23 +497,19 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) { } cert, err = tlsutil.NewCert(certfile, keyfile, info.parseFunc) if os.IsNotExist(err) { - if info.Logger != nil { - info.Logger.Warn( - "failed to find client cert files", - zap.String("cert-file", certfile), - zap.String("key-file", keyfile), - zap.Error(err), - ) - } + info.Logger.Warn( + "failed to find client cert files", + zap.String("cert-file", certfile), + zap.String("key-file", keyfile), + zap.Error(err), + ) } else if err != nil { - if info.Logger != nil { - info.Logger.Warn( - "failed to create client certificate", - zap.String("cert-file", certfile), - zap.String("key-file", keyfile), - zap.Error(err), - ) - } + info.Logger.Warn( + "failed to create client certificate", + zap.String("cert-file", certfile), + zap.String("key-file", keyfile), + zap.Error(err), + ) } return cert, err } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_opts.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_opts.go index ad4f6904da9..7536f6aff46 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_opts.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_opts.go @@ -1,3 +1,17 @@ +// Copyright 2021 The etcd 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 ( diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_tls.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_tls.go index 6f1600945cc..2c94841625b 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_tls.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener_tls.go @@ -19,8 +19,8 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "io/ioutil" "net" + "os" "strings" "sync" ) @@ -168,16 +168,16 @@ func (l *tlsListener) acceptLoop() { func checkCRL(crlPath string, cert []*x509.Certificate) error { // TODO: cache - crlBytes, err := ioutil.ReadFile(crlPath) + crlBytes, err := os.ReadFile(crlPath) if err != nil { return err } - certList, err := x509.ParseCRL(crlBytes) + certList, err := x509.ParseRevocationList(crlBytes) if err != nil { return err } revokedSerials := make(map[string]struct{}) - for _, rc := range certList.TBSCertList.RevokedCertificates { + for _, rc := range certList.RevokedCertificateEntries { revokedSerials[string(rc.SerialNumber.Bytes())] = struct{}{} } for _, c := range cert { @@ -222,7 +222,8 @@ func checkCertSAN(ctx context.Context, cert *x509.Certificate, remoteAddr string func isHostInDNS(ctx context.Context, host string, dnsNames []string) (ok bool, err error) { // reverse lookup - wildcards, names := []string{}, []string{} + var names []string + var wildcards []string for _, dns := range dnsNames { if strings.HasPrefix(dns, "*.") { wildcards = append(wildcards, dns[1:]) diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt.go index fe028c61323..49b48dc8767 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt.go @@ -1,3 +1,17 @@ +// Copyright 2021 The etcd 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 ( diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_solaris.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_solaris.go index 495c736365e..149ad510240 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_solaris.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_solaris.go @@ -13,19 +13,18 @@ // limitations under the License. //go:build solaris -// +build solaris package transport import ( - "fmt" + "errors" "syscall" "golang.org/x/sys/unix" ) func setReusePort(network, address string, c syscall.RawConn) error { - return fmt.Errorf("port reuse is not supported on Solaris") + return errors.New("port reuse is not supported on Solaris") } func setReuseAddress(network, address string, conn syscall.RawConn) error { diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_unix.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_unix.go index e2cc6f48286..385eadb0074 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_unix.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_unix.go @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !windows && !solaris -// +build !windows,!solaris +//go:build !windows && !solaris && !wasm && !js package transport diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_wasm.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_wasm.go new file mode 100644 index 00000000000..c6590b1d469 --- /dev/null +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_wasm.go @@ -0,0 +1,30 @@ +// Copyright 2023 The etcd 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. + +//go:build wasm || js + +package transport + +import ( + "errors" + "syscall" +) + +func setReusePort(network, address string, c syscall.RawConn) error { + return errors.New("port reuse is not supported on WASM") +} + +func setReuseAddress(network, addr string, conn syscall.RawConn) error { + return errors.New("address reuse is not supported on WASM") +} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_windows.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_windows.go index 4e5af70b11e..2670b4dc7b5 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_windows.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/sockopt_windows.go @@ -1,19 +1,32 @@ +// Copyright 2021 The etcd 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. + //go:build windows -// +build windows package transport import ( - "fmt" + "errors" "syscall" ) func setReusePort(network, address string, c syscall.RawConn) error { - return fmt.Errorf("port reuse is not supported on Windows") + return errors.New("port reuse is not supported on Windows") } // Windows supports SO_REUSEADDR, but it may cause undefined behavior, as // there is no protection against port hijacking. func setReuseAddress(network, addr string, conn syscall.RawConn) error { - return fmt.Errorf("address reuse is not supported on Windows") + return errors.New("address reuse is not supported on Windows") } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/tls.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/tls.go index 8c3a35b140b..d5375863fd5 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/tls.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/tls.go @@ -16,6 +16,7 @@ package transport import ( "context" + "errors" "fmt" "strings" "time" @@ -46,7 +47,7 @@ func ValidateSecureEndpoints(tlsInfo TLSInfo, eps []string) ([]string, error) { endpoints = append(endpoints, ep) } if len(errs) != 0 { - err = fmt.Errorf("%s", strings.Join(errs, ",")) + err = errors.New(strings.Join(errs, ",")) } return endpoints, err } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/transport.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/transport.go index 648512772d3..67170d7436d 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/transport.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/transport.go @@ -30,10 +30,19 @@ func NewTransport(info TLSInfo, dialtimeoutd time.Duration) (*http.Transport, er return nil, err } + var ipAddr net.Addr + if info.LocalAddr != "" { + ipAddr, err = net.ResolveTCPAddr("tcp", info.LocalAddr+":0") + if err != nil { + return nil, err + } + } + t := &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ - Timeout: dialtimeoutd, + Timeout: dialtimeoutd, + LocalAddr: ipAddr, // value taken from http.DefaultTransport KeepAlive: 30 * time.Second, }).DialContext, @@ -57,7 +66,7 @@ func NewTransport(info TLSInfo, dialtimeoutd time.Duration) (*http.Transport, er TLSClientConfig: cfg, // Cost of reopening connection on sockets is low, and they are mostly used in testing. // Long living unix-transport connections were leading to 'leak' test flakes. - // Alternativly the returned Transport (t) should override CloseIdleConnections to + // Alternatively the returned Transport (t) should override CloseIdleConnections to // forward it to 'tu' as well. IdleConnTimeout: time.Microsecond, } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go index ae00388dde0..7a09647b5d5 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go @@ -14,7 +14,10 @@ package types -import "strconv" +import ( + "strconv" + "strings" +) // ID represents a generic identifier which is canonically // stored as a uint64 but is typically represented as a @@ -37,3 +40,17 @@ type IDSlice []ID func (p IDSlice) Len() int { return len(p) } func (p IDSlice) Less(i, j int) bool { return uint64(p[i]) < uint64(p[j]) } func (p IDSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p IDSlice) String() string { + var b strings.Builder + if p.Len() > 0 { + b.WriteString(p[0].String()) + } + + for i := 1; i < p.Len(); i++ { + b.WriteString(",") + b.WriteString(p[i].String()) + } + + return b.String() +} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go index e7a3cdc9ab6..3e69c8d8b94 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go @@ -90,7 +90,7 @@ func (us *unsafeSet) Length() int { // Values returns the values of the Set in an unspecified order. func (us *unsafeSet) Values() (values []string) { - values = make([]string, 0) + values = make([]string, 0, len(us.d)) for val := range us.d { values = append(values, val) } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/verify/verify.go b/vendor/go.etcd.io/etcd/client/pkg/v3/verify/verify.go new file mode 100644 index 00000000000..a7b2097bed9 --- /dev/null +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/verify/verify.go @@ -0,0 +1,80 @@ +// Copyright 2022 The etcd 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 verify + +import ( + "fmt" + "os" + "strings" +) + +const envVerify = "ETCD_VERIFY" + +type VerificationType string + +const ( + envVerifyValueAll VerificationType = "all" + envVerifyValueAssert VerificationType = "assert" +) + +func getEnvVerify() string { + return strings.ToLower(os.Getenv(envVerify)) +} + +func IsVerificationEnabled(verification VerificationType) bool { + env := getEnvVerify() + return env == string(envVerifyValueAll) || env == strings.ToLower(string(verification)) +} + +// EnableVerifications sets `envVerify` and returns a function that +// can be used to bring the original settings. +func EnableVerifications(verification VerificationType) func() { + previousEnv := getEnvVerify() + os.Setenv(envVerify, string(verification)) + return func() { + os.Setenv(envVerify, previousEnv) + } +} + +// EnableAllVerifications enables verification and returns a function +// that can be used to bring the original settings. +func EnableAllVerifications() func() { + return EnableVerifications(envVerifyValueAll) +} + +// DisableVerifications unsets `envVerify` and returns a function that +// can be used to bring the original settings. +func DisableVerifications() func() { + previousEnv := getEnvVerify() + os.Unsetenv(envVerify) + return func() { + os.Setenv(envVerify, previousEnv) + } +} + +// Verify performs verification if the assertions are enabled. +// In the default setup running in tests and skipped in the production code. +func Verify(f func()) { + if IsVerificationEnabled(envVerifyValueAssert) { + f() + } +} + +// Assert will panic with a given formatted message if the given condition is false. +func Assert(condition bool, msg string, v ...any) { + if !condition { + panic(fmt.Sprintf("assertion failed: "+msg, v...)) + } +} diff --git a/vendor/go.etcd.io/etcd/client/v3/OWNERS b/vendor/go.etcd.io/etcd/client/v3/OWNERS new file mode 100644 index 00000000000..2b7f28b7939 --- /dev/null +++ b/vendor/go.etcd.io/etcd/client/v3/OWNERS @@ -0,0 +1,4 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +labels: + - area/clientv3 diff --git a/vendor/go.etcd.io/etcd/client/v3/README.md b/vendor/go.etcd.io/etcd/client/v3/README.md index 16c0fe888cf..af0087ebcc0 100644 --- a/vendor/go.etcd.io/etcd/client/v3/README.md +++ b/vendor/go.etcd.io/etcd/client/v3/README.md @@ -1,7 +1,7 @@ -# etcd/clientv3 +# etcd/client/v3 [![Docs](https://img.shields.io/badge/docs-latest-green.svg)](https://etcd.io/docs) -[![Godoc](https://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/go.etcd.io/etcd/clientv3) +[![Godoc](https://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/go.etcd.io/etcd/client/v3) `etcd/clientv3` is the official Go etcd client for v3. @@ -16,14 +16,18 @@ go get go.etcd.io/etcd/client/v3 Create client using `clientv3.New`: ```go -cli, err := clientv3.New(clientv3.Config{ - Endpoints: []string{"localhost:2379", "localhost:22379", "localhost:32379"}, - DialTimeout: 5 * time.Second, -}) -if err != nil { - // handle error! +import clientv3 "go.etcd.io/etcd/client/v3" + +func main() { + cli, err := clientv3.New(clientv3.Config{ + Endpoints: []string{"localhost:2379", "localhost:22379", "localhost:32379"}, + DialTimeout: 5 * time.Second, + }) + if err != nil { + // handle error! + } + defer cli.Close() } -defer cli.Close() ``` etcd v3 uses [`gRPC`](https://www.grpc.io) for remote procedure calls. And `clientv3` uses diff --git a/vendor/go.etcd.io/etcd/client/v3/auth.go b/vendor/go.etcd.io/etcd/client/v3/auth.go index 110918a4c7c..382172b21bf 100644 --- a/vendor/go.etcd.io/etcd/client/v3/auth.go +++ b/vendor/go.etcd.io/etcd/client/v3/auth.go @@ -19,9 +19,10 @@ import ( "fmt" "strings" + "google.golang.org/grpc" + "go.etcd.io/etcd/api/v3/authpb" pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "google.golang.org/grpc" ) type ( diff --git a/vendor/go.etcd.io/etcd/client/v3/client.go b/vendor/go.etcd.io/etcd/client/v3/client.go index f7aa65a0a72..24f5988986d 100644 --- a/vendor/go.etcd.io/etcd/client/v3/client.go +++ b/vendor/go.etcd.io/etcd/client/v3/client.go @@ -18,22 +18,26 @@ import ( "context" "errors" "fmt" - "strconv" "strings" "sync" "time" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/client/pkg/v3/logutil" - "go.etcd.io/etcd/client/v3/credentials" - "go.etcd.io/etcd/client/v3/internal/endpoint" - "go.etcd.io/etcd/client/v3/internal/resolver" + "github.com/coreos/go-semver/semver" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" grpccredentials "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/status" + + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/client/pkg/v3/logutil" + "go.etcd.io/etcd/client/pkg/v3/verify" + "go.etcd.io/etcd/client/v3/credentials" + "go.etcd.io/etcd/client/v3/internal/endpoint" + "go.etcd.io/etcd/client/v3/internal/resolver" ) var ( @@ -55,7 +59,9 @@ type Client struct { cfg Config creds grpccredentials.TransportCredentials resolver *resolver.EtcdManualResolver - mu *sync.RWMutex + + epMu *sync.RWMutex + endpoints []string ctx context.Context cancel context.CancelFunc @@ -64,7 +70,7 @@ type Client struct { Username string // Password is a password for authentication. Password string - authTokenBundle credentials.Bundle + authTokenBundle credentials.PerRPCCredentialsBundle callOpts []grpc.CallOption @@ -86,7 +92,7 @@ func New(cfg Config) (*Client, error) { // service interface implementations and do not need connection management. func NewCtxClient(ctx context.Context, opts ...Option) *Client { cctx, cancel := context.WithCancel(ctx) - c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex), mu: new(sync.RWMutex)} + c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex), epMu: new(sync.RWMutex)} for _, opt := range opts { opt(c) } @@ -161,18 +167,18 @@ func (c *Client) Ctx() context.Context { return c.ctx } // Endpoints lists the registered endpoints for the client. func (c *Client) Endpoints() []string { // copy the slice; protect original endpoints from being changed - c.mu.RLock() - defer c.mu.RUnlock() - eps := make([]string, len(c.cfg.Endpoints)) - copy(eps, c.cfg.Endpoints) + c.epMu.RLock() + defer c.epMu.RUnlock() + eps := make([]string, len(c.endpoints)) + copy(eps, c.endpoints) return eps } // SetEndpoints updates client's endpoints. func (c *Client) SetEndpoints(eps ...string) { - c.mu.Lock() - defer c.mu.Unlock() - c.cfg.Endpoints = eps + c.epMu.Lock() + defer c.epMu.Unlock() + c.endpoints = eps c.resolver.SetEndpoints(eps) } @@ -189,7 +195,15 @@ func (c *Client) Sync(ctx context.Context) error { eps = append(eps, m.ClientURLs...) } } + // The linearizable `MemberList` returned successfully, so the + // endpoints shouldn't be empty. + verify.Verify(func() { + if len(eps) == 0 { + panic("empty endpoints returned from etcd cluster") + } + }) c.SetEndpoints(eps...) + c.lg.Debug("set etcd endpoints by autoSync", zap.Strings("endpoints", eps)) return nil } @@ -206,7 +220,7 @@ func (c *Client) autoSync() { ctx, cancel := context.WithTimeout(c.ctx, 5*time.Second) err := c.Sync(ctx) cancel() - if err != nil && err != c.ctx.Err() { + if err != nil && !errors.Is(err, c.ctx.Err()) { c.lg.Info("Auto sync endpoints failed.", zap.Error(err)) } } @@ -214,7 +228,9 @@ func (c *Client) autoSync() { } // dialSetupOpts gives the dial opts prior to any authentication. -func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) (opts []grpc.DialOption, err error) { +func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) []grpc.DialOption { + var opts []grpc.DialOption + if c.cfg.DialKeepAliveTime > 0 { params := keepalive.ClientParameters{ Time: c.cfg.DialKeepAliveTime, @@ -228,7 +244,7 @@ func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts if creds != nil { opts = append(opts, grpc.WithTransportCredentials(creds)) } else { - opts = append(opts, grpc.WithInsecure()) + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) } unaryMaxRetries := defaultUnaryMaxRetries @@ -257,7 +273,7 @@ func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts grpc.WithUnaryInterceptor(c.unaryClientInterceptor(withMax(unaryMaxRetries), rrBackoff)), ) - return opts, nil + return opts } // Dial connects to a single endpoint using the client's config. @@ -278,7 +294,7 @@ func (c *Client) getToken(ctx context.Context) error { resp, err := c.Auth.Authenticate(ctx, c.Username, c.Password) if err != nil { - if err == rpctypes.ErrAuthNotEnabled { + if errors.Is(err, rpctypes.ErrAuthNotEnabled) { c.authTokenBundle.UpdateAuthToken("") return nil } @@ -298,10 +314,8 @@ func (c *Client) dialWithBalancer(dopts ...grpc.DialOption) (*grpc.ClientConn, e // dial configures and dials any grpc balancer target. func (c *Client) dial(creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) (*grpc.ClientConn, error) { - opts, err := c.dialSetupOpts(creds, dopts...) - if err != nil { - return nil, fmt.Errorf("failed to configure dialer: %v", err) - } + opts := c.dialSetupOpts(creds, dopts...) + if c.authTokenBundle != nil { opts = append(opts, grpc.WithPerRPCCredentials(c.authTokenBundle.PerRPCCredentials())) } @@ -314,7 +328,7 @@ func (c *Client) dial(creds grpccredentials.TransportCredentials, dopts ...grpc. dctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout) defer cancel() // TODO: Is this right for cases where grpc.WithBlock() is not set on the dial options? } - target := fmt.Sprintf("%s://%p/%s", resolver.Schema, c, authority(c.Endpoints()[0])) + target := fmt.Sprintf("%s://%p/%s", resolver.Schema, c, authority(c.endpoints[0])) conn, err := grpc.DialContext(dctx, target, opts...) if err != nil { return nil, err @@ -339,15 +353,15 @@ func authority(endpoint string) string { func (c *Client) credentialsForEndpoint(ep string) grpccredentials.TransportCredentials { r := endpoint.RequiresCredentials(ep) switch r { - case endpoint.CREDS_DROP: + case endpoint.CredsDrop: return nil - case endpoint.CREDS_OPTIONAL: + case endpoint.CredsOptional: return c.creds - case endpoint.CREDS_REQUIRE: + case endpoint.CredsRequire: if c.creds != nil { return c.creds } - return credentials.NewBundle(credentials.Config{}).TransportCredentials() + return credentials.NewTransportCredential(nil) default: panic(fmt.Errorf("unsupported CredsRequirement: %v", r)) } @@ -359,7 +373,7 @@ func newClient(cfg *Config) (*Client, error) { } var creds grpccredentials.TransportCredentials if cfg.TLS != nil { - creds = credentials.NewBundle(credentials.Config{TLSConfig: cfg.TLS}).TransportCredentials() + creds = credentials.NewTransportCredential(cfg.TLS) } // use a temporary skeleton client to bootstrap first connection @@ -375,7 +389,7 @@ func newClient(cfg *Config) (*Client, error) { creds: creds, ctx: ctx, cancel: cancel, - mu: new(sync.RWMutex), + epMu: new(sync.RWMutex), callOpts: defaultCallOpts, lgMu: new(sync.RWMutex), } @@ -398,7 +412,7 @@ func newClient(cfg *Config) (*Client, error) { if cfg.Username != "" && cfg.Password != "" { client.Username = cfg.Username client.Password = cfg.Password - client.authTokenBundle = credentials.NewBundle(credentials.Config{}) + client.authTokenBundle = credentials.NewPerRPCCredentialBundle() } if cfg.MaxCallSendMsgSize > 0 || cfg.MaxCallRecvMsgSize > 0 { if cfg.MaxCallRecvMsgSize > 0 && cfg.MaxCallSendMsgSize > cfg.MaxCallRecvMsgSize { @@ -422,8 +436,10 @@ func newClient(cfg *Config) (*Client, error) { if len(cfg.Endpoints) < 1 { client.cancel() - return nil, fmt.Errorf("at least one Endpoint is required in client config") + return nil, errors.New("at least one Endpoint is required in client config") } + client.SetEndpoints(cfg.Endpoints...) + // Use a provided endpoint target so that for https:// without any tls config given, then // grpc will assume the certificate server name is the endpoint host. conn, err := client.dialWithBalancer() @@ -442,7 +458,7 @@ func newClient(cfg *Config) (*Client, error) { client.Auth = NewAuth(client) client.Maintenance = NewMaintenance(client) - //get token with established connection + // get token with established connection ctx, cancel = client.ctx, func() {} if client.cfg.DialTimeout > 0 { ctx, cancel = context.WithTimeout(ctx, client.cfg.DialTimeout) @@ -451,7 +467,7 @@ func newClient(cfg *Config) (*Client, error) { if err != nil { client.Close() cancel() - //TODO: Consider fmt.Errorf("communicating with [%s] failed: %v", strings.Join(cfg.Endpoints, ";"), err) + // TODO: Consider fmt.Errorf("communicating with [%s] failed: %v", strings.Join(cfg.Endpoints, ";"), err) return nil, err } cancel() @@ -483,6 +499,22 @@ func (c *Client) roundRobinQuorumBackoff(waitBetween time.Duration, jitterFracti } } +// minSupportedVersion returns the minimum version supported, which is the previous minor release. +func minSupportedVersion() *semver.Version { + ver := semver.Must(semver.NewVersion(version.Version)) + // consider only major and minor version + ver = &semver.Version{Major: ver.Major, Minor: ver.Minor} + for i := range version.AllVersions { + if version.AllVersions[i].Equal(*ver) { + if i == 0 { + return ver + } + return &version.AllVersions[i-1] + } + } + panic("current version is not in the version list") +} + func (c *Client) checkVersion() (err error) { var wg sync.WaitGroup @@ -504,20 +536,13 @@ func (c *Client) checkVersion() (err error) { errc <- rerr return } - vs := strings.Split(resp.Version, ".") - maj, min := 0, 0 - if len(vs) >= 2 { - var serr error - if maj, serr = strconv.Atoi(vs[0]); serr != nil { - errc <- serr - return - } - if min, serr = strconv.Atoi(vs[1]); serr != nil { - errc <- serr - return - } + vs, serr := semver.NewVersion(resp.Version) + if serr != nil { + errc <- serr + return } - if maj < 3 || (maj == 3 && min < 4) { + + if vs.LessThan(*minSupportedVersion()) { rerr = ErrOldCluster } errc <- rerr @@ -580,7 +605,8 @@ func ContextError(ctx context.Context, err error) error { return nil } err = rpctypes.Error(err) - if _, ok := err.(rpctypes.EtcdError); ok { + var serverErr rpctypes.EtcdError + if errors.As(err, &serverErr) { return err } if ev, ok := status.FromError(err); ok { @@ -602,7 +628,7 @@ func canceledByCaller(stopCtx context.Context, err error) bool { return false } - return err == context.Canceled || err == context.DeadlineExceeded + return errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) } // IsConnCanceled returns true, if error is from a closed gRPC connection. @@ -620,7 +646,7 @@ func IsConnCanceled(err error) bool { } // >= gRPC v1.10.x - if err == context.Canceled { + if errors.Is(err, context.Canceled) { return true } diff --git a/vendor/go.etcd.io/etcd/client/v3/cluster.go b/vendor/go.etcd.io/etcd/client/v3/cluster.go index 1815c1c9640..1b7e83375c3 100644 --- a/vendor/go.etcd.io/etcd/client/v3/cluster.go +++ b/vendor/go.etcd.io/etcd/client/v3/cluster.go @@ -17,10 +17,10 @@ package clientv3 import ( "context" + "google.golang.org/grpc" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/pkg/v3/types" - - "google.golang.org/grpc" ) type ( @@ -34,7 +34,7 @@ type ( type Cluster interface { // MemberList lists the current cluster membership. - MemberList(ctx context.Context) (*MemberListResponse, error) + MemberList(ctx context.Context, opts ...OpOption) (*MemberListResponse, error) // MemberAdd adds a new member into the cluster. MemberAdd(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error) @@ -122,9 +122,9 @@ func (c *cluster) MemberUpdate(ctx context.Context, id uint64, peerAddrs []strin return nil, ContextError(ctx, err) } -func (c *cluster) MemberList(ctx context.Context) (*MemberListResponse, error) { - // it is safe to retry on list. - resp, err := c.remote.MemberList(ctx, &pb.MemberListRequest{Linearizable: true}, c.callOpts...) +func (c *cluster) MemberList(ctx context.Context, opts ...OpOption) (*MemberListResponse, error) { + opt := OpGet("", opts...) + resp, err := c.remote.MemberList(ctx, &pb.MemberListRequest{Linearizable: !opt.serializable}, c.callOpts...) if err == nil { return (*MemberListResponse)(resp), nil } diff --git a/vendor/go.etcd.io/etcd/client/v3/compare.go b/vendor/go.etcd.io/etcd/client/v3/compare.go index e2967cf38ed..663fdb4d206 100644 --- a/vendor/go.etcd.io/etcd/client/v3/compare.go +++ b/vendor/go.etcd.io/etcd/client/v3/compare.go @@ -18,8 +18,10 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" ) -type CompareTarget int -type CompareResult int +type ( + CompareTarget int + CompareResult int +) const ( CompareVersion CompareTarget = iota @@ -30,7 +32,7 @@ const ( type Cmp pb.Compare -func Compare(cmp Cmp, result string, v interface{}) Cmp { +func Compare(cmp Cmp, result string, v any) Cmp { var r pb.Compare_CompareResult switch result { @@ -120,7 +122,7 @@ func (cmp Cmp) WithPrefix() Cmp { } // mustInt64 panics if val isn't an int or int64. It returns an int64 otherwise. -func mustInt64(val interface{}) int64 { +func mustInt64(val any) int64 { if v, ok := val.(int64); ok { return v } @@ -132,7 +134,7 @@ func mustInt64(val interface{}) int64 { // mustInt64orLeaseID panics if val isn't a LeaseID, int or int64. It returns an // int64 otherwise. -func mustInt64orLeaseID(val interface{}) int64 { +func mustInt64orLeaseID(val any) int64 { if v, ok := val.(LeaseID); ok { return int64(v) } diff --git a/vendor/go.etcd.io/etcd/client/v3/config.go b/vendor/go.etcd.io/etcd/client/v3/config.go index 6f5b41978d3..8351828d2f9 100644 --- a/vendor/go.etcd.io/etcd/client/v3/config.go +++ b/vendor/go.etcd.io/etcd/client/v3/config.go @@ -21,6 +21,8 @@ import ( "go.uber.org/zap" "google.golang.org/grpc" + + "go.etcd.io/etcd/client/pkg/v3/transport" ) type Config struct { @@ -52,7 +54,7 @@ type Config struct { // If 0, it defaults to "math.MaxInt32", because range response can // easily exceed request send limits. // Make sure that "MaxCallRecvMsgSize" >= server-side default send/recv limit. - // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). + // ("--max-recv-bytes" flag to etcd). MaxCallRecvMsgSize int // TLS holds the client secure credentials, if any. @@ -99,3 +101,128 @@ type Config struct { // TODO: support custom balancer picker } + +// ConfigSpec is the configuration from users, which comes from command-line flags, +// environment variables or config file. It is a fully declarative configuration, +// and can be serialized & deserialized to/from JSON. +type ConfigSpec struct { + Endpoints []string `json:"endpoints"` + RequestTimeout time.Duration `json:"request-timeout"` + DialTimeout time.Duration `json:"dial-timeout"` + KeepAliveTime time.Duration `json:"keepalive-time"` + KeepAliveTimeout time.Duration `json:"keepalive-timeout"` + MaxCallSendMsgSize int `json:"max-request-bytes"` + MaxCallRecvMsgSize int `json:"max-recv-bytes"` + Secure *SecureConfig `json:"secure"` + Auth *AuthConfig `json:"auth"` +} + +type SecureConfig struct { + Cert string `json:"cert"` + Key string `json:"key"` + Cacert string `json:"cacert"` + ServerName string `json:"server-name"` + + InsecureTransport bool `json:"insecure-transport"` + InsecureSkipVerify bool `json:"insecure-skip-tls-verify"` +} + +type AuthConfig struct { + Username string `json:"username"` + Password string `json:"password"` +} + +func (cs *ConfigSpec) Clone() *ConfigSpec { + if cs == nil { + return nil + } + + clone := *cs + + if len(cs.Endpoints) > 0 { + clone.Endpoints = make([]string, len(cs.Endpoints)) + copy(clone.Endpoints, cs.Endpoints) + } + + if cs.Secure != nil { + clone.Secure = &SecureConfig{} + *clone.Secure = *cs.Secure + } + if cs.Auth != nil { + clone.Auth = &AuthConfig{} + *clone.Auth = *cs.Auth + } + + return &clone +} + +func (cfg AuthConfig) Empty() bool { + return cfg.Username == "" && cfg.Password == "" +} + +// NewClientConfig creates a Config based on the provided ConfigSpec. +func NewClientConfig(confSpec *ConfigSpec, lg *zap.Logger) (*Config, error) { + tlsCfg, err := newTLSConfig(confSpec.Secure, lg) + if err != nil { + return nil, err + } + + cfg := &Config{ + Endpoints: confSpec.Endpoints, + DialTimeout: confSpec.DialTimeout, + DialKeepAliveTime: confSpec.KeepAliveTime, + DialKeepAliveTimeout: confSpec.KeepAliveTimeout, + MaxCallSendMsgSize: confSpec.MaxCallSendMsgSize, + MaxCallRecvMsgSize: confSpec.MaxCallRecvMsgSize, + TLS: tlsCfg, + } + + if confSpec.Auth != nil { + cfg.Username = confSpec.Auth.Username + cfg.Password = confSpec.Auth.Password + } + + return cfg, nil +} + +func newTLSConfig(scfg *SecureConfig, lg *zap.Logger) (*tls.Config, error) { + var ( + tlsCfg *tls.Config + err error + ) + + if scfg == nil { + return nil, nil + } + + if scfg.Cert != "" || scfg.Key != "" || scfg.Cacert != "" || scfg.ServerName != "" { + cfgtls := &transport.TLSInfo{ + CertFile: scfg.Cert, + KeyFile: scfg.Key, + TrustedCAFile: scfg.Cacert, + ServerName: scfg.ServerName, + Logger: lg, + } + if tlsCfg, err = cfgtls.ClientConfig(); err != nil { + return nil, err + } + } + + // If key/cert is not given but user wants secure connection, we + // should still setup an empty tls configuration for gRPC to setup + // secure connection. + if tlsCfg == nil && !scfg.InsecureTransport { + tlsCfg = &tls.Config{} + } + + // If the user wants to skip TLS verification then we should set + // the InsecureSkipVerify flag in tls configuration. + if scfg.InsecureSkipVerify { + if tlsCfg == nil { + tlsCfg = &tls.Config{} + } + tlsCfg.InsecureSkipVerify = scfg.InsecureSkipVerify + } + + return tlsCfg, nil +} diff --git a/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go b/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go index 42f688eb359..a2d8b45e86a 100644 --- a/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go +++ b/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go @@ -19,92 +19,51 @@ package credentials import ( "context" "crypto/tls" - "net" "sync" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" grpccredentials "google.golang.org/grpc/credentials" + + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) -// Config defines gRPC credential configuration. -type Config struct { - TLSConfig *tls.Config +func NewTransportCredential(cfg *tls.Config) grpccredentials.TransportCredentials { + return grpccredentials.NewTLS(cfg) } -// Bundle defines gRPC credential interface. -type Bundle interface { - grpccredentials.Bundle +// PerRPCCredentialsBundle defines gRPC credential interface. +type PerRPCCredentialsBundle interface { UpdateAuthToken(token string) + PerRPCCredentials() grpccredentials.PerRPCCredentials } -// NewBundle constructs a new gRPC credential bundle. -func NewBundle(cfg Config) Bundle { - return &bundle{ - tc: newTransportCredential(cfg.TLSConfig), - rc: newPerRPCCredential(), +func NewPerRPCCredentialBundle() PerRPCCredentialsBundle { + return &perRPCCredentialBundle{ + rc: &perRPCCredential{}, } } -// bundle implements "grpccredentials.Bundle" interface. -type bundle struct { - tc *transportCredential +// perRPCCredentialBundle implements `PerRPCCredentialsBundle` interface. +type perRPCCredentialBundle struct { rc *perRPCCredential } -func (b *bundle) TransportCredentials() grpccredentials.TransportCredentials { - return b.tc -} - -func (b *bundle) PerRPCCredentials() grpccredentials.PerRPCCredentials { - return b.rc -} - -func (b *bundle) NewWithMode(mode string) (grpccredentials.Bundle, error) { - // no-op - return nil, nil -} - -// transportCredential implements "grpccredentials.TransportCredentials" interface. -type transportCredential struct { - gtc grpccredentials.TransportCredentials -} - -func newTransportCredential(cfg *tls.Config) *transportCredential { - return &transportCredential{ - gtc: grpccredentials.NewTLS(cfg), - } -} - -func (tc *transportCredential) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) { - return tc.gtc.ClientHandshake(ctx, authority, rawConn) -} - -func (tc *transportCredential) ServerHandshake(rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) { - return tc.gtc.ServerHandshake(rawConn) -} - -func (tc *transportCredential) Info() grpccredentials.ProtocolInfo { - return tc.gtc.Info() -} - -func (tc *transportCredential) Clone() grpccredentials.TransportCredentials { - return &transportCredential{ - gtc: tc.gtc.Clone(), +func (b *perRPCCredentialBundle) UpdateAuthToken(token string) { + if b.rc == nil { + return } + b.rc.UpdateAuthToken(token) } -func (tc *transportCredential) OverrideServerName(serverNameOverride string) error { - return tc.gtc.OverrideServerName(serverNameOverride) +func (b *perRPCCredentialBundle) PerRPCCredentials() grpccredentials.PerRPCCredentials { + return b.rc } -// perRPCCredential implements "grpccredentials.PerRPCCredentials" interface. +// perRPCCredential implements `grpccredentials.PerRPCCredentials` interface. type perRPCCredential struct { authToken string authTokenMu sync.RWMutex } -func newPerRPCCredential() *perRPCCredential { return &perRPCCredential{} } - func (rc *perRPCCredential) RequireTransportSecurity() bool { return false } func (rc *perRPCCredential) GetRequestMetadata(ctx context.Context, s ...string) (map[string]string, error) { @@ -117,13 +76,6 @@ func (rc *perRPCCredential) GetRequestMetadata(ctx context.Context, s ...string) return map[string]string{rpctypes.TokenFieldNameGRPC: authToken}, nil } -func (b *bundle) UpdateAuthToken(token string) { - if b.rc == nil { - return - } - b.rc.UpdateAuthToken(token) -} - func (rc *perRPCCredential) UpdateAuthToken(token string) { rc.authTokenMu.Lock() rc.authToken = token diff --git a/vendor/go.etcd.io/etcd/client/v3/ctx.go b/vendor/go.etcd.io/etcd/client/v3/ctx.go index 56b69cf2ede..38cee6c27e4 100644 --- a/vendor/go.etcd.io/etcd/client/v3/ctx.go +++ b/vendor/go.etcd.io/etcd/client/v3/ctx.go @@ -17,9 +17,10 @@ package clientv3 import ( "context" + "google.golang.org/grpc/metadata" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/api/v3/version" - "google.golang.org/grpc/metadata" ) // WithRequireLeader requires client requests to only succeed diff --git a/vendor/go.etcd.io/etcd/client/v3/doc.go b/vendor/go.etcd.io/etcd/client/v3/doc.go index fd61aff117a..bd820d3d79e 100644 --- a/vendor/go.etcd.io/etcd/client/v3/doc.go +++ b/vendor/go.etcd.io/etcd/client/v3/doc.go @@ -47,8 +47,8 @@ // To specify a client request timeout, wrap the context with context.WithTimeout: // // ctx, cancel := context.WithTimeout(context.Background(), timeout) +// defer cancel() // resp, err := kvc.Put(ctx, "sample_key", "sample_value") -// cancel() // if err != nil { // // handle error! // } @@ -61,8 +61,7 @@ // // 1. context error: canceled or deadline exceeded. // 2. gRPC error: e.g. when clock drifts in server-side before client's context deadline exceeded. -// -// See https://github.com/etcd-io/etcd/blob/main/api/v3rpc/rpctypes/error.go +// See https://github.com/etcd-io/etcd/blob/main/api/v3rpc/rpctypes/error.go // // Here is the example code to handle client errors: // diff --git a/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go b/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go index 35a3fe8c337..2c45b5e3067 100644 --- a/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go +++ b/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go @@ -25,12 +25,12 @@ import ( type CredsRequirement int const ( - // CREDS_REQUIRE - Credentials/certificate required for thi type of connection. - CREDS_REQUIRE CredsRequirement = iota - // CREDS_DROP - Credentials/certificate not needed and should get ignored. - CREDS_DROP - // CREDS_OPTIONAL - Credentials/certificate might be used if supplied - CREDS_OPTIONAL + // CredsRequire - Credentials/certificate required for thi type of connection. + CredsRequire CredsRequirement = iota + // CredsDrop - Credentials/certificate not needed and should get ignored. + CredsDrop + // CredsOptional - Credentials/certificate might be used if supplied + CredsOptional ) func extractHostFromHostPort(ep string) string { @@ -54,20 +54,20 @@ func mustSplit2(s, sep string) (string, string) { func schemeToCredsRequirement(schema string) CredsRequirement { switch schema { case "https", "unixs": - return CREDS_REQUIRE + return CredsRequire case "http": - return CREDS_DROP + return CredsDrop case "unix": // Preserving previous behavior from: // https://github.com/etcd-io/etcd/blob/dae29bb719dd69dc119146fc297a0628fcc1ccf8/client/v3/client.go#L212 // that likely was a bug due to missing 'fallthrough'. // At the same time it seems legit to let the users decide whether they // want credential control or not (and 'unixs' schema is not a standard thing). - return CREDS_OPTIONAL + return CredsOptional case "": - return CREDS_OPTIONAL + return CredsOptional default: - return CREDS_OPTIONAL + return CredsOptional } } @@ -106,7 +106,7 @@ func translateEndpoint(ep string) (addr string, serverName string, requireCreds if strings.Contains(ep, "://") { url, err := url.Parse(ep) if err != nil { - return ep, ep, CREDS_OPTIONAL + return ep, ep, CredsOptional } if url.Scheme == "http" || url.Scheme == "https" { return url.Host, url.Host, schemeToCredsRequirement(url.Scheme) @@ -114,7 +114,7 @@ func translateEndpoint(ep string) (addr string, serverName string, requireCreds return ep, url.Host, schemeToCredsRequirement(url.Scheme) } // Handles plain addresses like 10.0.0.44:437. - return ep, ep, CREDS_OPTIONAL + return ep, ep, CredsOptional } // RequiresCredentials returns whether given endpoint requires diff --git a/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go b/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go index 3ee3cb8e2bb..403b745cb72 100644 --- a/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go +++ b/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go @@ -15,10 +15,11 @@ package resolver import ( - "go.etcd.io/etcd/client/v3/internal/endpoint" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" "google.golang.org/grpc/serviceconfig" + + "go.etcd.io/etcd/client/v3/internal/endpoint" ) const ( @@ -60,13 +61,15 @@ func (r *EtcdManualResolver) SetEndpoints(endpoints []string) { func (r EtcdManualResolver) updateState() { if r.CC != nil { - addresses := make([]resolver.Address, len(r.endpoints)) + eps := make([]resolver.Endpoint, len(r.endpoints)) for i, ep := range r.endpoints { addr, serverName := endpoint.Interpret(ep) - addresses[i] = resolver.Address{Addr: addr, ServerName: serverName} + eps[i] = resolver.Endpoint{Addresses: []resolver.Address{ + {Addr: addr, ServerName: serverName}, + }} } state := resolver.State{ - Addresses: addresses, + Endpoints: eps, ServiceConfig: r.serviceConfig, } r.UpdateState(state) diff --git a/vendor/go.etcd.io/etcd/client/v3/kv.go b/vendor/go.etcd.io/etcd/client/v3/kv.go index be5b508dd61..8d0c595d1e4 100644 --- a/vendor/go.etcd.io/etcd/client/v3/kv.go +++ b/vendor/go.etcd.io/etcd/client/v3/kv.go @@ -17,9 +17,10 @@ package clientv3 import ( "context" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "google.golang.org/grpc" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) type ( @@ -79,12 +80,15 @@ func (op OpResponse) Txn() *TxnResponse { return op.txn } func (resp *PutResponse) OpResponse() OpResponse { return OpResponse{put: resp} } + func (resp *GetResponse) OpResponse() OpResponse { return OpResponse{get: resp} } + func (resp *DeleteResponse) OpResponse() OpResponse { return OpResponse{del: resp} } + func (resp *TxnResponse) OpResponse() OpResponse { return OpResponse{txn: resp} } @@ -145,10 +149,14 @@ func (kv *kv) Do(ctx context.Context, op Op) (OpResponse, error) { var err error switch op.t { case tRange: - var resp *pb.RangeResponse - resp, err = kv.remote.Range(ctx, op.toRangeRequest(), kv.callOpts...) - if err == nil { - return OpResponse{get: (*GetResponse)(resp)}, nil + if op.IsSortOptionValid() { + var resp *pb.RangeResponse + resp, err = kv.remote.Range(ctx, op.toRangeRequest(), kv.callOpts...) + if err == nil { + return OpResponse{get: (*GetResponse)(resp)}, nil + } + } else { + err = rpctypes.ErrInvalidSortOption } case tPut: var resp *pb.PutResponse diff --git a/vendor/go.etcd.io/etcd/client/v3/lease.go b/vendor/go.etcd.io/etcd/client/v3/lease.go index 4e7d1caf831..11b58348286 100644 --- a/vendor/go.etcd.io/etcd/client/v3/lease.go +++ b/vendor/go.etcd.io/etcd/client/v3/lease.go @@ -16,15 +16,16 @@ package clientv3 import ( "context" + "errors" "sync" "time" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) type ( @@ -198,12 +199,12 @@ func NewLeaseFromLeaseClient(remote pb.LeaseClient, c *Client, keepAliveTimeout keepAlives: make(map[LeaseID]*keepAlive), remote: remote, firstKeepAliveTimeout: keepAliveTimeout, - lg: c.lg, } if l.firstKeepAliveTimeout == time.Second { l.firstKeepAliveTimeout = defaultTTL } if c != nil { + l.lg = c.lg l.callOpts = c.callOpts } reqLeaderCtx := WithRequireLeader(context.Background()) @@ -263,6 +264,12 @@ func (l *lessor) Leases(ctx context.Context) (*LeaseLeasesResponse, error) { return nil, ContextError(ctx, err) } +// To identify the context passed to `KeepAlive`, a key/value pair is +// attached to the context. The key is a `keepAliveCtxKey` object, and +// the value is the pointer to the context object itself, ensuring +// uniqueness as each context has a unique memory address. +type keepAliveCtxKey struct{} + func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) { ch := make(chan *LeaseKeepAliveResponse, LeaseResponseChSize) @@ -277,6 +284,10 @@ func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAl default: } ka, ok := l.keepAlives[id] + + if ctx.Done() != nil { + ctx = context.WithValue(ctx, keepAliveCtxKey{}, &ctx) + } if !ok { // create fresh keep alive ka = &keepAlive{ @@ -347,7 +358,7 @@ func (l *lessor) keepAliveCtxCloser(ctx context.Context, id LeaseID, donec <-cha // close channel and remove context if still associated with keep alive for i, c := range ka.ctxs { - if c == ctx { + if c.Value(keepAliveCtxKey{}) == ctx.Value(keepAliveCtxKey{}) { close(ka.chs[i]) ka.ctxs = append(ka.ctxs[:i], ka.ctxs[i+1:]...) ka.chs = append(ka.chs[:i], ka.chs[i+1:]...) @@ -409,9 +420,9 @@ func (l *lessor) keepAliveOnce(ctx context.Context, id LeaseID) (karesp *LeaseKe } defer func() { - if err := stream.CloseSend(); err != nil { + if cerr := stream.CloseSend(); cerr != nil { if ferr == nil { - ferr = ContextError(ctx, err) + ferr = ContextError(ctx, cerr) } return } @@ -450,6 +461,9 @@ func (l *lessor) recvKeepAliveLoop() (gerr error) { for { stream, err := l.resetRecv() if err != nil { + l.lg.Warn("error occurred during lease keep alive loop", + zap.Error(err), + ) if canceledByCaller(l.stopCtx, err) { return err } @@ -461,7 +475,7 @@ func (l *lessor) recvKeepAliveLoop() (gerr error) { return err } - if ContextError(l.stopCtx, err) == rpctypes.ErrNoLeader { + if errors.Is(ContextError(l.stopCtx, err), rpctypes.ErrNoLeader) { l.closeRequireLeader() } break @@ -546,9 +560,12 @@ func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) { // deadlineLoop reaps any keep alive channels that have not received a response // within the lease TTL func (l *lessor) deadlineLoop() { + timer := time.NewTimer(time.Second) + defer timer.Stop() for { + timer.Reset(time.Second) select { - case <-time.After(time.Second): + case <-timer.C: case <-l.donec: return } @@ -582,7 +599,9 @@ func (l *lessor) sendKeepAliveLoop(stream pb.Lease_LeaseKeepAliveClient) { for _, id := range tosend { r := &pb.LeaseKeepAliveRequest{ID: int64(id)} if err := stream.Send(r); err != nil { - // TODO do something with this error? + l.lg.Warn("error occurred during lease keep alive request sending", + zap.Error(err), + ) return } } diff --git a/vendor/go.etcd.io/etcd/client/v3/logger.go b/vendor/go.etcd.io/etcd/client/v3/logger.go index eaa35f2d3ac..300363cd25b 100644 --- a/vendor/go.etcd.io/etcd/client/v3/logger.go +++ b/vendor/go.etcd.io/etcd/client/v3/logger.go @@ -18,10 +18,11 @@ import ( "log" "os" - "go.etcd.io/etcd/client/pkg/v3/logutil" "go.uber.org/zap/zapcore" "go.uber.org/zap/zapgrpc" "google.golang.org/grpc/grpclog" + + "go.etcd.io/etcd/client/pkg/v3/logutil" ) func init() { @@ -52,7 +53,7 @@ func etcdClientDebugLevel() zapcore.Level { } var l zapcore.Level if err := l.Set(envLevel); err != nil { - log.Printf("Invalid value for environment variable 'ETCD_CLIENT_DEBUG'. Using default level: 'info'") + log.Print("Invalid value for environment variable 'ETCD_CLIENT_DEBUG'. Using default level: 'info'") return zapcore.InfoLevel } return l diff --git a/vendor/go.etcd.io/etcd/client/v3/maintenance.go b/vendor/go.etcd.io/etcd/client/v3/maintenance.go index 71b28e6dc3f..00aaacd15fd 100644 --- a/vendor/go.etcd.io/etcd/client/v3/maintenance.go +++ b/vendor/go.etcd.io/etcd/client/v3/maintenance.go @@ -16,12 +16,14 @@ package clientv3 import ( "context" + "errors" "fmt" "io" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.uber.org/zap" "google.golang.org/grpc" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" ) type ( @@ -31,6 +33,15 @@ type ( StatusResponse pb.StatusResponse HashKVResponse pb.HashKVResponse MoveLeaderResponse pb.MoveLeaderResponse + DowngradeResponse pb.DowngradeResponse + + DowngradeAction pb.DowngradeRequest_DowngradeAction +) + +const ( + DowngradeValidate = DowngradeAction(pb.DowngradeRequest_VALIDATE) + DowngradeEnable = DowngradeAction(pb.DowngradeRequest_ENABLE) + DowngradeCancel = DowngradeAction(pb.DowngradeRequest_CANCEL) ) type Maintenance interface { @@ -57,14 +68,40 @@ type Maintenance interface { // is non-zero, the hash is computed on all keys at or below the given revision. HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) + // SnapshotWithVersion returns a reader for a point-in-time snapshot and version of etcd that created it. + // If the context "ctx" is canceled or timed out, reading from returned + // "io.ReadCloser" would error out (e.g. context.Canceled, context.DeadlineExceeded). + SnapshotWithVersion(ctx context.Context) (*SnapshotResponse, error) + // Snapshot provides a reader for a point-in-time snapshot of etcd. // If the context "ctx" is canceled or timed out, reading from returned // "io.ReadCloser" would error out (e.g. context.Canceled, context.DeadlineExceeded). + // Deprecated: use SnapshotWithVersion instead. Snapshot(ctx context.Context) (io.ReadCloser, error) // MoveLeader requests current leader to transfer its leadership to the transferee. // Request must be made to the leader. MoveLeader(ctx context.Context, transfereeID uint64) (*MoveLeaderResponse, error) + + // Downgrade requests downgrades, verifies feasibility or cancels downgrade + // on the cluster version. + // Supported since etcd 3.5. + Downgrade(ctx context.Context, action DowngradeAction, version string) (*DowngradeResponse, error) +} + +// SnapshotResponse is aggregated response from the snapshot stream. +// Consumer is responsible for closing steam by calling .Snapshot.Close() +type SnapshotResponse struct { + // Header is the first header in the snapshot stream, has the current key-value store information + // and indicates the point in time of the snapshot. + Header *pb.ResponseHeader + // Snapshot exposes ReaderCloser interface for data stored in the Blob field in the snapshot stream. + Snapshot io.ReadCloser + // Version is the local version of server that created the snapshot. + // In cluster with binaries with different version, each cluster can return different result. + // Informs which etcd server version should be used when restoring the snapshot. + // Supported on etcd >= v3.6. + Version string } type maintenance struct { @@ -80,22 +117,10 @@ func NewMaintenance(c *Client) Maintenance { dial: func(endpoint string) (pb.MaintenanceClient, func(), error) { conn, err := c.Dial(endpoint) if err != nil { - return nil, nil, fmt.Errorf("failed to dial endpoint %s with maintenance client: %v", endpoint, err) + return nil, nil, fmt.Errorf("failed to dial endpoint %s with maintenance client: %w", endpoint, err) } - //get token with established connection - dctx := c.ctx - cancel := func() {} - if c.cfg.DialTimeout > 0 { - dctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout) - } - err = c.getToken(dctx) - cancel() - if err != nil { - conn.Close() - return nil, nil, fmt.Errorf("failed to getToken from endpoint %s with maintenance client: %v", endpoint, err) - } - cancel = func() { conn.Close() } + cancel := func() { conn.Close() } return RetryMaintenanceClient(c, conn), cancel, nil }, remote: RetryMaintenanceClient(c, c.conn), @@ -108,7 +133,6 @@ func NewMaintenance(c *Client) Maintenance { func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient, c *Client) Maintenance { api := &maintenance{ - lg: c.lg, dial: func(string) (pb.MaintenanceClient, func(), error) { return remote, func() {}, nil }, @@ -116,6 +140,7 @@ func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient, c *Client) } if c != nil { api.callOpts = c.callOpts + api.lg = c.lg } return api } @@ -192,7 +217,6 @@ func (m *maintenance) Status(ctx context.Context, endpoint string) (*StatusRespo func (m *maintenance) HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) { remote, cancel, err := m.dial(endpoint) if err != nil { - return nil, ContextError(ctx, err) } defer cancel() @@ -203,7 +227,7 @@ func (m *maintenance) HashKV(ctx context.Context, endpoint string, rev int64) (* return (*HashKVResponse)(resp), nil } -func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { +func (m *maintenance) SnapshotWithVersion(ctx context.Context) (*SnapshotResponse, error) { ss, err := m.remote.Snapshot(ctx, &pb.SnapshotRequest{}, append(m.callOpts, withMax(defaultStreamMaxRetries))...) if err != nil { return nil, ContextError(ctx, err) @@ -211,27 +235,60 @@ func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { m.lg.Info("opened snapshot stream; downloading") pr, pw := io.Pipe() + + resp, err := ss.Recv() + if err != nil { + m.logAndCloseWithError(err, pw) + return nil, err + } go func() { + // Saving response is blocking + err := m.save(resp, pw) + if err != nil { + m.logAndCloseWithError(err, pw) + return + } for { - resp, err := ss.Recv() + sresp, err := ss.Recv() if err != nil { - switch err { - case io.EOF: - m.lg.Info("completed snapshot read; closing") - default: - m.lg.Warn("failed to receive from snapshot stream; closing", zap.Error(err)) - } - pw.CloseWithError(err) + m.logAndCloseWithError(err, pw) return } - // can "resp == nil && err == nil" - // before we receive snapshot SHA digest? - // No, server sends EOF with an empty response - // after it sends SHA digest at the end + err = m.save(sresp, pw) + if err != nil { + m.logAndCloseWithError(err, pw) + return + } + } + }() - if _, werr := pw.Write(resp.Blob); werr != nil { - pw.CloseWithError(werr) + return &SnapshotResponse{ + Header: resp.GetHeader(), + Snapshot: &snapshotReadCloser{ctx: ctx, ReadCloser: pr}, + Version: resp.GetVersion(), + }, nil +} + +func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { + ss, err := m.remote.Snapshot(ctx, &pb.SnapshotRequest{}, append(m.callOpts, withMax(defaultStreamMaxRetries))...) + if err != nil { + return nil, ContextError(ctx, err) + } + + m.lg.Info("opened snapshot stream; downloading") + pr, pw := io.Pipe() + + go func() { + for { + resp, err := ss.Recv() + if err != nil { + m.logAndCloseWithError(err, pw) + return + } + err = m.save(resp, pw) + if err != nil { + m.logAndCloseWithError(err, pw) return } } @@ -239,6 +296,28 @@ func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { return &snapshotReadCloser{ctx: ctx, ReadCloser: pr}, nil } +func (m *maintenance) logAndCloseWithError(err error, pw *io.PipeWriter) { + switch { + case errors.Is(err, io.EOF): + m.lg.Info("completed snapshot read; closing") + default: + m.lg.Warn("failed to receive from snapshot stream; closing", zap.Error(err)) + } + pw.CloseWithError(err) +} + +func (m *maintenance) save(resp *pb.SnapshotResponse, pw *io.PipeWriter) error { + // can "resp == nil && err == nil" + // before we receive snapshot SHA digest? + // No, server sends EOF with an empty response + // after it sends SHA digest at the end + + if _, werr := pw.Write(resp.Blob); werr != nil { + return werr + } + return nil +} + type snapshotReadCloser struct { ctx context.Context io.ReadCloser @@ -253,3 +332,19 @@ func (m *maintenance) MoveLeader(ctx context.Context, transfereeID uint64) (*Mov resp, err := m.remote.MoveLeader(ctx, &pb.MoveLeaderRequest{TargetID: transfereeID}, m.callOpts...) return (*MoveLeaderResponse)(resp), ContextError(ctx, err) } + +func (m *maintenance) Downgrade(ctx context.Context, action DowngradeAction, version string) (*DowngradeResponse, error) { + var actionType pb.DowngradeRequest_DowngradeAction + switch action { + case DowngradeValidate: + actionType = pb.DowngradeRequest_VALIDATE + case DowngradeEnable: + actionType = pb.DowngradeRequest_ENABLE + case DowngradeCancel: + actionType = pb.DowngradeRequest_CANCEL + default: + return nil, errors.New("etcdclient: unknown downgrade action") + } + resp, err := m.remote.Downgrade(ctx, &pb.DowngradeRequest{Action: actionType, Version: version}, m.callOpts...) + return (*DowngradeResponse)(resp), ContextError(ctx, err) +} diff --git a/vendor/go.etcd.io/etcd/client/v3/op.go b/vendor/go.etcd.io/etcd/client/v3/op.go index 5251906322c..20cb34f5c3c 100644 --- a/vendor/go.etcd.io/etcd/client/v3/op.go +++ b/vendor/go.etcd.io/etcd/client/v3/op.go @@ -106,6 +106,9 @@ func (op Op) RangeBytes() []byte { return op.end } // Rev returns the requested revision, if any. func (op Op) Rev() int64 { return op.rev } +// Limit returns limit of the result, if any. +func (op Op) Limit() int64 { return op.limit } + // IsPut returns true iff the operation is a Put. func (op Op) IsPut() bool { return op.t == tPut } @@ -124,6 +127,10 @@ func (op Op) IsKeysOnly() bool { return op.keysOnly } // IsCountOnly returns whether countOnly is set. func (op Op) IsCountOnly() bool { return op.countOnly } +func (op Op) IsOptsWithFromKey() bool { return op.isOptsWithFromKey } + +func (op Op) IsOptsWithPrefix() bool { return op.isOptsWithPrefix } + // MinModRev returns the operation's minimum modify revision. func (op Op) MinModRev() int64 { return op.minModRev } @@ -418,9 +425,15 @@ func WithFromKey() OpOption { } } -// WithSerializable makes 'Get' request serializable. By default, -// it's linearizable. Serializable requests are better for lower latency -// requirement. +// WithSerializable makes `Get` and `MemberList` requests serializable. +// By default, they are linearizable. Serializable requests are better +// for lower latency requirement, but users should be aware that they +// could get stale data with serializable requests. +// +// In some situations users may want to use serializable requests. For +// example, when adding a new member to a one-node cluster, it's reasonable +// and safe to use serializable request before the new added member gets +// started. func WithSerializable() OpOption { return func(op *Op) { op.serializable = true } } @@ -581,3 +594,19 @@ func IsOptsWithFromKey(opts []OpOption) bool { return ret.isOptsWithFromKey } + +func (op Op) IsSortOptionValid() bool { + if op.sort != nil { + sortOrder := int32(op.sort.Order) + sortTarget := int32(op.sort.Target) + + if _, ok := pb.RangeRequest_SortOrder_name[sortOrder]; !ok { + return false + } + + if _, ok := pb.RangeRequest_SortTarget_name[sortTarget]; !ok { + return false + } + } + return true +} diff --git a/vendor/go.etcd.io/etcd/client/v3/options.go b/vendor/go.etcd.io/etcd/client/v3/options.go index cdae1b16a2a..cc10a03d76d 100644 --- a/vendor/go.etcd.io/etcd/client/v3/options.go +++ b/vendor/go.etcd.io/etcd/client/v3/options.go @@ -23,7 +23,7 @@ import ( var ( // client-side handling retrying of request failures where data was not written to the wire or - // where server indicates it did not process the data. gRPC default is default is "WaitForReady(false)" + // where server indicates it did not process the data. gRPC default is "WaitForReady(false)" // but for etcd we default to "WaitForReady(true)" to minimize client request error responses due to // transient failures. defaultWaitForReady = grpc.WaitForReady(true) diff --git a/vendor/go.etcd.io/etcd/client/v3/retry.go b/vendor/go.etcd.io/etcd/client/v3/retry.go index 69ecc631471..9152c53a7d4 100644 --- a/vendor/go.etcd.io/etcd/client/v3/retry.go +++ b/vendor/go.etcd.io/etcd/client/v3/retry.go @@ -16,13 +16,14 @@ package clientv3 import ( "context" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "errors" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) type retryPolicy uint8 @@ -52,7 +53,8 @@ func (rp retryPolicy) String() string { // handle itself even with retries. func isSafeRetryImmutableRPC(err error) bool { eErr := rpctypes.Error(err) - if serverErr, ok := eErr.(rpctypes.EtcdError); ok && serverErr.Code() != codes.Unavailable { + var serverErr rpctypes.EtcdError + if errors.As(eErr, &serverErr) && serverErr.Code() != codes.Unavailable { // interrupted by non-transient server-side or gRPC-side error // client cannot handle itself (e.g. rpctypes.ErrCompacted) return false @@ -101,8 +103,9 @@ func RetryKVClient(c *Client) pb.KVClient { kc: pb.NewKVClient(c.conn), } } + func (rkv *retryKVClient) Range(ctx context.Context, in *pb.RangeRequest, opts ...grpc.CallOption) (resp *pb.RangeResponse, err error) { - return rkv.kc.Range(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rkv.kc.Range(ctx, in, append(opts, withRepeatablePolicy())...) } func (rkv *retryKVClient) Put(ctx context.Context, in *pb.PutRequest, opts ...grpc.CallOption) (resp *pb.PutResponse, err error) { @@ -133,23 +136,23 @@ func RetryLeaseClient(c *Client) pb.LeaseClient { } func (rlc *retryLeaseClient) LeaseTimeToLive(ctx context.Context, in *pb.LeaseTimeToLiveRequest, opts ...grpc.CallOption) (resp *pb.LeaseTimeToLiveResponse, err error) { - return rlc.lc.LeaseTimeToLive(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rlc.lc.LeaseTimeToLive(ctx, in, append(opts, withRepeatablePolicy())...) } func (rlc *retryLeaseClient) LeaseLeases(ctx context.Context, in *pb.LeaseLeasesRequest, opts ...grpc.CallOption) (resp *pb.LeaseLeasesResponse, err error) { - return rlc.lc.LeaseLeases(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rlc.lc.LeaseLeases(ctx, in, append(opts, withRepeatablePolicy())...) } func (rlc *retryLeaseClient) LeaseGrant(ctx context.Context, in *pb.LeaseGrantRequest, opts ...grpc.CallOption) (resp *pb.LeaseGrantResponse, err error) { - return rlc.lc.LeaseGrant(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rlc.lc.LeaseGrant(ctx, in, append(opts, withRepeatablePolicy())...) } func (rlc *retryLeaseClient) LeaseRevoke(ctx context.Context, in *pb.LeaseRevokeRequest, opts ...grpc.CallOption) (resp *pb.LeaseRevokeResponse, err error) { - return rlc.lc.LeaseRevoke(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rlc.lc.LeaseRevoke(ctx, in, append(opts, withRepeatablePolicy())...) } func (rlc *retryLeaseClient) LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (stream pb.Lease_LeaseKeepAliveClient, err error) { - return rlc.lc.LeaseKeepAlive(ctx, append(opts, withRetryPolicy(repeatable))...) + return rlc.lc.LeaseKeepAlive(ctx, append(opts, withRepeatablePolicy())...) } type retryClusterClient struct { @@ -164,7 +167,7 @@ func RetryClusterClient(c *Client) pb.ClusterClient { } func (rcc *retryClusterClient) MemberList(ctx context.Context, in *pb.MemberListRequest, opts ...grpc.CallOption) (resp *pb.MemberListResponse, err error) { - return rcc.cc.MemberList(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rcc.cc.MemberList(ctx, in, append(opts, withRepeatablePolicy())...) } func (rcc *retryClusterClient) MemberAdd(ctx context.Context, in *pb.MemberAddRequest, opts ...grpc.CallOption) (resp *pb.MemberAddResponse, err error) { @@ -195,27 +198,27 @@ func RetryMaintenanceClient(c *Client, conn *grpc.ClientConn) pb.MaintenanceClie } func (rmc *retryMaintenanceClient) Alarm(ctx context.Context, in *pb.AlarmRequest, opts ...grpc.CallOption) (resp *pb.AlarmResponse, err error) { - return rmc.mc.Alarm(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rmc.mc.Alarm(ctx, in, append(opts, withRepeatablePolicy())...) } func (rmc *retryMaintenanceClient) Status(ctx context.Context, in *pb.StatusRequest, opts ...grpc.CallOption) (resp *pb.StatusResponse, err error) { - return rmc.mc.Status(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rmc.mc.Status(ctx, in, append(opts, withRepeatablePolicy())...) } func (rmc *retryMaintenanceClient) Hash(ctx context.Context, in *pb.HashRequest, opts ...grpc.CallOption) (resp *pb.HashResponse, err error) { - return rmc.mc.Hash(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rmc.mc.Hash(ctx, in, append(opts, withRepeatablePolicy())...) } func (rmc *retryMaintenanceClient) HashKV(ctx context.Context, in *pb.HashKVRequest, opts ...grpc.CallOption) (resp *pb.HashKVResponse, err error) { - return rmc.mc.HashKV(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rmc.mc.HashKV(ctx, in, append(opts, withRepeatablePolicy())...) } func (rmc *retryMaintenanceClient) Snapshot(ctx context.Context, in *pb.SnapshotRequest, opts ...grpc.CallOption) (stream pb.Maintenance_SnapshotClient, err error) { - return rmc.mc.Snapshot(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rmc.mc.Snapshot(ctx, in, append(opts, withRepeatablePolicy())...) } func (rmc *retryMaintenanceClient) MoveLeader(ctx context.Context, in *pb.MoveLeaderRequest, opts ...grpc.CallOption) (resp *pb.MoveLeaderResponse, err error) { - return rmc.mc.MoveLeader(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rmc.mc.MoveLeader(ctx, in, append(opts, withRepeatablePolicy())...) } func (rmc *retryMaintenanceClient) Defragment(ctx context.Context, in *pb.DefragmentRequest, opts ...grpc.CallOption) (resp *pb.DefragmentResponse, err error) { @@ -238,19 +241,19 @@ func RetryAuthClient(c *Client) pb.AuthClient { } func (rac *retryAuthClient) UserList(ctx context.Context, in *pb.AuthUserListRequest, opts ...grpc.CallOption) (resp *pb.AuthUserListResponse, err error) { - return rac.ac.UserList(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rac.ac.UserList(ctx, in, append(opts, withRepeatablePolicy())...) } func (rac *retryAuthClient) UserGet(ctx context.Context, in *pb.AuthUserGetRequest, opts ...grpc.CallOption) (resp *pb.AuthUserGetResponse, err error) { - return rac.ac.UserGet(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rac.ac.UserGet(ctx, in, append(opts, withRepeatablePolicy())...) } func (rac *retryAuthClient) RoleGet(ctx context.Context, in *pb.AuthRoleGetRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleGetResponse, err error) { - return rac.ac.RoleGet(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rac.ac.RoleGet(ctx, in, append(opts, withRepeatablePolicy())...) } func (rac *retryAuthClient) RoleList(ctx context.Context, in *pb.AuthRoleListRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleListResponse, err error) { - return rac.ac.RoleList(ctx, in, append(opts, withRetryPolicy(repeatable))...) + return rac.ac.RoleList(ctx, in, append(opts, withRepeatablePolicy())...) } func (rac *retryAuthClient) AuthEnable(ctx context.Context, in *pb.AuthEnableRequest, opts ...grpc.CallOption) (resp *pb.AuthEnableResponse, err error) { diff --git a/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go b/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go index 8c50dcfa93d..7703e673b06 100644 --- a/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go +++ b/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go @@ -24,12 +24,13 @@ import ( "sync" "time" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) // unaryClientInterceptor returns a new retrying unary client interceptor. @@ -38,7 +39,7 @@ import ( // changed through options (e.g. WithMax) on creation of the interceptor or on call (through grpc.CallOptions). func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClientInterceptor { intOpts := reuseOrNewWithCallOptions(defaultOptions, optFuncs) - return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + return func(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { ctx = withVersion(ctx) grpcOpts, retryOpts := filterCallOptions(opts) callOpts := reuseOrNewWithCallOptions(intOpts, retryOpts) @@ -54,6 +55,7 @@ func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClien c.GetLogger().Debug( "retrying of unary invoker", zap.String("target", cc.Target()), + zap.String("method", method), zap.Uint("attempt", attempt), ) lastErr = invoker(ctx, method, req, reply, cc, grpcOpts...) @@ -63,6 +65,7 @@ func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClien c.GetLogger().Warn( "retrying of unary invoker failed", zap.String("target", cc.Target()), + zap.String("method", method), zap.Uint("attempt", attempt), zap.Error(lastErr), ) @@ -75,14 +78,14 @@ func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClien continue } if c.shouldRefreshToken(lastErr, callOpts) { - gterr := c.refreshToken(ctx) - if gterr != nil { + gtErr := c.refreshToken(ctx) + if gtErr != nil { c.GetLogger().Warn( "retrying of unary invoker failed to fetch new auth token", zap.String("target", cc.Target()), - zap.Error(gterr), + zap.Error(gtErr), ) - return gterr // lastErr must be invalid auth token + return gtErr // lastErr must be invalid auth token } continue } @@ -106,15 +109,12 @@ func (c *Client) streamClientInterceptor(optFuncs ...retryOption) grpc.StreamCli intOpts := reuseOrNewWithCallOptions(defaultOptions, optFuncs) return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { ctx = withVersion(ctx) - // getToken automatically - // TODO(cfc4n): keep this code block, remove codes about getToken in client.go after pr #12165 merged. - if c.authTokenBundle != nil { - // equal to c.Username != "" && c.Password != "" - err := c.getToken(ctx) - if err != nil && rpctypes.Error(err) != rpctypes.ErrAuthNotEnabled { - c.GetLogger().Error("clientv3/retry_interceptor: getToken failed", zap.Error(err)) - return nil, err - } + // getToken automatically. Otherwise, auth token may be invalid after watch reconnection because the token has expired + // (see https://github.com/etcd-io/etcd/issues/11954 for more). + err := c.getToken(ctx) + if err != nil { + c.GetLogger().Error("clientv3/retry_interceptor: getToken failed", zap.Error(err)) + return nil, err } grpcOpts, retryOpts := filterCallOptions(opts) callOpts := reuseOrNewWithCallOptions(intOpts, retryOpts) @@ -146,14 +146,14 @@ func (c *Client) streamClientInterceptor(optFuncs ...retryOption) grpc.StreamCli // shouldRefreshToken checks whether there's a need to refresh the token based on the error and callOptions, // and returns a boolean value. func (c *Client) shouldRefreshToken(err error, callOpts *options) bool { - if rpctypes.Error(err) == rpctypes.ErrUserEmpty { + if errors.Is(rpctypes.Error(err), rpctypes.ErrUserEmpty) { // refresh the token when username, password is present but the server returns ErrUserEmpty // which is possible when the client token is cleared somehow return c.authTokenBundle != nil // equal to c.Username != "" && c.Password != "" } return callOpts.retryAuth && - (rpctypes.Error(err) == rpctypes.ErrInvalidAuthToken || rpctypes.Error(err) == rpctypes.ErrAuthOldRevision) + (errors.Is(rpctypes.Error(err), rpctypes.ErrInvalidAuthToken) || errors.Is(rpctypes.Error(err), rpctypes.ErrAuthOldRevision)) } func (c *Client) refreshToken(ctx context.Context) error { @@ -169,8 +169,7 @@ func (c *Client) refreshToken(ctx context.Context) error { // clients just need to retry the operations (e.g. Put, Delete etc). return nil } - // clear auth token before refreshing it. - c.authTokenBundle.UpdateAuthToken("") + return c.getToken(ctx) } @@ -180,9 +179,9 @@ func (c *Client) refreshToken(ctx context.Context) error { type serverStreamingRetryingStream struct { grpc.ClientStream client *Client - bufferedSends []interface{} // single message that the client can sen - receivedGood bool // indicates whether any prior receives were successful - wasClosedSend bool // indicates that CloseSend was closed + bufferedSends []any // single message that the client can sen + receivedGood bool // indicates whether any prior receives were successful + wasClosedSend bool // indicates that CloseSend was closed ctx context.Context callOpts *options streamerCall func(ctx context.Context) (grpc.ClientStream, error) @@ -201,7 +200,7 @@ func (s *serverStreamingRetryingStream) getStream() grpc.ClientStream { return s.ClientStream } -func (s *serverStreamingRetryingStream) SendMsg(m interface{}) error { +func (s *serverStreamingRetryingStream) SendMsg(m any) error { s.mu.Lock() s.bufferedSends = append(s.bufferedSends, m) s.mu.Unlock() @@ -223,7 +222,7 @@ func (s *serverStreamingRetryingStream) Trailer() metadata.MD { return s.getStream().Trailer() } -func (s *serverStreamingRetryingStream) RecvMsg(m interface{}) error { +func (s *serverStreamingRetryingStream) RecvMsg(m any) error { attemptRetry, lastErr := s.receiveMsgAndIndicateRetry(m) if !attemptRetry { return lastErr // success or hard failure @@ -250,12 +249,12 @@ func (s *serverStreamingRetryingStream) RecvMsg(m interface{}) error { return lastErr } -func (s *serverStreamingRetryingStream) receiveMsgAndIndicateRetry(m interface{}) (bool, error) { +func (s *serverStreamingRetryingStream) receiveMsgAndIndicateRetry(m any) (bool, error) { s.mu.RLock() wasGood := s.receivedGood s.mu.RUnlock() err := s.getStream().RecvMsg(m) - if err == nil || err == io.EOF { + if err == nil || errors.Is(err, io.EOF) { s.mu.Lock() s.receivedGood = true s.mu.Unlock() @@ -272,13 +271,12 @@ func (s *serverStreamingRetryingStream) receiveMsgAndIndicateRetry(m interface{} return true, err } if s.client.shouldRefreshToken(err, s.callOpts) { - gterr := s.client.refreshToken(s.ctx) - if gterr != nil { - s.client.lg.Warn("retry failed to fetch new auth token", zap.Error(gterr)) + gtErr := s.client.refreshToken(s.ctx) + if gtErr != nil { + s.client.lg.Warn("retry failed to fetch new auth token", zap.Error(gtErr)) return false, err // return the original error for simplicity } return true, err - } return isSafeRetry(s.client, err, s.callOpts), err } @@ -312,7 +310,7 @@ func waitRetryBackoff(ctx context.Context, attempt uint, callOpts *options) erro select { case <-ctx.Done(): timer.Stop() - return contextErrToGrpcErr(ctx.Err()) + return contextErrToGRPCErr(ctx.Err()) case <-timer.C: } } @@ -331,7 +329,7 @@ func isSafeRetry(c *Client, err error, callOpts *options) bool { // customer provides mix of learners (not yet voters) and voters with an // expectation to pick voter in the next attempt. // TODO: Ideally client should be 'aware' which endpoint represents: leader/voter/learner with high probability. - if errors.Is(err, rpctypes.ErrGPRCNotSupportedForLearner) && len(c.Endpoints()) > 1 { + if errors.Is(err, rpctypes.ErrGRPCNotSupportedForLearner) && len(c.Endpoints()) > 1 { return true } @@ -350,25 +348,23 @@ func isContextError(err error) bool { return status.Code(err) == codes.DeadlineExceeded || status.Code(err) == codes.Canceled } -func contextErrToGrpcErr(err error) error { - switch err { - case context.DeadlineExceeded: - return status.Errorf(codes.DeadlineExceeded, err.Error()) - case context.Canceled: - return status.Errorf(codes.Canceled, err.Error()) +func contextErrToGRPCErr(err error) error { + switch { + case errors.Is(err, context.DeadlineExceeded): + return status.Error(codes.DeadlineExceeded, err.Error()) + case errors.Is(err, context.Canceled): + return status.Error(codes.Canceled, err.Error()) default: - return status.Errorf(codes.Unknown, err.Error()) + return status.Error(codes.Unknown, err.Error()) } } -var ( - defaultOptions = &options{ - retryPolicy: nonRepeatable, - max: 0, // disable - backoffFunc: backoffLinearWithJitter(50*time.Millisecond /*jitter*/, 0.10), - retryAuth: true, - } -) +var defaultOptions = &options{ + retryPolicy: nonRepeatable, + max: 0, // disable + backoffFunc: backoffLinearWithJitter(50*time.Millisecond /*jitter*/, 0.10), + retryAuth: true, +} // backoffFunc denotes a family of functions that control the backoff duration between call retries. // @@ -378,10 +374,10 @@ var ( // with the next iteration. type backoffFunc func(attempt uint) time.Duration -// withRetryPolicy sets the retry policy of this call. -func withRetryPolicy(rp retryPolicy) retryOption { +// withRepeatablePolicy sets the repeatable policy of this call. +func withRepeatablePolicy() retryOption { return retryOption{applyFunc: func(o *options) { - o.retryPolicy = rp + o.retryPolicy = repeatable }} } @@ -392,7 +388,7 @@ func withMax(maxRetries uint) retryOption { }} } -// WithBackoff sets the `BackoffFunc `used to control time between retries. +// WithBackoff sets the `BackoffFunc` used to control time between retries. func withBackoff(bf backoffFunc) retryOption { return retryOption{applyFunc: func(o *options) { o.backoffFunc = bf diff --git a/vendor/go.etcd.io/etcd/client/v3/sort.go b/vendor/go.etcd.io/etcd/client/v3/sort.go index 2bb9d9a13b7..9918ea927fe 100644 --- a/vendor/go.etcd.io/etcd/client/v3/sort.go +++ b/vendor/go.etcd.io/etcd/client/v3/sort.go @@ -14,8 +14,10 @@ package clientv3 -type SortTarget int -type SortOrder int +type ( + SortTarget int + SortOrder int +) const ( SortNone SortOrder = iota diff --git a/vendor/go.etcd.io/etcd/client/v3/txn.go b/vendor/go.etcd.io/etcd/client/v3/txn.go index e31bfe0b94d..0a57332ac78 100644 --- a/vendor/go.etcd.io/etcd/client/v3/txn.go +++ b/vendor/go.etcd.io/etcd/client/v3/txn.go @@ -18,9 +18,9 @@ import ( "context" "sync" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "google.golang.org/grpc" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" ) // Txn is the interface that wraps mini-transactions. diff --git a/vendor/go.etcd.io/etcd/client/v3/watch.go b/vendor/go.etcd.io/etcd/client/v3/watch.go index 725e8a869e3..a46f98b8e28 100644 --- a/vendor/go.etcd.io/etcd/client/v3/watch.go +++ b/vendor/go.etcd.io/etcd/client/v3/watch.go @@ -21,15 +21,15 @@ import ( "sync" "time" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/mvccpb" - v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/mvccpb" + v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) const ( @@ -149,12 +149,12 @@ type watcher struct { mu sync.Mutex // streams holds all the active grpc streams keyed by ctx value. - streams map[string]*watchGrpcStream + streams map[string]*watchGRPCStream lg *zap.Logger } -// watchGrpcStream tracks all watch resources attached to a single grpc stream. -type watchGrpcStream struct { +// watchGRPCStream tracks all watch resources attached to a single grpc stream. +type watchGRPCStream struct { owner *watcher remote pb.WatchClient callOpts []grpc.CallOption @@ -221,8 +221,7 @@ type watchRequest struct { } // progressRequest is issued by the subscriber to request watch progress -type progressRequest struct { -} +type progressRequest struct{} // watcherStream represents a registered watcher type watcherStream struct { @@ -251,7 +250,7 @@ func NewWatcher(c *Client) Watcher { func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { w := &watcher{ remote: wc, - streams: make(map[string]*watchGrpcStream), + streams: make(map[string]*watchGRPCStream), } if c != nil { w.callOpts = c.callOpts @@ -261,8 +260,10 @@ func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { } // never closes -var valCtxCh = make(chan struct{}) -var zeroTime = time.Unix(0, 0) +var ( + valCtxCh = make(chan struct{}) + zeroTime = time.Unix(0, 0) +) // ctx with only the values; never Done type valCtx struct{ context.Context } @@ -271,9 +272,9 @@ func (vc *valCtx) Deadline() (time.Time, bool) { return zeroTime, false } func (vc *valCtx) Done() <-chan struct{} { return valCtxCh } func (vc *valCtx) Err() error { return nil } -func (w *watcher) newWatcherGrpcStream(inctx context.Context) *watchGrpcStream { +func (w *watcher) newWatcherGRPCStream(inctx context.Context) *watchGRPCStream { ctx, cancel := context.WithCancel(&valCtx{inctx}) - wgs := &watchGrpcStream{ + wgs := &watchGRPCStream{ owner: w, remote: w.remote, callOpts: w.callOpts, @@ -334,7 +335,7 @@ func (w *watcher) Watch(ctx context.Context, key string, opts ...OpOption) Watch } wgs := w.streams[ctxKey] if wgs == nil { - wgs = w.newWatcherGrpcStream(ctx) + wgs = w.newWatcherGRPCStream(ctx) w.streams[ctxKey] = wgs } donec := wgs.donec @@ -395,7 +396,7 @@ func (w *watcher) Close() (err error) { } } // Consider context.Canceled as a successful close - if err == context.Canceled { + if errors.Is(err, context.Canceled) { err = nil } return err @@ -408,11 +409,11 @@ func (w *watcher) RequestProgress(ctx context.Context) (err error) { w.mu.Lock() if w.streams == nil { w.mu.Unlock() - return fmt.Errorf("no stream found for context") + return errors.New("no stream found for context") } wgs := w.streams[ctxKey] if wgs == nil { - wgs = w.newWatcherGrpcStream(ctx) + wgs = w.newWatcherGRPCStream(ctx) w.streams[ctxKey] = wgs } donec := wgs.donec @@ -435,7 +436,7 @@ func (w *watcher) RequestProgress(ctx context.Context) (err error) { } } -func (w *watchGrpcStream) close() (err error) { +func (w *watchGRPCStream) close() (err error) { w.cancel() <-w.donec select { @@ -445,7 +446,7 @@ func (w *watchGrpcStream) close() (err error) { return ContextError(w.ctx, err) } -func (w *watcher) closeStream(wgs *watchGrpcStream) { +func (w *watcher) closeStream(wgs *watchGRPCStream) { w.mu.Lock() close(wgs.donec) wgs.cancel() @@ -455,7 +456,7 @@ func (w *watcher) closeStream(wgs *watchGrpcStream) { w.mu.Unlock() } -func (w *watchGrpcStream) addSubstream(resp *pb.WatchResponse, ws *watcherStream) { +func (w *watchGRPCStream) addSubstream(resp *pb.WatchResponse, ws *watcherStream) { // check watch ID for backward compatibility (<= v3.3) if resp.WatchId == InvalidWatchID || (resp.Canceled && resp.CancelReason != "") { w.closeErr = v3rpc.Error(errors.New(resp.CancelReason)) @@ -467,7 +468,7 @@ func (w *watchGrpcStream) addSubstream(resp *pb.WatchResponse, ws *watcherStream w.substreams[ws.id] = ws } -func (w *watchGrpcStream) sendCloseSubstream(ws *watcherStream, resp *WatchResponse) { +func (w *watchGRPCStream) sendCloseSubstream(ws *watcherStream, resp *WatchResponse) { select { case ws.outc <- *resp: case <-ws.initReq.ctx.Done(): @@ -476,7 +477,7 @@ func (w *watchGrpcStream) sendCloseSubstream(ws *watcherStream, resp *WatchRespo close(ws.outc) } -func (w *watchGrpcStream) closeSubstream(ws *watcherStream) { +func (w *watchGRPCStream) closeSubstream(ws *watcherStream) { // send channel response in case stream was never established select { case ws.initReq.retc <- ws.outc: @@ -501,7 +502,7 @@ func (w *watchGrpcStream) closeSubstream(ws *watcherStream) { } // run is the root of the goroutines for managing a watcher client -func (w *watchGrpcStream) run() { +func (w *watchGRPCStream) run() { var wc pb.Watch_WatchClient var closeErr error @@ -653,7 +654,7 @@ func (w *watchGrpcStream) run() { // watch client failed on Recv; spawn another if possible case err := <-w.errc: - if isHaltErr(w.ctx, err) || ContextError(w.ctx, err) == v3rpc.ErrNoLeader { + if isHaltErr(w.ctx, err) || errors.Is(ContextError(w.ctx, err), v3rpc.ErrNoLeader) { closeErr = err return } @@ -699,7 +700,7 @@ func (w *watchGrpcStream) run() { // nextResume chooses the next resuming to register with the grpc stream. Abandoned // streams are marked as nil in the queue since the head must wait for its inflight registration. -func (w *watchGrpcStream) nextResume() *watcherStream { +func (w *watchGRPCStream) nextResume() *watcherStream { for len(w.resuming) != 0 { if w.resuming[0] != nil { return w.resuming[0] @@ -710,7 +711,7 @@ func (w *watchGrpcStream) nextResume() *watcherStream { } // dispatchEvent sends a WatchResponse to the appropriate watcher stream -func (w *watchGrpcStream) dispatchEvent(pbresp *pb.WatchResponse) bool { +func (w *watchGRPCStream) dispatchEvent(pbresp *pb.WatchResponse) bool { events := make([]*Event, len(pbresp.Events)) for i, ev := range pbresp.Events { events[i] = (*Event)(ev) @@ -732,11 +733,10 @@ func (w *watchGrpcStream) dispatchEvent(pbresp *pb.WatchResponse) bool { } return w.unicastResponse(wr, pbresp.WatchId) - } // broadcastResponse send a watch response to all watch substreams. -func (w *watchGrpcStream) broadcastResponse(wr *WatchResponse) bool { +func (w *watchGRPCStream) broadcastResponse(wr *WatchResponse) bool { for _, ws := range w.substreams { select { case ws.recvc <- wr: @@ -747,8 +747,8 @@ func (w *watchGrpcStream) broadcastResponse(wr *WatchResponse) bool { } // unicastResponse sends a watch response to a specific watch substream. -func (w *watchGrpcStream) unicastResponse(wr *WatchResponse, watchId int64) bool { - ws, ok := w.substreams[watchId] +func (w *watchGRPCStream) unicastResponse(wr *WatchResponse, watchID int64) bool { + ws, ok := w.substreams[watchID] if !ok { return false } @@ -761,7 +761,7 @@ func (w *watchGrpcStream) unicastResponse(wr *WatchResponse, watchId int64) bool } // serveWatchClient forwards messages from the grpc stream to run() -func (w *watchGrpcStream) serveWatchClient(wc pb.Watch_WatchClient) { +func (w *watchGRPCStream) serveWatchClient(wc pb.Watch_WatchClient) { for { resp, err := wc.Recv() if err != nil { @@ -780,7 +780,7 @@ func (w *watchGrpcStream) serveWatchClient(wc pb.Watch_WatchClient) { } // serveSubstream forwards watch responses from run() to the subscriber -func (w *watchGrpcStream) serveSubstream(ws *watcherStream, resumec chan struct{}) { +func (w *watchGRPCStream) serveSubstream(ws *watcherStream, resumec chan struct{}) { if ws.closing { panic("created substream goroutine but substream is closing") } @@ -854,6 +854,7 @@ func (w *watchGrpcStream) serveSubstream(ws *watcherStream, resumec chan struct{ if len(wr.Events) > 0 { nextRev = wr.Events[len(wr.Events)-1].Kv.ModRevision + 1 } + ws.initReq.rev = nextRev // created event is already sent above, @@ -876,7 +877,7 @@ func (w *watchGrpcStream) serveSubstream(ws *watcherStream, resumec chan struct{ // lazily send cancel message if events on missing id } -func (w *watchGrpcStream) newWatchClient() (pb.Watch_WatchClient, error) { +func (w *watchGRPCStream) newWatchClient() (pb.Watch_WatchClient, error) { // mark all substreams as resuming close(w.resumec) w.resumec = make(chan struct{}) @@ -922,7 +923,7 @@ func (w *watchGrpcStream) newWatchClient() (pb.Watch_WatchClient, error) { return wc, nil } -func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan struct{} { +func (w *watchGRPCStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan struct{} { var wg sync.WaitGroup wg.Add(len(w.resuming)) donec := make(chan struct{}) @@ -959,7 +960,7 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str } // joinSubstreams waits for all substream goroutines to complete. -func (w *watchGrpcStream) joinSubstreams() { +func (w *watchGRPCStream) joinSubstreams() { for _, ws := range w.substreams { <-ws.donec } @@ -972,7 +973,7 @@ func (w *watchGrpcStream) joinSubstreams() { var maxBackoff = 100 * time.Millisecond -func (w *watchGrpcStream) backoffIfUnavailable(backoff time.Duration, err error) time.Duration { +func (w *watchGRPCStream) backoffIfUnavailable(backoff time.Duration, err error) time.Duration { if isUnavailableErr(w.ctx, err) { // retry, but backoff if backoff < maxBackoff { @@ -990,7 +991,7 @@ func (w *watchGrpcStream) backoffIfUnavailable(backoff time.Duration, err error) // openWatchClient retries opening a watch client until success or halt. // manually retry in case "ws==nil && err==nil" // TODO: remove FailFast=false -func (w *watchGrpcStream) openWatchClient() (ws pb.Watch_WatchClient, err error) { +func (w *watchGRPCStream) openWatchClient() (ws pb.Watch_WatchClient, err error) { backoff := time.Millisecond for { select { diff --git a/vendor/go.opentelemetry.io/collector/featuregate/registry.go b/vendor/go.opentelemetry.io/collector/featuregate/registry.go index 9309024c38b..00e6ec21518 100644 --- a/vendor/go.opentelemetry.io/collector/featuregate/registry.go +++ b/vendor/go.opentelemetry.io/collector/featuregate/registry.go @@ -20,7 +20,7 @@ var ( // idRegexp is used to validate the ID of a Gate. // IDs' characters must be alphanumeric or dots. - idRegexp = regexp.MustCompile(`^[0-9a-zA-Z\.]*$`) + idRegexp = regexp.MustCompile(`^[0-9a-zA-Z.]*$`) ) // ErrAlreadyRegistered is returned when adding a Gate that is already registered. diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/bytesid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/bytesid.go new file mode 100644 index 00000000000..dbf368d3d11 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/bytesid.go @@ -0,0 +1,30 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal" + +import ( + "encoding/hex" + + "go.opentelemetry.io/collector/pdata/internal/json" +) + +// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. +// Called by Protobuf JSON deserialization. +func unmarshalJSON(dst []byte, iter *json.Iterator) { + src := iter.ReadStringAsSlice() + if len(src) == 0 { + return + } + + if len(dst) != hex.DecodedLen(len(src)) { + iter.ReportError("ID.UnmarshalJSONIter", "length mismatch") + return + } + + _, err := hex.Decode(dst, src) + if err != nil { + iter.ReportError("ID.UnmarshalJSONIter", err.Error()) + return + } +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go deleted file mode 100644 index ca86912af90..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "encoding/hex" - "errors" - "fmt" -) - -// marshalJSON converts trace id into a hex string enclosed in quotes. -// Called by Protobuf JSON deserialization. -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. -// Called by Protobuf JSON deserialization. -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/collector/pdata/internal/data/profileid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/profileid.go deleted file mode 100644 index 5b4e6f53ceb..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/profileid.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "errors" - - "github.com/gogo/protobuf/proto" -) - -const profileIDSize = 16 - -var ( - errMarshalProfileID = errors.New("marshal: invalid buffer length for ProfileID") - errUnmarshalProfileID = errors.New("unmarshal: invalid ProfileID length") -) - -// ProfileID is a custom data type that is used for all profile_id fields in OTLP -// Protobuf messages. -type ProfileID [profileIDSize]byte - -var _ proto.Sizer = (*SpanID)(nil) - -// Size returns the size of the data to serialize. -func (tid ProfileID) Size() int { - if tid.IsEmpty() { - return 0 - } - return profileIDSize -} - -// IsEmpty returns true if id contains at leas one non-zero byte. -func (tid ProfileID) IsEmpty() bool { - return tid == [profileIDSize]byte{} -} - -// MarshalTo converts profile ID into a binary representation. Called by Protobuf serialization. -func (tid ProfileID) MarshalTo(data []byte) (n int, err error) { - if tid.IsEmpty() { - return 0, nil - } - - if len(data) < profileIDSize { - return 0, errMarshalProfileID - } - - return copy(data, tid[:]), nil -} - -// Unmarshal inflates this profile ID from binary representation. Called by Protobuf serialization. -func (tid *ProfileID) Unmarshal(data []byte) error { - if len(data) == 0 { - *tid = [profileIDSize]byte{} - return nil - } - - if len(data) != profileIDSize { - return errUnmarshalProfileID - } - - copy(tid[:], data) - return nil -} - -// MarshalJSON converts profile id into a hex string enclosed in quotes. -func (tid ProfileID) MarshalJSON() ([]byte, error) { - if tid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(tid[:]) -} - -// UnmarshalJSON inflates profile id from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func (tid *ProfileID) UnmarshalJSON(data []byte) error { - *tid = [profileIDSize]byte{} - return unmarshalJSON(tid[:], data) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go deleted file mode 100644 index 53b69b07267..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go +++ /dev/null @@ -1,840 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/logs/v1/logs_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportLogsServiceRequest struct { - // An array of ResourceLogs. - // 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. - ResourceLogs []*v1.ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"` -} - -func (m *ExportLogsServiceRequest) Reset() { *m = ExportLogsServiceRequest{} } -func (m *ExportLogsServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportLogsServiceRequest) ProtoMessage() {} -func (*ExportLogsServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{0} -} -func (m *ExportLogsServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsServiceRequest.Merge(m, src) -} -func (m *ExportLogsServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsServiceRequest proto.InternalMessageInfo - -func (m *ExportLogsServiceRequest) GetResourceLogs() []*v1.ResourceLogs { - if m != nil { - return m.ResourceLogs - } - return nil -} - -type ExportLogsServiceResponse struct { - // 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 ExportLogsPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -func (m *ExportLogsServiceResponse) Reset() { *m = ExportLogsServiceResponse{} } -func (m *ExportLogsServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportLogsServiceResponse) ProtoMessage() {} -func (*ExportLogsServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{1} -} -func (m *ExportLogsServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsServiceResponse.Merge(m, src) -} -func (m *ExportLogsServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsServiceResponse proto.InternalMessageInfo - -func (m *ExportLogsServiceResponse) GetPartialSuccess() ExportLogsPartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportLogsPartialSuccess{} -} - -type ExportLogsPartialSuccess struct { - // The number of rejected log records. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedLogRecords int64 `protobuf:"varint,1,opt,name=rejected_log_records,json=rejectedLogRecords,proto3" json:"rejected_log_records,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 (m *ExportLogsPartialSuccess) Reset() { *m = ExportLogsPartialSuccess{} } -func (m *ExportLogsPartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportLogsPartialSuccess) ProtoMessage() {} -func (*ExportLogsPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{2} -} -func (m *ExportLogsPartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsPartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsPartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsPartialSuccess.Merge(m, src) -} -func (m *ExportLogsPartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsPartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsPartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsPartialSuccess proto.InternalMessageInfo - -func (m *ExportLogsPartialSuccess) GetRejectedLogRecords() int64 { - if m != nil { - return m.RejectedLogRecords - } - return 0 -} - -func (m *ExportLogsPartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportLogsServiceRequest)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest") - proto.RegisterType((*ExportLogsServiceResponse)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse") - proto.RegisterType((*ExportLogsPartialSuccess)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/logs/v1/logs_service.proto", fileDescriptor_8e3bf87aaa43acd4) -} - -var fileDescriptor_8e3bf87aaa43acd4 = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xc1, 0x6e, 0x13, 0x31, - 0x10, 0x86, 0xd7, 0x2d, 0xaa, 0x84, 0xd3, 0x02, 0xb2, 0x7a, 0x08, 0x39, 0x2c, 0x55, 0x50, 0x51, - 0xb8, 0x78, 0x49, 0xb8, 0x70, 0x03, 0x05, 0x71, 0x0b, 0x10, 0x6d, 0x11, 0x07, 0x2e, 0xab, 0xc5, - 0x19, 0x59, 0x5b, 0x6d, 0x77, 0xdc, 0xb1, 0x13, 0xc1, 0x33, 0x20, 0x24, 0x5e, 0x80, 0x17, 0xe0, - 0x49, 0x7a, 0xe0, 0xd0, 0x23, 0x27, 0x84, 0x92, 0x17, 0x41, 0x5e, 0x97, 0xb0, 0x0b, 0x39, 0x04, - 0x4e, 0xbb, 0x1e, 0xcf, 0xff, 0xfd, 0xff, 0xd8, 0x32, 0x7f, 0x84, 0x06, 0x2a, 0x07, 0x25, 0x9c, - 0x81, 0xa3, 0xf7, 0x89, 0x21, 0x74, 0x98, 0x28, 0x2c, 0x4b, 0x50, 0x0e, 0x29, 0x29, 0x51, 0xdb, - 0x64, 0x31, 0xac, 0xbf, 0x99, 0x05, 0x5a, 0x14, 0x0a, 0x64, 0xdd, 0x24, 0x8e, 0x5b, 0xca, 0x50, - 0x94, 0x6b, 0xa5, 0xf4, 0x0a, 0xb9, 0x18, 0xf6, 0x0e, 0x35, 0x6a, 0x0c, 0x58, 0xff, 0x17, 0xfa, - 0x7a, 0xf7, 0x36, 0xd9, 0x36, 0xcd, 0x42, 0x5f, 0xff, 0x94, 0x77, 0x9f, 0xbd, 0x33, 0x48, 0x6e, - 0x82, 0xda, 0x9e, 0x04, 0xff, 0x14, 0xce, 0xe7, 0x60, 0x9d, 0x78, 0xc1, 0x0f, 0x08, 0x2c, 0xce, - 0x49, 0x41, 0xe6, 0x25, 0x5d, 0x76, 0xb4, 0x3b, 0xe8, 0x8c, 0xee, 0xcb, 0x4d, 0xc1, 0xae, 0xe2, - 0xc8, 0xf4, 0x4a, 0xe1, 0x79, 0xe9, 0x3e, 0x35, 0x56, 0xfd, 0x0f, 0x8c, 0xdf, 0xde, 0x60, 0x66, - 0x0d, 0x56, 0x16, 0x44, 0xc5, 0x6f, 0x9a, 0x9c, 0x5c, 0x91, 0x97, 0x99, 0x9d, 0x2b, 0x05, 0xd6, - 0xfb, 0xb1, 0x41, 0x67, 0xf4, 0x58, 0x6e, 0x75, 0x10, 0xf2, 0x37, 0x7a, 0x1a, 0x38, 0x27, 0x01, - 0x33, 0xbe, 0x76, 0xf1, 0xfd, 0x4e, 0x94, 0xde, 0x30, 0xad, 0x6a, 0xff, 0xbc, 0x39, 0x79, 0x5b, - 0x21, 0x1e, 0xf0, 0x43, 0x82, 0x53, 0x50, 0x0e, 0x66, 0x7e, 0xf2, 0x8c, 0x40, 0x21, 0xcd, 0x42, - 0xa0, 0xdd, 0x54, 0xfc, 0xda, 0x9b, 0xa0, 0x4e, 0xc3, 0x8e, 0xb8, 0xcb, 0x0f, 0x80, 0x08, 0x29, - 0x3b, 0x03, 0x6b, 0x73, 0x0d, 0xdd, 0x9d, 0x23, 0x36, 0xb8, 0x9e, 0xee, 0xd7, 0xc5, 0xe7, 0xa1, - 0x36, 0xfa, 0xcc, 0x78, 0xa7, 0x31, 0xba, 0xf8, 0xc8, 0xf8, 0x5e, 0xc8, 0x20, 0xfe, 0x7d, 0xc8, - 0xf6, 0x65, 0xf5, 0x9e, 0xfc, 0x3f, 0x20, 0x5c, 0x40, 0x3f, 0x1a, 0x7f, 0x65, 0x17, 0xcb, 0x98, - 0x5d, 0x2e, 0x63, 0xf6, 0x63, 0x19, 0xb3, 0x4f, 0xab, 0x38, 0xba, 0x5c, 0xc5, 0xd1, 0xb7, 0x55, - 0x1c, 0xf1, 0x41, 0x81, 0xdb, 0x19, 0x8c, 0x6f, 0x35, 0xd8, 0x53, 0xdf, 0x33, 0x65, 0x6f, 0x26, - 0xfa, 0x4f, 0x75, 0xd1, 0x7c, 0x04, 0x66, 0x96, 0xbb, 0x3c, 0x29, 0x2a, 0x07, 0x54, 0xe5, 0x65, - 0x52, 0xaf, 0x6a, 0xbc, 0x86, 0xea, 0xef, 0xb7, 0xf2, 0x65, 0xe7, 0xf8, 0xa5, 0x81, 0xea, 0xd5, - 0x9a, 0x55, 0xbb, 0xc8, 0xa7, 0xeb, 0x24, 0x3e, 0x80, 0x7c, 0x3d, 0x7c, 0xbb, 0x57, 0x33, 0x1e, - 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xaf, 0x6c, 0x7d, 0x83, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// LogsServiceClient is the client API for LogsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LogsServiceClient interface { - Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) -} - -type logsServiceClient struct { - cc *grpc.ClientConn -} - -func NewLogsServiceClient(cc *grpc.ClientConn) LogsServiceClient { - return &logsServiceClient{cc} -} - -func (c *logsServiceClient) Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) { - out := new(ExportLogsServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.logs.v1.LogsService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LogsServiceServer is the server API for LogsService service. -type LogsServiceServer interface { - Export(context.Context, *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) -} - -// UnimplementedLogsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLogsServiceServer struct { -} - -func (*UnimplementedLogsServiceServer) Export(ctx context.Context, req *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterLogsServiceServer(s *grpc.Server, srv LogsServiceServer) { - s.RegisterService(&_LogsService_serviceDesc, srv) -} - -func _LogsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportLogsServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LogsServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.logs.v1.LogsService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LogsServiceServer).Export(ctx, req.(*ExportLogsServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _LogsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.logs.v1.LogsService", - HandlerType: (*LogsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _LogsService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/logs/v1/logs_service.proto", -} - -func (m *ExportLogsServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for iNdEx := len(m.ResourceLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportLogsServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportLogsPartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsPartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintLogsService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedLogRecords != 0 { - i = encodeVarintLogsService(dAtA, i, uint64(m.RejectedLogRecords)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintLogsService(dAtA []byte, offset int, v uint64) int { - offset -= sovLogsService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportLogsServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for _, e := range m.ResourceLogs { - l = e.Size() - n += 1 + l + sovLogsService(uint64(l)) - } - } - return n -} - -func (m *ExportLogsServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovLogsService(uint64(l)) - return n -} - -func (m *ExportLogsPartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedLogRecords != 0 { - n += 1 + sovLogsService(uint64(m.RejectedLogRecords)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovLogsService(uint64(l)) - } - return n -} - -func sovLogsService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLogsService(x uint64) (n int) { - return sovLogsService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportLogsServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceLogs = append(m.ResourceLogs, &v1.ResourceLogs{}) - if err := m.ResourceLogs[len(m.ResourceLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportLogsServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportLogsPartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsPartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedLogRecords", wireType) - } - m.RejectedLogRecords = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedLogRecords |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLogsService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLogsService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLogsService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLogsService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLogsService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLogsService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLogsService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go deleted file mode 100644 index bfdc29395a3..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go +++ /dev/null @@ -1,840 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportMetricsServiceRequest struct { - // An array of ResourceMetrics. - // 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. - ResourceMetrics []*v1.ResourceMetrics `protobuf:"bytes,1,rep,name=resource_metrics,json=resourceMetrics,proto3" json:"resource_metrics,omitempty"` -} - -func (m *ExportMetricsServiceRequest) Reset() { *m = ExportMetricsServiceRequest{} } -func (m *ExportMetricsServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportMetricsServiceRequest) ProtoMessage() {} -func (*ExportMetricsServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_75fb6015e6e64798, []int{0} -} -func (m *ExportMetricsServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportMetricsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsServiceRequest.Merge(m, src) -} -func (m *ExportMetricsServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportMetricsServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportMetricsServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportMetricsServiceRequest proto.InternalMessageInfo - -func (m *ExportMetricsServiceRequest) GetResourceMetrics() []*v1.ResourceMetrics { - if m != nil { - return m.ResourceMetrics - } - return nil -} - -type ExportMetricsServiceResponse struct { - // 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 ExportMetricsPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -func (m *ExportMetricsServiceResponse) Reset() { *m = ExportMetricsServiceResponse{} } -func (m *ExportMetricsServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportMetricsServiceResponse) ProtoMessage() {} -func (*ExportMetricsServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75fb6015e6e64798, []int{1} -} -func (m *ExportMetricsServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportMetricsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsServiceResponse.Merge(m, src) -} -func (m *ExportMetricsServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportMetricsServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportMetricsServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportMetricsServiceResponse proto.InternalMessageInfo - -func (m *ExportMetricsServiceResponse) GetPartialSuccess() ExportMetricsPartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportMetricsPartialSuccess{} -} - -type ExportMetricsPartialSuccess struct { - // The number of rejected data points. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedDataPoints int64 `protobuf:"varint,1,opt,name=rejected_data_points,json=rejectedDataPoints,proto3" json:"rejected_data_points,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 (m *ExportMetricsPartialSuccess) Reset() { *m = ExportMetricsPartialSuccess{} } -func (m *ExportMetricsPartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportMetricsPartialSuccess) ProtoMessage() {} -func (*ExportMetricsPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_75fb6015e6e64798, []int{2} -} -func (m *ExportMetricsPartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportMetricsPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsPartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsPartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsPartialSuccess.Merge(m, src) -} -func (m *ExportMetricsPartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportMetricsPartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportMetricsPartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportMetricsPartialSuccess proto.InternalMessageInfo - -func (m *ExportMetricsPartialSuccess) GetRejectedDataPoints() int64 { - if m != nil { - return m.RejectedDataPoints - } - return 0 -} - -func (m *ExportMetricsPartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportMetricsServiceRequest)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest") - proto.RegisterType((*ExportMetricsServiceResponse)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse") - proto.RegisterType((*ExportMetricsPartialSuccess)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/metrics/v1/metrics_service.proto", fileDescriptor_75fb6015e6e64798) -} - -var fileDescriptor_75fb6015e6e64798 = []byte{ - // 427 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xbf, 0x8e, 0xd3, 0x30, - 0x18, 0x8f, 0xef, 0xd0, 0x49, 0xf8, 0xe0, 0x0e, 0x99, 0x1b, 0x4e, 0x05, 0x85, 0x53, 0x58, 0x22, - 0x81, 0x1c, 0x5a, 0x76, 0x86, 0xc2, 0xb1, 0x9d, 0x1a, 0xa5, 0x88, 0xa1, 0x4b, 0x64, 0xdc, 0x4f, - 0x51, 0x50, 0x1a, 0x1b, 0xdb, 0xad, 0xe8, 0x5b, 0x30, 0xb0, 0xf0, 0x0a, 0x88, 0x07, 0xe9, 0xd8, - 0xb1, 0x13, 0x42, 0xed, 0x8b, 0xa0, 0xc4, 0x69, 0xc1, 0x25, 0x43, 0xc5, 0x6d, 0xce, 0xcf, 0xdf, - 0xef, 0x4f, 0x7e, 0xd6, 0x87, 0x5f, 0x09, 0x09, 0xa5, 0x81, 0x02, 0x26, 0x60, 0xd4, 0x3c, 0x92, - 0x4a, 0x18, 0x11, 0x71, 0x51, 0x14, 0xc0, 0x8d, 0x50, 0x51, 0x85, 0xe6, 0x5c, 0x47, 0xb3, 0xee, - 0xf6, 0x98, 0x6a, 0x50, 0xb3, 0x9c, 0x03, 0xad, 0x47, 0x49, 0xe8, 0xf0, 0x2d, 0x48, 0x77, 0x7c, - 0xda, 0x90, 0xe8, 0xac, 0xdb, 0xb9, 0xc8, 0x44, 0x26, 0xac, 0x7e, 0x75, 0xb2, 0xa3, 0x9d, 0xe7, - 0x6d, 0xfe, 0xff, 0xba, 0xda, 0xe9, 0x60, 0x8e, 0x1f, 0x5d, 0x7f, 0x96, 0x42, 0x99, 0x1b, 0x0b, - 0x0f, 0x6d, 0x96, 0x04, 0x3e, 0x4d, 0x41, 0x1b, 0x32, 0xc2, 0x0f, 0x14, 0x68, 0x31, 0x55, 0x1c, - 0xd2, 0x86, 0x78, 0x89, 0xae, 0x8e, 0xc3, 0xd3, 0x5e, 0x44, 0xdb, 0x72, 0xfe, 0x49, 0x47, 0x93, - 0x86, 0xd7, 0x08, 0x27, 0xe7, 0xca, 0x05, 0x82, 0xaf, 0x08, 0x3f, 0x6e, 0xf7, 0xd6, 0x52, 0x94, - 0x1a, 0x88, 0xc1, 0xe7, 0x92, 0x29, 0x93, 0xb3, 0x22, 0xd5, 0x53, 0xce, 0x41, 0x57, 0xde, 0x28, - 0x3c, 0xed, 0x5d, 0xd3, 0x43, 0x3b, 0xa2, 0x8e, 0x41, 0x6c, 0xd5, 0x86, 0x56, 0xac, 0x7f, 0x67, - 0xf1, 0xf3, 0x89, 0x97, 0x9c, 0x49, 0x07, 0x0d, 0xcc, 0x5e, 0x23, 0x2e, 0x89, 0xbc, 0xc0, 0x17, - 0x0a, 0x3e, 0x02, 0x37, 0x30, 0x4e, 0xc7, 0xcc, 0xb0, 0x54, 0x8a, 0xbc, 0x34, 0x36, 0xd9, 0x71, - 0x42, 0xb6, 0x77, 0x6f, 0x98, 0x61, 0x71, 0x7d, 0x43, 0x9e, 0xe2, 0xfb, 0xa0, 0x94, 0x50, 0xe9, - 0x04, 0xb4, 0x66, 0x19, 0x5c, 0x1e, 0x5d, 0xa1, 0xf0, 0x6e, 0x72, 0xaf, 0x06, 0x6f, 0x2c, 0xd6, - 0xfb, 0x81, 0xf0, 0x99, 0x5b, 0x03, 0xf9, 0x86, 0xf0, 0x89, 0x4d, 0x42, 0xfe, 0xf7, 0x87, 0xdd, - 0xd7, 0xec, 0xbc, 0xbd, 0xad, 0x8c, 0x7d, 0x98, 0xc0, 0xeb, 0xaf, 0xd0, 0x62, 0xed, 0xa3, 0xe5, - 0xda, 0x47, 0xbf, 0xd6, 0x3e, 0xfa, 0xb2, 0xf1, 0xbd, 0xe5, 0xc6, 0xf7, 0x56, 0x1b, 0xdf, 0xc3, - 0xcf, 0x72, 0x71, 0xb0, 0x4d, 0xff, 0xa1, 0xeb, 0x10, 0x57, 0x93, 0x31, 0x1a, 0x0d, 0xb2, 0x7d, - 0x8d, 0xfc, 0xef, 0x1d, 0x92, 0x55, 0xf1, 0x51, 0x5e, 0x1a, 0x50, 0x25, 0x2b, 0xa2, 0xfa, 0xab, - 0x36, 0xc9, 0xa0, 0x6c, 0x5d, 0xb5, 0xef, 0x47, 0xe1, 0x40, 0x42, 0xf9, 0x6e, 0x27, 0x57, 0x1b, - 0xd1, 0xd7, 0xbb, 0x48, 0x4d, 0x0c, 0xfa, 0xbe, 0xfb, 0xe1, 0xa4, 0x56, 0x7a, 0xf9, 0x3b, 0x00, - 0x00, 0xff, 0xff, 0x47, 0xf2, 0x5f, 0x42, 0xc8, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MetricsServiceClient is the client API for MetricsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsServiceClient interface { - Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) -} - -type metricsServiceClient struct { - cc *grpc.ClientConn -} - -func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient { - return &metricsServiceClient{cc} -} - -func (c *metricsServiceClient) Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) { - out := new(ExportMetricsServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MetricsServiceServer is the server API for MetricsService service. -type MetricsServiceServer interface { - Export(context.Context, *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) -} - -// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsServiceServer struct { -} - -func (*UnimplementedMetricsServiceServer) Export(ctx context.Context, req *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) { - s.RegisterService(&_MetricsService_serviceDesc, srv) -} - -func _MetricsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportMetricsServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceServer).Export(ctx, req.(*ExportMetricsServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MetricsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.metrics.v1.MetricsService", - HandlerType: (*MetricsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _MetricsService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/metrics/v1/metrics_service.proto", -} - -func (m *ExportMetricsServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for iNdEx := len(m.ResourceMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportMetricsServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportMetricsPartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsPartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintMetricsService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedDataPoints != 0 { - i = encodeVarintMetricsService(dAtA, i, uint64(m.RejectedDataPoints)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintMetricsService(dAtA []byte, offset int, v uint64) int { - offset -= sovMetricsService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportMetricsServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for _, e := range m.ResourceMetrics { - l = e.Size() - n += 1 + l + sovMetricsService(uint64(l)) - } - } - return n -} - -func (m *ExportMetricsServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovMetricsService(uint64(l)) - return n -} - -func (m *ExportMetricsPartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedDataPoints != 0 { - n += 1 + sovMetricsService(uint64(m.RejectedDataPoints)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovMetricsService(uint64(l)) - } - return n -} - -func sovMetricsService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetricsService(x uint64) (n int) { - return sovMetricsService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportMetricsServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceMetrics = append(m.ResourceMetrics, &v1.ResourceMetrics{}) - if err := m.ResourceMetrics[len(m.ResourceMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportMetricsServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportMetricsPartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsPartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedDataPoints", wireType) - } - m.RejectedDataPoints = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedDataPoints |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetricsService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetricsService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetricsService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetricsService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetricsService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetricsService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetricsService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go deleted file mode 100644 index 80eae38f558..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go +++ /dev/null @@ -1,897 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/profiles/v1development/profiles_service.proto - -package v1development - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1development "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportProfilesServiceRequest struct { - // An array of ResourceProfiles. - // 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. - ResourceProfiles []*v1development.ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` - // The reference table containing all data shared by profiles across the message being sent. - Dictionary v1development.ProfilesDictionary `protobuf:"bytes,2,opt,name=dictionary,proto3" json:"dictionary"` -} - -func (m *ExportProfilesServiceRequest) Reset() { *m = ExportProfilesServiceRequest{} } -func (m *ExportProfilesServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportProfilesServiceRequest) ProtoMessage() {} -func (*ExportProfilesServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad3943ce836e7720, []int{0} -} -func (m *ExportProfilesServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportProfilesServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportProfilesServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportProfilesServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportProfilesServiceRequest.Merge(m, src) -} -func (m *ExportProfilesServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportProfilesServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportProfilesServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportProfilesServiceRequest proto.InternalMessageInfo - -func (m *ExportProfilesServiceRequest) GetResourceProfiles() []*v1development.ResourceProfiles { - if m != nil { - return m.ResourceProfiles - } - return nil -} - -func (m *ExportProfilesServiceRequest) GetDictionary() v1development.ProfilesDictionary { - if m != nil { - return m.Dictionary - } - return v1development.ProfilesDictionary{} -} - -type ExportProfilesServiceResponse struct { - // 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 ExportProfilesPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -func (m *ExportProfilesServiceResponse) Reset() { *m = ExportProfilesServiceResponse{} } -func (m *ExportProfilesServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportProfilesServiceResponse) ProtoMessage() {} -func (*ExportProfilesServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ad3943ce836e7720, []int{1} -} -func (m *ExportProfilesServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportProfilesServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportProfilesServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportProfilesServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportProfilesServiceResponse.Merge(m, src) -} -func (m *ExportProfilesServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportProfilesServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportProfilesServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportProfilesServiceResponse proto.InternalMessageInfo - -func (m *ExportProfilesServiceResponse) GetPartialSuccess() ExportProfilesPartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportProfilesPartialSuccess{} -} - -type ExportProfilesPartialSuccess struct { - // The number of rejected profiles. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedProfiles int64 `protobuf:"varint,1,opt,name=rejected_profiles,json=rejectedProfiles,proto3" json:"rejected_profiles,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 (m *ExportProfilesPartialSuccess) Reset() { *m = ExportProfilesPartialSuccess{} } -func (m *ExportProfilesPartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportProfilesPartialSuccess) ProtoMessage() {} -func (*ExportProfilesPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_ad3943ce836e7720, []int{2} -} -func (m *ExportProfilesPartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportProfilesPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportProfilesPartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportProfilesPartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportProfilesPartialSuccess.Merge(m, src) -} -func (m *ExportProfilesPartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportProfilesPartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportProfilesPartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportProfilesPartialSuccess proto.InternalMessageInfo - -func (m *ExportProfilesPartialSuccess) GetRejectedProfiles() int64 { - if m != nil { - return m.RejectedProfiles - } - return 0 -} - -func (m *ExportProfilesPartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportProfilesServiceRequest)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest") - proto.RegisterType((*ExportProfilesServiceResponse)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse") - proto.RegisterType((*ExportProfilesPartialSuccess)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", fileDescriptor_ad3943ce836e7720) -} - -var fileDescriptor_ad3943ce836e7720 = []byte{ - // 467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x8a, 0xd3, 0x40, - 0x18, 0xc7, 0x33, 0xbb, 0xb2, 0xe0, 0xac, 0xba, 0x1a, 0xf6, 0xb0, 0x14, 0x8d, 0x4b, 0xbc, 0x14, - 0x84, 0x09, 0x5b, 0x17, 0x44, 0x10, 0x0f, 0x75, 0x3d, 0x89, 0x18, 0x52, 0xf1, 0xa0, 0x87, 0x10, - 0x27, 0x9f, 0x61, 0x24, 0x9d, 0x19, 0x67, 0xa6, 0xc5, 0x1e, 0x7d, 0x03, 0xdf, 0xc1, 0x9b, 0x57, - 0x1f, 0xc2, 0x1e, 0x7b, 0xf4, 0x24, 0xd2, 0x3e, 0x80, 0x4f, 0x20, 0x48, 0x32, 0x4d, 0x6c, 0x42, - 0xa5, 0x58, 0x7a, 0xcb, 0x7c, 0xc3, 0xff, 0xf7, 0xff, 0x7f, 0xdf, 0x17, 0x06, 0x3f, 0x15, 0x12, - 0xb8, 0x81, 0x1c, 0x86, 0x60, 0xd4, 0x24, 0x90, 0x4a, 0x18, 0x11, 0x50, 0x91, 0xe7, 0x40, 0x8d, - 0x50, 0xc5, 0xf9, 0x2d, 0xcb, 0x41, 0x07, 0xe3, 0xb3, 0x14, 0xc6, 0x90, 0x0b, 0x39, 0x04, 0x6e, - 0xea, 0x72, 0xac, 0x41, 0x8d, 0x19, 0x05, 0x52, 0xea, 0xdc, 0xf3, 0x06, 0xcc, 0x16, 0x49, 0x0d, - 0x23, 0x95, 0x8a, 0x34, 0x60, 0x9d, 0xe3, 0x4c, 0x64, 0xc2, 0x1a, 0x17, 0x5f, 0x56, 0xd6, 0x79, - 0xb0, 0x2e, 0xd8, 0x86, 0x38, 0x56, 0xea, 0xff, 0x42, 0xf8, 0xe6, 0x93, 0x0f, 0x52, 0x28, 0x13, - 0x2e, 0x2f, 0x06, 0x36, 0x66, 0x04, 0xef, 0x47, 0xa0, 0x8d, 0xcb, 0xf0, 0x0d, 0x05, 0x5a, 0x8c, - 0x14, 0x85, 0xb8, 0xd2, 0x9e, 0xa0, 0xd3, 0xfd, 0xee, 0x61, 0xef, 0x21, 0x59, 0xd7, 0xc3, 0xfa, - 0xe4, 0x24, 0x5a, 0x42, 0x2a, 0x9b, 0xe8, 0xba, 0x6a, 0x55, 0xdc, 0x14, 0xe3, 0x94, 0x51, 0xc3, - 0x04, 0x4f, 0xd4, 0xe4, 0x64, 0xef, 0x14, 0x75, 0x0f, 0x7b, 0x8f, 0xfe, 0xc7, 0xa3, 0x22, 0x5d, - 0xd4, 0x94, 0xfe, 0xa5, 0xe9, 0x8f, 0xdb, 0x4e, 0xb4, 0xc2, 0xf5, 0x3f, 0x23, 0x7c, 0xeb, 0x1f, - 0x1d, 0x6b, 0x29, 0xb8, 0x06, 0xf7, 0x23, 0xc2, 0x47, 0x32, 0x51, 0x86, 0x25, 0x79, 0xac, 0x47, - 0x94, 0x82, 0x2e, 0x3a, 0x2e, 0xd2, 0x44, 0x64, 0x9b, 0xad, 0x91, 0xa6, 0x5d, 0x68, 0xd1, 0x03, - 0x4b, 0x5e, 0x26, 0xbc, 0x26, 0x1b, 0x55, 0x5f, 0xb6, 0xd7, 0xd2, 0x54, 0xb9, 0x77, 0x8b, 0xb5, - 0xbc, 0x03, 0x6a, 0x20, 0x5d, 0x5d, 0x0b, 0xea, 0xee, 0x17, 0x83, 0xb5, 0x17, 0xf5, 0x60, 0xef, - 0xe0, 0xab, 0xa0, 0x94, 0x50, 0xf1, 0x10, 0xb4, 0x4e, 0x32, 0x28, 0x67, 0x7b, 0x39, 0xba, 0x52, - 0x16, 0x9f, 0xd9, 0x5a, 0xef, 0x1b, 0xc2, 0x47, 0xad, 0x89, 0xb8, 0x5f, 0x11, 0x3e, 0xb0, 0x31, - 0xdc, 0x9d, 0xb4, 0xde, 0xfc, 0xb7, 0x3a, 0x83, 0x9d, 0x32, 0xed, 0xf6, 0x7c, 0xa7, 0xff, 0x1b, - 0x4d, 0xe7, 0x1e, 0x9a, 0xcd, 0x3d, 0xf4, 0x73, 0xee, 0xa1, 0x4f, 0x0b, 0xcf, 0x99, 0x2d, 0x3c, - 0xe7, 0xfb, 0xc2, 0x73, 0xf0, 0x7d, 0x26, 0xb6, 0xf2, 0xec, 0x1f, 0xb7, 0xec, 0xc2, 0x42, 0x16, - 0xa2, 0x57, 0xaf, 0xb3, 0x36, 0x90, 0x35, 0xde, 0x84, 0x34, 0x31, 0x49, 0xc0, 0xb8, 0x01, 0xc5, - 0x93, 0x3c, 0x28, 0x4f, 0xa5, 0x63, 0x06, 0x7c, 0xe3, 0xd3, 0xf1, 0x65, 0xef, 0xfc, 0xb9, 0x04, - 0xfe, 0xa2, 0x46, 0x97, 0xa6, 0xe4, 0x71, 0x9d, 0xb5, 0xca, 0x44, 0x5e, 0x9e, 0x5d, 0xfc, 0x95, - 0xbd, 0x39, 0x28, 0x1d, 0xee, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x40, 0xb9, 0xb5, 0x6e, 0xb0, - 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ProfilesServiceClient is the client API for ProfilesService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProfilesServiceClient interface { - Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) -} - -type profilesServiceClient struct { - cc *grpc.ClientConn -} - -func NewProfilesServiceClient(cc *grpc.ClientConn) ProfilesServiceClient { - return &profilesServiceClient{cc} -} - -func (c *profilesServiceClient) Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) { - out := new(ExportProfilesServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProfilesServiceServer is the server API for ProfilesService service. -type ProfilesServiceServer interface { - Export(context.Context, *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) -} - -// UnimplementedProfilesServiceServer can be embedded to have forward compatible implementations. -type UnimplementedProfilesServiceServer struct { -} - -func (*UnimplementedProfilesServiceServer) Export(ctx context.Context, req *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterProfilesServiceServer(s *grpc.Server, srv ProfilesServiceServer) { - s.RegisterService(&_ProfilesService_serviceDesc, srv) -} - -func _ProfilesService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportProfilesServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfilesServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfilesServiceServer).Export(ctx, req.(*ExportProfilesServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ProfilesService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.profiles.v1development.ProfilesService", - HandlerType: (*ProfilesServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _ProfilesService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", -} - -func (m *ExportProfilesServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportProfilesServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportProfilesServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Dictionary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfilesService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.ResourceProfiles) > 0 { - for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfilesService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportProfilesServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportProfilesServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportProfilesServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfilesService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportProfilesPartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportProfilesPartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportProfilesPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintProfilesService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedProfiles != 0 { - i = encodeVarintProfilesService(dAtA, i, uint64(m.RejectedProfiles)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintProfilesService(dAtA []byte, offset int, v uint64) int { - offset -= sovProfilesService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportProfilesServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for _, e := range m.ResourceProfiles { - l = e.Size() - n += 1 + l + sovProfilesService(uint64(l)) - } - } - l = m.Dictionary.Size() - n += 1 + l + sovProfilesService(uint64(l)) - return n -} - -func (m *ExportProfilesServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovProfilesService(uint64(l)) - return n -} - -func (m *ExportProfilesPartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedProfiles != 0 { - n += 1 + sovProfilesService(uint64(m.RejectedProfiles)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovProfilesService(uint64(l)) - } - return n -} - -func sovProfilesService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProfilesService(x uint64) (n int) { - return sovProfilesService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportProfilesServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportProfilesServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportProfilesServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceProfiles = append(m.ResourceProfiles, &v1development.ResourceProfiles{}) - if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dictionary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Dictionary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfilesService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfilesService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportProfilesServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportProfilesServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportProfilesServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfilesService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfilesService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportProfilesPartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportProfilesPartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportProfilesPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedProfiles", wireType) - } - m.RejectedProfiles = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedProfiles |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfilesService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfilesService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProfilesService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfilesService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfilesService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfilesService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProfilesService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProfilesService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProfilesService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProfilesService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProfilesService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProfilesService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go deleted file mode 100644 index 5b547b8a7a9..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go +++ /dev/null @@ -1,839 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/trace/v1/trace_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportTraceServiceRequest struct { - // 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 (m *ExportTraceServiceRequest) Reset() { *m = ExportTraceServiceRequest{} } -func (m *ExportTraceServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportTraceServiceRequest) ProtoMessage() {} -func (*ExportTraceServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_192a962890318cf4, []int{0} -} -func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTraceServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTraceServiceRequest.Merge(m, src) -} -func (m *ExportTraceServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportTraceServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportTraceServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportTraceServiceRequest proto.InternalMessageInfo - -func (m *ExportTraceServiceRequest) GetResourceSpans() []*v1.ResourceSpans { - if m != nil { - return m.ResourceSpans - } - return nil -} - -type ExportTraceServiceResponse struct { - // 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"` -} - -func (m *ExportTraceServiceResponse) Reset() { *m = ExportTraceServiceResponse{} } -func (m *ExportTraceServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportTraceServiceResponse) ProtoMessage() {} -func (*ExportTraceServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_192a962890318cf4, []int{1} -} -func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTraceServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTraceServiceResponse.Merge(m, src) -} -func (m *ExportTraceServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportTraceServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportTraceServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportTraceServiceResponse proto.InternalMessageInfo - -func (m *ExportTraceServiceResponse) GetPartialSuccess() ExportTracePartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportTracePartialSuccess{} -} - -type ExportTracePartialSuccess struct { - // 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 (m *ExportTracePartialSuccess) Reset() { *m = ExportTracePartialSuccess{} } -func (m *ExportTracePartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportTracePartialSuccess) ProtoMessage() {} -func (*ExportTracePartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_192a962890318cf4, []int{2} -} -func (m *ExportTracePartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportTracePartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTracePartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTracePartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTracePartialSuccess.Merge(m, src) -} -func (m *ExportTracePartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportTracePartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportTracePartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportTracePartialSuccess proto.InternalMessageInfo - -func (m *ExportTracePartialSuccess) GetRejectedSpans() int64 { - if m != nil { - return m.RejectedSpans - } - return 0 -} - -func (m *ExportTracePartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportTraceServiceRequest)(nil), "opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest") - proto.RegisterType((*ExportTraceServiceResponse)(nil), "opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse") - proto.RegisterType((*ExportTracePartialSuccess)(nil), "opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/trace/v1/trace_service.proto", fileDescriptor_192a962890318cf4) -} - -var fileDescriptor_192a962890318cf4 = []byte{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0xeb, 0xd3, 0x30, - 0x18, 0x6e, 0x36, 0x19, 0x98, 0xfd, 0x11, 0x8b, 0x87, 0xd9, 0x43, 0x1d, 0x15, 0x47, 0x45, 0x48, - 0xd9, 0xbc, 0x79, 0xb3, 0xe2, 0x71, 0x38, 0xba, 0xe1, 0xc1, 0xcb, 0x88, 0xdd, 0x4b, 0xa9, 0x74, - 0x4d, 0x4c, 0xb2, 0xa1, 0x5f, 0x42, 0xf4, 0x2b, 0x78, 0xf4, 0x93, 0xec, 0xb8, 0xa3, 0x27, 0x91, - 0xed, 0x8b, 0x48, 0x12, 0x2d, 0xad, 0xf4, 0x30, 0x7e, 0xbf, 0x5b, 0xf2, 0xf0, 0x3e, 0x7f, 0xde, - 0x27, 0x04, 0xbf, 0x60, 0x1c, 0x4a, 0x05, 0x05, 0xec, 0x40, 0x89, 0xcf, 0x11, 0x17, 0x4c, 0xb1, - 0x28, 0x65, 0x45, 0x01, 0xa9, 0x62, 0x22, 0x52, 0x82, 0xa6, 0x10, 0x1d, 0x66, 0xf6, 0xb0, 0x91, - 0x20, 0x0e, 0x79, 0x0a, 0xc4, 0x8c, 0xb9, 0xd3, 0x06, 0xd7, 0x82, 0xa4, 0xe2, 0x12, 0x43, 0x21, - 0x87, 0x99, 0xf7, 0x20, 0x63, 0x19, 0xb3, 0xca, 0xfa, 0x64, 0x07, 0xbd, 0xb0, 0xcd, 0xb9, 0xe9, - 0x67, 0x27, 0x03, 0x86, 0x1f, 0xbe, 0xfe, 0xc4, 0x99, 0x50, 0x6b, 0x0d, 0xae, 0x6c, 0x86, 0x04, - 0x3e, 0xee, 0x41, 0x2a, 0x37, 0xc1, 0x23, 0x01, 0x92, 0xed, 0x85, 0x8e, 0xc7, 0x69, 0x29, 0xc7, - 0x68, 0xd2, 0x0d, 0xfb, 0xf3, 0x67, 0xa4, 0x2d, 0xdd, 0xbf, 0x4c, 0x24, 0xf9, 0xcb, 0x59, 0x69, - 0x4a, 0x32, 0x14, 0xf5, 0x6b, 0xf0, 0x05, 0x61, 0xaf, 0xcd, 0x51, 0x72, 0x56, 0x4a, 0x70, 0x39, - 0xbe, 0xc7, 0xa9, 0x50, 0x39, 0x2d, 0x36, 0x72, 0x9f, 0xa6, 0x20, 0xb5, 0x27, 0x0a, 0xfb, 0xf3, - 0x97, 0xe4, 0xba, 0x46, 0x48, 0x4d, 0x7c, 0x69, 0x95, 0x56, 0x56, 0x28, 0xbe, 0x73, 0xfc, 0xf5, - 0xc8, 0x49, 0x46, 0xbc, 0x81, 0x06, 0x59, 0xa3, 0x81, 0x26, 0xc5, 0x7d, 0xa2, 0x1b, 0xf8, 0x00, - 0xa9, 0x82, 0x6d, 0xd5, 0x00, 0x0a, 0xbb, 0x7a, 0x29, 0x8b, 0x9a, 0xa5, 0xdc, 0xc7, 0x78, 0x08, - 0x42, 0x30, 0xb1, 0xd9, 0x81, 0x94, 0x34, 0x83, 0x71, 0x67, 0x82, 0xc2, 0xbb, 0xc9, 0xc0, 0x80, - 0x0b, 0x8b, 0xcd, 0xbf, 0x23, 0x3c, 0xa8, 0xef, 0xec, 0x7e, 0x43, 0xb8, 0x67, 0xad, 0xdd, 0x9b, - 0x6c, 0xd7, 0x7c, 0x2c, 0x2f, 0xbe, 0x8d, 0x84, 0x6d, 0x3f, 0x70, 0xe2, 0x13, 0x3a, 0x9e, 0x7d, - 0x74, 0x3a, 0xfb, 0xe8, 0xf7, 0xd9, 0x47, 0x5f, 0x2f, 0xbe, 0x73, 0xba, 0xf8, 0xce, 0xcf, 0x8b, - 0xef, 0xe0, 0xa7, 0x39, 0xbb, 0xd2, 0x22, 0xbe, 0x5f, 0x57, 0x5f, 0xea, 0xa9, 0x25, 0x7a, 0xb7, - 0xc8, 0xfe, 0xe7, 0xe7, 0xf5, 0xef, 0xc0, 0xb7, 0x54, 0xd1, 0x28, 0x2f, 0x15, 0x88, 0x92, 0x16, - 0x91, 0xb9, 0x19, 0x83, 0x0c, 0xca, 0x96, 0x5f, 0xf3, 0xa3, 0x33, 0x7d, 0xc3, 0xa1, 0x5c, 0x57, - 0x62, 0xc6, 0x86, 0xbc, 0xaa, 0xc2, 0x98, 0x08, 0xe4, 0xed, 0xec, 0x7d, 0xcf, 0xa8, 0x3c, 0xff, - 0x13, 0x00, 0x00, 0xff, 0xff, 0x82, 0xce, 0x78, 0xc7, 0x8f, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// TraceServiceClient is the client API for TraceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TraceServiceClient interface { - Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error) -} - -type traceServiceClient struct { - cc *grpc.ClientConn -} - -func NewTraceServiceClient(cc *grpc.ClientConn) 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. -type TraceServiceServer interface { - Export(context.Context, *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) -} - -// UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTraceServiceServer struct { -} - -func (*UnimplementedTraceServiceServer) Export(ctx context.Context, req *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterTraceServiceServer(s *grpc.Server, 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) -} - -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", -} - -func (m *ExportTraceServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTraceServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTraceServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for iNdEx := len(m.ResourceSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportTraceServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTraceServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTraceServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportTracePartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTracePartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTracePartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintTraceService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedSpans != 0 { - i = encodeVarintTraceService(dAtA, i, uint64(m.RejectedSpans)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTraceService(dAtA []byte, offset int, v uint64) int { - offset -= sovTraceService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportTraceServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for _, e := range m.ResourceSpans { - l = e.Size() - n += 1 + l + sovTraceService(uint64(l)) - } - } - return n -} - -func (m *ExportTraceServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovTraceService(uint64(l)) - return n -} - -func (m *ExportTracePartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedSpans != 0 { - n += 1 + sovTraceService(uint64(m.RejectedSpans)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovTraceService(uint64(l)) - } - return n -} - -func sovTraceService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTraceService(x uint64) (n int) { - return sovTraceService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportTraceServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTraceServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTraceServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceSpans = append(m.ResourceSpans, &v1.ResourceSpans{}) - if err := m.ResourceSpans[len(m.ResourceSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportTraceServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTraceServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTraceServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportTracePartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTracePartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTracePartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedSpans", wireType) - } - m.RejectedSpans = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedSpans |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTraceService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTraceService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTraceService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTraceService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTraceService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTraceService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTraceService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go deleted file mode 100644 index 179aa9d5d95..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go +++ /dev/null @@ -1,2080 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/common/v1/common.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// 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 { - // 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 valid to be assigned to Value: - // *AnyValue_StringValue - // *AnyValue_BoolValue - // *AnyValue_IntValue - // *AnyValue_DoubleValue - // *AnyValue_ArrayValue - // *AnyValue_KvlistValue - // *AnyValue_BytesValue - Value isAnyValue_Value `protobuf_oneof:"value"` -} - -func (m *AnyValue) Reset() { *m = AnyValue{} } -func (m *AnyValue) String() string { return proto.CompactTextString(m) } -func (*AnyValue) ProtoMessage() {} -func (*AnyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{0} -} -func (m *AnyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AnyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AnyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnyValue.Merge(m, src) -} -func (m *AnyValue) XXX_Size() int { - return m.Size() -} -func (m *AnyValue) XXX_DiscardUnknown() { - xxx_messageInfo_AnyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_AnyValue proto.InternalMessageInfo - -type isAnyValue_Value interface { - isAnyValue_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type AnyValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` -} -type AnyValue_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` -} -type AnyValue_IntValue struct { - IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof" json:"int_value,omitempty"` -} -type AnyValue_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof" json:"double_value,omitempty"` -} -type AnyValue_ArrayValue struct { - ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof" json:"array_value,omitempty"` -} -type AnyValue_KvlistValue struct { - KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof" json:"kvlist_value,omitempty"` -} -type AnyValue_BytesValue struct { - BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof" json:"bytes_value,omitempty"` -} - -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() {} - -func (m *AnyValue) GetValue() isAnyValue_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *AnyValue) GetStringValue() string { - if x, ok := m.GetValue().(*AnyValue_StringValue); ok { - return x.StringValue - } - return "" -} - -func (m *AnyValue) GetBoolValue() bool { - if x, ok := m.GetValue().(*AnyValue_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (m *AnyValue) GetIntValue() int64 { - if x, ok := m.GetValue().(*AnyValue_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (m *AnyValue) GetDoubleValue() float64 { - if x, ok := m.GetValue().(*AnyValue_DoubleValue); ok { - return x.DoubleValue - } - return 0 -} - -func (m *AnyValue) GetArrayValue() *ArrayValue { - if x, ok := m.GetValue().(*AnyValue_ArrayValue); ok { - return x.ArrayValue - } - return nil -} - -func (m *AnyValue) GetKvlistValue() *KeyValueList { - if x, ok := m.GetValue().(*AnyValue_KvlistValue); ok { - return x.KvlistValue - } - return nil -} - -func (m *AnyValue) GetBytesValue() []byte { - if x, ok := m.GetValue().(*AnyValue_BytesValue); ok { - return x.BytesValue - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AnyValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AnyValue_StringValue)(nil), - (*AnyValue_BoolValue)(nil), - (*AnyValue_IntValue)(nil), - (*AnyValue_DoubleValue)(nil), - (*AnyValue_ArrayValue)(nil), - (*AnyValue_KvlistValue)(nil), - (*AnyValue_BytesValue)(nil), - } -} - -// 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 { - // Array of values. The array may be empty (contain 0 elements). - Values []AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"` -} - -func (m *ArrayValue) Reset() { *m = ArrayValue{} } -func (m *ArrayValue) String() string { return proto.CompactTextString(m) } -func (*ArrayValue) ProtoMessage() {} -func (*ArrayValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{1} -} -func (m *ArrayValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArrayValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArrayValue.Merge(m, src) -} -func (m *ArrayValue) XXX_Size() int { - return m.Size() -} -func (m *ArrayValue) XXX_DiscardUnknown() { - xxx_messageInfo_ArrayValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ArrayValue proto.InternalMessageInfo - -func (m *ArrayValue) GetValues() []AnyValue { - if m != nil { - return m.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 { - // 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"` -} - -func (m *KeyValueList) Reset() { *m = KeyValueList{} } -func (m *KeyValueList) String() string { return proto.CompactTextString(m) } -func (*KeyValueList) ProtoMessage() {} -func (*KeyValueList) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{2} -} -func (m *KeyValueList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValueList) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValueList.Merge(m, src) -} -func (m *KeyValueList) XXX_Size() int { - return m.Size() -} -func (m *KeyValueList) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValueList.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValueList proto.InternalMessageInfo - -func (m *KeyValueList) GetValues() []KeyValue { - if m != nil { - return m.Values - } - return nil -} - -// KeyValue is a key-value pair that is used to store Span attributes, Link -// attributes, etc. -type KeyValue struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` -} - -func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto.CompactTextString(m) } -func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{3} -} -func (m *KeyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValue.Merge(m, src) -} -func (m *KeyValue) XXX_Size() int { - return m.Size() -} -func (m *KeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValue proto.InternalMessageInfo - -func (m *KeyValue) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *KeyValue) GetValue() AnyValue { - if m != nil { - return m.Value - } - return AnyValue{} -} - -// InstrumentationScope is a message representing the instrumentation scope information -// such as the fully qualified name and version. -type InstrumentationScope struct { - // 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"` - DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` -} - -func (m *InstrumentationScope) Reset() { *m = InstrumentationScope{} } -func (m *InstrumentationScope) String() string { return proto.CompactTextString(m) } -func (*InstrumentationScope) ProtoMessage() {} -func (*InstrumentationScope) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{4} -} -func (m *InstrumentationScope) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InstrumentationScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InstrumentationScope.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InstrumentationScope) XXX_Merge(src proto.Message) { - xxx_messageInfo_InstrumentationScope.Merge(m, src) -} -func (m *InstrumentationScope) XXX_Size() int { - return m.Size() -} -func (m *InstrumentationScope) XXX_DiscardUnknown() { - xxx_messageInfo_InstrumentationScope.DiscardUnknown(m) -} - -var xxx_messageInfo_InstrumentationScope proto.InternalMessageInfo - -func (m *InstrumentationScope) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *InstrumentationScope) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *InstrumentationScope) GetAttributes() []KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *InstrumentationScope) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -// A reference to an Entity. -// Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs. -// -// Status: [Development] -type EntityRef struct { - // The Schema URL, if known. This is the identifier of the Schema that the entity 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 the data in this message and to the Resource attributes - // referenced by id_keys and description_keys. - // TODO: discuss if we are happy with this somewhat complicated definition of what - // the schema_url applies to. - // - // This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs. - SchemaUrl string `protobuf:"bytes,1,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` - // Defines the type of the entity. MUST not change during the lifetime of the entity. - // For example: "service" or "host". This field is required and MUST not be empty - // for valid entities. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Attribute Keys that identify the entity. - // MUST not change during the lifetime of the entity. The Id must contain at least one attribute. - // These keys MUST exist in the containing {message}.attributes. - IdKeys []string `protobuf:"bytes,3,rep,name=id_keys,json=idKeys,proto3" json:"id_keys,omitempty"` - // Descriptive (non-identifying) attribute keys of the entity. - // MAY change over the lifetime of the entity. MAY be empty. - // These attribute keys are not part of entity's identity. - // These keys MUST exist in the containing {message}.attributes. - DescriptionKeys []string `protobuf:"bytes,4,rep,name=description_keys,json=descriptionKeys,proto3" json:"description_keys,omitempty"` -} - -func (m *EntityRef) Reset() { *m = EntityRef{} } -func (m *EntityRef) String() string { return proto.CompactTextString(m) } -func (*EntityRef) ProtoMessage() {} -func (*EntityRef) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{5} -} -func (m *EntityRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EntityRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EntityRef.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EntityRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityRef.Merge(m, src) -} -func (m *EntityRef) XXX_Size() int { - return m.Size() -} -func (m *EntityRef) XXX_DiscardUnknown() { - xxx_messageInfo_EntityRef.DiscardUnknown(m) -} - -var xxx_messageInfo_EntityRef proto.InternalMessageInfo - -func (m *EntityRef) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -func (m *EntityRef) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *EntityRef) GetIdKeys() []string { - if m != nil { - return m.IdKeys - } - return nil -} - -func (m *EntityRef) GetDescriptionKeys() []string { - if m != nil { - return m.DescriptionKeys - } - return nil -} - -func init() { - proto.RegisterType((*AnyValue)(nil), "opentelemetry.proto.common.v1.AnyValue") - proto.RegisterType((*ArrayValue)(nil), "opentelemetry.proto.common.v1.ArrayValue") - proto.RegisterType((*KeyValueList)(nil), "opentelemetry.proto.common.v1.KeyValueList") - proto.RegisterType((*KeyValue)(nil), "opentelemetry.proto.common.v1.KeyValue") - proto.RegisterType((*InstrumentationScope)(nil), "opentelemetry.proto.common.v1.InstrumentationScope") - proto.RegisterType((*EntityRef)(nil), "opentelemetry.proto.common.v1.EntityRef") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/common/v1/common.proto", fileDescriptor_62ba46dcb97aa817) -} - -var fileDescriptor_62ba46dcb97aa817 = []byte{ - // 608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xdf, 0xa1, 0xa5, 0xed, 0xbe, 0xd6, 0x48, 0x26, 0x44, 0x1b, 0x93, 0x96, 0xb5, 0x1e, 0x5c, - 0x34, 0x69, 0x03, 0x5e, 0xbc, 0x52, 0x24, 0xa9, 0x01, 0x23, 0x59, 0x84, 0x83, 0x97, 0x66, 0xdb, - 0x7d, 0xd6, 0x09, 0xdb, 0x99, 0xcd, 0xec, 0xb4, 0xc9, 0x5e, 0xfd, 0x04, 0x7e, 0x0e, 0x2f, 0x7e, - 0x0d, 0x2e, 0x26, 0x1c, 0x3d, 0x19, 0x02, 0x5f, 0xc4, 0xcc, 0x9f, 0x16, 0xe4, 0x00, 0xc1, 0xdb, - 0x7b, 0xbf, 0xf7, 0x7b, 0xbf, 0xf7, 0x7e, 0x33, 0x93, 0x81, 0x57, 0x22, 0x43, 0xae, 0x30, 0xc5, - 0x29, 0x2a, 0x59, 0xf4, 0x32, 0x29, 0x94, 0xe8, 0x8d, 0xc5, 0x74, 0x2a, 0x78, 0x6f, 0xbe, 0xe5, - 0xa2, 0xae, 0x81, 0x69, 0xeb, 0x1f, 0xae, 0x05, 0xbb, 0x8e, 0x31, 0xdf, 0x7a, 0xb6, 0x3e, 0x11, - 0x13, 0x61, 0x05, 0x74, 0x64, 0xeb, 0x9d, 0x8b, 0x15, 0xa8, 0xed, 0xf0, 0xe2, 0x24, 0x4e, 0x67, - 0x48, 0x5f, 0x40, 0x23, 0x57, 0x92, 0xf1, 0xc9, 0x70, 0xae, 0xf3, 0x26, 0x09, 0x48, 0xe8, 0x0f, - 0xbc, 0xa8, 0x6e, 0x51, 0x4b, 0xda, 0x00, 0x18, 0x09, 0x91, 0x3a, 0xca, 0x4a, 0x40, 0xc2, 0xda, - 0xc0, 0x8b, 0x7c, 0x8d, 0x59, 0x42, 0x0b, 0x7c, 0xc6, 0x95, 0xab, 0x97, 0x02, 0x12, 0x96, 0x06, - 0x5e, 0x54, 0x63, 0x5c, 0x2d, 0x87, 0x24, 0x62, 0x36, 0x4a, 0xd1, 0x31, 0xca, 0x01, 0x09, 0x89, - 0x1e, 0x62, 0x51, 0x4b, 0x3a, 0x80, 0x7a, 0x2c, 0x65, 0x5c, 0x38, 0xce, 0x6a, 0x40, 0xc2, 0xfa, - 0xf6, 0x66, 0xf7, 0x4e, 0x87, 0xdd, 0x1d, 0xdd, 0x61, 0xfa, 0x07, 0x5e, 0x04, 0xf1, 0x32, 0xa3, - 0x87, 0xd0, 0x38, 0x9d, 0xa7, 0x2c, 0x5f, 0x2c, 0x55, 0x31, 0x72, 0xaf, 0xef, 0x91, 0xdb, 0x47, - 0xdb, 0x7e, 0xc0, 0x72, 0xa5, 0xf7, 0xb3, 0x12, 0x56, 0xf1, 0x39, 0xd4, 0x47, 0x85, 0xc2, 0xdc, - 0x09, 0x56, 0x03, 0x12, 0x36, 0xf4, 0x50, 0x03, 0x1a, 0x4a, 0xbf, 0x0a, 0xab, 0xa6, 0xd8, 0x39, - 0x02, 0xb8, 0xde, 0x8c, 0xee, 0x41, 0xc5, 0xc0, 0x79, 0x93, 0x04, 0xa5, 0xb0, 0xbe, 0xfd, 0xf2, - 0x3e, 0x53, 0xee, 0x72, 0xfa, 0xe5, 0xb3, 0x3f, 0x1b, 0x5e, 0xe4, 0x9a, 0x3b, 0xc7, 0xd0, 0xb8, - 0xb9, 0xdf, 0x83, 0x65, 0x17, 0xcd, 0xb7, 0x64, 0x63, 0xa8, 0x2d, 0x2a, 0x74, 0x0d, 0x4a, 0xa7, - 0x58, 0xd8, 0x47, 0x10, 0xe9, 0x90, 0xee, 0x3a, 0x4b, 0xe6, 0xd6, 0x1f, 0xbc, 0xba, 0x3b, 0x8e, - 0x5f, 0x04, 0xd6, 0xdf, 0xf3, 0x5c, 0xc9, 0xd9, 0x14, 0xb9, 0x8a, 0x15, 0x13, 0xfc, 0x68, 0x2c, - 0x32, 0xa4, 0x14, 0xca, 0x3c, 0x9e, 0xba, 0x57, 0x17, 0x99, 0x98, 0x36, 0xa1, 0x3a, 0x47, 0x99, - 0x33, 0xc1, 0xcd, 0x4c, 0x3f, 0x5a, 0xa4, 0xf4, 0x03, 0x40, 0xac, 0x94, 0x64, 0xa3, 0x99, 0xc2, - 0xbc, 0x59, 0xfa, 0x1f, 0xd3, 0x37, 0x04, 0xe8, 0x5b, 0x68, 0x26, 0x52, 0x64, 0x19, 0x26, 0xc3, - 0x6b, 0x74, 0x38, 0x16, 0x33, 0xae, 0xcc, 0x0b, 0x7d, 0x14, 0x3d, 0x71, 0xf5, 0x9d, 0x65, 0x79, - 0x57, 0x57, 0x3b, 0xdf, 0x08, 0xf8, 0x7b, 0x5c, 0x31, 0x55, 0x44, 0xf8, 0x85, 0xb6, 0x00, 0xf2, - 0xf1, 0x57, 0x9c, 0xc6, 0xc3, 0x99, 0x4c, 0x9d, 0x15, 0xdf, 0x22, 0xc7, 0x32, 0xd5, 0x1e, 0x55, - 0x91, 0xa1, 0x33, 0x63, 0x62, 0xfa, 0x14, 0xaa, 0x2c, 0x19, 0x9e, 0x62, 0x61, 0x6d, 0xf8, 0x51, - 0x85, 0x25, 0xfb, 0x58, 0xe4, 0x74, 0x13, 0xd6, 0x12, 0xcc, 0xc7, 0x92, 0x65, 0xfa, 0x90, 0x2c, - 0xa3, 0x6c, 0x18, 0x8f, 0x6f, 0xe0, 0x9a, 0xda, 0xff, 0x49, 0xce, 0x2e, 0xdb, 0xe4, 0xfc, 0xb2, - 0x4d, 0x2e, 0x2e, 0xdb, 0xe4, 0xfb, 0x55, 0xdb, 0x3b, 0xbf, 0x6a, 0x7b, 0xbf, 0xaf, 0xda, 0x1e, - 0x04, 0x4c, 0xdc, 0x7d, 0x2c, 0xfd, 0xfa, 0xae, 0x09, 0x0f, 0x35, 0x7c, 0x48, 0x3e, 0xbf, 0x9b, - 0xdc, 0x6e, 0x60, 0xfa, 0xcf, 0x49, 0x53, 0x1c, 0x2b, 0x21, 0x7b, 0x59, 0x12, 0xab, 0xb8, 0xc7, - 0xb8, 0x42, 0xc9, 0xe3, 0xb4, 0x67, 0x32, 0xa3, 0x38, 0x41, 0x7e, 0xfd, 0x35, 0xfd, 0x58, 0x69, - 0x7d, 0xcc, 0x90, 0x7f, 0x5a, 0x6a, 0x18, 0xf5, 0xae, 0x9d, 0xd4, 0x3d, 0xd9, 0x1a, 0x55, 0x4c, - 0xcf, 0x9b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x8b, 0xd4, 0x3b, 0xe2, 0x04, 0x00, 0x00, -} - -func (m *AnyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AnyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *AnyValue_StringValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarintCommon(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *AnyValue_BoolValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *AnyValue_IntValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_IntValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintCommon(dAtA, i, uint64(m.IntValue)) - i-- - dAtA[i] = 0x18 - return len(dAtA) - i, nil -} -func (m *AnyValue_DoubleValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x21 - return len(dAtA) - i, nil -} -func (m *AnyValue_ArrayValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ArrayValue != nil { - { - size, err := m.ArrayValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *AnyValue_KvlistValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_KvlistValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.KvlistValue != nil { - { - size, err := m.KvlistValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *AnyValue_BytesValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BytesValue != nil { - i -= len(m.BytesValue) - copy(dAtA[i:], m.BytesValue) - i = encodeVarintCommon(dAtA, i, uint64(len(m.BytesValue))) - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *ArrayValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArrayValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *KeyValueList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValueList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValueList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *KeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InstrumentationScope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InstrumentationScope) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InstrumentationScope) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DroppedAttributesCount != 0 { - i = encodeVarintCommon(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EntityRef) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EntityRef) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EntityRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DescriptionKeys) > 0 { - for iNdEx := len(m.DescriptionKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DescriptionKeys[iNdEx]) - copy(dAtA[i:], m.DescriptionKeys[iNdEx]) - i = encodeVarintCommon(dAtA, i, uint64(len(m.DescriptionKeys[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.IdKeys) > 0 { - for iNdEx := len(m.IdKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.IdKeys[iNdEx]) - copy(dAtA[i:], m.IdKeys[iNdEx]) - i = encodeVarintCommon(dAtA, i, uint64(len(m.IdKeys[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintCommon(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { - offset -= sovCommon(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AnyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *AnyValue_StringValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StringValue) - n += 1 + l + sovCommon(uint64(l)) - return n -} -func (m *AnyValue_BoolValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *AnyValue_IntValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovCommon(uint64(m.IntValue)) - return n -} -func (m *AnyValue_DoubleValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *AnyValue_ArrayValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ArrayValue != nil { - l = m.ArrayValue.Size() - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *AnyValue_KvlistValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KvlistValue != nil { - l = m.KvlistValue.Size() - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *AnyValue_BytesValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BytesValue != nil { - l = len(m.BytesValue) - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *ArrayValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - return n -} - -func (m *KeyValueList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - return n -} - -func (m *KeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = m.Value.Size() - n += 1 + l + sovCommon(uint64(l)) - return n -} - -func (m *InstrumentationScope) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovCommon(uint64(m.DroppedAttributesCount)) - } - return n -} - -func (m *EntityRef) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - if len(m.IdKeys) > 0 { - for _, s := range m.IdKeys { - l = len(s) - n += 1 + l + sovCommon(uint64(l)) - } - } - if len(m.DescriptionKeys) > 0 { - for _, s := range m.DescriptionKeys { - l = len(s) - n += 1 + l + sovCommon(uint64(l)) - } - } - return n -} - -func sovCommon(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommon(x uint64) (n int) { - return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AnyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = &AnyValue_StringValue{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Value = &AnyValue_BoolValue{b} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = &AnyValue_IntValue{v} - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &AnyValue_DoubleValue{float64(math.Float64frombits(v))} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ArrayValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ArrayValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AnyValue_ArrayValue{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KvlistValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &KeyValueList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AnyValue_KvlistValue{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BytesValue", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Value = &AnyValue_BytesValue{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArrayValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArrayValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArrayValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, AnyValue{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValueList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValueList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValueList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, KeyValue{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InstrumentationScope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InstrumentationScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InstrumentationScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EntityRef) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EntityRef: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EntityRef: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdKeys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdKeys = append(m.IdKeys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DescriptionKeys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DescriptionKeys = append(m.DescriptionKeys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommon(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommon - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommon - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommon - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go deleted file mode 100644 index da266d167d2..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go +++ /dev/null @@ -1,1834 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/logs/v1/logs.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Possible values for LogRecord.SeverityNumber. -type SeverityNumber int32 - -const ( - // UNSPECIFIED is the default SeverityNumber, it MUST NOT be used. - SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED SeverityNumber = 0 - SeverityNumber_SEVERITY_NUMBER_TRACE SeverityNumber = 1 - SeverityNumber_SEVERITY_NUMBER_TRACE2 SeverityNumber = 2 - SeverityNumber_SEVERITY_NUMBER_TRACE3 SeverityNumber = 3 - SeverityNumber_SEVERITY_NUMBER_TRACE4 SeverityNumber = 4 - SeverityNumber_SEVERITY_NUMBER_DEBUG SeverityNumber = 5 - SeverityNumber_SEVERITY_NUMBER_DEBUG2 SeverityNumber = 6 - SeverityNumber_SEVERITY_NUMBER_DEBUG3 SeverityNumber = 7 - SeverityNumber_SEVERITY_NUMBER_DEBUG4 SeverityNumber = 8 - SeverityNumber_SEVERITY_NUMBER_INFO SeverityNumber = 9 - SeverityNumber_SEVERITY_NUMBER_INFO2 SeverityNumber = 10 - SeverityNumber_SEVERITY_NUMBER_INFO3 SeverityNumber = 11 - SeverityNumber_SEVERITY_NUMBER_INFO4 SeverityNumber = 12 - SeverityNumber_SEVERITY_NUMBER_WARN SeverityNumber = 13 - SeverityNumber_SEVERITY_NUMBER_WARN2 SeverityNumber = 14 - SeverityNumber_SEVERITY_NUMBER_WARN3 SeverityNumber = 15 - SeverityNumber_SEVERITY_NUMBER_WARN4 SeverityNumber = 16 - SeverityNumber_SEVERITY_NUMBER_ERROR SeverityNumber = 17 - SeverityNumber_SEVERITY_NUMBER_ERROR2 SeverityNumber = 18 - SeverityNumber_SEVERITY_NUMBER_ERROR3 SeverityNumber = 19 - SeverityNumber_SEVERITY_NUMBER_ERROR4 SeverityNumber = 20 - SeverityNumber_SEVERITY_NUMBER_FATAL SeverityNumber = 21 - SeverityNumber_SEVERITY_NUMBER_FATAL2 SeverityNumber = 22 - SeverityNumber_SEVERITY_NUMBER_FATAL3 SeverityNumber = 23 - SeverityNumber_SEVERITY_NUMBER_FATAL4 SeverityNumber = 24 -) - -var SeverityNumber_name = map[int32]string{ - 0: "SEVERITY_NUMBER_UNSPECIFIED", - 1: "SEVERITY_NUMBER_TRACE", - 2: "SEVERITY_NUMBER_TRACE2", - 3: "SEVERITY_NUMBER_TRACE3", - 4: "SEVERITY_NUMBER_TRACE4", - 5: "SEVERITY_NUMBER_DEBUG", - 6: "SEVERITY_NUMBER_DEBUG2", - 7: "SEVERITY_NUMBER_DEBUG3", - 8: "SEVERITY_NUMBER_DEBUG4", - 9: "SEVERITY_NUMBER_INFO", - 10: "SEVERITY_NUMBER_INFO2", - 11: "SEVERITY_NUMBER_INFO3", - 12: "SEVERITY_NUMBER_INFO4", - 13: "SEVERITY_NUMBER_WARN", - 14: "SEVERITY_NUMBER_WARN2", - 15: "SEVERITY_NUMBER_WARN3", - 16: "SEVERITY_NUMBER_WARN4", - 17: "SEVERITY_NUMBER_ERROR", - 18: "SEVERITY_NUMBER_ERROR2", - 19: "SEVERITY_NUMBER_ERROR3", - 20: "SEVERITY_NUMBER_ERROR4", - 21: "SEVERITY_NUMBER_FATAL", - 22: "SEVERITY_NUMBER_FATAL2", - 23: "SEVERITY_NUMBER_FATAL3", - 24: "SEVERITY_NUMBER_FATAL4", -} - -var SeverityNumber_value = map[string]int32{ - "SEVERITY_NUMBER_UNSPECIFIED": 0, - "SEVERITY_NUMBER_TRACE": 1, - "SEVERITY_NUMBER_TRACE2": 2, - "SEVERITY_NUMBER_TRACE3": 3, - "SEVERITY_NUMBER_TRACE4": 4, - "SEVERITY_NUMBER_DEBUG": 5, - "SEVERITY_NUMBER_DEBUG2": 6, - "SEVERITY_NUMBER_DEBUG3": 7, - "SEVERITY_NUMBER_DEBUG4": 8, - "SEVERITY_NUMBER_INFO": 9, - "SEVERITY_NUMBER_INFO2": 10, - "SEVERITY_NUMBER_INFO3": 11, - "SEVERITY_NUMBER_INFO4": 12, - "SEVERITY_NUMBER_WARN": 13, - "SEVERITY_NUMBER_WARN2": 14, - "SEVERITY_NUMBER_WARN3": 15, - "SEVERITY_NUMBER_WARN4": 16, - "SEVERITY_NUMBER_ERROR": 17, - "SEVERITY_NUMBER_ERROR2": 18, - "SEVERITY_NUMBER_ERROR3": 19, - "SEVERITY_NUMBER_ERROR4": 20, - "SEVERITY_NUMBER_FATAL": 21, - "SEVERITY_NUMBER_FATAL2": 22, - "SEVERITY_NUMBER_FATAL3": 23, - "SEVERITY_NUMBER_FATAL4": 24, -} - -func (x SeverityNumber) String() string { - return proto.EnumName(SeverityNumber_name, int32(x)) -} - -func (SeverityNumber) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{0} -} - -// LogRecordFlags represents constants used to interpret the -// LogRecord.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: -// -// (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK) -type LogRecordFlags 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. - LogRecordFlags_LOG_RECORD_FLAGS_DO_NOT_USE LogRecordFlags = 0 - // Bits 0-7 are used for trace flags. - LogRecordFlags_LOG_RECORD_FLAGS_TRACE_FLAGS_MASK LogRecordFlags = 255 -) - -var LogRecordFlags_name = map[int32]string{ - 0: "LOG_RECORD_FLAGS_DO_NOT_USE", - 255: "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK", -} - -var LogRecordFlags_value = map[string]int32{ - "LOG_RECORD_FLAGS_DO_NOT_USE": 0, - "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK": 255, -} - -func (x LogRecordFlags) String() string { - return proto.EnumName(LogRecordFlags_name, int32(x)) -} - -func (LogRecordFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{1} -} - -// LogsData represents the logs data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP logs 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 LogsData struct { - // An array of ResourceLogs. - // 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. - ResourceLogs []*ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"` -} - -func (m *LogsData) Reset() { *m = LogsData{} } -func (m *LogsData) String() string { return proto.CompactTextString(m) } -func (*LogsData) ProtoMessage() {} -func (*LogsData) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{0} -} -func (m *LogsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogsData.Merge(m, src) -} -func (m *LogsData) XXX_Size() int { - return m.Size() -} -func (m *LogsData) XXX_DiscardUnknown() { - xxx_messageInfo_LogsData.DiscardUnknown(m) -} - -var xxx_messageInfo_LogsData proto.InternalMessageInfo - -func (m *LogsData) GetResourceLogs() []*ResourceLogs { - if m != nil { - return m.ResourceLogs - } - return nil -} - -// A collection of ScopeLogs from a Resource. -type ResourceLogs struct { - DeprecatedScopeLogs []*ScopeLogs `protobuf:"bytes,1000,rep,name=deprecated_scope_logs,json=deprecatedScopeLogs,proto3" json:"deprecated_scope_logs,omitempty"` - // The resource for the logs in this message. - // If this field is not set then resource info is unknown. - Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of ScopeLogs that originate from a resource. - ScopeLogs []*ScopeLogs `protobuf:"bytes,2,rep,name=scope_logs,json=scopeLogs,proto3" json:"scope_logs,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_logs" 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 (m *ResourceLogs) Reset() { *m = ResourceLogs{} } -func (m *ResourceLogs) String() string { return proto.CompactTextString(m) } -func (*ResourceLogs) ProtoMessage() {} -func (*ResourceLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{1} -} -func (m *ResourceLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceLogs.Merge(m, src) -} -func (m *ResourceLogs) XXX_Size() int { - return m.Size() -} -func (m *ResourceLogs) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceLogs proto.InternalMessageInfo - -func (m *ResourceLogs) GetDeprecatedScopeLogs() []*ScopeLogs { - if m != nil { - return m.DeprecatedScopeLogs - } - return nil -} - -func (m *ResourceLogs) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceLogs) GetScopeLogs() []*ScopeLogs { - if m != nil { - return m.ScopeLogs - } - return nil -} - -func (m *ResourceLogs) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Logs produced by a Scope. -type ScopeLogs struct { - // The instrumentation scope information for the logs 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"` - // A list of log records. - LogRecords []*LogRecord `protobuf:"bytes,2,rep,name=log_records,json=logRecords,proto3" json:"log_records,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the log 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 logs in the "logs" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeLogs) Reset() { *m = ScopeLogs{} } -func (m *ScopeLogs) String() string { return proto.CompactTextString(m) } -func (*ScopeLogs) ProtoMessage() {} -func (*ScopeLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{2} -} -func (m *ScopeLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeLogs.Merge(m, src) -} -func (m *ScopeLogs) XXX_Size() int { - return m.Size() -} -func (m *ScopeLogs) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeLogs proto.InternalMessageInfo - -func (m *ScopeLogs) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeLogs) GetLogRecords() []*LogRecord { - if m != nil { - return m.LogRecords - } - return nil -} - -func (m *ScopeLogs) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A log record according to OpenTelemetry Log Data Model: -// https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md -type LogRecord struct { - // time_unix_nano is the time when the event occurred. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // Time when the event was observed by the collection system. - // For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK) - // this timestamp is typically set at the generation time and is equal to Timestamp. - // For events originating externally and collected by OpenTelemetry (e.g. using - // Collector) this is the time when OpenTelemetry's code observed the event measured - // by the clock of the OpenTelemetry code. This field MUST be set once the event is - // observed by OpenTelemetry. - // - // For converting OpenTelemetry log data to formats that support only one timestamp or - // when receiving OpenTelemetry log data by recipients that support only one timestamp - // internally the following logic is recommended: - // - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - ObservedTimeUnixNano uint64 `protobuf:"fixed64,11,opt,name=observed_time_unix_nano,json=observedTimeUnixNano,proto3" json:"observed_time_unix_nano,omitempty"` - // Numerical value of the severity, normalized to values described in Log Data Model. - // [Optional]. - SeverityNumber SeverityNumber `protobuf:"varint,2,opt,name=severity_number,json=severityNumber,proto3,enum=opentelemetry.proto.logs.v1.SeverityNumber" json:"severity_number,omitempty"` - // The severity text (also known as log level). The original string representation as - // it is known at the source. [Optional]. - SeverityText string `protobuf:"bytes,3,opt,name=severity_text,json=severityText,proto3" json:"severity_text,omitempty"` - // A value containing the body of the log record. Can be for example a human-readable - // string message (including multi-line) describing the event in a free form or it can - // be a structured data composed of arrays and maps of other values. [Optional]. - Body v11.AnyValue `protobuf:"bytes,5,opt,name=body,proto3" json:"body"` - // Additional attributes that describe the specific event occurrence. [Optional]. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,6,rep,name=attributes,proto3" json:"attributes"` - DroppedAttributesCount uint32 `protobuf:"varint,7,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Flags, a bit field. 8 least significant bits are the trace flags as - // defined in W3C Trace Context specification. 24 most significant bits are reserved - // and must be set to 0. Readers must not assume that 24 most significant bits - // will be zero and must correctly mask the bits when reading 8-bit trace flag (use - // flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional]. - Flags uint32 `protobuf:"fixed32,8,opt,name=flags,proto3" json:"flags,omitempty"` - // A unique identifier for a trace. All logs 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 optional. - // - // The receivers SHOULD assume that the log record is not associated with a - // trace if any of the following is true: - // - the field is not present, - // - the field contains an invalid value. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,9,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // 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 optional. If the sender specifies a valid span_id then it SHOULD also - // specify a valid trace_id. - // - // The receivers SHOULD assume that the log record is not associated with a - // span if any of the following is true: - // - the field is not present, - // - the field contains an invalid value. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,10,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // A unique identifier of event category/type. - // All events with the same event_name are expected to conform to the same - // schema for both their attributes and their body. - // - // Recommended to be fully qualified and short (no longer than 256 characters). - // - // Presence of event_name on the log record identifies this record - // as an event. - // - // [Optional]. - EventName string `protobuf:"bytes,12,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` -} - -func (m *LogRecord) Reset() { *m = LogRecord{} } -func (m *LogRecord) String() string { return proto.CompactTextString(m) } -func (*LogRecord) ProtoMessage() {} -func (*LogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{3} -} -func (m *LogRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogRecord.Merge(m, src) -} -func (m *LogRecord) XXX_Size() int { - return m.Size() -} -func (m *LogRecord) XXX_DiscardUnknown() { - xxx_messageInfo_LogRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_LogRecord proto.InternalMessageInfo - -func (m *LogRecord) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *LogRecord) GetObservedTimeUnixNano() uint64 { - if m != nil { - return m.ObservedTimeUnixNano - } - return 0 -} - -func (m *LogRecord) GetSeverityNumber() SeverityNumber { - if m != nil { - return m.SeverityNumber - } - return SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED -} - -func (m *LogRecord) GetSeverityText() string { - if m != nil { - return m.SeverityText - } - return "" -} - -func (m *LogRecord) GetBody() v11.AnyValue { - if m != nil { - return m.Body - } - return v11.AnyValue{} -} - -func (m *LogRecord) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *LogRecord) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *LogRecord) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *LogRecord) GetEventName() string { - if m != nil { - return m.EventName - } - return "" -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.logs.v1.SeverityNumber", SeverityNumber_name, SeverityNumber_value) - proto.RegisterEnum("opentelemetry.proto.logs.v1.LogRecordFlags", LogRecordFlags_name, LogRecordFlags_value) - proto.RegisterType((*LogsData)(nil), "opentelemetry.proto.logs.v1.LogsData") - proto.RegisterType((*ResourceLogs)(nil), "opentelemetry.proto.logs.v1.ResourceLogs") - proto.RegisterType((*ScopeLogs)(nil), "opentelemetry.proto.logs.v1.ScopeLogs") - proto.RegisterType((*LogRecord)(nil), "opentelemetry.proto.logs.v1.LogRecord") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/logs/v1/logs.proto", fileDescriptor_d1c030a3ec7e961e) -} - -var fileDescriptor_d1c030a3ec7e961e = []byte{ - // 971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0x41, 0x6f, 0xe2, 0x46, - 0x1b, 0xc7, 0x71, 0x12, 0x02, 0x4c, 0x08, 0x3b, 0xef, 0x2c, 0xc9, 0xfa, 0x4d, 0x54, 0x42, 0xd3, - 0x2a, 0xa5, 0xa9, 0x04, 0x0a, 0x50, 0x69, 0x7b, 0xab, 0x09, 0x26, 0xa2, 0x21, 0x10, 0x0d, 0x90, - 0x2a, 0xdb, 0x4a, 0x96, 0xc1, 0x53, 0x6a, 0xc9, 0xcc, 0x58, 0xf6, 0x80, 0x92, 0x6f, 0xd1, 0x4f, - 0xd0, 0x4b, 0x0f, 0x95, 0xfa, 0x35, 0xda, 0xc3, 0x1e, 0xf7, 0x58, 0xf5, 0xb0, 0xaa, 0x92, 0x4b, - 0xbf, 0x45, 0xab, 0x19, 0x0c, 0x21, 0xa9, 0x9d, 0x34, 0x27, 0x66, 0x9e, 0xdf, 0xff, 0xf9, 0x3f, - 0xcf, 0x78, 0xc6, 0x83, 0xc1, 0x01, 0x73, 0x09, 0xe5, 0xc4, 0x21, 0x63, 0xc2, 0xbd, 0xeb, 0x92, - 0xeb, 0x31, 0xce, 0x4a, 0x0e, 0x1b, 0xf9, 0xa5, 0xe9, 0x91, 0xfc, 0x2d, 0xca, 0x10, 0xda, 0xbd, - 0xa7, 0x9b, 0x05, 0x8b, 0x92, 0x4f, 0x8f, 0x76, 0xb2, 0x23, 0x36, 0x62, 0xb3, 0x54, 0x31, 0x9a, - 0xd1, 0x9d, 0xc3, 0x30, 0xeb, 0x21, 0x1b, 0x8f, 0x19, 0x15, 0xe6, 0xb3, 0x51, 0xa0, 0x2d, 0x86, - 0x69, 0x3d, 0xe2, 0xb3, 0x89, 0x37, 0x24, 0x42, 0x3d, 0x1f, 0xcf, 0xf4, 0xfb, 0x6f, 0x40, 0xb2, - 0xc5, 0x46, 0x7e, 0xdd, 0xe4, 0x26, 0x6a, 0x83, 0xcd, 0x39, 0x35, 0x44, 0x47, 0xaa, 0x92, 0x5f, - 0x2d, 0x6c, 0x94, 0x3f, 0x2d, 0x3e, 0xd2, 0x72, 0x11, 0x07, 0x19, 0xc2, 0x05, 0xa7, 0xbd, 0xa5, - 0xd9, 0xfe, 0x8f, 0x2b, 0x20, 0xbd, 0x8c, 0xd1, 0x37, 0x60, 0xcb, 0x22, 0xae, 0x47, 0x86, 0x26, - 0x27, 0x96, 0xe1, 0x0f, 0x99, 0x1b, 0x14, 0xfa, 0x2b, 0x21, 0x2b, 0x1d, 0x3c, 0x5a, 0xa9, 0x2b, - 0xf4, 0xb2, 0xcc, 0xcb, 0x3b, 0x97, 0x45, 0x10, 0x9d, 0x82, 0xe4, 0xbc, 0xba, 0xaa, 0xe4, 0x95, - 0xc8, 0xc6, 0x17, 0x0f, 0x60, 0xa9, 0xf9, 0xda, 0xda, 0xdb, 0xf7, 0x7b, 0x31, 0xbc, 0x30, 0x40, - 0x3a, 0x00, 0x4b, 0xed, 0xad, 0x3c, 0xab, 0xbb, 0x94, 0xbf, 0xe8, 0xe9, 0x03, 0x61, 0xf3, 0x3d, - 0x19, 0x9b, 0xc6, 0xc4, 0x73, 0xd4, 0xd5, 0xbc, 0x52, 0x48, 0x09, 0x2c, 0x22, 0x7d, 0xcf, 0xd9, - 0xff, 0x4d, 0x01, 0xa9, 0xbb, 0x05, 0x74, 0x40, 0x5c, 0x66, 0x06, 0xdd, 0x57, 0x42, 0xcb, 0x05, - 0x9b, 0x3d, 0x3d, 0x2a, 0x36, 0xa9, 0xcf, 0xbd, 0xc9, 0x98, 0x50, 0x6e, 0x72, 0x9b, 0x51, 0xe9, - 0x13, 0xac, 0x63, 0xe6, 0x83, 0x4e, 0xc0, 0x86, 0xc3, 0x46, 0x86, 0x47, 0x86, 0xcc, 0xb3, 0xfe, - 0xdb, 0x2a, 0x5a, 0x6c, 0x84, 0xa5, 0x1c, 0x03, 0x67, 0x3e, 0x7c, 0x72, 0x19, 0x3f, 0xc5, 0x41, - 0x6a, 0x91, 0x88, 0x3e, 0x06, 0x19, 0x6e, 0x8f, 0x89, 0x31, 0xa1, 0xf6, 0x95, 0x41, 0x4d, 0xca, - 0xe4, 0x7a, 0xd6, 0x71, 0x5a, 0x44, 0xfb, 0xd4, 0xbe, 0x6a, 0x9b, 0x94, 0xa1, 0xcf, 0xc1, 0x2b, - 0x36, 0xf0, 0x89, 0x37, 0x25, 0x96, 0xf1, 0x40, 0xbe, 0x21, 0xe5, 0xd9, 0x39, 0xee, 0x2d, 0xa7, - 0xf5, 0xc0, 0x0b, 0x9f, 0x4c, 0x89, 0x67, 0xf3, 0x6b, 0x83, 0x4e, 0xc6, 0x03, 0xe2, 0xa9, 0x2b, - 0x79, 0xa5, 0x90, 0x29, 0x7f, 0xf6, 0xf8, 0xe6, 0x04, 0x39, 0x6d, 0x99, 0x82, 0x33, 0xfe, 0xbd, - 0x39, 0xfa, 0x08, 0x6c, 0x2e, 0x5c, 0x39, 0xb9, 0xe2, 0xc1, 0x12, 0xd3, 0xf3, 0x60, 0x8f, 0x5c, - 0x71, 0xa4, 0x81, 0xb5, 0x01, 0xb3, 0xae, 0xd5, 0xb8, 0xdc, 0x9d, 0x4f, 0x9e, 0xd8, 0x1d, 0x8d, - 0x5e, 0x5f, 0x98, 0xce, 0x64, 0xbe, 0x23, 0x32, 0x15, 0x9d, 0x01, 0x60, 0x72, 0xee, 0xd9, 0x83, - 0x09, 0x27, 0xbe, 0xba, 0x2e, 0xf7, 0xe3, 0x29, 0xa3, 0x53, 0x72, 0xcf, 0x68, 0xc9, 0x00, 0xbd, - 0x06, 0xaa, 0xe5, 0x31, 0xd7, 0x25, 0x96, 0x71, 0x17, 0x35, 0x86, 0x6c, 0x42, 0xb9, 0x9a, 0xc8, - 0x2b, 0x85, 0x4d, 0xbc, 0x1d, 0x70, 0x6d, 0x81, 0x8f, 0x05, 0x45, 0x59, 0x10, 0xff, 0xce, 0x31, - 0x47, 0xbe, 0x9a, 0xcc, 0x2b, 0x85, 0x04, 0x9e, 0x4d, 0xd0, 0xb7, 0x20, 0xc9, 0x3d, 0x73, 0x48, - 0x0c, 0xdb, 0x52, 0x53, 0x79, 0xa5, 0x90, 0xae, 0x69, 0xa2, 0xe6, 0x1f, 0xef, 0xf7, 0xbe, 0x18, - 0xb1, 0x07, 0x6d, 0xda, 0xe2, 0x06, 0x72, 0x1c, 0x32, 0xe4, 0xcc, 0x2b, 0xb9, 0x96, 0xc9, 0xcd, - 0x92, 0x4d, 0x39, 0xf1, 0xa8, 0xe9, 0x94, 0xc4, 0xac, 0xd8, 0x13, 0x4e, 0xcd, 0x3a, 0x4e, 0x48, - 0xcb, 0xa6, 0x85, 0x2e, 0x41, 0xc2, 0x77, 0x4d, 0x2a, 0xcc, 0x81, 0x34, 0xff, 0x32, 0x30, 0x7f, - 0xfd, 0x7c, 0xf3, 0xae, 0x6b, 0xd2, 0x66, 0x1d, 0xaf, 0x0b, 0xc3, 0xa6, 0x25, 0xce, 0x27, 0x99, - 0x12, 0xca, 0x0d, 0x6a, 0x8e, 0x89, 0x9a, 0x9e, 0x9d, 0x4f, 0x19, 0x69, 0x9b, 0x63, 0xf2, 0xd5, - 0x5a, 0x72, 0x0d, 0xc6, 0x0f, 0x7f, 0x8d, 0x83, 0xcc, 0xfd, 0x73, 0x80, 0xf6, 0xc0, 0x6e, 0x57, - 0xbf, 0xd0, 0x71, 0xb3, 0x77, 0x69, 0xb4, 0xfb, 0x67, 0x35, 0x1d, 0x1b, 0xfd, 0x76, 0xf7, 0x5c, - 0x3f, 0x6e, 0x36, 0x9a, 0x7a, 0x1d, 0xc6, 0xd0, 0xff, 0xc1, 0xd6, 0x43, 0x41, 0x0f, 0x6b, 0xc7, - 0x3a, 0x54, 0xd0, 0x0e, 0xd8, 0x0e, 0x45, 0x65, 0xb8, 0x12, 0xc9, 0x2a, 0x70, 0x35, 0x92, 0x55, - 0xe1, 0x5a, 0x58, 0xb9, 0xba, 0x5e, 0xeb, 0x9f, 0xc0, 0x78, 0x58, 0x9a, 0x44, 0x65, 0xb8, 0x1e, - 0xc9, 0x2a, 0x30, 0x11, 0xc9, 0xaa, 0x30, 0x89, 0x54, 0x90, 0x7d, 0xc8, 0x9a, 0xed, 0x46, 0x07, - 0xa6, 0xc2, 0x1a, 0x11, 0xa4, 0x0c, 0x41, 0x14, 0xaa, 0xc0, 0x8d, 0x28, 0x54, 0x85, 0xe9, 0xb0, - 0x52, 0x5f, 0x6b, 0xb8, 0x0d, 0x37, 0xc3, 0x92, 0x04, 0x29, 0xc3, 0x4c, 0x14, 0xaa, 0xc0, 0x17, - 0x51, 0xa8, 0x0a, 0x61, 0x18, 0xd2, 0x31, 0xee, 0x60, 0xf8, 0xbf, 0xb0, 0x87, 0x21, 0x51, 0x19, - 0xa2, 0x48, 0x56, 0x81, 0x2f, 0x23, 0x59, 0x15, 0x66, 0xc3, 0xca, 0x35, 0xb4, 0x9e, 0xd6, 0x82, - 0x5b, 0x61, 0x69, 0x12, 0x95, 0xe1, 0x76, 0x24, 0xab, 0xc0, 0x57, 0x91, 0xac, 0x0a, 0xd5, 0xc3, - 0x4b, 0x90, 0x59, 0x5c, 0xb5, 0x0d, 0xf9, 0xd6, 0xee, 0x81, 0xdd, 0x56, 0xe7, 0xc4, 0xc0, 0xfa, - 0x71, 0x07, 0xd7, 0x8d, 0x46, 0x4b, 0x3b, 0xe9, 0x1a, 0xf5, 0x8e, 0xd1, 0xee, 0xf4, 0x8c, 0x7e, - 0x57, 0x87, 0x31, 0x74, 0x00, 0x3e, 0xfc, 0x97, 0x40, 0x1e, 0xb9, 0x60, 0x7c, 0xa6, 0x75, 0x4f, - 0xe1, 0xdf, 0x4a, 0xed, 0x67, 0xe5, 0xed, 0x4d, 0x4e, 0x79, 0x77, 0x93, 0x53, 0xfe, 0xbc, 0xc9, - 0x29, 0x3f, 0xdc, 0xe6, 0x62, 0xef, 0x6e, 0x73, 0xb1, 0xdf, 0x6f, 0x73, 0x31, 0x90, 0xb3, 0xd9, - 0x63, 0xf7, 0x6b, 0x4d, 0x5c, 0xff, 0xfe, 0xb9, 0x08, 0x9d, 0x2b, 0x6f, 0x6a, 0xcf, 0x7e, 0x9f, - 0x67, 0x9f, 0x29, 0x23, 0x42, 0xe7, 0x1f, 0x4c, 0xbf, 0xac, 0xec, 0x76, 0x5c, 0x42, 0x7b, 0x0b, - 0x07, 0xe9, 0x2d, 0xfe, 0x9d, 0xfc, 0xe2, 0xc5, 0xd1, 0x60, 0x5d, 0xea, 0x2b, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xc9, 0xbc, 0x36, 0x44, 0x74, 0x09, 0x00, 0x00, -} - -func (m *LogsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for iNdEx := len(m.ResourceLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeLogs) > 0 { - for iNdEx := len(m.DeprecatedScopeLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeLogs) > 0 { - for iNdEx := len(m.ScopeLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.LogRecords) > 0 { - for iNdEx := len(m.LogRecords) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LogRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LogRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EventName) > 0 { - i -= len(m.EventName) - copy(dAtA[i:], m.EventName) - i = encodeVarintLogs(dAtA, i, uint64(len(m.EventName))) - i-- - dAtA[i] = 0x62 - } - if m.ObservedTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.ObservedTimeUnixNano)) - i-- - dAtA[i] = 0x59 - } - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x45 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintLogs(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x38 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.SeverityText) > 0 { - i -= len(m.SeverityText) - copy(dAtA[i:], m.SeverityText) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SeverityText))) - i-- - dAtA[i] = 0x1a - } - if m.SeverityNumber != 0 { - i = encodeVarintLogs(dAtA, i, uint64(m.SeverityNumber)) - i-- - dAtA[i] = 0x10 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func encodeVarintLogs(dAtA []byte, offset int, v uint64) int { - offset -= sovLogs(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *LogsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for _, e := range m.ResourceLogs { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - return n -} - -func (m *ResourceLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovLogs(uint64(l)) - if len(m.ScopeLogs) > 0 { - for _, e := range m.ScopeLogs { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - if len(m.DeprecatedScopeLogs) > 0 { - for _, e := range m.DeprecatedScopeLogs { - l = e.Size() - n += 2 + l + sovLogs(uint64(l)) - } - } - return n -} - -func (m *ScopeLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovLogs(uint64(l)) - if len(m.LogRecords) > 0 { - for _, e := range m.LogRecords { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - return n -} - -func (m *LogRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - if m.SeverityNumber != 0 { - n += 1 + sovLogs(uint64(m.SeverityNumber)) - } - l = len(m.SeverityText) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - l = m.Body.Size() - n += 1 + l + sovLogs(uint64(l)) - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovLogs(uint64(m.DroppedAttributesCount)) - } - if m.Flags != 0 { - n += 5 - } - l = m.TraceId.Size() - n += 1 + l + sovLogs(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovLogs(uint64(l)) - if m.ObservedTimeUnixNano != 0 { - n += 9 - } - l = len(m.EventName) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - return n -} - -func sovLogs(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLogs(x uint64) (n int) { - return sovLogs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *LogsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceLogs = append(m.ResourceLogs, &ResourceLogs{}) - if err := m.ResourceLogs[len(m.ResourceLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeLogs = append(m.ScopeLogs, &ScopeLogs{}) - if err := m.ScopeLogs[len(m.ScopeLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeLogs = append(m.DeprecatedScopeLogs, &ScopeLogs{}) - if err := m.DeprecatedScopeLogs[len(m.DeprecatedScopeLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogRecords", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogRecords = append(m.LogRecords, &LogRecord{}) - if err := m.LogRecords[len(m.LogRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityNumber", wireType) - } - m.SeverityNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SeverityNumber |= SeverityNumber(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityText", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SeverityText = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedTimeUnixNano", wireType) - } - m.ObservedTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.ObservedTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLogs(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLogs - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLogs - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLogs - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLogs = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLogs = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLogs = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go deleted file mode 100644 index 2371096c745..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go +++ /dev/null @@ -1,6655 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/metrics/v1/metrics.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AggregationTemporality defines how a metric aggregator reports aggregated -// values. It describes how those values relate to the time interval over -// which they are aggregated. -type AggregationTemporality int32 - -const ( - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 - // DELTA is an AggregationTemporality for a metric aggregator which reports - // changes since last report time. Successive metrics contain aggregation of - // values from continuous and non-overlapping intervals. - // - // The values for a DELTA metric are based only on the time interval - // associated with one measurement cycle. There is no dependency on - // previous measurements like is the case for CUMULATIVE metrics. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // DELTA metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0+1 to - // t_0+2 with a value of 2. - AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 - // CUMULATIVE is an AggregationTemporality for a metric aggregator which - // reports changes since a fixed start time. This means that current values - // of a CUMULATIVE metric depend on all previous measurements since the - // start time. Because of this, the sender is required to retain this state - // in some form. If this state is lost or invalidated, the CUMULATIVE metric - // values MUST be reset and a new fixed start time following the last - // reported measurement time sent MUST be used. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // CUMULATIVE metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+2 with a value of 5. - // 9. The system experiences a fault and loses state. - // 10. The system recovers and resumes receiving at time=t_1. - // 11. A request is received, the system measures 1 request. - // 12. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_1 to - // t_0+1 with a value of 1. - // - // Note: Even though, when reporting changes since last report time, using - // CUMULATIVE is valid, it is not recommended. This may cause problems for - // systems that do not use start_time to determine when the aggregation - // value was reset (e.g. Prometheus). - AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 -) - -var AggregationTemporality_name = map[int32]string{ - 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", - 1: "AGGREGATION_TEMPORALITY_DELTA", - 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", -} - -var AggregationTemporality_value = map[string]int32{ - "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, - "AGGREGATION_TEMPORALITY_DELTA": 1, - "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, -} - -func (x AggregationTemporality) String() string { - return proto.EnumName(AggregationTemporality_name, int32(x)) -} - -func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{0} -} - -// DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a -// bit-field representing 32 distinct boolean flags. Each flag defined in this -// enum is a bit-mask. To test the presence of a single flag in the flags of -// a data point, for example, use an expression like: -// -// (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK -type DataPointFlags 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. - DataPointFlags_DATA_POINT_FLAGS_DO_NOT_USE DataPointFlags = 0 - // This DataPoint is valid but has no recorded value. This value - // SHOULD be used to reflect explicitly missing data in a series, as - // for an equivalent to the Prometheus "staleness marker". - DataPointFlags_DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK DataPointFlags = 1 -) - -var DataPointFlags_name = map[int32]string{ - 0: "DATA_POINT_FLAGS_DO_NOT_USE", - 1: "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK", -} - -var DataPointFlags_value = map[string]int32{ - "DATA_POINT_FLAGS_DO_NOT_USE": 0, - "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK": 1, -} - -func (x DataPointFlags) String() string { - return proto.EnumName(DataPointFlags_name, int32(x)) -} - -func (DataPointFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{1} -} - -// MetricsData represents the metrics data that can be stored in a persistent -// storage, OR can be embedded by other protocols that transfer OTLP metrics -// data but do not implement the OTLP protocol. -// -// MetricsData -// └─── ResourceMetrics -// -// ├── Resource -// ├── SchemaURL -// └── ScopeMetrics -// ├── Scope -// ├── SchemaURL -// └── Metric -// ├── Name -// ├── Description -// ├── Unit -// └── data -// ├── Gauge -// ├── Sum -// ├── Histogram -// ├── ExponentialHistogram -// └── Summary -// -// 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 MetricsData struct { - // An array of ResourceMetrics. - // 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. - ResourceMetrics []*ResourceMetrics `protobuf:"bytes,1,rep,name=resource_metrics,json=resourceMetrics,proto3" json:"resource_metrics,omitempty"` -} - -func (m *MetricsData) Reset() { *m = MetricsData{} } -func (m *MetricsData) String() string { return proto.CompactTextString(m) } -func (*MetricsData) ProtoMessage() {} -func (*MetricsData) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{0} -} -func (m *MetricsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricsData.Merge(m, src) -} -func (m *MetricsData) XXX_Size() int { - return m.Size() -} -func (m *MetricsData) XXX_DiscardUnknown() { - xxx_messageInfo_MetricsData.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricsData proto.InternalMessageInfo - -func (m *MetricsData) GetResourceMetrics() []*ResourceMetrics { - if m != nil { - return m.ResourceMetrics - } - return nil -} - -// A collection of ScopeMetrics from a Resource. -type ResourceMetrics struct { - DeprecatedScopeMetrics []*ScopeMetrics `protobuf:"bytes,1000,rep,name=deprecated_scope_metrics,json=deprecatedScopeMetrics,proto3" json:"deprecated_scope_metrics,omitempty"` - // The resource for the metrics 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"` - // A list of metrics that originate from a resource. - ScopeMetrics []*ScopeMetrics `protobuf:"bytes,2,rep,name=scope_metrics,json=scopeMetrics,proto3" json:"scope_metrics,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_metrics" 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 (m *ResourceMetrics) Reset() { *m = ResourceMetrics{} } -func (m *ResourceMetrics) String() string { return proto.CompactTextString(m) } -func (*ResourceMetrics) ProtoMessage() {} -func (*ResourceMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{1} -} -func (m *ResourceMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetrics.Merge(m, src) -} -func (m *ResourceMetrics) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetrics proto.InternalMessageInfo - -func (m *ResourceMetrics) GetDeprecatedScopeMetrics() []*ScopeMetrics { - if m != nil { - return m.DeprecatedScopeMetrics - } - return nil -} - -func (m *ResourceMetrics) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceMetrics) GetScopeMetrics() []*ScopeMetrics { - if m != nil { - return m.ScopeMetrics - } - return nil -} - -func (m *ResourceMetrics) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Metrics produced by an Scope. -type ScopeMetrics struct { - // The instrumentation scope information for the metrics 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"` - // A list of metrics that originate from an instrumentation library. - Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the metric 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 metrics in the "metrics" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeMetrics) Reset() { *m = ScopeMetrics{} } -func (m *ScopeMetrics) String() string { return proto.CompactTextString(m) } -func (*ScopeMetrics) ProtoMessage() {} -func (*ScopeMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{2} -} -func (m *ScopeMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeMetrics.Merge(m, src) -} -func (m *ScopeMetrics) XXX_Size() int { - return m.Size() -} -func (m *ScopeMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeMetrics proto.InternalMessageInfo - -func (m *ScopeMetrics) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeMetrics) GetMetrics() []*Metric { - if m != nil { - return m.Metrics - } - return nil -} - -func (m *ScopeMetrics) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// Defines a Metric which has one or more timeseries. The following is a -// brief summary of the Metric data model. For more details, see: -// -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md -// -// The data model and relation between entities is shown in the -// diagram below. Here, "DataPoint" is the term used to refer to any -// one of the specific data point value types, and "points" is the term used -// to refer to any one of the lists of points contained in the Metric. -// -// - Metric is composed of a metadata and data. -// -// - Metadata part contains a name, description, unit. -// -// - Data is one of the possible types (Sum, Gauge, Histogram, Summary). -// -// - DataPoint contains timestamps, attributes, and one of the possible value type -// fields. -// -// Metric -// +------------+ -// |name | -// |description | -// |unit | +------------------------------------+ -// |data |---> |Gauge, Sum, Histogram, Summary, ... | -// +------------+ +------------------------------------+ -// -// Data [One of Gauge, Sum, Histogram, Summary, ...] -// +-----------+ -// |... | // Metadata about the Data. -// |points |--+ -// +-----------+ | -// | +---------------------------+ -// | |DataPoint 1 | -// v |+------+------+ +------+ | -// +-----+ ||label |label |...|label | | -// | 1 |-->||value1|value2|...|valueN| | -// +-----+ |+------+------+ +------+ | -// | . | |+-----+ | -// | . | ||value| | -// | . | |+-----+ | -// | . | +---------------------------+ -// | . | . -// | . | . -// | . | . -// | . | +---------------------------+ -// | . | |DataPoint M | -// +-----+ |+------+------+ +------+ | -// | M |-->||label |label |...|label | | -// +-----+ ||value1|value2|...|valueN| | -// |+------+------+ +------+ | -// |+-----+ | -// ||value| | -// |+-----+ | -// +---------------------------+ -// -// Each distinct type of DataPoint represents the output of a specific -// aggregation function, the result of applying the DataPoint's -// associated function of to one or more measurements. -// -// All DataPoint types have three common fields: -// - Attributes includes key-value pairs associated with the data point -// - TimeUnixNano is required, set to the end time of the aggregation -// - StartTimeUnixNano is optional, but strongly encouraged for DataPoints -// having an AggregationTemporality field, as discussed below. -// -// Both TimeUnixNano and StartTimeUnixNano values are expressed as -// UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. -// -// # TimeUnixNano -// -// This field is required, having consistent interpretation across -// DataPoint types. TimeUnixNano is the moment corresponding to when -// the data point's aggregate value was captured. -// -// Data points with the 0 value for TimeUnixNano SHOULD be rejected -// by consumers. -// -// # StartTimeUnixNano -// -// StartTimeUnixNano in general allows detecting when a sequence of -// observations is unbroken. This field indicates to consumers the -// start time for points with cumulative and delta -// AggregationTemporality, and it should be included whenever possible -// to support correct rate calculation. Although it may be omitted -// when the start time is truly unknown, setting StartTimeUnixNano is -// strongly encouraged. -type Metric struct { - // name of the metric. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // description of the metric, which can be used in documentation. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // unit in which the metric value is reported. Follows the format - // described by https://unitsofmeasure.org/ucum.html. - Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` - // Data determines the aggregation type (if any) of the metric, what is the - // reported value type for the data points, as well as the relatationship to - // the time interval over which they are reported. - // - // Types that are valid to be assigned to Data: - // *Metric_Gauge - // *Metric_Sum - // *Metric_Histogram - // *Metric_ExponentialHistogram - // *Metric_Summary - Data isMetric_Data `protobuf_oneof:"data"` - // Additional metadata attributes that describe the metric. [Optional]. - // Attributes are non-identifying. - // Consumers SHOULD NOT need to be aware of these attributes. - // These attributes MAY be used to encode information allowing - // for lossless roundtrip translation to / from another data model. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Metadata []v11.KeyValue `protobuf:"bytes,12,rep,name=metadata,proto3" json:"metadata"` -} - -func (m *Metric) Reset() { *m = Metric{} } -func (m *Metric) String() string { return proto.CompactTextString(m) } -func (*Metric) ProtoMessage() {} -func (*Metric) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{3} -} -func (m *Metric) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metric.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Metric) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metric.Merge(m, src) -} -func (m *Metric) XXX_Size() int { - return m.Size() -} -func (m *Metric) XXX_DiscardUnknown() { - xxx_messageInfo_Metric.DiscardUnknown(m) -} - -var xxx_messageInfo_Metric proto.InternalMessageInfo - -type isMetric_Data interface { - isMetric_Data() - MarshalTo([]byte) (int, error) - Size() int -} - -type Metric_Gauge struct { - Gauge *Gauge `protobuf:"bytes,5,opt,name=gauge,proto3,oneof" json:"gauge,omitempty"` -} -type Metric_Sum struct { - Sum *Sum `protobuf:"bytes,7,opt,name=sum,proto3,oneof" json:"sum,omitempty"` -} -type Metric_Histogram struct { - Histogram *Histogram `protobuf:"bytes,9,opt,name=histogram,proto3,oneof" json:"histogram,omitempty"` -} -type Metric_ExponentialHistogram struct { - ExponentialHistogram *ExponentialHistogram `protobuf:"bytes,10,opt,name=exponential_histogram,json=exponentialHistogram,proto3,oneof" json:"exponential_histogram,omitempty"` -} -type Metric_Summary struct { - Summary *Summary `protobuf:"bytes,11,opt,name=summary,proto3,oneof" json:"summary,omitempty"` -} - -func (*Metric_Gauge) isMetric_Data() {} -func (*Metric_Sum) isMetric_Data() {} -func (*Metric_Histogram) isMetric_Data() {} -func (*Metric_ExponentialHistogram) isMetric_Data() {} -func (*Metric_Summary) isMetric_Data() {} - -func (m *Metric) GetData() isMetric_Data { - if m != nil { - return m.Data - } - return nil -} - -func (m *Metric) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Metric) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Metric) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *Metric) GetGauge() *Gauge { - if x, ok := m.GetData().(*Metric_Gauge); ok { - return x.Gauge - } - return nil -} - -func (m *Metric) GetSum() *Sum { - if x, ok := m.GetData().(*Metric_Sum); ok { - return x.Sum - } - return nil -} - -func (m *Metric) GetHistogram() *Histogram { - if x, ok := m.GetData().(*Metric_Histogram); ok { - return x.Histogram - } - return nil -} - -func (m *Metric) GetExponentialHistogram() *ExponentialHistogram { - if x, ok := m.GetData().(*Metric_ExponentialHistogram); ok { - return x.ExponentialHistogram - } - return nil -} - -func (m *Metric) GetSummary() *Summary { - if x, ok := m.GetData().(*Metric_Summary); ok { - return x.Summary - } - return nil -} - -func (m *Metric) GetMetadata() []v11.KeyValue { - if m != nil { - return m.Metadata - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Metric) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Metric_Gauge)(nil), - (*Metric_Sum)(nil), - (*Metric_Histogram)(nil), - (*Metric_ExponentialHistogram)(nil), - (*Metric_Summary)(nil), - } -} - -// Gauge represents the type of a scalar metric that always exports the -// "current value" for every data point. It should be used for an "unknown" -// aggregation. -// -// A Gauge does not support different aggregation temporalities. Given the -// aggregation is unknown, points cannot be combined using the same -// aggregation, regardless of aggregation temporalities. Therefore, -// AggregationTemporality is not included. Consequently, this also means -// "StartTimeUnixNano" is ignored for all data points. -type Gauge struct { - DataPoints []*NumberDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` -} - -func (m *Gauge) Reset() { *m = Gauge{} } -func (m *Gauge) String() string { return proto.CompactTextString(m) } -func (*Gauge) ProtoMessage() {} -func (*Gauge) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{4} -} -func (m *Gauge) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Gauge.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Gauge) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gauge.Merge(m, src) -} -func (m *Gauge) XXX_Size() int { - return m.Size() -} -func (m *Gauge) XXX_DiscardUnknown() { - xxx_messageInfo_Gauge.DiscardUnknown(m) -} - -var xxx_messageInfo_Gauge proto.InternalMessageInfo - -func (m *Gauge) GetDataPoints() []*NumberDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -// Sum represents the type of a scalar metric that is calculated as a sum of all -// reported measurements over a time interval. -type Sum struct { - DataPoints []*NumberDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` - // If "true" means that the sum is monotonic. - IsMonotonic bool `protobuf:"varint,3,opt,name=is_monotonic,json=isMonotonic,proto3" json:"is_monotonic,omitempty"` -} - -func (m *Sum) Reset() { *m = Sum{} } -func (m *Sum) String() string { return proto.CompactTextString(m) } -func (*Sum) ProtoMessage() {} -func (*Sum) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{5} -} -func (m *Sum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Sum.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Sum) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sum.Merge(m, src) -} -func (m *Sum) XXX_Size() int { - return m.Size() -} -func (m *Sum) XXX_DiscardUnknown() { - xxx_messageInfo_Sum.DiscardUnknown(m) -} - -var xxx_messageInfo_Sum proto.InternalMessageInfo - -func (m *Sum) GetDataPoints() []*NumberDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *Sum) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -func (m *Sum) GetIsMonotonic() bool { - if m != nil { - return m.IsMonotonic - } - return false -} - -// Histogram represents the type of a metric that is calculated by aggregating -// as a Histogram of all reported measurements over a time interval. -type Histogram struct { - DataPoints []*HistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` -} - -func (m *Histogram) Reset() { *m = Histogram{} } -func (m *Histogram) String() string { return proto.CompactTextString(m) } -func (*Histogram) ProtoMessage() {} -func (*Histogram) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6} -} -func (m *Histogram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Histogram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Histogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_Histogram.Merge(m, src) -} -func (m *Histogram) XXX_Size() int { - return m.Size() -} -func (m *Histogram) XXX_DiscardUnknown() { - xxx_messageInfo_Histogram.DiscardUnknown(m) -} - -var xxx_messageInfo_Histogram proto.InternalMessageInfo - -func (m *Histogram) GetDataPoints() []*HistogramDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *Histogram) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// ExponentialHistogram represents the type of a metric that is calculated by aggregating -// as a ExponentialHistogram of all reported double measurements over a time interval. -type ExponentialHistogram struct { - DataPoints []*ExponentialHistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` -} - -func (m *ExponentialHistogram) Reset() { *m = ExponentialHistogram{} } -func (m *ExponentialHistogram) String() string { return proto.CompactTextString(m) } -func (*ExponentialHistogram) ProtoMessage() {} -func (*ExponentialHistogram) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{7} -} -func (m *ExponentialHistogram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExponentialHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExponentialHistogram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExponentialHistogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExponentialHistogram.Merge(m, src) -} -func (m *ExponentialHistogram) XXX_Size() int { - return m.Size() -} -func (m *ExponentialHistogram) XXX_DiscardUnknown() { - xxx_messageInfo_ExponentialHistogram.DiscardUnknown(m) -} - -var xxx_messageInfo_ExponentialHistogram proto.InternalMessageInfo - -func (m *ExponentialHistogram) GetDataPoints() []*ExponentialHistogramDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *ExponentialHistogram) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// Summary metric data are used to convey quantile summaries, -// a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) -// and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) -// data type. These data points cannot always be merged in a meaningful way. -// While they can be useful in some applications, histogram data points are -// recommended for new applications. -// Summary metrics do not have an aggregation temporality field. This is -// because the count and sum fields of a SummaryDataPoint are assumed to be -// cumulative values. -type Summary struct { - DataPoints []*SummaryDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` -} - -func (m *Summary) Reset() { *m = Summary{} } -func (m *Summary) String() string { return proto.CompactTextString(m) } -func (*Summary) ProtoMessage() {} -func (*Summary) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{8} -} -func (m *Summary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Summary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Summary) XXX_Merge(src proto.Message) { - xxx_messageInfo_Summary.Merge(m, src) -} -func (m *Summary) XXX_Size() int { - return m.Size() -} -func (m *Summary) XXX_DiscardUnknown() { - xxx_messageInfo_Summary.DiscardUnknown(m) -} - -var xxx_messageInfo_Summary proto.InternalMessageInfo - -func (m *Summary) GetDataPoints() []*SummaryDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -// NumberDataPoint is a single data point in a timeseries that describes the -// time-varying scalar value of a metric. -type NumberDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,7,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // The value itself. A point is considered invalid when one of the recognized - // value fields is not present inside this oneof. - // - // Types that are valid to be assigned to Value: - // *NumberDataPoint_AsDouble - // *NumberDataPoint_AsInt - Value isNumberDataPoint_Value `protobuf_oneof:"value"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []Exemplar `protobuf:"bytes,5,rep,name=exemplars,proto3" json:"exemplars"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` -} - -func (m *NumberDataPoint) Reset() { *m = NumberDataPoint{} } -func (m *NumberDataPoint) String() string { return proto.CompactTextString(m) } -func (*NumberDataPoint) ProtoMessage() {} -func (*NumberDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{9} -} -func (m *NumberDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NumberDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NumberDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NumberDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_NumberDataPoint.Merge(m, src) -} -func (m *NumberDataPoint) XXX_Size() int { - return m.Size() -} -func (m *NumberDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_NumberDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_NumberDataPoint proto.InternalMessageInfo - -type isNumberDataPoint_Value interface { - isNumberDataPoint_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type NumberDataPoint_AsDouble struct { - AsDouble float64 `protobuf:"fixed64,4,opt,name=as_double,json=asDouble,proto3,oneof" json:"as_double,omitempty"` -} -type NumberDataPoint_AsInt struct { - AsInt int64 `protobuf:"fixed64,6,opt,name=as_int,json=asInt,proto3,oneof" json:"as_int,omitempty"` -} - -func (*NumberDataPoint_AsDouble) isNumberDataPoint_Value() {} -func (*NumberDataPoint_AsInt) isNumberDataPoint_Value() {} - -func (m *NumberDataPoint) GetValue() isNumberDataPoint_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *NumberDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *NumberDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *NumberDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *NumberDataPoint) GetAsDouble() float64 { - if x, ok := m.GetValue().(*NumberDataPoint_AsDouble); ok { - return x.AsDouble - } - return 0 -} - -func (m *NumberDataPoint) GetAsInt() int64 { - if x, ok := m.GetValue().(*NumberDataPoint_AsInt); ok { - return x.AsInt - } - return 0 -} - -func (m *NumberDataPoint) GetExemplars() []Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -func (m *NumberDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*NumberDataPoint) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*NumberDataPoint_AsDouble)(nil), - (*NumberDataPoint_AsInt)(nil), - } -} - -// HistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Histogram. A Histogram contains summary statistics -// for a population of values, it may optionally contain the distribution of -// those values across a set of buckets. -// -// If the histogram contains the distribution of values, then both -// "explicit_bounds" and "bucket counts" fields must be defined. -// If the histogram does not contain the distribution of values, then both -// "explicit_bounds" and "bucket_counts" must be omitted and only "count" and -// "sum" are known. -type HistogramDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // 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"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be non-negative. This - // value must be equal to the sum of the "count" fields in buckets if a - // histogram is provided. - Count uint64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram - // - // Types that are valid to be assigned to Sum_: - // *HistogramDataPoint_Sum - Sum_ isHistogramDataPoint_Sum_ `protobuf_oneof:"sum_"` - // bucket_counts is an optional field contains the count values of histogram - // for each bucket. - // - // The sum of the bucket_counts must equal the value in the count field. - // - // The number of elements in bucket_counts array must be by one greater than - // the number of elements in explicit_bounds array. The exception to this rule - // is when the length of bucket_counts is 0, then the length of explicit_bounds - // must also be 0. - BucketCounts []uint64 `protobuf:"fixed64,6,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` - // explicit_bounds specifies buckets with explicitly defined bounds for values. - // - // The boundaries for bucket at index i are: - // - // (-infinity, explicit_bounds[i]] for i == 0 - // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) - // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) - // - // The values in the explicit_bounds array must be strictly increasing. - // - // Histogram buckets are inclusive of their upper boundary, except the last - // bucket where the boundary is at infinity. This format is intentionally - // compatible with the OpenMetrics histogram definition. - // - // If bucket_counts length is 0 then explicit_bounds length must also be 0, - // otherwise the data point is invalid. - ExplicitBounds []float64 `protobuf:"fixed64,7,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []Exemplar `protobuf:"bytes,8,rep,name=exemplars,proto3" json:"exemplars"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` - // min is the minimum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Min_: - // *HistogramDataPoint_Min - Min_ isHistogramDataPoint_Min_ `protobuf_oneof:"min_"` - // max is the maximum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Max_: - // *HistogramDataPoint_Max - Max_ isHistogramDataPoint_Max_ `protobuf_oneof:"max_"` -} - -func (m *HistogramDataPoint) Reset() { *m = HistogramDataPoint{} } -func (m *HistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*HistogramDataPoint) ProtoMessage() {} -func (*HistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{10} -} -func (m *HistogramDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HistogramDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint.Merge(m, src) -} -func (m *HistogramDataPoint) XXX_Size() int { - return m.Size() -} -func (m *HistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_HistogramDataPoint proto.InternalMessageInfo - -type isHistogramDataPoint_Sum_ interface { - isHistogramDataPoint_Sum_() - MarshalTo([]byte) (int, error) - Size() int -} -type isHistogramDataPoint_Min_ interface { - isHistogramDataPoint_Min_() - MarshalTo([]byte) (int, error) - Size() int -} -type isHistogramDataPoint_Max_ interface { - isHistogramDataPoint_Max_() - MarshalTo([]byte) (int, error) - Size() int -} - -type HistogramDataPoint_Sum struct { - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3,oneof" json:"sum,omitempty"` -} -type HistogramDataPoint_Min struct { - Min float64 `protobuf:"fixed64,11,opt,name=min,proto3,oneof" json:"min,omitempty"` -} -type HistogramDataPoint_Max struct { - Max float64 `protobuf:"fixed64,12,opt,name=max,proto3,oneof" json:"max,omitempty"` -} - -func (*HistogramDataPoint_Sum) isHistogramDataPoint_Sum_() {} -func (*HistogramDataPoint_Min) isHistogramDataPoint_Min_() {} -func (*HistogramDataPoint_Max) isHistogramDataPoint_Max_() {} - -func (m *HistogramDataPoint) GetSum_() isHistogramDataPoint_Sum_ { - if m != nil { - return m.Sum_ - } - return nil -} -func (m *HistogramDataPoint) GetMin_() isHistogramDataPoint_Min_ { - if m != nil { - return m.Min_ - } - return nil -} -func (m *HistogramDataPoint) GetMax_() isHistogramDataPoint_Max_ { - if m != nil { - return m.Max_ - } - return nil -} - -func (m *HistogramDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *HistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *HistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *HistogramDataPoint) GetSum() float64 { - if x, ok := m.GetSum_().(*HistogramDataPoint_Sum); ok { - return x.Sum - } - return 0 -} - -func (m *HistogramDataPoint) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -func (m *HistogramDataPoint) GetExplicitBounds() []float64 { - if m != nil { - return m.ExplicitBounds - } - return nil -} - -func (m *HistogramDataPoint) GetExemplars() []Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -func (m *HistogramDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *HistogramDataPoint) GetMin() float64 { - if x, ok := m.GetMin_().(*HistogramDataPoint_Min); ok { - return x.Min - } - return 0 -} - -func (m *HistogramDataPoint) GetMax() float64 { - if x, ok := m.GetMax_().(*HistogramDataPoint_Max); ok { - return x.Max - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*HistogramDataPoint) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*HistogramDataPoint_Sum)(nil), - (*HistogramDataPoint_Min)(nil), - (*HistogramDataPoint_Max)(nil), - } -} - -// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains -// summary statistics for a population of values, it may optionally contain the -// distribution of those values across a set of buckets. -type ExponentialHistogramDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be - // non-negative. This value must be equal to the sum of the "bucket_counts" - // values in the positive and negative Buckets plus the "zero_count" field. - Count uint64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram - // - // Types that are valid to be assigned to Sum_: - // *ExponentialHistogramDataPoint_Sum - Sum_ isExponentialHistogramDataPoint_Sum_ `protobuf_oneof:"sum_"` - // scale describes the resolution of the histogram. Boundaries are - // located at powers of the base, where: - // - // base = (2^(2^-scale)) - // - // The histogram bucket identified by `index`, a signed integer, - // contains values that are greater than (base^index) and - // less than or equal to (base^(index+1)). - // - // The positive and negative ranges of the histogram are expressed - // separately. Negative values are mapped by their absolute value - // into the negative range using the same scale as the positive range. - // - // scale is not restricted by the protocol, as the permissible - // values depend on the range of the data. - Scale int32 `protobuf:"zigzag32,6,opt,name=scale,proto3" json:"scale,omitempty"` - // zero_count is the count of values that are either exactly zero or - // within the region considered zero by the instrumentation at the - // tolerated degree of precision. This bucket stores values that - // cannot be expressed using the standard exponential formula as - // well as values that have been rounded to zero. - // - // Implementations MAY consider the zero bucket to have probability - // mass equal to (zero_count / count). - ZeroCount uint64 `protobuf:"fixed64,7,opt,name=zero_count,json=zeroCount,proto3" json:"zero_count,omitempty"` - // positive carries the positive range of exponential bucket counts. - Positive ExponentialHistogramDataPoint_Buckets `protobuf:"bytes,8,opt,name=positive,proto3" json:"positive"` - // negative carries the negative range of exponential bucket counts. - Negative ExponentialHistogramDataPoint_Buckets `protobuf:"bytes,9,opt,name=negative,proto3" json:"negative"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []Exemplar `protobuf:"bytes,11,rep,name=exemplars,proto3" json:"exemplars"` - // min is the minimum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Min_: - // *ExponentialHistogramDataPoint_Min - Min_ isExponentialHistogramDataPoint_Min_ `protobuf_oneof:"min_"` - // max is the maximum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Max_: - // *ExponentialHistogramDataPoint_Max - Max_ isExponentialHistogramDataPoint_Max_ `protobuf_oneof:"max_"` - // ZeroThreshold may be optionally set to convey the width of the zero - // region. Where the zero region is defined as the closed interval - // [-ZeroThreshold, ZeroThreshold]. - // When ZeroThreshold is 0, zero count bucket stores values that cannot be - // expressed using the standard exponential formula as well as values that - // have been rounded to zero. - ZeroThreshold float64 `protobuf:"fixed64,14,opt,name=zero_threshold,json=zeroThreshold,proto3" json:"zero_threshold,omitempty"` -} - -func (m *ExponentialHistogramDataPoint) Reset() { *m = ExponentialHistogramDataPoint{} } -func (m *ExponentialHistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*ExponentialHistogramDataPoint) ProtoMessage() {} -func (*ExponentialHistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{11} -} -func (m *ExponentialHistogramDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExponentialHistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExponentialHistogramDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExponentialHistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExponentialHistogramDataPoint.Merge(m, src) -} -func (m *ExponentialHistogramDataPoint) XXX_Size() int { - return m.Size() -} -func (m *ExponentialHistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_ExponentialHistogramDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_ExponentialHistogramDataPoint proto.InternalMessageInfo - -type isExponentialHistogramDataPoint_Sum_ interface { - isExponentialHistogramDataPoint_Sum_() - MarshalTo([]byte) (int, error) - Size() int -} -type isExponentialHistogramDataPoint_Min_ interface { - isExponentialHistogramDataPoint_Min_() - MarshalTo([]byte) (int, error) - Size() int -} -type isExponentialHistogramDataPoint_Max_ interface { - isExponentialHistogramDataPoint_Max_() - MarshalTo([]byte) (int, error) - Size() int -} - -type ExponentialHistogramDataPoint_Sum struct { - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3,oneof" json:"sum,omitempty"` -} -type ExponentialHistogramDataPoint_Min struct { - Min float64 `protobuf:"fixed64,12,opt,name=min,proto3,oneof" json:"min,omitempty"` -} -type ExponentialHistogramDataPoint_Max struct { - Max float64 `protobuf:"fixed64,13,opt,name=max,proto3,oneof" json:"max,omitempty"` -} - -func (*ExponentialHistogramDataPoint_Sum) isExponentialHistogramDataPoint_Sum_() {} -func (*ExponentialHistogramDataPoint_Min) isExponentialHistogramDataPoint_Min_() {} -func (*ExponentialHistogramDataPoint_Max) isExponentialHistogramDataPoint_Max_() {} - -func (m *ExponentialHistogramDataPoint) GetSum_() isExponentialHistogramDataPoint_Sum_ { - if m != nil { - return m.Sum_ - } - return nil -} -func (m *ExponentialHistogramDataPoint) GetMin_() isExponentialHistogramDataPoint_Min_ { - if m != nil { - return m.Min_ - } - return nil -} -func (m *ExponentialHistogramDataPoint) GetMax_() isExponentialHistogramDataPoint_Max_ { - if m != nil { - return m.Max_ - } - return nil -} - -func (m *ExponentialHistogramDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *ExponentialHistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetSum() float64 { - if x, ok := m.GetSum_().(*ExponentialHistogramDataPoint_Sum); ok { - return x.Sum - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetScale() int32 { - if m != nil { - return m.Scale - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetZeroCount() uint64 { - if m != nil { - return m.ZeroCount - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetPositive() ExponentialHistogramDataPoint_Buckets { - if m != nil { - return m.Positive - } - return ExponentialHistogramDataPoint_Buckets{} -} - -func (m *ExponentialHistogramDataPoint) GetNegative() ExponentialHistogramDataPoint_Buckets { - if m != nil { - return m.Negative - } - return ExponentialHistogramDataPoint_Buckets{} -} - -func (m *ExponentialHistogramDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetExemplars() []Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -func (m *ExponentialHistogramDataPoint) GetMin() float64 { - if x, ok := m.GetMin_().(*ExponentialHistogramDataPoint_Min); ok { - return x.Min - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetMax() float64 { - if x, ok := m.GetMax_().(*ExponentialHistogramDataPoint_Max); ok { - return x.Max - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetZeroThreshold() float64 { - if m != nil { - return m.ZeroThreshold - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ExponentialHistogramDataPoint) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ExponentialHistogramDataPoint_Sum)(nil), - (*ExponentialHistogramDataPoint_Min)(nil), - (*ExponentialHistogramDataPoint_Max)(nil), - } -} - -// Buckets are a set of bucket counts, encoded in a contiguous array -// of counts. -type ExponentialHistogramDataPoint_Buckets struct { - // Offset is the bucket index of the first entry in the bucket_counts array. - // - // Note: This uses a varint encoding as a simple form of compression. - Offset int32 `protobuf:"zigzag32,1,opt,name=offset,proto3" json:"offset,omitempty"` - // bucket_counts is an array of count values, where bucket_counts[i] carries - // the count of the bucket at index (offset+i). bucket_counts[i] is the count - // of values greater than base^(offset+i) and less than or equal to - // base^(offset+i+1). - // - // Note: By contrast, the explicit HistogramDataPoint uses - // fixed64. This field is expected to have many buckets, - // especially zeros, so uint64 has been selected to ensure - // varint encoding. - BucketCounts []uint64 `protobuf:"varint,2,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` -} - -func (m *ExponentialHistogramDataPoint_Buckets) Reset() { *m = ExponentialHistogramDataPoint_Buckets{} } -func (m *ExponentialHistogramDataPoint_Buckets) String() string { return proto.CompactTextString(m) } -func (*ExponentialHistogramDataPoint_Buckets) ProtoMessage() {} -func (*ExponentialHistogramDataPoint_Buckets) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{11, 0} -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExponentialHistogramDataPoint_Buckets.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExponentialHistogramDataPoint_Buckets.Merge(m, src) -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Size() int { - return m.Size() -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_DiscardUnknown() { - xxx_messageInfo_ExponentialHistogramDataPoint_Buckets.DiscardUnknown(m) -} - -var xxx_messageInfo_ExponentialHistogramDataPoint_Buckets proto.InternalMessageInfo - -func (m *ExponentialHistogramDataPoint_Buckets) GetOffset() int32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *ExponentialHistogramDataPoint_Buckets) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -// SummaryDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Summary metric. The count and sum fields represent -// cumulative values. -type SummaryDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,7,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be non-negative. - Count uint64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` - // (Optional) list of values at different quantiles of the distribution calculated - // from the current snapshot. The quantiles must be strictly increasing. - QuantileValues []*SummaryDataPoint_ValueAtQuantile `protobuf:"bytes,6,rep,name=quantile_values,json=quantileValues,proto3" json:"quantile_values,omitempty"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` -} - -func (m *SummaryDataPoint) Reset() { *m = SummaryDataPoint{} } -func (m *SummaryDataPoint) String() string { return proto.CompactTextString(m) } -func (*SummaryDataPoint) ProtoMessage() {} -func (*SummaryDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{12} -} -func (m *SummaryDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SummaryDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SummaryDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SummaryDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint.Merge(m, src) -} -func (m *SummaryDataPoint) XXX_Size() int { - return m.Size() -} -func (m *SummaryDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_SummaryDataPoint proto.InternalMessageInfo - -func (m *SummaryDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *SummaryDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *SummaryDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *SummaryDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *SummaryDataPoint) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 -} - -func (m *SummaryDataPoint) GetQuantileValues() []*SummaryDataPoint_ValueAtQuantile { - if m != nil { - return m.QuantileValues - } - return nil -} - -func (m *SummaryDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -// Represents the value at a given quantile of a distribution. -// -// To record Min and Max values following conventions are used: -// - The 1.0 quantile is equivalent to the maximum value observed. -// - The 0.0 quantile is equivalent to the minimum value observed. -// -// See the following issue for more context: -// https://github.com/open-telemetry/opentelemetry-proto/issues/125 -type SummaryDataPoint_ValueAtQuantile struct { - // The quantile of a distribution. Must be in the interval - // [0.0, 1.0]. - Quantile float64 `protobuf:"fixed64,1,opt,name=quantile,proto3" json:"quantile,omitempty"` - // The value at the given quantile of a distribution. - // - // Quantile values must NOT be negative. - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *SummaryDataPoint_ValueAtQuantile) Reset() { *m = SummaryDataPoint_ValueAtQuantile{} } -func (m *SummaryDataPoint_ValueAtQuantile) String() string { return proto.CompactTextString(m) } -func (*SummaryDataPoint_ValueAtQuantile) ProtoMessage() {} -func (*SummaryDataPoint_ValueAtQuantile) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{12, 0} -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SummaryDataPoint_ValueAtQuantile.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint_ValueAtQuantile.Merge(m, src) -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Size() int { - return m.Size() -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint_ValueAtQuantile.DiscardUnknown(m) -} - -var xxx_messageInfo_SummaryDataPoint_ValueAtQuantile proto.InternalMessageInfo - -func (m *SummaryDataPoint_ValueAtQuantile) GetQuantile() float64 { - if m != nil { - return m.Quantile - } - return 0 -} - -func (m *SummaryDataPoint_ValueAtQuantile) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -// A representation of an exemplar, which is a sample input measurement. -// Exemplars also hold information about the environment when the measurement -// was recorded, for example the span and trace ID of the active span when the -// exemplar was recorded. -type Exemplar struct { - // The set of key/value pairs that were filtered out by the aggregator, but - // recorded alongside the original measurement. Only key/value pairs that were - // filtered out by the aggregator should be included - FilteredAttributes []v11.KeyValue `protobuf:"bytes,7,rep,name=filtered_attributes,json=filteredAttributes,proto3" json:"filtered_attributes"` - // time_unix_nano is the exact time when this exemplar was recorded - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // The value of the measurement that was recorded. An exemplar is - // considered invalid when one of the recognized value fields is not present - // inside this oneof. - // - // Types that are valid to be assigned to Value: - // *Exemplar_AsDouble - // *Exemplar_AsInt - Value isExemplar_Value `protobuf_oneof:"value"` - // (Optional) Span ID of the exemplar trace. - // span_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,4,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // (Optional) Trace ID of the exemplar trace. - // trace_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,5,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` -} - -func (m *Exemplar) Reset() { *m = Exemplar{} } -func (m *Exemplar) String() string { return proto.CompactTextString(m) } -func (*Exemplar) ProtoMessage() {} -func (*Exemplar) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{13} -} -func (m *Exemplar) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Exemplar.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Exemplar) XXX_Merge(src proto.Message) { - xxx_messageInfo_Exemplar.Merge(m, src) -} -func (m *Exemplar) XXX_Size() int { - return m.Size() -} -func (m *Exemplar) XXX_DiscardUnknown() { - xxx_messageInfo_Exemplar.DiscardUnknown(m) -} - -var xxx_messageInfo_Exemplar proto.InternalMessageInfo - -type isExemplar_Value interface { - isExemplar_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type Exemplar_AsDouble struct { - AsDouble float64 `protobuf:"fixed64,3,opt,name=as_double,json=asDouble,proto3,oneof" json:"as_double,omitempty"` -} -type Exemplar_AsInt struct { - AsInt int64 `protobuf:"fixed64,6,opt,name=as_int,json=asInt,proto3,oneof" json:"as_int,omitempty"` -} - -func (*Exemplar_AsDouble) isExemplar_Value() {} -func (*Exemplar_AsInt) isExemplar_Value() {} - -func (m *Exemplar) GetValue() isExemplar_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *Exemplar) GetFilteredAttributes() []v11.KeyValue { - if m != nil { - return m.FilteredAttributes - } - return nil -} - -func (m *Exemplar) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *Exemplar) GetAsDouble() float64 { - if x, ok := m.GetValue().(*Exemplar_AsDouble); ok { - return x.AsDouble - } - return 0 -} - -func (m *Exemplar) GetAsInt() int64 { - if x, ok := m.GetValue().(*Exemplar_AsInt); ok { - return x.AsInt - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Exemplar) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Exemplar_AsDouble)(nil), - (*Exemplar_AsInt)(nil), - } -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.metrics.v1.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) - proto.RegisterEnum("opentelemetry.proto.metrics.v1.DataPointFlags", DataPointFlags_name, DataPointFlags_value) - proto.RegisterType((*MetricsData)(nil), "opentelemetry.proto.metrics.v1.MetricsData") - proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") - proto.RegisterType((*ScopeMetrics)(nil), "opentelemetry.proto.metrics.v1.ScopeMetrics") - proto.RegisterType((*Metric)(nil), "opentelemetry.proto.metrics.v1.Metric") - proto.RegisterType((*Gauge)(nil), "opentelemetry.proto.metrics.v1.Gauge") - proto.RegisterType((*Sum)(nil), "opentelemetry.proto.metrics.v1.Sum") - proto.RegisterType((*Histogram)(nil), "opentelemetry.proto.metrics.v1.Histogram") - proto.RegisterType((*ExponentialHistogram)(nil), "opentelemetry.proto.metrics.v1.ExponentialHistogram") - proto.RegisterType((*Summary)(nil), "opentelemetry.proto.metrics.v1.Summary") - proto.RegisterType((*NumberDataPoint)(nil), "opentelemetry.proto.metrics.v1.NumberDataPoint") - proto.RegisterType((*HistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint") - proto.RegisterType((*ExponentialHistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint") - proto.RegisterType((*ExponentialHistogramDataPoint_Buckets)(nil), "opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets") - proto.RegisterType((*SummaryDataPoint)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint") - proto.RegisterType((*SummaryDataPoint_ValueAtQuantile)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile") - proto.RegisterType((*Exemplar)(nil), "opentelemetry.proto.metrics.v1.Exemplar") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/metrics/v1/metrics.proto", fileDescriptor_3c3112f9fa006917) -} - -var fileDescriptor_3c3112f9fa006917 = []byte{ - // 1568 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x4f, 0x1b, 0x49, - 0x16, 0x77, 0xfb, 0xdb, 0xcf, 0x06, 0x9c, 0x5a, 0x96, 0xb4, 0x58, 0xe1, 0x38, 0xce, 0x26, 0xb0, - 0xd9, 0xc8, 0x5e, 0xc8, 0x6a, 0x3f, 0x0e, 0x91, 0x62, 0x63, 0x03, 0x26, 0x80, 0x49, 0xd9, 0x20, - 0x25, 0x8a, 0xd2, 0x2a, 0xec, 0xc2, 0xb4, 0xd2, 0xdd, 0xe5, 0xed, 0xae, 0x46, 0xb0, 0xff, 0xc1, - 0x4a, 0x7b, 0xc8, 0xdf, 0xb1, 0xca, 0x6d, 0x4f, 0x73, 0x9b, 0x63, 0x8e, 0x99, 0xdb, 0x68, 0x34, - 0x8a, 0x46, 0xe4, 0x30, 0x23, 0xcd, 0x3f, 0x31, 0xaa, 0xea, 0x6e, 0xfc, 0x81, 0x89, 0xc9, 0xc7, - 0x21, 0x39, 0xb9, 0xea, 0xd5, 0x7b, 0xbf, 0x7a, 0xaf, 0xde, 0xef, 0xd5, 0x2b, 0x37, 0xdc, 0x63, - 0x3d, 0x6a, 0x71, 0x6a, 0x50, 0x93, 0x72, 0xfb, 0xb4, 0xd4, 0xb3, 0x19, 0x67, 0x25, 0x31, 0xd6, - 0xdb, 0x4e, 0xe9, 0x78, 0x39, 0x18, 0x16, 0xe5, 0x02, 0xca, 0x0d, 0x69, 0x7b, 0xc2, 0x62, 0xa0, - 0x72, 0xbc, 0x3c, 0x3f, 0xdb, 0x65, 0x5d, 0xe6, 0x61, 0x88, 0x91, 0xa7, 0x30, 0x7f, 0x77, 0xdc, - 0x1e, 0x6d, 0x66, 0x9a, 0xcc, 0x12, 0x5b, 0x78, 0x23, 0x5f, 0xb7, 0x38, 0x4e, 0xd7, 0xa6, 0x0e, - 0x73, 0xed, 0x36, 0x15, 0xda, 0xc1, 0xd8, 0xd3, 0x2f, 0xe8, 0x90, 0xde, 0xf6, 0xf6, 0xaf, 0x12, - 0x4e, 0xd0, 0x53, 0xc8, 0x06, 0x0a, 0x9a, 0xef, 0x97, 0xaa, 0xe4, 0x23, 0x4b, 0xe9, 0x95, 0x52, - 0xf1, 0xfd, 0xbe, 0x17, 0xb1, 0x6f, 0xe7, 0xc3, 0xe1, 0x19, 0x7b, 0x58, 0x50, 0xf8, 0x26, 0x0c, - 0x33, 0x23, 0x4a, 0xa8, 0x0b, 0x6a, 0x87, 0xf6, 0x6c, 0xda, 0x26, 0x9c, 0x76, 0x34, 0xa7, 0xcd, - 0x7a, 0xfd, 0x7d, 0x7f, 0x49, 0xc8, 0x8d, 0xef, 0x4d, 0xda, 0xb8, 0x29, 0xac, 0x82, 0x5d, 0xe7, - 0xfa, 0x70, 0x83, 0x72, 0xf4, 0x08, 0x92, 0x81, 0x3f, 0xaa, 0x92, 0x57, 0x96, 0xd2, 0x2b, 0x7f, - 0x1a, 0x8b, 0x7b, 0x7e, 0x3c, 0x03, 0x11, 0x55, 0xa2, 0xaf, 0xdf, 0xde, 0x08, 0xe1, 0x73, 0x00, - 0xf4, 0x18, 0xa6, 0x86, 0x5d, 0x0d, 0x7f, 0x84, 0xa7, 0x19, 0x67, 0xd0, 0xbf, 0x05, 0x00, 0xa7, - 0x7d, 0x44, 0x4d, 0xa2, 0xb9, 0xb6, 0xa1, 0x46, 0xf2, 0xca, 0x52, 0x0a, 0xa7, 0x3c, 0xc9, 0x9e, - 0x6d, 0x14, 0xbe, 0x55, 0x20, 0x33, 0x14, 0x4f, 0x03, 0x62, 0xd2, 0xde, 0x0f, 0xe6, 0xfe, 0xd8, - 0xad, 0x7d, 0x66, 0x1c, 0x2f, 0x17, 0xeb, 0x96, 0xc3, 0x6d, 0xd7, 0xa4, 0x16, 0x27, 0x5c, 0x67, - 0x96, 0x84, 0xf2, 0xc3, 0xf2, 0x70, 0xd0, 0x43, 0x48, 0x0c, 0x47, 0x73, 0x67, 0x52, 0x34, 0x9e, - 0x2b, 0x38, 0x30, 0x9b, 0x14, 0xc2, 0xab, 0x28, 0xc4, 0x3d, 0x13, 0x84, 0x20, 0x6a, 0x11, 0xd3, - 0xf3, 0x3d, 0x85, 0xe5, 0x18, 0xe5, 0x21, 0xdd, 0xa1, 0x4e, 0xdb, 0xd6, 0x7b, 0xc2, 0x41, 0x35, - 0x2c, 0x97, 0x06, 0x45, 0xc2, 0xca, 0xb5, 0x74, 0xee, 0x23, 0xcb, 0x31, 0x7a, 0x00, 0xb1, 0x2e, - 0x71, 0xbb, 0x54, 0x8d, 0xc9, 0x63, 0xb8, 0x3d, 0xc9, 0xe7, 0x75, 0xa1, 0xbc, 0x11, 0xc2, 0x9e, - 0x15, 0xfa, 0x3b, 0x44, 0x1c, 0xd7, 0x54, 0x13, 0xd2, 0xf8, 0xd6, 0xc4, 0xf4, 0xb9, 0xe6, 0x46, - 0x08, 0x0b, 0x0b, 0x54, 0x87, 0xd4, 0x91, 0xee, 0x70, 0xd6, 0xb5, 0x89, 0xa9, 0xa6, 0xde, 0xc3, - 0xa7, 0x01, 0xf3, 0x8d, 0xc0, 0x60, 0x23, 0x84, 0xfb, 0xd6, 0xe8, 0x05, 0xfc, 0x9e, 0x9e, 0xf4, - 0x98, 0x45, 0x2d, 0xae, 0x13, 0x43, 0xeb, 0xc3, 0x82, 0x84, 0xfd, 0xeb, 0x24, 0xd8, 0x5a, 0xdf, - 0x78, 0x70, 0x87, 0x59, 0x3a, 0x46, 0x8e, 0x56, 0x21, 0xe1, 0xb8, 0xa6, 0x49, 0xec, 0x53, 0x35, - 0x2d, 0xe1, 0x17, 0xaf, 0x10, 0xb4, 0x50, 0xdf, 0x08, 0xe1, 0xc0, 0x12, 0xd5, 0x21, 0x69, 0x52, - 0x4e, 0x3a, 0x84, 0x13, 0x35, 0x23, 0xb9, 0xb2, 0x38, 0x81, 0x7e, 0x8f, 0xe8, 0xe9, 0x3e, 0x31, - 0xdc, 0xf3, 0x4a, 0x0a, 0xcc, 0x2b, 0x71, 0x88, 0x8a, 0xdf, 0xcd, 0x68, 0x32, 0x9a, 0x8d, 0x6d, - 0x46, 0x93, 0xf1, 0x6c, 0x62, 0x33, 0x9a, 0x4c, 0x66, 0x53, 0x85, 0x27, 0x10, 0x93, 0xc9, 0x42, - 0xbb, 0x90, 0x16, 0x2a, 0x5a, 0x8f, 0xe9, 0x16, 0xbf, 0xf2, 0x6d, 0xb4, 0xe3, 0x9a, 0x07, 0xd4, - 0x16, 0x77, 0xda, 0xae, 0xb0, 0xc3, 0xd0, 0x09, 0x86, 0x4e, 0xe1, 0x57, 0x05, 0x22, 0x4d, 0xd7, - 0xfc, 0xfc, 0xc8, 0x88, 0xc1, 0x75, 0xd2, 0xed, 0xda, 0xb4, 0x2b, 0xab, 0x4c, 0xe3, 0xd4, 0xec, - 0x31, 0x9b, 0x18, 0x3a, 0x3f, 0x95, 0x84, 0x9e, 0x5e, 0xf9, 0xdb, 0x24, 0xf4, 0x72, 0xdf, 0xbc, - 0xd5, 0xb7, 0xc6, 0x73, 0x64, 0xac, 0x1c, 0xdd, 0x84, 0x8c, 0xee, 0x68, 0x26, 0xb3, 0x18, 0x67, - 0x96, 0xde, 0x96, 0xb5, 0x91, 0xc4, 0x69, 0xdd, 0xd9, 0x0e, 0x44, 0x85, 0xef, 0x14, 0x48, 0xf5, - 0x09, 0xd0, 0x1c, 0x17, 0xf3, 0xca, 0x95, 0xa9, 0xfb, 0x65, 0x84, 0x5d, 0xf8, 0x59, 0x81, 0xd9, - 0x71, 0xbc, 0x47, 0xcf, 0xc7, 0x85, 0xf7, 0xe0, 0x63, 0x4a, 0xe8, 0x0b, 0x89, 0xf4, 0x19, 0x24, - 0xfc, 0x0a, 0x44, 0x8f, 0xc7, 0xc5, 0xf6, 0x97, 0x2b, 0xd6, 0xef, 0xf8, 0x4a, 0x38, 0x0b, 0xc3, - 0xcc, 0x08, 0x9f, 0xd1, 0x36, 0x00, 0xe1, 0xdc, 0xd6, 0x0f, 0x5c, 0x4e, 0x1d, 0x35, 0xf1, 0x31, - 0xf5, 0x3d, 0x00, 0x80, 0x4a, 0x30, 0xeb, 0x70, 0x62, 0x73, 0x8d, 0xeb, 0x26, 0xd5, 0x5c, 0x4b, - 0x3f, 0xd1, 0x2c, 0x62, 0x31, 0x79, 0x5c, 0x71, 0x7c, 0x4d, 0xae, 0xb5, 0x74, 0x93, 0xee, 0x59, - 0xfa, 0xc9, 0x0e, 0xb1, 0x18, 0xfa, 0x23, 0x4c, 0x8f, 0xa8, 0x46, 0xa4, 0x6a, 0x86, 0x0f, 0x6a, - 0x2d, 0x40, 0x8a, 0x38, 0x5a, 0x87, 0xb9, 0x07, 0x06, 0x55, 0xa3, 0x79, 0x65, 0x49, 0xd9, 0x08, - 0xe1, 0x24, 0x71, 0xaa, 0x52, 0x82, 0xae, 0x43, 0x9c, 0x38, 0x9a, 0x6e, 0x71, 0x35, 0x9e, 0x57, - 0x96, 0xb2, 0xe2, 0xc6, 0x27, 0x4e, 0xdd, 0xe2, 0x68, 0x0b, 0x52, 0xf4, 0x84, 0x9a, 0x3d, 0x83, - 0xd8, 0x8e, 0x1a, 0x93, 0xc1, 0x2d, 0x4d, 0xa6, 0x87, 0x67, 0xe0, 0x47, 0xd7, 0x07, 0x40, 0xb3, - 0x10, 0x3b, 0x34, 0x48, 0xd7, 0x51, 0x93, 0x79, 0x65, 0x69, 0x0a, 0x7b, 0x93, 0x4a, 0x02, 0x62, - 0xc7, 0xe2, 0x34, 0x36, 0xa3, 0x49, 0x25, 0x1b, 0x2e, 0xfc, 0x18, 0x01, 0x74, 0x91, 0x56, 0x23, - 0xe7, 0x9c, 0xfa, 0x42, 0xcf, 0x79, 0x16, 0x62, 0x6d, 0xe6, 0x5a, 0x5c, 0x9e, 0x71, 0x1c, 0x7b, - 0x13, 0x84, 0xbc, 0xbe, 0x19, 0xf3, 0xcf, 0x5d, 0xb6, 0xc4, 0x5b, 0x30, 0x75, 0xe0, 0xb6, 0x5f, - 0x50, 0xae, 0x49, 0x1d, 0x47, 0x8d, 0xe7, 0x23, 0x02, 0xce, 0x13, 0xae, 0x4a, 0x19, 0x5a, 0x84, - 0x19, 0x7a, 0xd2, 0x33, 0xf4, 0xb6, 0xce, 0xb5, 0x03, 0xe6, 0x5a, 0x1d, 0x8f, 0x61, 0x0a, 0x9e, - 0x0e, 0xc4, 0x15, 0x29, 0x1d, 0xce, 0x53, 0xf2, 0xb3, 0xe5, 0x09, 0x06, 0xf2, 0x24, 0xa2, 0x30, - 0x75, 0x4b, 0x36, 0x42, 0x65, 0x43, 0xc1, 0x62, 0x22, 0x65, 0xe4, 0x44, 0xcd, 0x48, 0x59, 0x18, - 0x8b, 0x89, 0x68, 0x52, 0x8e, 0x6b, 0x6a, 0xe2, 0xd7, 0xd4, 0x2d, 0xef, 0x97, 0x9c, 0x68, 0x7e, - 0x7a, 0xff, 0x13, 0x87, 0x85, 0xf7, 0x5e, 0x20, 0x23, 0x99, 0x56, 0xbe, 0xfa, 0x4c, 0xcf, 0x8a, - 0xb7, 0x27, 0x31, 0xa8, 0xac, 0xad, 0x6b, 0xd8, 0x9b, 0x88, 0xe7, 0xdf, 0xbf, 0xa9, 0xcd, 0xbc, - 0xec, 0xcb, 0x27, 0x55, 0x1c, 0xa7, 0x84, 0x44, 0xa6, 0x1e, 0x75, 0x21, 0xd9, 0x63, 0x8e, 0xce, - 0xf5, 0x63, 0x2a, 0xab, 0x25, 0xbd, 0x52, 0xfb, 0xa4, 0x6b, 0xb9, 0x58, 0x91, 0xbc, 0x72, 0x82, - 0x27, 0x45, 0x00, 0x2e, 0x36, 0xb2, 0xe4, 0x45, 0x7a, 0x4c, 0xfd, 0x97, 0xd9, 0xe7, 0xdd, 0x28, - 0x00, 0xbf, 0x84, 0x54, 0x43, 0xc4, 0x4d, 0x7f, 0x2a, 0x71, 0x7d, 0x8a, 0x66, 0xc6, 0x50, 0x74, - 0x6a, 0x80, 0xa2, 0xe8, 0x36, 0x4c, 0xcb, 0xc3, 0xe7, 0x47, 0x36, 0x75, 0x8e, 0x98, 0xd1, 0x51, - 0xa7, 0xc5, 0x32, 0x9e, 0x12, 0xd2, 0x56, 0x20, 0x9c, 0x5f, 0x83, 0x84, 0x1f, 0x0d, 0x9a, 0x83, - 0x38, 0x3b, 0x3c, 0x74, 0x28, 0x97, 0xaf, 0xf0, 0x6b, 0xd8, 0x9f, 0x5d, 0x2c, 0x63, 0xf1, 0x6f, - 0x20, 0x3a, 0x5c, 0xc6, 0x97, 0x55, 0x44, 0xe1, 0x55, 0x04, 0xb2, 0xa3, 0x0d, 0xe7, 0x2b, 0x69, - 0x28, 0xe3, 0xe9, 0x9f, 0x1d, 0xa0, 0xbf, 0x47, 0x7e, 0x1d, 0x66, 0xfe, 0xe5, 0x12, 0x8b, 0xeb, - 0x06, 0xd5, 0xe4, 0x2d, 0xef, 0x5d, 0x74, 0xe9, 0x95, 0x87, 0x1f, 0xda, 0x89, 0x8b, 0x32, 0xc2, - 0x32, 0x7f, 0xec, 0xc3, 0xe1, 0xe9, 0x00, 0x58, 0x2e, 0x5c, 0xd2, 0x5d, 0xe6, 0x57, 0x61, 0x66, - 0xc4, 0x10, 0xcd, 0x43, 0x32, 0x30, 0x95, 0xd9, 0x54, 0xf0, 0xf9, 0x5c, 0x80, 0x48, 0x37, 0xe5, - 0xf9, 0x28, 0x78, 0xa8, 0x33, 0xbd, 0x8c, 0x40, 0x32, 0xe0, 0x1e, 0x7a, 0x0e, 0xbf, 0x3b, 0xd4, - 0x0d, 0x4e, 0x6d, 0xda, 0xd1, 0x3e, 0x35, 0x5f, 0x28, 0x40, 0x2a, 0xf7, 0xf3, 0x76, 0x31, 0x0d, - 0xe1, 0x49, 0x7d, 0x3d, 0x72, 0xf5, 0xbe, 0xfe, 0x04, 0x12, 0x4e, 0x8f, 0x58, 0x9a, 0xde, 0x91, - 0x09, 0xcc, 0x54, 0x1e, 0x0a, 0x47, 0x7e, 0x78, 0x7b, 0xe3, 0x1f, 0x5d, 0x36, 0xe2, 0xbb, 0xce, - 0x4a, 0x6d, 0x66, 0x18, 0xb4, 0xcd, 0x99, 0x5d, 0xea, 0x89, 0xd7, 0x50, 0x49, 0xb7, 0x38, 0xb5, - 0x2d, 0x62, 0x94, 0xc4, 0xac, 0xd8, 0xec, 0x11, 0xab, 0x5e, 0xc5, 0x71, 0x01, 0x58, 0xef, 0xa0, - 0x67, 0x90, 0xe4, 0x36, 0x69, 0x53, 0x81, 0x1d, 0x93, 0xd8, 0x65, 0x1f, 0xfb, 0x9f, 0x1f, 0x8e, - 0xdd, 0x12, 0x48, 0xf5, 0x2a, 0x4e, 0x48, 0xc8, 0x7a, 0x67, 0xe4, 0xb1, 0x70, 0xf7, 0xbf, 0x0a, - 0xcc, 0x8d, 0x7f, 0x22, 0xa2, 0x45, 0xb8, 0x55, 0x5e, 0x5f, 0xc7, 0xb5, 0xf5, 0x72, 0xab, 0xde, - 0xd8, 0xd1, 0x5a, 0xb5, 0xed, 0xdd, 0x06, 0x2e, 0x6f, 0xd5, 0x5b, 0x4f, 0xb4, 0xbd, 0x9d, 0xe6, - 0x6e, 0x6d, 0xb5, 0xbe, 0x56, 0xaf, 0x55, 0xb3, 0x21, 0x74, 0x13, 0x16, 0x2e, 0x53, 0xac, 0xd6, - 0xb6, 0x5a, 0xe5, 0xac, 0x82, 0xee, 0x40, 0xe1, 0x32, 0x95, 0xd5, 0xbd, 0xed, 0xbd, 0xad, 0x72, - 0xab, 0xbe, 0x5f, 0xcb, 0x86, 0xef, 0x3e, 0x87, 0xe9, 0x73, 0xbe, 0xae, 0xc9, 0xfb, 0xed, 0x06, - 0xfc, 0xa1, 0x5a, 0x6e, 0x95, 0xb5, 0xdd, 0x46, 0x7d, 0xa7, 0xa5, 0xad, 0x6d, 0x95, 0xd7, 0x9b, - 0x5a, 0xb5, 0xa1, 0xed, 0x34, 0x5a, 0xda, 0x5e, 0xb3, 0x96, 0x0d, 0xa1, 0x3f, 0xc3, 0xe2, 0x05, - 0x85, 0x9d, 0x86, 0x86, 0x6b, 0xab, 0x0d, 0x5c, 0xad, 0x55, 0xb5, 0xfd, 0xf2, 0xd6, 0x5e, 0x4d, - 0xdb, 0x2e, 0x37, 0x1f, 0x65, 0x95, 0xca, 0xff, 0x95, 0xd7, 0x67, 0x39, 0xe5, 0xcd, 0x59, 0x4e, - 0xf9, 0xe9, 0x2c, 0xa7, 0xbc, 0x7c, 0x97, 0x0b, 0xbd, 0x79, 0x97, 0x0b, 0x7d, 0xff, 0x2e, 0x17, - 0x82, 0x9b, 0x3a, 0x9b, 0x50, 0x51, 0x95, 0x8c, 0xff, 0x35, 0x64, 0x57, 0x2c, 0xec, 0x2a, 0x4f, - 0x6b, 0x1f, 0x9c, 0x0f, 0xef, 0x03, 0x59, 0x97, 0x5a, 0x03, 0xdf, 0xec, 0xfe, 0x17, 0xce, 0x35, - 0x7a, 0xd4, 0x6a, 0x9d, 0x83, 0x48, 0x78, 0xff, 0x73, 0x87, 0x53, 0xdc, 0x5f, 0x3e, 0x88, 0x4b, - 0xab, 0xfb, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x00, 0xa3, 0x78, 0x2c, 0xfd, 0x13, 0x00, 0x00, -} - -func (m *MetricsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for iNdEx := len(m.ResourceMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeMetrics) > 0 { - for iNdEx := len(m.DeprecatedScopeMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeMetrics) > 0 { - for iNdEx := len(m.ScopeMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Metrics) > 0 { - for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Metric) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metric) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - } - if m.Data != nil { - { - size := m.Data.Size() - i -= size - if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Unit) > 0 { - i -= len(m.Unit) - copy(dAtA[i:], m.Unit) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Unit))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metric_Gauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Gauge != nil { - { - size, err := m.Gauge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Metric_Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Sum != nil { - { - size, err := m.Sum.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *Metric_Histogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Histogram != nil { - { - size, err := m.Histogram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *Metric_ExponentialHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_ExponentialHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExponentialHistogram != nil { - { - size, err := m.ExponentialHistogram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *Metric_Summary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Summary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Summary != nil { - { - size, err := m.Summary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *Gauge) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Gauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Sum) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsMonotonic { - i-- - if m.IsMonotonic { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Histogram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Histogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExponentialHistogram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExponentialHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Summary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Summary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Summary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NumberDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NumberDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NumberDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x40 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *NumberDataPoint_AsDouble) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NumberDataPoint_AsDouble) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AsDouble)))) - i-- - dAtA[i] = 0x21 - return len(dAtA) - i, nil -} -func (m *NumberDataPoint_AsInt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NumberDataPoint_AsInt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.AsInt)) - i-- - dAtA[i] = 0x31 - return len(dAtA) - i, nil -} -func (m *HistogramDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HistogramDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Max_ != nil { - { - size := m.Max_.Size() - i -= size - if _, err := m.Max_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Min_ != nil { - { - size := m.Min_.Size() - i -= size - if _, err := m.Min_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x50 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.ExplicitBounds) > 0 { - for iNdEx := len(m.ExplicitBounds) - 1; iNdEx >= 0; iNdEx-- { - f8 := math.Float64bits(float64(m.ExplicitBounds[iNdEx])) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f8)) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.ExplicitBounds)*8)) - i-- - dAtA[i] = 0x3a - } - if len(m.BucketCounts) > 0 { - for iNdEx := len(m.BucketCounts) - 1; iNdEx >= 0; iNdEx-- { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.BucketCounts[iNdEx])) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.BucketCounts)*8)) - i-- - dAtA[i] = 0x32 - } - if m.Sum_ != nil { - { - size := m.Sum_.Size() - i -= size - if _, err := m.Sum_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *HistogramDataPoint_Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - return len(dAtA) - i, nil -} -func (m *HistogramDataPoint_Min) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint_Min) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) - i-- - dAtA[i] = 0x59 - return len(dAtA) - i, nil -} -func (m *HistogramDataPoint_Max) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint_Max) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) - i-- - dAtA[i] = 0x61 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExponentialHistogramDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ZeroThreshold != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ZeroThreshold)))) - i-- - dAtA[i] = 0x71 - } - if m.Max_ != nil { - { - size := m.Max_.Size() - i -= size - if _, err := m.Max_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Min_ != nil { - { - size := m.Min_.Size() - i -= size - if _, err := m.Min_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x50 - } - { - size, err := m.Negative.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size, err := m.Positive.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - if m.ZeroCount != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.ZeroCount)) - i-- - dAtA[i] = 0x39 - } - if m.Scale != 0 { - i = encodeVarintMetrics(dAtA, i, uint64((uint32(m.Scale)<<1)^uint32((m.Scale>>31)))) - i-- - dAtA[i] = 0x30 - } - if m.Sum_ != nil { - { - size := m.Sum_.Size() - i -= size - if _, err := m.Sum_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExponentialHistogramDataPoint_Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint_Min) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Min) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) - i-- - dAtA[i] = 0x61 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint_Max) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Max) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) - i-- - dAtA[i] = 0x69 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint_Buckets) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExponentialHistogramDataPoint_Buckets) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Buckets) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BucketCounts) > 0 { - dAtA12 := make([]byte, len(m.BucketCounts)*10) - var j11 int - for _, num := range m.BucketCounts { - for num >= 1<<7 { - dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - dAtA12[j11] = uint8(num) - j11++ - } - i -= j11 - copy(dAtA[i:], dAtA12[:j11]) - i = encodeVarintMetrics(dAtA, i, uint64(j11)) - i-- - dAtA[i] = 0x12 - } - if m.Offset != 0 { - i = encodeVarintMetrics(dAtA, i, uint64((uint32(m.Offset)<<1)^uint32((m.Offset>>31)))) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SummaryDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SummaryDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SummaryDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x40 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.QuantileValues) > 0 { - for iNdEx := len(m.QuantileValues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.QuantileValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Sum != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *SummaryDataPoint_ValueAtQuantile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SummaryDataPoint_ValueAtQuantile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SummaryDataPoint_ValueAtQuantile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x11 - } - if m.Quantile != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Quantile)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *Exemplar) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Exemplar) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FilteredAttributes) > 0 { - for iNdEx := len(m.FilteredAttributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FilteredAttributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *Exemplar_AsDouble) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exemplar_AsDouble) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AsDouble)))) - i-- - dAtA[i] = 0x19 - return len(dAtA) - i, nil -} -func (m *Exemplar_AsInt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exemplar_AsInt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.AsInt)) - i-- - dAtA[i] = 0x31 - return len(dAtA) - i, nil -} -func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { - offset -= sovMetrics(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MetricsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for _, e := range m.ResourceMetrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *ResourceMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovMetrics(uint64(l)) - if len(m.ScopeMetrics) > 0 { - for _, e := range m.ScopeMetrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if len(m.DeprecatedScopeMetrics) > 0 { - for _, e := range m.DeprecatedScopeMetrics { - l = e.Size() - n += 2 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *ScopeMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovMetrics(uint64(l)) - if len(m.Metrics) > 0 { - for _, e := range m.Metrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} - -func (m *Metric) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Unit) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.Data != nil { - n += m.Data.Size() - } - if len(m.Metadata) > 0 { - for _, e := range m.Metadata { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *Metric_Gauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Gauge != nil { - l = m.Gauge.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - l = m.Sum.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_Histogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Histogram != nil { - l = m.Histogram.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_ExponentialHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExponentialHistogram != nil { - l = m.ExponentialHistogram.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_Summary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Summary != nil { - l = m.Summary.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Gauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - if m.IsMonotonic { - n += 2 - } - return n -} - -func (m *Histogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - return n -} - -func (m *ExponentialHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - return n -} - -func (m *Summary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *NumberDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != nil { - n += m.Value.Size() - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - return n -} - -func (m *NumberDataPoint_AsDouble) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *NumberDataPoint_AsInt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *HistogramDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum_ != nil { - n += m.Sum_.Size() - } - if len(m.BucketCounts) > 0 { - n += 1 + sovMetrics(uint64(len(m.BucketCounts)*8)) + len(m.BucketCounts)*8 - } - if len(m.ExplicitBounds) > 0 { - n += 1 + sovMetrics(uint64(len(m.ExplicitBounds)*8)) + len(m.ExplicitBounds)*8 - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - if m.Min_ != nil { - n += m.Min_.Size() - } - if m.Max_ != nil { - n += m.Max_.Size() - } - return n -} - -func (m *HistogramDataPoint_Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *HistogramDataPoint_Min) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *HistogramDataPoint_Max) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum_ != nil { - n += m.Sum_.Size() - } - if m.Scale != 0 { - n += 1 + sozMetrics(uint64(m.Scale)) - } - if m.ZeroCount != 0 { - n += 9 - } - l = m.Positive.Size() - n += 1 + l + sovMetrics(uint64(l)) - l = m.Negative.Size() - n += 1 + l + sovMetrics(uint64(l)) - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Min_ != nil { - n += m.Min_.Size() - } - if m.Max_ != nil { - n += m.Max_.Size() - } - if m.ZeroThreshold != 0 { - n += 9 - } - return n -} - -func (m *ExponentialHistogramDataPoint_Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint_Min) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint_Max) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint_Buckets) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Offset != 0 { - n += 1 + sozMetrics(uint64(m.Offset)) - } - if len(m.BucketCounts) > 0 { - l = 0 - for _, e := range m.BucketCounts { - l += sovMetrics(uint64(e)) - } - n += 1 + sovMetrics(uint64(l)) + l - } - return n -} - -func (m *SummaryDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum != 0 { - n += 9 - } - if len(m.QuantileValues) > 0 { - for _, e := range m.QuantileValues { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - return n -} - -func (m *SummaryDataPoint_ValueAtQuantile) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Quantile != 0 { - n += 9 - } - if m.Value != 0 { - n += 9 - } - return n -} - -func (m *Exemplar) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != nil { - n += m.Value.Size() - } - l = m.SpanId.Size() - n += 1 + l + sovMetrics(uint64(l)) - l = m.TraceId.Size() - n += 1 + l + sovMetrics(uint64(l)) - if len(m.FilteredAttributes) > 0 { - for _, e := range m.FilteredAttributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *Exemplar_AsDouble) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *Exemplar_AsInt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} - -func sovMetrics(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetrics(x uint64) (n int) { - return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MetricsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceMetrics = append(m.ResourceMetrics, &ResourceMetrics{}) - if err := m.ResourceMetrics[len(m.ResourceMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeMetrics = append(m.ScopeMetrics, &ScopeMetrics{}) - if err := m.ScopeMetrics[len(m.ScopeMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeMetrics = append(m.DeprecatedScopeMetrics, &ScopeMetrics{}) - if err := m.DeprecatedScopeMetrics[len(m.DeprecatedScopeMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metrics = append(m.Metrics, &Metric{}) - if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metric) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Metric: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metric: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Unit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gauge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Gauge{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Gauge{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Sum{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Sum{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Histogram{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Histogram{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExponentialHistogram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ExponentialHistogram{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_ExponentialHistogram{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Summary{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Summary{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata, v11.KeyValue{}) - if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Gauge) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Gauge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Gauge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &NumberDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sum) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &NumberDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsMonotonic", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsMonotonic = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Histogram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Histogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &HistogramDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExponentialHistogram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExponentialHistogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExponentialHistogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &ExponentialHistogramDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Summary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Summary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Summary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &SummaryDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NumberDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NumberDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NumberDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsDouble", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &NumberDataPoint_AsDouble{float64(math.Float64frombits(v))} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsInt", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &NumberDataPoint_AsInt{v} - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HistogramDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HistogramDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HistogramDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum_ = &HistogramDataPoint_Sum{float64(math.Float64frombits(v))} - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.BucketCounts) == 0 { - m.BucketCounts = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) - } - case 7: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.ExplicitBounds) == 0 { - m.ExplicitBounds = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ExplicitBounds", wireType) - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min_ = &HistogramDataPoint_Min{float64(math.Float64frombits(v))} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max_ = &HistogramDataPoint_Max{float64(math.Float64frombits(v))} - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExponentialHistogramDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExponentialHistogramDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExponentialHistogramDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum_ = &ExponentialHistogramDataPoint_Sum{float64(math.Float64frombits(v))} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Scale = v - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ZeroCount", wireType) - } - m.ZeroCount = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.ZeroCount = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Positive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Positive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Negative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Negative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min_ = &ExponentialHistogramDataPoint_Min{float64(math.Float64frombits(v))} - case 13: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max_ = &ExponentialHistogramDataPoint_Max{float64(math.Float64frombits(v))} - case 14: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ZeroThreshold", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ZeroThreshold = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExponentialHistogramDataPoint_Buckets) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Buckets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Buckets: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Offset = v - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BucketCounts = append(m.BucketCounts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.BucketCounts) == 0 { - m.BucketCounts = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BucketCounts = append(m.BucketCounts, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SummaryDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SummaryDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SummaryDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QuantileValues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QuantileValues = append(m.QuantileValues, &SummaryDataPoint_ValueAtQuantile{}) - if err := m.QuantileValues[len(m.QuantileValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SummaryDataPoint_ValueAtQuantile) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValueAtQuantile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValueAtQuantile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantile", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Quantile = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Exemplar) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Exemplar: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Exemplar: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsDouble", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &Exemplar_AsDouble{float64(math.Float64frombits(v))} - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsInt", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &Exemplar_AsInt{v} - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilteredAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilteredAttributes = append(m.FilteredAttributes, v11.KeyValue{}) - if err := m.FilteredAttributes[len(m.FilteredAttributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetrics(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetrics - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetrics - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetrics - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go deleted file mode 100644 index 23e4ca9fb8c..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go +++ /dev/null @@ -1,5512 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/profiles/v1development/profiles.proto - -package v1development - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Specifies the method of aggregating metric values, either DELTA (change since last report) -// or CUMULATIVE (total since a fixed start time). -type AggregationTemporality int32 - -const ( - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 - //* DELTA is an AggregationTemporality for a profiler which reports - //changes since last report time. Successive metrics contain aggregation of - //values from continuous and non-overlapping intervals. - // - //The values for a DELTA metric are based only on the time interval - //associated with one measurement cycle. There is no dependency on - //previous measurements like is the case for CUMULATIVE metrics. - // - //For example, consider a system measuring the number of requests that - //it receives and reports the sum of these requests every second as a - //DELTA metric: - // - //1. The system starts receiving at time=t_0. - //2. A request is received, the system measures 1 request. - //3. A request is received, the system measures 1 request. - //4. A request is received, the system measures 1 request. - //5. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0 to - //t_0+1 with a value of 3. - //6. A request is received, the system measures 1 request. - //7. A request is received, the system measures 1 request. - //8. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0+1 to - //t_0+2 with a value of 2. - AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 - //* CUMULATIVE is an AggregationTemporality for a profiler which - //reports changes since a fixed start time. This means that current values - //of a CUMULATIVE metric depend on all previous measurements since the - //start time. Because of this, the sender is required to retain this state - //in some form. If this state is lost or invalidated, the CUMULATIVE metric - //values MUST be reset and a new fixed start time following the last - //reported measurement time sent MUST be used. - // - //For example, consider a system measuring the number of requests that - //it receives and reports the sum of these requests every second as a - //CUMULATIVE metric: - // - //1. The system starts receiving at time=t_0. - //2. A request is received, the system measures 1 request. - //3. A request is received, the system measures 1 request. - //4. A request is received, the system measures 1 request. - //5. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0 to - //t_0+1 with a value of 3. - //6. A request is received, the system measures 1 request. - //7. A request is received, the system measures 1 request. - //8. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0 to - //t_0+2 with a value of 5. - //9. The system experiences a fault and loses state. - //10. The system recovers and resumes receiving at time=t_1. - //11. A request is received, the system measures 1 request. - //12. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_1 to - //t_1+1 with a value of 1. - // - //Note: Even though, when reporting changes since last report time, using - //CUMULATIVE is valid, it is not recommended. - AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 -) - -var AggregationTemporality_name = map[int32]string{ - 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", - 1: "AGGREGATION_TEMPORALITY_DELTA", - 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", -} - -var AggregationTemporality_value = map[string]int32{ - "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, - "AGGREGATION_TEMPORALITY_DELTA": 1, - "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, -} - -func (x AggregationTemporality) String() string { - return proto.EnumName(AggregationTemporality_name, int32(x)) -} - -func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{0} -} - -// ProfilesDictionary represents the profiles data shared across the -// entire message being sent. -type ProfilesDictionary struct { - // Mappings from address ranges to the image/binary/library mapped - // into that address range referenced by locations via Location.mapping_index. - MappingTable []*Mapping `protobuf:"bytes,1,rep,name=mapping_table,json=mappingTable,proto3" json:"mapping_table,omitempty"` - // Locations referenced by samples via Profile.location_indices. - LocationTable []*Location `protobuf:"bytes,2,rep,name=location_table,json=locationTable,proto3" json:"location_table,omitempty"` - // Functions referenced by locations via Line.function_index. - FunctionTable []*Function `protobuf:"bytes,3,rep,name=function_table,json=functionTable,proto3" json:"function_table,omitempty"` - // Links referenced by samples via Sample.link_index. - LinkTable []*Link `protobuf:"bytes,4,rep,name=link_table,json=linkTable,proto3" json:"link_table,omitempty"` - // A common table for strings referenced by various messages. - // string_table[0] must always be "". - StringTable []string `protobuf:"bytes,5,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` - // A common table for attributes referenced by various messages. - AttributeTable []v1.KeyValue `protobuf:"bytes,6,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` - // Represents a mapping between Attribute Keys and Units. - AttributeUnits []*AttributeUnit `protobuf:"bytes,7,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units,omitempty"` -} - -func (m *ProfilesDictionary) Reset() { *m = ProfilesDictionary{} } -func (m *ProfilesDictionary) String() string { return proto.CompactTextString(m) } -func (*ProfilesDictionary) ProtoMessage() {} -func (*ProfilesDictionary) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{0} -} -func (m *ProfilesDictionary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProfilesDictionary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProfilesDictionary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProfilesDictionary) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfilesDictionary.Merge(m, src) -} -func (m *ProfilesDictionary) XXX_Size() int { - return m.Size() -} -func (m *ProfilesDictionary) XXX_DiscardUnknown() { - xxx_messageInfo_ProfilesDictionary.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfilesDictionary proto.InternalMessageInfo - -func (m *ProfilesDictionary) GetMappingTable() []*Mapping { - if m != nil { - return m.MappingTable - } - return nil -} - -func (m *ProfilesDictionary) GetLocationTable() []*Location { - if m != nil { - return m.LocationTable - } - return nil -} - -func (m *ProfilesDictionary) GetFunctionTable() []*Function { - if m != nil { - return m.FunctionTable - } - return nil -} - -func (m *ProfilesDictionary) GetLinkTable() []*Link { - if m != nil { - return m.LinkTable - } - return nil -} - -func (m *ProfilesDictionary) GetStringTable() []string { - if m != nil { - return m.StringTable - } - return nil -} - -func (m *ProfilesDictionary) GetAttributeTable() []v1.KeyValue { - if m != nil { - return m.AttributeTable - } - return nil -} - -func (m *ProfilesDictionary) GetAttributeUnits() []*AttributeUnit { - if m != nil { - return m.AttributeUnits - } - return nil -} - -// ProfilesData represents the profiles data that can be stored in persistent storage, -// OR can be embedded by other protocols that transfer OTLP profiles 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 ProfilesData struct { - // An array of ResourceProfiles. - // For data coming from an SDK profiler, this array will typically contain one - // element. Host-level profilers will usually create one ResourceProfile per - // container, as well as one additional ResourceProfile grouping all samples - // from non-containerized processes. - // Other resource groupings are possible as well and clarified via - // Resource.attributes and semantic conventions. - ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` - // One instance of ProfilesDictionary - Dictionary ProfilesDictionary `protobuf:"bytes,2,opt,name=dictionary,proto3" json:"dictionary"` -} - -func (m *ProfilesData) Reset() { *m = ProfilesData{} } -func (m *ProfilesData) String() string { return proto.CompactTextString(m) } -func (*ProfilesData) ProtoMessage() {} -func (*ProfilesData) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{1} -} -func (m *ProfilesData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProfilesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProfilesData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProfilesData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfilesData.Merge(m, src) -} -func (m *ProfilesData) XXX_Size() int { - return m.Size() -} -func (m *ProfilesData) XXX_DiscardUnknown() { - xxx_messageInfo_ProfilesData.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfilesData proto.InternalMessageInfo - -func (m *ProfilesData) GetResourceProfiles() []*ResourceProfiles { - if m != nil { - return m.ResourceProfiles - } - return nil -} - -func (m *ProfilesData) GetDictionary() ProfilesDictionary { - if m != nil { - return m.Dictionary - } - return ProfilesDictionary{} -} - -// A collection of ScopeProfiles from a Resource. -type ResourceProfiles struct { - // The resource for the profiles in this message. - // If this field is not set then no resource info is known. - Resource v11.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of ScopeProfiles that originate from a resource. - ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,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_profiles" 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 (m *ResourceProfiles) Reset() { *m = ResourceProfiles{} } -func (m *ResourceProfiles) String() string { return proto.CompactTextString(m) } -func (*ResourceProfiles) ProtoMessage() {} -func (*ResourceProfiles) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{2} -} -func (m *ResourceProfiles) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceProfiles.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceProfiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceProfiles.Merge(m, src) -} -func (m *ResourceProfiles) XXX_Size() int { - return m.Size() -} -func (m *ResourceProfiles) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceProfiles.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceProfiles proto.InternalMessageInfo - -func (m *ResourceProfiles) GetResource() v11.Resource { - if m != nil { - return m.Resource - } - return v11.Resource{} -} - -func (m *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles { - if m != nil { - return m.ScopeProfiles - } - return nil -} - -func (m *ResourceProfiles) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Profiles produced by an InstrumentationScope. -type ScopeProfiles struct { - // The instrumentation scope information for the profiles in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope v1.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // A list of Profiles that originate from an instrumentation scope. - Profiles []*Profile `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the profile 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 profiles in the "profiles" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeProfiles) Reset() { *m = ScopeProfiles{} } -func (m *ScopeProfiles) String() string { return proto.CompactTextString(m) } -func (*ScopeProfiles) ProtoMessage() {} -func (*ScopeProfiles) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{3} -} -func (m *ScopeProfiles) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeProfiles.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeProfiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeProfiles.Merge(m, src) -} -func (m *ScopeProfiles) XXX_Size() int { - return m.Size() -} -func (m *ScopeProfiles) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeProfiles.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeProfiles proto.InternalMessageInfo - -func (m *ScopeProfiles) GetScope() v1.InstrumentationScope { - if m != nil { - return m.Scope - } - return v1.InstrumentationScope{} -} - -func (m *ScopeProfiles) GetProfiles() []*Profile { - if m != nil { - return m.Profiles - } - return nil -} - -func (m *ScopeProfiles) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// Represents a complete profile, including sample types, samples, -// mappings to binaries, locations, functions, string table, and additional metadata. -// It modifies and annotates pprof Profile with OpenTelemetry specific fields. -// -// Note that whilst fields in this message retain the name and field id from pprof in most cases -// for ease of understanding data migration, it is not intended that pprof:Profile and -// OpenTelemetry:Profile encoding be wire compatible. -type Profile struct { - // A description of the samples associated with each Sample.value. - // For a cpu profile this might be: - // [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]] - // For a heap profile, this might be: - // [["allocations","count"], ["space","bytes"]], - // If one of the values represents the number of events represented - // by the sample, by convention it should be at index 0 and use - // sample_type.unit == "count". - SampleType []*ValueType `protobuf:"bytes,1,rep,name=sample_type,json=sampleType,proto3" json:"sample_type,omitempty"` - // The set of samples recorded in this profile. - Sample []*Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample,omitempty"` - // References to locations in ProfilesDictionary.location_table. - LocationIndices []int32 `protobuf:"varint,3,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` - // Time of collection (UTC) represented as nanoseconds past the epoch. - TimeNanos int64 `protobuf:"varint,4,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` - // Duration of the profile, if a duration makes sense. - DurationNanos int64 `protobuf:"varint,5,opt,name=duration_nanos,json=durationNanos,proto3" json:"duration_nanos,omitempty"` - // The kind of events between sampled occurrences. - // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] - PeriodType ValueType `protobuf:"bytes,6,opt,name=period_type,json=periodType,proto3" json:"period_type"` - // The number of events between sampled occurrences. - Period int64 `protobuf:"varint,7,opt,name=period,proto3" json:"period,omitempty"` - // Free-form text associated with the profile. The text is displayed as is - // to the user by the tools that read profiles (e.g. by pprof). This field - // should not be used to store any machine-readable information, it is only - // for human-friendly content. The profile must stay functional if this field - // is cleaned. - CommentStrindices []int32 `protobuf:"varint,8,rep,packed,name=comment_strindices,json=commentStrindices,proto3" json:"comment_strindices,omitempty"` - // Index into the sample_type array to the default sample type. - DefaultSampleTypeIndex int32 `protobuf:"varint,9,opt,name=default_sample_type_index,json=defaultSampleTypeIndex,proto3" json:"default_sample_type_index,omitempty"` - // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with - // all zeroes is considered invalid. - // - // This field is required. - ProfileId go_opentelemetry_io_collector_pdata_internal_data.ProfileID `protobuf:"bytes,10,opt,name=profile_id,json=profileId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.ProfileID" json:"profile_id"` - // 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,11,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] - OriginalPayloadFormat string `protobuf:"bytes,12,opt,name=original_payload_format,json=originalPayloadFormat,proto3" json:"original_payload_format,omitempty"` - // Original payload can be stored in this field. This can be useful for users who want to get the original payload. - // Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. - // Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. - // If the original payload is in pprof format, it SHOULD not be included in this field. - // The field is optional, however if it is present then equivalent converted data should be populated in other fields - // of this message as far as is practicable. - OriginalPayload []byte `protobuf:"bytes,13,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"` - // References to attributes in attribute_table. [optional] - // It 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 - // "abc.com/myattribute": true - // "abc.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). - AttributeIndices []int32 `protobuf:"varint,14,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` -} - -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{4} -} -func (m *Profile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Profile.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Profile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Profile.Merge(m, src) -} -func (m *Profile) XXX_Size() int { - return m.Size() -} -func (m *Profile) XXX_DiscardUnknown() { - xxx_messageInfo_Profile.DiscardUnknown(m) -} - -var xxx_messageInfo_Profile proto.InternalMessageInfo - -func (m *Profile) GetSampleType() []*ValueType { - if m != nil { - return m.SampleType - } - return nil -} - -func (m *Profile) GetSample() []*Sample { - if m != nil { - return m.Sample - } - return nil -} - -func (m *Profile) GetLocationIndices() []int32 { - if m != nil { - return m.LocationIndices - } - return nil -} - -func (m *Profile) GetTimeNanos() int64 { - if m != nil { - return m.TimeNanos - } - return 0 -} - -func (m *Profile) GetDurationNanos() int64 { - if m != nil { - return m.DurationNanos - } - return 0 -} - -func (m *Profile) GetPeriodType() ValueType { - if m != nil { - return m.PeriodType - } - return ValueType{} -} - -func (m *Profile) GetPeriod() int64 { - if m != nil { - return m.Period - } - return 0 -} - -func (m *Profile) GetCommentStrindices() []int32 { - if m != nil { - return m.CommentStrindices - } - return nil -} - -func (m *Profile) GetDefaultSampleTypeIndex() int32 { - if m != nil { - return m.DefaultSampleTypeIndex - } - return 0 -} - -func (m *Profile) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Profile) GetOriginalPayloadFormat() string { - if m != nil { - return m.OriginalPayloadFormat - } - return "" -} - -func (m *Profile) GetOriginalPayload() []byte { - if m != nil { - return m.OriginalPayload - } - return nil -} - -func (m *Profile) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -// Represents a mapping between Attribute Keys and Units. -type AttributeUnit struct { - // Index into string table. - AttributeKeyStrindex int32 `protobuf:"varint,1,opt,name=attribute_key_strindex,json=attributeKeyStrindex,proto3" json:"attribute_key_strindex,omitempty"` - // Index into string table. - UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"` -} - -func (m *AttributeUnit) Reset() { *m = AttributeUnit{} } -func (m *AttributeUnit) String() string { return proto.CompactTextString(m) } -func (*AttributeUnit) ProtoMessage() {} -func (*AttributeUnit) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{5} -} -func (m *AttributeUnit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttributeUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttributeUnit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttributeUnit) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttributeUnit.Merge(m, src) -} -func (m *AttributeUnit) XXX_Size() int { - return m.Size() -} -func (m *AttributeUnit) XXX_DiscardUnknown() { - xxx_messageInfo_AttributeUnit.DiscardUnknown(m) -} - -var xxx_messageInfo_AttributeUnit proto.InternalMessageInfo - -func (m *AttributeUnit) GetAttributeKeyStrindex() int32 { - if m != nil { - return m.AttributeKeyStrindex - } - return 0 -} - -func (m *AttributeUnit) GetUnitStrindex() int32 { - if m != nil { - return m.UnitStrindex - } - return 0 -} - -// A pointer from a profile Sample to a trace Span. -// Connects a profile sample to a trace span, identified by unique trace and span IDs. -type Link struct { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // A unique identifier for the linked span. The ID is an 8-byte array. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` -} - -func (m *Link) Reset() { *m = Link{} } -func (m *Link) String() string { return proto.CompactTextString(m) } -func (*Link) ProtoMessage() {} -func (*Link) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{6} -} -func (m *Link) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Link.Merge(m, src) -} -func (m *Link) XXX_Size() int { - return m.Size() -} -func (m *Link) XXX_DiscardUnknown() { - xxx_messageInfo_Link.DiscardUnknown(m) -} - -var xxx_messageInfo_Link proto.InternalMessageInfo - -// ValueType describes the type and units of a value, with an optional aggregation temporality. -type ValueType struct { - TypeStrindex int32 `protobuf:"varint,1,opt,name=type_strindex,json=typeStrindex,proto3" json:"type_strindex,omitempty"` - UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"` - AggregationTemporality AggregationTemporality `protobuf:"varint,3,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.profiles.v1development.AggregationTemporality" json:"aggregation_temporality,omitempty"` -} - -func (m *ValueType) Reset() { *m = ValueType{} } -func (m *ValueType) String() string { return proto.CompactTextString(m) } -func (*ValueType) ProtoMessage() {} -func (*ValueType) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{7} -} -func (m *ValueType) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValueType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValueType.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValueType) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueType.Merge(m, src) -} -func (m *ValueType) XXX_Size() int { - return m.Size() -} -func (m *ValueType) XXX_DiscardUnknown() { - xxx_messageInfo_ValueType.DiscardUnknown(m) -} - -var xxx_messageInfo_ValueType proto.InternalMessageInfo - -func (m *ValueType) GetTypeStrindex() int32 { - if m != nil { - return m.TypeStrindex - } - return 0 -} - -func (m *ValueType) GetUnitStrindex() int32 { - if m != nil { - return m.UnitStrindex - } - return 0 -} - -func (m *ValueType) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// Each Sample records values encountered in some program -// context. The program context is typically a stack trace, perhaps -// augmented with auxiliary information like the thread-id, some -// indicator of a higher level request being handled etc. -type Sample struct { - // locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices. - LocationsStartIndex int32 `protobuf:"varint,1,opt,name=locations_start_index,json=locationsStartIndex,proto3" json:"locations_start_index,omitempty"` - // locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices. - // Supersedes location_index. - LocationsLength int32 `protobuf:"varint,2,opt,name=locations_length,json=locationsLength,proto3" json:"locations_length,omitempty"` - // The type and unit of each value is defined by the corresponding - // entry in Profile.sample_type. All samples must have the same - // number of values, the same as the length of Profile.sample_type. - // When aggregating multiple samples into a single sample, the - // result has a list of values that is the element-wise sum of the - // lists of the originals. - Value []int64 `protobuf:"varint,3,rep,packed,name=value,proto3" json:"value,omitempty"` - // References to attributes in ProfilesDictionary.attribute_table. [optional] - AttributeIndices []int32 `protobuf:"varint,4,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` - // Reference to link in ProfilesDictionary.link_table. [optional] - // - // Types that are valid to be assigned to LinkIndex_: - // *Sample_LinkIndex - LinkIndex_ isSample_LinkIndex_ `protobuf_oneof:"link_index_"` - // Timestamps associated with Sample represented in nanoseconds. These timestamps are expected - // to fall within the Profile's time range. [optional] - TimestampsUnixNano []uint64 `protobuf:"varint,6,rep,packed,name=timestamps_unix_nano,json=timestampsUnixNano,proto3" json:"timestamps_unix_nano,omitempty"` -} - -func (m *Sample) Reset() { *m = Sample{} } -func (m *Sample) String() string { return proto.CompactTextString(m) } -func (*Sample) ProtoMessage() {} -func (*Sample) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{8} -} -func (m *Sample) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Sample.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Sample) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sample.Merge(m, src) -} -func (m *Sample) XXX_Size() int { - return m.Size() -} -func (m *Sample) XXX_DiscardUnknown() { - xxx_messageInfo_Sample.DiscardUnknown(m) -} - -var xxx_messageInfo_Sample proto.InternalMessageInfo - -type isSample_LinkIndex_ interface { - isSample_LinkIndex_() - MarshalTo([]byte) (int, error) - Size() int -} - -type Sample_LinkIndex struct { - LinkIndex int32 `protobuf:"varint,5,opt,name=link_index,json=linkIndex,proto3,oneof" json:"link_index,omitempty"` -} - -func (*Sample_LinkIndex) isSample_LinkIndex_() {} - -func (m *Sample) GetLinkIndex_() isSample_LinkIndex_ { - if m != nil { - return m.LinkIndex_ - } - return nil -} - -func (m *Sample) GetLocationsStartIndex() int32 { - if m != nil { - return m.LocationsStartIndex - } - return 0 -} - -func (m *Sample) GetLocationsLength() int32 { - if m != nil { - return m.LocationsLength - } - return 0 -} - -func (m *Sample) GetValue() []int64 { - if m != nil { - return m.Value - } - return nil -} - -func (m *Sample) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -func (m *Sample) GetLinkIndex() int32 { - if x, ok := m.GetLinkIndex_().(*Sample_LinkIndex); ok { - return x.LinkIndex - } - return 0 -} - -func (m *Sample) GetTimestampsUnixNano() []uint64 { - if m != nil { - return m.TimestampsUnixNano - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Sample) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Sample_LinkIndex)(nil), - } -} - -// Describes the mapping of a binary in memory, including its address range, -// file offset, and metadata like build ID -type Mapping struct { - // Address at which the binary (or DLL) is loaded into memory. - MemoryStart uint64 `protobuf:"varint,1,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"` - // The limit of the address range occupied by this mapping. - MemoryLimit uint64 `protobuf:"varint,2,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` - // Offset in the binary that corresponds to the first mapped address. - FileOffset uint64 `protobuf:"varint,3,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"` - // The object this entry is loaded from. This can be a filename on - // disk for the main binary and shared libraries, or virtual - // abstractions like "[vdso]". - FilenameStrindex int32 `protobuf:"varint,4,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` - // References to attributes in ProfilesDictionary.attribute_table. [optional] - AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` - // The following fields indicate the resolution of symbolic info. - HasFunctions bool `protobuf:"varint,6,opt,name=has_functions,json=hasFunctions,proto3" json:"has_functions,omitempty"` - HasFilenames bool `protobuf:"varint,7,opt,name=has_filenames,json=hasFilenames,proto3" json:"has_filenames,omitempty"` - HasLineNumbers bool `protobuf:"varint,8,opt,name=has_line_numbers,json=hasLineNumbers,proto3" json:"has_line_numbers,omitempty"` - HasInlineFrames bool `protobuf:"varint,9,opt,name=has_inline_frames,json=hasInlineFrames,proto3" json:"has_inline_frames,omitempty"` -} - -func (m *Mapping) Reset() { *m = Mapping{} } -func (m *Mapping) String() string { return proto.CompactTextString(m) } -func (*Mapping) ProtoMessage() {} -func (*Mapping) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{9} -} -func (m *Mapping) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Mapping.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Mapping) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mapping.Merge(m, src) -} -func (m *Mapping) XXX_Size() int { - return m.Size() -} -func (m *Mapping) XXX_DiscardUnknown() { - xxx_messageInfo_Mapping.DiscardUnknown(m) -} - -var xxx_messageInfo_Mapping proto.InternalMessageInfo - -func (m *Mapping) GetMemoryStart() uint64 { - if m != nil { - return m.MemoryStart - } - return 0 -} - -func (m *Mapping) GetMemoryLimit() uint64 { - if m != nil { - return m.MemoryLimit - } - return 0 -} - -func (m *Mapping) GetFileOffset() uint64 { - if m != nil { - return m.FileOffset - } - return 0 -} - -func (m *Mapping) GetFilenameStrindex() int32 { - if m != nil { - return m.FilenameStrindex - } - return 0 -} - -func (m *Mapping) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -func (m *Mapping) GetHasFunctions() bool { - if m != nil { - return m.HasFunctions - } - return false -} - -func (m *Mapping) GetHasFilenames() bool { - if m != nil { - return m.HasFilenames - } - return false -} - -func (m *Mapping) GetHasLineNumbers() bool { - if m != nil { - return m.HasLineNumbers - } - return false -} - -func (m *Mapping) GetHasInlineFrames() bool { - if m != nil { - return m.HasInlineFrames - } - return false -} - -// Describes function and line table debug information. -type Location struct { - // Reference to mapping in ProfilesDictionary.mapping_table. - // It can be unset if the mapping is unknown or not applicable for - // this profile type. - // - // Types that are valid to be assigned to MappingIndex_: - // *Location_MappingIndex - MappingIndex_ isLocation_MappingIndex_ `protobuf_oneof:"mapping_index_"` - // The instruction address for this location, if available. It - // should be within [Mapping.memory_start...Mapping.memory_limit] - // for the corresponding mapping. A non-leaf address may be in the - // middle of a call instruction. It is up to display tools to find - // the beginning of the instruction if necessary. - Address uint64 `protobuf:"varint,2,opt,name=address,proto3" json:"address,omitempty"` - // Multiple line indicates this location has inlined functions, - // where the last entry represents the caller into which the - // preceding entries were inlined. - // - // E.g., if memcpy() is inlined into printf: - // line[0].function_name == "memcpy" - // line[1].function_name == "printf" - Line []*Line `protobuf:"bytes,3,rep,name=line,proto3" json:"line,omitempty"` - // Provides an indication that multiple symbols map to this location's - // address, for example due to identical code folding by the linker. In that - // case the line information above represents one of the multiple - // symbols. This field must be recomputed when the symbolization state of the - // profile changes. - IsFolded bool `protobuf:"varint,4,opt,name=is_folded,json=isFolded,proto3" json:"is_folded,omitempty"` - // References to attributes in ProfilesDictionary.attribute_table. [optional] - AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` -} - -func (m *Location) Reset() { *m = Location{} } -func (m *Location) String() string { return proto.CompactTextString(m) } -func (*Location) ProtoMessage() {} -func (*Location) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{10} -} -func (m *Location) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Location.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Location) XXX_Merge(src proto.Message) { - xxx_messageInfo_Location.Merge(m, src) -} -func (m *Location) XXX_Size() int { - return m.Size() -} -func (m *Location) XXX_DiscardUnknown() { - xxx_messageInfo_Location.DiscardUnknown(m) -} - -var xxx_messageInfo_Location proto.InternalMessageInfo - -type isLocation_MappingIndex_ interface { - isLocation_MappingIndex_() - MarshalTo([]byte) (int, error) - Size() int -} - -type Location_MappingIndex struct { - MappingIndex int32 `protobuf:"varint,1,opt,name=mapping_index,json=mappingIndex,proto3,oneof" json:"mapping_index,omitempty"` -} - -func (*Location_MappingIndex) isLocation_MappingIndex_() {} - -func (m *Location) GetMappingIndex_() isLocation_MappingIndex_ { - if m != nil { - return m.MappingIndex_ - } - return nil -} - -func (m *Location) GetMappingIndex() int32 { - if x, ok := m.GetMappingIndex_().(*Location_MappingIndex); ok { - return x.MappingIndex - } - return 0 -} - -func (m *Location) GetAddress() uint64 { - if m != nil { - return m.Address - } - return 0 -} - -func (m *Location) GetLine() []*Line { - if m != nil { - return m.Line - } - return nil -} - -func (m *Location) GetIsFolded() bool { - if m != nil { - return m.IsFolded - } - return false -} - -func (m *Location) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Location) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Location_MappingIndex)(nil), - } -} - -// Details a specific line in a source code, linked to a function. -type Line struct { - // Reference to function in ProfilesDictionary.function_table. - FunctionIndex int32 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"` - // Line number in source code. 0 means unset. - Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` - // Column number in source code. 0 means unset. - Column int64 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` -} - -func (m *Line) Reset() { *m = Line{} } -func (m *Line) String() string { return proto.CompactTextString(m) } -func (*Line) ProtoMessage() {} -func (*Line) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{11} -} -func (m *Line) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Line) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Line.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Line) XXX_Merge(src proto.Message) { - xxx_messageInfo_Line.Merge(m, src) -} -func (m *Line) XXX_Size() int { - return m.Size() -} -func (m *Line) XXX_DiscardUnknown() { - xxx_messageInfo_Line.DiscardUnknown(m) -} - -var xxx_messageInfo_Line proto.InternalMessageInfo - -func (m *Line) GetFunctionIndex() int32 { - if m != nil { - return m.FunctionIndex - } - return 0 -} - -func (m *Line) GetLine() int64 { - if m != nil { - return m.Line - } - return 0 -} - -func (m *Line) GetColumn() int64 { - if m != nil { - return m.Column - } - return 0 -} - -// Describes a function, including its human-readable name, system name, -// source file, and starting line number in the source. -type Function struct { - // Function name. Empty string if not available. - NameStrindex int32 `protobuf:"varint,1,opt,name=name_strindex,json=nameStrindex,proto3" json:"name_strindex,omitempty"` - // Function name, as identified by the system. For instance, - // it can be a C++ mangled name. Empty string if not available. - SystemNameStrindex int32 `protobuf:"varint,2,opt,name=system_name_strindex,json=systemNameStrindex,proto3" json:"system_name_strindex,omitempty"` - // Source file containing the function. Empty string if not available. - FilenameStrindex int32 `protobuf:"varint,3,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` - // Line number in source file. 0 means unset. - StartLine int64 `protobuf:"varint,4,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` -} - -func (m *Function) Reset() { *m = Function{} } -func (m *Function) String() string { return proto.CompactTextString(m) } -func (*Function) ProtoMessage() {} -func (*Function) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{12} -} -func (m *Function) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Function) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Function.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Function) XXX_Merge(src proto.Message) { - xxx_messageInfo_Function.Merge(m, src) -} -func (m *Function) XXX_Size() int { - return m.Size() -} -func (m *Function) XXX_DiscardUnknown() { - xxx_messageInfo_Function.DiscardUnknown(m) -} - -var xxx_messageInfo_Function proto.InternalMessageInfo - -func (m *Function) GetNameStrindex() int32 { - if m != nil { - return m.NameStrindex - } - return 0 -} - -func (m *Function) GetSystemNameStrindex() int32 { - if m != nil { - return m.SystemNameStrindex - } - return 0 -} - -func (m *Function) GetFilenameStrindex() int32 { - if m != nil { - return m.FilenameStrindex - } - return 0 -} - -func (m *Function) GetStartLine() int64 { - if m != nil { - return m.StartLine - } - return 0 -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.profiles.v1development.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) - proto.RegisterType((*ProfilesDictionary)(nil), "opentelemetry.proto.profiles.v1development.ProfilesDictionary") - proto.RegisterType((*ProfilesData)(nil), "opentelemetry.proto.profiles.v1development.ProfilesData") - proto.RegisterType((*ResourceProfiles)(nil), "opentelemetry.proto.profiles.v1development.ResourceProfiles") - proto.RegisterType((*ScopeProfiles)(nil), "opentelemetry.proto.profiles.v1development.ScopeProfiles") - proto.RegisterType((*Profile)(nil), "opentelemetry.proto.profiles.v1development.Profile") - proto.RegisterType((*AttributeUnit)(nil), "opentelemetry.proto.profiles.v1development.AttributeUnit") - proto.RegisterType((*Link)(nil), "opentelemetry.proto.profiles.v1development.Link") - proto.RegisterType((*ValueType)(nil), "opentelemetry.proto.profiles.v1development.ValueType") - proto.RegisterType((*Sample)(nil), "opentelemetry.proto.profiles.v1development.Sample") - proto.RegisterType((*Mapping)(nil), "opentelemetry.proto.profiles.v1development.Mapping") - proto.RegisterType((*Location)(nil), "opentelemetry.proto.profiles.v1development.Location") - proto.RegisterType((*Line)(nil), "opentelemetry.proto.profiles.v1development.Line") - proto.RegisterType((*Function)(nil), "opentelemetry.proto.profiles.v1development.Function") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/profiles/v1development/profiles.proto", fileDescriptor_ddd0cf081a2fe76f) -} - -var fileDescriptor_ddd0cf081a2fe76f = []byte{ - // 1617 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x5b, 0x4f, 0x1c, 0xc9, - 0x15, 0xa6, 0xe7, 0x3e, 0x67, 0x2e, 0x0c, 0x15, 0x96, 0x9d, 0x6c, 0xb4, 0x30, 0x3b, 0xd6, 0x66, - 0x67, 0x89, 0x16, 0x0c, 0x6c, 0xa2, 0x45, 0x89, 0xa2, 0x00, 0x03, 0xde, 0xb1, 0x31, 0x90, 0x62, - 0x40, 0x71, 0x62, 0xa9, 0x53, 0x4c, 0xd7, 0x0c, 0x1d, 0xf7, 0x4d, 0x5d, 0x35, 0x88, 0x51, 0xfe, - 0x82, 0x1f, 0xf2, 0x3b, 0xa2, 0xe4, 0x37, 0xe4, 0xd5, 0x8f, 0x56, 0x9e, 0xac, 0x3c, 0x38, 0x91, - 0xfd, 0xe2, 0x44, 0xca, 0x7f, 0x88, 0xea, 0xd2, 0x3d, 0x17, 0x0f, 0x72, 0xda, 0x2f, 0x68, 0xea, - 0x9c, 0xaf, 0xbe, 0x53, 0xe7, 0x52, 0xa7, 0x4e, 0x03, 0xbb, 0x7e, 0x40, 0x3d, 0x4e, 0x1d, 0xea, - 0x52, 0x1e, 0x8e, 0x36, 0x83, 0xd0, 0xe7, 0xbe, 0xf8, 0xdb, 0xb7, 0x1d, 0xca, 0x36, 0x6f, 0xb6, - 0x2c, 0x7a, 0x43, 0x1d, 0x3f, 0x70, 0xa9, 0xc7, 0x63, 0xf1, 0x86, 0x44, 0xa1, 0xf5, 0xa9, 0xad, - 0x4a, 0xb8, 0x11, 0x63, 0xa6, 0xb6, 0x7e, 0xb6, 0x3c, 0xf0, 0x07, 0xbe, 0x22, 0x17, 0xbf, 0x14, - 0xf8, 0xb3, 0xf5, 0x79, 0xc6, 0x7b, 0xbe, 0xeb, 0xfa, 0xde, 0xe6, 0xcd, 0x96, 0xfe, 0xa5, 0xb1, - 0x1b, 0xf3, 0xb0, 0x21, 0x65, 0xfe, 0x30, 0xec, 0x51, 0x81, 0x8e, 0x7e, 0x2b, 0x7c, 0xf3, 0x55, - 0x06, 0xd0, 0x99, 0x3e, 0x4c, 0xdb, 0xee, 0x71, 0xdb, 0xf7, 0x48, 0x38, 0x42, 0xbf, 0x81, 0x8a, - 0x4b, 0x82, 0xc0, 0xf6, 0x06, 0x26, 0x27, 0x57, 0x0e, 0xad, 0x1b, 0x8d, 0x74, 0xab, 0xb4, 0xbd, - 0xb3, 0xf1, 0xff, 0x3b, 0xb3, 0xf1, 0x58, 0x11, 0xe0, 0xb2, 0x66, 0xea, 0x0a, 0x22, 0xf4, 0x3b, - 0xa8, 0x3a, 0x7e, 0x8f, 0x08, 0x43, 0x9a, 0x3a, 0x25, 0xa9, 0xbf, 0x4d, 0x42, 0x7d, 0xac, 0x19, - 0x70, 0x25, 0xe2, 0x8a, 0xc9, 0xfb, 0x43, 0xaf, 0x37, 0x41, 0x9e, 0x4e, 0x4e, 0x7e, 0xa4, 0x19, - 0x70, 0x25, 0xe2, 0x52, 0xe4, 0xa7, 0x00, 0x8e, 0xed, 0x3d, 0xd3, 0xc4, 0x19, 0x49, 0x7c, 0x3f, - 0xd1, 0xa9, 0x6d, 0xef, 0x19, 0x2e, 0x0a, 0x0e, 0x45, 0xf8, 0x05, 0x94, 0x19, 0x0f, 0xc7, 0x31, - 0xce, 0x36, 0xd2, 0xad, 0x22, 0x2e, 0x29, 0x99, 0x82, 0x5c, 0xc2, 0x22, 0xe1, 0x3c, 0xb4, 0xaf, - 0x86, 0x9c, 0x6a, 0x54, 0x4e, 0x1a, 0xfe, 0x6a, 0xae, 0x61, 0x5d, 0x0a, 0x37, 0x5b, 0x1b, 0x8f, - 0xe8, 0xe8, 0x92, 0x38, 0x43, 0xba, 0x9f, 0x79, 0xf1, 0x7a, 0x6d, 0x01, 0x57, 0x63, 0x16, 0xc5, - 0x7b, 0x35, 0xc9, 0x3b, 0xf4, 0x6c, 0xce, 0xea, 0x79, 0xc9, 0xbb, 0x9b, 0xc4, 0xa1, 0xbd, 0x88, - 0xe2, 0xc2, 0xb3, 0xf9, 0x84, 0x0d, 0xb1, 0x64, 0xcd, 0x7f, 0x1a, 0x50, 0x8e, 0x4b, 0x8b, 0x70, - 0x82, 0x6c, 0x58, 0x8a, 0xaa, 0xcf, 0x8c, 0x18, 0x75, 0x61, 0xfd, 0x22, 0x89, 0x59, 0xac, 0x49, - 0x22, 0x72, 0x5c, 0x0b, 0x67, 0x24, 0xc8, 0x02, 0xb0, 0xe2, 0x6a, 0xae, 0xa7, 0x1a, 0x46, 0xab, - 0xb4, 0xfd, 0xcb, 0x24, 0x36, 0xde, 0xbf, 0x13, 0x3a, 0x92, 0x13, 0xbc, 0xcd, 0x77, 0x06, 0xd4, - 0x66, 0x0f, 0x83, 0x1e, 0x41, 0x21, 0x3a, 0x4e, 0xdd, 0x90, 0x86, 0xbf, 0x9e, 0x6b, 0x38, 0xbe, - 0x88, 0x37, 0x5b, 0xb1, 0x47, 0xda, 0x46, 0x4c, 0x80, 0x7e, 0x0f, 0x55, 0xd6, 0xf3, 0x83, 0x89, - 0x78, 0xa5, 0x92, 0xa7, 0xe9, 0x5c, 0x30, 0xc4, 0xc1, 0xaa, 0xb0, 0xc9, 0x25, 0xfa, 0x1c, 0x80, - 0xf5, 0xae, 0xa9, 0x4b, 0xcc, 0x61, 0xe8, 0xd4, 0xd3, 0x0d, 0xa3, 0x55, 0xc4, 0x45, 0x25, 0xb9, - 0x08, 0x9d, 0x87, 0xb9, 0xc2, 0xbb, 0x7c, 0xed, 0xdf, 0xf9, 0xe6, 0x4b, 0x03, 0x2a, 0x53, 0x3c, - 0xe8, 0x14, 0xb2, 0x92, 0x49, 0x3b, 0xb9, 0xf3, 0x81, 0x82, 0xec, 0x78, 0x8c, 0x87, 0x43, 0x71, - 0x1e, 0x79, 0x5f, 0x25, 0x97, 0x76, 0x57, 0xf1, 0xa0, 0x53, 0x28, 0xcc, 0x78, 0xb9, 0xf3, 0x11, - 0x19, 0xc3, 0x31, 0xc9, 0x07, 0x5c, 0x6b, 0xfe, 0x25, 0x07, 0x79, 0xbd, 0x09, 0x5d, 0x42, 0x89, - 0x11, 0x37, 0x70, 0xa8, 0xc9, 0x47, 0x41, 0xd4, 0xed, 0x7e, 0x9a, 0xc4, 0xbc, 0xbc, 0x6d, 0xdd, - 0x51, 0x40, 0x31, 0x28, 0x26, 0xf1, 0x1b, 0x3d, 0x84, 0x9c, 0x5a, 0x69, 0x8f, 0xb6, 0x13, 0xe5, - 0x4d, 0xee, 0xc4, 0x9a, 0x01, 0x7d, 0x0d, 0xb5, 0xb8, 0x73, 0xda, 0x9e, 0x65, 0xf7, 0x28, 0x93, - 0xed, 0x2d, 0x8b, 0x17, 0x23, 0x79, 0x47, 0x89, 0x85, 0xe7, 0xdc, 0x76, 0xa9, 0xe9, 0x11, 0xcf, - 0x67, 0xf5, 0x4c, 0xc3, 0x68, 0xa5, 0x71, 0x51, 0x48, 0x4e, 0x84, 0x00, 0x7d, 0x09, 0x55, 0x6b, - 0x18, 0x2a, 0x26, 0x05, 0xc9, 0x4a, 0x48, 0x25, 0x92, 0x2a, 0xd8, 0x53, 0x28, 0x05, 0x34, 0xb4, - 0x7d, 0x4b, 0x05, 0x25, 0x27, 0xf3, 0xfc, 0x71, 0x41, 0x89, 0x2e, 0x8f, 0xe2, 0x93, 0xa1, 0x59, - 0x81, 0x9c, 0x5a, 0xd5, 0xf3, 0xd2, 0xb8, 0x5e, 0xa1, 0x6f, 0x00, 0x89, 0xaa, 0xa1, 0x1e, 0x37, - 0x65, 0x27, 0x54, 0x8e, 0x16, 0xa4, 0xa3, 0x4b, 0x5a, 0x73, 0x1e, 0x2b, 0xd0, 0x2e, 0xfc, 0xd0, - 0xa2, 0x7d, 0x32, 0x74, 0xb8, 0x39, 0x91, 0x41, 0x11, 0x20, 0x7a, 0x5b, 0x2f, 0x36, 0x8c, 0x56, - 0x16, 0xaf, 0x68, 0xc0, 0x79, 0x9c, 0x97, 0x8e, 0xd0, 0xa2, 0x2b, 0x00, 0x7d, 0x6e, 0xd3, 0xb6, - 0xea, 0xd0, 0x30, 0x5a, 0xe5, 0xfd, 0x03, 0x71, 0xce, 0x7f, 0xbc, 0x5e, 0xfb, 0xf9, 0xc0, 0x9f, - 0x71, 0xd4, 0x16, 0x6f, 0xae, 0xe3, 0xd0, 0x1e, 0xf7, 0xc3, 0xcd, 0xc0, 0x22, 0x9c, 0x6c, 0xda, - 0x1e, 0xa7, 0xa1, 0x47, 0x9c, 0x4d, 0xb1, 0x8a, 0x0a, 0xb0, 0xd3, 0xc6, 0x45, 0x4d, 0xdb, 0xb1, - 0xd0, 0x77, 0x50, 0xb7, 0x42, 0x3f, 0x08, 0xa8, 0x65, 0xc6, 0xed, 0x91, 0x99, 0x3d, 0x7f, 0xe8, - 0xf1, 0x7a, 0xa9, 0x61, 0xb4, 0x2a, 0x78, 0x45, 0xeb, 0xe3, 0x66, 0xca, 0x0e, 0x84, 0x16, 0xfd, - 0x0c, 0x3e, 0xf5, 0x43, 0x7b, 0x60, 0x7b, 0xc4, 0x31, 0x03, 0x32, 0x72, 0x7c, 0x62, 0x99, 0x7d, - 0x3f, 0x74, 0x09, 0xaf, 0x97, 0x65, 0x29, 0x7f, 0x12, 0xa9, 0xcf, 0x94, 0xf6, 0x48, 0x2a, 0x45, - 0x99, 0xcc, 0xee, 0xab, 0x57, 0x84, 0x6f, 0x78, 0x71, 0x66, 0x03, 0xfa, 0x09, 0x2c, 0x8d, 0x5f, - 0x81, 0x28, 0xd2, 0x55, 0x19, 0xe9, 0x5a, 0xac, 0xd0, 0x35, 0xd5, 0xfc, 0x03, 0x54, 0xa6, 0xfa, - 0x3d, 0xfa, 0x16, 0x56, 0xc6, 0xbb, 0x9f, 0xd1, 0x91, 0x4e, 0x17, 0xbd, 0x95, 0x1d, 0x21, 0x8b, - 0x97, 0x63, 0xed, 0x23, 0x3a, 0x3a, 0xd7, 0x3a, 0x74, 0x0f, 0x2a, 0xe2, 0xbd, 0x19, 0x83, 0x53, - 0x12, 0x5c, 0x16, 0xc2, 0x08, 0xd4, 0xfc, 0x9b, 0x01, 0x19, 0xf1, 0x5a, 0xa2, 0xa7, 0x50, 0xe0, - 0x21, 0xe9, 0xc9, 0x04, 0x19, 0x32, 0x41, 0x7b, 0x3a, 0x41, 0xbb, 0xc9, 0x13, 0xd4, 0x15, 0x4c, - 0x9d, 0x36, 0xce, 0x4b, 0xca, 0x8e, 0x85, 0x9e, 0x40, 0x9e, 0x05, 0xc4, 0x13, 0xe4, 0x29, 0x49, - 0xfe, 0x2b, 0x4d, 0xfe, 0x5d, 0x72, 0xf2, 0xf3, 0x80, 0x78, 0x9d, 0x36, 0xce, 0x09, 0xc2, 0x8e, - 0xd5, 0xfc, 0xbb, 0x01, 0xc5, 0xb8, 0xfa, 0x85, 0xd3, 0xb2, 0x2a, 0x67, 0x22, 0x54, 0x16, 0xc2, - 0x44, 0x91, 0x41, 0x7f, 0x84, 0x4f, 0xc9, 0x60, 0x10, 0xd2, 0x81, 0x9e, 0xa0, 0xa8, 0x1b, 0xf8, - 0x21, 0x71, 0x6c, 0x3e, 0x92, 0x0d, 0xae, 0xba, 0xbd, 0x9f, 0xe8, 0x01, 0x1f, 0x53, 0x75, 0xc7, - 0x4c, 0x78, 0x85, 0xcc, 0x95, 0x37, 0x9f, 0xa7, 0x20, 0xa7, 0x2e, 0x11, 0xda, 0x86, 0x4f, 0xa2, - 0xa6, 0xc3, 0x4c, 0xc6, 0x49, 0xc8, 0xcd, 0x49, 0xcf, 0x7e, 0x10, 0x2b, 0xcf, 0x85, 0x4e, 0xdd, - 0xb7, 0x89, 0x06, 0xc6, 0x4c, 0x87, 0x7a, 0x03, 0x7e, 0xad, 0x7d, 0x8c, 0x1b, 0x18, 0x3b, 0x96, - 0x62, 0xb4, 0x0c, 0xd9, 0x1b, 0x11, 0x3d, 0xd9, 0xe0, 0xd2, 0x58, 0x2d, 0xe6, 0xd7, 0x6b, 0x66, - 0x7e, 0xbd, 0xa2, 0x35, 0x3d, 0xae, 0xa9, 0x63, 0x89, 0x06, 0x97, 0xfd, 0x7e, 0x41, 0x8d, 0x5f, - 0xea, 0x38, 0xf7, 0x61, 0x59, 0xb4, 0x44, 0xc6, 0x89, 0x1b, 0x30, 0x31, 0x04, 0xdd, 0xca, 0x66, - 0x28, 0x07, 0xac, 0x0c, 0x46, 0x63, 0xdd, 0x85, 0x67, 0xdf, 0x8a, 0x8e, 0xb8, 0x5f, 0x81, 0xd2, - 0x98, 0xd2, 0x6c, 0xfe, 0x27, 0x05, 0x79, 0x3d, 0xe4, 0x8a, 0x59, 0xce, 0xa5, 0xae, 0x1f, 0x8e, - 0x54, 0x30, 0x64, 0x18, 0x32, 0xb8, 0xa4, 0x64, 0x32, 0x06, 0x13, 0x10, 0xc7, 0x76, 0x6d, 0x2e, - 0x5d, 0x8f, 0x21, 0xc7, 0x42, 0x84, 0xd6, 0xa0, 0x24, 0xdb, 0x91, 0xdf, 0xef, 0x33, 0xca, 0x65, - 0x46, 0x33, 0x18, 0x84, 0xe8, 0x54, 0x4a, 0x44, 0x04, 0xc4, 0xca, 0x23, 0xee, 0x44, 0x31, 0x65, - 0x64, 0x0c, 0x6b, 0x91, 0x22, 0xae, 0x95, 0xb9, 0xe1, 0xca, 0xde, 0x11, 0xae, 0x7b, 0x50, 0xb9, - 0x26, 0xcc, 0x8c, 0x46, 0x5e, 0x26, 0xdb, 0x7d, 0x01, 0x97, 0xaf, 0x09, 0x8b, 0x06, 0xe2, 0x31, - 0x48, 0x5b, 0x62, 0xb2, 0x75, 0x6b, 0x50, 0x24, 0x43, 0x2d, 0xa8, 0x09, 0x90, 0x63, 0x7b, 0xd4, - 0xf4, 0x86, 0xee, 0x15, 0x0d, 0x45, 0xfb, 0x16, 0xb8, 0xea, 0x35, 0x61, 0xc7, 0xb6, 0x47, 0x4f, - 0x94, 0x14, 0xad, 0xc3, 0x92, 0x40, 0xda, 0x9e, 0xc4, 0xf6, 0x43, 0x49, 0x59, 0x94, 0xd0, 0xc5, - 0x6b, 0xc2, 0x3a, 0x52, 0x7e, 0x24, 0xc5, 0xcd, 0xff, 0x1a, 0x50, 0x88, 0xc6, 0x7e, 0xf4, 0xe5, - 0xf8, 0xf3, 0x64, 0xa2, 0xea, 0xbe, 0x5f, 0x88, 0xbf, 0x35, 0x54, 0x86, 0xeb, 0x90, 0x27, 0x96, - 0x15, 0x52, 0xc6, 0x74, 0xb0, 0xa3, 0x25, 0x6a, 0x43, 0x46, 0x70, 0xeb, 0xcf, 0x83, 0xa4, 0x53, - 0x3c, 0xc5, 0x72, 0x37, 0xfa, 0x11, 0x14, 0x6d, 0x66, 0xf6, 0x7d, 0xc7, 0xa2, 0x96, 0xcc, 0x42, - 0x01, 0x17, 0x6c, 0x76, 0x24, 0xd7, 0x89, 0xa2, 0xbf, 0x5f, 0x83, 0xea, 0x94, 0x43, 0x66, 0xf3, - 0x89, 0xec, 0x80, 0x54, 0xbc, 0xd5, 0xf1, 0x27, 0xcd, 0xe4, 0x0d, 0x8b, 0x3f, 0x4e, 0x94, 0xab, - 0x48, 0x3b, 0x94, 0x92, 0x6f, 0xa9, 0x3a, 0xde, 0x0a, 0xe4, 0x7a, 0xbe, 0x33, 0x74, 0x3d, 0x59, - 0x48, 0x69, 0xac, 0x57, 0xcd, 0xbf, 0x1a, 0x50, 0x88, 0x72, 0x2a, 0x52, 0x3a, 0x5d, 0x4d, 0xba, - 0x35, 0x4d, 0x55, 0xd2, 0x7d, 0x58, 0x66, 0x23, 0xc6, 0xa9, 0x6b, 0x4e, 0x63, 0xd5, 0xed, 0x45, - 0x4a, 0x77, 0x32, 0x53, 0x7b, 0xef, 0x17, 0x6a, 0xfa, 0x8e, 0x42, 0x15, 0x83, 0x9a, 0x6c, 0x21, - 0xd2, 0x05, 0x3d, 0xae, 0x48, 0x89, 0x08, 0xc1, 0xfa, 0x73, 0x03, 0x56, 0xe6, 0x77, 0x2a, 0xf4, - 0x15, 0xdc, 0xdb, 0x7b, 0xf0, 0x00, 0x1f, 0x3e, 0xd8, 0xeb, 0x76, 0x4e, 0x4f, 0xcc, 0xee, 0xe1, - 0xe3, 0xb3, 0x53, 0xbc, 0x77, 0xdc, 0xe9, 0x3e, 0x31, 0x2f, 0x4e, 0xce, 0xcf, 0x0e, 0x0f, 0x3a, - 0x47, 0x9d, 0xc3, 0x76, 0x6d, 0x01, 0x7d, 0x01, 0x9f, 0xdf, 0x05, 0x6c, 0x1f, 0x1e, 0x77, 0xf7, - 0x6a, 0x06, 0xfa, 0x31, 0x34, 0xef, 0x82, 0x1c, 0x5c, 0x3c, 0xbe, 0x38, 0xde, 0xeb, 0x76, 0x2e, - 0x0f, 0x6b, 0xa9, 0xfd, 0x57, 0xc6, 0x8b, 0x37, 0xab, 0xc6, 0xcb, 0x37, 0xab, 0xc6, 0xbf, 0xde, - 0xac, 0x1a, 0x7f, 0x7a, 0xbb, 0xba, 0xf0, 0xf2, 0xed, 0xea, 0xc2, 0xab, 0xb7, 0xab, 0x0b, 0xf0, - 0x8d, 0xed, 0x27, 0x28, 0xa5, 0xfd, 0x4a, 0x34, 0x4c, 0x9f, 0x09, 0xd4, 0x99, 0xf1, 0xdb, 0x5f, - 0x27, 0x7e, 0x77, 0xd4, 0x17, 0xfe, 0x80, 0x7a, 0x77, 0xfc, 0x37, 0xe2, 0xcf, 0xa9, 0xf5, 0xd3, - 0x80, 0x7a, 0xdd, 0x98, 0x50, 0x9a, 0x8a, 0x3f, 0x6f, 0x36, 0x2e, 0xb7, 0xda, 0x63, 0xf0, 0x55, - 0x4e, 0xb2, 0xed, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x89, 0x14, 0x57, 0x2d, 0xef, 0x10, 0x00, - 0x00, -} - -func (m *ProfilesDictionary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProfilesDictionary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProfilesDictionary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AttributeUnits) > 0 { - for iNdEx := len(m.AttributeUnits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AttributeUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.AttributeTable) > 0 { - for iNdEx := len(m.AttributeTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AttributeTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.StringTable) > 0 { - for iNdEx := len(m.StringTable) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StringTable[iNdEx]) - copy(dAtA[i:], m.StringTable[iNdEx]) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.StringTable[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.LinkTable) > 0 { - for iNdEx := len(m.LinkTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LinkTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.FunctionTable) > 0 { - for iNdEx := len(m.FunctionTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FunctionTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.LocationTable) > 0 { - for iNdEx := len(m.LocationTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LocationTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.MappingTable) > 0 { - for iNdEx := len(m.MappingTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MappingTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ProfilesData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProfilesData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProfilesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Dictionary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.ResourceProfiles) > 0 { - for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceProfiles) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceProfiles) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeProfiles) > 0 { - for iNdEx := len(m.ScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeProfiles) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeProfiles) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Profiles) > 0 { - for iNdEx := len(m.Profiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Profiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Profile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Profile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AttributeIndices) > 0 { - dAtA5 := make([]byte, len(m.AttributeIndices)*10) - var j4 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j4++ - } - dAtA5[j4] = uint8(num) - j4++ - } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintProfiles(dAtA, i, uint64(j4)) - i-- - dAtA[i] = 0x72 - } - if len(m.OriginalPayload) > 0 { - i -= len(m.OriginalPayload) - copy(dAtA[i:], m.OriginalPayload) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayload))) - i-- - dAtA[i] = 0x6a - } - if len(m.OriginalPayloadFormat) > 0 { - i -= len(m.OriginalPayloadFormat) - copy(dAtA[i:], m.OriginalPayloadFormat) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayloadFormat))) - i-- - dAtA[i] = 0x62 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x58 - } - { - size := m.ProfileId.Size() - i -= size - if _, err := m.ProfileId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - if m.DefaultSampleTypeIndex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DefaultSampleTypeIndex)) - i-- - dAtA[i] = 0x48 - } - if len(m.CommentStrindices) > 0 { - dAtA7 := make([]byte, len(m.CommentStrindices)*10) - var j6 int - for _, num1 := range m.CommentStrindices { - num := uint64(num1) - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintProfiles(dAtA, i, uint64(j6)) - i-- - dAtA[i] = 0x42 - } - if m.Period != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Period)) - i-- - dAtA[i] = 0x38 - } - { - size, err := m.PeriodType.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if m.DurationNanos != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DurationNanos)) - i-- - dAtA[i] = 0x28 - } - if m.TimeNanos != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.TimeNanos)) - i-- - dAtA[i] = 0x20 - } - if len(m.LocationIndices) > 0 { - dAtA10 := make([]byte, len(m.LocationIndices)*10) - var j9 int - for _, num1 := range m.LocationIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - dAtA10[j9] = uint8(num) - j9++ - } - i -= j9 - copy(dAtA[i:], dAtA10[:j9]) - i = encodeVarintProfiles(dAtA, i, uint64(j9)) - i-- - dAtA[i] = 0x1a - } - if len(m.Sample) > 0 { - for iNdEx := len(m.Sample) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Sample[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.SampleType) > 0 { - for iNdEx := len(m.SampleType) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SampleType[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AttributeUnit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeUnit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttributeUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnitStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.UnitStrindex)) - i-- - dAtA[i] = 0x10 - } - if m.AttributeKeyStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.AttributeKeyStrindex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Link) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ValueType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValueType) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueType) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationTemporality != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x18 - } - if m.UnitStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.UnitStrindex)) - i-- - dAtA[i] = 0x10 - } - if m.TypeStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.TypeStrindex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Sample) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Sample) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TimestampsUnixNano) > 0 { - dAtA12 := make([]byte, len(m.TimestampsUnixNano)*10) - var j11 int - for _, num := range m.TimestampsUnixNano { - for num >= 1<<7 { - dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - dAtA12[j11] = uint8(num) - j11++ - } - i -= j11 - copy(dAtA[i:], dAtA12[:j11]) - i = encodeVarintProfiles(dAtA, i, uint64(j11)) - i-- - dAtA[i] = 0x32 - } - if m.LinkIndex_ != nil { - { - size := m.LinkIndex_.Size() - i -= size - if _, err := m.LinkIndex_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.AttributeIndices) > 0 { - dAtA14 := make([]byte, len(m.AttributeIndices)*10) - var j13 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j13++ - } - dAtA14[j13] = uint8(num) - j13++ - } - i -= j13 - copy(dAtA[i:], dAtA14[:j13]) - i = encodeVarintProfiles(dAtA, i, uint64(j13)) - i-- - dAtA[i] = 0x22 - } - if len(m.Value) > 0 { - dAtA16 := make([]byte, len(m.Value)*10) - var j15 int - for _, num1 := range m.Value { - num := uint64(num1) - for num >= 1<<7 { - dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - dAtA16[j15] = uint8(num) - j15++ - } - i -= j15 - copy(dAtA[i:], dAtA16[:j15]) - i = encodeVarintProfiles(dAtA, i, uint64(j15)) - i-- - dAtA[i] = 0x1a - } - if m.LocationsLength != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.LocationsLength)) - i-- - dAtA[i] = 0x10 - } - if m.LocationsStartIndex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.LocationsStartIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Sample_LinkIndex) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sample_LinkIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProfiles(dAtA, i, uint64(m.LinkIndex)) - i-- - dAtA[i] = 0x28 - return len(dAtA) - i, nil -} -func (m *Mapping) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HasInlineFrames { - i-- - if m.HasInlineFrames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.HasLineNumbers { - i-- - if m.HasLineNumbers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.HasFilenames { - i-- - if m.HasFilenames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.HasFunctions { - i-- - if m.HasFunctions { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.AttributeIndices) > 0 { - dAtA18 := make([]byte, len(m.AttributeIndices)*10) - var j17 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j17++ - } - dAtA18[j17] = uint8(num) - j17++ - } - i -= j17 - copy(dAtA[i:], dAtA18[:j17]) - i = encodeVarintProfiles(dAtA, i, uint64(j17)) - i-- - dAtA[i] = 0x2a - } - if m.FilenameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FilenameStrindex)) - i-- - dAtA[i] = 0x20 - } - if m.FileOffset != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FileOffset)) - i-- - dAtA[i] = 0x18 - } - if m.MemoryLimit != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.MemoryLimit)) - i-- - dAtA[i] = 0x10 - } - if m.MemoryStart != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.MemoryStart)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Location) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Location) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AttributeIndices) > 0 { - dAtA20 := make([]byte, len(m.AttributeIndices)*10) - var j19 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA20[j19] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j19++ - } - dAtA20[j19] = uint8(num) - j19++ - } - i -= j19 - copy(dAtA[i:], dAtA20[:j19]) - i = encodeVarintProfiles(dAtA, i, uint64(j19)) - i-- - dAtA[i] = 0x2a - } - if m.IsFolded { - i-- - if m.IsFolded { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Line) > 0 { - for iNdEx := len(m.Line) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Line[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Address != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Address)) - i-- - dAtA[i] = 0x10 - } - if m.MappingIndex_ != nil { - { - size := m.MappingIndex_.Size() - i -= size - if _, err := m.MappingIndex_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Location_MappingIndex) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Location_MappingIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProfiles(dAtA, i, uint64(m.MappingIndex)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *Line) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Line) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Line) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Column != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Column)) - i-- - dAtA[i] = 0x18 - } - if m.Line != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Line)) - i-- - dAtA[i] = 0x10 - } - if m.FunctionIndex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FunctionIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Function) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Function) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Function) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StartLine != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.StartLine)) - i-- - dAtA[i] = 0x20 - } - if m.FilenameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FilenameStrindex)) - i-- - dAtA[i] = 0x18 - } - if m.SystemNameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.SystemNameStrindex)) - i-- - dAtA[i] = 0x10 - } - if m.NameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.NameStrindex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintProfiles(dAtA []byte, offset int, v uint64) int { - offset -= sovProfiles(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ProfilesDictionary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.MappingTable) > 0 { - for _, e := range m.MappingTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.LocationTable) > 0 { - for _, e := range m.LocationTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.FunctionTable) > 0 { - for _, e := range m.FunctionTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.LinkTable) > 0 { - for _, e := range m.LinkTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.StringTable) > 0 { - for _, s := range m.StringTable { - l = len(s) - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.AttributeTable) > 0 { - for _, e := range m.AttributeTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.AttributeUnits) > 0 { - for _, e := range m.AttributeUnits { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - return n -} - -func (m *ProfilesData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for _, e := range m.ResourceProfiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = m.Dictionary.Size() - n += 1 + l + sovProfiles(uint64(l)) - return n -} - -func (m *ResourceProfiles) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovProfiles(uint64(l)) - if len(m.ScopeProfiles) > 0 { - for _, e := range m.ScopeProfiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - return n -} - -func (m *ScopeProfiles) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovProfiles(uint64(l)) - if len(m.Profiles) > 0 { - for _, e := range m.Profiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - return n -} - -func (m *Profile) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SampleType) > 0 { - for _, e := range m.SampleType { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.Sample) > 0 { - for _, e := range m.Sample { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.LocationIndices) > 0 { - l = 0 - for _, e := range m.LocationIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.TimeNanos != 0 { - n += 1 + sovProfiles(uint64(m.TimeNanos)) - } - if m.DurationNanos != 0 { - n += 1 + sovProfiles(uint64(m.DurationNanos)) - } - l = m.PeriodType.Size() - n += 1 + l + sovProfiles(uint64(l)) - if m.Period != 0 { - n += 1 + sovProfiles(uint64(m.Period)) - } - if len(m.CommentStrindices) > 0 { - l = 0 - for _, e := range m.CommentStrindices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.DefaultSampleTypeIndex != 0 { - n += 1 + sovProfiles(uint64(m.DefaultSampleTypeIndex)) - } - l = m.ProfileId.Size() - n += 1 + l + sovProfiles(uint64(l)) - if m.DroppedAttributesCount != 0 { - n += 1 + sovProfiles(uint64(m.DroppedAttributesCount)) - } - l = len(m.OriginalPayloadFormat) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - l = len(m.OriginalPayload) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - return n -} - -func (m *AttributeUnit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AttributeKeyStrindex != 0 { - n += 1 + sovProfiles(uint64(m.AttributeKeyStrindex)) - } - if m.UnitStrindex != 0 { - n += 1 + sovProfiles(uint64(m.UnitStrindex)) - } - return n -} - -func (m *Link) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceId.Size() - n += 1 + l + sovProfiles(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovProfiles(uint64(l)) - return n -} - -func (m *ValueType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypeStrindex != 0 { - n += 1 + sovProfiles(uint64(m.TypeStrindex)) - } - if m.UnitStrindex != 0 { - n += 1 + sovProfiles(uint64(m.UnitStrindex)) - } - if m.AggregationTemporality != 0 { - n += 1 + sovProfiles(uint64(m.AggregationTemporality)) - } - return n -} - -func (m *Sample) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LocationsStartIndex != 0 { - n += 1 + sovProfiles(uint64(m.LocationsStartIndex)) - } - if m.LocationsLength != 0 { - n += 1 + sovProfiles(uint64(m.LocationsLength)) - } - if len(m.Value) > 0 { - l = 0 - for _, e := range m.Value { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.LinkIndex_ != nil { - n += m.LinkIndex_.Size() - } - if len(m.TimestampsUnixNano) > 0 { - l = 0 - for _, e := range m.TimestampsUnixNano { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - return n -} - -func (m *Sample_LinkIndex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProfiles(uint64(m.LinkIndex)) - return n -} -func (m *Mapping) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MemoryStart != 0 { - n += 1 + sovProfiles(uint64(m.MemoryStart)) - } - if m.MemoryLimit != 0 { - n += 1 + sovProfiles(uint64(m.MemoryLimit)) - } - if m.FileOffset != 0 { - n += 1 + sovProfiles(uint64(m.FileOffset)) - } - if m.FilenameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.FilenameStrindex)) - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.HasFunctions { - n += 2 - } - if m.HasFilenames { - n += 2 - } - if m.HasLineNumbers { - n += 2 - } - if m.HasInlineFrames { - n += 2 - } - return n -} - -func (m *Location) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MappingIndex_ != nil { - n += m.MappingIndex_.Size() - } - if m.Address != 0 { - n += 1 + sovProfiles(uint64(m.Address)) - } - if len(m.Line) > 0 { - for _, e := range m.Line { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if m.IsFolded { - n += 2 - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - return n -} - -func (m *Location_MappingIndex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProfiles(uint64(m.MappingIndex)) - return n -} -func (m *Line) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FunctionIndex != 0 { - n += 1 + sovProfiles(uint64(m.FunctionIndex)) - } - if m.Line != 0 { - n += 1 + sovProfiles(uint64(m.Line)) - } - if m.Column != 0 { - n += 1 + sovProfiles(uint64(m.Column)) - } - return n -} - -func (m *Function) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.NameStrindex)) - } - if m.SystemNameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.SystemNameStrindex)) - } - if m.FilenameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.FilenameStrindex)) - } - if m.StartLine != 0 { - n += 1 + sovProfiles(uint64(m.StartLine)) - } - return n -} - -func sovProfiles(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProfiles(x uint64) (n int) { - return sovProfiles(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ProfilesDictionary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProfilesDictionary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProfilesDictionary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MappingTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MappingTable = append(m.MappingTable, &Mapping{}) - if err := m.MappingTable[len(m.MappingTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LocationTable = append(m.LocationTable, &Location{}) - if err := m.LocationTable[len(m.LocationTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FunctionTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FunctionTable = append(m.FunctionTable, &Function{}) - if err := m.FunctionTable[len(m.FunctionTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LinkTable = append(m.LinkTable, &Link{}) - if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttributeTable = append(m.AttributeTable, v1.KeyValue{}) - if err := m.AttributeTable[len(m.AttributeTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeUnits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttributeUnits = append(m.AttributeUnits, &AttributeUnit{}) - if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProfilesData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProfilesData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProfilesData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceProfiles = append(m.ResourceProfiles, &ResourceProfiles{}) - if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dictionary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Dictionary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceProfiles) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceProfiles: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceProfiles: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeProfiles = append(m.ScopeProfiles, &ScopeProfiles{}) - if err := m.ScopeProfiles[len(m.ScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeProfiles) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeProfiles: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeProfiles: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Profiles = append(m.Profiles, &Profile{}) - if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Profile) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SampleType = append(m.SampleType, &ValueType{}) - if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sample = append(m.Sample, &Sample{}) - if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndices = append(m.LocationIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.LocationIndices) == 0 { - m.LocationIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndices = append(m.LocationIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeNanos", wireType) - } - m.TimeNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeNanos |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) - } - m.DurationNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationNanos |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PeriodType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - m.Period = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Period |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CommentStrindices = append(m.CommentStrindices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.CommentStrindices) == 0 { - m.CommentStrindices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CommentStrindices = append(m.CommentStrindices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field CommentStrindices", wireType) - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleTypeIndex", wireType) - } - m.DefaultSampleTypeIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DefaultSampleTypeIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProfileId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalPayloadFormat = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalPayload = append(m.OriginalPayload[:0], dAtA[iNdEx:postIndex]...) - if m.OriginalPayload == nil { - m.OriginalPayload = []byte{} - } - iNdEx = postIndex - case 14: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttributeUnit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeUnit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeUnit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeKeyStrindex", wireType) - } - m.AttributeKeyStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AttributeKeyStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) - } - m.UnitStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnitStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValueType) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValueType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValueType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeStrindex", wireType) - } - m.TypeStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TypeStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) - } - m.UnitStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnitStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sample) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sample: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationsStartIndex", wireType) - } - m.LocationsStartIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocationsStartIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationsLength", wireType) - } - m.LocationsLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocationsLength |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = append(m.Value, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Value) == 0 { - m.Value = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = append(m.Value, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - case 4: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LinkIndex", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LinkIndex_ = &Sample_LinkIndex{v} - case 6: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.TimestampsUnixNano) == 0 { - m.TimestampsUnixNano = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Mapping) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Mapping: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) - } - m.MemoryStart = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryStart |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) - } - m.MemoryLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) - } - m.FileOffset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileOffset |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) - } - m.FilenameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FilenameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasFunctions", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasFunctions = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasFilenames", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasFilenames = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasLineNumbers", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasLineNumbers = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasInlineFrames", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasInlineFrames = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Location) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Location: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MappingIndex", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MappingIndex_ = &Location_MappingIndex{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - m.Address = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Address |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Line = append(m.Line, &Line{}) - if err := m.Line[len(m.Line)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsFolded", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsFolded = bool(v != 0) - case 5: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Line) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Line: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Line: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FunctionIndex", wireType) - } - m.FunctionIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FunctionIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) - } - m.Line = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Line |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) - } - m.Column = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Column |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Function) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Function: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Function: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NameStrindex", wireType) - } - m.NameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SystemNameStrindex", wireType) - } - m.SystemNameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SystemNameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) - } - m.FilenameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FilenameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) - } - m.StartLine = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartLine |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProfiles(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProfiles - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProfiles - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProfiles - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProfiles = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProfiles = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProfiles = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go deleted file mode 100644 index eedc2c0a40e..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go +++ /dev/null @@ -1,450 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/resource/v1/resource.proto - -package v1 - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Resource information. -type Resource struct { - // 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"` - // 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"` - // Set of entities that participate in this Resource. - // - // Note: keys in the references MUST exist in attributes of this message. - // - // Status: [Development] - EntityRefs []*v1.EntityRef `protobuf:"bytes,3,rep,name=entity_refs,json=entityRefs,proto3" json:"entity_refs,omitempty"` -} - -func (m *Resource) Reset() { *m = Resource{} } -func (m *Resource) String() string { return proto.CompactTextString(m) } -func (*Resource) ProtoMessage() {} -func (*Resource) Descriptor() ([]byte, []int) { - return fileDescriptor_446f73eacf88f3f5, []int{0} -} -func (m *Resource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Resource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Resource) XXX_Merge(src proto.Message) { - xxx_messageInfo_Resource.Merge(m, src) -} -func (m *Resource) XXX_Size() int { - return m.Size() -} -func (m *Resource) XXX_DiscardUnknown() { - xxx_messageInfo_Resource.DiscardUnknown(m) -} - -var xxx_messageInfo_Resource proto.InternalMessageInfo - -func (m *Resource) GetAttributes() []v1.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Resource) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Resource) GetEntityRefs() []*v1.EntityRef { - if m != nil { - return m.EntityRefs - } - return nil -} - -func init() { - proto.RegisterType((*Resource)(nil), "opentelemetry.proto.resource.v1.Resource") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/resource/v1/resource.proto", fileDescriptor_446f73eacf88f3f5) -} - -var fileDescriptor_446f73eacf88f3f5 = []byte{ - // 334 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x6a, 0xfa, 0x40, - 0x10, 0xc6, 0xb3, 0xfa, 0xe7, 0x4f, 0x59, 0xf1, 0x12, 0x4a, 0x09, 0x1e, 0xa2, 0x78, 0xa9, 0xf4, - 0xb0, 0x21, 0xed, 0xa5, 0xd7, 0x5a, 0x5a, 0x28, 0xa5, 0x54, 0x42, 0xf1, 0xd0, 0x8b, 0xc4, 0x38, - 0x86, 0x40, 0xdc, 0x09, 0x9b, 0x89, 0xe0, 0x5b, 0xf4, 0x39, 0xfa, 0x02, 0x7d, 0x05, 0x8f, 0x1e, - 0x7b, 0x92, 0xa2, 0x2f, 0x52, 0xb2, 0x31, 0xa9, 0x2d, 0x82, 0xb7, 0x6f, 0xe7, 0xfb, 0xe6, 0x37, - 0xc3, 0x2c, 0x17, 0x98, 0x80, 0x24, 0x88, 0x61, 0x06, 0xa4, 0x16, 0x4e, 0xa2, 0x90, 0xd0, 0x51, - 0x90, 0x62, 0xa6, 0x02, 0x70, 0xe6, 0x6e, 0xa5, 0x85, 0xb6, 0xcc, 0xf6, 0xaf, 0x7c, 0x51, 0x14, - 0x55, 0x66, 0xee, 0xb6, 0x4e, 0x43, 0x0c, 0xb1, 0xc0, 0xe4, 0xaa, 0x48, 0xb4, 0x2e, 0x0e, 0x8d, - 0x09, 0x70, 0x36, 0x43, 0x99, 0x0f, 0x29, 0x54, 0x91, 0xed, 0xae, 0x19, 0x3f, 0xf1, 0x76, 0x44, - 0xf3, 0x89, 0x73, 0x9f, 0x48, 0x45, 0xe3, 0x8c, 0x20, 0xb5, 0x58, 0xa7, 0xde, 0x6b, 0x5c, 0x9e, - 0x8b, 0x43, 0x4b, 0xec, 0x18, 0x73, 0x57, 0x3c, 0xc2, 0x62, 0xe8, 0xc7, 0x19, 0xf4, 0xff, 0x2d, - 0xd7, 0x6d, 0xc3, 0xdb, 0x03, 0x98, 0xd7, 0xdc, 0x9a, 0x28, 0x4c, 0x12, 0x98, 0x8c, 0x7e, 0xaa, - 0xa3, 0x00, 0x33, 0x49, 0x56, 0xad, 0xc3, 0x7a, 0x4d, 0xef, 0x6c, 0xe7, 0xdf, 0x54, 0xf6, 0x6d, - 0xee, 0x9a, 0x0f, 0xbc, 0x01, 0x92, 0x22, 0x5a, 0x8c, 0x14, 0x4c, 0x53, 0xab, 0xae, 0x37, 0xe9, - 0x1d, 0xd9, 0xe4, 0x4e, 0x77, 0x78, 0x30, 0xf5, 0x38, 0x94, 0x32, 0xed, 0x7f, 0xb0, 0xe5, 0xc6, - 0x66, 0xab, 0x8d, 0xcd, 0xbe, 0x36, 0x36, 0x7b, 0xdb, 0xda, 0xc6, 0x6a, 0x6b, 0x1b, 0x9f, 0x5b, - 0xdb, 0xe0, 0xdd, 0x08, 0xc5, 0x91, 0x0b, 0xf7, 0x9b, 0xe5, 0x71, 0x06, 0xb9, 0x35, 0x60, 0xaf, - 0xf7, 0xe1, 0xdf, 0xa6, 0x28, 0x3f, 0x6e, 0x1c, 0x43, 0x40, 0xa8, 0x9c, 0x64, 0xe2, 0x93, 0xef, - 0x44, 0x92, 0x40, 0x49, 0x3f, 0x76, 0xf4, 0x4b, 0x53, 0x43, 0x90, 0xfb, 0x5f, 0xfd, 0x5e, 0x6b, - 0x3f, 0x27, 0x20, 0x5f, 0x2a, 0x8a, 0xe6, 0x8b, 0x72, 0x9a, 0x18, 0xba, 0xe3, 0xff, 0xba, 0xef, - 0xea, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x10, 0xa9, 0xec, 0x36, 0x02, 0x00, 0x00, -} - -func (m *Resource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EntityRefs) > 0 { - for iNdEx := len(m.EntityRefs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EntityRefs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResource(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintResource(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x10 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResource(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintResource(dAtA []byte, offset int, v uint64) int { - offset -= sovResource(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Resource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovResource(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovResource(uint64(m.DroppedAttributesCount)) - } - if len(m.EntityRefs) > 0 { - for _, e := range m.EntityRefs { - l = e.Size() - n += 1 + l + sovResource(uint64(l)) - } - } - return n -} - -func sovResource(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResource(x uint64) (n int) { - return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Resource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntityRefs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntityRefs = append(m.EntityRefs, &v1.EntityRef{}) - if err := m.EntityRefs[len(m.EntityRefs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResource(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResource - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResource(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthResource - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResource - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResource - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go deleted file mode 100644 index b0bddfb985f..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go +++ /dev/null @@ -1,3045 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/trace/v1/trace.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// 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 -) - -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", -} - -var 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) String() string { - return proto.EnumName(SpanFlags_name, int32(x)) -} - -func (SpanFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []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 -) - -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", -} - -var 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) String() string { - return proto.EnumName(Span_SpanKind_name, int32(x)) -} - -func (Span_SpanKind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []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 -) - -var Status_StatusCode_name = map[int32]string{ - 0: "STATUS_CODE_UNSET", - 1: "STATUS_CODE_OK", - 2: "STATUS_CODE_ERROR", -} - -var Status_StatusCode_value = map[string]int32{ - "STATUS_CODE_UNSET": 0, - "STATUS_CODE_OK": 1, - "STATUS_CODE_ERROR": 2, -} - -func (x Status_StatusCode) String() string { - return proto.EnumName(Status_StatusCode_name, int32(x)) -} - -func (Status_StatusCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []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 { - // 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 (m *TracesData) Reset() { *m = TracesData{} } -func (m *TracesData) String() string { return proto.CompactTextString(m) } -func (*TracesData) ProtoMessage() {} -func (*TracesData) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{0} -} -func (m *TracesData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TracesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TracesData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TracesData) XXX_Merge(src proto.Message) { - xxx_messageInfo_TracesData.Merge(m, src) -} -func (m *TracesData) XXX_Size() int { - return m.Size() -} -func (m *TracesData) XXX_DiscardUnknown() { - xxx_messageInfo_TracesData.DiscardUnknown(m) -} - -var xxx_messageInfo_TracesData proto.InternalMessageInfo - -func (m *TracesData) GetResourceSpans() []*ResourceSpans { - if m != nil { - return m.ResourceSpans - } - return nil -} - -// A collection of ScopeSpans from a Resource. -type ResourceSpans struct { - DeprecatedScopeSpans []*ScopeSpans `protobuf:"bytes,1000,rep,name=deprecated_scope_spans,json=deprecatedScopeSpans,proto3" json:"deprecated_scope_spans,omitempty"` - // 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"` - // 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 (m *ResourceSpans) Reset() { *m = ResourceSpans{} } -func (m *ResourceSpans) String() string { return proto.CompactTextString(m) } -func (*ResourceSpans) ProtoMessage() {} -func (*ResourceSpans) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{1} -} -func (m *ResourceSpans) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceSpans.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceSpans) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSpans.Merge(m, src) -} -func (m *ResourceSpans) XXX_Size() int { - return m.Size() -} -func (m *ResourceSpans) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSpans.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceSpans proto.InternalMessageInfo - -func (m *ResourceSpans) GetDeprecatedScopeSpans() []*ScopeSpans { - if m != nil { - return m.DeprecatedScopeSpans - } - return nil -} - -func (m *ResourceSpans) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceSpans) GetScopeSpans() []*ScopeSpans { - if m != nil { - return m.ScopeSpans - } - return nil -} - -func (m *ResourceSpans) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// 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 v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // 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 (m *ScopeSpans) Reset() { *m = ScopeSpans{} } -func (m *ScopeSpans) String() string { return proto.CompactTextString(m) } -func (*ScopeSpans) ProtoMessage() {} -func (*ScopeSpans) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{2} -} -func (m *ScopeSpans) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeSpans.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeSpans) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeSpans.Merge(m, src) -} -func (m *ScopeSpans) XXX_Size() int { - return m.Size() -} -func (m *ScopeSpans) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeSpans.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeSpans proto.InternalMessageInfo - -func (m *ScopeSpans) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeSpans) GetSpans() []*Span { - if m != nil { - return m.Spans - } - return nil -} - -func (m *ScopeSpans) GetSchemaUrl() string { - if m != nil { - return m.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 { - // 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 go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // 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 go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // 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 go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"parent_span_id"` - // 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"` - // 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"` -} - -func (m *Span) Reset() { *m = Span{} } -func (m *Span) String() string { return proto.CompactTextString(m) } -func (*Span) ProtoMessage() {} -func (*Span) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{3} -} -func (m *Span) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span.Merge(m, src) -} -func (m *Span) XXX_Size() int { - return m.Size() -} -func (m *Span) XXX_DiscardUnknown() { - xxx_messageInfo_Span.DiscardUnknown(m) -} - -var xxx_messageInfo_Span proto.InternalMessageInfo - -func (m *Span) GetTraceState() string { - if m != nil { - return m.TraceState - } - return "" -} - -func (m *Span) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *Span) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Span) GetKind() Span_SpanKind { - if m != nil { - return m.Kind - } - return Span_SPAN_KIND_UNSPECIFIED -} - -func (m *Span) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *Span) GetEndTimeUnixNano() uint64 { - if m != nil { - return m.EndTimeUnixNano - } - return 0 -} - -func (m *Span) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Span) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Span) GetEvents() []*Span_Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *Span) GetDroppedEventsCount() uint32 { - if m != nil { - return m.DroppedEventsCount - } - return 0 -} - -func (m *Span) GetLinks() []*Span_Link { - if m != nil { - return m.Links - } - return nil -} - -func (m *Span) GetDroppedLinksCount() uint32 { - if m != nil { - return m.DroppedLinksCount - } - return 0 -} - -func (m *Span) GetStatus() Status { - if m != nil { - return m.Status - } - return Status{} -} - -// Event is a time-stamped annotation of the span, consisting of user-supplied -// text description and key-value pairs. -type Span_Event struct { - // 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"` - // 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 (m *Span_Event) Reset() { *m = Span_Event{} } -func (m *Span_Event) String() string { return proto.CompactTextString(m) } -func (*Span_Event) ProtoMessage() {} -func (*Span_Event) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{3, 0} -} -func (m *Span_Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Span_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span_Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span_Event.Merge(m, src) -} -func (m *Span_Event) XXX_Size() int { - return m.Size() -} -func (m *Span_Event) XXX_DiscardUnknown() { - xxx_messageInfo_Span_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Span_Event proto.InternalMessageInfo - -func (m *Span_Event) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *Span_Event) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Span_Event) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Span_Event) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.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 { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // A unique identifier for the linked span. The ID is an 8-byte array. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // 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"` - // 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 (m *Span_Link) Reset() { *m = Span_Link{} } -func (m *Span_Link) String() string { return proto.CompactTextString(m) } -func (*Span_Link) ProtoMessage() {} -func (*Span_Link) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{3, 1} -} -func (m *Span_Link) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span_Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span_Link.Merge(m, src) -} -func (m *Span_Link) XXX_Size() int { - return m.Size() -} -func (m *Span_Link) XXX_DiscardUnknown() { - xxx_messageInfo_Span_Link.DiscardUnknown(m) -} - -var xxx_messageInfo_Span_Link proto.InternalMessageInfo - -func (m *Span_Link) GetTraceState() string { - if m != nil { - return m.TraceState - } - return "" -} - -func (m *Span_Link) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Span_Link) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Span_Link) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -// 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 `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 (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{4} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(m, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -func (m *Status) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Status) GetCode() Status_StatusCode { - if m != nil { - return m.Code - } - return Status_STATUS_CODE_UNSET -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.trace.v1.SpanFlags", SpanFlags_name, SpanFlags_value) - proto.RegisterEnum("opentelemetry.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) - proto.RegisterEnum("opentelemetry.proto.trace.v1.Status_StatusCode", Status_StatusCode_name, Status_StatusCode_value) - proto.RegisterType((*TracesData)(nil), "opentelemetry.proto.trace.v1.TracesData") - proto.RegisterType((*ResourceSpans)(nil), "opentelemetry.proto.trace.v1.ResourceSpans") - proto.RegisterType((*ScopeSpans)(nil), "opentelemetry.proto.trace.v1.ScopeSpans") - proto.RegisterType((*Span)(nil), "opentelemetry.proto.trace.v1.Span") - proto.RegisterType((*Span_Event)(nil), "opentelemetry.proto.trace.v1.Span.Event") - proto.RegisterType((*Span_Link)(nil), "opentelemetry.proto.trace.v1.Span.Link") - proto.RegisterType((*Status)(nil), "opentelemetry.proto.trace.v1.Status") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/trace/v1/trace.proto", fileDescriptor_5c407ac9c675a601) -} - -var fileDescriptor_5c407ac9c675a601 = []byte{ - // 1112 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x3a, 0x6b, 0x3b, 0x79, 0x49, 0xdc, 0xed, 0xe0, 0x56, 0x4b, 0x28, 0x8e, 0xb1, 0x0a, - 0x98, 0x56, 0xb2, 0x49, 0x7b, 0x29, 0x07, 0x44, 0x1d, 0x7b, 0x03, 0x8b, 0x13, 0x3b, 0x9a, 0x5d, - 0x47, 0x80, 0x90, 0x96, 0xad, 0x77, 0x6a, 0x56, 0xb1, 0x67, 0xad, 0xdd, 0x71, 0xd4, 0xde, 0xf8, - 0x13, 0xb8, 0x22, 0x71, 0x47, 0x02, 0xce, 0xdc, 0xb8, 0x57, 0x9c, 0x7a, 0x44, 0x1c, 0x2a, 0x94, - 0x5c, 0xf8, 0x2f, 0x8a, 0x66, 0x66, 0xd7, 0x5e, 0x47, 0x91, 0xd3, 0x48, 0xf4, 0xc2, 0x25, 0x99, - 0x79, 0x3f, 0xbe, 0xef, 0x7b, 0x6f, 0xde, 0x8c, 0x17, 0x6a, 0xc1, 0x84, 0x50, 0x46, 0x46, 0x64, - 0x4c, 0x58, 0xf8, 0xb4, 0x31, 0x09, 0x03, 0x16, 0x34, 0x58, 0xe8, 0x0e, 0x48, 0xe3, 0x64, 0x47, - 0x2e, 0xea, 0xc2, 0x88, 0x6e, 0x2d, 0x44, 0x4a, 0x63, 0x5d, 0x06, 0x9c, 0xec, 0x6c, 0x95, 0x86, - 0xc1, 0x30, 0x90, 0xd9, 0x7c, 0x25, 0xdd, 0x5b, 0x77, 0x2e, 0x42, 0x1f, 0x04, 0xe3, 0x71, 0x40, - 0x39, 0xbc, 0x5c, 0xc5, 0xb1, 0xf5, 0x8b, 0x62, 0x43, 0x12, 0x05, 0xd3, 0x50, 0x8a, 0x49, 0xd6, - 0x32, 0xbe, 0xfa, 0x0d, 0x80, 0xcd, 0xd9, 0xa3, 0xb6, 0xcb, 0x5c, 0x84, 0xa1, 0x98, 0xf8, 0x9d, - 0x68, 0xe2, 0xd2, 0x48, 0x57, 0x2a, 0x2b, 0xb5, 0xf5, 0x7b, 0x77, 0xeb, 0xcb, 0x64, 0xd7, 0x71, - 0x9c, 0x63, 0xf1, 0x14, 0xbc, 0x19, 0xa6, 0xb7, 0xd5, 0x9f, 0xb2, 0xb0, 0xb9, 0x10, 0x80, 0x1c, - 0xb8, 0xe9, 0x91, 0x49, 0x48, 0x06, 0x2e, 0x23, 0x9e, 0x13, 0x0d, 0x82, 0x49, 0xc2, 0xf6, 0x4f, - 0x41, 0xd0, 0xd5, 0x96, 0xd3, 0x59, 0x3c, 0x43, 0x72, 0x95, 0xe6, 0x40, 0x73, 0x2b, 0xea, 0xc0, - 0x6a, 0xa2, 0x41, 0x57, 0x2a, 0x4a, 0x6d, 0xfd, 0xde, 0x07, 0x17, 0x22, 0xce, 0x7a, 0x91, 0xaa, - 0x61, 0x57, 0x7d, 0xf6, 0x62, 0x3b, 0x83, 0x67, 0x00, 0xc8, 0x84, 0xf5, 0xb4, 0xc4, 0xec, 0x15, - 0x15, 0x42, 0x34, 0xd7, 0xf5, 0x36, 0x40, 0x34, 0xf8, 0x96, 0x8c, 0x5d, 0x67, 0x1a, 0x8e, 0xf4, - 0x95, 0x8a, 0x52, 0x5b, 0xc3, 0x6b, 0xd2, 0xd2, 0x0f, 0x47, 0xd5, 0xdf, 0x14, 0x80, 0x54, 0x15, - 0x3d, 0xc8, 0x89, 0xdc, 0xb8, 0x84, 0xfb, 0x17, 0x52, 0xc6, 0x87, 0x7f, 0xb2, 0x53, 0x37, 0x69, - 0xc4, 0xc2, 0xe9, 0x98, 0x50, 0xe6, 0x32, 0x3f, 0xa0, 0x02, 0x28, 0x2e, 0x46, 0xe2, 0xa0, 0x07, - 0x90, 0x4b, 0xd7, 0x50, 0xbd, 0xa4, 0x86, 0x89, 0x4b, 0xb1, 0x4c, 0xb8, 0x4c, 0xf8, 0xaf, 0x9b, - 0xa0, 0xf2, 0x70, 0xf4, 0x35, 0xac, 0x8a, 0x7c, 0xc7, 0xf7, 0x84, 0xea, 0x8d, 0xdd, 0x26, 0x17, - 0xf0, 0xd7, 0x8b, 0xed, 0x8f, 0x86, 0xc1, 0x39, 0x3a, 0x9f, 0xcf, 0xf0, 0x68, 0x44, 0x06, 0x2c, - 0x08, 0x1b, 0x13, 0xcf, 0x65, 0x6e, 0xc3, 0xa7, 0x8c, 0x84, 0xd4, 0x1d, 0x35, 0xf8, 0xae, 0x2e, - 0xe6, 0xd2, 0x6c, 0xe3, 0x82, 0x80, 0x34, 0x3d, 0xf4, 0x25, 0x14, 0xb8, 0x1c, 0x0e, 0x9e, 0x15, - 0xe0, 0x0f, 0x63, 0xf0, 0x07, 0x57, 0x07, 0xe7, 0x72, 0xcd, 0x36, 0xce, 0x73, 0x40, 0xd3, 0x43, - 0xdb, 0xb0, 0x2e, 0x85, 0x47, 0xcc, 0x65, 0x24, 0xae, 0x10, 0x84, 0xc9, 0xe2, 0x16, 0xf4, 0x18, - 0x8a, 0x13, 0x37, 0x24, 0x94, 0x39, 0x89, 0x04, 0xf5, 0x3f, 0x92, 0xb0, 0x21, 0x71, 0x2d, 0x29, - 0xa4, 0x04, 0xb9, 0xc7, 0x23, 0x77, 0x18, 0xe9, 0x5a, 0x45, 0xa9, 0x15, 0xb0, 0xdc, 0x20, 0x04, - 0x2a, 0x75, 0xc7, 0x44, 0xcf, 0x09, 0x5d, 0x62, 0x8d, 0x3e, 0x01, 0xf5, 0xd8, 0xa7, 0x9e, 0x9e, - 0xaf, 0x28, 0xb5, 0xe2, 0x65, 0x37, 0x94, 0xa3, 0x8b, 0x3f, 0x1d, 0x9f, 0x7a, 0x58, 0x24, 0xa2, - 0x06, 0x94, 0x22, 0xe6, 0x86, 0xcc, 0x61, 0xfe, 0x98, 0x38, 0x53, 0xea, 0x3f, 0x71, 0xa8, 0x4b, - 0x03, 0xbd, 0x50, 0x51, 0x6a, 0x79, 0x7c, 0x5d, 0xf8, 0x6c, 0x7f, 0x4c, 0xfa, 0xd4, 0x7f, 0xd2, - 0x75, 0x69, 0x80, 0xee, 0x02, 0x22, 0xd4, 0x3b, 0x1f, 0xbe, 0x2a, 0xc2, 0xaf, 0x11, 0xea, 0x2d, - 0x04, 0x1f, 0x00, 0xb8, 0x8c, 0x85, 0xfe, 0xa3, 0x29, 0x23, 0x91, 0xbe, 0x26, 0x26, 0xee, 0xfd, - 0x4b, 0x46, 0xb8, 0x43, 0x9e, 0x1e, 0xb9, 0xa3, 0x69, 0x32, 0xb6, 0x29, 0x00, 0xf4, 0x00, 0x74, - 0x2f, 0x0c, 0x26, 0x13, 0xe2, 0x39, 0x73, 0xab, 0x33, 0x08, 0xa6, 0x94, 0xe9, 0x50, 0x51, 0x6a, - 0x9b, 0xf8, 0x66, 0xec, 0x6f, 0xce, 0xdc, 0x2d, 0xee, 0x45, 0x0f, 0x21, 0x4f, 0x4e, 0x08, 0x65, - 0x91, 0xbe, 0xfe, 0x4a, 0x57, 0x97, 0x77, 0xca, 0xe0, 0x09, 0x38, 0xce, 0x43, 0x1f, 0x42, 0x29, - 0xe1, 0x96, 0x96, 0x98, 0x77, 0x43, 0xf0, 0xa2, 0xd8, 0x27, 0x72, 0x62, 0xce, 0x8f, 0x21, 0x37, - 0xf2, 0xe9, 0x71, 0xa4, 0x6f, 0x2e, 0xa9, 0x7b, 0x91, 0x72, 0xdf, 0xa7, 0xc7, 0x58, 0x66, 0xa1, - 0x3a, 0xbc, 0x91, 0x10, 0x0a, 0x43, 0xcc, 0x57, 0x14, 0x7c, 0xd7, 0x63, 0x17, 0x4f, 0x88, 0xe9, - 0x76, 0x21, 0xcf, 0xe7, 0x76, 0x1a, 0xe9, 0xd7, 0xc4, 0x53, 0x71, 0xfb, 0x12, 0x3e, 0x11, 0x1b, - 0x37, 0x39, 0xce, 0xdc, 0xfa, 0x43, 0x81, 0x9c, 0x28, 0x01, 0xdd, 0x86, 0xe2, 0xb9, 0x23, 0x56, - 0xc4, 0x11, 0x6f, 0xb0, 0xf4, 0xf9, 0x26, 0x23, 0x99, 0x4d, 0x8d, 0xe4, 0xe2, 0x99, 0xaf, 0xbc, - 0xce, 0x33, 0x57, 0x97, 0x9d, 0xf9, 0xd6, 0xcb, 0x2c, 0xa8, 0xbc, 0x3f, 0xff, 0xe3, 0x07, 0x69, - 0xb1, 0xd7, 0xea, 0xeb, 0xec, 0x75, 0x6e, 0xe9, 0xfd, 0x9a, 0xbd, 0x58, 0xf9, 0xd4, 0x8b, 0x55, - 0xfd, 0x41, 0x81, 0xd5, 0xe4, 0xbd, 0x41, 0x6f, 0xc2, 0x0d, 0xeb, 0xb0, 0xd9, 0x75, 0x3a, 0x66, - 0xb7, 0xed, 0xf4, 0xbb, 0xd6, 0xa1, 0xd1, 0x32, 0xf7, 0x4c, 0xa3, 0xad, 0x65, 0xd0, 0x4d, 0x40, - 0x73, 0x97, 0xd9, 0xb5, 0x0d, 0xdc, 0x6d, 0xee, 0x6b, 0x0a, 0x2a, 0x81, 0x36, 0xb7, 0x5b, 0x06, - 0x3e, 0x32, 0xb0, 0x96, 0x5d, 0xb4, 0xb6, 0xf6, 0x4d, 0xa3, 0x6b, 0x6b, 0x2b, 0x8b, 0x18, 0x87, - 0xb8, 0xd7, 0xee, 0xb7, 0x0c, 0xac, 0xa9, 0x8b, 0xf6, 0x56, 0xaf, 0x6b, 0xf5, 0x0f, 0x0c, 0xac, - 0xe5, 0xaa, 0xbf, 0x2b, 0x90, 0x97, 0x77, 0x00, 0xe9, 0x50, 0x18, 0x93, 0x28, 0x72, 0x87, 0xc9, - 0x20, 0x27, 0x5b, 0xd4, 0x02, 0x75, 0x10, 0x78, 0xb2, 0xf3, 0xc5, 0x7b, 0x8d, 0x57, 0xb9, 0x51, - 0xf1, 0xbf, 0x56, 0xe0, 0x11, 0x2c, 0x92, 0xab, 0x5d, 0x80, 0xb9, 0x0d, 0xdd, 0x80, 0xeb, 0x96, - 0xdd, 0xb4, 0xfb, 0x96, 0xd3, 0xea, 0xb5, 0x0d, 0xde, 0x08, 0xc3, 0xd6, 0x32, 0x08, 0x41, 0x31, - 0x6d, 0xee, 0x75, 0x34, 0xe5, 0x7c, 0xa8, 0x81, 0x71, 0x0f, 0x6b, 0xd9, 0xcf, 0xd5, 0x55, 0x45, - 0xcb, 0xde, 0xf9, 0x51, 0x81, 0x35, 0xde, 0xdb, 0x3d, 0xf1, 0xdb, 0x90, 0x34, 0x77, 0x6f, 0xbf, - 0xf9, 0xa9, 0xe5, 0xb4, 0x7b, 0x4e, 0xb7, 0x67, 0x3b, 0x7d, 0xcb, 0xd0, 0x32, 0xa8, 0x02, 0x6f, - 0xa5, 0x5c, 0x36, 0x6e, 0xb6, 0x8c, 0x78, 0x7d, 0xd0, 0xb4, 0x3a, 0xda, 0x4b, 0x05, 0xdd, 0x81, - 0x77, 0x53, 0x11, 0xad, 0x5e, 0xd7, 0x36, 0xbe, 0xb0, 0x9d, 0xcf, 0x9a, 0x96, 0x63, 0x5a, 0x0e, - 0x36, 0x0e, 0x7a, 0xb6, 0x21, 0x63, 0xbf, 0xcb, 0xa2, 0xf7, 0xe0, 0x9d, 0x0b, 0x62, 0xcf, 0xc7, - 0xa9, 0xbb, 0xbf, 0x28, 0xcf, 0x4e, 0xcb, 0xca, 0xf3, 0xd3, 0xb2, 0xf2, 0xf7, 0x69, 0x59, 0xf9, - 0xfe, 0xac, 0x9c, 0x79, 0x7e, 0x56, 0xce, 0xfc, 0x79, 0x56, 0xce, 0xc0, 0xb6, 0x1f, 0x2c, 0x6d, - 0xe4, 0xae, 0xfc, 0x18, 0x3d, 0xe4, 0xc6, 0x43, 0xe5, 0xab, 0xd6, 0x95, 0xaf, 0x91, 0xfc, 0xe0, - 0x1d, 0x12, 0x3a, 0xfb, 0xfa, 0xfe, 0x39, 0x7b, 0xab, 0x37, 0x21, 0xd4, 0x9e, 0x41, 0x08, 0x70, - 0x79, 0x97, 0xeb, 0x47, 0x3b, 0x8f, 0xf2, 0x22, 0xe3, 0xfe, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xfd, 0xbe, 0x84, 0xc3, 0xc3, 0x0b, 0x00, 0x00, -} - -func (m *TracesData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TracesData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TracesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for iNdEx := len(m.ResourceSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceSpans) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceSpans) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeSpans) > 0 { - for iNdEx := len(m.DeprecatedScopeSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeSpans) > 0 { - for iNdEx := len(m.ScopeSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeSpans) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeSpans) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Span) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x85 - } - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.DroppedLinksCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedLinksCount)) - i-- - dAtA[i] = 0x70 - } - if len(m.Links) > 0 { - for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - } - if m.DroppedEventsCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedEventsCount)) - i-- - dAtA[i] = 0x60 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x50 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.EndTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) - i-- - dAtA[i] = 0x41 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x39 - } - if m.Kind != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.Kind)) - i-- - dAtA[i] = 0x30 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x2a - } - { - size := m.ParentSpanId.Size() - i -= size - if _, err := m.ParentSpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.TraceState) > 0 { - i -= len(m.TraceState) - copy(dAtA[i:], m.TraceState) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) - i-- - dAtA[i] = 0x1a - } - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Span_Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span_Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span_Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *Span_Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span_Link) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x35 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.TraceState) > 0 { - i -= len(m.TraceState) - copy(dAtA[i:], m.TraceState) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) - i-- - dAtA[i] = 0x1a - } - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Status) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Status) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Code != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x18 - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func encodeVarintTrace(dAtA []byte, offset int, v uint64) int { - offset -= sovTrace(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TracesData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for _, e := range m.ResourceSpans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - return n -} - -func (m *ResourceSpans) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovTrace(uint64(l)) - if len(m.ScopeSpans) > 0 { - for _, e := range m.ScopeSpans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.DeprecatedScopeSpans) > 0 { - for _, e := range m.DeprecatedScopeSpans { - l = e.Size() - n += 2 + l + sovTrace(uint64(l)) - } - } - return n -} - -func (m *ScopeSpans) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovTrace(uint64(l)) - if len(m.Spans) > 0 { - for _, e := range m.Spans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - return n -} - -func (m *Span) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = len(m.TraceState) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = m.ParentSpanId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if m.Kind != 0 { - n += 1 + sovTrace(uint64(m.Kind)) - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.EndTimeUnixNano != 0 { - n += 9 - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedEventsCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedEventsCount)) - } - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedLinksCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedLinksCount)) - } - l = m.Status.Size() - n += 1 + l + sovTrace(uint64(l)) - if m.Flags != 0 { - n += 6 - } - return n -} - -func (m *Span_Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - return n -} - -func (m *Span_Link) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = len(m.TraceState) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if m.Flags != 0 { - n += 5 - } - return n -} - -func (m *Status) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if m.Code != 0 { - n += 1 + sovTrace(uint64(m.Code)) - } - return n -} - -func sovTrace(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTrace(x uint64) (n int) { - return sovTrace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TracesData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TracesData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TracesData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceSpans = append(m.ResourceSpans, &ResourceSpans{}) - if err := m.ResourceSpans[len(m.ResourceSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceSpans) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceSpans: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceSpans: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeSpans = append(m.ScopeSpans, &ScopeSpans{}) - if err := m.ScopeSpans[len(m.ScopeSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeSpans = append(m.DeprecatedScopeSpans, &ScopeSpans{}) - if err := m.DeprecatedScopeSpans[len(m.DeprecatedScopeSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeSpans) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeSpans: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeSpans: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spans = append(m.Spans, &Span{}) - if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Span: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceState = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentSpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ParentSpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - m.Kind = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Kind |= Span_SpanKind(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) - } - m.EndTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Span_Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedEventsCount", wireType) - } - m.DroppedEventsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedEventsCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &Span_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedLinksCount", wireType) - } - m.DroppedLinksCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedLinksCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span_Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span_Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceState = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Status) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= Status_StatusCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTrace(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTrace - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTrace - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTrace - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go deleted file mode 100644 index 25110f8b445..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "errors" - - "github.com/gogo/protobuf/proto" -) - -const spanIDSize = 8 - -var ( - errMarshalSpanID = errors.New("marshal: invalid buffer length for SpanID") - errUnmarshalSpanID = errors.New("unmarshal: invalid SpanID length") -) - -// SpanID is a custom data type that is used for all span_id fields in OTLP -// Protobuf messages. -type SpanID [spanIDSize]byte - -var _ proto.Sizer = (*SpanID)(nil) - -// Size returns the size of the data to serialize. -func (sid SpanID) Size() int { - if sid.IsEmpty() { - return 0 - } - return spanIDSize -} - -// IsEmpty returns true if id contains at least one non-zero byte. -func (sid SpanID) IsEmpty() bool { - return sid == [spanIDSize]byte{} -} - -// MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization. -func (sid SpanID) MarshalTo(data []byte) (n int, err error) { - if sid.IsEmpty() { - return 0, nil - } - - if len(data) < spanIDSize { - return 0, errMarshalSpanID - } - - return copy(data, sid[:]), nil -} - -// Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization. -func (sid *SpanID) Unmarshal(data []byte) error { - if len(data) == 0 { - *sid = [spanIDSize]byte{} - return nil - } - - if len(data) != spanIDSize { - return errUnmarshalSpanID - } - - copy(sid[:], data) - return nil -} - -// MarshalJSON converts SpanID into a hex string enclosed in quotes. -func (sid SpanID) MarshalJSON() ([]byte, error) { - if sid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(sid[:]) -} - -// UnmarshalJSON decodes SpanID from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func (sid *SpanID) UnmarshalJSON(data []byte) error { - *sid = [spanIDSize]byte{} - return unmarshalJSON(sid[:], data) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go deleted file mode 100644 index 4828ee02bd0..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "errors" - - "github.com/gogo/protobuf/proto" -) - -const traceIDSize = 16 - -var ( - errMarshalTraceID = errors.New("marshal: invalid buffer length for TraceID") - errUnmarshalTraceID = errors.New("unmarshal: invalid TraceID length") -) - -// TraceID is a custom data type that is used for all trace_id fields in OTLP -// Protobuf messages. -type TraceID [traceIDSize]byte - -var _ proto.Sizer = (*SpanID)(nil) - -// Size returns the size of the data to serialize. -func (tid TraceID) Size() int { - if tid.IsEmpty() { - return 0 - } - return traceIDSize -} - -// IsEmpty returns true if id contains at leas one non-zero byte. -func (tid TraceID) IsEmpty() bool { - return tid == [traceIDSize]byte{} -} - -// MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization. -func (tid TraceID) MarshalTo(data []byte) (n int, err error) { - if tid.IsEmpty() { - return 0, nil - } - - if len(data) < traceIDSize { - return 0, errMarshalTraceID - } - - return copy(data, tid[:]), nil -} - -// Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization. -func (tid *TraceID) Unmarshal(data []byte) error { - if len(data) == 0 { - *tid = [traceIDSize]byte{} - return nil - } - - if len(data) != traceIDSize { - return errUnmarshalTraceID - } - - copy(tid[:], data) - return nil -} - -// MarshalJSON converts 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 trace id from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func (tid *TraceID) UnmarshalJSON(data []byte) error { - *tid = [traceIDSize]byte{} - return unmarshalJSON(tid[:], data) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_aggregationtemporality.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_aggregationtemporality.go new file mode 100644 index 00000000000..6c3a7208dbc --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_aggregationtemporality.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +const ( + AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED = AggregationTemporality(0) + AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA = AggregationTemporality(1) + AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE = AggregationTemporality(2) +) + +// AggregationTemporality defines how a metric aggregator reports aggregated values. +// It describes how those values relate to the time interval over which they are aggregated. +type AggregationTemporality int32 + +var AggregationTemporality_name = map[int32]string{ + 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", + 1: "AGGREGATION_TEMPORALITY_DELTA", + 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", +} + +var AggregationTemporality_value = map[string]int32{ + "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, + "AGGREGATION_TEMPORALITY_DELTA": 1, + "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_severitynumber.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_severitynumber.go new file mode 100644 index 00000000000..4ad9a5b29db --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_severitynumber.go @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +const ( + SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED = SeverityNumber(0) + SeverityNumber_SEVERITY_NUMBER_TRACE = SeverityNumber(1) + SeverityNumber_SEVERITY_NUMBER_TRACE2 = SeverityNumber(2) + SeverityNumber_SEVERITY_NUMBER_TRACE3 = SeverityNumber(3) + SeverityNumber_SEVERITY_NUMBER_TRACE4 = SeverityNumber(4) + SeverityNumber_SEVERITY_NUMBER_DEBUG = SeverityNumber(5) + SeverityNumber_SEVERITY_NUMBER_DEBUG2 = SeverityNumber(6) + SeverityNumber_SEVERITY_NUMBER_DEBUG3 = SeverityNumber(7) + SeverityNumber_SEVERITY_NUMBER_DEBUG4 = SeverityNumber(8) + SeverityNumber_SEVERITY_NUMBER_INFO = SeverityNumber(9) + SeverityNumber_SEVERITY_NUMBER_INFO2 = SeverityNumber(10) + SeverityNumber_SEVERITY_NUMBER_INFO3 = SeverityNumber(11) + SeverityNumber_SEVERITY_NUMBER_INFO4 = SeverityNumber(12) + SeverityNumber_SEVERITY_NUMBER_WARN = SeverityNumber(13) + SeverityNumber_SEVERITY_NUMBER_WARN2 = SeverityNumber(14) + SeverityNumber_SEVERITY_NUMBER_WARN3 = SeverityNumber(15) + SeverityNumber_SEVERITY_NUMBER_WARN4 = SeverityNumber(16) + SeverityNumber_SEVERITY_NUMBER_ERROR = SeverityNumber(17) + SeverityNumber_SEVERITY_NUMBER_ERROR2 = SeverityNumber(18) + SeverityNumber_SEVERITY_NUMBER_ERROR3 = SeverityNumber(19) + SeverityNumber_SEVERITY_NUMBER_ERROR4 = SeverityNumber(20) + SeverityNumber_SEVERITY_NUMBER_FATAL = SeverityNumber(21) + SeverityNumber_SEVERITY_NUMBER_FATAL2 = SeverityNumber(22) + SeverityNumber_SEVERITY_NUMBER_FATAL3 = SeverityNumber(23) + SeverityNumber_SEVERITY_NUMBER_FATAL4 = SeverityNumber(24) +) + +// SeverityNumber represent possible values for LogRecord.SeverityNumber +type SeverityNumber int32 + +var SeverityNumber_name = map[int32]string{ + 0: "SEVERITY_NUMBER_UNSPECIFIED", + 1: "SEVERITY_NUMBER_TRACE ", + 2: "SEVERITY_NUMBER_TRACE2", + 3: "SEVERITY_NUMBER_TRACE3", + 4: "SEVERITY_NUMBER_TRACE4", + 5: "SEVERITY_NUMBER_DEBUG", + 6: "SEVERITY_NUMBER_DEBUG2", + 7: "SEVERITY_NUMBER_DEBUG3", + 8: "SEVERITY_NUMBER_DEBUG4", + 9: "SEVERITY_NUMBER_INFO", + 10: "SEVERITY_NUMBER_INFO2", + 11: "SEVERITY_NUMBER_INFO3", + 12: "SEVERITY_NUMBER_INFO4", + 13: "SEVERITY_NUMBER_WARN", + 14: "SEVERITY_NUMBER_WARN2", + 15: "SEVERITY_NUMBER_WARN3", + 16: "SEVERITY_NUMBER_WARN4", + 17: "SEVERITY_NUMBER_ERROR", + 18: "SEVERITY_NUMBER_ERROR2", + 19: "SEVERITY_NUMBER_ERROR3", + 20: "SEVERITY_NUMBER_ERROR4", + 21: "SEVERITY_NUMBER_FATAL", + 22: "SEVERITY_NUMBER_FATAL2", + 23: "SEVERITY_NUMBER_FATAL3", + 24: "SEVERITY_NUMBER_FATAL4", +} + +var SeverityNumber_value = map[string]int32{ + "SEVERITY_NUMBER_UNSPECIFIED": 0, + "SEVERITY_NUMBER_TRACE ": 1, + "SEVERITY_NUMBER_TRACE2": 2, + "SEVERITY_NUMBER_TRACE3": 3, + "SEVERITY_NUMBER_TRACE4": 4, + "SEVERITY_NUMBER_DEBUG": 5, + "SEVERITY_NUMBER_DEBUG2": 6, + "SEVERITY_NUMBER_DEBUG3": 7, + "SEVERITY_NUMBER_DEBUG4": 8, + "SEVERITY_NUMBER_INFO": 9, + "SEVERITY_NUMBER_INFO2": 10, + "SEVERITY_NUMBER_INFO3": 11, + "SEVERITY_NUMBER_INFO4": 12, + "SEVERITY_NUMBER_WARN": 13, + "SEVERITY_NUMBER_WARN2": 14, + "SEVERITY_NUMBER_WARN3": 15, + "SEVERITY_NUMBER_WARN4": 16, + "SEVERITY_NUMBER_ERROR": 17, + "SEVERITY_NUMBER_ERROR2": 18, + "SEVERITY_NUMBER_ERROR3": 19, + "SEVERITY_NUMBER_ERROR4": 20, + "SEVERITY_NUMBER_FATAL": 21, + "SEVERITY_NUMBER_FATAL2": 22, + "SEVERITY_NUMBER_FATAL3": 23, + "SEVERITY_NUMBER_FATAL4": 24, +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_spankind.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_spankind.go new file mode 100644 index 00000000000..1632aadde2a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_spankind.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +const ( + SpanKind_SPAN_KIND_UNSPECIFIED = SpanKind(0) + SpanKind_SPAN_KIND_INTERNAL = SpanKind(1) + SpanKind_SPAN_KIND_SERVER = SpanKind(2) + SpanKind_SPAN_KIND_CLIENT = SpanKind(3) + SpanKind_SPAN_KIND_PRODUCER = SpanKind(4) + SpanKind_SPAN_KIND_CONSUMER = SpanKind(5) +) + +// 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 + +var 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", +} + +var 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, +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_statuscode.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_statuscode.go new file mode 100644 index 00000000000..ac5aab75934 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_enum_statuscode.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +const ( + StatusCode_STATUS_CODE_UNSET = StatusCode(0) + StatusCode_STATUS_CODE_OK = StatusCode(1) + StatusCode_STATUS_CODE_ERROR = StatusCode(2) +) + +// StatusCode is the status of the span, for the semantics of codes see +// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status +type StatusCode int32 + +var StatusCode_name = map[int32]string{ + 0: "STATUS_CODE_UNSET", + 1: "STATUS_CODE_OK", + 2: "STATUS_CODE_ERROR", +} + +var StatusCode_value = map[string]int32{ + "STATUS_CODE_UNSET": 0, + "STATUS_CODE_OK": 1, + "STATUS_CODE_ERROR": 2, +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_anyvalue.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_anyvalue.go new file mode 100644 index 00000000000..103c4c5b443 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_anyvalue.go @@ -0,0 +1,770 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +func (m *AnyValue) GetValue() any { + if m != nil { + return m.Value + } + return nil +} + +type AnyValue_StringValue struct { + StringValue string +} + +func (m *AnyValue) GetStringValue() string { + if v, ok := m.GetValue().(*AnyValue_StringValue); ok { + return v.StringValue + } + return "" +} + +type AnyValue_BoolValue struct { + BoolValue bool +} + +func (m *AnyValue) GetBoolValue() bool { + if v, ok := m.GetValue().(*AnyValue_BoolValue); ok { + return v.BoolValue + } + return false +} + +type AnyValue_IntValue struct { + IntValue int64 +} + +func (m *AnyValue) GetIntValue() int64 { + if v, ok := m.GetValue().(*AnyValue_IntValue); ok { + return v.IntValue + } + return int64(0) +} + +type AnyValue_DoubleValue struct { + DoubleValue float64 +} + +func (m *AnyValue) GetDoubleValue() float64 { + if v, ok := m.GetValue().(*AnyValue_DoubleValue); ok { + return v.DoubleValue + } + return float64(0) +} + +type AnyValue_ArrayValue struct { + ArrayValue *ArrayValue +} + +func (m *AnyValue) GetArrayValue() *ArrayValue { + if v, ok := m.GetValue().(*AnyValue_ArrayValue); ok { + return v.ArrayValue + } + return nil +} + +type AnyValue_KvlistValue struct { + KvlistValue *KeyValueList +} + +func (m *AnyValue) GetKvlistValue() *KeyValueList { + if v, ok := m.GetValue().(*AnyValue_KvlistValue); ok { + return v.KvlistValue + } + return nil +} + +type AnyValue_BytesValue struct { + BytesValue []byte +} + +func (m *AnyValue) GetBytesValue() []byte { + if v, ok := m.GetValue().(*AnyValue_BytesValue); ok { + return v.BytesValue + } + return nil +} + +type AnyValue struct { + Value any +} + +var ( + protoPoolAnyValue = sync.Pool{ + New: func() any { + return &AnyValue{} + }, + } + + ProtoPoolAnyValue_StringValue = sync.Pool{ + New: func() any { + return &AnyValue_StringValue{} + }, + } + + ProtoPoolAnyValue_BoolValue = sync.Pool{ + New: func() any { + return &AnyValue_BoolValue{} + }, + } + + ProtoPoolAnyValue_IntValue = sync.Pool{ + New: func() any { + return &AnyValue_IntValue{} + }, + } + + ProtoPoolAnyValue_DoubleValue = sync.Pool{ + New: func() any { + return &AnyValue_DoubleValue{} + }, + } + + ProtoPoolAnyValue_ArrayValue = sync.Pool{ + New: func() any { + return &AnyValue_ArrayValue{} + }, + } + + ProtoPoolAnyValue_KvlistValue = sync.Pool{ + New: func() any { + return &AnyValue_KvlistValue{} + }, + } + + ProtoPoolAnyValue_BytesValue = sync.Pool{ + New: func() any { + return &AnyValue_BytesValue{} + }, + } +) + +func NewAnyValue() *AnyValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue{} + } + return protoPoolAnyValue.Get().(*AnyValue) +} + +func DeleteAnyValue(orig *AnyValue, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + switch ov := orig.Value.(type) { + case *AnyValue_StringValue: + if UseProtoPooling.IsEnabled() { + ov.StringValue = "" + ProtoPoolAnyValue_StringValue.Put(ov) + } + case *AnyValue_BoolValue: + if UseProtoPooling.IsEnabled() { + ov.BoolValue = false + ProtoPoolAnyValue_BoolValue.Put(ov) + } + case *AnyValue_IntValue: + if UseProtoPooling.IsEnabled() { + ov.IntValue = int64(0) + ProtoPoolAnyValue_IntValue.Put(ov) + } + case *AnyValue_DoubleValue: + if UseProtoPooling.IsEnabled() { + ov.DoubleValue = float64(0) + ProtoPoolAnyValue_DoubleValue.Put(ov) + } + case *AnyValue_ArrayValue: + DeleteArrayValue(ov.ArrayValue, true) + ov.ArrayValue = nil + ProtoPoolAnyValue_ArrayValue.Put(ov) + case *AnyValue_KvlistValue: + DeleteKeyValueList(ov.KvlistValue, true) + ov.KvlistValue = nil + ProtoPoolAnyValue_KvlistValue.Put(ov) + case *AnyValue_BytesValue: + if UseProtoPooling.IsEnabled() { + ov.BytesValue = nil + ProtoPoolAnyValue_BytesValue.Put(ov) + } + } + orig.Reset() + if nullable { + protoPoolAnyValue.Put(orig) + } +} + +func CopyAnyValue(dest, src *AnyValue) *AnyValue { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewAnyValue() + } + switch t := src.Value.(type) { + case *AnyValue_StringValue: + var ov *AnyValue_StringValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_StringValue{} + } else { + ov = ProtoPoolAnyValue_StringValue.Get().(*AnyValue_StringValue) + } + ov.StringValue = t.StringValue + dest.Value = ov + + case *AnyValue_BoolValue: + var ov *AnyValue_BoolValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_BoolValue{} + } else { + ov = ProtoPoolAnyValue_BoolValue.Get().(*AnyValue_BoolValue) + } + ov.BoolValue = t.BoolValue + dest.Value = ov + + case *AnyValue_IntValue: + var ov *AnyValue_IntValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_IntValue{} + } else { + ov = ProtoPoolAnyValue_IntValue.Get().(*AnyValue_IntValue) + } + ov.IntValue = t.IntValue + dest.Value = ov + + case *AnyValue_DoubleValue: + var ov *AnyValue_DoubleValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_DoubleValue{} + } else { + ov = ProtoPoolAnyValue_DoubleValue.Get().(*AnyValue_DoubleValue) + } + ov.DoubleValue = t.DoubleValue + dest.Value = ov + + case *AnyValue_ArrayValue: + var ov *AnyValue_ArrayValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_ArrayValue{} + } else { + ov = ProtoPoolAnyValue_ArrayValue.Get().(*AnyValue_ArrayValue) + } + ov.ArrayValue = NewArrayValue() + CopyArrayValue(ov.ArrayValue, t.ArrayValue) + dest.Value = ov + + case *AnyValue_KvlistValue: + var ov *AnyValue_KvlistValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_KvlistValue{} + } else { + ov = ProtoPoolAnyValue_KvlistValue.Get().(*AnyValue_KvlistValue) + } + ov.KvlistValue = NewKeyValueList() + CopyKeyValueList(ov.KvlistValue, t.KvlistValue) + dest.Value = ov + + case *AnyValue_BytesValue: + var ov *AnyValue_BytesValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_BytesValue{} + } else { + ov = ProtoPoolAnyValue_BytesValue.Get().(*AnyValue_BytesValue) + } + ov.BytesValue = t.BytesValue + dest.Value = ov + + default: + dest.Value = nil + } + + return dest +} + +func CopyAnyValueSlice(dest, src []AnyValue) []AnyValue { + var newDest []AnyValue + if cap(dest) < len(src) { + newDest = make([]AnyValue, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteAnyValue(&dest[i], false) + } + } + for i := range src { + CopyAnyValue(&newDest[i], &src[i]) + } + return newDest +} + +func CopyAnyValuePtrSlice(dest, src []*AnyValue) []*AnyValue { + var newDest []*AnyValue + if cap(dest) < len(src) { + newDest = make([]*AnyValue, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewAnyValue() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteAnyValue(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewAnyValue() + } + } + for i := range src { + CopyAnyValue(newDest[i], src[i]) + } + return newDest +} + +func (orig *AnyValue) Reset() { + *orig = AnyValue{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *AnyValue) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + switch orig := orig.Value.(type) { + case *AnyValue_StringValue: + dest.WriteObjectField("stringValue") + dest.WriteString(orig.StringValue) + case *AnyValue_BoolValue: + dest.WriteObjectField("boolValue") + dest.WriteBool(orig.BoolValue) + case *AnyValue_IntValue: + dest.WriteObjectField("intValue") + dest.WriteInt64(orig.IntValue) + case *AnyValue_DoubleValue: + dest.WriteObjectField("doubleValue") + dest.WriteFloat64(orig.DoubleValue) + case *AnyValue_ArrayValue: + if orig.ArrayValue != nil { + dest.WriteObjectField("arrayValue") + orig.ArrayValue.MarshalJSON(dest) + } + case *AnyValue_KvlistValue: + if orig.KvlistValue != nil { + dest.WriteObjectField("kvlistValue") + orig.KvlistValue.MarshalJSON(dest) + } + case *AnyValue_BytesValue: + + dest.WriteObjectField("bytesValue") + dest.WriteBytes(orig.BytesValue) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *AnyValue) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + + case "stringValue", "string_value": + { + var ov *AnyValue_StringValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_StringValue{} + } else { + ov = ProtoPoolAnyValue_StringValue.Get().(*AnyValue_StringValue) + } + ov.StringValue = iter.ReadString() + orig.Value = ov + } + case "boolValue", "bool_value": + { + var ov *AnyValue_BoolValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_BoolValue{} + } else { + ov = ProtoPoolAnyValue_BoolValue.Get().(*AnyValue_BoolValue) + } + ov.BoolValue = iter.ReadBool() + orig.Value = ov + } + case "intValue", "int_value": + { + var ov *AnyValue_IntValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_IntValue{} + } else { + ov = ProtoPoolAnyValue_IntValue.Get().(*AnyValue_IntValue) + } + ov.IntValue = iter.ReadInt64() + orig.Value = ov + } + case "doubleValue", "double_value": + { + var ov *AnyValue_DoubleValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_DoubleValue{} + } else { + ov = ProtoPoolAnyValue_DoubleValue.Get().(*AnyValue_DoubleValue) + } + ov.DoubleValue = iter.ReadFloat64() + orig.Value = ov + } + case "arrayValue", "array_value": + { + var ov *AnyValue_ArrayValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_ArrayValue{} + } else { + ov = ProtoPoolAnyValue_ArrayValue.Get().(*AnyValue_ArrayValue) + } + ov.ArrayValue = NewArrayValue() + ov.ArrayValue.UnmarshalJSON(iter) + orig.Value = ov + } + case "kvlistValue", "kvlist_value": + { + var ov *AnyValue_KvlistValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_KvlistValue{} + } else { + ov = ProtoPoolAnyValue_KvlistValue.Get().(*AnyValue_KvlistValue) + } + ov.KvlistValue = NewKeyValueList() + ov.KvlistValue.UnmarshalJSON(iter) + orig.Value = ov + } + case "bytesValue", "bytes_value": + { + var ov *AnyValue_BytesValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_BytesValue{} + } else { + ov = ProtoPoolAnyValue_BytesValue.Get().(*AnyValue_BytesValue) + } + ov.BytesValue = iter.ReadBytes() + orig.Value = ov + } + + default: + iter.Skip() + } + } +} + +func (orig *AnyValue) SizeProto() int { + var n int + var l int + _ = l + switch orig := orig.Value.(type) { + case nil: + _ = orig + break + case *AnyValue_StringValue: + l = len(orig.StringValue) + n += 1 + proto.Sov(uint64(l)) + l + case *AnyValue_BoolValue: + + n += 2 + case *AnyValue_IntValue: + + n += 1 + proto.Sov(uint64(orig.IntValue)) + case *AnyValue_DoubleValue: + + n += 9 + case *AnyValue_ArrayValue: + if orig.ArrayValue != nil { + l = orig.ArrayValue.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *AnyValue_KvlistValue: + if orig.KvlistValue != nil { + l = orig.KvlistValue.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *AnyValue_BytesValue: + l = len(orig.BytesValue) + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *AnyValue) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + switch orig := orig.Value.(type) { + case *AnyValue_StringValue: + l = len(orig.StringValue) + pos -= l + copy(buf[pos:], orig.StringValue) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + case *AnyValue_BoolValue: + pos-- + if orig.BoolValue { + buf[pos] = 1 + } else { + buf[pos] = 0 + } + pos-- + buf[pos] = 0x10 + + case *AnyValue_IntValue: + pos = proto.EncodeVarint(buf, pos, uint64(orig.IntValue)) + pos-- + buf[pos] = 0x18 + + case *AnyValue_DoubleValue: + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.DoubleValue)) + pos-- + buf[pos] = 0x21 + + case *AnyValue_ArrayValue: + if orig.ArrayValue != nil { + l = orig.ArrayValue.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + } + case *AnyValue_KvlistValue: + if orig.KvlistValue != nil { + l = orig.KvlistValue.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x32 + } + case *AnyValue_BytesValue: + l = len(orig.BytesValue) + pos -= l + copy(buf[pos:], orig.BytesValue) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + + } + return len(buf) - pos +} + +func (orig *AnyValue) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *AnyValue_StringValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_StringValue{} + } else { + ov = ProtoPoolAnyValue_StringValue.Get().(*AnyValue_StringValue) + } + ov.StringValue = string(buf[startPos:pos]) + orig.Value = ov + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + var ov *AnyValue_BoolValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_BoolValue{} + } else { + ov = ProtoPoolAnyValue_BoolValue.Get().(*AnyValue_BoolValue) + } + ov.BoolValue = num != 0 + orig.Value = ov + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + var ov *AnyValue_IntValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_IntValue{} + } else { + ov = ProtoPoolAnyValue_IntValue.Get().(*AnyValue_IntValue) + } + ov.IntValue = int64(num) + orig.Value = ov + + case 4: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + var ov *AnyValue_DoubleValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_DoubleValue{} + } else { + ov = ProtoPoolAnyValue_DoubleValue.Get().(*AnyValue_DoubleValue) + } + ov.DoubleValue = math.Float64frombits(num) + orig.Value = ov + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ArrayValue", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *AnyValue_ArrayValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_ArrayValue{} + } else { + ov = ProtoPoolAnyValue_ArrayValue.Get().(*AnyValue_ArrayValue) + } + ov.ArrayValue = NewArrayValue() + err = ov.ArrayValue.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Value = ov + + case 6: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field KvlistValue", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *AnyValue_KvlistValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_KvlistValue{} + } else { + ov = ProtoPoolAnyValue_KvlistValue.Get().(*AnyValue_KvlistValue) + } + ov.KvlistValue = NewKeyValueList() + err = ov.KvlistValue.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Value = ov + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field BytesValue", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *AnyValue_BytesValue + if !UseProtoPooling.IsEnabled() { + ov = &AnyValue_BytesValue{} + } else { + ov = ProtoPoolAnyValue_BytesValue.Get().(*AnyValue_BytesValue) + } + if length != 0 { + ov.BytesValue = make([]byte, length) + copy(ov.BytesValue, buf[startPos:pos]) + } + orig.Value = ov + + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestAnyValue() *AnyValue { + orig := NewAnyValue() + orig.Value = &AnyValue_StringValue{StringValue: "test_stringvalue"} + return orig +} + +func GenTestAnyValuePtrSlice() []*AnyValue { + orig := make([]*AnyValue, 5) + orig[0] = NewAnyValue() + orig[1] = GenTestAnyValue() + orig[2] = NewAnyValue() + orig[3] = GenTestAnyValue() + orig[4] = NewAnyValue() + return orig +} + +func GenTestAnyValueSlice() []AnyValue { + orig := make([]AnyValue, 5) + orig[1] = *GenTestAnyValue() + orig[3] = *GenTestAnyValue() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_arrayvalue.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_arrayvalue.go new file mode 100644 index 00000000000..f973831cf8e --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_arrayvalue.go @@ -0,0 +1,243 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// 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 { + Values []AnyValue +} + +var ( + protoPoolArrayValue = sync.Pool{ + New: func() any { + return &ArrayValue{} + }, + } +) + +func NewArrayValue() *ArrayValue { + if !UseProtoPooling.IsEnabled() { + return &ArrayValue{} + } + return protoPoolArrayValue.Get().(*ArrayValue) +} + +func DeleteArrayValue(orig *ArrayValue, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Values { + DeleteAnyValue(&orig.Values[i], false) + } + orig.Reset() + if nullable { + protoPoolArrayValue.Put(orig) + } +} + +func CopyArrayValue(dest, src *ArrayValue) *ArrayValue { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewArrayValue() + } + dest.Values = CopyAnyValueSlice(dest.Values, src.Values) + + return dest +} + +func CopyArrayValueSlice(dest, src []ArrayValue) []ArrayValue { + var newDest []ArrayValue + if cap(dest) < len(src) { + newDest = make([]ArrayValue, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteArrayValue(&dest[i], false) + } + } + for i := range src { + CopyArrayValue(&newDest[i], &src[i]) + } + return newDest +} + +func CopyArrayValuePtrSlice(dest, src []*ArrayValue) []*ArrayValue { + var newDest []*ArrayValue + if cap(dest) < len(src) { + newDest = make([]*ArrayValue, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewArrayValue() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteArrayValue(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewArrayValue() + } + } + for i := range src { + CopyArrayValue(newDest[i], src[i]) + } + return newDest +} + +func (orig *ArrayValue) Reset() { + *orig = ArrayValue{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ArrayValue) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Values) > 0 { + dest.WriteObjectField("values") + dest.WriteArrayStart() + orig.Values[0].MarshalJSON(dest) + for i := 1; i < len(orig.Values); i++ { + dest.WriteMore() + orig.Values[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ArrayValue) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "values": + for iter.ReadArray() { + orig.Values = append(orig.Values, AnyValue{}) + orig.Values[len(orig.Values)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ArrayValue) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Values { + l = orig.Values[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ArrayValue) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Values) - 1; i >= 0; i-- { + l = orig.Values[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *ArrayValue) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Values = append(orig.Values, AnyValue{}) + err = orig.Values[len(orig.Values)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestArrayValue() *ArrayValue { + orig := NewArrayValue() + orig.Values = []AnyValue{{}, *GenTestAnyValue()} + return orig +} + +func GenTestArrayValuePtrSlice() []*ArrayValue { + orig := make([]*ArrayValue, 5) + orig[0] = NewArrayValue() + orig[1] = GenTestArrayValue() + orig[2] = NewArrayValue() + orig[3] = GenTestArrayValue() + orig[4] = NewArrayValue() + return orig +} + +func GenTestArrayValueSlice() []ArrayValue { + orig := make([]ArrayValue, 5) + orig[1] = *GenTestArrayValue() + orig[3] = *GenTestArrayValue() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_entityref.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_entityref.go new file mode 100644 index 00000000000..d326cfe46e5 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_entityref.go @@ -0,0 +1,349 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type EntityRef struct { + SchemaUrl string + Type string + IdKeys []string + DescriptionKeys []string +} + +var ( + protoPoolEntityRef = sync.Pool{ + New: func() any { + return &EntityRef{} + }, + } +) + +func NewEntityRef() *EntityRef { + if !UseProtoPooling.IsEnabled() { + return &EntityRef{} + } + return protoPoolEntityRef.Get().(*EntityRef) +} + +func DeleteEntityRef(orig *EntityRef, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolEntityRef.Put(orig) + } +} + +func CopyEntityRef(dest, src *EntityRef) *EntityRef { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewEntityRef() + } + dest.SchemaUrl = src.SchemaUrl + dest.Type = src.Type + dest.IdKeys = append(dest.IdKeys[:0], src.IdKeys...) + + dest.DescriptionKeys = append(dest.DescriptionKeys[:0], src.DescriptionKeys...) + + return dest +} + +func CopyEntityRefSlice(dest, src []EntityRef) []EntityRef { + var newDest []EntityRef + if cap(dest) < len(src) { + newDest = make([]EntityRef, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteEntityRef(&dest[i], false) + } + } + for i := range src { + CopyEntityRef(&newDest[i], &src[i]) + } + return newDest +} + +func CopyEntityRefPtrSlice(dest, src []*EntityRef) []*EntityRef { + var newDest []*EntityRef + if cap(dest) < len(src) { + newDest = make([]*EntityRef, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewEntityRef() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteEntityRef(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewEntityRef() + } + } + for i := range src { + CopyEntityRef(newDest[i], src[i]) + } + return newDest +} + +func (orig *EntityRef) Reset() { + *orig = EntityRef{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *EntityRef) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + if orig.Type != "" { + dest.WriteObjectField("type") + dest.WriteString(orig.Type) + } + if len(orig.IdKeys) > 0 { + dest.WriteObjectField("idKeys") + dest.WriteArrayStart() + dest.WriteString(orig.IdKeys[0]) + for i := 1; i < len(orig.IdKeys); i++ { + dest.WriteMore() + dest.WriteString(orig.IdKeys[i]) + } + dest.WriteArrayEnd() + } + + if len(orig.DescriptionKeys) > 0 { + dest.WriteObjectField("descriptionKeys") + dest.WriteArrayStart() + dest.WriteString(orig.DescriptionKeys[0]) + for i := 1; i < len(orig.DescriptionKeys); i++ { + dest.WriteMore() + dest.WriteString(orig.DescriptionKeys[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *EntityRef) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + case "type": + orig.Type = iter.ReadString() + case "idKeys", "id_keys": + for iter.ReadArray() { + orig.IdKeys = append(orig.IdKeys, iter.ReadString()) + } + + case "descriptionKeys", "description_keys": + for iter.ReadArray() { + orig.DescriptionKeys = append(orig.DescriptionKeys, iter.ReadString()) + } + + default: + iter.Skip() + } + } +} + +func (orig *EntityRef) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.Type) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for _, s := range orig.IdKeys { + l = len(s) + n += 1 + proto.Sov(uint64(l)) + l + } + for _, s := range orig.DescriptionKeys { + l = len(s) + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *EntityRef) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = len(orig.Type) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Type) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + for i := len(orig.IdKeys) - 1; i >= 0; i-- { + l = len(orig.IdKeys[i]) + pos -= l + copy(buf[pos:], orig.IdKeys[i]) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + for i := len(orig.DescriptionKeys) - 1; i >= 0; i-- { + l = len(orig.DescriptionKeys[i]) + pos -= l + copy(buf[pos:], orig.DescriptionKeys[i]) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + } + return len(buf) - pos +} + +func (orig *EntityRef) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Type = string(buf[startPos:pos]) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field IdKeys", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.IdKeys = append(orig.IdKeys, string(buf[startPos:pos])) + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DescriptionKeys", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DescriptionKeys = append(orig.DescriptionKeys, string(buf[startPos:pos])) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestEntityRef() *EntityRef { + orig := NewEntityRef() + orig.SchemaUrl = "test_schemaurl" + orig.Type = "test_type" + orig.IdKeys = []string{"", "test_idkeys"} + orig.DescriptionKeys = []string{"", "test_descriptionkeys"} + return orig +} + +func GenTestEntityRefPtrSlice() []*EntityRef { + orig := make([]*EntityRef, 5) + orig[0] = NewEntityRef() + orig[1] = GenTestEntityRef() + orig[2] = NewEntityRef() + orig[3] = GenTestEntityRef() + orig[4] = NewEntityRef() + return orig +} + +func GenTestEntityRefSlice() []EntityRef { + orig := make([]EntityRef, 5) + orig[1] = *GenTestEntityRef() + orig[3] = *GenTestEntityRef() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exemplar.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exemplar.go new file mode 100644 index 00000000000..5516bfd201d --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exemplar.go @@ -0,0 +1,523 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +func (m *Exemplar) GetValue() any { + if m != nil { + return m.Value + } + return nil +} + +type Exemplar_AsDouble struct { + AsDouble float64 +} + +func (m *Exemplar) GetAsDouble() float64 { + if v, ok := m.GetValue().(*Exemplar_AsDouble); ok { + return v.AsDouble + } + return float64(0) +} + +type Exemplar_AsInt struct { + AsInt int64 +} + +func (m *Exemplar) GetAsInt() int64 { + if v, ok := m.GetValue().(*Exemplar_AsInt); ok { + return v.AsInt + } + return int64(0) +} + +// Exemplar is a sample input double measurement. +// +// Exemplars also hold information about the environment when the measurement was recorded, +// for example the span and trace ID of the active span when the exemplar was recorded. +type Exemplar struct { + Value any + FilteredAttributes []KeyValue + TimeUnixNano uint64 + TraceId TraceID + SpanId SpanID +} + +var ( + protoPoolExemplar = sync.Pool{ + New: func() any { + return &Exemplar{} + }, + } + + ProtoPoolExemplar_AsDouble = sync.Pool{ + New: func() any { + return &Exemplar_AsDouble{} + }, + } + + ProtoPoolExemplar_AsInt = sync.Pool{ + New: func() any { + return &Exemplar_AsInt{} + }, + } +) + +func NewExemplar() *Exemplar { + if !UseProtoPooling.IsEnabled() { + return &Exemplar{} + } + return protoPoolExemplar.Get().(*Exemplar) +} + +func DeleteExemplar(orig *Exemplar, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.FilteredAttributes { + DeleteKeyValue(&orig.FilteredAttributes[i], false) + } + + switch ov := orig.Value.(type) { + case *Exemplar_AsDouble: + if UseProtoPooling.IsEnabled() { + ov.AsDouble = float64(0) + ProtoPoolExemplar_AsDouble.Put(ov) + } + case *Exemplar_AsInt: + if UseProtoPooling.IsEnabled() { + ov.AsInt = int64(0) + ProtoPoolExemplar_AsInt.Put(ov) + } + } + DeleteTraceID(&orig.TraceId, false) + DeleteSpanID(&orig.SpanId, false) + orig.Reset() + if nullable { + protoPoolExemplar.Put(orig) + } +} + +func CopyExemplar(dest, src *Exemplar) *Exemplar { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExemplar() + } + dest.FilteredAttributes = CopyKeyValueSlice(dest.FilteredAttributes, src.FilteredAttributes) + + dest.TimeUnixNano = src.TimeUnixNano + switch t := src.Value.(type) { + case *Exemplar_AsDouble: + var ov *Exemplar_AsDouble + if !UseProtoPooling.IsEnabled() { + ov = &Exemplar_AsDouble{} + } else { + ov = ProtoPoolExemplar_AsDouble.Get().(*Exemplar_AsDouble) + } + ov.AsDouble = t.AsDouble + dest.Value = ov + + case *Exemplar_AsInt: + var ov *Exemplar_AsInt + if !UseProtoPooling.IsEnabled() { + ov = &Exemplar_AsInt{} + } else { + ov = ProtoPoolExemplar_AsInt.Get().(*Exemplar_AsInt) + } + ov.AsInt = t.AsInt + dest.Value = ov + + default: + dest.Value = nil + } + CopyTraceID(&dest.TraceId, &src.TraceId) + + CopySpanID(&dest.SpanId, &src.SpanId) + + return dest +} + +func CopyExemplarSlice(dest, src []Exemplar) []Exemplar { + var newDest []Exemplar + if cap(dest) < len(src) { + newDest = make([]Exemplar, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExemplar(&dest[i], false) + } + } + for i := range src { + CopyExemplar(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExemplarPtrSlice(dest, src []*Exemplar) []*Exemplar { + var newDest []*Exemplar + if cap(dest) < len(src) { + newDest = make([]*Exemplar, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExemplar() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExemplar(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExemplar() + } + } + for i := range src { + CopyExemplar(newDest[i], src[i]) + } + return newDest +} + +func (orig *Exemplar) Reset() { + *orig = Exemplar{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Exemplar) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.FilteredAttributes) > 0 { + dest.WriteObjectField("filteredAttributes") + dest.WriteArrayStart() + orig.FilteredAttributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.FilteredAttributes); i++ { + dest.WriteMore() + orig.FilteredAttributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + switch orig := orig.Value.(type) { + case *Exemplar_AsDouble: + dest.WriteObjectField("asDouble") + dest.WriteFloat64(orig.AsDouble) + case *Exemplar_AsInt: + dest.WriteObjectField("asInt") + dest.WriteInt64(orig.AsInt) + } + if !orig.TraceId.IsEmpty() { + dest.WriteObjectField("traceId") + orig.TraceId.MarshalJSON(dest) + } + if !orig.SpanId.IsEmpty() { + dest.WriteObjectField("spanId") + orig.SpanId.MarshalJSON(dest) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Exemplar) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "filteredAttributes", "filtered_attributes": + for iter.ReadArray() { + orig.FilteredAttributes = append(orig.FilteredAttributes, KeyValue{}) + orig.FilteredAttributes[len(orig.FilteredAttributes)-1].UnmarshalJSON(iter) + } + + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + + case "asDouble", "as_double": + { + var ov *Exemplar_AsDouble + if !UseProtoPooling.IsEnabled() { + ov = &Exemplar_AsDouble{} + } else { + ov = ProtoPoolExemplar_AsDouble.Get().(*Exemplar_AsDouble) + } + ov.AsDouble = iter.ReadFloat64() + orig.Value = ov + } + case "asInt", "as_int": + { + var ov *Exemplar_AsInt + if !UseProtoPooling.IsEnabled() { + ov = &Exemplar_AsInt{} + } else { + ov = ProtoPoolExemplar_AsInt.Get().(*Exemplar_AsInt) + } + ov.AsInt = iter.ReadInt64() + orig.Value = ov + } + + case "traceId", "trace_id": + + orig.TraceId.UnmarshalJSON(iter) + case "spanId", "span_id": + + orig.SpanId.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *Exemplar) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.FilteredAttributes { + l = orig.FilteredAttributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + switch orig := orig.Value.(type) { + case nil: + _ = orig + break + case *Exemplar_AsDouble: + + n += 9 + case *Exemplar_AsInt: + + n += 9 + } + l = orig.TraceId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.SpanId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *Exemplar) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.FilteredAttributes) - 1; i >= 0; i-- { + l = orig.FilteredAttributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + } + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x11 + } + switch orig := orig.Value.(type) { + case *Exemplar_AsDouble: + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.AsDouble)) + pos-- + buf[pos] = 0x19 + + case *Exemplar_AsInt: + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.AsInt)) + pos-- + buf[pos] = 0x31 + + } + l = orig.TraceId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + + l = orig.SpanId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + + return len(buf) - pos +} + +func (orig *Exemplar) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field FilteredAttributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.FilteredAttributes = append(orig.FilteredAttributes, KeyValue{}) + err = orig.FilteredAttributes[len(orig.FilteredAttributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 3: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field AsDouble", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + var ov *Exemplar_AsDouble + if !UseProtoPooling.IsEnabled() { + ov = &Exemplar_AsDouble{} + } else { + ov = ProtoPoolExemplar_AsDouble.Get().(*Exemplar_AsDouble) + } + ov.AsDouble = math.Float64frombits(num) + orig.Value = ov + + case 6: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field AsInt", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + var ov *Exemplar_AsInt + if !UseProtoPooling.IsEnabled() { + ov = &Exemplar_AsInt{} + } else { + ov = ProtoPoolExemplar_AsInt.Get().(*Exemplar_AsInt) + } + ov.AsInt = int64(num) + orig.Value = ov + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TraceId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SpanId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExemplar() *Exemplar { + orig := NewExemplar() + orig.FilteredAttributes = []KeyValue{{}, *GenTestKeyValue()} + orig.TimeUnixNano = uint64(13) + orig.Value = &Exemplar_AsDouble{AsDouble: float64(3.1415926)} + orig.TraceId = *GenTestTraceID() + orig.SpanId = *GenTestSpanID() + return orig +} + +func GenTestExemplarPtrSlice() []*Exemplar { + orig := make([]*Exemplar, 5) + orig[0] = NewExemplar() + orig[1] = GenTestExemplar() + orig[2] = NewExemplar() + orig[3] = GenTestExemplar() + orig[4] = NewExemplar() + return orig +} + +func GenTestExemplarSlice() []Exemplar { + orig := make([]Exemplar, 5) + orig[1] = *GenTestExemplar() + orig[3] = *GenTestExemplar() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogram.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogram.go new file mode 100644 index 00000000000..5d5e07793d2 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogram.go @@ -0,0 +1,275 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExponentialHistogram represents the type of a metric that is calculated by aggregating +// as a ExponentialHistogram of all reported double measurements over a time interval. +type ExponentialHistogram struct { + DataPoints []*ExponentialHistogramDataPoint + AggregationTemporality AggregationTemporality +} + +var ( + protoPoolExponentialHistogram = sync.Pool{ + New: func() any { + return &ExponentialHistogram{} + }, + } +) + +func NewExponentialHistogram() *ExponentialHistogram { + if !UseProtoPooling.IsEnabled() { + return &ExponentialHistogram{} + } + return protoPoolExponentialHistogram.Get().(*ExponentialHistogram) +} + +func DeleteExponentialHistogram(orig *ExponentialHistogram, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.DataPoints { + DeleteExponentialHistogramDataPoint(orig.DataPoints[i], true) + } + + orig.Reset() + if nullable { + protoPoolExponentialHistogram.Put(orig) + } +} + +func CopyExponentialHistogram(dest, src *ExponentialHistogram) *ExponentialHistogram { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExponentialHistogram() + } + dest.DataPoints = CopyExponentialHistogramDataPointPtrSlice(dest.DataPoints, src.DataPoints) + + dest.AggregationTemporality = src.AggregationTemporality + + return dest +} + +func CopyExponentialHistogramSlice(dest, src []ExponentialHistogram) []ExponentialHistogram { + var newDest []ExponentialHistogram + if cap(dest) < len(src) { + newDest = make([]ExponentialHistogram, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExponentialHistogram(&dest[i], false) + } + } + for i := range src { + CopyExponentialHistogram(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExponentialHistogramPtrSlice(dest, src []*ExponentialHistogram) []*ExponentialHistogram { + var newDest []*ExponentialHistogram + if cap(dest) < len(src) { + newDest = make([]*ExponentialHistogram, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExponentialHistogram() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExponentialHistogram(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExponentialHistogram() + } + } + for i := range src { + CopyExponentialHistogram(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExponentialHistogram) Reset() { + *orig = ExponentialHistogram{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExponentialHistogram) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.DataPoints) > 0 { + dest.WriteObjectField("dataPoints") + dest.WriteArrayStart() + orig.DataPoints[0].MarshalJSON(dest) + for i := 1; i < len(orig.DataPoints); i++ { + dest.WriteMore() + orig.DataPoints[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + + if int32(orig.AggregationTemporality) != 0 { + dest.WriteObjectField("aggregationTemporality") + dest.WriteInt32(int32(orig.AggregationTemporality)) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExponentialHistogram) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "dataPoints", "data_points": + for iter.ReadArray() { + orig.DataPoints = append(orig.DataPoints, NewExponentialHistogramDataPoint()) + orig.DataPoints[len(orig.DataPoints)-1].UnmarshalJSON(iter) + } + + case "aggregationTemporality", "aggregation_temporality": + orig.AggregationTemporality = AggregationTemporality(iter.ReadEnumValue(AggregationTemporality_value)) + default: + iter.Skip() + } + } +} + +func (orig *ExponentialHistogram) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.DataPoints { + l = orig.DataPoints[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.AggregationTemporality != AggregationTemporality(0) { + n += 1 + proto.Sov(uint64(orig.AggregationTemporality)) + } + return n +} + +func (orig *ExponentialHistogram) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.DataPoints) - 1; i >= 0; i-- { + l = orig.DataPoints[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.AggregationTemporality != AggregationTemporality(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AggregationTemporality)) + pos-- + buf[pos] = 0x10 + } + return len(buf) - pos +} + +func (orig *ExponentialHistogram) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DataPoints = append(orig.DataPoints, NewExponentialHistogramDataPoint()) + err = orig.DataPoints[len(orig.DataPoints)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AggregationTemporality = AggregationTemporality(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExponentialHistogram() *ExponentialHistogram { + orig := NewExponentialHistogram() + orig.DataPoints = []*ExponentialHistogramDataPoint{{}, GenTestExponentialHistogramDataPoint()} + orig.AggregationTemporality = AggregationTemporality(13) + return orig +} + +func GenTestExponentialHistogramPtrSlice() []*ExponentialHistogram { + orig := make([]*ExponentialHistogram, 5) + orig[0] = NewExponentialHistogram() + orig[1] = GenTestExponentialHistogram() + orig[2] = NewExponentialHistogram() + orig[3] = GenTestExponentialHistogram() + orig[4] = NewExponentialHistogram() + return orig +} + +func GenTestExponentialHistogramSlice() []ExponentialHistogram { + orig := make([]ExponentialHistogram, 5) + orig[1] = *GenTestExponentialHistogram() + orig[3] = *GenTestExponentialHistogram() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogramdatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogramdatapoint.go new file mode 100644 index 00000000000..e0407b073e0 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogramdatapoint.go @@ -0,0 +1,732 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the +// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains +// summary statistics for a population of values, it may optionally contain the +// distribution of those values across a set of buckets. +type ExponentialHistogramDataPoint struct { + Positive ExponentialHistogramDataPointBuckets + Negative ExponentialHistogramDataPointBuckets + Attributes []KeyValue + Exemplars []Exemplar + StartTimeUnixNano uint64 + TimeUnixNano uint64 + Count uint64 + Sum float64 + ZeroCount uint64 + Min float64 + Max float64 + ZeroThreshold float64 + metadata [1]uint64 + Scale int32 + Flags uint32 +} + +var ( + protoPoolExponentialHistogramDataPoint = sync.Pool{ + New: func() any { + return &ExponentialHistogramDataPoint{} + }, + } +) + +func NewExponentialHistogramDataPoint() *ExponentialHistogramDataPoint { + if !UseProtoPooling.IsEnabled() { + return &ExponentialHistogramDataPoint{} + } + return protoPoolExponentialHistogramDataPoint.Get().(*ExponentialHistogramDataPoint) +} + +func DeleteExponentialHistogramDataPoint(orig *ExponentialHistogramDataPoint, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + DeleteExponentialHistogramDataPointBuckets(&orig.Positive, false) + DeleteExponentialHistogramDataPointBuckets(&orig.Negative, false) + + for i := range orig.Exemplars { + DeleteExemplar(&orig.Exemplars[i], false) + } + + orig.Reset() + if nullable { + protoPoolExponentialHistogramDataPoint.Put(orig) + } +} + +func CopyExponentialHistogramDataPoint(dest, src *ExponentialHistogramDataPoint) *ExponentialHistogramDataPoint { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExponentialHistogramDataPoint() + } + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.StartTimeUnixNano = src.StartTimeUnixNano + dest.TimeUnixNano = src.TimeUnixNano + dest.Count = src.Count + if src.HasSum() { + dest.SetSum(src.Sum) + } else { + dest.RemoveSum() + } + + dest.Scale = src.Scale + dest.ZeroCount = src.ZeroCount + CopyExponentialHistogramDataPointBuckets(&dest.Positive, &src.Positive) + + CopyExponentialHistogramDataPointBuckets(&dest.Negative, &src.Negative) + + dest.Flags = src.Flags + dest.Exemplars = CopyExemplarSlice(dest.Exemplars, src.Exemplars) + + if src.HasMin() { + dest.SetMin(src.Min) + } else { + dest.RemoveMin() + } + + if src.HasMax() { + dest.SetMax(src.Max) + } else { + dest.RemoveMax() + } + + dest.ZeroThreshold = src.ZeroThreshold + + return dest +} + +func CopyExponentialHistogramDataPointSlice(dest, src []ExponentialHistogramDataPoint) []ExponentialHistogramDataPoint { + var newDest []ExponentialHistogramDataPoint + if cap(dest) < len(src) { + newDest = make([]ExponentialHistogramDataPoint, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExponentialHistogramDataPoint(&dest[i], false) + } + } + for i := range src { + CopyExponentialHistogramDataPoint(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExponentialHistogramDataPointPtrSlice(dest, src []*ExponentialHistogramDataPoint) []*ExponentialHistogramDataPoint { + var newDest []*ExponentialHistogramDataPoint + if cap(dest) < len(src) { + newDest = make([]*ExponentialHistogramDataPoint, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExponentialHistogramDataPoint() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExponentialHistogramDataPoint(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExponentialHistogramDataPoint() + } + } + for i := range src { + CopyExponentialHistogramDataPoint(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExponentialHistogramDataPoint) Reset() { + *orig = ExponentialHistogramDataPoint{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExponentialHistogramDataPoint) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.StartTimeUnixNano != uint64(0) { + dest.WriteObjectField("startTimeUnixNano") + dest.WriteUint64(orig.StartTimeUnixNano) + } + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + if orig.Count != uint64(0) { + dest.WriteObjectField("count") + dest.WriteUint64(orig.Count) + } + if orig.HasSum() { + dest.WriteObjectField("sum") + dest.WriteFloat64(orig.Sum) + } + if orig.Scale != int32(0) { + dest.WriteObjectField("scale") + dest.WriteInt32(orig.Scale) + } + if orig.ZeroCount != uint64(0) { + dest.WriteObjectField("zeroCount") + dest.WriteUint64(orig.ZeroCount) + } + dest.WriteObjectField("positive") + orig.Positive.MarshalJSON(dest) + dest.WriteObjectField("negative") + orig.Negative.MarshalJSON(dest) + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + if len(orig.Exemplars) > 0 { + dest.WriteObjectField("exemplars") + dest.WriteArrayStart() + orig.Exemplars[0].MarshalJSON(dest) + for i := 1; i < len(orig.Exemplars); i++ { + dest.WriteMore() + orig.Exemplars[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.HasMin() { + dest.WriteObjectField("min") + dest.WriteFloat64(orig.Min) + } + if orig.HasMax() { + dest.WriteObjectField("max") + dest.WriteFloat64(orig.Max) + } + if orig.ZeroThreshold != float64(0) { + dest.WriteObjectField("zeroThreshold") + dest.WriteFloat64(orig.ZeroThreshold) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExponentialHistogramDataPoint) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "startTimeUnixNano", "start_time_unix_nano": + orig.StartTimeUnixNano = iter.ReadUint64() + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + case "count": + orig.Count = iter.ReadUint64() + case "sum": + orig.SetSum(iter.ReadFloat64()) + + case "scale": + orig.Scale = iter.ReadInt32() + case "zeroCount", "zero_count": + orig.ZeroCount = iter.ReadUint64() + case "positive": + + orig.Positive.UnmarshalJSON(iter) + case "negative": + + orig.Negative.UnmarshalJSON(iter) + case "flags": + orig.Flags = iter.ReadUint32() + case "exemplars": + for iter.ReadArray() { + orig.Exemplars = append(orig.Exemplars, Exemplar{}) + orig.Exemplars[len(orig.Exemplars)-1].UnmarshalJSON(iter) + } + + case "min": + orig.SetMin(iter.ReadFloat64()) + + case "max": + orig.SetMax(iter.ReadFloat64()) + + case "zeroThreshold", "zero_threshold": + orig.ZeroThreshold = iter.ReadFloat64() + default: + iter.Skip() + } + } +} + +func (orig *ExponentialHistogramDataPoint) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.StartTimeUnixNano != uint64(0) { + n += 9 + } + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + if orig.Count != uint64(0) { + n += 9 + } + if orig.HasSum() { + n += 9 + } + if orig.Scale != int32(0) { + n += 1 + proto.Soz(uint64(orig.Scale)) + } + if orig.ZeroCount != uint64(0) { + n += 9 + } + l = orig.Positive.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.Negative.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.Flags != uint32(0) { + n += 1 + proto.Sov(uint64(orig.Flags)) + } + for i := range orig.Exemplars { + l = orig.Exemplars[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.HasMin() { + n += 9 + } + if orig.HasMax() { + n += 9 + } + if orig.ZeroThreshold != float64(0) { + n += 9 + } + return n +} + +func (orig *ExponentialHistogramDataPoint) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.StartTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.StartTimeUnixNano)) + pos-- + buf[pos] = 0x11 + } + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x19 + } + if orig.Count != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.Count)) + pos-- + buf[pos] = 0x21 + } + if orig.HasSum() { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Sum)) + pos-- + buf[pos] = 0x29 + } + if orig.Scale != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64((uint32(orig.Scale)<<1)^uint32(orig.Scale>>31))) + pos-- + buf[pos] = 0x30 + } + if orig.ZeroCount != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.ZeroCount)) + pos-- + buf[pos] = 0x39 + } + l = orig.Positive.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x42 + + l = orig.Negative.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x4a + + if orig.Flags != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Flags)) + pos-- + buf[pos] = 0x50 + } + for i := len(orig.Exemplars) - 1; i >= 0; i-- { + l = orig.Exemplars[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x5a + } + if orig.HasMin() { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Min)) + pos-- + buf[pos] = 0x61 + } + if orig.HasMax() { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Max)) + pos-- + buf[pos] = 0x69 + } + if orig.ZeroThreshold != float64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.ZeroThreshold)) + pos-- + buf[pos] = 0x71 + } + return len(buf) - pos +} + +func (orig *ExponentialHistogramDataPoint) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.StartTimeUnixNano = uint64(num) + + case 3: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 4: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.Count = uint64(num) + + case 5: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.SetSum(math.Float64frombits(num)) + + case 6: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Scale = int32(uint32(num>>1) ^ uint32(int32((num&1)<<31)>>31)) + + case 7: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field ZeroCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.ZeroCount = uint64(num) + + case 8: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Positive", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Positive.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 9: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Negative", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Negative.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 10: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Flags = uint32(num) + + case 11: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Exemplars = append(orig.Exemplars, Exemplar{}) + err = orig.Exemplars[len(orig.Exemplars)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 12: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.SetMin(math.Float64frombits(num)) + + case 13: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.SetMax(math.Float64frombits(num)) + + case 14: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field ZeroThreshold", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.ZeroThreshold = math.Float64frombits(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +const fieldBlockExponentialHistogramDataPointSum = uint64(0 >> 6) +const fieldBitExponentialHistogramDataPointSum = uint64(1 << 0 & 0x3F) + +func (m *ExponentialHistogramDataPoint) SetSum(value float64) { + m.Sum = value + m.metadata[fieldBlockExponentialHistogramDataPointSum] |= fieldBitExponentialHistogramDataPointSum +} + +func (m *ExponentialHistogramDataPoint) RemoveSum() { + m.Sum = float64(0) + m.metadata[fieldBlockExponentialHistogramDataPointSum] &^= fieldBitExponentialHistogramDataPointSum +} + +func (m *ExponentialHistogramDataPoint) HasSum() bool { + return m.metadata[fieldBlockExponentialHistogramDataPointSum]&fieldBitExponentialHistogramDataPointSum != 0 +} + +const fieldBlockExponentialHistogramDataPointMin = uint64(1 >> 6) +const fieldBitExponentialHistogramDataPointMin = uint64(1 << 1 & 0x3F) + +func (m *ExponentialHistogramDataPoint) SetMin(value float64) { + m.Min = value + m.metadata[fieldBlockExponentialHistogramDataPointMin] |= fieldBitExponentialHistogramDataPointMin +} + +func (m *ExponentialHistogramDataPoint) RemoveMin() { + m.Min = float64(0) + m.metadata[fieldBlockExponentialHistogramDataPointMin] &^= fieldBitExponentialHistogramDataPointMin +} + +func (m *ExponentialHistogramDataPoint) HasMin() bool { + return m.metadata[fieldBlockExponentialHistogramDataPointMin]&fieldBitExponentialHistogramDataPointMin != 0 +} + +const fieldBlockExponentialHistogramDataPointMax = uint64(2 >> 6) +const fieldBitExponentialHistogramDataPointMax = uint64(1 << 2 & 0x3F) + +func (m *ExponentialHistogramDataPoint) SetMax(value float64) { + m.Max = value + m.metadata[fieldBlockExponentialHistogramDataPointMax] |= fieldBitExponentialHistogramDataPointMax +} + +func (m *ExponentialHistogramDataPoint) RemoveMax() { + m.Max = float64(0) + m.metadata[fieldBlockExponentialHistogramDataPointMax] &^= fieldBitExponentialHistogramDataPointMax +} + +func (m *ExponentialHistogramDataPoint) HasMax() bool { + return m.metadata[fieldBlockExponentialHistogramDataPointMax]&fieldBitExponentialHistogramDataPointMax != 0 +} + +func GenTestExponentialHistogramDataPoint() *ExponentialHistogramDataPoint { + orig := NewExponentialHistogramDataPoint() + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.StartTimeUnixNano = uint64(13) + orig.TimeUnixNano = uint64(13) + orig.Count = uint64(13) + orig.SetSum(float64(3.1415926)) + orig.Scale = int32(13) + orig.ZeroCount = uint64(13) + orig.Positive = *GenTestExponentialHistogramDataPointBuckets() + orig.Negative = *GenTestExponentialHistogramDataPointBuckets() + orig.Flags = uint32(13) + orig.Exemplars = []Exemplar{{}, *GenTestExemplar()} + orig.SetMin(float64(3.1415926)) + orig.SetMax(float64(3.1415926)) + orig.ZeroThreshold = float64(3.1415926) + return orig +} + +func GenTestExponentialHistogramDataPointPtrSlice() []*ExponentialHistogramDataPoint { + orig := make([]*ExponentialHistogramDataPoint, 5) + orig[0] = NewExponentialHistogramDataPoint() + orig[1] = GenTestExponentialHistogramDataPoint() + orig[2] = NewExponentialHistogramDataPoint() + orig[3] = GenTestExponentialHistogramDataPoint() + orig[4] = NewExponentialHistogramDataPoint() + return orig +} + +func GenTestExponentialHistogramDataPointSlice() []ExponentialHistogramDataPoint { + orig := make([]ExponentialHistogramDataPoint, 5) + orig[1] = *GenTestExponentialHistogramDataPoint() + orig[3] = *GenTestExponentialHistogramDataPoint() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go new file mode 100644 index 00000000000..15243f12dd4 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go @@ -0,0 +1,290 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExponentialHistogramDataPointBuckets are a set of bucket counts, encoded in a contiguous array of counts. +type ExponentialHistogramDataPointBuckets struct { + BucketCounts []uint64 + Offset int32 +} + +var ( + protoPoolExponentialHistogramDataPointBuckets = sync.Pool{ + New: func() any { + return &ExponentialHistogramDataPointBuckets{} + }, + } +) + +func NewExponentialHistogramDataPointBuckets() *ExponentialHistogramDataPointBuckets { + if !UseProtoPooling.IsEnabled() { + return &ExponentialHistogramDataPointBuckets{} + } + return protoPoolExponentialHistogramDataPointBuckets.Get().(*ExponentialHistogramDataPointBuckets) +} + +func DeleteExponentialHistogramDataPointBuckets(orig *ExponentialHistogramDataPointBuckets, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolExponentialHistogramDataPointBuckets.Put(orig) + } +} + +func CopyExponentialHistogramDataPointBuckets(dest, src *ExponentialHistogramDataPointBuckets) *ExponentialHistogramDataPointBuckets { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExponentialHistogramDataPointBuckets() + } + dest.Offset = src.Offset + dest.BucketCounts = append(dest.BucketCounts[:0], src.BucketCounts...) + + return dest +} + +func CopyExponentialHistogramDataPointBucketsSlice(dest, src []ExponentialHistogramDataPointBuckets) []ExponentialHistogramDataPointBuckets { + var newDest []ExponentialHistogramDataPointBuckets + if cap(dest) < len(src) { + newDest = make([]ExponentialHistogramDataPointBuckets, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExponentialHistogramDataPointBuckets(&dest[i], false) + } + } + for i := range src { + CopyExponentialHistogramDataPointBuckets(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExponentialHistogramDataPointBucketsPtrSlice(dest, src []*ExponentialHistogramDataPointBuckets) []*ExponentialHistogramDataPointBuckets { + var newDest []*ExponentialHistogramDataPointBuckets + if cap(dest) < len(src) { + newDest = make([]*ExponentialHistogramDataPointBuckets, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExponentialHistogramDataPointBuckets() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExponentialHistogramDataPointBuckets(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExponentialHistogramDataPointBuckets() + } + } + for i := range src { + CopyExponentialHistogramDataPointBuckets(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExponentialHistogramDataPointBuckets) Reset() { + *orig = ExponentialHistogramDataPointBuckets{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExponentialHistogramDataPointBuckets) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Offset != int32(0) { + dest.WriteObjectField("offset") + dest.WriteInt32(orig.Offset) + } + if len(orig.BucketCounts) > 0 { + dest.WriteObjectField("bucketCounts") + dest.WriteArrayStart() + dest.WriteUint64(orig.BucketCounts[0]) + for i := 1; i < len(orig.BucketCounts); i++ { + dest.WriteMore() + dest.WriteUint64(orig.BucketCounts[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExponentialHistogramDataPointBuckets) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "offset": + orig.Offset = iter.ReadInt32() + case "bucketCounts", "bucket_counts": + for iter.ReadArray() { + orig.BucketCounts = append(orig.BucketCounts, iter.ReadUint64()) + } + + default: + iter.Skip() + } + } +} + +func (orig *ExponentialHistogramDataPointBuckets) SizeProto() int { + var n int + var l int + _ = l + if orig.Offset != int32(0) { + n += 1 + proto.Soz(uint64(orig.Offset)) + } + + if len(orig.BucketCounts) > 0 { + l = 0 + for _, e := range orig.BucketCounts { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExponentialHistogramDataPointBuckets) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.Offset != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64((uint32(orig.Offset)<<1)^uint32(orig.Offset>>31))) + pos-- + buf[pos] = 0x8 + } + l = len(orig.BucketCounts) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.BucketCounts[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *ExponentialHistogramDataPointBuckets) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Offset = int32(uint32(num>>1) ^ uint32(int32((num&1)<<31)>>31)) + case 2: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.BucketCounts = append(orig.BucketCounts, uint64(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field BucketCounts", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.BucketCounts = append(orig.BucketCounts, uint64(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExponentialHistogramDataPointBuckets() *ExponentialHistogramDataPointBuckets { + orig := NewExponentialHistogramDataPointBuckets() + orig.Offset = int32(13) + orig.BucketCounts = []uint64{uint64(0), uint64(13)} + return orig +} + +func GenTestExponentialHistogramDataPointBucketsPtrSlice() []*ExponentialHistogramDataPointBuckets { + orig := make([]*ExponentialHistogramDataPointBuckets, 5) + orig[0] = NewExponentialHistogramDataPointBuckets() + orig[1] = GenTestExponentialHistogramDataPointBuckets() + orig[2] = NewExponentialHistogramDataPointBuckets() + orig[3] = GenTestExponentialHistogramDataPointBuckets() + orig[4] = NewExponentialHistogramDataPointBuckets() + return orig +} + +func GenTestExponentialHistogramDataPointBucketsSlice() []ExponentialHistogramDataPointBuckets { + orig := make([]ExponentialHistogramDataPointBuckets, 5) + orig[1] = *GenTestExponentialHistogramDataPointBuckets() + orig[3] = *GenTestExponentialHistogramDataPointBuckets() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogspartialsuccess.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogspartialsuccess.go new file mode 100644 index 00000000000..bccd38e7d26 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogspartialsuccess.go @@ -0,0 +1,257 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportPartialSuccess represents the details of a partially successful export request. +type ExportLogsPartialSuccess struct { + ErrorMessage string + RejectedLogRecords int64 +} + +var ( + protoPoolExportLogsPartialSuccess = sync.Pool{ + New: func() any { + return &ExportLogsPartialSuccess{} + }, + } +) + +func NewExportLogsPartialSuccess() *ExportLogsPartialSuccess { + if !UseProtoPooling.IsEnabled() { + return &ExportLogsPartialSuccess{} + } + return protoPoolExportLogsPartialSuccess.Get().(*ExportLogsPartialSuccess) +} + +func DeleteExportLogsPartialSuccess(orig *ExportLogsPartialSuccess, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolExportLogsPartialSuccess.Put(orig) + } +} + +func CopyExportLogsPartialSuccess(dest, src *ExportLogsPartialSuccess) *ExportLogsPartialSuccess { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportLogsPartialSuccess() + } + dest.RejectedLogRecords = src.RejectedLogRecords + dest.ErrorMessage = src.ErrorMessage + + return dest +} + +func CopyExportLogsPartialSuccessSlice(dest, src []ExportLogsPartialSuccess) []ExportLogsPartialSuccess { + var newDest []ExportLogsPartialSuccess + if cap(dest) < len(src) { + newDest = make([]ExportLogsPartialSuccess, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportLogsPartialSuccess(&dest[i], false) + } + } + for i := range src { + CopyExportLogsPartialSuccess(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportLogsPartialSuccessPtrSlice(dest, src []*ExportLogsPartialSuccess) []*ExportLogsPartialSuccess { + var newDest []*ExportLogsPartialSuccess + if cap(dest) < len(src) { + newDest = make([]*ExportLogsPartialSuccess, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportLogsPartialSuccess() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportLogsPartialSuccess(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportLogsPartialSuccess() + } + } + for i := range src { + CopyExportLogsPartialSuccess(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportLogsPartialSuccess) Reset() { + *orig = ExportLogsPartialSuccess{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportLogsPartialSuccess) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RejectedLogRecords != int64(0) { + dest.WriteObjectField("rejectedLogRecords") + dest.WriteInt64(orig.RejectedLogRecords) + } + if orig.ErrorMessage != "" { + dest.WriteObjectField("errorMessage") + dest.WriteString(orig.ErrorMessage) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportLogsPartialSuccess) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "rejectedLogRecords", "rejected_log_records": + orig.RejectedLogRecords = iter.ReadInt64() + case "errorMessage", "error_message": + orig.ErrorMessage = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ExportLogsPartialSuccess) SizeProto() int { + var n int + var l int + _ = l + if orig.RejectedLogRecords != int64(0) { + n += 1 + proto.Sov(uint64(orig.RejectedLogRecords)) + } + + l = len(orig.ErrorMessage) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportLogsPartialSuccess) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RejectedLogRecords != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.RejectedLogRecords)) + pos-- + buf[pos] = 0x8 + } + l = len(orig.ErrorMessage) + if l > 0 { + pos -= l + copy(buf[pos:], orig.ErrorMessage) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *ExportLogsPartialSuccess) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedLogRecords", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.RejectedLogRecords = int64(num) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ErrorMessage = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportLogsPartialSuccess() *ExportLogsPartialSuccess { + orig := NewExportLogsPartialSuccess() + orig.RejectedLogRecords = int64(13) + orig.ErrorMessage = "test_errormessage" + return orig +} + +func GenTestExportLogsPartialSuccessPtrSlice() []*ExportLogsPartialSuccess { + orig := make([]*ExportLogsPartialSuccess, 5) + orig[0] = NewExportLogsPartialSuccess() + orig[1] = GenTestExportLogsPartialSuccess() + orig[2] = NewExportLogsPartialSuccess() + orig[3] = GenTestExportLogsPartialSuccess() + orig[4] = NewExportLogsPartialSuccess() + return orig +} + +func GenTestExportLogsPartialSuccessSlice() []ExportLogsPartialSuccess { + orig := make([]ExportLogsPartialSuccess, 5) + orig[1] = *GenTestExportLogsPartialSuccess() + orig[3] = *GenTestExportLogsPartialSuccess() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogsservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogsservicerequest.go new file mode 100644 index 00000000000..7fb48b36a21 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogsservicerequest.go @@ -0,0 +1,244 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Logs is the top-level struct that is propagated through the logs pipeline. +// Use NewLogs to create new instance, zero-initialized instance is not valid for use. +type ExportLogsServiceRequest struct { + ResourceLogs []*ResourceLogs +} + +var ( + protoPoolExportLogsServiceRequest = sync.Pool{ + New: func() any { + return &ExportLogsServiceRequest{} + }, + } +) + +func NewExportLogsServiceRequest() *ExportLogsServiceRequest { + if !UseProtoPooling.IsEnabled() { + return &ExportLogsServiceRequest{} + } + return protoPoolExportLogsServiceRequest.Get().(*ExportLogsServiceRequest) +} + +func DeleteExportLogsServiceRequest(orig *ExportLogsServiceRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceLogs { + DeleteResourceLogs(orig.ResourceLogs[i], true) + } + orig.Reset() + if nullable { + protoPoolExportLogsServiceRequest.Put(orig) + } +} + +func CopyExportLogsServiceRequest(dest, src *ExportLogsServiceRequest) *ExportLogsServiceRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportLogsServiceRequest() + } + dest.ResourceLogs = CopyResourceLogsPtrSlice(dest.ResourceLogs, src.ResourceLogs) + + return dest +} + +func CopyExportLogsServiceRequestSlice(dest, src []ExportLogsServiceRequest) []ExportLogsServiceRequest { + var newDest []ExportLogsServiceRequest + if cap(dest) < len(src) { + newDest = make([]ExportLogsServiceRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportLogsServiceRequest(&dest[i], false) + } + } + for i := range src { + CopyExportLogsServiceRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportLogsServiceRequestPtrSlice(dest, src []*ExportLogsServiceRequest) []*ExportLogsServiceRequest { + var newDest []*ExportLogsServiceRequest + if cap(dest) < len(src) { + newDest = make([]*ExportLogsServiceRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportLogsServiceRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportLogsServiceRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportLogsServiceRequest() + } + } + for i := range src { + CopyExportLogsServiceRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportLogsServiceRequest) Reset() { + *orig = ExportLogsServiceRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportLogsServiceRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceLogs) > 0 { + dest.WriteObjectField("resourceLogs") + dest.WriteArrayStart() + orig.ResourceLogs[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceLogs); i++ { + dest.WriteMore() + orig.ResourceLogs[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportLogsServiceRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceLogs", "resource_logs": + for iter.ReadArray() { + orig.ResourceLogs = append(orig.ResourceLogs, NewResourceLogs()) + orig.ResourceLogs[len(orig.ResourceLogs)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ExportLogsServiceRequest) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceLogs { + l = orig.ResourceLogs[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportLogsServiceRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceLogs) - 1; i >= 0; i-- { + l = orig.ResourceLogs[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *ExportLogsServiceRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceLogs = append(orig.ResourceLogs, NewResourceLogs()) + err = orig.ResourceLogs[len(orig.ResourceLogs)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportLogsServiceRequest() *ExportLogsServiceRequest { + orig := NewExportLogsServiceRequest() + orig.ResourceLogs = []*ResourceLogs{{}, GenTestResourceLogs()} + return orig +} + +func GenTestExportLogsServiceRequestPtrSlice() []*ExportLogsServiceRequest { + orig := make([]*ExportLogsServiceRequest, 5) + orig[0] = NewExportLogsServiceRequest() + orig[1] = GenTestExportLogsServiceRequest() + orig[2] = NewExportLogsServiceRequest() + orig[3] = GenTestExportLogsServiceRequest() + orig[4] = NewExportLogsServiceRequest() + return orig +} + +func GenTestExportLogsServiceRequestSlice() []ExportLogsServiceRequest { + orig := make([]ExportLogsServiceRequest, 5) + orig[1] = *GenTestExportLogsServiceRequest() + orig[3] = *GenTestExportLogsServiceRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogsserviceresponse.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogsserviceresponse.go new file mode 100644 index 00000000000..5570fe93d33 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportlogsserviceresponse.go @@ -0,0 +1,227 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportResponse represents the response for gRPC/HTTP client/server. +type ExportLogsServiceResponse struct { + PartialSuccess ExportLogsPartialSuccess +} + +var ( + protoPoolExportLogsServiceResponse = sync.Pool{ + New: func() any { + return &ExportLogsServiceResponse{} + }, + } +) + +func NewExportLogsServiceResponse() *ExportLogsServiceResponse { + if !UseProtoPooling.IsEnabled() { + return &ExportLogsServiceResponse{} + } + return protoPoolExportLogsServiceResponse.Get().(*ExportLogsServiceResponse) +} + +func DeleteExportLogsServiceResponse(orig *ExportLogsServiceResponse, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteExportLogsPartialSuccess(&orig.PartialSuccess, false) + orig.Reset() + if nullable { + protoPoolExportLogsServiceResponse.Put(orig) + } +} + +func CopyExportLogsServiceResponse(dest, src *ExportLogsServiceResponse) *ExportLogsServiceResponse { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportLogsServiceResponse() + } + CopyExportLogsPartialSuccess(&dest.PartialSuccess, &src.PartialSuccess) + + return dest +} + +func CopyExportLogsServiceResponseSlice(dest, src []ExportLogsServiceResponse) []ExportLogsServiceResponse { + var newDest []ExportLogsServiceResponse + if cap(dest) < len(src) { + newDest = make([]ExportLogsServiceResponse, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportLogsServiceResponse(&dest[i], false) + } + } + for i := range src { + CopyExportLogsServiceResponse(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportLogsServiceResponsePtrSlice(dest, src []*ExportLogsServiceResponse) []*ExportLogsServiceResponse { + var newDest []*ExportLogsServiceResponse + if cap(dest) < len(src) { + newDest = make([]*ExportLogsServiceResponse, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportLogsServiceResponse() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportLogsServiceResponse(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportLogsServiceResponse() + } + } + for i := range src { + CopyExportLogsServiceResponse(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportLogsServiceResponse) Reset() { + *orig = ExportLogsServiceResponse{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportLogsServiceResponse) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("partialSuccess") + orig.PartialSuccess.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportLogsServiceResponse) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "partialSuccess", "partial_success": + + orig.PartialSuccess.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *ExportLogsServiceResponse) SizeProto() int { + var n int + var l int + _ = l + l = orig.PartialSuccess.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *ExportLogsServiceResponse) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.PartialSuccess.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + return len(buf) - pos +} + +func (orig *ExportLogsServiceResponse) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.PartialSuccess.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportLogsServiceResponse() *ExportLogsServiceResponse { + orig := NewExportLogsServiceResponse() + orig.PartialSuccess = *GenTestExportLogsPartialSuccess() + return orig +} + +func GenTestExportLogsServiceResponsePtrSlice() []*ExportLogsServiceResponse { + orig := make([]*ExportLogsServiceResponse, 5) + orig[0] = NewExportLogsServiceResponse() + orig[1] = GenTestExportLogsServiceResponse() + orig[2] = NewExportLogsServiceResponse() + orig[3] = GenTestExportLogsServiceResponse() + orig[4] = NewExportLogsServiceResponse() + return orig +} + +func GenTestExportLogsServiceResponseSlice() []ExportLogsServiceResponse { + orig := make([]ExportLogsServiceResponse, 5) + orig[1] = *GenTestExportLogsServiceResponse() + orig[3] = *GenTestExportLogsServiceResponse() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricspartialsuccess.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricspartialsuccess.go new file mode 100644 index 00000000000..4915d3cb741 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricspartialsuccess.go @@ -0,0 +1,257 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportPartialSuccess represents the details of a partially successful export request. +type ExportMetricsPartialSuccess struct { + ErrorMessage string + RejectedDataPoints int64 +} + +var ( + protoPoolExportMetricsPartialSuccess = sync.Pool{ + New: func() any { + return &ExportMetricsPartialSuccess{} + }, + } +) + +func NewExportMetricsPartialSuccess() *ExportMetricsPartialSuccess { + if !UseProtoPooling.IsEnabled() { + return &ExportMetricsPartialSuccess{} + } + return protoPoolExportMetricsPartialSuccess.Get().(*ExportMetricsPartialSuccess) +} + +func DeleteExportMetricsPartialSuccess(orig *ExportMetricsPartialSuccess, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolExportMetricsPartialSuccess.Put(orig) + } +} + +func CopyExportMetricsPartialSuccess(dest, src *ExportMetricsPartialSuccess) *ExportMetricsPartialSuccess { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportMetricsPartialSuccess() + } + dest.RejectedDataPoints = src.RejectedDataPoints + dest.ErrorMessage = src.ErrorMessage + + return dest +} + +func CopyExportMetricsPartialSuccessSlice(dest, src []ExportMetricsPartialSuccess) []ExportMetricsPartialSuccess { + var newDest []ExportMetricsPartialSuccess + if cap(dest) < len(src) { + newDest = make([]ExportMetricsPartialSuccess, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportMetricsPartialSuccess(&dest[i], false) + } + } + for i := range src { + CopyExportMetricsPartialSuccess(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportMetricsPartialSuccessPtrSlice(dest, src []*ExportMetricsPartialSuccess) []*ExportMetricsPartialSuccess { + var newDest []*ExportMetricsPartialSuccess + if cap(dest) < len(src) { + newDest = make([]*ExportMetricsPartialSuccess, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportMetricsPartialSuccess() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportMetricsPartialSuccess(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportMetricsPartialSuccess() + } + } + for i := range src { + CopyExportMetricsPartialSuccess(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportMetricsPartialSuccess) Reset() { + *orig = ExportMetricsPartialSuccess{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportMetricsPartialSuccess) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RejectedDataPoints != int64(0) { + dest.WriteObjectField("rejectedDataPoints") + dest.WriteInt64(orig.RejectedDataPoints) + } + if orig.ErrorMessage != "" { + dest.WriteObjectField("errorMessage") + dest.WriteString(orig.ErrorMessage) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportMetricsPartialSuccess) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "rejectedDataPoints", "rejected_data_points": + orig.RejectedDataPoints = iter.ReadInt64() + case "errorMessage", "error_message": + orig.ErrorMessage = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ExportMetricsPartialSuccess) SizeProto() int { + var n int + var l int + _ = l + if orig.RejectedDataPoints != int64(0) { + n += 1 + proto.Sov(uint64(orig.RejectedDataPoints)) + } + + l = len(orig.ErrorMessage) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportMetricsPartialSuccess) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RejectedDataPoints != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.RejectedDataPoints)) + pos-- + buf[pos] = 0x8 + } + l = len(orig.ErrorMessage) + if l > 0 { + pos -= l + copy(buf[pos:], orig.ErrorMessage) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *ExportMetricsPartialSuccess) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedDataPoints", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.RejectedDataPoints = int64(num) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ErrorMessage = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportMetricsPartialSuccess() *ExportMetricsPartialSuccess { + orig := NewExportMetricsPartialSuccess() + orig.RejectedDataPoints = int64(13) + orig.ErrorMessage = "test_errormessage" + return orig +} + +func GenTestExportMetricsPartialSuccessPtrSlice() []*ExportMetricsPartialSuccess { + orig := make([]*ExportMetricsPartialSuccess, 5) + orig[0] = NewExportMetricsPartialSuccess() + orig[1] = GenTestExportMetricsPartialSuccess() + orig[2] = NewExportMetricsPartialSuccess() + orig[3] = GenTestExportMetricsPartialSuccess() + orig[4] = NewExportMetricsPartialSuccess() + return orig +} + +func GenTestExportMetricsPartialSuccessSlice() []ExportMetricsPartialSuccess { + orig := make([]ExportMetricsPartialSuccess, 5) + orig[1] = *GenTestExportMetricsPartialSuccess() + orig[3] = *GenTestExportMetricsPartialSuccess() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricsservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricsservicerequest.go new file mode 100644 index 00000000000..76cc8020ca9 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricsservicerequest.go @@ -0,0 +1,244 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Metrics is the top-level struct that is propagated through the metrics pipeline. +// Use NewMetrics to create new instance, zero-initialized instance is not valid for use. +type ExportMetricsServiceRequest struct { + ResourceMetrics []*ResourceMetrics +} + +var ( + protoPoolExportMetricsServiceRequest = sync.Pool{ + New: func() any { + return &ExportMetricsServiceRequest{} + }, + } +) + +func NewExportMetricsServiceRequest() *ExportMetricsServiceRequest { + if !UseProtoPooling.IsEnabled() { + return &ExportMetricsServiceRequest{} + } + return protoPoolExportMetricsServiceRequest.Get().(*ExportMetricsServiceRequest) +} + +func DeleteExportMetricsServiceRequest(orig *ExportMetricsServiceRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceMetrics { + DeleteResourceMetrics(orig.ResourceMetrics[i], true) + } + orig.Reset() + if nullable { + protoPoolExportMetricsServiceRequest.Put(orig) + } +} + +func CopyExportMetricsServiceRequest(dest, src *ExportMetricsServiceRequest) *ExportMetricsServiceRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportMetricsServiceRequest() + } + dest.ResourceMetrics = CopyResourceMetricsPtrSlice(dest.ResourceMetrics, src.ResourceMetrics) + + return dest +} + +func CopyExportMetricsServiceRequestSlice(dest, src []ExportMetricsServiceRequest) []ExportMetricsServiceRequest { + var newDest []ExportMetricsServiceRequest + if cap(dest) < len(src) { + newDest = make([]ExportMetricsServiceRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportMetricsServiceRequest(&dest[i], false) + } + } + for i := range src { + CopyExportMetricsServiceRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportMetricsServiceRequestPtrSlice(dest, src []*ExportMetricsServiceRequest) []*ExportMetricsServiceRequest { + var newDest []*ExportMetricsServiceRequest + if cap(dest) < len(src) { + newDest = make([]*ExportMetricsServiceRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportMetricsServiceRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportMetricsServiceRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportMetricsServiceRequest() + } + } + for i := range src { + CopyExportMetricsServiceRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportMetricsServiceRequest) Reset() { + *orig = ExportMetricsServiceRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportMetricsServiceRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceMetrics) > 0 { + dest.WriteObjectField("resourceMetrics") + dest.WriteArrayStart() + orig.ResourceMetrics[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceMetrics); i++ { + dest.WriteMore() + orig.ResourceMetrics[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportMetricsServiceRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceMetrics", "resource_metrics": + for iter.ReadArray() { + orig.ResourceMetrics = append(orig.ResourceMetrics, NewResourceMetrics()) + orig.ResourceMetrics[len(orig.ResourceMetrics)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ExportMetricsServiceRequest) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceMetrics { + l = orig.ResourceMetrics[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportMetricsServiceRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceMetrics) - 1; i >= 0; i-- { + l = orig.ResourceMetrics[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *ExportMetricsServiceRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceMetrics = append(orig.ResourceMetrics, NewResourceMetrics()) + err = orig.ResourceMetrics[len(orig.ResourceMetrics)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportMetricsServiceRequest() *ExportMetricsServiceRequest { + orig := NewExportMetricsServiceRequest() + orig.ResourceMetrics = []*ResourceMetrics{{}, GenTestResourceMetrics()} + return orig +} + +func GenTestExportMetricsServiceRequestPtrSlice() []*ExportMetricsServiceRequest { + orig := make([]*ExportMetricsServiceRequest, 5) + orig[0] = NewExportMetricsServiceRequest() + orig[1] = GenTestExportMetricsServiceRequest() + orig[2] = NewExportMetricsServiceRequest() + orig[3] = GenTestExportMetricsServiceRequest() + orig[4] = NewExportMetricsServiceRequest() + return orig +} + +func GenTestExportMetricsServiceRequestSlice() []ExportMetricsServiceRequest { + orig := make([]ExportMetricsServiceRequest, 5) + orig[1] = *GenTestExportMetricsServiceRequest() + orig[3] = *GenTestExportMetricsServiceRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricsserviceresponse.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricsserviceresponse.go new file mode 100644 index 00000000000..ae78a10f9b8 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportmetricsserviceresponse.go @@ -0,0 +1,227 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportResponse represents the response for gRPC/HTTP client/server. +type ExportMetricsServiceResponse struct { + PartialSuccess ExportMetricsPartialSuccess +} + +var ( + protoPoolExportMetricsServiceResponse = sync.Pool{ + New: func() any { + return &ExportMetricsServiceResponse{} + }, + } +) + +func NewExportMetricsServiceResponse() *ExportMetricsServiceResponse { + if !UseProtoPooling.IsEnabled() { + return &ExportMetricsServiceResponse{} + } + return protoPoolExportMetricsServiceResponse.Get().(*ExportMetricsServiceResponse) +} + +func DeleteExportMetricsServiceResponse(orig *ExportMetricsServiceResponse, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteExportMetricsPartialSuccess(&orig.PartialSuccess, false) + orig.Reset() + if nullable { + protoPoolExportMetricsServiceResponse.Put(orig) + } +} + +func CopyExportMetricsServiceResponse(dest, src *ExportMetricsServiceResponse) *ExportMetricsServiceResponse { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportMetricsServiceResponse() + } + CopyExportMetricsPartialSuccess(&dest.PartialSuccess, &src.PartialSuccess) + + return dest +} + +func CopyExportMetricsServiceResponseSlice(dest, src []ExportMetricsServiceResponse) []ExportMetricsServiceResponse { + var newDest []ExportMetricsServiceResponse + if cap(dest) < len(src) { + newDest = make([]ExportMetricsServiceResponse, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportMetricsServiceResponse(&dest[i], false) + } + } + for i := range src { + CopyExportMetricsServiceResponse(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportMetricsServiceResponsePtrSlice(dest, src []*ExportMetricsServiceResponse) []*ExportMetricsServiceResponse { + var newDest []*ExportMetricsServiceResponse + if cap(dest) < len(src) { + newDest = make([]*ExportMetricsServiceResponse, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportMetricsServiceResponse() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportMetricsServiceResponse(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportMetricsServiceResponse() + } + } + for i := range src { + CopyExportMetricsServiceResponse(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportMetricsServiceResponse) Reset() { + *orig = ExportMetricsServiceResponse{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportMetricsServiceResponse) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("partialSuccess") + orig.PartialSuccess.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportMetricsServiceResponse) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "partialSuccess", "partial_success": + + orig.PartialSuccess.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *ExportMetricsServiceResponse) SizeProto() int { + var n int + var l int + _ = l + l = orig.PartialSuccess.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *ExportMetricsServiceResponse) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.PartialSuccess.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + return len(buf) - pos +} + +func (orig *ExportMetricsServiceResponse) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.PartialSuccess.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportMetricsServiceResponse() *ExportMetricsServiceResponse { + orig := NewExportMetricsServiceResponse() + orig.PartialSuccess = *GenTestExportMetricsPartialSuccess() + return orig +} + +func GenTestExportMetricsServiceResponsePtrSlice() []*ExportMetricsServiceResponse { + orig := make([]*ExportMetricsServiceResponse, 5) + orig[0] = NewExportMetricsServiceResponse() + orig[1] = GenTestExportMetricsServiceResponse() + orig[2] = NewExportMetricsServiceResponse() + orig[3] = GenTestExportMetricsServiceResponse() + orig[4] = NewExportMetricsServiceResponse() + return orig +} + +func GenTestExportMetricsServiceResponseSlice() []ExportMetricsServiceResponse { + orig := make([]ExportMetricsServiceResponse, 5) + orig[1] = *GenTestExportMetricsServiceResponse() + orig[3] = *GenTestExportMetricsServiceResponse() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilespartialsuccess.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilespartialsuccess.go new file mode 100644 index 00000000000..5a75e7a657e --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilespartialsuccess.go @@ -0,0 +1,257 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportPartialSuccess represents the details of a partially successful export request. +type ExportProfilesPartialSuccess struct { + ErrorMessage string + RejectedProfiles int64 +} + +var ( + protoPoolExportProfilesPartialSuccess = sync.Pool{ + New: func() any { + return &ExportProfilesPartialSuccess{} + }, + } +) + +func NewExportProfilesPartialSuccess() *ExportProfilesPartialSuccess { + if !UseProtoPooling.IsEnabled() { + return &ExportProfilesPartialSuccess{} + } + return protoPoolExportProfilesPartialSuccess.Get().(*ExportProfilesPartialSuccess) +} + +func DeleteExportProfilesPartialSuccess(orig *ExportProfilesPartialSuccess, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolExportProfilesPartialSuccess.Put(orig) + } +} + +func CopyExportProfilesPartialSuccess(dest, src *ExportProfilesPartialSuccess) *ExportProfilesPartialSuccess { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportProfilesPartialSuccess() + } + dest.RejectedProfiles = src.RejectedProfiles + dest.ErrorMessage = src.ErrorMessage + + return dest +} + +func CopyExportProfilesPartialSuccessSlice(dest, src []ExportProfilesPartialSuccess) []ExportProfilesPartialSuccess { + var newDest []ExportProfilesPartialSuccess + if cap(dest) < len(src) { + newDest = make([]ExportProfilesPartialSuccess, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportProfilesPartialSuccess(&dest[i], false) + } + } + for i := range src { + CopyExportProfilesPartialSuccess(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportProfilesPartialSuccessPtrSlice(dest, src []*ExportProfilesPartialSuccess) []*ExportProfilesPartialSuccess { + var newDest []*ExportProfilesPartialSuccess + if cap(dest) < len(src) { + newDest = make([]*ExportProfilesPartialSuccess, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportProfilesPartialSuccess() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportProfilesPartialSuccess(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportProfilesPartialSuccess() + } + } + for i := range src { + CopyExportProfilesPartialSuccess(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportProfilesPartialSuccess) Reset() { + *orig = ExportProfilesPartialSuccess{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportProfilesPartialSuccess) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RejectedProfiles != int64(0) { + dest.WriteObjectField("rejectedProfiles") + dest.WriteInt64(orig.RejectedProfiles) + } + if orig.ErrorMessage != "" { + dest.WriteObjectField("errorMessage") + dest.WriteString(orig.ErrorMessage) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportProfilesPartialSuccess) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "rejectedProfiles", "rejected_profiles": + orig.RejectedProfiles = iter.ReadInt64() + case "errorMessage", "error_message": + orig.ErrorMessage = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ExportProfilesPartialSuccess) SizeProto() int { + var n int + var l int + _ = l + if orig.RejectedProfiles != int64(0) { + n += 1 + proto.Sov(uint64(orig.RejectedProfiles)) + } + + l = len(orig.ErrorMessage) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportProfilesPartialSuccess) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RejectedProfiles != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.RejectedProfiles)) + pos-- + buf[pos] = 0x8 + } + l = len(orig.ErrorMessage) + if l > 0 { + pos -= l + copy(buf[pos:], orig.ErrorMessage) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *ExportProfilesPartialSuccess) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedProfiles", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.RejectedProfiles = int64(num) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ErrorMessage = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportProfilesPartialSuccess() *ExportProfilesPartialSuccess { + orig := NewExportProfilesPartialSuccess() + orig.RejectedProfiles = int64(13) + orig.ErrorMessage = "test_errormessage" + return orig +} + +func GenTestExportProfilesPartialSuccessPtrSlice() []*ExportProfilesPartialSuccess { + orig := make([]*ExportProfilesPartialSuccess, 5) + orig[0] = NewExportProfilesPartialSuccess() + orig[1] = GenTestExportProfilesPartialSuccess() + orig[2] = NewExportProfilesPartialSuccess() + orig[3] = GenTestExportProfilesPartialSuccess() + orig[4] = NewExportProfilesPartialSuccess() + return orig +} + +func GenTestExportProfilesPartialSuccessSlice() []ExportProfilesPartialSuccess { + orig := make([]ExportProfilesPartialSuccess, 5) + orig[1] = *GenTestExportProfilesPartialSuccess() + orig[3] = *GenTestExportProfilesPartialSuccess() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilesservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilesservicerequest.go new file mode 100644 index 00000000000..ba9ecbc4eed --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilesservicerequest.go @@ -0,0 +1,278 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Profiles is the top-level struct that is propagated through the profiles pipeline. +// Use NewProfiles to create new instance, zero-initialized instance is not valid for use. +type ExportProfilesServiceRequest struct { + ResourceProfiles []*ResourceProfiles + Dictionary ProfilesDictionary +} + +var ( + protoPoolExportProfilesServiceRequest = sync.Pool{ + New: func() any { + return &ExportProfilesServiceRequest{} + }, + } +) + +func NewExportProfilesServiceRequest() *ExportProfilesServiceRequest { + if !UseProtoPooling.IsEnabled() { + return &ExportProfilesServiceRequest{} + } + return protoPoolExportProfilesServiceRequest.Get().(*ExportProfilesServiceRequest) +} + +func DeleteExportProfilesServiceRequest(orig *ExportProfilesServiceRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceProfiles { + DeleteResourceProfiles(orig.ResourceProfiles[i], true) + } + DeleteProfilesDictionary(&orig.Dictionary, false) + orig.Reset() + if nullable { + protoPoolExportProfilesServiceRequest.Put(orig) + } +} + +func CopyExportProfilesServiceRequest(dest, src *ExportProfilesServiceRequest) *ExportProfilesServiceRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportProfilesServiceRequest() + } + dest.ResourceProfiles = CopyResourceProfilesPtrSlice(dest.ResourceProfiles, src.ResourceProfiles) + + CopyProfilesDictionary(&dest.Dictionary, &src.Dictionary) + + return dest +} + +func CopyExportProfilesServiceRequestSlice(dest, src []ExportProfilesServiceRequest) []ExportProfilesServiceRequest { + var newDest []ExportProfilesServiceRequest + if cap(dest) < len(src) { + newDest = make([]ExportProfilesServiceRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportProfilesServiceRequest(&dest[i], false) + } + } + for i := range src { + CopyExportProfilesServiceRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportProfilesServiceRequestPtrSlice(dest, src []*ExportProfilesServiceRequest) []*ExportProfilesServiceRequest { + var newDest []*ExportProfilesServiceRequest + if cap(dest) < len(src) { + newDest = make([]*ExportProfilesServiceRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportProfilesServiceRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportProfilesServiceRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportProfilesServiceRequest() + } + } + for i := range src { + CopyExportProfilesServiceRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportProfilesServiceRequest) Reset() { + *orig = ExportProfilesServiceRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportProfilesServiceRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceProfiles) > 0 { + dest.WriteObjectField("resourceProfiles") + dest.WriteArrayStart() + orig.ResourceProfiles[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceProfiles); i++ { + dest.WriteMore() + orig.ResourceProfiles[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectField("dictionary") + orig.Dictionary.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportProfilesServiceRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceProfiles", "resource_profiles": + for iter.ReadArray() { + orig.ResourceProfiles = append(orig.ResourceProfiles, NewResourceProfiles()) + orig.ResourceProfiles[len(orig.ResourceProfiles)-1].UnmarshalJSON(iter) + } + + case "dictionary": + + orig.Dictionary.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *ExportProfilesServiceRequest) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceProfiles { + l = orig.ResourceProfiles[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.Dictionary.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *ExportProfilesServiceRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceProfiles) - 1; i >= 0; i-- { + l = orig.ResourceProfiles[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = orig.Dictionary.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + return len(buf) - pos +} + +func (orig *ExportProfilesServiceRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceProfiles = append(orig.ResourceProfiles, NewResourceProfiles()) + err = orig.ResourceProfiles[len(orig.ResourceProfiles)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Dictionary", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Dictionary.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportProfilesServiceRequest() *ExportProfilesServiceRequest { + orig := NewExportProfilesServiceRequest() + orig.ResourceProfiles = []*ResourceProfiles{{}, GenTestResourceProfiles()} + orig.Dictionary = *GenTestProfilesDictionary() + return orig +} + +func GenTestExportProfilesServiceRequestPtrSlice() []*ExportProfilesServiceRequest { + orig := make([]*ExportProfilesServiceRequest, 5) + orig[0] = NewExportProfilesServiceRequest() + orig[1] = GenTestExportProfilesServiceRequest() + orig[2] = NewExportProfilesServiceRequest() + orig[3] = GenTestExportProfilesServiceRequest() + orig[4] = NewExportProfilesServiceRequest() + return orig +} + +func GenTestExportProfilesServiceRequestSlice() []ExportProfilesServiceRequest { + orig := make([]ExportProfilesServiceRequest, 5) + orig[1] = *GenTestExportProfilesServiceRequest() + orig[3] = *GenTestExportProfilesServiceRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilesserviceresponse.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilesserviceresponse.go new file mode 100644 index 00000000000..e8fea55ea3a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exportprofilesserviceresponse.go @@ -0,0 +1,227 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportResponse represents the response for gRPC/HTTP client/server. +type ExportProfilesServiceResponse struct { + PartialSuccess ExportProfilesPartialSuccess +} + +var ( + protoPoolExportProfilesServiceResponse = sync.Pool{ + New: func() any { + return &ExportProfilesServiceResponse{} + }, + } +) + +func NewExportProfilesServiceResponse() *ExportProfilesServiceResponse { + if !UseProtoPooling.IsEnabled() { + return &ExportProfilesServiceResponse{} + } + return protoPoolExportProfilesServiceResponse.Get().(*ExportProfilesServiceResponse) +} + +func DeleteExportProfilesServiceResponse(orig *ExportProfilesServiceResponse, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteExportProfilesPartialSuccess(&orig.PartialSuccess, false) + orig.Reset() + if nullable { + protoPoolExportProfilesServiceResponse.Put(orig) + } +} + +func CopyExportProfilesServiceResponse(dest, src *ExportProfilesServiceResponse) *ExportProfilesServiceResponse { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportProfilesServiceResponse() + } + CopyExportProfilesPartialSuccess(&dest.PartialSuccess, &src.PartialSuccess) + + return dest +} + +func CopyExportProfilesServiceResponseSlice(dest, src []ExportProfilesServiceResponse) []ExportProfilesServiceResponse { + var newDest []ExportProfilesServiceResponse + if cap(dest) < len(src) { + newDest = make([]ExportProfilesServiceResponse, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportProfilesServiceResponse(&dest[i], false) + } + } + for i := range src { + CopyExportProfilesServiceResponse(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportProfilesServiceResponsePtrSlice(dest, src []*ExportProfilesServiceResponse) []*ExportProfilesServiceResponse { + var newDest []*ExportProfilesServiceResponse + if cap(dest) < len(src) { + newDest = make([]*ExportProfilesServiceResponse, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportProfilesServiceResponse() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportProfilesServiceResponse(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportProfilesServiceResponse() + } + } + for i := range src { + CopyExportProfilesServiceResponse(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportProfilesServiceResponse) Reset() { + *orig = ExportProfilesServiceResponse{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportProfilesServiceResponse) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("partialSuccess") + orig.PartialSuccess.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportProfilesServiceResponse) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "partialSuccess", "partial_success": + + orig.PartialSuccess.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *ExportProfilesServiceResponse) SizeProto() int { + var n int + var l int + _ = l + l = orig.PartialSuccess.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *ExportProfilesServiceResponse) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.PartialSuccess.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + return len(buf) - pos +} + +func (orig *ExportProfilesServiceResponse) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.PartialSuccess.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportProfilesServiceResponse() *ExportProfilesServiceResponse { + orig := NewExportProfilesServiceResponse() + orig.PartialSuccess = *GenTestExportProfilesPartialSuccess() + return orig +} + +func GenTestExportProfilesServiceResponsePtrSlice() []*ExportProfilesServiceResponse { + orig := make([]*ExportProfilesServiceResponse, 5) + orig[0] = NewExportProfilesServiceResponse() + orig[1] = GenTestExportProfilesServiceResponse() + orig[2] = NewExportProfilesServiceResponse() + orig[3] = GenTestExportProfilesServiceResponse() + orig[4] = NewExportProfilesServiceResponse() + return orig +} + +func GenTestExportProfilesServiceResponseSlice() []ExportProfilesServiceResponse { + orig := make([]ExportProfilesServiceResponse, 5) + orig[1] = *GenTestExportProfilesServiceResponse() + orig[3] = *GenTestExportProfilesServiceResponse() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttracepartialsuccess.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttracepartialsuccess.go new file mode 100644 index 00000000000..6df4657fa29 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttracepartialsuccess.go @@ -0,0 +1,257 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportPartialSuccess represents the details of a partially successful export request. +type ExportTracePartialSuccess struct { + ErrorMessage string + RejectedSpans int64 +} + +var ( + protoPoolExportTracePartialSuccess = sync.Pool{ + New: func() any { + return &ExportTracePartialSuccess{} + }, + } +) + +func NewExportTracePartialSuccess() *ExportTracePartialSuccess { + if !UseProtoPooling.IsEnabled() { + return &ExportTracePartialSuccess{} + } + return protoPoolExportTracePartialSuccess.Get().(*ExportTracePartialSuccess) +} + +func DeleteExportTracePartialSuccess(orig *ExportTracePartialSuccess, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolExportTracePartialSuccess.Put(orig) + } +} + +func CopyExportTracePartialSuccess(dest, src *ExportTracePartialSuccess) *ExportTracePartialSuccess { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportTracePartialSuccess() + } + dest.RejectedSpans = src.RejectedSpans + dest.ErrorMessage = src.ErrorMessage + + return dest +} + +func CopyExportTracePartialSuccessSlice(dest, src []ExportTracePartialSuccess) []ExportTracePartialSuccess { + var newDest []ExportTracePartialSuccess + if cap(dest) < len(src) { + newDest = make([]ExportTracePartialSuccess, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportTracePartialSuccess(&dest[i], false) + } + } + for i := range src { + CopyExportTracePartialSuccess(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportTracePartialSuccessPtrSlice(dest, src []*ExportTracePartialSuccess) []*ExportTracePartialSuccess { + var newDest []*ExportTracePartialSuccess + if cap(dest) < len(src) { + newDest = make([]*ExportTracePartialSuccess, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportTracePartialSuccess() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportTracePartialSuccess(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportTracePartialSuccess() + } + } + for i := range src { + CopyExportTracePartialSuccess(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportTracePartialSuccess) Reset() { + *orig = ExportTracePartialSuccess{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportTracePartialSuccess) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RejectedSpans != int64(0) { + dest.WriteObjectField("rejectedSpans") + dest.WriteInt64(orig.RejectedSpans) + } + if orig.ErrorMessage != "" { + dest.WriteObjectField("errorMessage") + dest.WriteString(orig.ErrorMessage) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportTracePartialSuccess) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "rejectedSpans", "rejected_spans": + orig.RejectedSpans = iter.ReadInt64() + case "errorMessage", "error_message": + orig.ErrorMessage = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ExportTracePartialSuccess) SizeProto() int { + var n int + var l int + _ = l + if orig.RejectedSpans != int64(0) { + n += 1 + proto.Sov(uint64(orig.RejectedSpans)) + } + + l = len(orig.ErrorMessage) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportTracePartialSuccess) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RejectedSpans != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.RejectedSpans)) + pos-- + buf[pos] = 0x8 + } + l = len(orig.ErrorMessage) + if l > 0 { + pos -= l + copy(buf[pos:], orig.ErrorMessage) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *ExportTracePartialSuccess) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedSpans", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.RejectedSpans = int64(num) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ErrorMessage = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportTracePartialSuccess() *ExportTracePartialSuccess { + orig := NewExportTracePartialSuccess() + orig.RejectedSpans = int64(13) + orig.ErrorMessage = "test_errormessage" + return orig +} + +func GenTestExportTracePartialSuccessPtrSlice() []*ExportTracePartialSuccess { + orig := make([]*ExportTracePartialSuccess, 5) + orig[0] = NewExportTracePartialSuccess() + orig[1] = GenTestExportTracePartialSuccess() + orig[2] = NewExportTracePartialSuccess() + orig[3] = GenTestExportTracePartialSuccess() + orig[4] = NewExportTracePartialSuccess() + return orig +} + +func GenTestExportTracePartialSuccessSlice() []ExportTracePartialSuccess { + orig := make([]ExportTracePartialSuccess, 5) + orig[1] = *GenTestExportTracePartialSuccess() + orig[3] = *GenTestExportTracePartialSuccess() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttraceservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttraceservicerequest.go new file mode 100644 index 00000000000..2a4ff9ef34f --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttraceservicerequest.go @@ -0,0 +1,244 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Traces is the top-level struct that is propagated through the traces pipeline. +// Use NewTraces to create new instance, zero-initialized instance is not valid for use. +type ExportTraceServiceRequest struct { + ResourceSpans []*ResourceSpans +} + +var ( + protoPoolExportTraceServiceRequest = sync.Pool{ + New: func() any { + return &ExportTraceServiceRequest{} + }, + } +) + +func NewExportTraceServiceRequest() *ExportTraceServiceRequest { + if !UseProtoPooling.IsEnabled() { + return &ExportTraceServiceRequest{} + } + return protoPoolExportTraceServiceRequest.Get().(*ExportTraceServiceRequest) +} + +func DeleteExportTraceServiceRequest(orig *ExportTraceServiceRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceSpans { + DeleteResourceSpans(orig.ResourceSpans[i], true) + } + orig.Reset() + if nullable { + protoPoolExportTraceServiceRequest.Put(orig) + } +} + +func CopyExportTraceServiceRequest(dest, src *ExportTraceServiceRequest) *ExportTraceServiceRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportTraceServiceRequest() + } + dest.ResourceSpans = CopyResourceSpansPtrSlice(dest.ResourceSpans, src.ResourceSpans) + + return dest +} + +func CopyExportTraceServiceRequestSlice(dest, src []ExportTraceServiceRequest) []ExportTraceServiceRequest { + var newDest []ExportTraceServiceRequest + if cap(dest) < len(src) { + newDest = make([]ExportTraceServiceRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportTraceServiceRequest(&dest[i], false) + } + } + for i := range src { + CopyExportTraceServiceRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportTraceServiceRequestPtrSlice(dest, src []*ExportTraceServiceRequest) []*ExportTraceServiceRequest { + var newDest []*ExportTraceServiceRequest + if cap(dest) < len(src) { + newDest = make([]*ExportTraceServiceRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportTraceServiceRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportTraceServiceRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportTraceServiceRequest() + } + } + for i := range src { + CopyExportTraceServiceRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportTraceServiceRequest) Reset() { + *orig = ExportTraceServiceRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportTraceServiceRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceSpans) > 0 { + dest.WriteObjectField("resourceSpans") + dest.WriteArrayStart() + orig.ResourceSpans[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceSpans); i++ { + dest.WriteMore() + orig.ResourceSpans[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportTraceServiceRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceSpans", "resource_spans": + for iter.ReadArray() { + orig.ResourceSpans = append(orig.ResourceSpans, NewResourceSpans()) + orig.ResourceSpans[len(orig.ResourceSpans)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ExportTraceServiceRequest) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceSpans { + l = orig.ResourceSpans[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ExportTraceServiceRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceSpans) - 1; i >= 0; i-- { + l = orig.ResourceSpans[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *ExportTraceServiceRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceSpans = append(orig.ResourceSpans, NewResourceSpans()) + err = orig.ResourceSpans[len(orig.ResourceSpans)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportTraceServiceRequest() *ExportTraceServiceRequest { + orig := NewExportTraceServiceRequest() + orig.ResourceSpans = []*ResourceSpans{{}, GenTestResourceSpans()} + return orig +} + +func GenTestExportTraceServiceRequestPtrSlice() []*ExportTraceServiceRequest { + orig := make([]*ExportTraceServiceRequest, 5) + orig[0] = NewExportTraceServiceRequest() + orig[1] = GenTestExportTraceServiceRequest() + orig[2] = NewExportTraceServiceRequest() + orig[3] = GenTestExportTraceServiceRequest() + orig[4] = NewExportTraceServiceRequest() + return orig +} + +func GenTestExportTraceServiceRequestSlice() []ExportTraceServiceRequest { + orig := make([]ExportTraceServiceRequest, 5) + orig[1] = *GenTestExportTraceServiceRequest() + orig[3] = *GenTestExportTraceServiceRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttraceserviceresponse.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttraceserviceresponse.go new file mode 100644 index 00000000000..f3d35d4b9be --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_exporttraceserviceresponse.go @@ -0,0 +1,227 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ExportResponse represents the response for gRPC/HTTP client/server. +type ExportTraceServiceResponse struct { + PartialSuccess ExportTracePartialSuccess +} + +var ( + protoPoolExportTraceServiceResponse = sync.Pool{ + New: func() any { + return &ExportTraceServiceResponse{} + }, + } +) + +func NewExportTraceServiceResponse() *ExportTraceServiceResponse { + if !UseProtoPooling.IsEnabled() { + return &ExportTraceServiceResponse{} + } + return protoPoolExportTraceServiceResponse.Get().(*ExportTraceServiceResponse) +} + +func DeleteExportTraceServiceResponse(orig *ExportTraceServiceResponse, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteExportTracePartialSuccess(&orig.PartialSuccess, false) + orig.Reset() + if nullable { + protoPoolExportTraceServiceResponse.Put(orig) + } +} + +func CopyExportTraceServiceResponse(dest, src *ExportTraceServiceResponse) *ExportTraceServiceResponse { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewExportTraceServiceResponse() + } + CopyExportTracePartialSuccess(&dest.PartialSuccess, &src.PartialSuccess) + + return dest +} + +func CopyExportTraceServiceResponseSlice(dest, src []ExportTraceServiceResponse) []ExportTraceServiceResponse { + var newDest []ExportTraceServiceResponse + if cap(dest) < len(src) { + newDest = make([]ExportTraceServiceResponse, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportTraceServiceResponse(&dest[i], false) + } + } + for i := range src { + CopyExportTraceServiceResponse(&newDest[i], &src[i]) + } + return newDest +} + +func CopyExportTraceServiceResponsePtrSlice(dest, src []*ExportTraceServiceResponse) []*ExportTraceServiceResponse { + var newDest []*ExportTraceServiceResponse + if cap(dest) < len(src) { + newDest = make([]*ExportTraceServiceResponse, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportTraceServiceResponse() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteExportTraceServiceResponse(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewExportTraceServiceResponse() + } + } + for i := range src { + CopyExportTraceServiceResponse(newDest[i], src[i]) + } + return newDest +} + +func (orig *ExportTraceServiceResponse) Reset() { + *orig = ExportTraceServiceResponse{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ExportTraceServiceResponse) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("partialSuccess") + orig.PartialSuccess.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ExportTraceServiceResponse) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "partialSuccess", "partial_success": + + orig.PartialSuccess.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *ExportTraceServiceResponse) SizeProto() int { + var n int + var l int + _ = l + l = orig.PartialSuccess.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *ExportTraceServiceResponse) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.PartialSuccess.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + return len(buf) - pos +} + +func (orig *ExportTraceServiceResponse) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.PartialSuccess.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestExportTraceServiceResponse() *ExportTraceServiceResponse { + orig := NewExportTraceServiceResponse() + orig.PartialSuccess = *GenTestExportTracePartialSuccess() + return orig +} + +func GenTestExportTraceServiceResponsePtrSlice() []*ExportTraceServiceResponse { + orig := make([]*ExportTraceServiceResponse, 5) + orig[0] = NewExportTraceServiceResponse() + orig[1] = GenTestExportTraceServiceResponse() + orig[2] = NewExportTraceServiceResponse() + orig[3] = GenTestExportTraceServiceResponse() + orig[4] = NewExportTraceServiceResponse() + return orig +} + +func GenTestExportTraceServiceResponseSlice() []ExportTraceServiceResponse { + orig := make([]ExportTraceServiceResponse, 5) + orig[1] = *GenTestExportTraceServiceResponse() + orig[3] = *GenTestExportTraceServiceResponse() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_function.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_function.go new file mode 100644 index 00000000000..06bc218b170 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_function.go @@ -0,0 +1,307 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Function describes a function, including its human-readable name, system name, source file, and starting line number in the source. +type Function struct { + NameStrindex int32 + SystemNameStrindex int32 + FilenameStrindex int32 + StartLine int64 +} + +var ( + protoPoolFunction = sync.Pool{ + New: func() any { + return &Function{} + }, + } +) + +func NewFunction() *Function { + if !UseProtoPooling.IsEnabled() { + return &Function{} + } + return protoPoolFunction.Get().(*Function) +} + +func DeleteFunction(orig *Function, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolFunction.Put(orig) + } +} + +func CopyFunction(dest, src *Function) *Function { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewFunction() + } + dest.NameStrindex = src.NameStrindex + dest.SystemNameStrindex = src.SystemNameStrindex + dest.FilenameStrindex = src.FilenameStrindex + dest.StartLine = src.StartLine + + return dest +} + +func CopyFunctionSlice(dest, src []Function) []Function { + var newDest []Function + if cap(dest) < len(src) { + newDest = make([]Function, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteFunction(&dest[i], false) + } + } + for i := range src { + CopyFunction(&newDest[i], &src[i]) + } + return newDest +} + +func CopyFunctionPtrSlice(dest, src []*Function) []*Function { + var newDest []*Function + if cap(dest) < len(src) { + newDest = make([]*Function, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewFunction() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteFunction(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewFunction() + } + } + for i := range src { + CopyFunction(newDest[i], src[i]) + } + return newDest +} + +func (orig *Function) Reset() { + *orig = Function{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Function) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.NameStrindex != int32(0) { + dest.WriteObjectField("nameStrindex") + dest.WriteInt32(orig.NameStrindex) + } + if orig.SystemNameStrindex != int32(0) { + dest.WriteObjectField("systemNameStrindex") + dest.WriteInt32(orig.SystemNameStrindex) + } + if orig.FilenameStrindex != int32(0) { + dest.WriteObjectField("filenameStrindex") + dest.WriteInt32(orig.FilenameStrindex) + } + if orig.StartLine != int64(0) { + dest.WriteObjectField("startLine") + dest.WriteInt64(orig.StartLine) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Function) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "nameStrindex", "name_strindex": + orig.NameStrindex = iter.ReadInt32() + case "systemNameStrindex", "system_name_strindex": + orig.SystemNameStrindex = iter.ReadInt32() + case "filenameStrindex", "filename_strindex": + orig.FilenameStrindex = iter.ReadInt32() + case "startLine", "start_line": + orig.StartLine = iter.ReadInt64() + default: + iter.Skip() + } + } +} + +func (orig *Function) SizeProto() int { + var n int + var l int + _ = l + if orig.NameStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.NameStrindex)) + } + if orig.SystemNameStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.SystemNameStrindex)) + } + if orig.FilenameStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.FilenameStrindex)) + } + if orig.StartLine != int64(0) { + n += 1 + proto.Sov(uint64(orig.StartLine)) + } + return n +} + +func (orig *Function) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.NameStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.NameStrindex)) + pos-- + buf[pos] = 0x8 + } + if orig.SystemNameStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.SystemNameStrindex)) + pos-- + buf[pos] = 0x10 + } + if orig.FilenameStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.FilenameStrindex)) + pos-- + buf[pos] = 0x18 + } + if orig.StartLine != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.StartLine)) + pos-- + buf[pos] = 0x20 + } + return len(buf) - pos +} + +func (orig *Function) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field NameStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.NameStrindex = int32(num) + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field SystemNameStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.SystemNameStrindex = int32(num) + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.FilenameStrindex = int32(num) + + case 4: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.StartLine = int64(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestFunction() *Function { + orig := NewFunction() + orig.NameStrindex = int32(13) + orig.SystemNameStrindex = int32(13) + orig.FilenameStrindex = int32(13) + orig.StartLine = int64(13) + return orig +} + +func GenTestFunctionPtrSlice() []*Function { + orig := make([]*Function, 5) + orig[0] = NewFunction() + orig[1] = GenTestFunction() + orig[2] = NewFunction() + orig[3] = GenTestFunction() + orig[4] = NewFunction() + return orig +} + +func GenTestFunctionSlice() []Function { + orig := make([]Function, 5) + orig[1] = *GenTestFunction() + orig[3] = *GenTestFunction() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_gauge.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_gauge.go new file mode 100644 index 00000000000..996d6624253 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_gauge.go @@ -0,0 +1,243 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Gauge represents the type of a numeric metric that always exports the "current value" for every data point. +type Gauge struct { + DataPoints []*NumberDataPoint +} + +var ( + protoPoolGauge = sync.Pool{ + New: func() any { + return &Gauge{} + }, + } +) + +func NewGauge() *Gauge { + if !UseProtoPooling.IsEnabled() { + return &Gauge{} + } + return protoPoolGauge.Get().(*Gauge) +} + +func DeleteGauge(orig *Gauge, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.DataPoints { + DeleteNumberDataPoint(orig.DataPoints[i], true) + } + orig.Reset() + if nullable { + protoPoolGauge.Put(orig) + } +} + +func CopyGauge(dest, src *Gauge) *Gauge { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewGauge() + } + dest.DataPoints = CopyNumberDataPointPtrSlice(dest.DataPoints, src.DataPoints) + + return dest +} + +func CopyGaugeSlice(dest, src []Gauge) []Gauge { + var newDest []Gauge + if cap(dest) < len(src) { + newDest = make([]Gauge, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteGauge(&dest[i], false) + } + } + for i := range src { + CopyGauge(&newDest[i], &src[i]) + } + return newDest +} + +func CopyGaugePtrSlice(dest, src []*Gauge) []*Gauge { + var newDest []*Gauge + if cap(dest) < len(src) { + newDest = make([]*Gauge, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewGauge() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteGauge(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewGauge() + } + } + for i := range src { + CopyGauge(newDest[i], src[i]) + } + return newDest +} + +func (orig *Gauge) Reset() { + *orig = Gauge{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Gauge) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.DataPoints) > 0 { + dest.WriteObjectField("dataPoints") + dest.WriteArrayStart() + orig.DataPoints[0].MarshalJSON(dest) + for i := 1; i < len(orig.DataPoints); i++ { + dest.WriteMore() + orig.DataPoints[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Gauge) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "dataPoints", "data_points": + for iter.ReadArray() { + orig.DataPoints = append(orig.DataPoints, NewNumberDataPoint()) + orig.DataPoints[len(orig.DataPoints)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *Gauge) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.DataPoints { + l = orig.DataPoints[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Gauge) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.DataPoints) - 1; i >= 0; i-- { + l = orig.DataPoints[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *Gauge) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DataPoints = append(orig.DataPoints, NewNumberDataPoint()) + err = orig.DataPoints[len(orig.DataPoints)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestGauge() *Gauge { + orig := NewGauge() + orig.DataPoints = []*NumberDataPoint{{}, GenTestNumberDataPoint()} + return orig +} + +func GenTestGaugePtrSlice() []*Gauge { + orig := make([]*Gauge, 5) + orig[0] = NewGauge() + orig[1] = GenTestGauge() + orig[2] = NewGauge() + orig[3] = GenTestGauge() + orig[4] = NewGauge() + return orig +} + +func GenTestGaugeSlice() []Gauge { + orig := make([]Gauge, 5) + orig[1] = *GenTestGauge() + orig[3] = *GenTestGauge() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_histogram.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_histogram.go new file mode 100644 index 00000000000..09fab65bb80 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_histogram.go @@ -0,0 +1,274 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval. +type Histogram struct { + DataPoints []*HistogramDataPoint + AggregationTemporality AggregationTemporality +} + +var ( + protoPoolHistogram = sync.Pool{ + New: func() any { + return &Histogram{} + }, + } +) + +func NewHistogram() *Histogram { + if !UseProtoPooling.IsEnabled() { + return &Histogram{} + } + return protoPoolHistogram.Get().(*Histogram) +} + +func DeleteHistogram(orig *Histogram, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.DataPoints { + DeleteHistogramDataPoint(orig.DataPoints[i], true) + } + + orig.Reset() + if nullable { + protoPoolHistogram.Put(orig) + } +} + +func CopyHistogram(dest, src *Histogram) *Histogram { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewHistogram() + } + dest.DataPoints = CopyHistogramDataPointPtrSlice(dest.DataPoints, src.DataPoints) + + dest.AggregationTemporality = src.AggregationTemporality + + return dest +} + +func CopyHistogramSlice(dest, src []Histogram) []Histogram { + var newDest []Histogram + if cap(dest) < len(src) { + newDest = make([]Histogram, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteHistogram(&dest[i], false) + } + } + for i := range src { + CopyHistogram(&newDest[i], &src[i]) + } + return newDest +} + +func CopyHistogramPtrSlice(dest, src []*Histogram) []*Histogram { + var newDest []*Histogram + if cap(dest) < len(src) { + newDest = make([]*Histogram, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewHistogram() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteHistogram(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewHistogram() + } + } + for i := range src { + CopyHistogram(newDest[i], src[i]) + } + return newDest +} + +func (orig *Histogram) Reset() { + *orig = Histogram{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Histogram) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.DataPoints) > 0 { + dest.WriteObjectField("dataPoints") + dest.WriteArrayStart() + orig.DataPoints[0].MarshalJSON(dest) + for i := 1; i < len(orig.DataPoints); i++ { + dest.WriteMore() + orig.DataPoints[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + + if int32(orig.AggregationTemporality) != 0 { + dest.WriteObjectField("aggregationTemporality") + dest.WriteInt32(int32(orig.AggregationTemporality)) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Histogram) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "dataPoints", "data_points": + for iter.ReadArray() { + orig.DataPoints = append(orig.DataPoints, NewHistogramDataPoint()) + orig.DataPoints[len(orig.DataPoints)-1].UnmarshalJSON(iter) + } + + case "aggregationTemporality", "aggregation_temporality": + orig.AggregationTemporality = AggregationTemporality(iter.ReadEnumValue(AggregationTemporality_value)) + default: + iter.Skip() + } + } +} + +func (orig *Histogram) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.DataPoints { + l = orig.DataPoints[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.AggregationTemporality != AggregationTemporality(0) { + n += 1 + proto.Sov(uint64(orig.AggregationTemporality)) + } + return n +} + +func (orig *Histogram) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.DataPoints) - 1; i >= 0; i-- { + l = orig.DataPoints[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.AggregationTemporality != AggregationTemporality(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AggregationTemporality)) + pos-- + buf[pos] = 0x10 + } + return len(buf) - pos +} + +func (orig *Histogram) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DataPoints = append(orig.DataPoints, NewHistogramDataPoint()) + err = orig.DataPoints[len(orig.DataPoints)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AggregationTemporality = AggregationTemporality(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestHistogram() *Histogram { + orig := NewHistogram() + orig.DataPoints = []*HistogramDataPoint{{}, GenTestHistogramDataPoint()} + orig.AggregationTemporality = AggregationTemporality(13) + return orig +} + +func GenTestHistogramPtrSlice() []*Histogram { + orig := make([]*Histogram, 5) + orig[0] = NewHistogram() + orig[1] = GenTestHistogram() + orig[2] = NewHistogram() + orig[3] = GenTestHistogram() + orig[4] = NewHistogram() + return orig +} + +func GenTestHistogramSlice() []Histogram { + orig := make([]Histogram, 5) + orig[1] = *GenTestHistogram() + orig[3] = *GenTestHistogram() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_histogramdatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_histogramdatapoint.go new file mode 100644 index 00000000000..b43e3cbb8fb --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_histogramdatapoint.go @@ -0,0 +1,706 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram of values. +type HistogramDataPoint struct { + Attributes []KeyValue + BucketCounts []uint64 + ExplicitBounds []float64 + Exemplars []Exemplar + StartTimeUnixNano uint64 + TimeUnixNano uint64 + Count uint64 + Sum float64 + Min float64 + Max float64 + metadata [1]uint64 + Flags uint32 +} + +var ( + protoPoolHistogramDataPoint = sync.Pool{ + New: func() any { + return &HistogramDataPoint{} + }, + } +) + +func NewHistogramDataPoint() *HistogramDataPoint { + if !UseProtoPooling.IsEnabled() { + return &HistogramDataPoint{} + } + return protoPoolHistogramDataPoint.Get().(*HistogramDataPoint) +} + +func DeleteHistogramDataPoint(orig *HistogramDataPoint, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + for i := range orig.Exemplars { + DeleteExemplar(&orig.Exemplars[i], false) + } + + orig.Reset() + if nullable { + protoPoolHistogramDataPoint.Put(orig) + } +} + +func CopyHistogramDataPoint(dest, src *HistogramDataPoint) *HistogramDataPoint { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewHistogramDataPoint() + } + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.StartTimeUnixNano = src.StartTimeUnixNano + dest.TimeUnixNano = src.TimeUnixNano + dest.Count = src.Count + if src.HasSum() { + dest.SetSum(src.Sum) + } else { + dest.RemoveSum() + } + + dest.BucketCounts = append(dest.BucketCounts[:0], src.BucketCounts...) + + dest.ExplicitBounds = append(dest.ExplicitBounds[:0], src.ExplicitBounds...) + + dest.Exemplars = CopyExemplarSlice(dest.Exemplars, src.Exemplars) + + dest.Flags = src.Flags + if src.HasMin() { + dest.SetMin(src.Min) + } else { + dest.RemoveMin() + } + + if src.HasMax() { + dest.SetMax(src.Max) + } else { + dest.RemoveMax() + } + + return dest +} + +func CopyHistogramDataPointSlice(dest, src []HistogramDataPoint) []HistogramDataPoint { + var newDest []HistogramDataPoint + if cap(dest) < len(src) { + newDest = make([]HistogramDataPoint, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteHistogramDataPoint(&dest[i], false) + } + } + for i := range src { + CopyHistogramDataPoint(&newDest[i], &src[i]) + } + return newDest +} + +func CopyHistogramDataPointPtrSlice(dest, src []*HistogramDataPoint) []*HistogramDataPoint { + var newDest []*HistogramDataPoint + if cap(dest) < len(src) { + newDest = make([]*HistogramDataPoint, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewHistogramDataPoint() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteHistogramDataPoint(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewHistogramDataPoint() + } + } + for i := range src { + CopyHistogramDataPoint(newDest[i], src[i]) + } + return newDest +} + +func (orig *HistogramDataPoint) Reset() { + *orig = HistogramDataPoint{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *HistogramDataPoint) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.StartTimeUnixNano != uint64(0) { + dest.WriteObjectField("startTimeUnixNano") + dest.WriteUint64(orig.StartTimeUnixNano) + } + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + if orig.Count != uint64(0) { + dest.WriteObjectField("count") + dest.WriteUint64(orig.Count) + } + if orig.HasSum() { + dest.WriteObjectField("sum") + dest.WriteFloat64(orig.Sum) + } + if len(orig.BucketCounts) > 0 { + dest.WriteObjectField("bucketCounts") + dest.WriteArrayStart() + dest.WriteUint64(orig.BucketCounts[0]) + for i := 1; i < len(orig.BucketCounts); i++ { + dest.WriteMore() + dest.WriteUint64(orig.BucketCounts[i]) + } + dest.WriteArrayEnd() + } + + if len(orig.ExplicitBounds) > 0 { + dest.WriteObjectField("explicitBounds") + dest.WriteArrayStart() + dest.WriteFloat64(orig.ExplicitBounds[0]) + for i := 1; i < len(orig.ExplicitBounds); i++ { + dest.WriteMore() + dest.WriteFloat64(orig.ExplicitBounds[i]) + } + dest.WriteArrayEnd() + } + + if len(orig.Exemplars) > 0 { + dest.WriteObjectField("exemplars") + dest.WriteArrayStart() + orig.Exemplars[0].MarshalJSON(dest) + for i := 1; i < len(orig.Exemplars); i++ { + dest.WriteMore() + orig.Exemplars[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + if orig.HasMin() { + dest.WriteObjectField("min") + dest.WriteFloat64(orig.Min) + } + if orig.HasMax() { + dest.WriteObjectField("max") + dest.WriteFloat64(orig.Max) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *HistogramDataPoint) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "startTimeUnixNano", "start_time_unix_nano": + orig.StartTimeUnixNano = iter.ReadUint64() + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + case "count": + orig.Count = iter.ReadUint64() + case "sum": + orig.SetSum(iter.ReadFloat64()) + + case "bucketCounts", "bucket_counts": + for iter.ReadArray() { + orig.BucketCounts = append(orig.BucketCounts, iter.ReadUint64()) + } + + case "explicitBounds", "explicit_bounds": + for iter.ReadArray() { + orig.ExplicitBounds = append(orig.ExplicitBounds, iter.ReadFloat64()) + } + + case "exemplars": + for iter.ReadArray() { + orig.Exemplars = append(orig.Exemplars, Exemplar{}) + orig.Exemplars[len(orig.Exemplars)-1].UnmarshalJSON(iter) + } + + case "flags": + orig.Flags = iter.ReadUint32() + case "min": + orig.SetMin(iter.ReadFloat64()) + + case "max": + orig.SetMax(iter.ReadFloat64()) + + default: + iter.Skip() + } + } +} + +func (orig *HistogramDataPoint) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.StartTimeUnixNano != uint64(0) { + n += 9 + } + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + if orig.Count != uint64(0) { + n += 9 + } + if orig.HasSum() { + n += 9 + } + l = len(orig.BucketCounts) + if l > 0 { + l *= 8 + n += 1 + proto.Sov(uint64(l)) + l + } + l = len(orig.ExplicitBounds) + if l > 0 { + l *= 8 + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.Exemplars { + l = orig.Exemplars[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Flags != uint32(0) { + n += 1 + proto.Sov(uint64(orig.Flags)) + } + if orig.HasMin() { + n += 9 + } + if orig.HasMax() { + n += 9 + } + return n +} + +func (orig *HistogramDataPoint) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x4a + } + if orig.StartTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.StartTimeUnixNano)) + pos-- + buf[pos] = 0x11 + } + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x19 + } + if orig.Count != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.Count)) + pos-- + buf[pos] = 0x21 + } + if orig.HasSum() { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Sum)) + pos-- + buf[pos] = 0x29 + } + l = len(orig.BucketCounts) + if l > 0 { + for i := l - 1; i >= 0; i-- { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.BucketCounts[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(l*8)) + pos-- + buf[pos] = 0x32 + } + l = len(orig.ExplicitBounds) + if l > 0 { + for i := l - 1; i >= 0; i-- { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.ExplicitBounds[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(l*8)) + pos-- + buf[pos] = 0x3a + } + for i := len(orig.Exemplars) - 1; i >= 0; i-- { + l = orig.Exemplars[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x42 + } + if orig.Flags != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Flags)) + pos-- + buf[pos] = 0x50 + } + if orig.HasMin() { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Min)) + pos-- + buf[pos] = 0x59 + } + if orig.HasMax() { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Max)) + pos-- + buf[pos] = 0x61 + } + return len(buf) - pos +} + +func (orig *HistogramDataPoint) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 9: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.StartTimeUnixNano = uint64(num) + + case 3: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 4: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.Count = uint64(num) + + case 5: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.SetSum(math.Float64frombits(num)) + case 6: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + size := length / 8 + orig.BucketCounts = make([]uint64, size) + var num uint64 + for i := 0; i < size; i++ { + num, startPos, err = proto.ConsumeI64(buf[:pos], startPos) + if err != nil { + return err + } + orig.BucketCounts[i] = uint64(num) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field BucketCounts", pos-startPos) + } + case proto.WireTypeI64: + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.BucketCounts = append(orig.BucketCounts, uint64(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) + } + case 7: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + size := length / 8 + orig.ExplicitBounds = make([]float64, size) + var num uint64 + for i := 0; i < size; i++ { + num, startPos, err = proto.ConsumeI64(buf[:pos], startPos) + if err != nil { + return err + } + orig.ExplicitBounds[i] = math.Float64frombits(num) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field ExplicitBounds", pos-startPos) + } + case proto.WireTypeI64: + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.ExplicitBounds = append(orig.ExplicitBounds, math.Float64frombits(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field ExplicitBounds", wireType) + } + + case 8: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Exemplars = append(orig.Exemplars, Exemplar{}) + err = orig.Exemplars[len(orig.Exemplars)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 10: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Flags = uint32(num) + + case 11: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.SetMin(math.Float64frombits(num)) + + case 12: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.SetMax(math.Float64frombits(num)) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +const fieldBlockHistogramDataPointSum = uint64(0 >> 6) +const fieldBitHistogramDataPointSum = uint64(1 << 0 & 0x3F) + +func (m *HistogramDataPoint) SetSum(value float64) { + m.Sum = value + m.metadata[fieldBlockHistogramDataPointSum] |= fieldBitHistogramDataPointSum +} + +func (m *HistogramDataPoint) RemoveSum() { + m.Sum = float64(0) + m.metadata[fieldBlockHistogramDataPointSum] &^= fieldBitHistogramDataPointSum +} + +func (m *HistogramDataPoint) HasSum() bool { + return m.metadata[fieldBlockHistogramDataPointSum]&fieldBitHistogramDataPointSum != 0 +} + +const fieldBlockHistogramDataPointMin = uint64(1 >> 6) +const fieldBitHistogramDataPointMin = uint64(1 << 1 & 0x3F) + +func (m *HistogramDataPoint) SetMin(value float64) { + m.Min = value + m.metadata[fieldBlockHistogramDataPointMin] |= fieldBitHistogramDataPointMin +} + +func (m *HistogramDataPoint) RemoveMin() { + m.Min = float64(0) + m.metadata[fieldBlockHistogramDataPointMin] &^= fieldBitHistogramDataPointMin +} + +func (m *HistogramDataPoint) HasMin() bool { + return m.metadata[fieldBlockHistogramDataPointMin]&fieldBitHistogramDataPointMin != 0 +} + +const fieldBlockHistogramDataPointMax = uint64(2 >> 6) +const fieldBitHistogramDataPointMax = uint64(1 << 2 & 0x3F) + +func (m *HistogramDataPoint) SetMax(value float64) { + m.Max = value + m.metadata[fieldBlockHistogramDataPointMax] |= fieldBitHistogramDataPointMax +} + +func (m *HistogramDataPoint) RemoveMax() { + m.Max = float64(0) + m.metadata[fieldBlockHistogramDataPointMax] &^= fieldBitHistogramDataPointMax +} + +func (m *HistogramDataPoint) HasMax() bool { + return m.metadata[fieldBlockHistogramDataPointMax]&fieldBitHistogramDataPointMax != 0 +} + +func GenTestHistogramDataPoint() *HistogramDataPoint { + orig := NewHistogramDataPoint() + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.StartTimeUnixNano = uint64(13) + orig.TimeUnixNano = uint64(13) + orig.Count = uint64(13) + orig.SetSum(float64(3.1415926)) + orig.BucketCounts = []uint64{uint64(0), uint64(13)} + orig.ExplicitBounds = []float64{float64(0), float64(3.1415926)} + orig.Exemplars = []Exemplar{{}, *GenTestExemplar()} + orig.Flags = uint32(13) + orig.SetMin(float64(3.1415926)) + orig.SetMax(float64(3.1415926)) + return orig +} + +func GenTestHistogramDataPointPtrSlice() []*HistogramDataPoint { + orig := make([]*HistogramDataPoint, 5) + orig[0] = NewHistogramDataPoint() + orig[1] = GenTestHistogramDataPoint() + orig[2] = NewHistogramDataPoint() + orig[3] = GenTestHistogramDataPoint() + orig[4] = NewHistogramDataPoint() + return orig +} + +func GenTestHistogramDataPointSlice() []HistogramDataPoint { + orig := make([]HistogramDataPoint, 5) + orig[1] = *GenTestHistogramDataPoint() + orig[3] = *GenTestHistogramDataPoint() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_instrumentationscope.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_instrumentationscope.go new file mode 100644 index 00000000000..ab44a2eabb9 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_instrumentationscope.go @@ -0,0 +1,342 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// InstrumentationScope is a message representing the instrumentation scope information. +type InstrumentationScope struct { + Name string + Version string + Attributes []KeyValue + DroppedAttributesCount uint32 +} + +var ( + protoPoolInstrumentationScope = sync.Pool{ + New: func() any { + return &InstrumentationScope{} + }, + } +) + +func NewInstrumentationScope() *InstrumentationScope { + if !UseProtoPooling.IsEnabled() { + return &InstrumentationScope{} + } + return protoPoolInstrumentationScope.Get().(*InstrumentationScope) +} + +func DeleteInstrumentationScope(orig *InstrumentationScope, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + orig.Reset() + if nullable { + protoPoolInstrumentationScope.Put(orig) + } +} + +func CopyInstrumentationScope(dest, src *InstrumentationScope) *InstrumentationScope { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewInstrumentationScope() + } + dest.Name = src.Name + dest.Version = src.Version + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + + return dest +} + +func CopyInstrumentationScopeSlice(dest, src []InstrumentationScope) []InstrumentationScope { + var newDest []InstrumentationScope + if cap(dest) < len(src) { + newDest = make([]InstrumentationScope, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteInstrumentationScope(&dest[i], false) + } + } + for i := range src { + CopyInstrumentationScope(&newDest[i], &src[i]) + } + return newDest +} + +func CopyInstrumentationScopePtrSlice(dest, src []*InstrumentationScope) []*InstrumentationScope { + var newDest []*InstrumentationScope + if cap(dest) < len(src) { + newDest = make([]*InstrumentationScope, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewInstrumentationScope() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteInstrumentationScope(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewInstrumentationScope() + } + } + for i := range src { + CopyInstrumentationScope(newDest[i], src[i]) + } + return newDest +} + +func (orig *InstrumentationScope) Reset() { + *orig = InstrumentationScope{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *InstrumentationScope) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Name != "" { + dest.WriteObjectField("name") + dest.WriteString(orig.Name) + } + if orig.Version != "" { + dest.WriteObjectField("version") + dest.WriteString(orig.Version) + } + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *InstrumentationScope) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "name": + orig.Name = iter.ReadString() + case "version": + orig.Version = iter.ReadString() + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *InstrumentationScope) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.Name) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.Version) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + return n +} + +func (orig *InstrumentationScope) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.Name) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Name) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = len(orig.Version) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Version) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x20 + } + return len(buf) - pos +} + +func (orig *InstrumentationScope) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Name = string(buf[startPos:pos]) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Version = string(buf[startPos:pos]) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 4: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestInstrumentationScope() *InstrumentationScope { + orig := NewInstrumentationScope() + orig.Name = "test_name" + orig.Version = "test_version" + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.DroppedAttributesCount = uint32(13) + return orig +} + +func GenTestInstrumentationScopePtrSlice() []*InstrumentationScope { + orig := make([]*InstrumentationScope, 5) + orig[0] = NewInstrumentationScope() + orig[1] = GenTestInstrumentationScope() + orig[2] = NewInstrumentationScope() + orig[3] = GenTestInstrumentationScope() + orig[4] = NewInstrumentationScope() + return orig +} + +func GenTestInstrumentationScopeSlice() []InstrumentationScope { + orig := make([]InstrumentationScope, 5) + orig[1] = *GenTestInstrumentationScope() + orig[3] = *GenTestInstrumentationScope() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_ipaddr.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_ipaddr.go new file mode 100644 index 00000000000..d77ec13a99a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_ipaddr.go @@ -0,0 +1,266 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type IPAddr struct { + Zone string + IP []byte +} + +var ( + protoPoolIPAddr = sync.Pool{ + New: func() any { + return &IPAddr{} + }, + } +) + +func NewIPAddr() *IPAddr { + if !UseProtoPooling.IsEnabled() { + return &IPAddr{} + } + return protoPoolIPAddr.Get().(*IPAddr) +} + +func DeleteIPAddr(orig *IPAddr, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolIPAddr.Put(orig) + } +} + +func CopyIPAddr(dest, src *IPAddr) *IPAddr { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewIPAddr() + } + dest.IP = src.IP + dest.Zone = src.Zone + + return dest +} + +func CopyIPAddrSlice(dest, src []IPAddr) []IPAddr { + var newDest []IPAddr + if cap(dest) < len(src) { + newDest = make([]IPAddr, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteIPAddr(&dest[i], false) + } + } + for i := range src { + CopyIPAddr(&newDest[i], &src[i]) + } + return newDest +} + +func CopyIPAddrPtrSlice(dest, src []*IPAddr) []*IPAddr { + var newDest []*IPAddr + if cap(dest) < len(src) { + newDest = make([]*IPAddr, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewIPAddr() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteIPAddr(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewIPAddr() + } + } + for i := range src { + CopyIPAddr(newDest[i], src[i]) + } + return newDest +} + +func (orig *IPAddr) Reset() { + *orig = IPAddr{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *IPAddr) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + + if len(orig.IP) > 0 { + dest.WriteObjectField("iP") + dest.WriteBytes(orig.IP) + } + if orig.Zone != "" { + dest.WriteObjectField("zone") + dest.WriteString(orig.Zone) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *IPAddr) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "iP": + orig.IP = iter.ReadBytes() + case "zone": + orig.Zone = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *IPAddr) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.IP) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.Zone) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *IPAddr) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.IP) + if l > 0 { + pos -= l + copy(buf[pos:], orig.IP) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = len(orig.Zone) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Zone) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *IPAddr) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + if length != 0 { + orig.IP = make([]byte, length) + copy(orig.IP, buf[startPos:pos]) + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Zone = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestIPAddr() *IPAddr { + orig := NewIPAddr() + orig.IP = []byte{1, 2, 3} + orig.Zone = "test_zone" + return orig +} + +func GenTestIPAddrPtrSlice() []*IPAddr { + orig := make([]*IPAddr, 5) + orig[0] = NewIPAddr() + orig[1] = GenTestIPAddr() + orig[2] = NewIPAddr() + orig[3] = GenTestIPAddr() + orig[4] = NewIPAddr() + return orig +} + +func GenTestIPAddrSlice() []IPAddr { + orig := make([]IPAddr, 5) + orig[1] = *GenTestIPAddr() + orig[3] = *GenTestIPAddr() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvalue.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvalue.go new file mode 100644 index 00000000000..038cb114d87 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvalue.go @@ -0,0 +1,261 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type KeyValue struct { + Value AnyValue + Key string +} + +var ( + protoPoolKeyValue = sync.Pool{ + New: func() any { + return &KeyValue{} + }, + } +) + +func NewKeyValue() *KeyValue { + if !UseProtoPooling.IsEnabled() { + return &KeyValue{} + } + return protoPoolKeyValue.Get().(*KeyValue) +} + +func DeleteKeyValue(orig *KeyValue, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + DeleteAnyValue(&orig.Value, false) + orig.Reset() + if nullable { + protoPoolKeyValue.Put(orig) + } +} + +func CopyKeyValue(dest, src *KeyValue) *KeyValue { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewKeyValue() + } + dest.Key = src.Key + CopyAnyValue(&dest.Value, &src.Value) + + return dest +} + +func CopyKeyValueSlice(dest, src []KeyValue) []KeyValue { + var newDest []KeyValue + if cap(dest) < len(src) { + newDest = make([]KeyValue, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteKeyValue(&dest[i], false) + } + } + for i := range src { + CopyKeyValue(&newDest[i], &src[i]) + } + return newDest +} + +func CopyKeyValuePtrSlice(dest, src []*KeyValue) []*KeyValue { + var newDest []*KeyValue + if cap(dest) < len(src) { + newDest = make([]*KeyValue, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewKeyValue() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteKeyValue(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewKeyValue() + } + } + for i := range src { + CopyKeyValue(newDest[i], src[i]) + } + return newDest +} + +func (orig *KeyValue) Reset() { + *orig = KeyValue{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *KeyValue) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Key != "" { + dest.WriteObjectField("key") + dest.WriteString(orig.Key) + } + dest.WriteObjectField("value") + orig.Value.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *KeyValue) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "key": + orig.Key = iter.ReadString() + case "value": + + orig.Value.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *KeyValue) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.Key) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.Value.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *KeyValue) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.Key) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Key) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = orig.Value.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + return len(buf) - pos +} + +func (orig *KeyValue) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Key = string(buf[startPos:pos]) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Value.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestKeyValue() *KeyValue { + orig := NewKeyValue() + orig.Key = "test_key" + orig.Value = *GenTestAnyValue() + return orig +} + +func GenTestKeyValuePtrSlice() []*KeyValue { + orig := make([]*KeyValue, 5) + orig[0] = NewKeyValue() + orig[1] = GenTestKeyValue() + orig[2] = NewKeyValue() + orig[3] = GenTestKeyValue() + orig[4] = NewKeyValue() + return orig +} + +func GenTestKeyValueSlice() []KeyValue { + orig := make([]KeyValue, 5) + orig[1] = *GenTestKeyValue() + orig[3] = *GenTestKeyValue() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvalueandunit.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvalueandunit.go new file mode 100644 index 00000000000..493ad947fd5 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvalueandunit.go @@ -0,0 +1,288 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// KeyValueAndUnit represents a custom 'dictionary native' +// style of encoding attributes which is more convenient +// for profiles than opentelemetry.proto.common.v1.KeyValue. +type KeyValueAndUnit struct { + Value AnyValue + KeyStrindex int32 + UnitStrindex int32 +} + +var ( + protoPoolKeyValueAndUnit = sync.Pool{ + New: func() any { + return &KeyValueAndUnit{} + }, + } +) + +func NewKeyValueAndUnit() *KeyValueAndUnit { + if !UseProtoPooling.IsEnabled() { + return &KeyValueAndUnit{} + } + return protoPoolKeyValueAndUnit.Get().(*KeyValueAndUnit) +} + +func DeleteKeyValueAndUnit(orig *KeyValueAndUnit, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + DeleteAnyValue(&orig.Value, false) + + orig.Reset() + if nullable { + protoPoolKeyValueAndUnit.Put(orig) + } +} + +func CopyKeyValueAndUnit(dest, src *KeyValueAndUnit) *KeyValueAndUnit { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewKeyValueAndUnit() + } + dest.KeyStrindex = src.KeyStrindex + CopyAnyValue(&dest.Value, &src.Value) + + dest.UnitStrindex = src.UnitStrindex + + return dest +} + +func CopyKeyValueAndUnitSlice(dest, src []KeyValueAndUnit) []KeyValueAndUnit { + var newDest []KeyValueAndUnit + if cap(dest) < len(src) { + newDest = make([]KeyValueAndUnit, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteKeyValueAndUnit(&dest[i], false) + } + } + for i := range src { + CopyKeyValueAndUnit(&newDest[i], &src[i]) + } + return newDest +} + +func CopyKeyValueAndUnitPtrSlice(dest, src []*KeyValueAndUnit) []*KeyValueAndUnit { + var newDest []*KeyValueAndUnit + if cap(dest) < len(src) { + newDest = make([]*KeyValueAndUnit, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewKeyValueAndUnit() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteKeyValueAndUnit(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewKeyValueAndUnit() + } + } + for i := range src { + CopyKeyValueAndUnit(newDest[i], src[i]) + } + return newDest +} + +func (orig *KeyValueAndUnit) Reset() { + *orig = KeyValueAndUnit{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *KeyValueAndUnit) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.KeyStrindex != int32(0) { + dest.WriteObjectField("keyStrindex") + dest.WriteInt32(orig.KeyStrindex) + } + dest.WriteObjectField("value") + orig.Value.MarshalJSON(dest) + if orig.UnitStrindex != int32(0) { + dest.WriteObjectField("unitStrindex") + dest.WriteInt32(orig.UnitStrindex) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *KeyValueAndUnit) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "keyStrindex", "key_strindex": + orig.KeyStrindex = iter.ReadInt32() + case "value": + + orig.Value.UnmarshalJSON(iter) + case "unitStrindex", "unit_strindex": + orig.UnitStrindex = iter.ReadInt32() + default: + iter.Skip() + } + } +} + +func (orig *KeyValueAndUnit) SizeProto() int { + var n int + var l int + _ = l + if orig.KeyStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.KeyStrindex)) + } + l = orig.Value.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.UnitStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.UnitStrindex)) + } + return n +} + +func (orig *KeyValueAndUnit) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.KeyStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.KeyStrindex)) + pos-- + buf[pos] = 0x8 + } + l = orig.Value.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + if orig.UnitStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.UnitStrindex)) + pos-- + buf[pos] = 0x18 + } + return len(buf) - pos +} + +func (orig *KeyValueAndUnit) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field KeyStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.KeyStrindex = int32(num) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Value.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.UnitStrindex = int32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestKeyValueAndUnit() *KeyValueAndUnit { + orig := NewKeyValueAndUnit() + orig.KeyStrindex = int32(13) + orig.Value = *GenTestAnyValue() + orig.UnitStrindex = int32(13) + return orig +} + +func GenTestKeyValueAndUnitPtrSlice() []*KeyValueAndUnit { + orig := make([]*KeyValueAndUnit, 5) + orig[0] = NewKeyValueAndUnit() + orig[1] = GenTestKeyValueAndUnit() + orig[2] = NewKeyValueAndUnit() + orig[3] = GenTestKeyValueAndUnit() + orig[4] = NewKeyValueAndUnit() + return orig +} + +func GenTestKeyValueAndUnitSlice() []KeyValueAndUnit { + orig := make([]KeyValueAndUnit, 5) + orig[1] = *GenTestKeyValueAndUnit() + orig[3] = *GenTestKeyValueAndUnit() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvaluelist.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvaluelist.go new file mode 100644 index 00000000000..9e01d808a20 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_keyvaluelist.go @@ -0,0 +1,243 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message since oneof in AnyValue does not allow repeated fields. +type KeyValueList struct { + Values []KeyValue +} + +var ( + protoPoolKeyValueList = sync.Pool{ + New: func() any { + return &KeyValueList{} + }, + } +) + +func NewKeyValueList() *KeyValueList { + if !UseProtoPooling.IsEnabled() { + return &KeyValueList{} + } + return protoPoolKeyValueList.Get().(*KeyValueList) +} + +func DeleteKeyValueList(orig *KeyValueList, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Values { + DeleteKeyValue(&orig.Values[i], false) + } + orig.Reset() + if nullable { + protoPoolKeyValueList.Put(orig) + } +} + +func CopyKeyValueList(dest, src *KeyValueList) *KeyValueList { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewKeyValueList() + } + dest.Values = CopyKeyValueSlice(dest.Values, src.Values) + + return dest +} + +func CopyKeyValueListSlice(dest, src []KeyValueList) []KeyValueList { + var newDest []KeyValueList + if cap(dest) < len(src) { + newDest = make([]KeyValueList, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteKeyValueList(&dest[i], false) + } + } + for i := range src { + CopyKeyValueList(&newDest[i], &src[i]) + } + return newDest +} + +func CopyKeyValueListPtrSlice(dest, src []*KeyValueList) []*KeyValueList { + var newDest []*KeyValueList + if cap(dest) < len(src) { + newDest = make([]*KeyValueList, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewKeyValueList() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteKeyValueList(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewKeyValueList() + } + } + for i := range src { + CopyKeyValueList(newDest[i], src[i]) + } + return newDest +} + +func (orig *KeyValueList) Reset() { + *orig = KeyValueList{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *KeyValueList) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Values) > 0 { + dest.WriteObjectField("values") + dest.WriteArrayStart() + orig.Values[0].MarshalJSON(dest) + for i := 1; i < len(orig.Values); i++ { + dest.WriteMore() + orig.Values[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *KeyValueList) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "values": + for iter.ReadArray() { + orig.Values = append(orig.Values, KeyValue{}) + orig.Values[len(orig.Values)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *KeyValueList) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Values { + l = orig.Values[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *KeyValueList) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Values) - 1; i >= 0; i-- { + l = orig.Values[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *KeyValueList) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Values = append(orig.Values, KeyValue{}) + err = orig.Values[len(orig.Values)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestKeyValueList() *KeyValueList { + orig := NewKeyValueList() + orig.Values = []KeyValue{{}, *GenTestKeyValue()} + return orig +} + +func GenTestKeyValueListPtrSlice() []*KeyValueList { + orig := make([]*KeyValueList, 5) + orig[0] = NewKeyValueList() + orig[1] = GenTestKeyValueList() + orig[2] = NewKeyValueList() + orig[3] = GenTestKeyValueList() + orig[4] = NewKeyValueList() + return orig +} + +func GenTestKeyValueListSlice() []KeyValueList { + orig := make([]KeyValueList, 5) + orig[1] = *GenTestKeyValueList() + orig[3] = *GenTestKeyValueList() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_line.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_line.go new file mode 100644 index 00000000000..f6db6871bb3 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_line.go @@ -0,0 +1,279 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Line details a specific line in a source code, linked to a function. +type Line struct { + FunctionIndex int32 + Line int64 + Column int64 +} + +var ( + protoPoolLine = sync.Pool{ + New: func() any { + return &Line{} + }, + } +) + +func NewLine() *Line { + if !UseProtoPooling.IsEnabled() { + return &Line{} + } + return protoPoolLine.Get().(*Line) +} + +func DeleteLine(orig *Line, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolLine.Put(orig) + } +} + +func CopyLine(dest, src *Line) *Line { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewLine() + } + dest.FunctionIndex = src.FunctionIndex + dest.Line = src.Line + dest.Column = src.Column + + return dest +} + +func CopyLineSlice(dest, src []Line) []Line { + var newDest []Line + if cap(dest) < len(src) { + newDest = make([]Line, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLine(&dest[i], false) + } + } + for i := range src { + CopyLine(&newDest[i], &src[i]) + } + return newDest +} + +func CopyLinePtrSlice(dest, src []*Line) []*Line { + var newDest []*Line + if cap(dest) < len(src) { + newDest = make([]*Line, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLine() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLine(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLine() + } + } + for i := range src { + CopyLine(newDest[i], src[i]) + } + return newDest +} + +func (orig *Line) Reset() { + *orig = Line{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Line) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.FunctionIndex != int32(0) { + dest.WriteObjectField("functionIndex") + dest.WriteInt32(orig.FunctionIndex) + } + if orig.Line != int64(0) { + dest.WriteObjectField("line") + dest.WriteInt64(orig.Line) + } + if orig.Column != int64(0) { + dest.WriteObjectField("column") + dest.WriteInt64(orig.Column) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Line) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "functionIndex", "function_index": + orig.FunctionIndex = iter.ReadInt32() + case "line": + orig.Line = iter.ReadInt64() + case "column": + orig.Column = iter.ReadInt64() + default: + iter.Skip() + } + } +} + +func (orig *Line) SizeProto() int { + var n int + var l int + _ = l + if orig.FunctionIndex != int32(0) { + n += 1 + proto.Sov(uint64(orig.FunctionIndex)) + } + if orig.Line != int64(0) { + n += 1 + proto.Sov(uint64(orig.Line)) + } + if orig.Column != int64(0) { + n += 1 + proto.Sov(uint64(orig.Column)) + } + return n +} + +func (orig *Line) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.FunctionIndex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.FunctionIndex)) + pos-- + buf[pos] = 0x8 + } + if orig.Line != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Line)) + pos-- + buf[pos] = 0x10 + } + if orig.Column != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Column)) + pos-- + buf[pos] = 0x18 + } + return len(buf) - pos +} + +func (orig *Line) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field FunctionIndex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.FunctionIndex = int32(num) + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Line = int64(num) + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Column = int64(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestLine() *Line { + orig := NewLine() + orig.FunctionIndex = int32(13) + orig.Line = int64(13) + orig.Column = int64(13) + return orig +} + +func GenTestLinePtrSlice() []*Line { + orig := make([]*Line, 5) + orig[0] = NewLine() + orig[1] = GenTestLine() + orig[2] = NewLine() + orig[3] = GenTestLine() + orig[4] = NewLine() + return orig +} + +func GenTestLineSlice() []Line { + orig := make([]Line, 5) + orig[1] = *GenTestLine() + orig[3] = *GenTestLine() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_link.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_link.go new file mode 100644 index 00000000000..6df8aa77f84 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_link.go @@ -0,0 +1,265 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Link represents a pointer from a profile Sample to a trace Span. +type Link struct { + TraceId TraceID + SpanId SpanID +} + +var ( + protoPoolLink = sync.Pool{ + New: func() any { + return &Link{} + }, + } +) + +func NewLink() *Link { + if !UseProtoPooling.IsEnabled() { + return &Link{} + } + return protoPoolLink.Get().(*Link) +} + +func DeleteLink(orig *Link, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteTraceID(&orig.TraceId, false) + DeleteSpanID(&orig.SpanId, false) + orig.Reset() + if nullable { + protoPoolLink.Put(orig) + } +} + +func CopyLink(dest, src *Link) *Link { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewLink() + } + CopyTraceID(&dest.TraceId, &src.TraceId) + + CopySpanID(&dest.SpanId, &src.SpanId) + + return dest +} + +func CopyLinkSlice(dest, src []Link) []Link { + var newDest []Link + if cap(dest) < len(src) { + newDest = make([]Link, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLink(&dest[i], false) + } + } + for i := range src { + CopyLink(&newDest[i], &src[i]) + } + return newDest +} + +func CopyLinkPtrSlice(dest, src []*Link) []*Link { + var newDest []*Link + if cap(dest) < len(src) { + newDest = make([]*Link, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLink() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLink(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLink() + } + } + for i := range src { + CopyLink(newDest[i], src[i]) + } + return newDest +} + +func (orig *Link) Reset() { + *orig = Link{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Link) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if !orig.TraceId.IsEmpty() { + dest.WriteObjectField("traceId") + orig.TraceId.MarshalJSON(dest) + } + if !orig.SpanId.IsEmpty() { + dest.WriteObjectField("spanId") + orig.SpanId.MarshalJSON(dest) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Link) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "traceId", "trace_id": + + orig.TraceId.UnmarshalJSON(iter) + case "spanId", "span_id": + + orig.SpanId.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *Link) SizeProto() int { + var n int + var l int + _ = l + l = orig.TraceId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.SpanId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *Link) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.TraceId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + l = orig.SpanId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + return len(buf) - pos +} + +func (orig *Link) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TraceId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SpanId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestLink() *Link { + orig := NewLink() + orig.TraceId = *GenTestTraceID() + orig.SpanId = *GenTestSpanID() + return orig +} + +func GenTestLinkPtrSlice() []*Link { + orig := make([]*Link, 5) + orig[0] = NewLink() + orig[1] = GenTestLink() + orig[2] = NewLink() + orig[3] = GenTestLink() + orig[4] = NewLink() + return orig +} + +func GenTestLinkSlice() []Link { + orig := make([]Link, 5) + orig[1] = *GenTestLink() + orig[3] = *GenTestLink() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_location.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_location.go new file mode 100644 index 00000000000..a9eebb1f66c --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_location.go @@ -0,0 +1,369 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Location describes function and line table debug information. +type Location struct { + Lines []*Line + AttributeIndices []int32 + Address uint64 + MappingIndex int32 +} + +var ( + protoPoolLocation = sync.Pool{ + New: func() any { + return &Location{} + }, + } +) + +func NewLocation() *Location { + if !UseProtoPooling.IsEnabled() { + return &Location{} + } + return protoPoolLocation.Get().(*Location) +} + +func DeleteLocation(orig *Location, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + for i := range orig.Lines { + DeleteLine(orig.Lines[i], true) + } + + orig.Reset() + if nullable { + protoPoolLocation.Put(orig) + } +} + +func CopyLocation(dest, src *Location) *Location { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewLocation() + } + dest.MappingIndex = src.MappingIndex + dest.Address = src.Address + dest.Lines = CopyLinePtrSlice(dest.Lines, src.Lines) + + dest.AttributeIndices = append(dest.AttributeIndices[:0], src.AttributeIndices...) + + return dest +} + +func CopyLocationSlice(dest, src []Location) []Location { + var newDest []Location + if cap(dest) < len(src) { + newDest = make([]Location, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLocation(&dest[i], false) + } + } + for i := range src { + CopyLocation(&newDest[i], &src[i]) + } + return newDest +} + +func CopyLocationPtrSlice(dest, src []*Location) []*Location { + var newDest []*Location + if cap(dest) < len(src) { + newDest = make([]*Location, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLocation() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLocation(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLocation() + } + } + for i := range src { + CopyLocation(newDest[i], src[i]) + } + return newDest +} + +func (orig *Location) Reset() { + *orig = Location{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Location) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.MappingIndex != int32(0) { + dest.WriteObjectField("mappingIndex") + dest.WriteInt32(orig.MappingIndex) + } + if orig.Address != uint64(0) { + dest.WriteObjectField("address") + dest.WriteUint64(orig.Address) + } + if len(orig.Lines) > 0 { + dest.WriteObjectField("lines") + dest.WriteArrayStart() + orig.Lines[0].MarshalJSON(dest) + for i := 1; i < len(orig.Lines); i++ { + dest.WriteMore() + orig.Lines[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if len(orig.AttributeIndices) > 0 { + dest.WriteObjectField("attributeIndices") + dest.WriteArrayStart() + dest.WriteInt32(orig.AttributeIndices[0]) + for i := 1; i < len(orig.AttributeIndices); i++ { + dest.WriteMore() + dest.WriteInt32(orig.AttributeIndices[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Location) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "mappingIndex", "mapping_index": + orig.MappingIndex = iter.ReadInt32() + case "address": + orig.Address = iter.ReadUint64() + case "lines": + for iter.ReadArray() { + orig.Lines = append(orig.Lines, NewLine()) + orig.Lines[len(orig.Lines)-1].UnmarshalJSON(iter) + } + + case "attributeIndices", "attribute_indices": + for iter.ReadArray() { + orig.AttributeIndices = append(orig.AttributeIndices, iter.ReadInt32()) + } + + default: + iter.Skip() + } + } +} + +func (orig *Location) SizeProto() int { + var n int + var l int + _ = l + if orig.MappingIndex != int32(0) { + n += 1 + proto.Sov(uint64(orig.MappingIndex)) + } + if orig.Address != uint64(0) { + n += 1 + proto.Sov(uint64(orig.Address)) + } + for i := range orig.Lines { + l = orig.Lines[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + if len(orig.AttributeIndices) > 0 { + l = 0 + for _, e := range orig.AttributeIndices { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Location) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.MappingIndex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.MappingIndex)) + pos-- + buf[pos] = 0x8 + } + if orig.Address != uint64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Address)) + pos-- + buf[pos] = 0x10 + } + for i := len(orig.Lines) - 1; i >= 0; i-- { + l = orig.Lines[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + l = len(orig.AttributeIndices) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AttributeIndices[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0x22 + } + return len(buf) - pos +} + +func (orig *Location) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field MappingIndex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.MappingIndex = int32(num) + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Address = uint64(num) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Lines", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Lines = append(orig.Lines, NewLine()) + err = orig.Lines[len(orig.Lines)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + case 4: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field AttributeIndices", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestLocation() *Location { + orig := NewLocation() + orig.MappingIndex = int32(13) + orig.Address = uint64(13) + orig.Lines = []*Line{{}, GenTestLine()} + orig.AttributeIndices = []int32{int32(0), int32(13)} + return orig +} + +func GenTestLocationPtrSlice() []*Location { + orig := make([]*Location, 5) + orig[0] = NewLocation() + orig[1] = GenTestLocation() + orig[2] = NewLocation() + orig[3] = GenTestLocation() + orig[4] = NewLocation() + return orig +} + +func GenTestLocationSlice() []Location { + orig := make([]Location, 5) + orig[1] = *GenTestLocation() + orig[3] = *GenTestLocation() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logrecord.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logrecord.go new file mode 100644 index 00000000000..6d5057b5725 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logrecord.go @@ -0,0 +1,570 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// LogRecord are experimental implementation of OpenTelemetry Log Data Model. + +type LogRecord struct { + Body AnyValue + SeverityText string + EventName string + Attributes []KeyValue + TimeUnixNano uint64 + ObservedTimeUnixNano uint64 + SeverityNumber SeverityNumber + DroppedAttributesCount uint32 + Flags uint32 + TraceId TraceID + SpanId SpanID +} + +var ( + protoPoolLogRecord = sync.Pool{ + New: func() any { + return &LogRecord{} + }, + } +) + +func NewLogRecord() *LogRecord { + if !UseProtoPooling.IsEnabled() { + return &LogRecord{} + } + return protoPoolLogRecord.Get().(*LogRecord) +} + +func DeleteLogRecord(orig *LogRecord, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + DeleteAnyValue(&orig.Body, false) + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + DeleteTraceID(&orig.TraceId, false) + DeleteSpanID(&orig.SpanId, false) + + orig.Reset() + if nullable { + protoPoolLogRecord.Put(orig) + } +} + +func CopyLogRecord(dest, src *LogRecord) *LogRecord { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewLogRecord() + } + dest.TimeUnixNano = src.TimeUnixNano + dest.ObservedTimeUnixNano = src.ObservedTimeUnixNano + dest.SeverityNumber = src.SeverityNumber + dest.SeverityText = src.SeverityText + CopyAnyValue(&dest.Body, &src.Body) + + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + dest.Flags = src.Flags + CopyTraceID(&dest.TraceId, &src.TraceId) + + CopySpanID(&dest.SpanId, &src.SpanId) + + dest.EventName = src.EventName + + return dest +} + +func CopyLogRecordSlice(dest, src []LogRecord) []LogRecord { + var newDest []LogRecord + if cap(dest) < len(src) { + newDest = make([]LogRecord, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLogRecord(&dest[i], false) + } + } + for i := range src { + CopyLogRecord(&newDest[i], &src[i]) + } + return newDest +} + +func CopyLogRecordPtrSlice(dest, src []*LogRecord) []*LogRecord { + var newDest []*LogRecord + if cap(dest) < len(src) { + newDest = make([]*LogRecord, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLogRecord() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLogRecord(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLogRecord() + } + } + for i := range src { + CopyLogRecord(newDest[i], src[i]) + } + return newDest +} + +func (orig *LogRecord) Reset() { + *orig = LogRecord{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *LogRecord) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + if orig.ObservedTimeUnixNano != uint64(0) { + dest.WriteObjectField("observedTimeUnixNano") + dest.WriteUint64(orig.ObservedTimeUnixNano) + } + + if int32(orig.SeverityNumber) != 0 { + dest.WriteObjectField("severityNumber") + dest.WriteInt32(int32(orig.SeverityNumber)) + } + if orig.SeverityText != "" { + dest.WriteObjectField("severityText") + dest.WriteString(orig.SeverityText) + } + dest.WriteObjectField("body") + orig.Body.MarshalJSON(dest) + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + if !orig.TraceId.IsEmpty() { + dest.WriteObjectField("traceId") + orig.TraceId.MarshalJSON(dest) + } + if !orig.SpanId.IsEmpty() { + dest.WriteObjectField("spanId") + orig.SpanId.MarshalJSON(dest) + } + if orig.EventName != "" { + dest.WriteObjectField("eventName") + dest.WriteString(orig.EventName) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *LogRecord) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + case "observedTimeUnixNano", "observed_time_unix_nano": + orig.ObservedTimeUnixNano = iter.ReadUint64() + case "severityNumber", "severity_number": + orig.SeverityNumber = SeverityNumber(iter.ReadEnumValue(SeverityNumber_value)) + case "severityText", "severity_text": + orig.SeverityText = iter.ReadString() + case "body": + + orig.Body.UnmarshalJSON(iter) + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + case "flags": + orig.Flags = iter.ReadUint32() + case "traceId", "trace_id": + + orig.TraceId.UnmarshalJSON(iter) + case "spanId", "span_id": + + orig.SpanId.UnmarshalJSON(iter) + case "eventName", "event_name": + orig.EventName = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *LogRecord) SizeProto() int { + var n int + var l int + _ = l + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + if orig.ObservedTimeUnixNano != uint64(0) { + n += 9 + } + if orig.SeverityNumber != SeverityNumber(0) { + n += 1 + proto.Sov(uint64(orig.SeverityNumber)) + } + + l = len(orig.SeverityText) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.Body.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + if orig.Flags != uint32(0) { + n += 5 + } + l = orig.TraceId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.SpanId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + + l = len(orig.EventName) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *LogRecord) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x9 + } + if orig.ObservedTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.ObservedTimeUnixNano)) + pos-- + buf[pos] = 0x59 + } + if orig.SeverityNumber != SeverityNumber(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.SeverityNumber)) + pos-- + buf[pos] = 0x10 + } + l = len(orig.SeverityText) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SeverityText) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + l = orig.Body.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x32 + } + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x38 + } + if orig.Flags != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.Flags)) + pos-- + buf[pos] = 0x45 + } + l = orig.TraceId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x4a + + l = orig.SpanId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x52 + + l = len(orig.EventName) + if l > 0 { + pos -= l + copy(buf[pos:], orig.EventName) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x62 + } + return len(buf) - pos +} + +func (orig *LogRecord) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 11: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.ObservedTimeUnixNano = uint64(num) + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field SeverityNumber", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.SeverityNumber = SeverityNumber(num) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SeverityText", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SeverityText = string(buf[startPos:pos]) + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Body.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 6: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 7: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + + case 8: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.Flags = uint32(num) + + case 9: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TraceId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 10: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SpanId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 12: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field EventName", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.EventName = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestLogRecord() *LogRecord { + orig := NewLogRecord() + orig.TimeUnixNano = uint64(13) + orig.ObservedTimeUnixNano = uint64(13) + orig.SeverityNumber = SeverityNumber(13) + orig.SeverityText = "test_severitytext" + orig.Body = *GenTestAnyValue() + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.DroppedAttributesCount = uint32(13) + orig.Flags = uint32(13) + orig.TraceId = *GenTestTraceID() + orig.SpanId = *GenTestSpanID() + orig.EventName = "test_eventname" + return orig +} + +func GenTestLogRecordPtrSlice() []*LogRecord { + orig := make([]*LogRecord, 5) + orig[0] = NewLogRecord() + orig[1] = GenTestLogRecord() + orig[2] = NewLogRecord() + orig[3] = GenTestLogRecord() + orig[4] = NewLogRecord() + return orig +} + +func GenTestLogRecordSlice() []LogRecord { + orig := make([]LogRecord, 5) + orig[1] = *GenTestLogRecord() + orig[3] = *GenTestLogRecord() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logsdata.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logsdata.go new file mode 100644 index 00000000000..747684f1c6b --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logsdata.go @@ -0,0 +1,245 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// LogsData represents the logs data that can be stored in a persistent storage, +// OR can be embedded by other protocols that transfer OTLP logs data but do not +// implement the OTLP protocol. +type LogsData struct { + ResourceLogs []*ResourceLogs +} + +var ( + protoPoolLogsData = sync.Pool{ + New: func() any { + return &LogsData{} + }, + } +) + +func NewLogsData() *LogsData { + if !UseProtoPooling.IsEnabled() { + return &LogsData{} + } + return protoPoolLogsData.Get().(*LogsData) +} + +func DeleteLogsData(orig *LogsData, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceLogs { + DeleteResourceLogs(orig.ResourceLogs[i], true) + } + orig.Reset() + if nullable { + protoPoolLogsData.Put(orig) + } +} + +func CopyLogsData(dest, src *LogsData) *LogsData { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewLogsData() + } + dest.ResourceLogs = CopyResourceLogsPtrSlice(dest.ResourceLogs, src.ResourceLogs) + + return dest +} + +func CopyLogsDataSlice(dest, src []LogsData) []LogsData { + var newDest []LogsData + if cap(dest) < len(src) { + newDest = make([]LogsData, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLogsData(&dest[i], false) + } + } + for i := range src { + CopyLogsData(&newDest[i], &src[i]) + } + return newDest +} + +func CopyLogsDataPtrSlice(dest, src []*LogsData) []*LogsData { + var newDest []*LogsData + if cap(dest) < len(src) { + newDest = make([]*LogsData, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLogsData() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLogsData(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLogsData() + } + } + for i := range src { + CopyLogsData(newDest[i], src[i]) + } + return newDest +} + +func (orig *LogsData) Reset() { + *orig = LogsData{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *LogsData) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceLogs) > 0 { + dest.WriteObjectField("resourceLogs") + dest.WriteArrayStart() + orig.ResourceLogs[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceLogs); i++ { + dest.WriteMore() + orig.ResourceLogs[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *LogsData) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceLogs", "resource_logs": + for iter.ReadArray() { + orig.ResourceLogs = append(orig.ResourceLogs, NewResourceLogs()) + orig.ResourceLogs[len(orig.ResourceLogs)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *LogsData) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceLogs { + l = orig.ResourceLogs[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *LogsData) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceLogs) - 1; i >= 0; i-- { + l = orig.ResourceLogs[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *LogsData) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceLogs = append(orig.ResourceLogs, NewResourceLogs()) + err = orig.ResourceLogs[len(orig.ResourceLogs)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestLogsData() *LogsData { + orig := NewLogsData() + orig.ResourceLogs = []*ResourceLogs{{}, GenTestResourceLogs()} + return orig +} + +func GenTestLogsDataPtrSlice() []*LogsData { + orig := make([]*LogsData, 5) + orig[0] = NewLogsData() + orig[1] = GenTestLogsData() + orig[2] = NewLogsData() + orig[3] = GenTestLogsData() + orig[4] = NewLogsData() + return orig +} + +func GenTestLogsDataSlice() []LogsData { + orig := make([]LogsData, 5) + orig[1] = *GenTestLogsData() + orig[3] = *GenTestLogsData() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logsrequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logsrequest.go new file mode 100644 index 00000000000..94b915df049 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_logsrequest.go @@ -0,0 +1,299 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type LogsRequest struct { + RequestContext *RequestContext + LogsData LogsData + FormatVersion uint32 +} + +var ( + protoPoolLogsRequest = sync.Pool{ + New: func() any { + return &LogsRequest{} + }, + } +) + +func NewLogsRequest() *LogsRequest { + if !UseProtoPooling.IsEnabled() { + return &LogsRequest{} + } + return protoPoolLogsRequest.Get().(*LogsRequest) +} + +func DeleteLogsRequest(orig *LogsRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteRequestContext(orig.RequestContext, true) + DeleteLogsData(&orig.LogsData, false) + + orig.Reset() + if nullable { + protoPoolLogsRequest.Put(orig) + } +} + +func CopyLogsRequest(dest, src *LogsRequest) *LogsRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewLogsRequest() + } + dest.RequestContext = CopyRequestContext(dest.RequestContext, src.RequestContext) + + CopyLogsData(&dest.LogsData, &src.LogsData) + + dest.FormatVersion = src.FormatVersion + + return dest +} + +func CopyLogsRequestSlice(dest, src []LogsRequest) []LogsRequest { + var newDest []LogsRequest + if cap(dest) < len(src) { + newDest = make([]LogsRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLogsRequest(&dest[i], false) + } + } + for i := range src { + CopyLogsRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyLogsRequestPtrSlice(dest, src []*LogsRequest) []*LogsRequest { + var newDest []*LogsRequest + if cap(dest) < len(src) { + newDest = make([]*LogsRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLogsRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteLogsRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewLogsRequest() + } + } + for i := range src { + CopyLogsRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *LogsRequest) Reset() { + *orig = LogsRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *LogsRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RequestContext != nil { + dest.WriteObjectField("requestContext") + orig.RequestContext.MarshalJSON(dest) + } + dest.WriteObjectField("logsData") + orig.LogsData.MarshalJSON(dest) + if orig.FormatVersion != uint32(0) { + dest.WriteObjectField("formatVersion") + dest.WriteUint32(orig.FormatVersion) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *LogsRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "requestContext", "request_context": + orig.RequestContext = NewRequestContext() + orig.RequestContext.UnmarshalJSON(iter) + case "logsData", "logs_data": + + orig.LogsData.UnmarshalJSON(iter) + case "formatVersion", "format_version": + orig.FormatVersion = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *LogsRequest) SizeProto() int { + var n int + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.LogsData.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.FormatVersion != uint32(0) { + n += 5 + } + return n +} + +func (orig *LogsRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = orig.LogsData.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + + if orig.FormatVersion != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.FormatVersion)) + pos-- + buf[pos] = 0xd + } + return len(buf) - pos +} + +func (orig *LogsRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field RequestContext", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + orig.RequestContext = NewRequestContext() + err = orig.RequestContext.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field LogsData", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.LogsData.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 1: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field FormatVersion", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.FormatVersion = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestLogsRequest() *LogsRequest { + orig := NewLogsRequest() + orig.RequestContext = GenTestRequestContext() + orig.LogsData = *GenTestLogsData() + orig.FormatVersion = uint32(13) + return orig +} + +func GenTestLogsRequestPtrSlice() []*LogsRequest { + orig := make([]*LogsRequest, 5) + orig[0] = NewLogsRequest() + orig[1] = GenTestLogsRequest() + orig[2] = NewLogsRequest() + orig[3] = GenTestLogsRequest() + orig[4] = NewLogsRequest() + return orig +} + +func GenTestLogsRequestSlice() []LogsRequest { + orig := make([]LogsRequest, 5) + orig[1] = *GenTestLogsRequest() + orig[3] = *GenTestLogsRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_mapping.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_mapping.go new file mode 100644 index 00000000000..8a91a076290 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_mapping.go @@ -0,0 +1,374 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Mapping describes the mapping of a binary in memory, including its address range, file offset, and metadata like build ID +type Mapping struct { + AttributeIndices []int32 + MemoryStart uint64 + MemoryLimit uint64 + FileOffset uint64 + FilenameStrindex int32 +} + +var ( + protoPoolMapping = sync.Pool{ + New: func() any { + return &Mapping{} + }, + } +) + +func NewMapping() *Mapping { + if !UseProtoPooling.IsEnabled() { + return &Mapping{} + } + return protoPoolMapping.Get().(*Mapping) +} + +func DeleteMapping(orig *Mapping, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolMapping.Put(orig) + } +} + +func CopyMapping(dest, src *Mapping) *Mapping { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewMapping() + } + dest.MemoryStart = src.MemoryStart + dest.MemoryLimit = src.MemoryLimit + dest.FileOffset = src.FileOffset + dest.FilenameStrindex = src.FilenameStrindex + dest.AttributeIndices = append(dest.AttributeIndices[:0], src.AttributeIndices...) + + return dest +} + +func CopyMappingSlice(dest, src []Mapping) []Mapping { + var newDest []Mapping + if cap(dest) < len(src) { + newDest = make([]Mapping, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMapping(&dest[i], false) + } + } + for i := range src { + CopyMapping(&newDest[i], &src[i]) + } + return newDest +} + +func CopyMappingPtrSlice(dest, src []*Mapping) []*Mapping { + var newDest []*Mapping + if cap(dest) < len(src) { + newDest = make([]*Mapping, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMapping() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMapping(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMapping() + } + } + for i := range src { + CopyMapping(newDest[i], src[i]) + } + return newDest +} + +func (orig *Mapping) Reset() { + *orig = Mapping{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Mapping) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.MemoryStart != uint64(0) { + dest.WriteObjectField("memoryStart") + dest.WriteUint64(orig.MemoryStart) + } + if orig.MemoryLimit != uint64(0) { + dest.WriteObjectField("memoryLimit") + dest.WriteUint64(orig.MemoryLimit) + } + if orig.FileOffset != uint64(0) { + dest.WriteObjectField("fileOffset") + dest.WriteUint64(orig.FileOffset) + } + if orig.FilenameStrindex != int32(0) { + dest.WriteObjectField("filenameStrindex") + dest.WriteInt32(orig.FilenameStrindex) + } + if len(orig.AttributeIndices) > 0 { + dest.WriteObjectField("attributeIndices") + dest.WriteArrayStart() + dest.WriteInt32(orig.AttributeIndices[0]) + for i := 1; i < len(orig.AttributeIndices); i++ { + dest.WriteMore() + dest.WriteInt32(orig.AttributeIndices[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Mapping) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "memoryStart", "memory_start": + orig.MemoryStart = iter.ReadUint64() + case "memoryLimit", "memory_limit": + orig.MemoryLimit = iter.ReadUint64() + case "fileOffset", "file_offset": + orig.FileOffset = iter.ReadUint64() + case "filenameStrindex", "filename_strindex": + orig.FilenameStrindex = iter.ReadInt32() + case "attributeIndices", "attribute_indices": + for iter.ReadArray() { + orig.AttributeIndices = append(orig.AttributeIndices, iter.ReadInt32()) + } + + default: + iter.Skip() + } + } +} + +func (orig *Mapping) SizeProto() int { + var n int + var l int + _ = l + if orig.MemoryStart != uint64(0) { + n += 1 + proto.Sov(uint64(orig.MemoryStart)) + } + if orig.MemoryLimit != uint64(0) { + n += 1 + proto.Sov(uint64(orig.MemoryLimit)) + } + if orig.FileOffset != uint64(0) { + n += 1 + proto.Sov(uint64(orig.FileOffset)) + } + if orig.FilenameStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.FilenameStrindex)) + } + + if len(orig.AttributeIndices) > 0 { + l = 0 + for _, e := range orig.AttributeIndices { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Mapping) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.MemoryStart != uint64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.MemoryStart)) + pos-- + buf[pos] = 0x8 + } + if orig.MemoryLimit != uint64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.MemoryLimit)) + pos-- + buf[pos] = 0x10 + } + if orig.FileOffset != uint64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.FileOffset)) + pos-- + buf[pos] = 0x18 + } + if orig.FilenameStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.FilenameStrindex)) + pos-- + buf[pos] = 0x20 + } + l = len(orig.AttributeIndices) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AttributeIndices[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0x2a + } + return len(buf) - pos +} + +func (orig *Mapping) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.MemoryStart = uint64(num) + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.MemoryLimit = uint64(num) + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.FileOffset = uint64(num) + + case 4: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.FilenameStrindex = int32(num) + case 5: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field AttributeIndices", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestMapping() *Mapping { + orig := NewMapping() + orig.MemoryStart = uint64(13) + orig.MemoryLimit = uint64(13) + orig.FileOffset = uint64(13) + orig.FilenameStrindex = int32(13) + orig.AttributeIndices = []int32{int32(0), int32(13)} + return orig +} + +func GenTestMappingPtrSlice() []*Mapping { + orig := make([]*Mapping, 5) + orig[0] = NewMapping() + orig[1] = GenTestMapping() + orig[2] = NewMapping() + orig[3] = GenTestMapping() + orig[4] = NewMapping() + return orig +} + +func GenTestMappingSlice() []Mapping { + orig := make([]Mapping, 5) + orig[1] = *GenTestMapping() + orig[3] = *GenTestMapping() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metric.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metric.go new file mode 100644 index 00000000000..6e5fa339f8a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metric.go @@ -0,0 +1,798 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +func (m *Metric) GetData() any { + if m != nil { + return m.Data + } + return nil +} + +type Metric_Gauge struct { + Gauge *Gauge +} + +func (m *Metric) GetGauge() *Gauge { + if v, ok := m.GetData().(*Metric_Gauge); ok { + return v.Gauge + } + return nil +} + +type Metric_Sum struct { + Sum *Sum +} + +func (m *Metric) GetSum() *Sum { + if v, ok := m.GetData().(*Metric_Sum); ok { + return v.Sum + } + return nil +} + +type Metric_Histogram struct { + Histogram *Histogram +} + +func (m *Metric) GetHistogram() *Histogram { + if v, ok := m.GetData().(*Metric_Histogram); ok { + return v.Histogram + } + return nil +} + +type Metric_ExponentialHistogram struct { + ExponentialHistogram *ExponentialHistogram +} + +func (m *Metric) GetExponentialHistogram() *ExponentialHistogram { + if v, ok := m.GetData().(*Metric_ExponentialHistogram); ok { + return v.ExponentialHistogram + } + return nil +} + +type Metric_Summary struct { + Summary *Summary +} + +func (m *Metric) GetSummary() *Summary { + if v, ok := m.GetData().(*Metric_Summary); ok { + return v.Summary + } + return nil +} + +// Metric represents one metric as a collection of datapoints. +// See Metric definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto +type Metric struct { + Name string + Description string + Unit string + Data any + Metadata []KeyValue +} + +var ( + protoPoolMetric = sync.Pool{ + New: func() any { + return &Metric{} + }, + } + + ProtoPoolMetric_Gauge = sync.Pool{ + New: func() any { + return &Metric_Gauge{} + }, + } + + ProtoPoolMetric_Sum = sync.Pool{ + New: func() any { + return &Metric_Sum{} + }, + } + + ProtoPoolMetric_Histogram = sync.Pool{ + New: func() any { + return &Metric_Histogram{} + }, + } + + ProtoPoolMetric_ExponentialHistogram = sync.Pool{ + New: func() any { + return &Metric_ExponentialHistogram{} + }, + } + + ProtoPoolMetric_Summary = sync.Pool{ + New: func() any { + return &Metric_Summary{} + }, + } +) + +func NewMetric() *Metric { + if !UseProtoPooling.IsEnabled() { + return &Metric{} + } + return protoPoolMetric.Get().(*Metric) +} + +func DeleteMetric(orig *Metric, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + switch ov := orig.Data.(type) { + case *Metric_Gauge: + DeleteGauge(ov.Gauge, true) + ov.Gauge = nil + ProtoPoolMetric_Gauge.Put(ov) + case *Metric_Sum: + DeleteSum(ov.Sum, true) + ov.Sum = nil + ProtoPoolMetric_Sum.Put(ov) + case *Metric_Histogram: + DeleteHistogram(ov.Histogram, true) + ov.Histogram = nil + ProtoPoolMetric_Histogram.Put(ov) + case *Metric_ExponentialHistogram: + DeleteExponentialHistogram(ov.ExponentialHistogram, true) + ov.ExponentialHistogram = nil + ProtoPoolMetric_ExponentialHistogram.Put(ov) + case *Metric_Summary: + DeleteSummary(ov.Summary, true) + ov.Summary = nil + ProtoPoolMetric_Summary.Put(ov) + } + for i := range orig.Metadata { + DeleteKeyValue(&orig.Metadata[i], false) + } + orig.Reset() + if nullable { + protoPoolMetric.Put(orig) + } +} + +func CopyMetric(dest, src *Metric) *Metric { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewMetric() + } + dest.Name = src.Name + dest.Description = src.Description + dest.Unit = src.Unit + switch t := src.Data.(type) { + case *Metric_Gauge: + var ov *Metric_Gauge + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Gauge{} + } else { + ov = ProtoPoolMetric_Gauge.Get().(*Metric_Gauge) + } + ov.Gauge = NewGauge() + CopyGauge(ov.Gauge, t.Gauge) + dest.Data = ov + + case *Metric_Sum: + var ov *Metric_Sum + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Sum{} + } else { + ov = ProtoPoolMetric_Sum.Get().(*Metric_Sum) + } + ov.Sum = NewSum() + CopySum(ov.Sum, t.Sum) + dest.Data = ov + + case *Metric_Histogram: + var ov *Metric_Histogram + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Histogram{} + } else { + ov = ProtoPoolMetric_Histogram.Get().(*Metric_Histogram) + } + ov.Histogram = NewHistogram() + CopyHistogram(ov.Histogram, t.Histogram) + dest.Data = ov + + case *Metric_ExponentialHistogram: + var ov *Metric_ExponentialHistogram + if !UseProtoPooling.IsEnabled() { + ov = &Metric_ExponentialHistogram{} + } else { + ov = ProtoPoolMetric_ExponentialHistogram.Get().(*Metric_ExponentialHistogram) + } + ov.ExponentialHistogram = NewExponentialHistogram() + CopyExponentialHistogram(ov.ExponentialHistogram, t.ExponentialHistogram) + dest.Data = ov + + case *Metric_Summary: + var ov *Metric_Summary + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Summary{} + } else { + ov = ProtoPoolMetric_Summary.Get().(*Metric_Summary) + } + ov.Summary = NewSummary() + CopySummary(ov.Summary, t.Summary) + dest.Data = ov + + default: + dest.Data = nil + } + dest.Metadata = CopyKeyValueSlice(dest.Metadata, src.Metadata) + + return dest +} + +func CopyMetricSlice(dest, src []Metric) []Metric { + var newDest []Metric + if cap(dest) < len(src) { + newDest = make([]Metric, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMetric(&dest[i], false) + } + } + for i := range src { + CopyMetric(&newDest[i], &src[i]) + } + return newDest +} + +func CopyMetricPtrSlice(dest, src []*Metric) []*Metric { + var newDest []*Metric + if cap(dest) < len(src) { + newDest = make([]*Metric, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMetric() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMetric(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMetric() + } + } + for i := range src { + CopyMetric(newDest[i], src[i]) + } + return newDest +} + +func (orig *Metric) Reset() { + *orig = Metric{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Metric) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Name != "" { + dest.WriteObjectField("name") + dest.WriteString(orig.Name) + } + if orig.Description != "" { + dest.WriteObjectField("description") + dest.WriteString(orig.Description) + } + if orig.Unit != "" { + dest.WriteObjectField("unit") + dest.WriteString(orig.Unit) + } + switch orig := orig.Data.(type) { + case *Metric_Gauge: + if orig.Gauge != nil { + dest.WriteObjectField("gauge") + orig.Gauge.MarshalJSON(dest) + } + case *Metric_Sum: + if orig.Sum != nil { + dest.WriteObjectField("sum") + orig.Sum.MarshalJSON(dest) + } + case *Metric_Histogram: + if orig.Histogram != nil { + dest.WriteObjectField("histogram") + orig.Histogram.MarshalJSON(dest) + } + case *Metric_ExponentialHistogram: + if orig.ExponentialHistogram != nil { + dest.WriteObjectField("exponentialHistogram") + orig.ExponentialHistogram.MarshalJSON(dest) + } + case *Metric_Summary: + if orig.Summary != nil { + dest.WriteObjectField("summary") + orig.Summary.MarshalJSON(dest) + } + } + if len(orig.Metadata) > 0 { + dest.WriteObjectField("metadata") + dest.WriteArrayStart() + orig.Metadata[0].MarshalJSON(dest) + for i := 1; i < len(orig.Metadata); i++ { + dest.WriteMore() + orig.Metadata[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Metric) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "name": + orig.Name = iter.ReadString() + case "description": + orig.Description = iter.ReadString() + case "unit": + orig.Unit = iter.ReadString() + + case "gauge": + { + var ov *Metric_Gauge + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Gauge{} + } else { + ov = ProtoPoolMetric_Gauge.Get().(*Metric_Gauge) + } + ov.Gauge = NewGauge() + ov.Gauge.UnmarshalJSON(iter) + orig.Data = ov + } + case "sum": + { + var ov *Metric_Sum + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Sum{} + } else { + ov = ProtoPoolMetric_Sum.Get().(*Metric_Sum) + } + ov.Sum = NewSum() + ov.Sum.UnmarshalJSON(iter) + orig.Data = ov + } + case "histogram": + { + var ov *Metric_Histogram + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Histogram{} + } else { + ov = ProtoPoolMetric_Histogram.Get().(*Metric_Histogram) + } + ov.Histogram = NewHistogram() + ov.Histogram.UnmarshalJSON(iter) + orig.Data = ov + } + case "exponentialHistogram", "exponential_histogram": + { + var ov *Metric_ExponentialHistogram + if !UseProtoPooling.IsEnabled() { + ov = &Metric_ExponentialHistogram{} + } else { + ov = ProtoPoolMetric_ExponentialHistogram.Get().(*Metric_ExponentialHistogram) + } + ov.ExponentialHistogram = NewExponentialHistogram() + ov.ExponentialHistogram.UnmarshalJSON(iter) + orig.Data = ov + } + case "summary": + { + var ov *Metric_Summary + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Summary{} + } else { + ov = ProtoPoolMetric_Summary.Get().(*Metric_Summary) + } + ov.Summary = NewSummary() + ov.Summary.UnmarshalJSON(iter) + orig.Data = ov + } + + case "metadata": + for iter.ReadArray() { + orig.Metadata = append(orig.Metadata, KeyValue{}) + orig.Metadata[len(orig.Metadata)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *Metric) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.Name) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.Description) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.Unit) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + switch orig := orig.Data.(type) { + case nil: + _ = orig + break + case *Metric_Gauge: + if orig.Gauge != nil { + l = orig.Gauge.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *Metric_Sum: + if orig.Sum != nil { + l = orig.Sum.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *Metric_Histogram: + if orig.Histogram != nil { + l = orig.Histogram.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *Metric_ExponentialHistogram: + if orig.ExponentialHistogram != nil { + l = orig.ExponentialHistogram.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *Metric_Summary: + if orig.Summary != nil { + l = orig.Summary.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + } + for i := range orig.Metadata { + l = orig.Metadata[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Metric) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.Name) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Name) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = len(orig.Description) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Description) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.Unit) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Unit) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + switch orig := orig.Data.(type) { + case *Metric_Gauge: + if orig.Gauge != nil { + l = orig.Gauge.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + } + case *Metric_Sum: + if orig.Sum != nil { + l = orig.Sum.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + } + case *Metric_Histogram: + if orig.Histogram != nil { + l = orig.Histogram.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x4a + } + case *Metric_ExponentialHistogram: + if orig.ExponentialHistogram != nil { + l = orig.ExponentialHistogram.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x52 + } + case *Metric_Summary: + if orig.Summary != nil { + l = orig.Summary.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x5a + } + } + for i := len(orig.Metadata) - 1; i >= 0; i-- { + l = orig.Metadata[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x62 + } + return len(buf) - pos +} + +func (orig *Metric) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Name = string(buf[startPos:pos]) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Description = string(buf[startPos:pos]) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Unit = string(buf[startPos:pos]) + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Gauge", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *Metric_Gauge + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Gauge{} + } else { + ov = ProtoPoolMetric_Gauge.Get().(*Metric_Gauge) + } + ov.Gauge = NewGauge() + err = ov.Gauge.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Data = ov + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *Metric_Sum + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Sum{} + } else { + ov = ProtoPoolMetric_Sum.Get().(*Metric_Sum) + } + ov.Sum = NewSum() + err = ov.Sum.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Data = ov + + case 9: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *Metric_Histogram + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Histogram{} + } else { + ov = ProtoPoolMetric_Histogram.Get().(*Metric_Histogram) + } + ov.Histogram = NewHistogram() + err = ov.Histogram.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Data = ov + + case 10: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ExponentialHistogram", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *Metric_ExponentialHistogram + if !UseProtoPooling.IsEnabled() { + ov = &Metric_ExponentialHistogram{} + } else { + ov = ProtoPoolMetric_ExponentialHistogram.Get().(*Metric_ExponentialHistogram) + } + ov.ExponentialHistogram = NewExponentialHistogram() + err = ov.ExponentialHistogram.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Data = ov + + case 11: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *Metric_Summary + if !UseProtoPooling.IsEnabled() { + ov = &Metric_Summary{} + } else { + ov = ProtoPoolMetric_Summary.Get().(*Metric_Summary) + } + ov.Summary = NewSummary() + err = ov.Summary.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.Data = ov + + case 12: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Metadata = append(orig.Metadata, KeyValue{}) + err = orig.Metadata[len(orig.Metadata)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestMetric() *Metric { + orig := NewMetric() + orig.Name = "test_name" + orig.Description = "test_description" + orig.Unit = "test_unit" + orig.Data = &Metric_Gauge{Gauge: GenTestGauge()} + orig.Metadata = []KeyValue{{}, *GenTestKeyValue()} + return orig +} + +func GenTestMetricPtrSlice() []*Metric { + orig := make([]*Metric, 5) + orig[0] = NewMetric() + orig[1] = GenTestMetric() + orig[2] = NewMetric() + orig[3] = GenTestMetric() + orig[4] = NewMetric() + return orig +} + +func GenTestMetricSlice() []Metric { + orig := make([]Metric, 5) + orig[1] = *GenTestMetric() + orig[3] = *GenTestMetric() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metricsdata.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metricsdata.go new file mode 100644 index 00000000000..aa7900f672a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metricsdata.go @@ -0,0 +1,245 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// MetricsData represents the metrics data that can be stored in a persistent storage, +// OR can be embedded by other protocols that transfer OTLP metrics data but do not +// implement the OTLP protocol.. +type MetricsData struct { + ResourceMetrics []*ResourceMetrics +} + +var ( + protoPoolMetricsData = sync.Pool{ + New: func() any { + return &MetricsData{} + }, + } +) + +func NewMetricsData() *MetricsData { + if !UseProtoPooling.IsEnabled() { + return &MetricsData{} + } + return protoPoolMetricsData.Get().(*MetricsData) +} + +func DeleteMetricsData(orig *MetricsData, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceMetrics { + DeleteResourceMetrics(orig.ResourceMetrics[i], true) + } + orig.Reset() + if nullable { + protoPoolMetricsData.Put(orig) + } +} + +func CopyMetricsData(dest, src *MetricsData) *MetricsData { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewMetricsData() + } + dest.ResourceMetrics = CopyResourceMetricsPtrSlice(dest.ResourceMetrics, src.ResourceMetrics) + + return dest +} + +func CopyMetricsDataSlice(dest, src []MetricsData) []MetricsData { + var newDest []MetricsData + if cap(dest) < len(src) { + newDest = make([]MetricsData, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMetricsData(&dest[i], false) + } + } + for i := range src { + CopyMetricsData(&newDest[i], &src[i]) + } + return newDest +} + +func CopyMetricsDataPtrSlice(dest, src []*MetricsData) []*MetricsData { + var newDest []*MetricsData + if cap(dest) < len(src) { + newDest = make([]*MetricsData, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMetricsData() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMetricsData(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMetricsData() + } + } + for i := range src { + CopyMetricsData(newDest[i], src[i]) + } + return newDest +} + +func (orig *MetricsData) Reset() { + *orig = MetricsData{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *MetricsData) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceMetrics) > 0 { + dest.WriteObjectField("resourceMetrics") + dest.WriteArrayStart() + orig.ResourceMetrics[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceMetrics); i++ { + dest.WriteMore() + orig.ResourceMetrics[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *MetricsData) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceMetrics", "resource_metrics": + for iter.ReadArray() { + orig.ResourceMetrics = append(orig.ResourceMetrics, NewResourceMetrics()) + orig.ResourceMetrics[len(orig.ResourceMetrics)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *MetricsData) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceMetrics { + l = orig.ResourceMetrics[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *MetricsData) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceMetrics) - 1; i >= 0; i-- { + l = orig.ResourceMetrics[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *MetricsData) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceMetrics = append(orig.ResourceMetrics, NewResourceMetrics()) + err = orig.ResourceMetrics[len(orig.ResourceMetrics)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestMetricsData() *MetricsData { + orig := NewMetricsData() + orig.ResourceMetrics = []*ResourceMetrics{{}, GenTestResourceMetrics()} + return orig +} + +func GenTestMetricsDataPtrSlice() []*MetricsData { + orig := make([]*MetricsData, 5) + orig[0] = NewMetricsData() + orig[1] = GenTestMetricsData() + orig[2] = NewMetricsData() + orig[3] = GenTestMetricsData() + orig[4] = NewMetricsData() + return orig +} + +func GenTestMetricsDataSlice() []MetricsData { + orig := make([]MetricsData, 5) + orig[1] = *GenTestMetricsData() + orig[3] = *GenTestMetricsData() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metricsrequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metricsrequest.go new file mode 100644 index 00000000000..c2cca74a1bc --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_metricsrequest.go @@ -0,0 +1,299 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type MetricsRequest struct { + RequestContext *RequestContext + MetricsData MetricsData + FormatVersion uint32 +} + +var ( + protoPoolMetricsRequest = sync.Pool{ + New: func() any { + return &MetricsRequest{} + }, + } +) + +func NewMetricsRequest() *MetricsRequest { + if !UseProtoPooling.IsEnabled() { + return &MetricsRequest{} + } + return protoPoolMetricsRequest.Get().(*MetricsRequest) +} + +func DeleteMetricsRequest(orig *MetricsRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteRequestContext(orig.RequestContext, true) + DeleteMetricsData(&orig.MetricsData, false) + + orig.Reset() + if nullable { + protoPoolMetricsRequest.Put(orig) + } +} + +func CopyMetricsRequest(dest, src *MetricsRequest) *MetricsRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewMetricsRequest() + } + dest.RequestContext = CopyRequestContext(dest.RequestContext, src.RequestContext) + + CopyMetricsData(&dest.MetricsData, &src.MetricsData) + + dest.FormatVersion = src.FormatVersion + + return dest +} + +func CopyMetricsRequestSlice(dest, src []MetricsRequest) []MetricsRequest { + var newDest []MetricsRequest + if cap(dest) < len(src) { + newDest = make([]MetricsRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMetricsRequest(&dest[i], false) + } + } + for i := range src { + CopyMetricsRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyMetricsRequestPtrSlice(dest, src []*MetricsRequest) []*MetricsRequest { + var newDest []*MetricsRequest + if cap(dest) < len(src) { + newDest = make([]*MetricsRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMetricsRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteMetricsRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewMetricsRequest() + } + } + for i := range src { + CopyMetricsRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *MetricsRequest) Reset() { + *orig = MetricsRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *MetricsRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RequestContext != nil { + dest.WriteObjectField("requestContext") + orig.RequestContext.MarshalJSON(dest) + } + dest.WriteObjectField("metricsData") + orig.MetricsData.MarshalJSON(dest) + if orig.FormatVersion != uint32(0) { + dest.WriteObjectField("formatVersion") + dest.WriteUint32(orig.FormatVersion) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *MetricsRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "requestContext", "request_context": + orig.RequestContext = NewRequestContext() + orig.RequestContext.UnmarshalJSON(iter) + case "metricsData", "metrics_data": + + orig.MetricsData.UnmarshalJSON(iter) + case "formatVersion", "format_version": + orig.FormatVersion = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *MetricsRequest) SizeProto() int { + var n int + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.MetricsData.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.FormatVersion != uint32(0) { + n += 5 + } + return n +} + +func (orig *MetricsRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = orig.MetricsData.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + + if orig.FormatVersion != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.FormatVersion)) + pos-- + buf[pos] = 0xd + } + return len(buf) - pos +} + +func (orig *MetricsRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field RequestContext", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + orig.RequestContext = NewRequestContext() + err = orig.RequestContext.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field MetricsData", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.MetricsData.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 1: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field FormatVersion", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.FormatVersion = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestMetricsRequest() *MetricsRequest { + orig := NewMetricsRequest() + orig.RequestContext = GenTestRequestContext() + orig.MetricsData = *GenTestMetricsData() + orig.FormatVersion = uint32(13) + return orig +} + +func GenTestMetricsRequestPtrSlice() []*MetricsRequest { + orig := make([]*MetricsRequest, 5) + orig[0] = NewMetricsRequest() + orig[1] = GenTestMetricsRequest() + orig[2] = NewMetricsRequest() + orig[3] = GenTestMetricsRequest() + orig[4] = NewMetricsRequest() + return orig +} + +func GenTestMetricsRequestSlice() []MetricsRequest { + orig := make([]MetricsRequest, 5) + orig[1] = *GenTestMetricsRequest() + orig[3] = *GenTestMetricsRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_numberdatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_numberdatapoint.go new file mode 100644 index 00000000000..e413d64078e --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_numberdatapoint.go @@ -0,0 +1,558 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +func (m *NumberDataPoint) GetValue() any { + if m != nil { + return m.Value + } + return nil +} + +type NumberDataPoint_AsDouble struct { + AsDouble float64 +} + +func (m *NumberDataPoint) GetAsDouble() float64 { + if v, ok := m.GetValue().(*NumberDataPoint_AsDouble); ok { + return v.AsDouble + } + return float64(0) +} + +type NumberDataPoint_AsInt struct { + AsInt int64 +} + +func (m *NumberDataPoint) GetAsInt() int64 { + if v, ok := m.GetValue().(*NumberDataPoint_AsInt); ok { + return v.AsInt + } + return int64(0) +} + +// NumberDataPoint is a single data point in a timeseries that describes the time-varying value of a number metric. +type NumberDataPoint struct { + Value any + Attributes []KeyValue + Exemplars []Exemplar + StartTimeUnixNano uint64 + TimeUnixNano uint64 + Flags uint32 +} + +var ( + protoPoolNumberDataPoint = sync.Pool{ + New: func() any { + return &NumberDataPoint{} + }, + } + + ProtoPoolNumberDataPoint_AsDouble = sync.Pool{ + New: func() any { + return &NumberDataPoint_AsDouble{} + }, + } + + ProtoPoolNumberDataPoint_AsInt = sync.Pool{ + New: func() any { + return &NumberDataPoint_AsInt{} + }, + } +) + +func NewNumberDataPoint() *NumberDataPoint { + if !UseProtoPooling.IsEnabled() { + return &NumberDataPoint{} + } + return protoPoolNumberDataPoint.Get().(*NumberDataPoint) +} + +func DeleteNumberDataPoint(orig *NumberDataPoint, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + switch ov := orig.Value.(type) { + case *NumberDataPoint_AsDouble: + if UseProtoPooling.IsEnabled() { + ov.AsDouble = float64(0) + ProtoPoolNumberDataPoint_AsDouble.Put(ov) + } + case *NumberDataPoint_AsInt: + if UseProtoPooling.IsEnabled() { + ov.AsInt = int64(0) + ProtoPoolNumberDataPoint_AsInt.Put(ov) + } + } + for i := range orig.Exemplars { + DeleteExemplar(&orig.Exemplars[i], false) + } + + orig.Reset() + if nullable { + protoPoolNumberDataPoint.Put(orig) + } +} + +func CopyNumberDataPoint(dest, src *NumberDataPoint) *NumberDataPoint { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewNumberDataPoint() + } + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.StartTimeUnixNano = src.StartTimeUnixNano + dest.TimeUnixNano = src.TimeUnixNano + switch t := src.Value.(type) { + case *NumberDataPoint_AsDouble: + var ov *NumberDataPoint_AsDouble + if !UseProtoPooling.IsEnabled() { + ov = &NumberDataPoint_AsDouble{} + } else { + ov = ProtoPoolNumberDataPoint_AsDouble.Get().(*NumberDataPoint_AsDouble) + } + ov.AsDouble = t.AsDouble + dest.Value = ov + + case *NumberDataPoint_AsInt: + var ov *NumberDataPoint_AsInt + if !UseProtoPooling.IsEnabled() { + ov = &NumberDataPoint_AsInt{} + } else { + ov = ProtoPoolNumberDataPoint_AsInt.Get().(*NumberDataPoint_AsInt) + } + ov.AsInt = t.AsInt + dest.Value = ov + + default: + dest.Value = nil + } + dest.Exemplars = CopyExemplarSlice(dest.Exemplars, src.Exemplars) + + dest.Flags = src.Flags + + return dest +} + +func CopyNumberDataPointSlice(dest, src []NumberDataPoint) []NumberDataPoint { + var newDest []NumberDataPoint + if cap(dest) < len(src) { + newDest = make([]NumberDataPoint, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteNumberDataPoint(&dest[i], false) + } + } + for i := range src { + CopyNumberDataPoint(&newDest[i], &src[i]) + } + return newDest +} + +func CopyNumberDataPointPtrSlice(dest, src []*NumberDataPoint) []*NumberDataPoint { + var newDest []*NumberDataPoint + if cap(dest) < len(src) { + newDest = make([]*NumberDataPoint, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewNumberDataPoint() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteNumberDataPoint(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewNumberDataPoint() + } + } + for i := range src { + CopyNumberDataPoint(newDest[i], src[i]) + } + return newDest +} + +func (orig *NumberDataPoint) Reset() { + *orig = NumberDataPoint{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *NumberDataPoint) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.StartTimeUnixNano != uint64(0) { + dest.WriteObjectField("startTimeUnixNano") + dest.WriteUint64(orig.StartTimeUnixNano) + } + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + switch orig := orig.Value.(type) { + case *NumberDataPoint_AsDouble: + dest.WriteObjectField("asDouble") + dest.WriteFloat64(orig.AsDouble) + case *NumberDataPoint_AsInt: + dest.WriteObjectField("asInt") + dest.WriteInt64(orig.AsInt) + } + if len(orig.Exemplars) > 0 { + dest.WriteObjectField("exemplars") + dest.WriteArrayStart() + orig.Exemplars[0].MarshalJSON(dest) + for i := 1; i < len(orig.Exemplars); i++ { + dest.WriteMore() + orig.Exemplars[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *NumberDataPoint) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "startTimeUnixNano", "start_time_unix_nano": + orig.StartTimeUnixNano = iter.ReadUint64() + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + + case "asDouble", "as_double": + { + var ov *NumberDataPoint_AsDouble + if !UseProtoPooling.IsEnabled() { + ov = &NumberDataPoint_AsDouble{} + } else { + ov = ProtoPoolNumberDataPoint_AsDouble.Get().(*NumberDataPoint_AsDouble) + } + ov.AsDouble = iter.ReadFloat64() + orig.Value = ov + } + case "asInt", "as_int": + { + var ov *NumberDataPoint_AsInt + if !UseProtoPooling.IsEnabled() { + ov = &NumberDataPoint_AsInt{} + } else { + ov = ProtoPoolNumberDataPoint_AsInt.Get().(*NumberDataPoint_AsInt) + } + ov.AsInt = iter.ReadInt64() + orig.Value = ov + } + + case "exemplars": + for iter.ReadArray() { + orig.Exemplars = append(orig.Exemplars, Exemplar{}) + orig.Exemplars[len(orig.Exemplars)-1].UnmarshalJSON(iter) + } + + case "flags": + orig.Flags = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *NumberDataPoint) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.StartTimeUnixNano != uint64(0) { + n += 9 + } + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + switch orig := orig.Value.(type) { + case nil: + _ = orig + break + case *NumberDataPoint_AsDouble: + + n += 9 + case *NumberDataPoint_AsInt: + + n += 9 + } + for i := range orig.Exemplars { + l = orig.Exemplars[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Flags != uint32(0) { + n += 1 + proto.Sov(uint64(orig.Flags)) + } + return n +} + +func (orig *NumberDataPoint) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + } + if orig.StartTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.StartTimeUnixNano)) + pos-- + buf[pos] = 0x11 + } + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x19 + } + switch orig := orig.Value.(type) { + case *NumberDataPoint_AsDouble: + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.AsDouble)) + pos-- + buf[pos] = 0x21 + + case *NumberDataPoint_AsInt: + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.AsInt)) + pos-- + buf[pos] = 0x31 + + } + for i := len(orig.Exemplars) - 1; i >= 0; i-- { + l = orig.Exemplars[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + } + if orig.Flags != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Flags)) + pos-- + buf[pos] = 0x40 + } + return len(buf) - pos +} + +func (orig *NumberDataPoint) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.StartTimeUnixNano = uint64(num) + + case 3: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 4: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field AsDouble", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + var ov *NumberDataPoint_AsDouble + if !UseProtoPooling.IsEnabled() { + ov = &NumberDataPoint_AsDouble{} + } else { + ov = ProtoPoolNumberDataPoint_AsDouble.Get().(*NumberDataPoint_AsDouble) + } + ov.AsDouble = math.Float64frombits(num) + orig.Value = ov + + case 6: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field AsInt", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + var ov *NumberDataPoint_AsInt + if !UseProtoPooling.IsEnabled() { + ov = &NumberDataPoint_AsInt{} + } else { + ov = ProtoPoolNumberDataPoint_AsInt.Get().(*NumberDataPoint_AsInt) + } + ov.AsInt = int64(num) + orig.Value = ov + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Exemplars = append(orig.Exemplars, Exemplar{}) + err = orig.Exemplars[len(orig.Exemplars)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 8: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Flags = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestNumberDataPoint() *NumberDataPoint { + orig := NewNumberDataPoint() + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.StartTimeUnixNano = uint64(13) + orig.TimeUnixNano = uint64(13) + orig.Value = &NumberDataPoint_AsDouble{AsDouble: float64(3.1415926)} + orig.Exemplars = []Exemplar{{}, *GenTestExemplar()} + orig.Flags = uint32(13) + return orig +} + +func GenTestNumberDataPointPtrSlice() []*NumberDataPoint { + orig := make([]*NumberDataPoint, 5) + orig[0] = NewNumberDataPoint() + orig[1] = GenTestNumberDataPoint() + orig[2] = NewNumberDataPoint() + orig[3] = GenTestNumberDataPoint() + orig[4] = NewNumberDataPoint() + return orig +} + +func GenTestNumberDataPointSlice() []NumberDataPoint { + orig := make([]NumberDataPoint, 5) + orig[1] = *GenTestNumberDataPoint() + orig[3] = *GenTestNumberDataPoint() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profile.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profile.go new file mode 100644 index 00000000000..02167667df3 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profile.go @@ -0,0 +1,606 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Profile are an implementation of the pprofextended data model. + +type Profile struct { + OriginalPayloadFormat string + Samples []*Sample + OriginalPayload []byte + AttributeIndices []int32 + TimeUnixNano uint64 + DurationNano uint64 + Period int64 + SampleType ValueType + PeriodType ValueType + DroppedAttributesCount uint32 + ProfileId ProfileID +} + +var ( + protoPoolProfile = sync.Pool{ + New: func() any { + return &Profile{} + }, + } +) + +func NewProfile() *Profile { + if !UseProtoPooling.IsEnabled() { + return &Profile{} + } + return protoPoolProfile.Get().(*Profile) +} + +func DeleteProfile(orig *Profile, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteValueType(&orig.SampleType, false) + for i := range orig.Samples { + DeleteSample(orig.Samples[i], true) + } + + DeleteValueType(&orig.PeriodType, false) + + DeleteProfileID(&orig.ProfileId, false) + + orig.Reset() + if nullable { + protoPoolProfile.Put(orig) + } +} + +func CopyProfile(dest, src *Profile) *Profile { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewProfile() + } + CopyValueType(&dest.SampleType, &src.SampleType) + + dest.Samples = CopySamplePtrSlice(dest.Samples, src.Samples) + + dest.TimeUnixNano = src.TimeUnixNano + dest.DurationNano = src.DurationNano + CopyValueType(&dest.PeriodType, &src.PeriodType) + + dest.Period = src.Period + CopyProfileID(&dest.ProfileId, &src.ProfileId) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + dest.OriginalPayloadFormat = src.OriginalPayloadFormat + dest.OriginalPayload = src.OriginalPayload + dest.AttributeIndices = append(dest.AttributeIndices[:0], src.AttributeIndices...) + + return dest +} + +func CopyProfileSlice(dest, src []Profile) []Profile { + var newDest []Profile + if cap(dest) < len(src) { + newDest = make([]Profile, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfile(&dest[i], false) + } + } + for i := range src { + CopyProfile(&newDest[i], &src[i]) + } + return newDest +} + +func CopyProfilePtrSlice(dest, src []*Profile) []*Profile { + var newDest []*Profile + if cap(dest) < len(src) { + newDest = make([]*Profile, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfile() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfile(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfile() + } + } + for i := range src { + CopyProfile(newDest[i], src[i]) + } + return newDest +} + +func (orig *Profile) Reset() { + *orig = Profile{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Profile) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("sampleType") + orig.SampleType.MarshalJSON(dest) + if len(orig.Samples) > 0 { + dest.WriteObjectField("samples") + dest.WriteArrayStart() + orig.Samples[0].MarshalJSON(dest) + for i := 1; i < len(orig.Samples); i++ { + dest.WriteMore() + orig.Samples[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + if orig.DurationNano != uint64(0) { + dest.WriteObjectField("durationNano") + dest.WriteUint64(orig.DurationNano) + } + dest.WriteObjectField("periodType") + orig.PeriodType.MarshalJSON(dest) + if orig.Period != int64(0) { + dest.WriteObjectField("period") + dest.WriteInt64(orig.Period) + } + if !orig.ProfileId.IsEmpty() { + dest.WriteObjectField("profileId") + orig.ProfileId.MarshalJSON(dest) + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + if orig.OriginalPayloadFormat != "" { + dest.WriteObjectField("originalPayloadFormat") + dest.WriteString(orig.OriginalPayloadFormat) + } + + if len(orig.OriginalPayload) > 0 { + dest.WriteObjectField("originalPayload") + dest.WriteBytes(orig.OriginalPayload) + } + if len(orig.AttributeIndices) > 0 { + dest.WriteObjectField("attributeIndices") + dest.WriteArrayStart() + dest.WriteInt32(orig.AttributeIndices[0]) + for i := 1; i < len(orig.AttributeIndices); i++ { + dest.WriteMore() + dest.WriteInt32(orig.AttributeIndices[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Profile) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "sampleType", "sample_type": + + orig.SampleType.UnmarshalJSON(iter) + case "samples": + for iter.ReadArray() { + orig.Samples = append(orig.Samples, NewSample()) + orig.Samples[len(orig.Samples)-1].UnmarshalJSON(iter) + } + + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + case "durationNano", "duration_nano": + orig.DurationNano = iter.ReadUint64() + case "periodType", "period_type": + + orig.PeriodType.UnmarshalJSON(iter) + case "period": + orig.Period = iter.ReadInt64() + case "profileId", "profile_id": + + orig.ProfileId.UnmarshalJSON(iter) + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + case "originalPayloadFormat", "original_payload_format": + orig.OriginalPayloadFormat = iter.ReadString() + case "originalPayload", "original_payload": + orig.OriginalPayload = iter.ReadBytes() + case "attributeIndices", "attribute_indices": + for iter.ReadArray() { + orig.AttributeIndices = append(orig.AttributeIndices, iter.ReadInt32()) + } + + default: + iter.Skip() + } + } +} + +func (orig *Profile) SizeProto() int { + var n int + var l int + _ = l + l = orig.SampleType.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.Samples { + l = orig.Samples[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + if orig.DurationNano != uint64(0) { + n += 1 + proto.Sov(uint64(orig.DurationNano)) + } + l = orig.PeriodType.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.Period != int64(0) { + n += 1 + proto.Sov(uint64(orig.Period)) + } + l = orig.ProfileId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + + l = len(orig.OriginalPayloadFormat) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.OriginalPayload) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + if len(orig.AttributeIndices) > 0 { + l = 0 + for _, e := range orig.AttributeIndices { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Profile) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.SampleType.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.Samples) - 1; i >= 0; i-- { + l = orig.Samples[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x19 + } + if orig.DurationNano != uint64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DurationNano)) + pos-- + buf[pos] = 0x20 + } + l = orig.PeriodType.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + + if orig.Period != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Period)) + pos-- + buf[pos] = 0x30 + } + l = orig.ProfileId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x40 + } + l = len(orig.OriginalPayloadFormat) + if l > 0 { + pos -= l + copy(buf[pos:], orig.OriginalPayloadFormat) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x4a + } + l = len(orig.OriginalPayload) + if l > 0 { + pos -= l + copy(buf[pos:], orig.OriginalPayload) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x52 + } + l = len(orig.AttributeIndices) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AttributeIndices[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0x5a + } + return len(buf) - pos +} + +func (orig *Profile) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SampleType.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Samples = append(orig.Samples, NewSample()) + err = orig.Samples[len(orig.Samples)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 4: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DurationNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DurationNano = uint64(num) + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.PeriodType.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 6: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Period = int64(num) + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.ProfileId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 8: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + + case 9: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.OriginalPayloadFormat = string(buf[startPos:pos]) + + case 10: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + if length != 0 { + orig.OriginalPayload = make([]byte, length) + copy(orig.OriginalPayload, buf[startPos:pos]) + } + case 11: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field AttributeIndices", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestProfile() *Profile { + orig := NewProfile() + orig.SampleType = *GenTestValueType() + orig.Samples = []*Sample{{}, GenTestSample()} + orig.TimeUnixNano = uint64(13) + orig.DurationNano = uint64(13) + orig.PeriodType = *GenTestValueType() + orig.Period = int64(13) + orig.ProfileId = *GenTestProfileID() + orig.DroppedAttributesCount = uint32(13) + orig.OriginalPayloadFormat = "test_originalpayloadformat" + orig.OriginalPayload = []byte{1, 2, 3} + orig.AttributeIndices = []int32{int32(0), int32(13)} + return orig +} + +func GenTestProfilePtrSlice() []*Profile { + orig := make([]*Profile, 5) + orig[0] = NewProfile() + orig[1] = GenTestProfile() + orig[2] = NewProfile() + orig[3] = GenTestProfile() + orig[4] = NewProfile() + return orig +} + +func GenTestProfileSlice() []Profile { + orig := make([]Profile, 5) + orig[1] = *GenTestProfile() + orig[3] = *GenTestProfile() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesdata.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesdata.go new file mode 100644 index 00000000000..45a876f6deb --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesdata.go @@ -0,0 +1,279 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ProfilesData represents the profiles data that can be stored in persistent storage, +// OR can be embedded by other protocols that transfer OTLP profiles data but do not +// implement the OTLP protocol. +type ProfilesData struct { + ResourceProfiles []*ResourceProfiles + Dictionary ProfilesDictionary +} + +var ( + protoPoolProfilesData = sync.Pool{ + New: func() any { + return &ProfilesData{} + }, + } +) + +func NewProfilesData() *ProfilesData { + if !UseProtoPooling.IsEnabled() { + return &ProfilesData{} + } + return protoPoolProfilesData.Get().(*ProfilesData) +} + +func DeleteProfilesData(orig *ProfilesData, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceProfiles { + DeleteResourceProfiles(orig.ResourceProfiles[i], true) + } + DeleteProfilesDictionary(&orig.Dictionary, false) + orig.Reset() + if nullable { + protoPoolProfilesData.Put(orig) + } +} + +func CopyProfilesData(dest, src *ProfilesData) *ProfilesData { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewProfilesData() + } + dest.ResourceProfiles = CopyResourceProfilesPtrSlice(dest.ResourceProfiles, src.ResourceProfiles) + + CopyProfilesDictionary(&dest.Dictionary, &src.Dictionary) + + return dest +} + +func CopyProfilesDataSlice(dest, src []ProfilesData) []ProfilesData { + var newDest []ProfilesData + if cap(dest) < len(src) { + newDest = make([]ProfilesData, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfilesData(&dest[i], false) + } + } + for i := range src { + CopyProfilesData(&newDest[i], &src[i]) + } + return newDest +} + +func CopyProfilesDataPtrSlice(dest, src []*ProfilesData) []*ProfilesData { + var newDest []*ProfilesData + if cap(dest) < len(src) { + newDest = make([]*ProfilesData, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfilesData() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfilesData(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfilesData() + } + } + for i := range src { + CopyProfilesData(newDest[i], src[i]) + } + return newDest +} + +func (orig *ProfilesData) Reset() { + *orig = ProfilesData{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ProfilesData) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceProfiles) > 0 { + dest.WriteObjectField("resourceProfiles") + dest.WriteArrayStart() + orig.ResourceProfiles[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceProfiles); i++ { + dest.WriteMore() + orig.ResourceProfiles[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectField("dictionary") + orig.Dictionary.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ProfilesData) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceProfiles", "resource_profiles": + for iter.ReadArray() { + orig.ResourceProfiles = append(orig.ResourceProfiles, NewResourceProfiles()) + orig.ResourceProfiles[len(orig.ResourceProfiles)-1].UnmarshalJSON(iter) + } + + case "dictionary": + + orig.Dictionary.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *ProfilesData) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceProfiles { + l = orig.ResourceProfiles[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.Dictionary.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *ProfilesData) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceProfiles) - 1; i >= 0; i-- { + l = orig.ResourceProfiles[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = orig.Dictionary.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + return len(buf) - pos +} + +func (orig *ProfilesData) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceProfiles = append(orig.ResourceProfiles, NewResourceProfiles()) + err = orig.ResourceProfiles[len(orig.ResourceProfiles)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Dictionary", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Dictionary.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestProfilesData() *ProfilesData { + orig := NewProfilesData() + orig.ResourceProfiles = []*ResourceProfiles{{}, GenTestResourceProfiles()} + orig.Dictionary = *GenTestProfilesDictionary() + return orig +} + +func GenTestProfilesDataPtrSlice() []*ProfilesData { + orig := make([]*ProfilesData, 5) + orig[0] = NewProfilesData() + orig[1] = GenTestProfilesData() + orig[2] = NewProfilesData() + orig[3] = GenTestProfilesData() + orig[4] = NewProfilesData() + return orig +} + +func GenTestProfilesDataSlice() []ProfilesData { + orig := make([]ProfilesData, 5) + orig[1] = *GenTestProfilesData() + orig[3] = *GenTestProfilesData() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesdictionary.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesdictionary.go new file mode 100644 index 00000000000..8b8bef11c57 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesdictionary.go @@ -0,0 +1,538 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ProfilesDictionary is the reference table containing all data shared by profiles across the message being sent. +type ProfilesDictionary struct { + MappingTable []*Mapping + LocationTable []*Location + FunctionTable []*Function + LinkTable []*Link + StringTable []string + AttributeTable []*KeyValueAndUnit + StackTable []*Stack +} + +var ( + protoPoolProfilesDictionary = sync.Pool{ + New: func() any { + return &ProfilesDictionary{} + }, + } +) + +func NewProfilesDictionary() *ProfilesDictionary { + if !UseProtoPooling.IsEnabled() { + return &ProfilesDictionary{} + } + return protoPoolProfilesDictionary.Get().(*ProfilesDictionary) +} + +func DeleteProfilesDictionary(orig *ProfilesDictionary, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.MappingTable { + DeleteMapping(orig.MappingTable[i], true) + } + for i := range orig.LocationTable { + DeleteLocation(orig.LocationTable[i], true) + } + for i := range orig.FunctionTable { + DeleteFunction(orig.FunctionTable[i], true) + } + for i := range orig.LinkTable { + DeleteLink(orig.LinkTable[i], true) + } + + for i := range orig.AttributeTable { + DeleteKeyValueAndUnit(orig.AttributeTable[i], true) + } + for i := range orig.StackTable { + DeleteStack(orig.StackTable[i], true) + } + orig.Reset() + if nullable { + protoPoolProfilesDictionary.Put(orig) + } +} + +func CopyProfilesDictionary(dest, src *ProfilesDictionary) *ProfilesDictionary { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewProfilesDictionary() + } + dest.MappingTable = CopyMappingPtrSlice(dest.MappingTable, src.MappingTable) + + dest.LocationTable = CopyLocationPtrSlice(dest.LocationTable, src.LocationTable) + + dest.FunctionTable = CopyFunctionPtrSlice(dest.FunctionTable, src.FunctionTable) + + dest.LinkTable = CopyLinkPtrSlice(dest.LinkTable, src.LinkTable) + + dest.StringTable = append(dest.StringTable[:0], src.StringTable...) + + dest.AttributeTable = CopyKeyValueAndUnitPtrSlice(dest.AttributeTable, src.AttributeTable) + + dest.StackTable = CopyStackPtrSlice(dest.StackTable, src.StackTable) + + return dest +} + +func CopyProfilesDictionarySlice(dest, src []ProfilesDictionary) []ProfilesDictionary { + var newDest []ProfilesDictionary + if cap(dest) < len(src) { + newDest = make([]ProfilesDictionary, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfilesDictionary(&dest[i], false) + } + } + for i := range src { + CopyProfilesDictionary(&newDest[i], &src[i]) + } + return newDest +} + +func CopyProfilesDictionaryPtrSlice(dest, src []*ProfilesDictionary) []*ProfilesDictionary { + var newDest []*ProfilesDictionary + if cap(dest) < len(src) { + newDest = make([]*ProfilesDictionary, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfilesDictionary() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfilesDictionary(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfilesDictionary() + } + } + for i := range src { + CopyProfilesDictionary(newDest[i], src[i]) + } + return newDest +} + +func (orig *ProfilesDictionary) Reset() { + *orig = ProfilesDictionary{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ProfilesDictionary) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.MappingTable) > 0 { + dest.WriteObjectField("mappingTable") + dest.WriteArrayStart() + orig.MappingTable[0].MarshalJSON(dest) + for i := 1; i < len(orig.MappingTable); i++ { + dest.WriteMore() + orig.MappingTable[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if len(orig.LocationTable) > 0 { + dest.WriteObjectField("locationTable") + dest.WriteArrayStart() + orig.LocationTable[0].MarshalJSON(dest) + for i := 1; i < len(orig.LocationTable); i++ { + dest.WriteMore() + orig.LocationTable[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if len(orig.FunctionTable) > 0 { + dest.WriteObjectField("functionTable") + dest.WriteArrayStart() + orig.FunctionTable[0].MarshalJSON(dest) + for i := 1; i < len(orig.FunctionTable); i++ { + dest.WriteMore() + orig.FunctionTable[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if len(orig.LinkTable) > 0 { + dest.WriteObjectField("linkTable") + dest.WriteArrayStart() + orig.LinkTable[0].MarshalJSON(dest) + for i := 1; i < len(orig.LinkTable); i++ { + dest.WriteMore() + orig.LinkTable[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if len(orig.StringTable) > 0 { + dest.WriteObjectField("stringTable") + dest.WriteArrayStart() + dest.WriteString(orig.StringTable[0]) + for i := 1; i < len(orig.StringTable); i++ { + dest.WriteMore() + dest.WriteString(orig.StringTable[i]) + } + dest.WriteArrayEnd() + } + + if len(orig.AttributeTable) > 0 { + dest.WriteObjectField("attributeTable") + dest.WriteArrayStart() + orig.AttributeTable[0].MarshalJSON(dest) + for i := 1; i < len(orig.AttributeTable); i++ { + dest.WriteMore() + orig.AttributeTable[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if len(orig.StackTable) > 0 { + dest.WriteObjectField("stackTable") + dest.WriteArrayStart() + orig.StackTable[0].MarshalJSON(dest) + for i := 1; i < len(orig.StackTable); i++ { + dest.WriteMore() + orig.StackTable[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ProfilesDictionary) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "mappingTable", "mapping_table": + for iter.ReadArray() { + orig.MappingTable = append(orig.MappingTable, NewMapping()) + orig.MappingTable[len(orig.MappingTable)-1].UnmarshalJSON(iter) + } + + case "locationTable", "location_table": + for iter.ReadArray() { + orig.LocationTable = append(orig.LocationTable, NewLocation()) + orig.LocationTable[len(orig.LocationTable)-1].UnmarshalJSON(iter) + } + + case "functionTable", "function_table": + for iter.ReadArray() { + orig.FunctionTable = append(orig.FunctionTable, NewFunction()) + orig.FunctionTable[len(orig.FunctionTable)-1].UnmarshalJSON(iter) + } + + case "linkTable", "link_table": + for iter.ReadArray() { + orig.LinkTable = append(orig.LinkTable, NewLink()) + orig.LinkTable[len(orig.LinkTable)-1].UnmarshalJSON(iter) + } + + case "stringTable", "string_table": + for iter.ReadArray() { + orig.StringTable = append(orig.StringTable, iter.ReadString()) + } + + case "attributeTable", "attribute_table": + for iter.ReadArray() { + orig.AttributeTable = append(orig.AttributeTable, NewKeyValueAndUnit()) + orig.AttributeTable[len(orig.AttributeTable)-1].UnmarshalJSON(iter) + } + + case "stackTable", "stack_table": + for iter.ReadArray() { + orig.StackTable = append(orig.StackTable, NewStack()) + orig.StackTable[len(orig.StackTable)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ProfilesDictionary) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.MappingTable { + l = orig.MappingTable[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.LocationTable { + l = orig.LocationTable[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.FunctionTable { + l = orig.FunctionTable[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.LinkTable { + l = orig.LinkTable[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + for _, s := range orig.StringTable { + l = len(s) + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.AttributeTable { + l = orig.AttributeTable[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.StackTable { + l = orig.StackTable[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ProfilesDictionary) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.MappingTable) - 1; i >= 0; i-- { + l = orig.MappingTable[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + for i := len(orig.LocationTable) - 1; i >= 0; i-- { + l = orig.LocationTable[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + for i := len(orig.FunctionTable) - 1; i >= 0; i-- { + l = orig.FunctionTable[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + for i := len(orig.LinkTable) - 1; i >= 0; i-- { + l = orig.LinkTable[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + } + for i := len(orig.StringTable) - 1; i >= 0; i-- { + l = len(orig.StringTable[i]) + pos -= l + copy(buf[pos:], orig.StringTable[i]) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + } + for i := len(orig.AttributeTable) - 1; i >= 0; i-- { + l = orig.AttributeTable[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x32 + } + for i := len(orig.StackTable) - 1; i >= 0; i-- { + l = orig.StackTable[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + } + return len(buf) - pos +} + +func (orig *ProfilesDictionary) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field MappingTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.MappingTable = append(orig.MappingTable, NewMapping()) + err = orig.MappingTable[len(orig.MappingTable)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field LocationTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.LocationTable = append(orig.LocationTable, NewLocation()) + err = orig.LocationTable[len(orig.LocationTable)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field FunctionTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.FunctionTable = append(orig.FunctionTable, NewFunction()) + err = orig.FunctionTable[len(orig.FunctionTable)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.LinkTable = append(orig.LinkTable, NewLink()) + err = orig.LinkTable[len(orig.LinkTable)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.StringTable = append(orig.StringTable, string(buf[startPos:pos])) + + case 6: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.AttributeTable = append(orig.AttributeTable, NewKeyValueAndUnit()) + err = orig.AttributeTable[len(orig.AttributeTable)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field StackTable", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.StackTable = append(orig.StackTable, NewStack()) + err = orig.StackTable[len(orig.StackTable)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestProfilesDictionary() *ProfilesDictionary { + orig := NewProfilesDictionary() + orig.MappingTable = []*Mapping{{}, GenTestMapping()} + orig.LocationTable = []*Location{{}, GenTestLocation()} + orig.FunctionTable = []*Function{{}, GenTestFunction()} + orig.LinkTable = []*Link{{}, GenTestLink()} + orig.StringTable = []string{"", "test_stringtable"} + orig.AttributeTable = []*KeyValueAndUnit{{}, GenTestKeyValueAndUnit()} + orig.StackTable = []*Stack{{}, GenTestStack()} + return orig +} + +func GenTestProfilesDictionaryPtrSlice() []*ProfilesDictionary { + orig := make([]*ProfilesDictionary, 5) + orig[0] = NewProfilesDictionary() + orig[1] = GenTestProfilesDictionary() + orig[2] = NewProfilesDictionary() + orig[3] = GenTestProfilesDictionary() + orig[4] = NewProfilesDictionary() + return orig +} + +func GenTestProfilesDictionarySlice() []ProfilesDictionary { + orig := make([]ProfilesDictionary, 5) + orig[1] = *GenTestProfilesDictionary() + orig[3] = *GenTestProfilesDictionary() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesrequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesrequest.go new file mode 100644 index 00000000000..b8956807f7d --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_profilesrequest.go @@ -0,0 +1,299 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type ProfilesRequest struct { + RequestContext *RequestContext + ProfilesData ProfilesData + FormatVersion uint32 +} + +var ( + protoPoolProfilesRequest = sync.Pool{ + New: func() any { + return &ProfilesRequest{} + }, + } +) + +func NewProfilesRequest() *ProfilesRequest { + if !UseProtoPooling.IsEnabled() { + return &ProfilesRequest{} + } + return protoPoolProfilesRequest.Get().(*ProfilesRequest) +} + +func DeleteProfilesRequest(orig *ProfilesRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteRequestContext(orig.RequestContext, true) + DeleteProfilesData(&orig.ProfilesData, false) + + orig.Reset() + if nullable { + protoPoolProfilesRequest.Put(orig) + } +} + +func CopyProfilesRequest(dest, src *ProfilesRequest) *ProfilesRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewProfilesRequest() + } + dest.RequestContext = CopyRequestContext(dest.RequestContext, src.RequestContext) + + CopyProfilesData(&dest.ProfilesData, &src.ProfilesData) + + dest.FormatVersion = src.FormatVersion + + return dest +} + +func CopyProfilesRequestSlice(dest, src []ProfilesRequest) []ProfilesRequest { + var newDest []ProfilesRequest + if cap(dest) < len(src) { + newDest = make([]ProfilesRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfilesRequest(&dest[i], false) + } + } + for i := range src { + CopyProfilesRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyProfilesRequestPtrSlice(dest, src []*ProfilesRequest) []*ProfilesRequest { + var newDest []*ProfilesRequest + if cap(dest) < len(src) { + newDest = make([]*ProfilesRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfilesRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteProfilesRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewProfilesRequest() + } + } + for i := range src { + CopyProfilesRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *ProfilesRequest) Reset() { + *orig = ProfilesRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ProfilesRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RequestContext != nil { + dest.WriteObjectField("requestContext") + orig.RequestContext.MarshalJSON(dest) + } + dest.WriteObjectField("profilesData") + orig.ProfilesData.MarshalJSON(dest) + if orig.FormatVersion != uint32(0) { + dest.WriteObjectField("formatVersion") + dest.WriteUint32(orig.FormatVersion) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ProfilesRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "requestContext", "request_context": + orig.RequestContext = NewRequestContext() + orig.RequestContext.UnmarshalJSON(iter) + case "profilesData", "profiles_data": + + orig.ProfilesData.UnmarshalJSON(iter) + case "formatVersion", "format_version": + orig.FormatVersion = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *ProfilesRequest) SizeProto() int { + var n int + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.ProfilesData.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.FormatVersion != uint32(0) { + n += 5 + } + return n +} + +func (orig *ProfilesRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = orig.ProfilesData.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + + if orig.FormatVersion != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.FormatVersion)) + pos-- + buf[pos] = 0xd + } + return len(buf) - pos +} + +func (orig *ProfilesRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field RequestContext", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + orig.RequestContext = NewRequestContext() + err = orig.RequestContext.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ProfilesData", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.ProfilesData.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 1: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field FormatVersion", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.FormatVersion = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestProfilesRequest() *ProfilesRequest { + orig := NewProfilesRequest() + orig.RequestContext = GenTestRequestContext() + orig.ProfilesData = *GenTestProfilesData() + orig.FormatVersion = uint32(13) + return orig +} + +func GenTestProfilesRequestPtrSlice() []*ProfilesRequest { + orig := make([]*ProfilesRequest, 5) + orig[0] = NewProfilesRequest() + orig[1] = GenTestProfilesRequest() + orig[2] = NewProfilesRequest() + orig[3] = GenTestProfilesRequest() + orig[4] = NewProfilesRequest() + return orig +} + +func GenTestProfilesRequestSlice() []ProfilesRequest { + orig := make([]ProfilesRequest, 5) + orig[1] = *GenTestProfilesRequest() + orig[3] = *GenTestProfilesRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_requestcontext.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_requestcontext.go new file mode 100644 index 00000000000..eab9a270bd1 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_requestcontext.go @@ -0,0 +1,649 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +func (m *RequestContext) GetClientAddress() any { + if m != nil { + return m.ClientAddress + } + return nil +} + +type RequestContext_IP struct { + IP *IPAddr +} + +func (m *RequestContext) GetIP() *IPAddr { + if v, ok := m.GetClientAddress().(*RequestContext_IP); ok { + return v.IP + } + return nil +} + +type RequestContext_TCP struct { + TCP *TCPAddr +} + +func (m *RequestContext) GetTCP() *TCPAddr { + if v, ok := m.GetClientAddress().(*RequestContext_TCP); ok { + return v.TCP + } + return nil +} + +type RequestContext_UDP struct { + UDP *UDPAddr +} + +func (m *RequestContext) GetUDP() *UDPAddr { + if v, ok := m.GetClientAddress().(*RequestContext_UDP); ok { + return v.UDP + } + return nil +} + +type RequestContext_Unix struct { + Unix *UnixAddr +} + +func (m *RequestContext) GetUnix() *UnixAddr { + if v, ok := m.GetClientAddress().(*RequestContext_Unix); ok { + return v.Unix + } + return nil +} + +type RequestContext struct { + ClientAddress any + SpanContext *SpanContext + ClientMetadata []KeyValue +} + +var ( + protoPoolRequestContext = sync.Pool{ + New: func() any { + return &RequestContext{} + }, + } + + ProtoPoolRequestContext_IP = sync.Pool{ + New: func() any { + return &RequestContext_IP{} + }, + } + + ProtoPoolRequestContext_TCP = sync.Pool{ + New: func() any { + return &RequestContext_TCP{} + }, + } + + ProtoPoolRequestContext_UDP = sync.Pool{ + New: func() any { + return &RequestContext_UDP{} + }, + } + + ProtoPoolRequestContext_Unix = sync.Pool{ + New: func() any { + return &RequestContext_Unix{} + }, + } +) + +func NewRequestContext() *RequestContext { + if !UseProtoPooling.IsEnabled() { + return &RequestContext{} + } + return protoPoolRequestContext.Get().(*RequestContext) +} + +func DeleteRequestContext(orig *RequestContext, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteSpanContext(orig.SpanContext, true) + for i := range orig.ClientMetadata { + DeleteKeyValue(&orig.ClientMetadata[i], false) + } + switch ov := orig.ClientAddress.(type) { + case *RequestContext_IP: + DeleteIPAddr(ov.IP, true) + ov.IP = nil + ProtoPoolRequestContext_IP.Put(ov) + case *RequestContext_TCP: + DeleteTCPAddr(ov.TCP, true) + ov.TCP = nil + ProtoPoolRequestContext_TCP.Put(ov) + case *RequestContext_UDP: + DeleteUDPAddr(ov.UDP, true) + ov.UDP = nil + ProtoPoolRequestContext_UDP.Put(ov) + case *RequestContext_Unix: + DeleteUnixAddr(ov.Unix, true) + ov.Unix = nil + ProtoPoolRequestContext_Unix.Put(ov) + } + orig.Reset() + if nullable { + protoPoolRequestContext.Put(orig) + } +} + +func CopyRequestContext(dest, src *RequestContext) *RequestContext { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewRequestContext() + } + dest.SpanContext = CopySpanContext(dest.SpanContext, src.SpanContext) + + dest.ClientMetadata = CopyKeyValueSlice(dest.ClientMetadata, src.ClientMetadata) + + switch t := src.ClientAddress.(type) { + case *RequestContext_IP: + var ov *RequestContext_IP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_IP{} + } else { + ov = ProtoPoolRequestContext_IP.Get().(*RequestContext_IP) + } + ov.IP = NewIPAddr() + CopyIPAddr(ov.IP, t.IP) + dest.ClientAddress = ov + + case *RequestContext_TCP: + var ov *RequestContext_TCP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_TCP{} + } else { + ov = ProtoPoolRequestContext_TCP.Get().(*RequestContext_TCP) + } + ov.TCP = NewTCPAddr() + CopyTCPAddr(ov.TCP, t.TCP) + dest.ClientAddress = ov + + case *RequestContext_UDP: + var ov *RequestContext_UDP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_UDP{} + } else { + ov = ProtoPoolRequestContext_UDP.Get().(*RequestContext_UDP) + } + ov.UDP = NewUDPAddr() + CopyUDPAddr(ov.UDP, t.UDP) + dest.ClientAddress = ov + + case *RequestContext_Unix: + var ov *RequestContext_Unix + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_Unix{} + } else { + ov = ProtoPoolRequestContext_Unix.Get().(*RequestContext_Unix) + } + ov.Unix = NewUnixAddr() + CopyUnixAddr(ov.Unix, t.Unix) + dest.ClientAddress = ov + + default: + dest.ClientAddress = nil + } + + return dest +} + +func CopyRequestContextSlice(dest, src []RequestContext) []RequestContext { + var newDest []RequestContext + if cap(dest) < len(src) { + newDest = make([]RequestContext, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteRequestContext(&dest[i], false) + } + } + for i := range src { + CopyRequestContext(&newDest[i], &src[i]) + } + return newDest +} + +func CopyRequestContextPtrSlice(dest, src []*RequestContext) []*RequestContext { + var newDest []*RequestContext + if cap(dest) < len(src) { + newDest = make([]*RequestContext, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewRequestContext() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteRequestContext(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewRequestContext() + } + } + for i := range src { + CopyRequestContext(newDest[i], src[i]) + } + return newDest +} + +func (orig *RequestContext) Reset() { + *orig = RequestContext{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *RequestContext) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.SpanContext != nil { + dest.WriteObjectField("spanContext") + orig.SpanContext.MarshalJSON(dest) + } + if len(orig.ClientMetadata) > 0 { + dest.WriteObjectField("clientMetadata") + dest.WriteArrayStart() + orig.ClientMetadata[0].MarshalJSON(dest) + for i := 1; i < len(orig.ClientMetadata); i++ { + dest.WriteMore() + orig.ClientMetadata[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + switch orig := orig.ClientAddress.(type) { + case *RequestContext_IP: + if orig.IP != nil { + dest.WriteObjectField("iP") + orig.IP.MarshalJSON(dest) + } + case *RequestContext_TCP: + if orig.TCP != nil { + dest.WriteObjectField("tCP") + orig.TCP.MarshalJSON(dest) + } + case *RequestContext_UDP: + if orig.UDP != nil { + dest.WriteObjectField("uDP") + orig.UDP.MarshalJSON(dest) + } + case *RequestContext_Unix: + if orig.Unix != nil { + dest.WriteObjectField("unix") + orig.Unix.MarshalJSON(dest) + } + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *RequestContext) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "spanContext", "span_context": + orig.SpanContext = NewSpanContext() + orig.SpanContext.UnmarshalJSON(iter) + case "clientMetadata", "client_metadata": + for iter.ReadArray() { + orig.ClientMetadata = append(orig.ClientMetadata, KeyValue{}) + orig.ClientMetadata[len(orig.ClientMetadata)-1].UnmarshalJSON(iter) + } + + case "iP": + { + var ov *RequestContext_IP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_IP{} + } else { + ov = ProtoPoolRequestContext_IP.Get().(*RequestContext_IP) + } + ov.IP = NewIPAddr() + ov.IP.UnmarshalJSON(iter) + orig.ClientAddress = ov + } + case "tCP": + { + var ov *RequestContext_TCP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_TCP{} + } else { + ov = ProtoPoolRequestContext_TCP.Get().(*RequestContext_TCP) + } + ov.TCP = NewTCPAddr() + ov.TCP.UnmarshalJSON(iter) + orig.ClientAddress = ov + } + case "uDP": + { + var ov *RequestContext_UDP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_UDP{} + } else { + ov = ProtoPoolRequestContext_UDP.Get().(*RequestContext_UDP) + } + ov.UDP = NewUDPAddr() + ov.UDP.UnmarshalJSON(iter) + orig.ClientAddress = ov + } + case "unix": + { + var ov *RequestContext_Unix + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_Unix{} + } else { + ov = ProtoPoolRequestContext_Unix.Get().(*RequestContext_Unix) + } + ov.Unix = NewUnixAddr() + ov.Unix.UnmarshalJSON(iter) + orig.ClientAddress = ov + } + + default: + iter.Skip() + } + } +} + +func (orig *RequestContext) SizeProto() int { + var n int + var l int + _ = l + if orig.SpanContext != nil { + l = orig.SpanContext.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.ClientMetadata { + l = orig.ClientMetadata[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + switch orig := orig.ClientAddress.(type) { + case nil: + _ = orig + break + case *RequestContext_IP: + if orig.IP != nil { + l = orig.IP.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *RequestContext_TCP: + if orig.TCP != nil { + l = orig.TCP.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *RequestContext_UDP: + if orig.UDP != nil { + l = orig.UDP.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + case *RequestContext_Unix: + if orig.Unix != nil { + l = orig.Unix.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + } + return n +} + +func (orig *RequestContext) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.SpanContext != nil { + l = orig.SpanContext.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + for i := len(orig.ClientMetadata) - 1; i >= 0; i-- { + l = orig.ClientMetadata[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + switch orig := orig.ClientAddress.(type) { + case *RequestContext_IP: + if orig.IP != nil { + l = orig.IP.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + case *RequestContext_TCP: + if orig.TCP != nil { + l = orig.TCP.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + } + case *RequestContext_UDP: + if orig.UDP != nil { + l = orig.UDP.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + } + case *RequestContext_Unix: + if orig.Unix != nil { + l = orig.Unix.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x32 + } + } + return len(buf) - pos +} + +func (orig *RequestContext) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanContext", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + orig.SpanContext = NewSpanContext() + err = orig.SpanContext.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ClientMetadata", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ClientMetadata = append(orig.ClientMetadata, KeyValue{}) + err = orig.ClientMetadata[len(orig.ClientMetadata)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *RequestContext_IP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_IP{} + } else { + ov = ProtoPoolRequestContext_IP.Get().(*RequestContext_IP) + } + ov.IP = NewIPAddr() + err = ov.IP.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.ClientAddress = ov + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TCP", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *RequestContext_TCP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_TCP{} + } else { + ov = ProtoPoolRequestContext_TCP.Get().(*RequestContext_TCP) + } + ov.TCP = NewTCPAddr() + err = ov.TCP.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.ClientAddress = ov + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field UDP", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *RequestContext_UDP + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_UDP{} + } else { + ov = ProtoPoolRequestContext_UDP.Get().(*RequestContext_UDP) + } + ov.UDP = NewUDPAddr() + err = ov.UDP.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.ClientAddress = ov + + case 6: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Unix", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var ov *RequestContext_Unix + if !UseProtoPooling.IsEnabled() { + ov = &RequestContext_Unix{} + } else { + ov = ProtoPoolRequestContext_Unix.Get().(*RequestContext_Unix) + } + ov.Unix = NewUnixAddr() + err = ov.Unix.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + orig.ClientAddress = ov + + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestRequestContext() *RequestContext { + orig := NewRequestContext() + orig.SpanContext = GenTestSpanContext() + orig.ClientMetadata = []KeyValue{{}, *GenTestKeyValue()} + orig.ClientAddress = &RequestContext_IP{IP: GenTestIPAddr()} + return orig +} + +func GenTestRequestContextPtrSlice() []*RequestContext { + orig := make([]*RequestContext, 5) + orig[0] = NewRequestContext() + orig[1] = GenTestRequestContext() + orig[2] = NewRequestContext() + orig[3] = GenTestRequestContext() + orig[4] = NewRequestContext() + return orig +} + +func GenTestRequestContextSlice() []RequestContext { + orig := make([]RequestContext, 5) + orig[1] = *GenTestRequestContext() + orig[3] = *GenTestRequestContext() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resource.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resource.go new file mode 100644 index 00000000000..0b846c62b56 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resource.go @@ -0,0 +1,322 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Resource is a message representing the resource information. +type Resource struct { + Attributes []KeyValue + EntityRefs []*EntityRef + DroppedAttributesCount uint32 +} + +var ( + protoPoolResource = sync.Pool{ + New: func() any { + return &Resource{} + }, + } +) + +func NewResource() *Resource { + if !UseProtoPooling.IsEnabled() { + return &Resource{} + } + return protoPoolResource.Get().(*Resource) +} + +func DeleteResource(orig *Resource, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + for i := range orig.EntityRefs { + DeleteEntityRef(orig.EntityRefs[i], true) + } + orig.Reset() + if nullable { + protoPoolResource.Put(orig) + } +} + +func CopyResource(dest, src *Resource) *Resource { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewResource() + } + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + dest.EntityRefs = CopyEntityRefPtrSlice(dest.EntityRefs, src.EntityRefs) + + return dest +} + +func CopyResourceSlice(dest, src []Resource) []Resource { + var newDest []Resource + if cap(dest) < len(src) { + newDest = make([]Resource, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResource(&dest[i], false) + } + } + for i := range src { + CopyResource(&newDest[i], &src[i]) + } + return newDest +} + +func CopyResourcePtrSlice(dest, src []*Resource) []*Resource { + var newDest []*Resource + if cap(dest) < len(src) { + newDest = make([]*Resource, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResource() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResource(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResource() + } + } + for i := range src { + CopyResource(newDest[i], src[i]) + } + return newDest +} + +func (orig *Resource) Reset() { + *orig = Resource{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Resource) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + if len(orig.EntityRefs) > 0 { + dest.WriteObjectField("entityRefs") + dest.WriteArrayStart() + orig.EntityRefs[0].MarshalJSON(dest) + for i := 1; i < len(orig.EntityRefs); i++ { + dest.WriteMore() + orig.EntityRefs[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Resource) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + case "entityRefs", "entity_refs": + for iter.ReadArray() { + orig.EntityRefs = append(orig.EntityRefs, NewEntityRef()) + orig.EntityRefs[len(orig.EntityRefs)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *Resource) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + for i := range orig.EntityRefs { + l = orig.EntityRefs[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Resource) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x10 + } + for i := len(orig.EntityRefs) - 1; i >= 0; i-- { + l = orig.EntityRefs[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *Resource) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field EntityRefs", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.EntityRefs = append(orig.EntityRefs, NewEntityRef()) + err = orig.EntityRefs[len(orig.EntityRefs)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestResource() *Resource { + orig := NewResource() + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.DroppedAttributesCount = uint32(13) + orig.EntityRefs = []*EntityRef{{}, GenTestEntityRef()} + return orig +} + +func GenTestResourcePtrSlice() []*Resource { + orig := make([]*Resource, 5) + orig[0] = NewResource() + orig[1] = GenTestResource() + orig[2] = NewResource() + orig[3] = GenTestResource() + orig[4] = NewResource() + return orig +} + +func GenTestResourceSlice() []Resource { + orig := make([]Resource, 5) + orig[1] = *GenTestResource() + orig[3] = *GenTestResource() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcelogs.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcelogs.go new file mode 100644 index 00000000000..f7f64566672 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcelogs.go @@ -0,0 +1,364 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ResourceLogs is a collection of logs from a Resource. +type ResourceLogs struct { + Resource Resource + ScopeLogs []*ScopeLogs + SchemaUrl string + DeprecatedScopeLogs []*ScopeLogs +} + +var ( + protoPoolResourceLogs = sync.Pool{ + New: func() any { + return &ResourceLogs{} + }, + } +) + +func NewResourceLogs() *ResourceLogs { + if !UseProtoPooling.IsEnabled() { + return &ResourceLogs{} + } + return protoPoolResourceLogs.Get().(*ResourceLogs) +} + +func DeleteResourceLogs(orig *ResourceLogs, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteResource(&orig.Resource, false) + for i := range orig.ScopeLogs { + DeleteScopeLogs(orig.ScopeLogs[i], true) + } + + for i := range orig.DeprecatedScopeLogs { + DeleteScopeLogs(orig.DeprecatedScopeLogs[i], true) + } + orig.Reset() + if nullable { + protoPoolResourceLogs.Put(orig) + } +} + +func CopyResourceLogs(dest, src *ResourceLogs) *ResourceLogs { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewResourceLogs() + } + CopyResource(&dest.Resource, &src.Resource) + + dest.ScopeLogs = CopyScopeLogsPtrSlice(dest.ScopeLogs, src.ScopeLogs) + + dest.SchemaUrl = src.SchemaUrl + dest.DeprecatedScopeLogs = CopyScopeLogsPtrSlice(dest.DeprecatedScopeLogs, src.DeprecatedScopeLogs) + + return dest +} + +func CopyResourceLogsSlice(dest, src []ResourceLogs) []ResourceLogs { + var newDest []ResourceLogs + if cap(dest) < len(src) { + newDest = make([]ResourceLogs, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceLogs(&dest[i], false) + } + } + for i := range src { + CopyResourceLogs(&newDest[i], &src[i]) + } + return newDest +} + +func CopyResourceLogsPtrSlice(dest, src []*ResourceLogs) []*ResourceLogs { + var newDest []*ResourceLogs + if cap(dest) < len(src) { + newDest = make([]*ResourceLogs, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceLogs() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceLogs(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceLogs() + } + } + for i := range src { + CopyResourceLogs(newDest[i], src[i]) + } + return newDest +} + +func (orig *ResourceLogs) Reset() { + *orig = ResourceLogs{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ResourceLogs) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("resource") + orig.Resource.MarshalJSON(dest) + if len(orig.ScopeLogs) > 0 { + dest.WriteObjectField("scopeLogs") + dest.WriteArrayStart() + orig.ScopeLogs[0].MarshalJSON(dest) + for i := 1; i < len(orig.ScopeLogs); i++ { + dest.WriteMore() + orig.ScopeLogs[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + if len(orig.DeprecatedScopeLogs) > 0 { + dest.WriteObjectField("deprecatedScopeLogs") + dest.WriteArrayStart() + orig.DeprecatedScopeLogs[0].MarshalJSON(dest) + for i := 1; i < len(orig.DeprecatedScopeLogs); i++ { + dest.WriteMore() + orig.DeprecatedScopeLogs[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ResourceLogs) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resource": + + orig.Resource.UnmarshalJSON(iter) + case "scopeLogs", "scope_logs": + for iter.ReadArray() { + orig.ScopeLogs = append(orig.ScopeLogs, NewScopeLogs()) + orig.ScopeLogs[len(orig.ScopeLogs)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + case "deprecatedScopeLogs", "deprecated_scope_logs": + for iter.ReadArray() { + orig.DeprecatedScopeLogs = append(orig.DeprecatedScopeLogs, NewScopeLogs()) + orig.DeprecatedScopeLogs[len(orig.DeprecatedScopeLogs)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ResourceLogs) SizeProto() int { + var n int + var l int + _ = l + l = orig.Resource.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.ScopeLogs { + l = orig.ScopeLogs[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.DeprecatedScopeLogs { + l = orig.DeprecatedScopeLogs[i].SizeProto() + n += 2 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ResourceLogs) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Resource.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.ScopeLogs) - 1; i >= 0; i-- { + l = orig.ScopeLogs[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + for i := len(orig.DeprecatedScopeLogs) - 1; i >= 0; i-- { + l = orig.DeprecatedScopeLogs[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3e + pos-- + buf[pos] = 0xc2 + } + return len(buf) - pos +} + +func (orig *ResourceLogs) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Resource.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeLogs", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ScopeLogs = append(orig.ScopeLogs, NewScopeLogs()) + err = orig.ScopeLogs[len(orig.ScopeLogs)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + + case 1000: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeLogs", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DeprecatedScopeLogs = append(orig.DeprecatedScopeLogs, NewScopeLogs()) + err = orig.DeprecatedScopeLogs[len(orig.DeprecatedScopeLogs)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestResourceLogs() *ResourceLogs { + orig := NewResourceLogs() + orig.Resource = *GenTestResource() + orig.ScopeLogs = []*ScopeLogs{{}, GenTestScopeLogs()} + orig.SchemaUrl = "test_schemaurl" + orig.DeprecatedScopeLogs = []*ScopeLogs{{}, GenTestScopeLogs()} + return orig +} + +func GenTestResourceLogsPtrSlice() []*ResourceLogs { + orig := make([]*ResourceLogs, 5) + orig[0] = NewResourceLogs() + orig[1] = GenTestResourceLogs() + orig[2] = NewResourceLogs() + orig[3] = GenTestResourceLogs() + orig[4] = NewResourceLogs() + return orig +} + +func GenTestResourceLogsSlice() []ResourceLogs { + orig := make([]ResourceLogs, 5) + orig[1] = *GenTestResourceLogs() + orig[3] = *GenTestResourceLogs() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcemetrics.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcemetrics.go new file mode 100644 index 00000000000..dc61ce32cbd --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcemetrics.go @@ -0,0 +1,364 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ResourceMetrics is a collection of metrics from a Resource. +type ResourceMetrics struct { + Resource Resource + ScopeMetrics []*ScopeMetrics + SchemaUrl string + DeprecatedScopeMetrics []*ScopeMetrics +} + +var ( + protoPoolResourceMetrics = sync.Pool{ + New: func() any { + return &ResourceMetrics{} + }, + } +) + +func NewResourceMetrics() *ResourceMetrics { + if !UseProtoPooling.IsEnabled() { + return &ResourceMetrics{} + } + return protoPoolResourceMetrics.Get().(*ResourceMetrics) +} + +func DeleteResourceMetrics(orig *ResourceMetrics, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteResource(&orig.Resource, false) + for i := range orig.ScopeMetrics { + DeleteScopeMetrics(orig.ScopeMetrics[i], true) + } + + for i := range orig.DeprecatedScopeMetrics { + DeleteScopeMetrics(orig.DeprecatedScopeMetrics[i], true) + } + orig.Reset() + if nullable { + protoPoolResourceMetrics.Put(orig) + } +} + +func CopyResourceMetrics(dest, src *ResourceMetrics) *ResourceMetrics { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewResourceMetrics() + } + CopyResource(&dest.Resource, &src.Resource) + + dest.ScopeMetrics = CopyScopeMetricsPtrSlice(dest.ScopeMetrics, src.ScopeMetrics) + + dest.SchemaUrl = src.SchemaUrl + dest.DeprecatedScopeMetrics = CopyScopeMetricsPtrSlice(dest.DeprecatedScopeMetrics, src.DeprecatedScopeMetrics) + + return dest +} + +func CopyResourceMetricsSlice(dest, src []ResourceMetrics) []ResourceMetrics { + var newDest []ResourceMetrics + if cap(dest) < len(src) { + newDest = make([]ResourceMetrics, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceMetrics(&dest[i], false) + } + } + for i := range src { + CopyResourceMetrics(&newDest[i], &src[i]) + } + return newDest +} + +func CopyResourceMetricsPtrSlice(dest, src []*ResourceMetrics) []*ResourceMetrics { + var newDest []*ResourceMetrics + if cap(dest) < len(src) { + newDest = make([]*ResourceMetrics, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceMetrics() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceMetrics(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceMetrics() + } + } + for i := range src { + CopyResourceMetrics(newDest[i], src[i]) + } + return newDest +} + +func (orig *ResourceMetrics) Reset() { + *orig = ResourceMetrics{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ResourceMetrics) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("resource") + orig.Resource.MarshalJSON(dest) + if len(orig.ScopeMetrics) > 0 { + dest.WriteObjectField("scopeMetrics") + dest.WriteArrayStart() + orig.ScopeMetrics[0].MarshalJSON(dest) + for i := 1; i < len(orig.ScopeMetrics); i++ { + dest.WriteMore() + orig.ScopeMetrics[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + if len(orig.DeprecatedScopeMetrics) > 0 { + dest.WriteObjectField("deprecatedScopeMetrics") + dest.WriteArrayStart() + orig.DeprecatedScopeMetrics[0].MarshalJSON(dest) + for i := 1; i < len(orig.DeprecatedScopeMetrics); i++ { + dest.WriteMore() + orig.DeprecatedScopeMetrics[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ResourceMetrics) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resource": + + orig.Resource.UnmarshalJSON(iter) + case "scopeMetrics", "scope_metrics": + for iter.ReadArray() { + orig.ScopeMetrics = append(orig.ScopeMetrics, NewScopeMetrics()) + orig.ScopeMetrics[len(orig.ScopeMetrics)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + case "deprecatedScopeMetrics", "deprecated_scope_metrics": + for iter.ReadArray() { + orig.DeprecatedScopeMetrics = append(orig.DeprecatedScopeMetrics, NewScopeMetrics()) + orig.DeprecatedScopeMetrics[len(orig.DeprecatedScopeMetrics)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ResourceMetrics) SizeProto() int { + var n int + var l int + _ = l + l = orig.Resource.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.ScopeMetrics { + l = orig.ScopeMetrics[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.DeprecatedScopeMetrics { + l = orig.DeprecatedScopeMetrics[i].SizeProto() + n += 2 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ResourceMetrics) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Resource.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.ScopeMetrics) - 1; i >= 0; i-- { + l = orig.ScopeMetrics[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + for i := len(orig.DeprecatedScopeMetrics) - 1; i >= 0; i-- { + l = orig.DeprecatedScopeMetrics[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3e + pos-- + buf[pos] = 0xc2 + } + return len(buf) - pos +} + +func (orig *ResourceMetrics) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Resource.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeMetrics", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ScopeMetrics = append(orig.ScopeMetrics, NewScopeMetrics()) + err = orig.ScopeMetrics[len(orig.ScopeMetrics)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + + case 1000: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeMetrics", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DeprecatedScopeMetrics = append(orig.DeprecatedScopeMetrics, NewScopeMetrics()) + err = orig.DeprecatedScopeMetrics[len(orig.DeprecatedScopeMetrics)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestResourceMetrics() *ResourceMetrics { + orig := NewResourceMetrics() + orig.Resource = *GenTestResource() + orig.ScopeMetrics = []*ScopeMetrics{{}, GenTestScopeMetrics()} + orig.SchemaUrl = "test_schemaurl" + orig.DeprecatedScopeMetrics = []*ScopeMetrics{{}, GenTestScopeMetrics()} + return orig +} + +func GenTestResourceMetricsPtrSlice() []*ResourceMetrics { + orig := make([]*ResourceMetrics, 5) + orig[0] = NewResourceMetrics() + orig[1] = GenTestResourceMetrics() + orig[2] = NewResourceMetrics() + orig[3] = GenTestResourceMetrics() + orig[4] = NewResourceMetrics() + return orig +} + +func GenTestResourceMetricsSlice() []ResourceMetrics { + orig := make([]ResourceMetrics, 5) + orig[1] = *GenTestResourceMetrics() + orig[3] = *GenTestResourceMetrics() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourceprofiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourceprofiles.go new file mode 100644 index 00000000000..e1b0910724b --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourceprofiles.go @@ -0,0 +1,313 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ResourceProfiles is a collection of profiles from a Resource. +type ResourceProfiles struct { + SchemaUrl string + Resource Resource + ScopeProfiles []*ScopeProfiles +} + +var ( + protoPoolResourceProfiles = sync.Pool{ + New: func() any { + return &ResourceProfiles{} + }, + } +) + +func NewResourceProfiles() *ResourceProfiles { + if !UseProtoPooling.IsEnabled() { + return &ResourceProfiles{} + } + return protoPoolResourceProfiles.Get().(*ResourceProfiles) +} + +func DeleteResourceProfiles(orig *ResourceProfiles, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteResource(&orig.Resource, false) + for i := range orig.ScopeProfiles { + DeleteScopeProfiles(orig.ScopeProfiles[i], true) + } + + orig.Reset() + if nullable { + protoPoolResourceProfiles.Put(orig) + } +} + +func CopyResourceProfiles(dest, src *ResourceProfiles) *ResourceProfiles { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewResourceProfiles() + } + CopyResource(&dest.Resource, &src.Resource) + + dest.ScopeProfiles = CopyScopeProfilesPtrSlice(dest.ScopeProfiles, src.ScopeProfiles) + + dest.SchemaUrl = src.SchemaUrl + + return dest +} + +func CopyResourceProfilesSlice(dest, src []ResourceProfiles) []ResourceProfiles { + var newDest []ResourceProfiles + if cap(dest) < len(src) { + newDest = make([]ResourceProfiles, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceProfiles(&dest[i], false) + } + } + for i := range src { + CopyResourceProfiles(&newDest[i], &src[i]) + } + return newDest +} + +func CopyResourceProfilesPtrSlice(dest, src []*ResourceProfiles) []*ResourceProfiles { + var newDest []*ResourceProfiles + if cap(dest) < len(src) { + newDest = make([]*ResourceProfiles, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceProfiles() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceProfiles(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceProfiles() + } + } + for i := range src { + CopyResourceProfiles(newDest[i], src[i]) + } + return newDest +} + +func (orig *ResourceProfiles) Reset() { + *orig = ResourceProfiles{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ResourceProfiles) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("resource") + orig.Resource.MarshalJSON(dest) + if len(orig.ScopeProfiles) > 0 { + dest.WriteObjectField("scopeProfiles") + dest.WriteArrayStart() + orig.ScopeProfiles[0].MarshalJSON(dest) + for i := 1; i < len(orig.ScopeProfiles); i++ { + dest.WriteMore() + orig.ScopeProfiles[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ResourceProfiles) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resource": + + orig.Resource.UnmarshalJSON(iter) + case "scopeProfiles", "scope_profiles": + for iter.ReadArray() { + orig.ScopeProfiles = append(orig.ScopeProfiles, NewScopeProfiles()) + orig.ScopeProfiles[len(orig.ScopeProfiles)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ResourceProfiles) SizeProto() int { + var n int + var l int + _ = l + l = orig.Resource.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.ScopeProfiles { + l = orig.ScopeProfiles[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ResourceProfiles) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Resource.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.ScopeProfiles) - 1; i >= 0; i-- { + l = orig.ScopeProfiles[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *ResourceProfiles) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Resource.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ScopeProfiles = append(orig.ScopeProfiles, NewScopeProfiles()) + err = orig.ScopeProfiles[len(orig.ScopeProfiles)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestResourceProfiles() *ResourceProfiles { + orig := NewResourceProfiles() + orig.Resource = *GenTestResource() + orig.ScopeProfiles = []*ScopeProfiles{{}, GenTestScopeProfiles()} + orig.SchemaUrl = "test_schemaurl" + return orig +} + +func GenTestResourceProfilesPtrSlice() []*ResourceProfiles { + orig := make([]*ResourceProfiles, 5) + orig[0] = NewResourceProfiles() + orig[1] = GenTestResourceProfiles() + orig[2] = NewResourceProfiles() + orig[3] = GenTestResourceProfiles() + orig[4] = NewResourceProfiles() + return orig +} + +func GenTestResourceProfilesSlice() []ResourceProfiles { + orig := make([]ResourceProfiles, 5) + orig[1] = *GenTestResourceProfiles() + orig[3] = *GenTestResourceProfiles() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcespans.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcespans.go new file mode 100644 index 00000000000..fd29e905728 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_resourcespans.go @@ -0,0 +1,364 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ResourceSpans is a collection of spans from a Resource. +type ResourceSpans struct { + Resource Resource + ScopeSpans []*ScopeSpans + SchemaUrl string + DeprecatedScopeSpans []*ScopeSpans +} + +var ( + protoPoolResourceSpans = sync.Pool{ + New: func() any { + return &ResourceSpans{} + }, + } +) + +func NewResourceSpans() *ResourceSpans { + if !UseProtoPooling.IsEnabled() { + return &ResourceSpans{} + } + return protoPoolResourceSpans.Get().(*ResourceSpans) +} + +func DeleteResourceSpans(orig *ResourceSpans, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteResource(&orig.Resource, false) + for i := range orig.ScopeSpans { + DeleteScopeSpans(orig.ScopeSpans[i], true) + } + + for i := range orig.DeprecatedScopeSpans { + DeleteScopeSpans(orig.DeprecatedScopeSpans[i], true) + } + orig.Reset() + if nullable { + protoPoolResourceSpans.Put(orig) + } +} + +func CopyResourceSpans(dest, src *ResourceSpans) *ResourceSpans { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewResourceSpans() + } + CopyResource(&dest.Resource, &src.Resource) + + dest.ScopeSpans = CopyScopeSpansPtrSlice(dest.ScopeSpans, src.ScopeSpans) + + dest.SchemaUrl = src.SchemaUrl + dest.DeprecatedScopeSpans = CopyScopeSpansPtrSlice(dest.DeprecatedScopeSpans, src.DeprecatedScopeSpans) + + return dest +} + +func CopyResourceSpansSlice(dest, src []ResourceSpans) []ResourceSpans { + var newDest []ResourceSpans + if cap(dest) < len(src) { + newDest = make([]ResourceSpans, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceSpans(&dest[i], false) + } + } + for i := range src { + CopyResourceSpans(&newDest[i], &src[i]) + } + return newDest +} + +func CopyResourceSpansPtrSlice(dest, src []*ResourceSpans) []*ResourceSpans { + var newDest []*ResourceSpans + if cap(dest) < len(src) { + newDest = make([]*ResourceSpans, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceSpans() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteResourceSpans(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewResourceSpans() + } + } + for i := range src { + CopyResourceSpans(newDest[i], src[i]) + } + return newDest +} + +func (orig *ResourceSpans) Reset() { + *orig = ResourceSpans{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ResourceSpans) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("resource") + orig.Resource.MarshalJSON(dest) + if len(orig.ScopeSpans) > 0 { + dest.WriteObjectField("scopeSpans") + dest.WriteArrayStart() + orig.ScopeSpans[0].MarshalJSON(dest) + for i := 1; i < len(orig.ScopeSpans); i++ { + dest.WriteMore() + orig.ScopeSpans[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + if len(orig.DeprecatedScopeSpans) > 0 { + dest.WriteObjectField("deprecatedScopeSpans") + dest.WriteArrayStart() + orig.DeprecatedScopeSpans[0].MarshalJSON(dest) + for i := 1; i < len(orig.DeprecatedScopeSpans); i++ { + dest.WriteMore() + orig.DeprecatedScopeSpans[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ResourceSpans) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resource": + + orig.Resource.UnmarshalJSON(iter) + case "scopeSpans", "scope_spans": + for iter.ReadArray() { + orig.ScopeSpans = append(orig.ScopeSpans, NewScopeSpans()) + orig.ScopeSpans[len(orig.ScopeSpans)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + case "deprecatedScopeSpans", "deprecated_scope_spans": + for iter.ReadArray() { + orig.DeprecatedScopeSpans = append(orig.DeprecatedScopeSpans, NewScopeSpans()) + orig.DeprecatedScopeSpans[len(orig.DeprecatedScopeSpans)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *ResourceSpans) SizeProto() int { + var n int + var l int + _ = l + l = orig.Resource.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.ScopeSpans { + l = orig.ScopeSpans[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.DeprecatedScopeSpans { + l = orig.DeprecatedScopeSpans[i].SizeProto() + n += 2 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ResourceSpans) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Resource.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.ScopeSpans) - 1; i >= 0; i-- { + l = orig.ScopeSpans[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + for i := len(orig.DeprecatedScopeSpans) - 1; i >= 0; i-- { + l = orig.DeprecatedScopeSpans[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3e + pos-- + buf[pos] = 0xc2 + } + return len(buf) - pos +} + +func (orig *ResourceSpans) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Resource.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeSpans", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ScopeSpans = append(orig.ScopeSpans, NewScopeSpans()) + err = orig.ScopeSpans[len(orig.ScopeSpans)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + + case 1000: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeSpans", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DeprecatedScopeSpans = append(orig.DeprecatedScopeSpans, NewScopeSpans()) + err = orig.DeprecatedScopeSpans[len(orig.DeprecatedScopeSpans)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestResourceSpans() *ResourceSpans { + orig := NewResourceSpans() + orig.Resource = *GenTestResource() + orig.ScopeSpans = []*ScopeSpans{{}, GenTestScopeSpans()} + orig.SchemaUrl = "test_schemaurl" + orig.DeprecatedScopeSpans = []*ScopeSpans{{}, GenTestScopeSpans()} + return orig +} + +func GenTestResourceSpansPtrSlice() []*ResourceSpans { + orig := make([]*ResourceSpans, 5) + orig[0] = NewResourceSpans() + orig[1] = GenTestResourceSpans() + orig[2] = NewResourceSpans() + orig[3] = GenTestResourceSpans() + orig[4] = NewResourceSpans() + return orig +} + +func GenTestResourceSpansSlice() []ResourceSpans { + orig := make([]ResourceSpans, 5) + orig[1] = *GenTestResourceSpans() + orig[3] = *GenTestResourceSpans() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_sample.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_sample.go new file mode 100644 index 00000000000..7a67e83f6dc --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_sample.go @@ -0,0 +1,454 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Sample represents each record value encountered within a profiled program. +type Sample struct { + Values []int64 + AttributeIndices []int32 + TimestampsUnixNano []uint64 + StackIndex int32 + LinkIndex int32 +} + +var ( + protoPoolSample = sync.Pool{ + New: func() any { + return &Sample{} + }, + } +) + +func NewSample() *Sample { + if !UseProtoPooling.IsEnabled() { + return &Sample{} + } + return protoPoolSample.Get().(*Sample) +} + +func DeleteSample(orig *Sample, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolSample.Put(orig) + } +} + +func CopySample(dest, src *Sample) *Sample { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSample() + } + dest.StackIndex = src.StackIndex + dest.Values = append(dest.Values[:0], src.Values...) + + dest.AttributeIndices = append(dest.AttributeIndices[:0], src.AttributeIndices...) + + dest.LinkIndex = src.LinkIndex + dest.TimestampsUnixNano = append(dest.TimestampsUnixNano[:0], src.TimestampsUnixNano...) + + return dest +} + +func CopySampleSlice(dest, src []Sample) []Sample { + var newDest []Sample + if cap(dest) < len(src) { + newDest = make([]Sample, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSample(&dest[i], false) + } + } + for i := range src { + CopySample(&newDest[i], &src[i]) + } + return newDest +} + +func CopySamplePtrSlice(dest, src []*Sample) []*Sample { + var newDest []*Sample + if cap(dest) < len(src) { + newDest = make([]*Sample, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSample() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSample(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSample() + } + } + for i := range src { + CopySample(newDest[i], src[i]) + } + return newDest +} + +func (orig *Sample) Reset() { + *orig = Sample{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Sample) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.StackIndex != int32(0) { + dest.WriteObjectField("stackIndex") + dest.WriteInt32(orig.StackIndex) + } + if len(orig.Values) > 0 { + dest.WriteObjectField("values") + dest.WriteArrayStart() + dest.WriteInt64(orig.Values[0]) + for i := 1; i < len(orig.Values); i++ { + dest.WriteMore() + dest.WriteInt64(orig.Values[i]) + } + dest.WriteArrayEnd() + } + + if len(orig.AttributeIndices) > 0 { + dest.WriteObjectField("attributeIndices") + dest.WriteArrayStart() + dest.WriteInt32(orig.AttributeIndices[0]) + for i := 1; i < len(orig.AttributeIndices); i++ { + dest.WriteMore() + dest.WriteInt32(orig.AttributeIndices[i]) + } + dest.WriteArrayEnd() + } + + if orig.LinkIndex != int32(0) { + dest.WriteObjectField("linkIndex") + dest.WriteInt32(orig.LinkIndex) + } + if len(orig.TimestampsUnixNano) > 0 { + dest.WriteObjectField("timestampsUnixNano") + dest.WriteArrayStart() + dest.WriteUint64(orig.TimestampsUnixNano[0]) + for i := 1; i < len(orig.TimestampsUnixNano); i++ { + dest.WriteMore() + dest.WriteUint64(orig.TimestampsUnixNano[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Sample) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "stackIndex", "stack_index": + orig.StackIndex = iter.ReadInt32() + case "values": + for iter.ReadArray() { + orig.Values = append(orig.Values, iter.ReadInt64()) + } + + case "attributeIndices", "attribute_indices": + for iter.ReadArray() { + orig.AttributeIndices = append(orig.AttributeIndices, iter.ReadInt32()) + } + + case "linkIndex", "link_index": + orig.LinkIndex = iter.ReadInt32() + case "timestampsUnixNano", "timestamps_unix_nano": + for iter.ReadArray() { + orig.TimestampsUnixNano = append(orig.TimestampsUnixNano, iter.ReadUint64()) + } + + default: + iter.Skip() + } + } +} + +func (orig *Sample) SizeProto() int { + var n int + var l int + _ = l + if orig.StackIndex != int32(0) { + n += 1 + proto.Sov(uint64(orig.StackIndex)) + } + + if len(orig.Values) > 0 { + l = 0 + for _, e := range orig.Values { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + + if len(orig.AttributeIndices) > 0 { + l = 0 + for _, e := range orig.AttributeIndices { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.LinkIndex != int32(0) { + n += 1 + proto.Sov(uint64(orig.LinkIndex)) + } + l = len(orig.TimestampsUnixNano) + if l > 0 { + l *= 8 + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Sample) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.StackIndex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.StackIndex)) + pos-- + buf[pos] = 0x8 + } + l = len(orig.Values) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Values[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.AttributeIndices) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AttributeIndices[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0x1a + } + if orig.LinkIndex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.LinkIndex)) + pos-- + buf[pos] = 0x20 + } + l = len(orig.TimestampsUnixNano) + if l > 0 { + for i := l - 1; i >= 0; i-- { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimestampsUnixNano[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(l*8)) + pos-- + buf[pos] = 0x2a + } + return len(buf) - pos +} + +func (orig *Sample) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field StackIndex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.StackIndex = int32(num) + case 2: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.Values = append(orig.Values, int64(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field Values", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Values = append(orig.Values, int64(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + case 3: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field AttributeIndices", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AttributeIndices = append(orig.AttributeIndices, int32(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) + } + + case 4: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field LinkIndex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.LinkIndex = int32(num) + case 5: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + size := length / 8 + orig.TimestampsUnixNano = make([]uint64, size) + var num uint64 + for i := 0; i < size; i++ { + num, startPos, err = proto.ConsumeI64(buf[:pos], startPos) + if err != nil { + return err + } + orig.TimestampsUnixNano[i] = uint64(num) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field TimestampsUnixNano", pos-startPos) + } + case proto.WireTypeI64: + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.TimestampsUnixNano = append(orig.TimestampsUnixNano, uint64(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSample() *Sample { + orig := NewSample() + orig.StackIndex = int32(13) + orig.Values = []int64{int64(0), int64(13)} + orig.AttributeIndices = []int32{int32(0), int32(13)} + orig.LinkIndex = int32(13) + orig.TimestampsUnixNano = []uint64{uint64(0), uint64(13)} + return orig +} + +func GenTestSamplePtrSlice() []*Sample { + orig := make([]*Sample, 5) + orig[0] = NewSample() + orig[1] = GenTestSample() + orig[2] = NewSample() + orig[3] = GenTestSample() + orig[4] = NewSample() + return orig +} + +func GenTestSampleSlice() []Sample { + orig := make([]Sample, 5) + orig[1] = *GenTestSample() + orig[3] = *GenTestSample() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopelogs.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopelogs.go new file mode 100644 index 00000000000..606af0ffd39 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopelogs.go @@ -0,0 +1,313 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ScopeLogs is a collection of logs from a LibraryInstrumentation. +type ScopeLogs struct { + SchemaUrl string + LogRecords []*LogRecord + Scope InstrumentationScope +} + +var ( + protoPoolScopeLogs = sync.Pool{ + New: func() any { + return &ScopeLogs{} + }, + } +) + +func NewScopeLogs() *ScopeLogs { + if !UseProtoPooling.IsEnabled() { + return &ScopeLogs{} + } + return protoPoolScopeLogs.Get().(*ScopeLogs) +} + +func DeleteScopeLogs(orig *ScopeLogs, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteInstrumentationScope(&orig.Scope, false) + for i := range orig.LogRecords { + DeleteLogRecord(orig.LogRecords[i], true) + } + + orig.Reset() + if nullable { + protoPoolScopeLogs.Put(orig) + } +} + +func CopyScopeLogs(dest, src *ScopeLogs) *ScopeLogs { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewScopeLogs() + } + CopyInstrumentationScope(&dest.Scope, &src.Scope) + + dest.LogRecords = CopyLogRecordPtrSlice(dest.LogRecords, src.LogRecords) + + dest.SchemaUrl = src.SchemaUrl + + return dest +} + +func CopyScopeLogsSlice(dest, src []ScopeLogs) []ScopeLogs { + var newDest []ScopeLogs + if cap(dest) < len(src) { + newDest = make([]ScopeLogs, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeLogs(&dest[i], false) + } + } + for i := range src { + CopyScopeLogs(&newDest[i], &src[i]) + } + return newDest +} + +func CopyScopeLogsPtrSlice(dest, src []*ScopeLogs) []*ScopeLogs { + var newDest []*ScopeLogs + if cap(dest) < len(src) { + newDest = make([]*ScopeLogs, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeLogs() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeLogs(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeLogs() + } + } + for i := range src { + CopyScopeLogs(newDest[i], src[i]) + } + return newDest +} + +func (orig *ScopeLogs) Reset() { + *orig = ScopeLogs{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ScopeLogs) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("scope") + orig.Scope.MarshalJSON(dest) + if len(orig.LogRecords) > 0 { + dest.WriteObjectField("logRecords") + dest.WriteArrayStart() + orig.LogRecords[0].MarshalJSON(dest) + for i := 1; i < len(orig.LogRecords); i++ { + dest.WriteMore() + orig.LogRecords[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ScopeLogs) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "scope": + + orig.Scope.UnmarshalJSON(iter) + case "logRecords", "log_records": + for iter.ReadArray() { + orig.LogRecords = append(orig.LogRecords, NewLogRecord()) + orig.LogRecords[len(orig.LogRecords)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ScopeLogs) SizeProto() int { + var n int + var l int + _ = l + l = orig.Scope.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.LogRecords { + l = orig.LogRecords[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ScopeLogs) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Scope.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.LogRecords) - 1; i >= 0; i-- { + l = orig.LogRecords[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *ScopeLogs) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Scope.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field LogRecords", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.LogRecords = append(orig.LogRecords, NewLogRecord()) + err = orig.LogRecords[len(orig.LogRecords)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestScopeLogs() *ScopeLogs { + orig := NewScopeLogs() + orig.Scope = *GenTestInstrumentationScope() + orig.LogRecords = []*LogRecord{{}, GenTestLogRecord()} + orig.SchemaUrl = "test_schemaurl" + return orig +} + +func GenTestScopeLogsPtrSlice() []*ScopeLogs { + orig := make([]*ScopeLogs, 5) + orig[0] = NewScopeLogs() + orig[1] = GenTestScopeLogs() + orig[2] = NewScopeLogs() + orig[3] = GenTestScopeLogs() + orig[4] = NewScopeLogs() + return orig +} + +func GenTestScopeLogsSlice() []ScopeLogs { + orig := make([]ScopeLogs, 5) + orig[1] = *GenTestScopeLogs() + orig[3] = *GenTestScopeLogs() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopemetrics.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopemetrics.go new file mode 100644 index 00000000000..5c7a9d1d556 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopemetrics.go @@ -0,0 +1,313 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ScopeMetrics is a collection of metrics from a LibraryInstrumentation. +type ScopeMetrics struct { + SchemaUrl string + Metrics []*Metric + Scope InstrumentationScope +} + +var ( + protoPoolScopeMetrics = sync.Pool{ + New: func() any { + return &ScopeMetrics{} + }, + } +) + +func NewScopeMetrics() *ScopeMetrics { + if !UseProtoPooling.IsEnabled() { + return &ScopeMetrics{} + } + return protoPoolScopeMetrics.Get().(*ScopeMetrics) +} + +func DeleteScopeMetrics(orig *ScopeMetrics, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteInstrumentationScope(&orig.Scope, false) + for i := range orig.Metrics { + DeleteMetric(orig.Metrics[i], true) + } + + orig.Reset() + if nullable { + protoPoolScopeMetrics.Put(orig) + } +} + +func CopyScopeMetrics(dest, src *ScopeMetrics) *ScopeMetrics { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewScopeMetrics() + } + CopyInstrumentationScope(&dest.Scope, &src.Scope) + + dest.Metrics = CopyMetricPtrSlice(dest.Metrics, src.Metrics) + + dest.SchemaUrl = src.SchemaUrl + + return dest +} + +func CopyScopeMetricsSlice(dest, src []ScopeMetrics) []ScopeMetrics { + var newDest []ScopeMetrics + if cap(dest) < len(src) { + newDest = make([]ScopeMetrics, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeMetrics(&dest[i], false) + } + } + for i := range src { + CopyScopeMetrics(&newDest[i], &src[i]) + } + return newDest +} + +func CopyScopeMetricsPtrSlice(dest, src []*ScopeMetrics) []*ScopeMetrics { + var newDest []*ScopeMetrics + if cap(dest) < len(src) { + newDest = make([]*ScopeMetrics, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeMetrics() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeMetrics(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeMetrics() + } + } + for i := range src { + CopyScopeMetrics(newDest[i], src[i]) + } + return newDest +} + +func (orig *ScopeMetrics) Reset() { + *orig = ScopeMetrics{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ScopeMetrics) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("scope") + orig.Scope.MarshalJSON(dest) + if len(orig.Metrics) > 0 { + dest.WriteObjectField("metrics") + dest.WriteArrayStart() + orig.Metrics[0].MarshalJSON(dest) + for i := 1; i < len(orig.Metrics); i++ { + dest.WriteMore() + orig.Metrics[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ScopeMetrics) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "scope": + + orig.Scope.UnmarshalJSON(iter) + case "metrics": + for iter.ReadArray() { + orig.Metrics = append(orig.Metrics, NewMetric()) + orig.Metrics[len(orig.Metrics)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ScopeMetrics) SizeProto() int { + var n int + var l int + _ = l + l = orig.Scope.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.Metrics { + l = orig.Metrics[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ScopeMetrics) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Scope.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.Metrics) - 1; i >= 0; i-- { + l = orig.Metrics[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *ScopeMetrics) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Scope.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Metrics = append(orig.Metrics, NewMetric()) + err = orig.Metrics[len(orig.Metrics)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestScopeMetrics() *ScopeMetrics { + orig := NewScopeMetrics() + orig.Scope = *GenTestInstrumentationScope() + orig.Metrics = []*Metric{{}, GenTestMetric()} + orig.SchemaUrl = "test_schemaurl" + return orig +} + +func GenTestScopeMetricsPtrSlice() []*ScopeMetrics { + orig := make([]*ScopeMetrics, 5) + orig[0] = NewScopeMetrics() + orig[1] = GenTestScopeMetrics() + orig[2] = NewScopeMetrics() + orig[3] = GenTestScopeMetrics() + orig[4] = NewScopeMetrics() + return orig +} + +func GenTestScopeMetricsSlice() []ScopeMetrics { + orig := make([]ScopeMetrics, 5) + orig[1] = *GenTestScopeMetrics() + orig[3] = *GenTestScopeMetrics() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopeprofiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopeprofiles.go new file mode 100644 index 00000000000..b88f3b1e1e2 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopeprofiles.go @@ -0,0 +1,313 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ScopeProfiles is a collection of profiles from a LibraryInstrumentation. +type ScopeProfiles struct { + SchemaUrl string + Profiles []*Profile + Scope InstrumentationScope +} + +var ( + protoPoolScopeProfiles = sync.Pool{ + New: func() any { + return &ScopeProfiles{} + }, + } +) + +func NewScopeProfiles() *ScopeProfiles { + if !UseProtoPooling.IsEnabled() { + return &ScopeProfiles{} + } + return protoPoolScopeProfiles.Get().(*ScopeProfiles) +} + +func DeleteScopeProfiles(orig *ScopeProfiles, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteInstrumentationScope(&orig.Scope, false) + for i := range orig.Profiles { + DeleteProfile(orig.Profiles[i], true) + } + + orig.Reset() + if nullable { + protoPoolScopeProfiles.Put(orig) + } +} + +func CopyScopeProfiles(dest, src *ScopeProfiles) *ScopeProfiles { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewScopeProfiles() + } + CopyInstrumentationScope(&dest.Scope, &src.Scope) + + dest.Profiles = CopyProfilePtrSlice(dest.Profiles, src.Profiles) + + dest.SchemaUrl = src.SchemaUrl + + return dest +} + +func CopyScopeProfilesSlice(dest, src []ScopeProfiles) []ScopeProfiles { + var newDest []ScopeProfiles + if cap(dest) < len(src) { + newDest = make([]ScopeProfiles, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeProfiles(&dest[i], false) + } + } + for i := range src { + CopyScopeProfiles(&newDest[i], &src[i]) + } + return newDest +} + +func CopyScopeProfilesPtrSlice(dest, src []*ScopeProfiles) []*ScopeProfiles { + var newDest []*ScopeProfiles + if cap(dest) < len(src) { + newDest = make([]*ScopeProfiles, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeProfiles() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeProfiles(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeProfiles() + } + } + for i := range src { + CopyScopeProfiles(newDest[i], src[i]) + } + return newDest +} + +func (orig *ScopeProfiles) Reset() { + *orig = ScopeProfiles{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ScopeProfiles) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("scope") + orig.Scope.MarshalJSON(dest) + if len(orig.Profiles) > 0 { + dest.WriteObjectField("profiles") + dest.WriteArrayStart() + orig.Profiles[0].MarshalJSON(dest) + for i := 1; i < len(orig.Profiles); i++ { + dest.WriteMore() + orig.Profiles[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ScopeProfiles) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "scope": + + orig.Scope.UnmarshalJSON(iter) + case "profiles": + for iter.ReadArray() { + orig.Profiles = append(orig.Profiles, NewProfile()) + orig.Profiles[len(orig.Profiles)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ScopeProfiles) SizeProto() int { + var n int + var l int + _ = l + l = orig.Scope.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.Profiles { + l = orig.Profiles[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ScopeProfiles) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Scope.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.Profiles) - 1; i >= 0; i-- { + l = orig.Profiles[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *ScopeProfiles) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Scope.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Profiles = append(orig.Profiles, NewProfile()) + err = orig.Profiles[len(orig.Profiles)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestScopeProfiles() *ScopeProfiles { + orig := NewScopeProfiles() + orig.Scope = *GenTestInstrumentationScope() + orig.Profiles = []*Profile{{}, GenTestProfile()} + orig.SchemaUrl = "test_schemaurl" + return orig +} + +func GenTestScopeProfilesPtrSlice() []*ScopeProfiles { + orig := make([]*ScopeProfiles, 5) + orig[0] = NewScopeProfiles() + orig[1] = GenTestScopeProfiles() + orig[2] = NewScopeProfiles() + orig[3] = GenTestScopeProfiles() + orig[4] = NewScopeProfiles() + return orig +} + +func GenTestScopeProfilesSlice() []ScopeProfiles { + orig := make([]ScopeProfiles, 5) + orig[1] = *GenTestScopeProfiles() + orig[3] = *GenTestScopeProfiles() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopespans.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopespans.go new file mode 100644 index 00000000000..6a1966527ab --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_scopespans.go @@ -0,0 +1,313 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ScopeSpans is a collection of spans from a LibraryInstrumentation. +type ScopeSpans struct { + SchemaUrl string + Spans []*Span + Scope InstrumentationScope +} + +var ( + protoPoolScopeSpans = sync.Pool{ + New: func() any { + return &ScopeSpans{} + }, + } +) + +func NewScopeSpans() *ScopeSpans { + if !UseProtoPooling.IsEnabled() { + return &ScopeSpans{} + } + return protoPoolScopeSpans.Get().(*ScopeSpans) +} + +func DeleteScopeSpans(orig *ScopeSpans, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteInstrumentationScope(&orig.Scope, false) + for i := range orig.Spans { + DeleteSpan(orig.Spans[i], true) + } + + orig.Reset() + if nullable { + protoPoolScopeSpans.Put(orig) + } +} + +func CopyScopeSpans(dest, src *ScopeSpans) *ScopeSpans { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewScopeSpans() + } + CopyInstrumentationScope(&dest.Scope, &src.Scope) + + dest.Spans = CopySpanPtrSlice(dest.Spans, src.Spans) + + dest.SchemaUrl = src.SchemaUrl + + return dest +} + +func CopyScopeSpansSlice(dest, src []ScopeSpans) []ScopeSpans { + var newDest []ScopeSpans + if cap(dest) < len(src) { + newDest = make([]ScopeSpans, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeSpans(&dest[i], false) + } + } + for i := range src { + CopyScopeSpans(&newDest[i], &src[i]) + } + return newDest +} + +func CopyScopeSpansPtrSlice(dest, src []*ScopeSpans) []*ScopeSpans { + var newDest []*ScopeSpans + if cap(dest) < len(src) { + newDest = make([]*ScopeSpans, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeSpans() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteScopeSpans(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewScopeSpans() + } + } + for i := range src { + CopyScopeSpans(newDest[i], src[i]) + } + return newDest +} + +func (orig *ScopeSpans) Reset() { + *orig = ScopeSpans{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ScopeSpans) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + dest.WriteObjectField("scope") + orig.Scope.MarshalJSON(dest) + if len(orig.Spans) > 0 { + dest.WriteObjectField("spans") + dest.WriteArrayStart() + orig.Spans[0].MarshalJSON(dest) + for i := 1; i < len(orig.Spans); i++ { + dest.WriteMore() + orig.Spans[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.SchemaUrl != "" { + dest.WriteObjectField("schemaUrl") + dest.WriteString(orig.SchemaUrl) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ScopeSpans) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "scope": + + orig.Scope.UnmarshalJSON(iter) + case "spans": + for iter.ReadArray() { + orig.Spans = append(orig.Spans, NewSpan()) + orig.Spans[len(orig.Spans)-1].UnmarshalJSON(iter) + } + + case "schemaUrl", "schema_url": + orig.SchemaUrl = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *ScopeSpans) SizeProto() int { + var n int + var l int + _ = l + l = orig.Scope.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + for i := range orig.Spans { + l = orig.Spans[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.SchemaUrl) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *ScopeSpans) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.Scope.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + for i := len(orig.Spans) - 1; i >= 0; i-- { + l = orig.Spans[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = len(orig.SchemaUrl) + if l > 0 { + pos -= l + copy(buf[pos:], orig.SchemaUrl) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *ScopeSpans) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Scope.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Spans = append(orig.Spans, NewSpan()) + err = orig.Spans[len(orig.Spans)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.SchemaUrl = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestScopeSpans() *ScopeSpans { + orig := NewScopeSpans() + orig.Scope = *GenTestInstrumentationScope() + orig.Spans = []*Span{{}, GenTestSpan()} + orig.SchemaUrl = "test_schemaurl" + return orig +} + +func GenTestScopeSpansPtrSlice() []*ScopeSpans { + orig := make([]*ScopeSpans, 5) + orig[0] = NewScopeSpans() + orig[1] = GenTestScopeSpans() + orig[2] = NewScopeSpans() + orig[3] = GenTestScopeSpans() + orig[4] = NewScopeSpans() + return orig +} + +func GenTestScopeSpansSlice() []ScopeSpans { + orig := make([]ScopeSpans, 5) + orig[1] = *GenTestScopeSpans() + orig[3] = *GenTestScopeSpans() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_span.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_span.go new file mode 100644 index 00000000000..4df8e982e90 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_span.go @@ -0,0 +1,765 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Span represents a single operation within a trace. +// See Span definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto +type Span struct { + TraceState string + Name string + Attributes []KeyValue + Events []*SpanEvent + Links []*SpanLink + Status Status + StartTimeUnixNano uint64 + EndTimeUnixNano uint64 + Flags uint32 + Kind SpanKind + DroppedAttributesCount uint32 + DroppedEventsCount uint32 + DroppedLinksCount uint32 + TraceId TraceID + SpanId SpanID + ParentSpanId SpanID +} + +var ( + protoPoolSpan = sync.Pool{ + New: func() any { + return &Span{} + }, + } +) + +func NewSpan() *Span { + if !UseProtoPooling.IsEnabled() { + return &Span{} + } + return protoPoolSpan.Get().(*Span) +} + +func DeleteSpan(orig *Span, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteTraceID(&orig.TraceId, false) + DeleteSpanID(&orig.SpanId, false) + + DeleteSpanID(&orig.ParentSpanId, false) + + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + for i := range orig.Events { + DeleteSpanEvent(orig.Events[i], true) + } + + for i := range orig.Links { + DeleteSpanLink(orig.Links[i], true) + } + + DeleteStatus(&orig.Status, false) + orig.Reset() + if nullable { + protoPoolSpan.Put(orig) + } +} + +func CopySpan(dest, src *Span) *Span { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSpan() + } + CopyTraceID(&dest.TraceId, &src.TraceId) + + CopySpanID(&dest.SpanId, &src.SpanId) + + dest.TraceState = src.TraceState + CopySpanID(&dest.ParentSpanId, &src.ParentSpanId) + + dest.Flags = src.Flags + dest.Name = src.Name + dest.Kind = src.Kind + dest.StartTimeUnixNano = src.StartTimeUnixNano + dest.EndTimeUnixNano = src.EndTimeUnixNano + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + dest.Events = CopySpanEventPtrSlice(dest.Events, src.Events) + + dest.DroppedEventsCount = src.DroppedEventsCount + dest.Links = CopySpanLinkPtrSlice(dest.Links, src.Links) + + dest.DroppedLinksCount = src.DroppedLinksCount + CopyStatus(&dest.Status, &src.Status) + + return dest +} + +func CopySpanSlice(dest, src []Span) []Span { + var newDest []Span + if cap(dest) < len(src) { + newDest = make([]Span, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpan(&dest[i], false) + } + } + for i := range src { + CopySpan(&newDest[i], &src[i]) + } + return newDest +} + +func CopySpanPtrSlice(dest, src []*Span) []*Span { + var newDest []*Span + if cap(dest) < len(src) { + newDest = make([]*Span, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpan() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpan(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpan() + } + } + for i := range src { + CopySpan(newDest[i], src[i]) + } + return newDest +} + +func (orig *Span) Reset() { + *orig = Span{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Span) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if !orig.TraceId.IsEmpty() { + dest.WriteObjectField("traceId") + orig.TraceId.MarshalJSON(dest) + } + if !orig.SpanId.IsEmpty() { + dest.WriteObjectField("spanId") + orig.SpanId.MarshalJSON(dest) + } + if orig.TraceState != "" { + dest.WriteObjectField("traceState") + dest.WriteString(orig.TraceState) + } + if !orig.ParentSpanId.IsEmpty() { + dest.WriteObjectField("parentSpanId") + orig.ParentSpanId.MarshalJSON(dest) + } + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + if orig.Name != "" { + dest.WriteObjectField("name") + dest.WriteString(orig.Name) + } + + if int32(orig.Kind) != 0 { + dest.WriteObjectField("kind") + dest.WriteInt32(int32(orig.Kind)) + } + if orig.StartTimeUnixNano != uint64(0) { + dest.WriteObjectField("startTimeUnixNano") + dest.WriteUint64(orig.StartTimeUnixNano) + } + if orig.EndTimeUnixNano != uint64(0) { + dest.WriteObjectField("endTimeUnixNano") + dest.WriteUint64(orig.EndTimeUnixNano) + } + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + if len(orig.Events) > 0 { + dest.WriteObjectField("events") + dest.WriteArrayStart() + orig.Events[0].MarshalJSON(dest) + for i := 1; i < len(orig.Events); i++ { + dest.WriteMore() + orig.Events[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedEventsCount != uint32(0) { + dest.WriteObjectField("droppedEventsCount") + dest.WriteUint32(orig.DroppedEventsCount) + } + if len(orig.Links) > 0 { + dest.WriteObjectField("links") + dest.WriteArrayStart() + orig.Links[0].MarshalJSON(dest) + for i := 1; i < len(orig.Links); i++ { + dest.WriteMore() + orig.Links[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedLinksCount != uint32(0) { + dest.WriteObjectField("droppedLinksCount") + dest.WriteUint32(orig.DroppedLinksCount) + } + dest.WriteObjectField("status") + orig.Status.MarshalJSON(dest) + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Span) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "traceId", "trace_id": + + orig.TraceId.UnmarshalJSON(iter) + case "spanId", "span_id": + + orig.SpanId.UnmarshalJSON(iter) + case "traceState", "trace_state": + orig.TraceState = iter.ReadString() + case "parentSpanId", "parent_span_id": + + orig.ParentSpanId.UnmarshalJSON(iter) + case "flags": + orig.Flags = iter.ReadUint32() + case "name": + orig.Name = iter.ReadString() + case "kind": + orig.Kind = SpanKind(iter.ReadEnumValue(SpanKind_value)) + case "startTimeUnixNano", "start_time_unix_nano": + orig.StartTimeUnixNano = iter.ReadUint64() + case "endTimeUnixNano", "end_time_unix_nano": + orig.EndTimeUnixNano = iter.ReadUint64() + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + case "events": + for iter.ReadArray() { + orig.Events = append(orig.Events, NewSpanEvent()) + orig.Events[len(orig.Events)-1].UnmarshalJSON(iter) + } + + case "droppedEventsCount", "dropped_events_count": + orig.DroppedEventsCount = iter.ReadUint32() + case "links": + for iter.ReadArray() { + orig.Links = append(orig.Links, NewSpanLink()) + orig.Links[len(orig.Links)-1].UnmarshalJSON(iter) + } + + case "droppedLinksCount", "dropped_links_count": + orig.DroppedLinksCount = iter.ReadUint32() + case "status": + + orig.Status.UnmarshalJSON(iter) + default: + iter.Skip() + } + } +} + +func (orig *Span) SizeProto() int { + var n int + var l int + _ = l + l = orig.TraceId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.SpanId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + + l = len(orig.TraceState) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.ParentSpanId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.Flags != uint32(0) { + n += 6 + } + + l = len(orig.Name) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Kind != SpanKind(0) { + n += 1 + proto.Sov(uint64(orig.Kind)) + } + if orig.StartTimeUnixNano != uint64(0) { + n += 9 + } + if orig.EndTimeUnixNano != uint64(0) { + n += 9 + } + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + for i := range orig.Events { + l = orig.Events[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedEventsCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedEventsCount)) + } + for i := range orig.Links { + l = orig.Links[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedLinksCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedLinksCount)) + } + l = orig.Status.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + return n +} + +func (orig *Span) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.TraceId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + l = orig.SpanId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + l = len(orig.TraceState) + if l > 0 { + pos -= l + copy(buf[pos:], orig.TraceState) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + l = orig.ParentSpanId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + + if orig.Flags != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.Flags)) + pos-- + buf[pos] = 0x1 + pos-- + buf[pos] = 0x85 + } + l = len(orig.Name) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Name) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x2a + } + if orig.Kind != SpanKind(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Kind)) + pos-- + buf[pos] = 0x30 + } + if orig.StartTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.StartTimeUnixNano)) + pos-- + buf[pos] = 0x39 + } + if orig.EndTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.EndTimeUnixNano)) + pos-- + buf[pos] = 0x41 + } + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x4a + } + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x50 + } + for i := len(orig.Events) - 1; i >= 0; i-- { + l = orig.Events[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x5a + } + if orig.DroppedEventsCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedEventsCount)) + pos-- + buf[pos] = 0x60 + } + for i := len(orig.Links) - 1; i >= 0; i-- { + l = orig.Links[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x6a + } + if orig.DroppedLinksCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedLinksCount)) + pos-- + buf[pos] = 0x70 + } + l = orig.Status.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x7a + + return len(buf) - pos +} + +func (orig *Span) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TraceId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SpanId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.TraceState = string(buf[startPos:pos]) + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ParentSpanId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.ParentSpanId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 16: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.Flags = uint32(num) + + case 5: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Name = string(buf[startPos:pos]) + + case 6: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Kind = SpanKind(num) + + case 7: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.StartTimeUnixNano = uint64(num) + + case 8: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.EndTimeUnixNano = uint64(num) + + case 9: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 10: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + + case 11: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Events = append(orig.Events, NewSpanEvent()) + err = orig.Events[len(orig.Events)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 12: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedEventsCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedEventsCount = uint32(num) + + case 13: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Links = append(orig.Links, NewSpanLink()) + err = orig.Links[len(orig.Links)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 14: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedLinksCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedLinksCount = uint32(num) + + case 15: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.Status.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSpan() *Span { + orig := NewSpan() + orig.TraceId = *GenTestTraceID() + orig.SpanId = *GenTestSpanID() + orig.TraceState = "test_tracestate" + orig.ParentSpanId = *GenTestSpanID() + orig.Flags = uint32(13) + orig.Name = "test_name" + orig.Kind = SpanKind(13) + orig.StartTimeUnixNano = uint64(13) + orig.EndTimeUnixNano = uint64(13) + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.DroppedAttributesCount = uint32(13) + orig.Events = []*SpanEvent{{}, GenTestSpanEvent()} + orig.DroppedEventsCount = uint32(13) + orig.Links = []*SpanLink{{}, GenTestSpanLink()} + orig.DroppedLinksCount = uint32(13) + orig.Status = *GenTestStatus() + return orig +} + +func GenTestSpanPtrSlice() []*Span { + orig := make([]*Span, 5) + orig[0] = NewSpan() + orig[1] = GenTestSpan() + orig[2] = NewSpan() + orig[3] = GenTestSpan() + orig[4] = NewSpan() + return orig +} + +func GenTestSpanSlice() []Span { + orig := make([]Span, 5) + orig[1] = *GenTestSpan() + orig[3] = *GenTestSpan() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spancontext.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spancontext.go new file mode 100644 index 00000000000..2861cf11754 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spancontext.go @@ -0,0 +1,364 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type SpanContext struct { + TraceState string + TraceFlags uint32 + TraceID TraceID + SpanID SpanID + Remote bool +} + +var ( + protoPoolSpanContext = sync.Pool{ + New: func() any { + return &SpanContext{} + }, + } +) + +func NewSpanContext() *SpanContext { + if !UseProtoPooling.IsEnabled() { + return &SpanContext{} + } + return protoPoolSpanContext.Get().(*SpanContext) +} + +func DeleteSpanContext(orig *SpanContext, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteTraceID(&orig.TraceID, false) + DeleteSpanID(&orig.SpanID, false) + + orig.Reset() + if nullable { + protoPoolSpanContext.Put(orig) + } +} + +func CopySpanContext(dest, src *SpanContext) *SpanContext { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSpanContext() + } + CopyTraceID(&dest.TraceID, &src.TraceID) + + CopySpanID(&dest.SpanID, &src.SpanID) + + dest.TraceFlags = src.TraceFlags + dest.TraceState = src.TraceState + dest.Remote = src.Remote + + return dest +} + +func CopySpanContextSlice(dest, src []SpanContext) []SpanContext { + var newDest []SpanContext + if cap(dest) < len(src) { + newDest = make([]SpanContext, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpanContext(&dest[i], false) + } + } + for i := range src { + CopySpanContext(&newDest[i], &src[i]) + } + return newDest +} + +func CopySpanContextPtrSlice(dest, src []*SpanContext) []*SpanContext { + var newDest []*SpanContext + if cap(dest) < len(src) { + newDest = make([]*SpanContext, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpanContext() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpanContext(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpanContext() + } + } + for i := range src { + CopySpanContext(newDest[i], src[i]) + } + return newDest +} + +func (orig *SpanContext) Reset() { + *orig = SpanContext{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *SpanContext) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if !orig.TraceID.IsEmpty() { + dest.WriteObjectField("traceID") + orig.TraceID.MarshalJSON(dest) + } + if !orig.SpanID.IsEmpty() { + dest.WriteObjectField("spanID") + orig.SpanID.MarshalJSON(dest) + } + if orig.TraceFlags != uint32(0) { + dest.WriteObjectField("traceFlags") + dest.WriteUint32(orig.TraceFlags) + } + if orig.TraceState != "" { + dest.WriteObjectField("traceState") + dest.WriteString(orig.TraceState) + } + if orig.Remote != false { + dest.WriteObjectField("remote") + dest.WriteBool(orig.Remote) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *SpanContext) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "traceID", "trace_id": + + orig.TraceID.UnmarshalJSON(iter) + case "spanID", "span_id": + + orig.SpanID.UnmarshalJSON(iter) + case "traceFlags", "trace_flags": + orig.TraceFlags = iter.ReadUint32() + case "traceState", "trace_state": + orig.TraceState = iter.ReadString() + case "remote": + orig.Remote = iter.ReadBool() + default: + iter.Skip() + } + } +} + +func (orig *SpanContext) SizeProto() int { + var n int + var l int + _ = l + l = orig.TraceID.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.SpanID.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.TraceFlags != uint32(0) { + n += 5 + } + + l = len(orig.TraceState) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Remote != false { + n += 2 + } + return n +} + +func (orig *SpanContext) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.TraceID.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + l = orig.SpanID.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + if orig.TraceFlags != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.TraceFlags)) + pos-- + buf[pos] = 0x1d + } + l = len(orig.TraceState) + if l > 0 { + pos -= l + copy(buf[pos:], orig.TraceState) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + } + if orig.Remote != false { + pos-- + if orig.Remote { + buf[pos] = 1 + } else { + buf[pos] = 0 + } + pos-- + buf[pos] = 0x28 + } + return len(buf) - pos +} + +func (orig *SpanContext) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TraceID.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SpanID.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceFlags", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.TraceFlags = uint32(num) + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.TraceState = string(buf[startPos:pos]) + + case 5: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Remote = num != 0 + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSpanContext() *SpanContext { + orig := NewSpanContext() + orig.TraceID = *GenTestTraceID() + orig.SpanID = *GenTestSpanID() + orig.TraceFlags = uint32(13) + orig.TraceState = "test_tracestate" + orig.Remote = true + return orig +} + +func GenTestSpanContextPtrSlice() []*SpanContext { + orig := make([]*SpanContext, 5) + orig[0] = NewSpanContext() + orig[1] = GenTestSpanContext() + orig[2] = NewSpanContext() + orig[3] = GenTestSpanContext() + orig[4] = NewSpanContext() + return orig +} + +func GenTestSpanContextSlice() []SpanContext { + orig := make([]SpanContext, 5) + orig[1] = *GenTestSpanContext() + orig[3] = *GenTestSpanContext() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spanevent.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spanevent.go new file mode 100644 index 00000000000..56d1ea50b5a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spanevent.go @@ -0,0 +1,340 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// SpanEvent is a time-stamped annotation of the span, consisting of user-supplied +// text description and key-value pairs. See OTLP for event definition. +type SpanEvent struct { + Name string + Attributes []KeyValue + TimeUnixNano uint64 + DroppedAttributesCount uint32 +} + +var ( + protoPoolSpanEvent = sync.Pool{ + New: func() any { + return &SpanEvent{} + }, + } +) + +func NewSpanEvent() *SpanEvent { + if !UseProtoPooling.IsEnabled() { + return &SpanEvent{} + } + return protoPoolSpanEvent.Get().(*SpanEvent) +} + +func DeleteSpanEvent(orig *SpanEvent, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + orig.Reset() + if nullable { + protoPoolSpanEvent.Put(orig) + } +} + +func CopySpanEvent(dest, src *SpanEvent) *SpanEvent { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSpanEvent() + } + dest.TimeUnixNano = src.TimeUnixNano + dest.Name = src.Name + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + + return dest +} + +func CopySpanEventSlice(dest, src []SpanEvent) []SpanEvent { + var newDest []SpanEvent + if cap(dest) < len(src) { + newDest = make([]SpanEvent, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpanEvent(&dest[i], false) + } + } + for i := range src { + CopySpanEvent(&newDest[i], &src[i]) + } + return newDest +} + +func CopySpanEventPtrSlice(dest, src []*SpanEvent) []*SpanEvent { + var newDest []*SpanEvent + if cap(dest) < len(src) { + newDest = make([]*SpanEvent, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpanEvent() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpanEvent(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpanEvent() + } + } + for i := range src { + CopySpanEvent(newDest[i], src[i]) + } + return newDest +} + +func (orig *SpanEvent) Reset() { + *orig = SpanEvent{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *SpanEvent) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + if orig.Name != "" { + dest.WriteObjectField("name") + dest.WriteString(orig.Name) + } + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *SpanEvent) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + case "name": + orig.Name = iter.ReadString() + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *SpanEvent) SizeProto() int { + var n int + var l int + _ = l + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + + l = len(orig.Name) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + return n +} + +func (orig *SpanEvent) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x9 + } + l = len(orig.Name) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Name) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x20 + } + return len(buf) - pos +} + +func (orig *SpanEvent) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Name = string(buf[startPos:pos]) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 4: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSpanEvent() *SpanEvent { + orig := NewSpanEvent() + orig.TimeUnixNano = uint64(13) + orig.Name = "test_name" + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.DroppedAttributesCount = uint32(13) + return orig +} + +func GenTestSpanEventPtrSlice() []*SpanEvent { + orig := make([]*SpanEvent, 5) + orig[0] = NewSpanEvent() + orig[1] = GenTestSpanEvent() + orig[2] = NewSpanEvent() + orig[3] = GenTestSpanEvent() + orig[4] = NewSpanEvent() + return orig +} + +func GenTestSpanEventSlice() []SpanEvent { + orig := make([]SpanEvent, 5) + orig[1] = *GenTestSpanEvent() + orig[3] = *GenTestSpanEvent() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spanlink.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spanlink.go new file mode 100644 index 00000000000..a7f8a670db4 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_spanlink.go @@ -0,0 +1,413 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// SpanLink is a pointer from the current span to another span in the same trace or in a +// different trace. +// See Link definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto +type SpanLink struct { + TraceState string + Attributes []KeyValue + DroppedAttributesCount uint32 + Flags uint32 + TraceId TraceID + SpanId SpanID +} + +var ( + protoPoolSpanLink = sync.Pool{ + New: func() any { + return &SpanLink{} + }, + } +) + +func NewSpanLink() *SpanLink { + if !UseProtoPooling.IsEnabled() { + return &SpanLink{} + } + return protoPoolSpanLink.Get().(*SpanLink) +} + +func DeleteSpanLink(orig *SpanLink, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteTraceID(&orig.TraceId, false) + DeleteSpanID(&orig.SpanId, false) + + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + orig.Reset() + if nullable { + protoPoolSpanLink.Put(orig) + } +} + +func CopySpanLink(dest, src *SpanLink) *SpanLink { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSpanLink() + } + CopyTraceID(&dest.TraceId, &src.TraceId) + + CopySpanID(&dest.SpanId, &src.SpanId) + + dest.TraceState = src.TraceState + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.DroppedAttributesCount = src.DroppedAttributesCount + dest.Flags = src.Flags + + return dest +} + +func CopySpanLinkSlice(dest, src []SpanLink) []SpanLink { + var newDest []SpanLink + if cap(dest) < len(src) { + newDest = make([]SpanLink, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpanLink(&dest[i], false) + } + } + for i := range src { + CopySpanLink(&newDest[i], &src[i]) + } + return newDest +} + +func CopySpanLinkPtrSlice(dest, src []*SpanLink) []*SpanLink { + var newDest []*SpanLink + if cap(dest) < len(src) { + newDest = make([]*SpanLink, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpanLink() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSpanLink(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSpanLink() + } + } + for i := range src { + CopySpanLink(newDest[i], src[i]) + } + return newDest +} + +func (orig *SpanLink) Reset() { + *orig = SpanLink{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *SpanLink) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if !orig.TraceId.IsEmpty() { + dest.WriteObjectField("traceId") + orig.TraceId.MarshalJSON(dest) + } + if !orig.SpanId.IsEmpty() { + dest.WriteObjectField("spanId") + orig.SpanId.MarshalJSON(dest) + } + if orig.TraceState != "" { + dest.WriteObjectField("traceState") + dest.WriteString(orig.TraceState) + } + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.DroppedAttributesCount != uint32(0) { + dest.WriteObjectField("droppedAttributesCount") + dest.WriteUint32(orig.DroppedAttributesCount) + } + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *SpanLink) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "traceId", "trace_id": + + orig.TraceId.UnmarshalJSON(iter) + case "spanId", "span_id": + + orig.SpanId.UnmarshalJSON(iter) + case "traceState", "trace_state": + orig.TraceState = iter.ReadString() + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "droppedAttributesCount", "dropped_attributes_count": + orig.DroppedAttributesCount = iter.ReadUint32() + case "flags": + orig.Flags = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *SpanLink) SizeProto() int { + var n int + var l int + _ = l + l = orig.TraceId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + l = orig.SpanId.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + + l = len(orig.TraceState) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.DroppedAttributesCount != uint32(0) { + n += 1 + proto.Sov(uint64(orig.DroppedAttributesCount)) + } + if orig.Flags != uint32(0) { + n += 5 + } + return n +} + +func (orig *SpanLink) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = orig.TraceId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + + l = orig.SpanId.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + + l = len(orig.TraceState) + if l > 0 { + pos -= l + copy(buf[pos:], orig.TraceState) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x22 + } + if orig.DroppedAttributesCount != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.DroppedAttributesCount)) + pos-- + buf[pos] = 0x28 + } + if orig.Flags != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.Flags)) + pos-- + buf[pos] = 0x35 + } + return len(buf) - pos +} + +func (orig *SpanLink) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TraceId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.SpanId.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.TraceState = string(buf[startPos:pos]) + + case 4: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 5: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.DroppedAttributesCount = uint32(num) + + case 6: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.Flags = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSpanLink() *SpanLink { + orig := NewSpanLink() + orig.TraceId = *GenTestTraceID() + orig.SpanId = *GenTestSpanID() + orig.TraceState = "test_tracestate" + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.DroppedAttributesCount = uint32(13) + orig.Flags = uint32(13) + return orig +} + +func GenTestSpanLinkPtrSlice() []*SpanLink { + orig := make([]*SpanLink, 5) + orig[0] = NewSpanLink() + orig[1] = GenTestSpanLink() + orig[2] = NewSpanLink() + orig[3] = GenTestSpanLink() + orig[4] = NewSpanLink() + return orig +} + +func GenTestSpanLinkSlice() []SpanLink { + orig := make([]SpanLink, 5) + orig[1] = *GenTestSpanLink() + orig[3] = *GenTestSpanLink() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_stack.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_stack.go new file mode 100644 index 00000000000..be7a4ce48a7 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_stack.go @@ -0,0 +1,263 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Stack represents a stack trace as a list of locations. + +type Stack struct { + LocationIndices []int32 +} + +var ( + protoPoolStack = sync.Pool{ + New: func() any { + return &Stack{} + }, + } +) + +func NewStack() *Stack { + if !UseProtoPooling.IsEnabled() { + return &Stack{} + } + return protoPoolStack.Get().(*Stack) +} + +func DeleteStack(orig *Stack, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolStack.Put(orig) + } +} + +func CopyStack(dest, src *Stack) *Stack { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewStack() + } + dest.LocationIndices = append(dest.LocationIndices[:0], src.LocationIndices...) + + return dest +} + +func CopyStackSlice(dest, src []Stack) []Stack { + var newDest []Stack + if cap(dest) < len(src) { + newDest = make([]Stack, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteStack(&dest[i], false) + } + } + for i := range src { + CopyStack(&newDest[i], &src[i]) + } + return newDest +} + +func CopyStackPtrSlice(dest, src []*Stack) []*Stack { + var newDest []*Stack + if cap(dest) < len(src) { + newDest = make([]*Stack, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewStack() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteStack(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewStack() + } + } + for i := range src { + CopyStack(newDest[i], src[i]) + } + return newDest +} + +func (orig *Stack) Reset() { + *orig = Stack{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Stack) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.LocationIndices) > 0 { + dest.WriteObjectField("locationIndices") + dest.WriteArrayStart() + dest.WriteInt32(orig.LocationIndices[0]) + for i := 1; i < len(orig.LocationIndices); i++ { + dest.WriteMore() + dest.WriteInt32(orig.LocationIndices[i]) + } + dest.WriteArrayEnd() + } + + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Stack) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "locationIndices", "location_indices": + for iter.ReadArray() { + orig.LocationIndices = append(orig.LocationIndices, iter.ReadInt32()) + } + + default: + iter.Skip() + } + } +} + +func (orig *Stack) SizeProto() int { + var n int + var l int + _ = l + + if len(orig.LocationIndices) > 0 { + l = 0 + for _, e := range orig.LocationIndices { + l += proto.Sov(uint64(e)) + } + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Stack) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.LocationIndices) + if l > 0 { + endPos := pos + for i := l - 1; i >= 0; i-- { + pos = proto.EncodeVarint(buf, pos, uint64(orig.LocationIndices[i])) + } + pos = proto.EncodeVarint(buf, pos, uint64(endPos-pos)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *Stack) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + case 1: + switch wireType { + case proto.WireTypeLen: + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + var num uint64 + for startPos < pos { + num, startPos, err = proto.ConsumeVarint(buf[:pos], startPos) + if err != nil { + return err + } + orig.LocationIndices = append(orig.LocationIndices, int32(num)) + } + if startPos != pos { + return fmt.Errorf("proto: invalid field len = %d for field LocationIndices", pos-startPos) + } + case proto.WireTypeVarint: + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.LocationIndices = append(orig.LocationIndices, int32(num)) + default: + return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestStack() *Stack { + orig := NewStack() + orig.LocationIndices = []int32{int32(0), int32(13)} + return orig +} + +func GenTestStackPtrSlice() []*Stack { + orig := make([]*Stack, 5) + orig[0] = NewStack() + orig[1] = GenTestStack() + orig[2] = NewStack() + orig[3] = GenTestStack() + orig[4] = NewStack() + return orig +} + +func GenTestStackSlice() []Stack { + orig := make([]Stack, 5) + orig[1] = *GenTestStack() + orig[3] = *GenTestStack() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_status.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_status.go new file mode 100644 index 00000000000..77b5fe39268 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_status.go @@ -0,0 +1,259 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Status is an optional final status for this span. Semantically, when Status was not +// set, that means the span ended without errors and to assume Status.Ok (code = 0). +type Status struct { + Message string + Code StatusCode +} + +var ( + protoPoolStatus = sync.Pool{ + New: func() any { + return &Status{} + }, + } +) + +func NewStatus() *Status { + if !UseProtoPooling.IsEnabled() { + return &Status{} + } + return protoPoolStatus.Get().(*Status) +} + +func DeleteStatus(orig *Status, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolStatus.Put(orig) + } +} + +func CopyStatus(dest, src *Status) *Status { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewStatus() + } + dest.Message = src.Message + dest.Code = src.Code + + return dest +} + +func CopyStatusSlice(dest, src []Status) []Status { + var newDest []Status + if cap(dest) < len(src) { + newDest = make([]Status, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteStatus(&dest[i], false) + } + } + for i := range src { + CopyStatus(&newDest[i], &src[i]) + } + return newDest +} + +func CopyStatusPtrSlice(dest, src []*Status) []*Status { + var newDest []*Status + if cap(dest) < len(src) { + newDest = make([]*Status, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewStatus() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteStatus(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewStatus() + } + } + for i := range src { + CopyStatus(newDest[i], src[i]) + } + return newDest +} + +func (orig *Status) Reset() { + *orig = Status{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Status) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Message != "" { + dest.WriteObjectField("message") + dest.WriteString(orig.Message) + } + + if int32(orig.Code) != 0 { + dest.WriteObjectField("code") + dest.WriteInt32(int32(orig.Code)) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Status) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "message": + orig.Message = iter.ReadString() + case "code": + orig.Code = StatusCode(iter.ReadEnumValue(StatusCode_value)) + default: + iter.Skip() + } + } +} + +func (orig *Status) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.Message) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Code != StatusCode(0) { + n += 1 + proto.Sov(uint64(orig.Code)) + } + return n +} + +func (orig *Status) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.Message) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Message) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + if orig.Code != StatusCode(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Code)) + pos-- + buf[pos] = 0x18 + } + return len(buf) - pos +} + +func (orig *Status) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Message = string(buf[startPos:pos]) + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Code = StatusCode(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestStatus() *Status { + orig := NewStatus() + orig.Message = "test_message" + orig.Code = StatusCode(13) + return orig +} + +func GenTestStatusPtrSlice() []*Status { + orig := make([]*Status, 5) + orig[0] = NewStatus() + orig[1] = GenTestStatus() + orig[2] = NewStatus() + orig[3] = GenTestStatus() + orig[4] = NewStatus() + return orig +} + +func GenTestStatusSlice() []Status { + orig := make([]Status, 5) + orig[1] = *GenTestStatus() + orig[3] = *GenTestStatus() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_sum.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_sum.go new file mode 100644 index 00000000000..f419344b54d --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_sum.go @@ -0,0 +1,307 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Sum represents the type of a numeric metric that is calculated as a sum of all reported measurements over a time interval. +type Sum struct { + DataPoints []*NumberDataPoint + AggregationTemporality AggregationTemporality + IsMonotonic bool +} + +var ( + protoPoolSum = sync.Pool{ + New: func() any { + return &Sum{} + }, + } +) + +func NewSum() *Sum { + if !UseProtoPooling.IsEnabled() { + return &Sum{} + } + return protoPoolSum.Get().(*Sum) +} + +func DeleteSum(orig *Sum, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.DataPoints { + DeleteNumberDataPoint(orig.DataPoints[i], true) + } + + orig.Reset() + if nullable { + protoPoolSum.Put(orig) + } +} + +func CopySum(dest, src *Sum) *Sum { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSum() + } + dest.DataPoints = CopyNumberDataPointPtrSlice(dest.DataPoints, src.DataPoints) + + dest.AggregationTemporality = src.AggregationTemporality + dest.IsMonotonic = src.IsMonotonic + + return dest +} + +func CopySumSlice(dest, src []Sum) []Sum { + var newDest []Sum + if cap(dest) < len(src) { + newDest = make([]Sum, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSum(&dest[i], false) + } + } + for i := range src { + CopySum(&newDest[i], &src[i]) + } + return newDest +} + +func CopySumPtrSlice(dest, src []*Sum) []*Sum { + var newDest []*Sum + if cap(dest) < len(src) { + newDest = make([]*Sum, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSum() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSum(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSum() + } + } + for i := range src { + CopySum(newDest[i], src[i]) + } + return newDest +} + +func (orig *Sum) Reset() { + *orig = Sum{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Sum) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.DataPoints) > 0 { + dest.WriteObjectField("dataPoints") + dest.WriteArrayStart() + orig.DataPoints[0].MarshalJSON(dest) + for i := 1; i < len(orig.DataPoints); i++ { + dest.WriteMore() + orig.DataPoints[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + + if int32(orig.AggregationTemporality) != 0 { + dest.WriteObjectField("aggregationTemporality") + dest.WriteInt32(int32(orig.AggregationTemporality)) + } + if orig.IsMonotonic != false { + dest.WriteObjectField("isMonotonic") + dest.WriteBool(orig.IsMonotonic) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Sum) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "dataPoints", "data_points": + for iter.ReadArray() { + orig.DataPoints = append(orig.DataPoints, NewNumberDataPoint()) + orig.DataPoints[len(orig.DataPoints)-1].UnmarshalJSON(iter) + } + + case "aggregationTemporality", "aggregation_temporality": + orig.AggregationTemporality = AggregationTemporality(iter.ReadEnumValue(AggregationTemporality_value)) + case "isMonotonic", "is_monotonic": + orig.IsMonotonic = iter.ReadBool() + default: + iter.Skip() + } + } +} + +func (orig *Sum) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.DataPoints { + l = orig.DataPoints[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.AggregationTemporality != AggregationTemporality(0) { + n += 1 + proto.Sov(uint64(orig.AggregationTemporality)) + } + if orig.IsMonotonic != false { + n += 2 + } + return n +} + +func (orig *Sum) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.DataPoints) - 1; i >= 0; i-- { + l = orig.DataPoints[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.AggregationTemporality != AggregationTemporality(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.AggregationTemporality)) + pos-- + buf[pos] = 0x10 + } + if orig.IsMonotonic != false { + pos-- + if orig.IsMonotonic { + buf[pos] = 1 + } else { + buf[pos] = 0 + } + pos-- + buf[pos] = 0x18 + } + return len(buf) - pos +} + +func (orig *Sum) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DataPoints = append(orig.DataPoints, NewNumberDataPoint()) + err = orig.DataPoints[len(orig.DataPoints)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.AggregationTemporality = AggregationTemporality(num) + + case 3: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field IsMonotonic", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.IsMonotonic = num != 0 + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSum() *Sum { + orig := NewSum() + orig.DataPoints = []*NumberDataPoint{{}, GenTestNumberDataPoint()} + orig.AggregationTemporality = AggregationTemporality(13) + orig.IsMonotonic = true + return orig +} + +func GenTestSumPtrSlice() []*Sum { + orig := make([]*Sum, 5) + orig[0] = NewSum() + orig[1] = GenTestSum() + orig[2] = NewSum() + orig[3] = GenTestSum() + orig[4] = NewSum() + return orig +} + +func GenTestSumSlice() []Sum { + orig := make([]Sum, 5) + orig[1] = *GenTestSum() + orig[3] = *GenTestSum() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summary.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summary.go new file mode 100644 index 00000000000..5523e5af8b3 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summary.go @@ -0,0 +1,243 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// Summary represents the type of a metric that is calculated by aggregating as a Summary of all reported double measurements over a time interval. +type Summary struct { + DataPoints []*SummaryDataPoint +} + +var ( + protoPoolSummary = sync.Pool{ + New: func() any { + return &Summary{} + }, + } +) + +func NewSummary() *Summary { + if !UseProtoPooling.IsEnabled() { + return &Summary{} + } + return protoPoolSummary.Get().(*Summary) +} + +func DeleteSummary(orig *Summary, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.DataPoints { + DeleteSummaryDataPoint(orig.DataPoints[i], true) + } + orig.Reset() + if nullable { + protoPoolSummary.Put(orig) + } +} + +func CopySummary(dest, src *Summary) *Summary { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSummary() + } + dest.DataPoints = CopySummaryDataPointPtrSlice(dest.DataPoints, src.DataPoints) + + return dest +} + +func CopySummarySlice(dest, src []Summary) []Summary { + var newDest []Summary + if cap(dest) < len(src) { + newDest = make([]Summary, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSummary(&dest[i], false) + } + } + for i := range src { + CopySummary(&newDest[i], &src[i]) + } + return newDest +} + +func CopySummaryPtrSlice(dest, src []*Summary) []*Summary { + var newDest []*Summary + if cap(dest) < len(src) { + newDest = make([]*Summary, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSummary() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSummary(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSummary() + } + } + for i := range src { + CopySummary(newDest[i], src[i]) + } + return newDest +} + +func (orig *Summary) Reset() { + *orig = Summary{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *Summary) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.DataPoints) > 0 { + dest.WriteObjectField("dataPoints") + dest.WriteArrayStart() + orig.DataPoints[0].MarshalJSON(dest) + for i := 1; i < len(orig.DataPoints); i++ { + dest.WriteMore() + orig.DataPoints[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *Summary) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "dataPoints", "data_points": + for iter.ReadArray() { + orig.DataPoints = append(orig.DataPoints, NewSummaryDataPoint()) + orig.DataPoints[len(orig.DataPoints)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *Summary) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.DataPoints { + l = orig.DataPoints[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *Summary) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.DataPoints) - 1; i >= 0; i-- { + l = orig.DataPoints[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *Summary) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.DataPoints = append(orig.DataPoints, NewSummaryDataPoint()) + err = orig.DataPoints[len(orig.DataPoints)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSummary() *Summary { + orig := NewSummary() + orig.DataPoints = []*SummaryDataPoint{{}, GenTestSummaryDataPoint()} + return orig +} + +func GenTestSummaryPtrSlice() []*Summary { + orig := make([]*Summary, 5) + orig[0] = NewSummary() + orig[1] = GenTestSummary() + orig[2] = NewSummary() + orig[3] = GenTestSummary() + orig[4] = NewSummary() + return orig +} + +func GenTestSummarySlice() []Summary { + orig := make([]Summary, 5) + orig[1] = *GenTestSummary() + orig[3] = *GenTestSummary() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summarydatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summarydatapoint.go new file mode 100644 index 00000000000..ccd99fa1801 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summarydatapoint.go @@ -0,0 +1,445 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary of double values. +type SummaryDataPoint struct { + Attributes []KeyValue + QuantileValues []*SummaryDataPointValueAtQuantile + StartTimeUnixNano uint64 + TimeUnixNano uint64 + Count uint64 + Sum float64 + Flags uint32 +} + +var ( + protoPoolSummaryDataPoint = sync.Pool{ + New: func() any { + return &SummaryDataPoint{} + }, + } +) + +func NewSummaryDataPoint() *SummaryDataPoint { + if !UseProtoPooling.IsEnabled() { + return &SummaryDataPoint{} + } + return protoPoolSummaryDataPoint.Get().(*SummaryDataPoint) +} + +func DeleteSummaryDataPoint(orig *SummaryDataPoint, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.Attributes { + DeleteKeyValue(&orig.Attributes[i], false) + } + + for i := range orig.QuantileValues { + DeleteSummaryDataPointValueAtQuantile(orig.QuantileValues[i], true) + } + + orig.Reset() + if nullable { + protoPoolSummaryDataPoint.Put(orig) + } +} + +func CopySummaryDataPoint(dest, src *SummaryDataPoint) *SummaryDataPoint { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSummaryDataPoint() + } + dest.Attributes = CopyKeyValueSlice(dest.Attributes, src.Attributes) + + dest.StartTimeUnixNano = src.StartTimeUnixNano + dest.TimeUnixNano = src.TimeUnixNano + dest.Count = src.Count + dest.Sum = src.Sum + dest.QuantileValues = CopySummaryDataPointValueAtQuantilePtrSlice(dest.QuantileValues, src.QuantileValues) + + dest.Flags = src.Flags + + return dest +} + +func CopySummaryDataPointSlice(dest, src []SummaryDataPoint) []SummaryDataPoint { + var newDest []SummaryDataPoint + if cap(dest) < len(src) { + newDest = make([]SummaryDataPoint, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSummaryDataPoint(&dest[i], false) + } + } + for i := range src { + CopySummaryDataPoint(&newDest[i], &src[i]) + } + return newDest +} + +func CopySummaryDataPointPtrSlice(dest, src []*SummaryDataPoint) []*SummaryDataPoint { + var newDest []*SummaryDataPoint + if cap(dest) < len(src) { + newDest = make([]*SummaryDataPoint, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSummaryDataPoint() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSummaryDataPoint(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSummaryDataPoint() + } + } + for i := range src { + CopySummaryDataPoint(newDest[i], src[i]) + } + return newDest +} + +func (orig *SummaryDataPoint) Reset() { + *orig = SummaryDataPoint{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *SummaryDataPoint) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.Attributes) > 0 { + dest.WriteObjectField("attributes") + dest.WriteArrayStart() + orig.Attributes[0].MarshalJSON(dest) + for i := 1; i < len(orig.Attributes); i++ { + dest.WriteMore() + orig.Attributes[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.StartTimeUnixNano != uint64(0) { + dest.WriteObjectField("startTimeUnixNano") + dest.WriteUint64(orig.StartTimeUnixNano) + } + if orig.TimeUnixNano != uint64(0) { + dest.WriteObjectField("timeUnixNano") + dest.WriteUint64(orig.TimeUnixNano) + } + if orig.Count != uint64(0) { + dest.WriteObjectField("count") + dest.WriteUint64(orig.Count) + } + if orig.Sum != float64(0) { + dest.WriteObjectField("sum") + dest.WriteFloat64(orig.Sum) + } + if len(orig.QuantileValues) > 0 { + dest.WriteObjectField("quantileValues") + dest.WriteArrayStart() + orig.QuantileValues[0].MarshalJSON(dest) + for i := 1; i < len(orig.QuantileValues); i++ { + dest.WriteMore() + orig.QuantileValues[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + if orig.Flags != uint32(0) { + dest.WriteObjectField("flags") + dest.WriteUint32(orig.Flags) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *SummaryDataPoint) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "attributes": + for iter.ReadArray() { + orig.Attributes = append(orig.Attributes, KeyValue{}) + orig.Attributes[len(orig.Attributes)-1].UnmarshalJSON(iter) + } + + case "startTimeUnixNano", "start_time_unix_nano": + orig.StartTimeUnixNano = iter.ReadUint64() + case "timeUnixNano", "time_unix_nano": + orig.TimeUnixNano = iter.ReadUint64() + case "count": + orig.Count = iter.ReadUint64() + case "sum": + orig.Sum = iter.ReadFloat64() + case "quantileValues", "quantile_values": + for iter.ReadArray() { + orig.QuantileValues = append(orig.QuantileValues, NewSummaryDataPointValueAtQuantile()) + orig.QuantileValues[len(orig.QuantileValues)-1].UnmarshalJSON(iter) + } + + case "flags": + orig.Flags = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *SummaryDataPoint) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.Attributes { + l = orig.Attributes[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.StartTimeUnixNano != uint64(0) { + n += 9 + } + if orig.TimeUnixNano != uint64(0) { + n += 9 + } + if orig.Count != uint64(0) { + n += 9 + } + if orig.Sum != float64(0) { + n += 9 + } + for i := range orig.QuantileValues { + l = orig.QuantileValues[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Flags != uint32(0) { + n += 1 + proto.Sov(uint64(orig.Flags)) + } + return n +} + +func (orig *SummaryDataPoint) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.Attributes) - 1; i >= 0; i-- { + l = orig.Attributes[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x3a + } + if orig.StartTimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.StartTimeUnixNano)) + pos-- + buf[pos] = 0x11 + } + if orig.TimeUnixNano != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.TimeUnixNano)) + pos-- + buf[pos] = 0x19 + } + if orig.Count != uint64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], uint64(orig.Count)) + pos-- + buf[pos] = 0x21 + } + if orig.Sum != float64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Sum)) + pos-- + buf[pos] = 0x29 + } + for i := len(orig.QuantileValues) - 1; i >= 0; i-- { + l = orig.QuantileValues[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x32 + } + if orig.Flags != uint32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Flags)) + pos-- + buf[pos] = 0x40 + } + return len(buf) - pos +} + +func (orig *SummaryDataPoint) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 7: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Attributes = append(orig.Attributes, KeyValue{}) + err = orig.Attributes[len(orig.Attributes)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 2: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.StartTimeUnixNano = uint64(num) + + case 3: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.TimeUnixNano = uint64(num) + + case 4: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + + orig.Count = uint64(num) + + case 5: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.Sum = math.Float64frombits(num) + + case 6: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field QuantileValues", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.QuantileValues = append(orig.QuantileValues, NewSummaryDataPointValueAtQuantile()) + err = orig.QuantileValues[len(orig.QuantileValues)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 8: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Flags = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSummaryDataPoint() *SummaryDataPoint { + orig := NewSummaryDataPoint() + orig.Attributes = []KeyValue{{}, *GenTestKeyValue()} + orig.StartTimeUnixNano = uint64(13) + orig.TimeUnixNano = uint64(13) + orig.Count = uint64(13) + orig.Sum = float64(3.1415926) + orig.QuantileValues = []*SummaryDataPointValueAtQuantile{{}, GenTestSummaryDataPointValueAtQuantile()} + orig.Flags = uint32(13) + return orig +} + +func GenTestSummaryDataPointPtrSlice() []*SummaryDataPoint { + orig := make([]*SummaryDataPoint, 5) + orig[0] = NewSummaryDataPoint() + orig[1] = GenTestSummaryDataPoint() + orig[2] = NewSummaryDataPoint() + orig[3] = GenTestSummaryDataPoint() + orig[4] = NewSummaryDataPoint() + return orig +} + +func GenTestSummaryDataPointSlice() []SummaryDataPoint { + orig := make([]SummaryDataPoint, 5) + orig[1] = *GenTestSummaryDataPoint() + orig[3] = *GenTestSummaryDataPoint() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summarydatapointvalueatquantile.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summarydatapointvalueatquantile.go new file mode 100644 index 00000000000..3b10b8a9c6c --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_summarydatapointvalueatquantile.go @@ -0,0 +1,255 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "math" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// SummaryDataPointValueAtQuantile is a quantile value within a Summary data point. +type SummaryDataPointValueAtQuantile struct { + Quantile float64 + Value float64 +} + +var ( + protoPoolSummaryDataPointValueAtQuantile = sync.Pool{ + New: func() any { + return &SummaryDataPointValueAtQuantile{} + }, + } +) + +func NewSummaryDataPointValueAtQuantile() *SummaryDataPointValueAtQuantile { + if !UseProtoPooling.IsEnabled() { + return &SummaryDataPointValueAtQuantile{} + } + return protoPoolSummaryDataPointValueAtQuantile.Get().(*SummaryDataPointValueAtQuantile) +} + +func DeleteSummaryDataPointValueAtQuantile(orig *SummaryDataPointValueAtQuantile, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolSummaryDataPointValueAtQuantile.Put(orig) + } +} + +func CopySummaryDataPointValueAtQuantile(dest, src *SummaryDataPointValueAtQuantile) *SummaryDataPointValueAtQuantile { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewSummaryDataPointValueAtQuantile() + } + dest.Quantile = src.Quantile + dest.Value = src.Value + + return dest +} + +func CopySummaryDataPointValueAtQuantileSlice(dest, src []SummaryDataPointValueAtQuantile) []SummaryDataPointValueAtQuantile { + var newDest []SummaryDataPointValueAtQuantile + if cap(dest) < len(src) { + newDest = make([]SummaryDataPointValueAtQuantile, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSummaryDataPointValueAtQuantile(&dest[i], false) + } + } + for i := range src { + CopySummaryDataPointValueAtQuantile(&newDest[i], &src[i]) + } + return newDest +} + +func CopySummaryDataPointValueAtQuantilePtrSlice(dest, src []*SummaryDataPointValueAtQuantile) []*SummaryDataPointValueAtQuantile { + var newDest []*SummaryDataPointValueAtQuantile + if cap(dest) < len(src) { + newDest = make([]*SummaryDataPointValueAtQuantile, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSummaryDataPointValueAtQuantile() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteSummaryDataPointValueAtQuantile(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewSummaryDataPointValueAtQuantile() + } + } + for i := range src { + CopySummaryDataPointValueAtQuantile(newDest[i], src[i]) + } + return newDest +} + +func (orig *SummaryDataPointValueAtQuantile) Reset() { + *orig = SummaryDataPointValueAtQuantile{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *SummaryDataPointValueAtQuantile) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Quantile != float64(0) { + dest.WriteObjectField("quantile") + dest.WriteFloat64(orig.Quantile) + } + if orig.Value != float64(0) { + dest.WriteObjectField("value") + dest.WriteFloat64(orig.Value) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *SummaryDataPointValueAtQuantile) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "quantile": + orig.Quantile = iter.ReadFloat64() + case "value": + orig.Value = iter.ReadFloat64() + default: + iter.Skip() + } + } +} + +func (orig *SummaryDataPointValueAtQuantile) SizeProto() int { + var n int + var l int + _ = l + if orig.Quantile != float64(0) { + n += 9 + } + if orig.Value != float64(0) { + n += 9 + } + return n +} + +func (orig *SummaryDataPointValueAtQuantile) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.Quantile != float64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Quantile)) + pos-- + buf[pos] = 0x9 + } + if orig.Value != float64(0) { + pos -= 8 + binary.LittleEndian.PutUint64(buf[pos:], math.Float64bits(orig.Value)) + pos-- + buf[pos] = 0x11 + } + return len(buf) - pos +} + +func (orig *SummaryDataPointValueAtQuantile) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantile", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.Quantile = math.Float64frombits(num) + + case 2: + if wireType != proto.WireTypeI64 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeI64(buf, pos) + if err != nil { + return err + } + orig.Value = math.Float64frombits(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestSummaryDataPointValueAtQuantile() *SummaryDataPointValueAtQuantile { + orig := NewSummaryDataPointValueAtQuantile() + orig.Quantile = float64(3.1415926) + orig.Value = float64(3.1415926) + return orig +} + +func GenTestSummaryDataPointValueAtQuantilePtrSlice() []*SummaryDataPointValueAtQuantile { + orig := make([]*SummaryDataPointValueAtQuantile, 5) + orig[0] = NewSummaryDataPointValueAtQuantile() + orig[1] = GenTestSummaryDataPointValueAtQuantile() + orig[2] = NewSummaryDataPointValueAtQuantile() + orig[3] = GenTestSummaryDataPointValueAtQuantile() + orig[4] = NewSummaryDataPointValueAtQuantile() + return orig +} + +func GenTestSummaryDataPointValueAtQuantileSlice() []SummaryDataPointValueAtQuantile { + orig := make([]SummaryDataPointValueAtQuantile, 5) + orig[1] = *GenTestSummaryDataPointValueAtQuantile() + orig[3] = *GenTestSummaryDataPointValueAtQuantile() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tcpaddr.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tcpaddr.go new file mode 100644 index 00000000000..08c350ffef6 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tcpaddr.go @@ -0,0 +1,294 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type TCPAddr struct { + Zone string + IP []byte + Port int64 +} + +var ( + protoPoolTCPAddr = sync.Pool{ + New: func() any { + return &TCPAddr{} + }, + } +) + +func NewTCPAddr() *TCPAddr { + if !UseProtoPooling.IsEnabled() { + return &TCPAddr{} + } + return protoPoolTCPAddr.Get().(*TCPAddr) +} + +func DeleteTCPAddr(orig *TCPAddr, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolTCPAddr.Put(orig) + } +} + +func CopyTCPAddr(dest, src *TCPAddr) *TCPAddr { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewTCPAddr() + } + dest.IP = src.IP + dest.Port = src.Port + dest.Zone = src.Zone + + return dest +} + +func CopyTCPAddrSlice(dest, src []TCPAddr) []TCPAddr { + var newDest []TCPAddr + if cap(dest) < len(src) { + newDest = make([]TCPAddr, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteTCPAddr(&dest[i], false) + } + } + for i := range src { + CopyTCPAddr(&newDest[i], &src[i]) + } + return newDest +} + +func CopyTCPAddrPtrSlice(dest, src []*TCPAddr) []*TCPAddr { + var newDest []*TCPAddr + if cap(dest) < len(src) { + newDest = make([]*TCPAddr, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewTCPAddr() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteTCPAddr(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewTCPAddr() + } + } + for i := range src { + CopyTCPAddr(newDest[i], src[i]) + } + return newDest +} + +func (orig *TCPAddr) Reset() { + *orig = TCPAddr{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *TCPAddr) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + + if len(orig.IP) > 0 { + dest.WriteObjectField("iP") + dest.WriteBytes(orig.IP) + } + if orig.Port != int64(0) { + dest.WriteObjectField("port") + dest.WriteInt64(orig.Port) + } + if orig.Zone != "" { + dest.WriteObjectField("zone") + dest.WriteString(orig.Zone) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *TCPAddr) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "iP": + orig.IP = iter.ReadBytes() + case "port": + orig.Port = iter.ReadInt64() + case "zone": + orig.Zone = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *TCPAddr) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.IP) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Port != int64(0) { + n += 1 + proto.Sov(uint64(orig.Port)) + } + + l = len(orig.Zone) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *TCPAddr) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.IP) + if l > 0 { + pos -= l + copy(buf[pos:], orig.IP) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.Port != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Port)) + pos-- + buf[pos] = 0x10 + } + l = len(orig.Zone) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Zone) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *TCPAddr) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + if length != 0 { + orig.IP = make([]byte, length) + copy(orig.IP, buf[startPos:pos]) + } + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Port = int64(num) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Zone = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestTCPAddr() *TCPAddr { + orig := NewTCPAddr() + orig.IP = []byte{1, 2, 3} + orig.Port = int64(13) + orig.Zone = "test_zone" + return orig +} + +func GenTestTCPAddrPtrSlice() []*TCPAddr { + orig := make([]*TCPAddr, 5) + orig[0] = NewTCPAddr() + orig[1] = GenTestTCPAddr() + orig[2] = NewTCPAddr() + orig[3] = GenTestTCPAddr() + orig[4] = NewTCPAddr() + return orig +} + +func GenTestTCPAddrSlice() []TCPAddr { + orig := make([]TCPAddr, 5) + orig[1] = *GenTestTCPAddr() + orig[3] = *GenTestTCPAddr() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tracesdata.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tracesdata.go new file mode 100644 index 00000000000..2b54b6247a5 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tracesdata.go @@ -0,0 +1,245 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// 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. +type TracesData struct { + ResourceSpans []*ResourceSpans +} + +var ( + protoPoolTracesData = sync.Pool{ + New: func() any { + return &TracesData{} + }, + } +) + +func NewTracesData() *TracesData { + if !UseProtoPooling.IsEnabled() { + return &TracesData{} + } + return protoPoolTracesData.Get().(*TracesData) +} + +func DeleteTracesData(orig *TracesData, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + for i := range orig.ResourceSpans { + DeleteResourceSpans(orig.ResourceSpans[i], true) + } + orig.Reset() + if nullable { + protoPoolTracesData.Put(orig) + } +} + +func CopyTracesData(dest, src *TracesData) *TracesData { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewTracesData() + } + dest.ResourceSpans = CopyResourceSpansPtrSlice(dest.ResourceSpans, src.ResourceSpans) + + return dest +} + +func CopyTracesDataSlice(dest, src []TracesData) []TracesData { + var newDest []TracesData + if cap(dest) < len(src) { + newDest = make([]TracesData, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteTracesData(&dest[i], false) + } + } + for i := range src { + CopyTracesData(&newDest[i], &src[i]) + } + return newDest +} + +func CopyTracesDataPtrSlice(dest, src []*TracesData) []*TracesData { + var newDest []*TracesData + if cap(dest) < len(src) { + newDest = make([]*TracesData, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewTracesData() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteTracesData(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewTracesData() + } + } + for i := range src { + CopyTracesData(newDest[i], src[i]) + } + return newDest +} + +func (orig *TracesData) Reset() { + *orig = TracesData{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *TracesData) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if len(orig.ResourceSpans) > 0 { + dest.WriteObjectField("resourceSpans") + dest.WriteArrayStart() + orig.ResourceSpans[0].MarshalJSON(dest) + for i := 1; i < len(orig.ResourceSpans); i++ { + dest.WriteMore() + orig.ResourceSpans[i].MarshalJSON(dest) + } + dest.WriteArrayEnd() + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *TracesData) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "resourceSpans", "resource_spans": + for iter.ReadArray() { + orig.ResourceSpans = append(orig.ResourceSpans, NewResourceSpans()) + orig.ResourceSpans[len(orig.ResourceSpans)-1].UnmarshalJSON(iter) + } + + default: + iter.Skip() + } + } +} + +func (orig *TracesData) SizeProto() int { + var n int + var l int + _ = l + for i := range orig.ResourceSpans { + l = orig.ResourceSpans[i].SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *TracesData) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + for i := len(orig.ResourceSpans) - 1; i >= 0; i-- { + l = orig.ResourceSpans[i].MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + return len(buf) - pos +} + +func (orig *TracesData) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.ResourceSpans = append(orig.ResourceSpans, NewResourceSpans()) + err = orig.ResourceSpans[len(orig.ResourceSpans)-1].UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestTracesData() *TracesData { + orig := NewTracesData() + orig.ResourceSpans = []*ResourceSpans{{}, GenTestResourceSpans()} + return orig +} + +func GenTestTracesDataPtrSlice() []*TracesData { + orig := make([]*TracesData, 5) + orig[0] = NewTracesData() + orig[1] = GenTestTracesData() + orig[2] = NewTracesData() + orig[3] = GenTestTracesData() + orig[4] = NewTracesData() + return orig +} + +func GenTestTracesDataSlice() []TracesData { + orig := make([]TracesData, 5) + orig[1] = *GenTestTracesData() + orig[3] = *GenTestTracesData() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tracesrequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tracesrequest.go new file mode 100644 index 00000000000..b8bb39687fd --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_tracesrequest.go @@ -0,0 +1,299 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "encoding/binary" + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type TracesRequest struct { + RequestContext *RequestContext + TracesData TracesData + FormatVersion uint32 +} + +var ( + protoPoolTracesRequest = sync.Pool{ + New: func() any { + return &TracesRequest{} + }, + } +) + +func NewTracesRequest() *TracesRequest { + if !UseProtoPooling.IsEnabled() { + return &TracesRequest{} + } + return protoPoolTracesRequest.Get().(*TracesRequest) +} + +func DeleteTracesRequest(orig *TracesRequest, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + DeleteRequestContext(orig.RequestContext, true) + DeleteTracesData(&orig.TracesData, false) + + orig.Reset() + if nullable { + protoPoolTracesRequest.Put(orig) + } +} + +func CopyTracesRequest(dest, src *TracesRequest) *TracesRequest { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewTracesRequest() + } + dest.RequestContext = CopyRequestContext(dest.RequestContext, src.RequestContext) + + CopyTracesData(&dest.TracesData, &src.TracesData) + + dest.FormatVersion = src.FormatVersion + + return dest +} + +func CopyTracesRequestSlice(dest, src []TracesRequest) []TracesRequest { + var newDest []TracesRequest + if cap(dest) < len(src) { + newDest = make([]TracesRequest, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteTracesRequest(&dest[i], false) + } + } + for i := range src { + CopyTracesRequest(&newDest[i], &src[i]) + } + return newDest +} + +func CopyTracesRequestPtrSlice(dest, src []*TracesRequest) []*TracesRequest { + var newDest []*TracesRequest + if cap(dest) < len(src) { + newDest = make([]*TracesRequest, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewTracesRequest() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteTracesRequest(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewTracesRequest() + } + } + for i := range src { + CopyTracesRequest(newDest[i], src[i]) + } + return newDest +} + +func (orig *TracesRequest) Reset() { + *orig = TracesRequest{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *TracesRequest) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.RequestContext != nil { + dest.WriteObjectField("requestContext") + orig.RequestContext.MarshalJSON(dest) + } + dest.WriteObjectField("tracesData") + orig.TracesData.MarshalJSON(dest) + if orig.FormatVersion != uint32(0) { + dest.WriteObjectField("formatVersion") + dest.WriteUint32(orig.FormatVersion) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *TracesRequest) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "requestContext", "request_context": + orig.RequestContext = NewRequestContext() + orig.RequestContext.UnmarshalJSON(iter) + case "tracesData", "traces_data": + + orig.TracesData.UnmarshalJSON(iter) + case "formatVersion", "format_version": + orig.FormatVersion = iter.ReadUint32() + default: + iter.Skip() + } + } +} + +func (orig *TracesRequest) SizeProto() int { + var n int + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + } + l = orig.TracesData.SizeProto() + n += 1 + proto.Sov(uint64(l)) + l + if orig.FormatVersion != uint32(0) { + n += 5 + } + return n +} + +func (orig *TracesRequest) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.RequestContext != nil { + l = orig.RequestContext.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + l = orig.TracesData.MarshalProto(buf[:pos]) + pos -= l + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + + if orig.FormatVersion != uint32(0) { + pos -= 4 + binary.LittleEndian.PutUint32(buf[pos:], uint32(orig.FormatVersion)) + pos-- + buf[pos] = 0xd + } + return len(buf) - pos +} + +func (orig *TracesRequest) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field RequestContext", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + orig.RequestContext = NewRequestContext() + err = orig.RequestContext.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field TracesData", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + + err = orig.TracesData.UnmarshalProto(buf[startPos:pos]) + if err != nil { + return err + } + + case 1: + if wireType != proto.WireTypeI32 { + return fmt.Errorf("proto: wrong wireType = %d for field FormatVersion", wireType) + } + var num uint32 + num, pos, err = proto.ConsumeI32(buf, pos) + if err != nil { + return err + } + + orig.FormatVersion = uint32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestTracesRequest() *TracesRequest { + orig := NewTracesRequest() + orig.RequestContext = GenTestRequestContext() + orig.TracesData = *GenTestTracesData() + orig.FormatVersion = uint32(13) + return orig +} + +func GenTestTracesRequestPtrSlice() []*TracesRequest { + orig := make([]*TracesRequest, 5) + orig[0] = NewTracesRequest() + orig[1] = GenTestTracesRequest() + orig[2] = NewTracesRequest() + orig[3] = GenTestTracesRequest() + orig[4] = NewTracesRequest() + return orig +} + +func GenTestTracesRequestSlice() []TracesRequest { + orig := make([]TracesRequest, 5) + orig[1] = *GenTestTracesRequest() + orig[3] = *GenTestTracesRequest() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_udpaddr.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_udpaddr.go new file mode 100644 index 00000000000..dd2883de59c --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_udpaddr.go @@ -0,0 +1,294 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type UDPAddr struct { + Zone string + IP []byte + Port int64 +} + +var ( + protoPoolUDPAddr = sync.Pool{ + New: func() any { + return &UDPAddr{} + }, + } +) + +func NewUDPAddr() *UDPAddr { + if !UseProtoPooling.IsEnabled() { + return &UDPAddr{} + } + return protoPoolUDPAddr.Get().(*UDPAddr) +} + +func DeleteUDPAddr(orig *UDPAddr, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolUDPAddr.Put(orig) + } +} + +func CopyUDPAddr(dest, src *UDPAddr) *UDPAddr { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewUDPAddr() + } + dest.IP = src.IP + dest.Port = src.Port + dest.Zone = src.Zone + + return dest +} + +func CopyUDPAddrSlice(dest, src []UDPAddr) []UDPAddr { + var newDest []UDPAddr + if cap(dest) < len(src) { + newDest = make([]UDPAddr, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteUDPAddr(&dest[i], false) + } + } + for i := range src { + CopyUDPAddr(&newDest[i], &src[i]) + } + return newDest +} + +func CopyUDPAddrPtrSlice(dest, src []*UDPAddr) []*UDPAddr { + var newDest []*UDPAddr + if cap(dest) < len(src) { + newDest = make([]*UDPAddr, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewUDPAddr() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteUDPAddr(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewUDPAddr() + } + } + for i := range src { + CopyUDPAddr(newDest[i], src[i]) + } + return newDest +} + +func (orig *UDPAddr) Reset() { + *orig = UDPAddr{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *UDPAddr) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + + if len(orig.IP) > 0 { + dest.WriteObjectField("iP") + dest.WriteBytes(orig.IP) + } + if orig.Port != int64(0) { + dest.WriteObjectField("port") + dest.WriteInt64(orig.Port) + } + if orig.Zone != "" { + dest.WriteObjectField("zone") + dest.WriteString(orig.Zone) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *UDPAddr) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "iP": + orig.IP = iter.ReadBytes() + case "port": + orig.Port = iter.ReadInt64() + case "zone": + orig.Zone = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *UDPAddr) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.IP) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + if orig.Port != int64(0) { + n += 1 + proto.Sov(uint64(orig.Port)) + } + + l = len(orig.Zone) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *UDPAddr) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.IP) + if l > 0 { + pos -= l + copy(buf[pos:], orig.IP) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + if orig.Port != int64(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.Port)) + pos-- + buf[pos] = 0x10 + } + l = len(orig.Zone) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Zone) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x1a + } + return len(buf) - pos +} + +func (orig *UDPAddr) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + if length != 0 { + orig.IP = make([]byte, length) + copy(orig.IP, buf[startPos:pos]) + } + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.Port = int64(num) + + case 3: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Zone = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestUDPAddr() *UDPAddr { + orig := NewUDPAddr() + orig.IP = []byte{1, 2, 3} + orig.Port = int64(13) + orig.Zone = "test_zone" + return orig +} + +func GenTestUDPAddrPtrSlice() []*UDPAddr { + orig := make([]*UDPAddr, 5) + orig[0] = NewUDPAddr() + orig[1] = GenTestUDPAddr() + orig[2] = NewUDPAddr() + orig[3] = GenTestUDPAddr() + orig[4] = NewUDPAddr() + return orig +} + +func GenTestUDPAddrSlice() []UDPAddr { + orig := make([]UDPAddr, 5) + orig[1] = *GenTestUDPAddr() + orig[3] = *GenTestUDPAddr() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_unixaddr.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_unixaddr.go new file mode 100644 index 00000000000..be00bfbd3c0 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_unixaddr.go @@ -0,0 +1,262 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +type UnixAddr struct { + Name string + Net string +} + +var ( + protoPoolUnixAddr = sync.Pool{ + New: func() any { + return &UnixAddr{} + }, + } +) + +func NewUnixAddr() *UnixAddr { + if !UseProtoPooling.IsEnabled() { + return &UnixAddr{} + } + return protoPoolUnixAddr.Get().(*UnixAddr) +} + +func DeleteUnixAddr(orig *UnixAddr, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolUnixAddr.Put(orig) + } +} + +func CopyUnixAddr(dest, src *UnixAddr) *UnixAddr { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewUnixAddr() + } + dest.Name = src.Name + dest.Net = src.Net + + return dest +} + +func CopyUnixAddrSlice(dest, src []UnixAddr) []UnixAddr { + var newDest []UnixAddr + if cap(dest) < len(src) { + newDest = make([]UnixAddr, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteUnixAddr(&dest[i], false) + } + } + for i := range src { + CopyUnixAddr(&newDest[i], &src[i]) + } + return newDest +} + +func CopyUnixAddrPtrSlice(dest, src []*UnixAddr) []*UnixAddr { + var newDest []*UnixAddr + if cap(dest) < len(src) { + newDest = make([]*UnixAddr, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewUnixAddr() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteUnixAddr(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewUnixAddr() + } + } + for i := range src { + CopyUnixAddr(newDest[i], src[i]) + } + return newDest +} + +func (orig *UnixAddr) Reset() { + *orig = UnixAddr{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *UnixAddr) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.Name != "" { + dest.WriteObjectField("name") + dest.WriteString(orig.Name) + } + if orig.Net != "" { + dest.WriteObjectField("net") + dest.WriteString(orig.Net) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *UnixAddr) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "name": + orig.Name = iter.ReadString() + case "net": + orig.Net = iter.ReadString() + default: + iter.Skip() + } + } +} + +func (orig *UnixAddr) SizeProto() int { + var n int + var l int + _ = l + + l = len(orig.Name) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + + l = len(orig.Net) + if l > 0 { + n += 1 + proto.Sov(uint64(l)) + l + } + return n +} + +func (orig *UnixAddr) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + l = len(orig.Name) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Name) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0xa + } + l = len(orig.Net) + if l > 0 { + pos -= l + copy(buf[pos:], orig.Net) + pos = proto.EncodeVarint(buf, pos, uint64(l)) + pos-- + buf[pos] = 0x12 + } + return len(buf) - pos +} + +func (orig *UnixAddr) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Name = string(buf[startPos:pos]) + + case 2: + if wireType != proto.WireTypeLen { + return fmt.Errorf("proto: wrong wireType = %d for field Net", wireType) + } + var length int + length, pos, err = proto.ConsumeLen(buf, pos) + if err != nil { + return err + } + startPos := pos - length + orig.Net = string(buf[startPos:pos]) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestUnixAddr() *UnixAddr { + orig := NewUnixAddr() + orig.Name = "test_name" + orig.Net = "test_net" + return orig +} + +func GenTestUnixAddrPtrSlice() []*UnixAddr { + orig := make([]*UnixAddr, 5) + orig[0] = NewUnixAddr() + orig[1] = GenTestUnixAddr() + orig[2] = NewUnixAddr() + orig[3] = GenTestUnixAddr() + orig[4] = NewUnixAddr() + return orig +} + +func GenTestUnixAddrSlice() []UnixAddr { + orig := make([]UnixAddr, 5) + orig[1] = *GenTestUnixAddr() + orig[3] = *GenTestUnixAddr() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_valuetype.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_valuetype.go new file mode 100644 index 00000000000..eccd89e6ef8 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_proto_valuetype.go @@ -0,0 +1,251 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +import ( + "fmt" + "sync" + + "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/proto" +) + +// ValueType describes the type and units of a value. +type ValueType struct { + TypeStrindex int32 + UnitStrindex int32 +} + +var ( + protoPoolValueType = sync.Pool{ + New: func() any { + return &ValueType{} + }, + } +) + +func NewValueType() *ValueType { + if !UseProtoPooling.IsEnabled() { + return &ValueType{} + } + return protoPoolValueType.Get().(*ValueType) +} + +func DeleteValueType(orig *ValueType, nullable bool) { + if orig == nil { + return + } + + if !UseProtoPooling.IsEnabled() { + orig.Reset() + return + } + + orig.Reset() + if nullable { + protoPoolValueType.Put(orig) + } +} + +func CopyValueType(dest, src *ValueType) *ValueType { + // If copying to same object, just return. + if src == dest { + return dest + } + + if src == nil { + return nil + } + + if dest == nil { + dest = NewValueType() + } + dest.TypeStrindex = src.TypeStrindex + dest.UnitStrindex = src.UnitStrindex + + return dest +} + +func CopyValueTypeSlice(dest, src []ValueType) []ValueType { + var newDest []ValueType + if cap(dest) < len(src) { + newDest = make([]ValueType, len(src)) + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteValueType(&dest[i], false) + } + } + for i := range src { + CopyValueType(&newDest[i], &src[i]) + } + return newDest +} + +func CopyValueTypePtrSlice(dest, src []*ValueType) []*ValueType { + var newDest []*ValueType + if cap(dest) < len(src) { + newDest = make([]*ValueType, len(src)) + // Copy old pointers to re-use. + copy(newDest, dest) + // Add new pointers for missing elements from len(dest) to len(srt). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewValueType() + } + } else { + newDest = dest[:len(src)] + // Cleanup the rest of the elements so GC can free the memory. + // This can happen when len(src) < len(dest) < cap(dest). + for i := len(src); i < len(dest); i++ { + DeleteValueType(dest[i], true) + dest[i] = nil + } + // Add new pointers for missing elements. + // This can happen when len(dest) < len(src) < cap(dest). + for i := len(dest); i < len(src); i++ { + newDest[i] = NewValueType() + } + } + for i := range src { + CopyValueType(newDest[i], src[i]) + } + return newDest +} + +func (orig *ValueType) Reset() { + *orig = ValueType{} +} + +// MarshalJSON marshals all properties from the current struct to the destination stream. +func (orig *ValueType) MarshalJSON(dest *json.Stream) { + dest.WriteObjectStart() + if orig.TypeStrindex != int32(0) { + dest.WriteObjectField("typeStrindex") + dest.WriteInt32(orig.TypeStrindex) + } + if orig.UnitStrindex != int32(0) { + dest.WriteObjectField("unitStrindex") + dest.WriteInt32(orig.UnitStrindex) + } + dest.WriteObjectEnd() +} + +// UnmarshalJSON unmarshals all properties from the current struct from the source iterator. +func (orig *ValueType) UnmarshalJSON(iter *json.Iterator) { + for f := iter.ReadObject(); f != ""; f = iter.ReadObject() { + switch f { + case "typeStrindex", "type_strindex": + orig.TypeStrindex = iter.ReadInt32() + case "unitStrindex", "unit_strindex": + orig.UnitStrindex = iter.ReadInt32() + default: + iter.Skip() + } + } +} + +func (orig *ValueType) SizeProto() int { + var n int + var l int + _ = l + if orig.TypeStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.TypeStrindex)) + } + if orig.UnitStrindex != int32(0) { + n += 1 + proto.Sov(uint64(orig.UnitStrindex)) + } + return n +} + +func (orig *ValueType) MarshalProto(buf []byte) int { + pos := len(buf) + var l int + _ = l + if orig.TypeStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.TypeStrindex)) + pos-- + buf[pos] = 0x8 + } + if orig.UnitStrindex != int32(0) { + pos = proto.EncodeVarint(buf, pos, uint64(orig.UnitStrindex)) + pos-- + buf[pos] = 0x10 + } + return len(buf) - pos +} + +func (orig *ValueType) UnmarshalProto(buf []byte) error { + var err error + var fieldNum int32 + var wireType proto.WireType + + l := len(buf) + pos := 0 + for pos < l { + // If in a group parsing, move to the next tag. + fieldNum, wireType, pos, err = proto.ConsumeTag(buf, pos) + if err != nil { + return err + } + switch fieldNum { + + case 1: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field TypeStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.TypeStrindex = int32(num) + + case 2: + if wireType != proto.WireTypeVarint { + return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) + } + var num uint64 + num, pos, err = proto.ConsumeVarint(buf, pos) + if err != nil { + return err + } + orig.UnitStrindex = int32(num) + default: + pos, err = proto.ConsumeUnknown(buf, pos, wireType) + if err != nil { + return err + } + } + } + return nil +} + +func GenTestValueType() *ValueType { + orig := NewValueType() + orig.TypeStrindex = int32(13) + orig.UnitStrindex = int32(13) + return orig +} + +func GenTestValueTypePtrSlice() []*ValueType { + orig := make([]*ValueType, 5) + orig[0] = NewValueType() + orig[1] = GenTestValueType() + orig[2] = NewValueType() + orig[3] = GenTestValueType() + orig[4] = NewValueType() + return orig +} + +func GenTestValueTypeSlice() []ValueType { + orig := make([]ValueType, 5) + orig[1] = *GenTestValueType() + orig[3] = *GenTestValueType() + return orig +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_anyvalueslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_anyvalueslice.go new file mode 100644 index 00000000000..2fd1f11324d --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_anyvalueslice.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type SliceWrapper struct { + orig *[]AnyValue + state *State +} + +func GetSliceOrig(ms SliceWrapper) *[]AnyValue { + return ms.orig +} + +func GetSliceState(ms SliceWrapper) *State { + return ms.state +} + +func NewSliceWrapper(orig *[]AnyValue, state *State) SliceWrapper { + return SliceWrapper{orig: orig, state: state} +} + +func GenTestSliceWrapper() SliceWrapper { + orig := GenTestAnyValueSlice() + return NewSliceWrapper(&orig, NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go index 0d6214c20ff..ecdbd89cea8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go @@ -1,39 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -type ByteSlice struct { +type ByteSliceWrapper struct { orig *[]byte state *State } -func GetOrigByteSlice(ms ByteSlice) *[]byte { +func GetByteSliceOrig(ms ByteSliceWrapper) *[]byte { return ms.orig } -func GetByteSliceState(ms ByteSlice) *State { +func GetByteSliceState(ms ByteSliceWrapper) *State { return ms.state } -func NewByteSlice(orig *[]byte, state *State) ByteSlice { - return ByteSlice{orig: orig, state: state} +func NewByteSliceWrapper(orig *[]byte, state *State) ByteSliceWrapper { + return ByteSliceWrapper{orig: orig, state: state} } -func CopyOrigByteSlice(dst, src []byte) []byte { - dst = dst[:0] - return append(dst, src...) +func GenTestByteSliceWrapper() ByteSliceWrapper { + orig := []byte{1, 2, 3} + return NewByteSliceWrapper(&orig, NewState()) } -func FillTestByteSlice(tv ByteSlice) { -} - -func GenerateTestByteSlice() ByteSlice { - state := StateMutable - var orig []byte = nil - - return ByteSlice{&orig, &state} +func GenTestByteSlice() []byte { + return []byte{1, 2, 3} } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_entityref.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_entityref.go new file mode 100644 index 00000000000..b4e4ea12ee6 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_entityref.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type EntityRefWrapper struct { + orig *EntityRef + state *State +} + +func GetEntityRefOrig(ms EntityRefWrapper) *EntityRef { + return ms.orig +} + +func GetEntityRefState(ms EntityRefWrapper) *State { + return ms.state +} + +func NewEntityRefWrapper(orig *EntityRef, state *State) EntityRefWrapper { + return EntityRefWrapper{orig: orig, state: state} +} + +func GenTestEntityRefWrapper() EntityRefWrapper { + return NewEntityRefWrapper(GenTestEntityRef(), NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_entityrefslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_entityrefslice.go new file mode 100644 index 00000000000..8e71ec1de0a --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_entityrefslice.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type EntityRefSliceWrapper struct { + orig *[]*EntityRef + state *State +} + +func GetEntityRefSliceOrig(ms EntityRefSliceWrapper) *[]*EntityRef { + return ms.orig +} + +func GetEntityRefSliceState(ms EntityRefSliceWrapper) *State { + return ms.state +} + +func NewEntityRefSliceWrapper(orig *[]*EntityRef, state *State) EntityRefSliceWrapper { + return EntityRefSliceWrapper{orig: orig, state: state} +} + +func GenTestEntityRefSliceWrapper() EntityRefSliceWrapper { + orig := GenTestEntityRefPtrSlice() + return NewEntityRefSliceWrapper(&orig, NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportlogsservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportlogsservicerequest.go new file mode 100644 index 00000000000..a529cd105bc --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportlogsservicerequest.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type LogsWrapper struct { + orig *ExportLogsServiceRequest + state *State +} + +func GetLogsOrig(ms LogsWrapper) *ExportLogsServiceRequest { + return ms.orig +} + +func GetLogsState(ms LogsWrapper) *State { + return ms.state +} + +func NewLogsWrapper(orig *ExportLogsServiceRequest, state *State) LogsWrapper { + return LogsWrapper{orig: orig, state: state} +} + +func GenTestLogsWrapper() LogsWrapper { + return NewLogsWrapper(GenTestExportLogsServiceRequest(), NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportmetricsservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportmetricsservicerequest.go new file mode 100644 index 00000000000..0d378e4d74d --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportmetricsservicerequest.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type MetricsWrapper struct { + orig *ExportMetricsServiceRequest + state *State +} + +func GetMetricsOrig(ms MetricsWrapper) *ExportMetricsServiceRequest { + return ms.orig +} + +func GetMetricsState(ms MetricsWrapper) *State { + return ms.state +} + +func NewMetricsWrapper(orig *ExportMetricsServiceRequest, state *State) MetricsWrapper { + return MetricsWrapper{orig: orig, state: state} +} + +func GenTestMetricsWrapper() MetricsWrapper { + return NewMetricsWrapper(GenTestExportMetricsServiceRequest(), NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportprofilesservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportprofilesservicerequest.go new file mode 100644 index 00000000000..8533626bebe --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exportprofilesservicerequest.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type ProfilesWrapper struct { + orig *ExportProfilesServiceRequest + state *State +} + +func GetProfilesOrig(ms ProfilesWrapper) *ExportProfilesServiceRequest { + return ms.orig +} + +func GetProfilesState(ms ProfilesWrapper) *State { + return ms.state +} + +func NewProfilesWrapper(orig *ExportProfilesServiceRequest, state *State) ProfilesWrapper { + return ProfilesWrapper{orig: orig, state: state} +} + +func GenTestProfilesWrapper() ProfilesWrapper { + return NewProfilesWrapper(GenTestExportProfilesServiceRequest(), NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exporttraceservicerequest.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exporttraceservicerequest.go new file mode 100644 index 00000000000..75d82979d88 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_exporttraceservicerequest.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type TracesWrapper struct { + orig *ExportTraceServiceRequest + state *State +} + +func GetTracesOrig(ms TracesWrapper) *ExportTraceServiceRequest { + return ms.orig +} + +func GetTracesState(ms TracesWrapper) *State { + return ms.state +} + +func NewTracesWrapper(orig *ExportTraceServiceRequest, state *State) TracesWrapper { + return TracesWrapper{orig: orig, state: state} +} + +func GenTestTracesWrapper() TracesWrapper { + return NewTracesWrapper(GenTestExportTraceServiceRequest(), NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go index 2ca007b5f01..8d0d6ea6cf8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go @@ -1,39 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -type Float64Slice struct { +type Float64SliceWrapper struct { orig *[]float64 state *State } -func GetOrigFloat64Slice(ms Float64Slice) *[]float64 { +func GetFloat64SliceOrig(ms Float64SliceWrapper) *[]float64 { return ms.orig } -func GetFloat64SliceState(ms Float64Slice) *State { +func GetFloat64SliceState(ms Float64SliceWrapper) *State { return ms.state } -func NewFloat64Slice(orig *[]float64, state *State) Float64Slice { - return Float64Slice{orig: orig, state: state} +func NewFloat64SliceWrapper(orig *[]float64, state *State) Float64SliceWrapper { + return Float64SliceWrapper{orig: orig, state: state} } -func CopyOrigFloat64Slice(dst, src []float64) []float64 { - dst = dst[:0] - return append(dst, src...) +func GenTestFloat64SliceWrapper() Float64SliceWrapper { + orig := []float64{1.1, 2.2, 3.3} + return NewFloat64SliceWrapper(&orig, NewState()) } -func FillTestFloat64Slice(tv Float64Slice) { -} - -func GenerateTestFloat64Slice() Float64Slice { - state := StateMutable - var orig []float64 = nil - - return Float64Slice{&orig, &state} +func GenTestFloat64Slice() []float64 { + return []float64{1.1, 2.2, 3.3} } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go index 5483272a960..5fbe72e12ec 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go @@ -1,50 +1,28 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type InstrumentationScope struct { - orig *otlpcommon.InstrumentationScope +type InstrumentationScopeWrapper struct { + orig *InstrumentationScope state *State } -func GetOrigInstrumentationScope(ms InstrumentationScope) *otlpcommon.InstrumentationScope { +func GetInstrumentationScopeOrig(ms InstrumentationScopeWrapper) *InstrumentationScope { return ms.orig } -func GetInstrumentationScopeState(ms InstrumentationScope) *State { +func GetInstrumentationScopeState(ms InstrumentationScopeWrapper) *State { return ms.state } -func NewInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *State) InstrumentationScope { - return InstrumentationScope{orig: orig, state: state} -} - -func CopyOrigInstrumentationScope(dest, src *otlpcommon.InstrumentationScope) { - dest.Name = src.Name - dest.Version = src.Version - dest.Attributes = CopyOrigMap(dest.Attributes, src.Attributes) - dest.DroppedAttributesCount = src.DroppedAttributesCount -} - -func GenerateTestInstrumentationScope() InstrumentationScope { - orig := otlpcommon.InstrumentationScope{} - state := StateMutable - tv := NewInstrumentationScope(&orig, &state) - FillTestInstrumentationScope(tv) - return tv +func NewInstrumentationScopeWrapper(orig *InstrumentationScope, state *State) InstrumentationScopeWrapper { + return InstrumentationScopeWrapper{orig: orig, state: state} } -func FillTestInstrumentationScope(tv InstrumentationScope) { - tv.orig.Name = "test_name" - tv.orig.Version = "test_version" - FillTestMap(NewMap(&tv.orig.Attributes, tv.state)) - tv.orig.DroppedAttributesCount = uint32(17) +func GenTestInstrumentationScopeWrapper() InstrumentationScopeWrapper { + return NewInstrumentationScopeWrapper(GenTestInstrumentationScope(), NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go index c4fe994f9ab..ed66b200738 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go @@ -1,39 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -type Int32Slice struct { +type Int32SliceWrapper struct { orig *[]int32 state *State } -func GetOrigInt32Slice(ms Int32Slice) *[]int32 { +func GetInt32SliceOrig(ms Int32SliceWrapper) *[]int32 { return ms.orig } -func GetInt32SliceState(ms Int32Slice) *State { +func GetInt32SliceState(ms Int32SliceWrapper) *State { return ms.state } -func NewInt32Slice(orig *[]int32, state *State) Int32Slice { - return Int32Slice{orig: orig, state: state} +func NewInt32SliceWrapper(orig *[]int32, state *State) Int32SliceWrapper { + return Int32SliceWrapper{orig: orig, state: state} } -func CopyOrigInt32Slice(dst, src []int32) []int32 { - dst = dst[:0] - return append(dst, src...) +func GenTestInt32SliceWrapper() Int32SliceWrapper { + orig := []int32{1, 2, 3} + return NewInt32SliceWrapper(&orig, NewState()) } -func FillTestInt32Slice(tv Int32Slice) { -} - -func GenerateTestInt32Slice() Int32Slice { - state := StateMutable - var orig []int32 = nil - - return Int32Slice{&orig, &state} +func GenTestInt32Slice() []int32 { + return []int32{1, 2, 3} } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go index 19e49e71ffa..9174f8632a7 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go @@ -1,39 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -type Int64Slice struct { +type Int64SliceWrapper struct { orig *[]int64 state *State } -func GetOrigInt64Slice(ms Int64Slice) *[]int64 { +func GetInt64SliceOrig(ms Int64SliceWrapper) *[]int64 { return ms.orig } -func GetInt64SliceState(ms Int64Slice) *State { +func GetInt64SliceState(ms Int64SliceWrapper) *State { return ms.state } -func NewInt64Slice(orig *[]int64, state *State) Int64Slice { - return Int64Slice{orig: orig, state: state} +func NewInt64SliceWrapper(orig *[]int64, state *State) Int64SliceWrapper { + return Int64SliceWrapper{orig: orig, state: state} } -func CopyOrigInt64Slice(dst, src []int64) []int64 { - dst = dst[:0] - return append(dst, src...) +func GenTestInt64SliceWrapper() Int64SliceWrapper { + orig := []int64{1, 2, 3} + return NewInt64SliceWrapper(&orig, NewState()) } -func FillTestInt64Slice(tv Int64Slice) { -} - -func GenerateTestInt64Slice() Int64Slice { - state := StateMutable - var orig []int64 = nil - - return Int64Slice{&orig, &state} +func GenTestInt64Slice() []int64 { + return []int64{1, 2, 3} } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go deleted file mode 100644 index 5f3fe569ba5..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type IntSlice struct { - orig *[]int - state *State -} - -func GetOrigIntSlice(ms IntSlice) *[]int { - return ms.orig -} - -func GetIntSliceState(ms IntSlice) *State { - return ms.state -} - -func NewIntSlice(orig *[]int, state *State) IntSlice { - return IntSlice{orig: orig, state: state} -} - -func FillTestIntSlice(tv IntSlice) { -} - -func GenerateTestIntSlice() IntSlice { - state := StateMutable - var orig []int = nil - - return IntSlice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_profilesdata.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_profilesdata.go new file mode 100644 index 00000000000..7bece6d028b --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_profilesdata.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package internal + +type ProfilesDataWrapper struct { + orig *ProfilesData + state *State +} + +func GetProfilesDataOrig(ms ProfilesDataWrapper) *ProfilesData { + return ms.orig +} + +func GetProfilesDataState(ms ProfilesDataWrapper) *State { + return ms.state +} + +func NewProfilesDataWrapper(orig *ProfilesData, state *State) ProfilesDataWrapper { + return ProfilesDataWrapper{orig: orig, state: state} +} + +func GenTestProfilesDataWrapper() ProfilesDataWrapper { + return NewProfilesDataWrapper(GenTestProfilesData(), NewState()) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go index b84b705c9a1..1d6cabfebfd 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go @@ -1,46 +1,28 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -import ( - otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -type Resource struct { - orig *otlpresource.Resource +type ResourceWrapper struct { + orig *Resource state *State } -func GetOrigResource(ms Resource) *otlpresource.Resource { +func GetResourceOrig(ms ResourceWrapper) *Resource { return ms.orig } -func GetResourceState(ms Resource) *State { +func GetResourceState(ms ResourceWrapper) *State { return ms.state } -func NewResource(orig *otlpresource.Resource, state *State) Resource { - return Resource{orig: orig, state: state} -} - -func CopyOrigResource(dest, src *otlpresource.Resource) { - dest.Attributes = CopyOrigMap(dest.Attributes, src.Attributes) - dest.DroppedAttributesCount = src.DroppedAttributesCount -} - -func GenerateTestResource() Resource { - orig := otlpresource.Resource{} - state := StateMutable - tv := NewResource(&orig, &state) - FillTestResource(tv) - return tv +func NewResourceWrapper(orig *Resource, state *State) ResourceWrapper { + return ResourceWrapper{orig: orig, state: state} } -func FillTestResource(tv Resource) { - FillTestMap(NewMap(&tv.orig.Attributes, tv.state)) - tv.orig.DroppedAttributesCount = uint32(17) +func GenTestResourceWrapper() ResourceWrapper { + return NewResourceWrapper(GenTestResource(), NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go index a05b216f7ca..d922f65d80c 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go @@ -1,39 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -type StringSlice struct { +type StringSliceWrapper struct { orig *[]string state *State } -func GetOrigStringSlice(ms StringSlice) *[]string { +func GetStringSliceOrig(ms StringSliceWrapper) *[]string { return ms.orig } -func GetStringSliceState(ms StringSlice) *State { +func GetStringSliceState(ms StringSliceWrapper) *State { return ms.state } -func NewStringSlice(orig *[]string, state *State) StringSlice { - return StringSlice{orig: orig, state: state} +func NewStringSliceWrapper(orig *[]string, state *State) StringSliceWrapper { + return StringSliceWrapper{orig: orig, state: state} } -func CopyOrigStringSlice(dst, src []string) []string { - dst = dst[:0] - return append(dst, src...) +func GenTestStringSliceWrapper() StringSliceWrapper { + orig := []string{"a", "b", "c"} + return NewStringSliceWrapper(&orig, NewState()) } -func FillTestStringSlice(tv StringSlice) { -} - -func GenerateTestStringSlice() StringSlice { - state := StateMutable - var orig []string = nil - - return StringSlice{&orig, &state} +func GenTestStringSlice() []string { + return []string{"a", "b", "c"} } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go index dbbe25fe961..c20fd9d0e15 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go @@ -1,39 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package internal -type UInt64Slice struct { +type UInt64SliceWrapper struct { orig *[]uint64 state *State } -func GetOrigUInt64Slice(ms UInt64Slice) *[]uint64 { +func GetUInt64SliceOrig(ms UInt64SliceWrapper) *[]uint64 { return ms.orig } -func GetUInt64SliceState(ms UInt64Slice) *State { +func GetUInt64SliceState(ms UInt64SliceWrapper) *State { return ms.state } -func NewUInt64Slice(orig *[]uint64, state *State) UInt64Slice { - return UInt64Slice{orig: orig, state: state} +func NewUInt64SliceWrapper(orig *[]uint64, state *State) UInt64SliceWrapper { + return UInt64SliceWrapper{orig: orig, state: state} } -func CopyOrigUInt64Slice(dst, src []uint64) []uint64 { - dst = dst[:0] - return append(dst, src...) +func GenTestUInt64SliceWrapper() UInt64SliceWrapper { + orig := []uint64{1, 2, 3} + return NewUInt64SliceWrapper(&orig, NewState()) } -func FillTestUInt64Slice(tv UInt64Slice) { -} - -func GenerateTestUInt64Slice() UInt64Slice { - state := StateMutable - var orig []uint64 = nil - - return UInt64Slice{&orig, &state} +func GenTestUint64Slice() []uint64 { + return []uint64{1, 2, 3} } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go deleted file mode 100644 index 89d957a6534..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - "encoding/base64" - "fmt" - - jsoniter "github.com/json-iterator/go" - - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// ReadAttribute Unmarshal JSON data and return otlpcommon.KeyValue -func ReadAttribute(iter *jsoniter.Iterator) otlpcommon.KeyValue { - kv := otlpcommon.KeyValue{} - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "key": - kv.Key = iter.ReadString() - case "value": - ReadValue(iter, &kv.Value) - default: - iter.Skip() - } - return true - }) - return kv -} - -// ReadValue Unmarshal JSON data and return otlpcommon.AnyValue -func ReadValue(iter *jsoniter.Iterator, val *otlpcommon.AnyValue) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "stringValue", "string_value": - val.Value = &otlpcommon.AnyValue_StringValue{ - StringValue: iter.ReadString(), - } - - case "boolValue", "bool_value": - val.Value = &otlpcommon.AnyValue_BoolValue{ - BoolValue: iter.ReadBool(), - } - case "intValue", "int_value": - val.Value = &otlpcommon.AnyValue_IntValue{ - IntValue: ReadInt64(iter), - } - case "doubleValue", "double_value": - val.Value = &otlpcommon.AnyValue_DoubleValue{ - DoubleValue: ReadFloat64(iter), - } - case "bytesValue", "bytes_value": - v, err := base64.StdEncoding.DecodeString(iter.ReadString()) - if err != nil { - iter.ReportError("bytesValue", fmt.Sprintf("base64 decode:%v", err)) - break - } - val.Value = &otlpcommon.AnyValue_BytesValue{ - BytesValue: v, - } - case "arrayValue", "array_value": - val.Value = &otlpcommon.AnyValue_ArrayValue{ - ArrayValue: readArray(iter), - } - case "kvlistValue", "kvlist_value": - val.Value = &otlpcommon.AnyValue_KvlistValue{ - KvlistValue: readKvlistValue(iter), - } - default: - iter.Skip() - } - return true - }) -} - -func readArray(iter *jsoniter.Iterator) *otlpcommon.ArrayValue { - v := &otlpcommon.ArrayValue{} - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "values": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - v.Values = append(v.Values, otlpcommon.AnyValue{}) - ReadValue(iter, &v.Values[len(v.Values)-1]) - return true - }) - default: - iter.Skip() - } - return true - }) - return v -} - -func readKvlistValue(iter *jsoniter.Iterator) *otlpcommon.KeyValueList { - v := &otlpcommon.KeyValueList{} - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "values": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - v.Values = append(v.Values, ReadAttribute(iter)) - return true - }) - default: - iter.Skip() - } - return true - }) - return v -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go deleted file mode 100644 index 02dd2b7768c..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - jsoniter "github.com/json-iterator/go" -) - -// ReadEnumValue returns the enum integer value representation. Accepts both enum names and enum integer values. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadEnumValue(iter *jsoniter.Iterator, valueMap map[string]int32) int32 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadInt32() - case jsoniter.StringValue: - val, ok := valueMap[iter.ReadString()] - // Same behavior with official protobuf JSON decoder, - // see https://github.com/open-telemetry/opentelemetry-proto-go/pull/81 - if !ok { - iter.ReportError("ReadEnumValue", "unknown string value") - return 0 - } - return val - default: - iter.ReportError("ReadEnumValue", "unsupported value type") - return 0 - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/iterator.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/iterator.go new file mode 100644 index 00000000000..f0367e11dae --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/json/iterator.go @@ -0,0 +1,217 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json // import "go.opentelemetry.io/collector/pdata/internal/json" +import ( + "encoding/base64" + "strconv" + + jsoniter "github.com/json-iterator/go" +) + +func BorrowIterator(data []byte) *Iterator { + return &Iterator{ + delegate: jsoniter.ConfigFastest.BorrowIterator(data), + } +} + +func ReturnIterator(s *Iterator) { + jsoniter.ConfigFastest.ReturnIterator(s.delegate) +} + +type Iterator struct { + delegate *jsoniter.Iterator +} + +// ReadInt32 unmarshalls JSON data into an int32. Accepts both numbers and strings decimal. +// See https://developers.google.com/protocol-buffers/docs/proto3#json. +func (iter *Iterator) ReadInt32() int32 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.delegate.ReadInt32() + case jsoniter.StringValue: + val, err := strconv.ParseInt(iter.ReadString(), 10, 32) + if err != nil { + iter.ReportError("ReadInt32", err.Error()) + return 0 + } + return int32(val) + default: + iter.ReportError("ReadInt32", "unsupported value type") + return 0 + } +} + +// ReadUint32 unmarshalls JSON data into an uint32. Accepts both numbers and strings decimal. +// See https://developers.google.com/protocol-buffers/docs/proto3#json. +func (iter *Iterator) ReadUint32() uint32 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.delegate.ReadUint32() + case jsoniter.StringValue: + val, err := strconv.ParseUint(iter.ReadString(), 10, 32) + if err != nil { + iter.ReportError("ReadUint32", err.Error()) + return 0 + } + return uint32(val) + default: + iter.ReportError("ReadUint32", "unsupported value type") + return 0 + } +} + +// ReadInt64 unmarshalls JSON data into an int64. Accepts both numbers and strings decimal. +// See https://developers.google.com/protocol-buffers/docs/proto3#json. +func (iter *Iterator) ReadInt64() int64 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.delegate.ReadInt64() + case jsoniter.StringValue: + val, err := strconv.ParseInt(iter.ReadString(), 10, 64) + if err != nil { + iter.ReportError("ReadInt64", err.Error()) + return 0 + } + return val + default: + iter.ReportError("ReadInt64", "unsupported value type") + return 0 + } +} + +// ReadUint64 unmarshalls JSON data into an uint64. Accepts both numbers and strings decimal. +// See https://developers.google.com/protocol-buffers/docs/proto3#json. +func (iter *Iterator) ReadUint64() uint64 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.delegate.ReadUint64() + case jsoniter.StringValue: + val, err := strconv.ParseUint(iter.ReadString(), 10, 64) + if err != nil { + iter.ReportError("ReadUint64", err.Error()) + return 0 + } + return val + default: + iter.ReportError("ReadUint64", "unsupported value type") + return 0 + } +} + +func (iter *Iterator) ReadFloat32() float32 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.delegate.ReadFloat32() + case jsoniter.StringValue: + val, err := strconv.ParseFloat(iter.ReadString(), 32) + if err != nil { + iter.ReportError("ReadUint64", err.Error()) + return 0 + } + return float32(val) + default: + iter.ReportError("ReadUint64", "unsupported value type") + return 0 + } +} + +func (iter *Iterator) ReadFloat64() float64 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.delegate.ReadFloat64() + case jsoniter.StringValue: + val, err := strconv.ParseFloat(iter.ReadString(), 64) + if err != nil { + iter.ReportError("ReadUint64", err.Error()) + return 0 + } + return val + default: + iter.ReportError("ReadUint64", "unsupported value type") + return 0 + } +} + +// ReadBool reads a json object as BoolValue +func (iter *Iterator) ReadBool() bool { + return iter.delegate.ReadBool() +} + +// ReadString read string from iterator +func (iter *Iterator) ReadString() string { + return iter.delegate.ReadString() +} + +// ReadBytes read base64 encoded bytes from iterator. +func (iter *Iterator) ReadBytes() []byte { + buf := iter.ReadStringAsSlice() + if len(buf) == 0 { + return nil + } + orig := make([]byte, base64.StdEncoding.DecodedLen(len(buf))) + n, err := base64.StdEncoding.Decode(orig, buf) + if err != nil { + iter.ReportError("base64.Decode", err.Error()) + } + return orig[:n] +} + +// ReadStringAsSlice read string from iterator without copying into string form. +// The []byte cannot be kept, as it will change after next iterator call. +func (iter *Iterator) ReadStringAsSlice() []byte { + return iter.delegate.ReadStringAsSlice() +} + +// ReportError record a error in iterator instance with current position. +func (iter *Iterator) ReportError(operation, msg string) { + iter.delegate.ReportError(operation, msg) +} + +// Error returns any recorded error if any otherwise it returns nil. +func (iter *Iterator) Error() error { + return iter.delegate.Error +} + +// Skip skips a json object and positions to relatively the next json object +func (iter *Iterator) Skip() { + iter.delegate.Skip() +} + +// ReadArray read array element, returns true if the array has more element to read. +func (iter *Iterator) ReadArray() bool { + return iter.delegate.ReadArray() +} + +// ReadObject read one field from object. +// If object ended, returns empty string. Otherwise, returns the field name. +func (iter *Iterator) ReadObject() string { + return iter.delegate.ReadObject() +} + +// ReadEnumValue returns the enum integer value representation. Accepts both enum names and enum integer values. +// See https://developers.google.com/protocol-buffers/docs/proto3#json. +func (iter *Iterator) ReadEnumValue(valueMap map[string]int32) int32 { + switch iter.delegate.WhatIsNext() { + case jsoniter.NumberValue: + return iter.ReadInt32() + case jsoniter.StringValue: + val, ok := valueMap[iter.ReadString()] + // Same behavior with official protobuf JSON decoder, + // see https://github.com/open-telemetry/opentelemetry-proto-go/pull/81 + if !ok { + iter.ReportError("ReadEnumValue", "unknown string value") + return 0 + } + return val + default: + iter.ReportError("ReadEnumValue", "unsupported value type") + return 0 + } +} + +// ResetBytes reuse iterator instance by specifying another byte array as input +func (iter *Iterator) ResetBytes(input []byte) *Iterator { + iter.delegate.ResetBytes(input) + return iter +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go deleted file mode 100644 index b77d934b691..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - "io" - - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -var marshaler = &jsonpb.Marshaler{ - // https://github.com/open-telemetry/opentelemetry-specification/pull/2758 - EnumsAsInts: true, - // https://github.com/open-telemetry/opentelemetry-specification/pull/2829 - OrigName: false, -} - -func Marshal(out io.Writer, pb proto.Message) error { - return marshaler.Marshal(out, pb) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go deleted file mode 100644 index 23830b97133..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - "strconv" - - jsoniter "github.com/json-iterator/go" -) - -// ReadInt32 unmarshalls JSON data into an int32. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadInt32(iter *jsoniter.Iterator) int32 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadInt32() - case jsoniter.StringValue: - val, err := strconv.ParseInt(iter.ReadString(), 10, 32) - if err != nil { - iter.ReportError("ReadInt32", err.Error()) - return 0 - } - return int32(val) - default: - iter.ReportError("ReadInt32", "unsupported value type") - return 0 - } -} - -// ReadUint32 unmarshalls JSON data into an uint32. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadUint32(iter *jsoniter.Iterator) uint32 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadUint32() - case jsoniter.StringValue: - val, err := strconv.ParseUint(iter.ReadString(), 10, 32) - if err != nil { - iter.ReportError("ReadUint32", err.Error()) - return 0 - } - return uint32(val) - default: - iter.ReportError("ReadUint32", "unsupported value type") - return 0 - } -} - -// ReadInt64 unmarshalls JSON data into an int64. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadInt64(iter *jsoniter.Iterator) int64 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadInt64() - case jsoniter.StringValue: - val, err := strconv.ParseInt(iter.ReadString(), 10, 64) - if err != nil { - iter.ReportError("ReadInt64", err.Error()) - return 0 - } - return val - default: - iter.ReportError("ReadInt64", "unsupported value type") - return 0 - } -} - -// ReadUint64 unmarshalls JSON data into an uint64. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadUint64(iter *jsoniter.Iterator) uint64 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadUint64() - case jsoniter.StringValue: - val, err := strconv.ParseUint(iter.ReadString(), 10, 64) - if err != nil { - iter.ReportError("ReadUint64", err.Error()) - return 0 - } - return val - default: - iter.ReportError("ReadUint64", "unsupported value type") - return 0 - } -} - -func ReadFloat64(iter *jsoniter.Iterator) float64 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadFloat64() - case jsoniter.StringValue: - val, err := strconv.ParseFloat(iter.ReadString(), 64) - if err != nil { - iter.ReportError("ReadUint64", err.Error()) - return 0 - } - return val - default: - iter.ReportError("ReadUint64", "unsupported value type") - return 0 - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go deleted file mode 100644 index 302033bc441..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - jsoniter "github.com/json-iterator/go" - - otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -func ReadResource(iter *jsoniter.Iterator, resource *otlpresource.Resource) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - resource.Attributes = append(resource.Attributes, ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - resource.DroppedAttributesCount = ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go deleted file mode 100644 index 40ad41b15bf..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - jsoniter "github.com/json-iterator/go" - - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -func ReadScope(iter *jsoniter.Iterator, scope *otlpcommon.InstrumentationScope) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "name": - scope.Name = iter.ReadString() - case "version": - scope.Version = iter.ReadString() - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - scope.Attributes = append(scope.Attributes, ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - scope.DroppedAttributesCount = ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/stream.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/stream.go new file mode 100644 index 00000000000..0f1b7538908 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/json/stream.go @@ -0,0 +1,104 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package json // import "go.opentelemetry.io/collector/pdata/internal/json" + +import ( + "encoding/base64" + "errors" + "io" + "math" + "strconv" + + jsoniter "github.com/json-iterator/go" +) + +func BorrowStream(writer io.Writer) *Stream { + return &Stream{ + Stream: jsoniter.ConfigFastest.BorrowStream(writer), + wmTracker: make([]bool, 32), + } +} + +func ReturnStream(s *Stream) { + jsoniter.ConfigFastest.ReturnStream(s.Stream) +} + +// Stream avoids the need to explicitly call the `Stream.WriteMore` method while marshaling objects by +// checking if a field was previously written inside the current object and automatically appending a "," +// if so before writing the next field. +type Stream struct { + *jsoniter.Stream + // wmTracker acts like a stack which pushes a new value when an object is started and removes the + // top when it is ended. The value added for every object tracks if there is any written field + // already for that object, and if it is then automatically add a "," before any new field. + wmTracker []bool +} + +func (ots *Stream) WriteObjectStart() { + ots.Stream.WriteObjectStart() + ots.wmTracker = append(ots.wmTracker, false) +} + +func (ots *Stream) WriteObjectField(field string) { + if ots.wmTracker[len(ots.wmTracker)-1] { + ots.WriteMore() + } + + ots.Stream.WriteObjectField(field) + ots.wmTracker[len(ots.wmTracker)-1] = true +} + +func (ots *Stream) WriteObjectEnd() { + ots.Stream.WriteObjectEnd() + ots.wmTracker = ots.wmTracker[:len(ots.wmTracker)-1] +} + +// WriteInt64 writes the values as a decimal string. This is per the protobuf encoding rules for int64, fixed64, uint64. +func (ots *Stream) WriteInt64(val int64) { + ots.WriteString(strconv.FormatInt(val, 10)) +} + +// WriteUint64 writes the values as a decimal string. This is per the protobuf encoding rules for int64, fixed64, uint64. +func (ots *Stream) WriteUint64(val uint64) { + ots.WriteString(strconv.FormatUint(val, 10)) +} + +// WriteBytes writes the values as a base64 encoded string. This is per the protobuf encoding rules for bytes. +func (ots *Stream) WriteBytes(val []byte) { + if len(val) == 0 { + ots.WriteString("") + return + } + + ots.WriteString(base64.StdEncoding.EncodeToString(val)) +} + +// WriteFloat64 writes the JSON value that will be a number or one of the special string +// values "NaN", "Infinity", and "-Infinity". Either numbers or strings are accepted. +// Empty strings are invalid. Exponent notation is also accepted. +// See https://protobuf.dev/programming-guides/json/. +func (ots *Stream) WriteFloat64(val float64) { + if math.IsNaN(val) { + ots.WriteString("NaN") + return + } + if math.IsInf(val, 1) { + ots.WriteString("Infinity") + return + } + if math.IsInf(val, -1) { + ots.WriteString("-Infinity") + return + } + + ots.Stream.WriteFloat64(val) +} + +func (ots *Stream) ReportError(err error) { + ots.Stream.Error = errors.Join(ots.Stream.Error, err) +} + +func (ots *Stream) Error() error { + return ots.Stream.Error +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/encoding.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/encoding.go new file mode 100644 index 00000000000..4f3bfdb6ccc --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/encoding.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelgrpc // import "go.opentelemetry.io/collector/pdata/internal/otelgrpc" + +import ( + "google.golang.org/grpc/encoding" + "google.golang.org/grpc/mem" +) + +var ( + defaultBufferPoolSizes = []int{ + 256, + 4 << 10, // 4KB (go page size) + 16 << 10, // 16KB (max HTTP/2 frame size used by gRPC) + 32 << 10, // 32KB (default buffer size for io.Copy) + 512 << 10, // 512KB + 1 << 20, // 1MB + 4 << 20, // 4MB + 16 << 20, // 16MB + } + otelBufferPool = mem.NewTieredBufferPool(defaultBufferPoolSizes...) +) + +// DefaultBufferPool returns the current default buffer pool. It is a BufferPool +// created with mem.NewTieredBufferPool that uses a set of default sizes optimized for +// expected telemetry workflows. +func DefaultBufferPool() mem.BufferPool { + return otelBufferPool +} + +// Name is the name registered for the proto compressor. +const Name = "proto" + +func init() { + encoding.RegisterCodecV2(&codecV2{delegate: encoding.GetCodecV2(Name)}) +} + +// codecV2 is a custom proto encoding that uses a different tier schema for the TieredBufferPool as well +// as it call into the custom marshal/unmarshal logic that works with memory pooling. +// If not an otlp payload fallback on the default grpc/proto encoding. +type codecV2 struct { + delegate encoding.CodecV2 +} + +type otelEncoder interface { + SizeProto() int + MarshalProto([]byte) int + UnmarshalProto([]byte) error +} + +func (c *codecV2) Marshal(v any) (mem.BufferSlice, error) { + if m, ok := v.(otelEncoder); ok { + size := m.SizeProto() + buf := otelBufferPool.Get(size) + n := m.MarshalProto((*buf)[:size]) + *buf = (*buf)[:n] + return []mem.Buffer{mem.NewBuffer(buf, otelBufferPool)}, nil + } + + return c.delegate.Marshal(v) +} + +func (c *codecV2) Unmarshal(data mem.BufferSlice, v any) (err error) { + if m, ok := v.(otelEncoder); ok { + // TODO: Upgrade custom Unmarshal logic to support reading from mem.BufferSlice. + buf := data.MaterializeToBuffer(otelBufferPool) + defer buf.Free() + return m.UnmarshalProto(buf.ReadOnlyData()) + } + + return c.delegate.Unmarshal(data, v) +} + +func (c *codecV2) Name() string { + return Name +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/logs_service.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/logs_service.go new file mode 100644 index 00000000000..ef26e365485 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/logs_service.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelgrpc // import "go.opentelemetry.io/collector/pdata/internal/otelgrpc" + +import ( + "context" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/pdata/internal" +) + +// LogsServiceClient is the client API for LogsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type LogsServiceClient interface { + Export(context.Context, *internal.ExportLogsServiceRequest, ...grpc.CallOption) (*internal.ExportLogsServiceResponse, error) +} + +type logsServiceClient struct { + cc *grpc.ClientConn +} + +func NewLogsServiceClient(cc *grpc.ClientConn) LogsServiceClient { + return &logsServiceClient{cc} +} + +func (c *logsServiceClient) Export(ctx context.Context, in *internal.ExportLogsServiceRequest, opts ...grpc.CallOption) (*internal.ExportLogsServiceResponse, error) { + out := new(internal.ExportLogsServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.logs.v1.LogsService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LogsServiceServer is the server API for LogsService service. +type LogsServiceServer interface { + Export(context.Context, *internal.ExportLogsServiceRequest) (*internal.ExportLogsServiceResponse, error) +} + +// UnimplementedLogsServiceServer can be embedded to have forward compatible implementations. +type UnimplementedLogsServiceServer struct{} + +func (*UnimplementedLogsServiceServer) Export(context.Context, *internal.ExportLogsServiceRequest) (*internal.ExportLogsServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterLogsServiceServer(s *grpc.Server, srv LogsServiceServer) { + s.RegisterService(&logsServiceServiceDesc, srv) +} + +// Context cannot be the first parameter of the function because gRPC definition. +// +//nolint:revive +func logsServiceExportHandler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { + in := new(internal.ExportLogsServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LogsServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.logs.v1.LogsService/Export", + } + handler := func(ctx context.Context, req any) (any, error) { + return srv.(LogsServiceServer).Export(ctx, req.(*internal.ExportLogsServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var logsServiceServiceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.logs.v1.LogsService", + HandlerType: (*LogsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: logsServiceExportHandler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/logs/v1/logs_service.proto", +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/metrics_service.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/metrics_service.go new file mode 100644 index 00000000000..daf4f5cc8a9 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/metrics_service.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelgrpc // import "go.opentelemetry.io/collector/pdata/internal/otelgrpc" + +import ( + "context" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/pdata/internal" +) + +// MetricsServiceClient is the client API for MetricsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsServiceClient interface { + Export(context.Context, *internal.ExportMetricsServiceRequest, ...grpc.CallOption) (*internal.ExportMetricsServiceResponse, error) +} + +type metricsServiceClient struct { + cc *grpc.ClientConn +} + +func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient { + return &metricsServiceClient{cc} +} + +func (c *metricsServiceClient) Export(ctx context.Context, in *internal.ExportMetricsServiceRequest, opts ...grpc.CallOption) (*internal.ExportMetricsServiceResponse, error) { + out := new(internal.ExportMetricsServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricsServiceServer is the server API for MetricsService service. +type MetricsServiceServer interface { + Export(context.Context, *internal.ExportMetricsServiceRequest) (*internal.ExportMetricsServiceResponse, error) +} + +// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsServiceServer struct{} + +func (*UnimplementedMetricsServiceServer) Export(context.Context, *internal.ExportMetricsServiceRequest) (*internal.ExportMetricsServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) { + s.RegisterService(&metricsServiceServiceDesc, srv) +} + +// Context cannot be the first parameter of the function because gRPC definition. +// +//nolint:revive +func metricsServiceExportHandler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { + in := new(internal.ExportMetricsServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", + } + handler := func(ctx context.Context, req any) (any, error) { + return srv.(MetricsServiceServer).Export(ctx, req.(*internal.ExportMetricsServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var metricsServiceServiceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.metrics.v1.MetricsService", + HandlerType: (*MetricsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: metricsServiceExportHandler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/metrics/v1/metrics_service.proto", +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/profiles_service.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/profiles_service.go new file mode 100644 index 00000000000..db846146ff8 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/profiles_service.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelgrpc // import "go.opentelemetry.io/collector/pdata/internal/otelgrpc" + +import ( + "context" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/pdata/internal" +) + +// ProfilesServiceClient is the client API for ProfilesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ProfilesServiceClient interface { + Export(context.Context, *internal.ExportProfilesServiceRequest, ...grpc.CallOption) (*internal.ExportProfilesServiceResponse, error) +} + +type profilesServiceClient struct { + cc *grpc.ClientConn +} + +func NewProfilesServiceClient(cc *grpc.ClientConn) ProfilesServiceClient { + return &profilesServiceClient{cc} +} + +func (c *profilesServiceClient) Export(ctx context.Context, in *internal.ExportProfilesServiceRequest, opts ...grpc.CallOption) (*internal.ExportProfilesServiceResponse, error) { + out := new(internal.ExportProfilesServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProfilesServiceServer is the server API for ProfilesService service. +type ProfilesServiceServer interface { + Export(context.Context, *internal.ExportProfilesServiceRequest) (*internal.ExportProfilesServiceResponse, error) +} + +// UnimplementedProfilesServiceServer can be embedded to have forward compatible implementations. +type UnimplementedProfilesServiceServer struct{} + +func (*UnimplementedProfilesServiceServer) Export(context.Context, *internal.ExportProfilesServiceRequest) (*internal.ExportProfilesServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterProfilesServiceServer(s *grpc.Server, srv ProfilesServiceServer) { + s.RegisterService(&profilesServiceServiceDesc, srv) +} + +// Context cannot be the first parameter of the function because gRPC definition. +// +//nolint:revive +func profilesServiceExportHandler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { + in := new(internal.ExportProfilesServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfilesServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", + } + handler := func(ctx context.Context, req any) (any, error) { + return srv.(ProfilesServiceServer).Export(ctx, req.(*internal.ExportProfilesServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var profilesServiceServiceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.profiles.v1development.ProfilesService", + HandlerType: (*ProfilesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: profilesServiceExportHandler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/trace_service.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/trace_service.go new file mode 100644 index 00000000000..943f61792bd --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otelgrpc/trace_service.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otelgrpc // import "go.opentelemetry.io/collector/pdata/internal/otelgrpc" + +import ( + "context" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.opentelemetry.io/collector/pdata/internal" +) + +// TraceServiceClient is the client API for TraceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TraceServiceClient interface { + Export(context.Context, *internal.ExportTraceServiceRequest, ...grpc.CallOption) (*internal.ExportTraceServiceResponse, error) +} + +type traceServiceClient struct { + cc *grpc.ClientConn +} + +func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient { + return &traceServiceClient{cc} +} + +func (c *traceServiceClient) Export(ctx context.Context, in *internal.ExportTraceServiceRequest, opts ...grpc.CallOption) (*internal.ExportTraceServiceResponse, error) { + out := new(internal.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. +type TraceServiceServer interface { + Export(context.Context, *internal.ExportTraceServiceRequest) (*internal.ExportTraceServiceResponse, error) +} + +// UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTraceServiceServer struct{} + +func (*UnimplementedTraceServiceServer) Export(context.Context, *internal.ExportTraceServiceRequest) (*internal.ExportTraceServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { + s.RegisterService(&traceServiceServiceDesc, srv) +} + +// Context cannot be the first parameter of the function because gRPC definition. +// +//nolint:revive +func traceServiceExportHandler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { + in := new(internal.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 any) (any, error) { + return srv.(TraceServiceServer).Export(ctx, req.(*internal.ExportTraceServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var traceServiceServiceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.trace.v1.TraceService", + HandlerType: (*TraceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: traceServiceExportHandler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/trace/v1/trace_service.proto", +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go index c0328a5b41d..aad78de4e22 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go @@ -4,12 +4,12 @@ package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" import ( - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // MigrateLogs implements any translation needed due to deprecation in OTLP logs protocol. // Any plog.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateLogs(rls []*otlplogs.ResourceLogs) { +func MigrateLogs(rls []*internal.ResourceLogs) { for _, rl := range rls { if len(rl.ScopeLogs) == 0 { rl.ScopeLogs = rl.DeprecatedScopeLogs diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go index 9a7da14868c..fb1776c4ffd 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go @@ -4,12 +4,12 @@ package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" import ( - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // MigrateMetrics implements any translation needed due to deprecation in OTLP metrics protocol. // Any pmetric.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateMetrics(rms []*otlpmetrics.ResourceMetrics) { +func MigrateMetrics(rms []*internal.ResourceMetrics) { for _, rm := range rms { if len(rm.ScopeMetrics) == 0 { rm.ScopeMetrics = rm.DeprecatedScopeMetrics diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go index 59c23cc672b..5144e7c4d2f 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go @@ -4,9 +4,9 @@ package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" import ( - otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development" + "go.opentelemetry.io/collector/pdata/internal" ) // MigrateProfiles implements any translation needed due to deprecation in OTLP profiles protocol. // Any pprofile.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateProfiles(_ []*otlpprofiles.ResourceProfiles) {} +func MigrateProfiles(_ []*internal.ResourceProfiles) {} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go index 627881fc3dc..84f5deadef0 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go @@ -4,12 +4,12 @@ package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" import ( - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // MigrateTraces implements any translation needed due to deprecation in OTLP traces protocol. // Any ptrace.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateTraces(rss []*otlptrace.ResourceSpans) { +func MigrateTraces(rss []*internal.ResourceSpans) { for _, rs := range rss { if len(rs.ScopeSpans) == 0 { rs.ScopeSpans = rs.DeprecatedScopeSpans diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/profileid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/profileid.go new file mode 100644 index 00000000000..5a038fe0854 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/profileid.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal" + +import ( + "encoding/hex" + "errors" + + "go.opentelemetry.io/collector/pdata/internal/json" +) + +const profileIDSize = 16 + +var errUnmarshalProfileID = errors.New("unmarshal: invalid ProfileID length") + +// ProfileID is a custom data type that is used for all profile_id fields in OTLP +// Protobuf messages. +type ProfileID [profileIDSize]byte + +func DeleteProfileID(*ProfileID, bool) {} + +func CopyProfileID(dest, src *ProfileID) { + *dest = *src +} + +// IsEmpty returns true if id contains at leas one non-zero byte. +func (pid ProfileID) IsEmpty() bool { + return pid == [profileIDSize]byte{} +} + +// SizeProto returns the size of the data to serialize in proto format. +func (pid ProfileID) SizeProto() int { + if pid.IsEmpty() { + return 0 + } + + return profileIDSize +} + +// MarshalProto converts profile ID into a binary representation. Called by Protobuf serialization. +func (pid ProfileID) MarshalProto(buf []byte) int { + if pid.IsEmpty() { + return 0 + } + + return copy(buf[len(buf)-profileIDSize:], pid[:]) +} + +// UnmarshalProto inflates this profile ID from binary representation. Called by Protobuf serialization. +func (pid *ProfileID) UnmarshalProto(buf []byte) error { + if len(buf) == 0 { + *pid = [profileIDSize]byte{} + return nil + } + + if len(buf) != profileIDSize { + return errUnmarshalProfileID + } + + copy(pid[:], buf) + return nil +} + +// MarshalJSON converts ProfileID into a hex string. +// +//nolint:govet +func (pid ProfileID) MarshalJSON(dest *json.Stream) { + dest.WriteString(hex.EncodeToString(pid[:])) +} + +// UnmarshalJSON decodes ProfileID from hex string. +// +//nolint:govet +func (pid *ProfileID) UnmarshalJSON(iter *json.Iterator) { + *pid = [profileIDSize]byte{} + unmarshalJSON(pid[:], iter) +} + +func GenTestProfileID() *ProfileID { + pid := ProfileID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) + return &pid +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/proto/marshal.go b/vendor/go.opentelemetry.io/collector/pdata/internal/proto/marshal.go new file mode 100644 index 00000000000..b4d494e6e54 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/proto/marshal.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package proto // import "go.opentelemetry.io/collector/pdata/internal/proto" + +// EncodeVarint encodes the variant at the end of the buffer. +func EncodeVarint(buf []byte, offset int, v uint64) int { + offset -= Sov(v) + base := offset + for v >= 1<<7 { + buf[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + buf[offset] = uint8(v) + return base +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/proto/size.go b/vendor/go.opentelemetry.io/collector/pdata/internal/proto/size.go new file mode 100644 index 00000000000..bfc52147599 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/proto/size.go @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package proto // import "go.opentelemetry.io/collector/pdata/internal/proto" + +import ( + "math/bits" +) + +func Sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} + +func Soz(x uint64) (n int) { + return Sov((x << 1) ^ uint64((int64(x) >> 63))) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/proto/unmarshal.go b/vendor/go.opentelemetry.io/collector/pdata/internal/proto/unmarshal.go new file mode 100644 index 00000000000..b6dc0c79495 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/proto/unmarshal.go @@ -0,0 +1,145 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package proto // import "go.opentelemetry.io/collector/pdata/internal/proto" + +import ( + "encoding/binary" + "errors" + "fmt" + "io" +) + +// WireType represents the proto wire type. +type WireType int8 + +const ( + WireTypeVarint WireType = 0 + WireTypeI64 WireType = 1 + WireTypeLen WireType = 2 + WireTypeStartGroup WireType = 3 + WireTypeEndGroup WireType = 4 + WireTypeI32 WireType = 5 +) + +var ( + ErrInvalidLength = errors.New("proto: negative length found during unmarshaling") + ErrIntOverflow = errors.New("proto: integer overflow") + ErrUnexpectedEndOfGroup = errors.New("proto: unexpected end of group") +) + +// ConsumeUnknown parses buf starting at pos as a wireType field, reporting the new position. +func ConsumeUnknown(buf []byte, pos int, wireType WireType) (int, error) { + var err error + l := len(buf) + depth := 0 + for pos < l { + switch wireType { + case WireTypeVarint: + _, pos, err = ConsumeVarint(buf, pos) + return pos, err + case WireTypeI64: + _, pos, err = ConsumeI64(buf, pos) + return pos, err + case WireTypeLen: + _, pos, err = ConsumeLen(buf, pos) + return pos, err + case WireTypeStartGroup: + depth++ + case WireTypeEndGroup: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroup + } + depth-- + case WireTypeI32: + _, pos, err = ConsumeI32(buf, pos) + return pos, err + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + + // Only when parsing a group can be here, if done return otherwise parse more tags. + if depth == 0 { + return pos, nil + } + + // If in a group parsing, move to the next tag. + _, wireType, pos, err = ConsumeTag(buf, pos) + if err != nil { + return 0, err + } + } + return 0, io.ErrUnexpectedEOF +} + +// ConsumeI64 parses buf starting at pos as a WireTypeI64 field, reporting the value and the new position. +func ConsumeI64(buf []byte, pos int) (uint64, int, error) { + pos += 8 + if pos < 0 || pos > len(buf) { + return 0, 0, io.ErrUnexpectedEOF + } + return binary.LittleEndian.Uint64(buf[pos-8:]), pos, nil +} + +// ConsumeLen parses buf starting at pos as a WireTypeLen field, reporting the len and the new position. +func ConsumeLen(buf []byte, pos int) (int, int, error) { + var num uint64 + var err error + num, pos, err = ConsumeVarint(buf, pos) + if err != nil { + return 0, 0, err + } + length := int(num) + if length < 0 { + return 0, 0, ErrInvalidLength + } + pos += length + if pos < 0 || pos > len(buf) { + return 0, 0, io.ErrUnexpectedEOF + } + return length, pos, nil +} + +// ConsumeI32 parses buf starting at pos as a WireTypeI32 field, reporting the value and the new position. +func ConsumeI32(buf []byte, pos int) (uint32, int, error) { + pos += 4 + if pos < 0 || pos > len(buf) { + return 0, 0, io.ErrUnexpectedEOF + } + return binary.LittleEndian.Uint32(buf[pos-4:]), pos, nil +} + +// ConsumeTag parses buf starting at pos as a varint-encoded tag, reporting the new position. +func ConsumeTag(buf []byte, pos int) (int32, WireType, int, error) { + tag, pos, err := ConsumeVarint(buf, pos) + if err != nil { + return 0, 0, 0, err + } + fieldNum := int32(tag >> 3) + wireType := int8(tag & 0x7) + if fieldNum <= 0 { + return 0, 0, 0, fmt.Errorf("proto: Link: illegal field=%d (tag=%d, pos=%d)", fieldNum, tag, pos) + } + return fieldNum, WireType(wireType), pos, nil +} + +// ConsumeVarint parses buf starting at pos as a varint-encoded uint64, reporting the new position. +func ConsumeVarint(buf []byte, pos int) (uint64, int, error) { + l := len(buf) + var num uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, 0, ErrIntOverflow + } + if pos >= l { + return 0, 0, io.ErrUnexpectedEOF + } + b := buf[pos] + pos++ + num |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + return num, pos, nil +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/spanid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/spanid.go new file mode 100644 index 00000000000..9ec0f465fb0 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/spanid.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal" + +import ( + "encoding/hex" + "errors" + + "go.opentelemetry.io/collector/pdata/internal/json" +) + +const spanIDSize = 8 + +var errUnmarshalSpanID = errors.New("unmarshal: invalid SpanID length") + +// SpanID is a custom data type that is used for all span_id fields in OTLP +// Protobuf messages. +type SpanID [spanIDSize]byte + +func DeleteSpanID(*SpanID, bool) {} + +func CopySpanID(dest, src *SpanID) { + *dest = *src +} + +// IsEmpty returns true if id contains at least one non-zero byte. +func (sid SpanID) IsEmpty() bool { + return sid == [spanIDSize]byte{} +} + +// SizeProto returns the size of the data to serialize in proto format. +func (sid SpanID) SizeProto() int { + if sid.IsEmpty() { + return 0 + } + return spanIDSize +} + +// MarshalProto converts span ID into a binary representation. Called by Protobuf serialization. +func (sid SpanID) MarshalProto(buf []byte) int { + if sid.IsEmpty() { + return 0 + } + + return copy(buf[len(buf)-spanIDSize:], sid[:]) +} + +// UnmarshalProto inflates this span ID from binary representation. Called by Protobuf serialization. +func (sid *SpanID) UnmarshalProto(data []byte) error { + if len(data) == 0 { + *sid = [spanIDSize]byte{} + return nil + } + + if len(data) != spanIDSize { + return errUnmarshalSpanID + } + + copy(sid[:], data) + return nil +} + +// MarshalJSON converts SpanID into a hex string. +// +//nolint:govet +func (sid SpanID) MarshalJSON(dest *json.Stream) { + dest.WriteString(hex.EncodeToString(sid[:])) +} + +// UnmarshalJSON decodes SpanID from hex string. +// +//nolint:govet +func (sid *SpanID) UnmarshalJSON(iter *json.Iterator) { + *sid = [spanIDSize]byte{} + unmarshalJSON(sid[:], iter) +} + +func GenTestSpanID() *SpanID { + sid := SpanID([8]byte{8, 7, 6, 5, 4, 3, 2, 1}) + return &sid +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/state.go b/vendor/go.opentelemetry.io/collector/pdata/internal/state.go index f10de5eadf1..46f10722dc7 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/state.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/state.go @@ -2,21 +2,89 @@ // SPDX-License-Identifier: Apache-2.0 package internal // import "go.opentelemetry.io/collector/pdata/internal" +import ( + "sync/atomic" + + "go.opentelemetry.io/collector/featuregate" +) + +var _ = featuregate.GlobalRegistry().MustRegister( + "pdata.useCustomProtoEncoding", + featuregate.StageStable, + featuregate.WithRegisterDescription("When enabled, enable custom proto encoding. This is required step to enable featuregate pdata.useProtoPooling."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector/issues/13631"), + featuregate.WithRegisterFromVersion("v0.133.0"), + featuregate.WithRegisterToVersion("v0.137.0"), +) + +var UseProtoPooling = featuregate.GlobalRegistry().MustRegister( + "pdata.useProtoPooling", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled, enable using local memory pools for underlying data that the pdata messages are pushed to."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector/issues/13631"), + featuregate.WithRegisterFromVersion("v0.133.0"), +) // State defines an ownership state of pmetric.Metrics, plog.Logs or ptrace.Traces. -type State int32 +type State struct { + refs atomic.Int32 + state uint32 +} const ( - // StateMutable indicates that the data is exclusive to the current consumer. - StateMutable State = iota - - // StateReadOnly indicates that the data is shared with other consumers. - StateReadOnly + defaultState uint32 = 0 + stateReadOnlyBit = uint32(1 << 0) + statePipelineOwnedBit = uint32(1 << 1) ) +func NewState() *State { + st := &State{ + state: defaultState, + } + st.refs.Store(1) + return st +} + +func (st *State) MarkReadOnly() { + st.state |= stateReadOnlyBit +} + +func (st *State) IsReadOnly() bool { + return st.state&stateReadOnlyBit != 0 +} + // AssertMutable panics if the state is not StateMutable. -func (state *State) AssertMutable() { - if *state != StateMutable { +func (st *State) AssertMutable() { + if st.state&stateReadOnlyBit != 0 { panic("invalid access to shared data") } } + +// MarkPipelineOwned marks the data as owned by the pipeline, returns true if the data were +// previously not owned by the pipeline, otherwise false. +func (st *State) MarkPipelineOwned() bool { + if st.state&statePipelineOwnedBit != 0 { + return false + } + st.state |= statePipelineOwnedBit + return true +} + +// Ref add one to the count of active references. +func (st *State) Ref() { + st.refs.Add(1) +} + +// Unref returns true if reference count got to 0 which means no more active references, +// otherwise it returns false. +func (st *State) Unref() bool { + refs := st.refs.Add(-1) + switch { + case refs > 0: + return false + case refs == 0: + return true + default: + panic("Cannot unref freed data") + } +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/traceid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/traceid.go new file mode 100644 index 00000000000..fe54123de6d --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/traceid.go @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal" + +import ( + "encoding/hex" + "errors" + + "go.opentelemetry.io/collector/pdata/internal/json" +) + +const traceIDSize = 16 + +var errUnmarshalTraceID = errors.New("unmarshal: invalid TraceID length") + +// TraceID is a custom data type that is used for all trace_id fields in OTLP +// Protobuf messages. +type TraceID [traceIDSize]byte + +func DeleteTraceID(*TraceID, bool) {} + +func CopyTraceID(dest, src *TraceID) { + *dest = *src +} + +// IsEmpty returns true if id contains at leas one non-zero byte. +func (tid TraceID) IsEmpty() bool { + return tid == [traceIDSize]byte{} +} + +// SizeProto returns the size of the data to serialize in proto format. +func (tid TraceID) SizeProto() int { + if tid.IsEmpty() { + return 0 + } + + return traceIDSize +} + +// MarshalProto converts trace ID into a binary representation. Called by Protobuf serialization. +func (tid TraceID) MarshalProto(buf []byte) int { + if tid.IsEmpty() { + return 0 + } + + return copy(buf[len(buf)-traceIDSize:], tid[:]) +} + +// UnmarshalProto inflates this trace ID from binary representation. Called by Protobuf serialization. +func (tid *TraceID) UnmarshalProto(buf []byte) error { + if len(buf) == 0 { + *tid = [traceIDSize]byte{} + return nil + } + + if len(buf) != traceIDSize { + return errUnmarshalTraceID + } + + copy(tid[:], buf) + return nil +} + +// MarshalJSON converts TraceID into a hex string. +// +//nolint:govet +func (tid TraceID) MarshalJSON(dest *json.Stream) { + dest.WriteString(hex.EncodeToString(tid[:])) +} + +// UnmarshalJSON decodes TraceID from hex string. +// +//nolint:govet +func (tid *TraceID) UnmarshalJSON(iter *json.Iterator) { + *tid = [profileIDSize]byte{} + unmarshalJSON(tid[:], iter) +} + +func GenTestTraceID() *TraceID { + tid := TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) + return &tid +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go index 6b6c076cca6..b47b508336c 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go @@ -3,44 +3,17 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -import ( - otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" -) - -type Logs struct { - orig *otlpcollectorlog.ExportLogsServiceRequest - state *State -} - -func GetOrigLogs(ms Logs) *otlpcollectorlog.ExportLogsServiceRequest { - return ms.orig -} - -func GetLogsState(ms Logs) *State { - return ms.state -} - -func SetLogsState(ms Logs, state State) { - *ms.state = state -} - -func NewLogs(orig *otlpcollectorlog.ExportLogsServiceRequest, state *State) Logs { - return Logs{orig: orig, state: state} -} - // LogsToProto internal helper to convert Logs to protobuf representation. -func LogsToProto(l Logs) otlplogs.LogsData { - return otlplogs.LogsData{ +func LogsToProto(l LogsWrapper) LogsData { + return LogsData{ ResourceLogs: l.orig.ResourceLogs, } } // LogsFromProto internal helper to convert protobuf representation to Logs. // This function set exclusive state assuming that it's called only once per Logs. -func LogsFromProto(orig otlplogs.LogsData) Logs { - state := StateMutable - return NewLogs(&otlpcollectorlog.ExportLogsServiceRequest{ +func LogsFromProto(orig LogsData) LogsWrapper { + return NewLogsWrapper(&ExportLogsServiceRequest{ ResourceLogs: orig.ResourceLogs, - }, &state) + }, NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go index 131ed01fcdc..c5c6ca7f6da 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go @@ -3,48 +3,24 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type Map struct { - orig *[]otlpcommon.KeyValue +type MapWrapper struct { + orig *[]KeyValue state *State } -func GetOrigMap(ms Map) *[]otlpcommon.KeyValue { +func GetMapOrig(ms MapWrapper) *[]KeyValue { return ms.orig } -func GetMapState(ms Map) *State { +func GetMapState(ms MapWrapper) *State { return ms.state } -func NewMap(orig *[]otlpcommon.KeyValue, state *State) Map { - return Map{orig: orig, state: state} -} - -func CopyOrigMap(dest, src []otlpcommon.KeyValue) []otlpcommon.KeyValue { - if cap(dest) < len(src) { - dest = make([]otlpcommon.KeyValue, len(src)) - } - dest = dest[:len(src)] - for i := 0; i < len(src); i++ { - dest[i].Key = src[i].Key - CopyOrigValue(&dest[i].Value, &src[i].Value) - } - return dest -} - -func GenerateTestMap() Map { - var orig []otlpcommon.KeyValue - state := StateMutable - ms := NewMap(&orig, &state) - FillTestMap(ms) - return ms +func NewMapWrapper(orig *[]KeyValue, state *State) MapWrapper { + return MapWrapper{orig: orig, state: state} } -func FillTestMap(dest Map) { - *dest.orig = nil - *dest.orig = append(*dest.orig, otlpcommon.KeyValue{Key: "k", Value: otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: "v"}}}) +func GenTestMapWrapper() MapWrapper { + orig := GenTestKeyValueSlice() + return NewMapWrapper(&orig, NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go index 85be497ea5c..3cb790395fc 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go @@ -3,44 +3,17 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -import ( - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" -) - -type Metrics struct { - orig *otlpcollectormetrics.ExportMetricsServiceRequest - state *State -} - -func GetOrigMetrics(ms Metrics) *otlpcollectormetrics.ExportMetricsServiceRequest { - return ms.orig -} - -func GetMetricsState(ms Metrics) *State { - return ms.state -} - -func SetMetricsState(ms Metrics, state State) { - *ms.state = state -} - -func NewMetrics(orig *otlpcollectormetrics.ExportMetricsServiceRequest, state *State) Metrics { - return Metrics{orig: orig, state: state} -} - // MetricsToProto internal helper to convert Metrics to protobuf representation. -func MetricsToProto(l Metrics) otlpmetrics.MetricsData { - return otlpmetrics.MetricsData{ +func MetricsToProto(l MetricsWrapper) MetricsData { + return MetricsData{ ResourceMetrics: l.orig.ResourceMetrics, } } // MetricsFromProto internal helper to convert protobuf representation to Metrics. // This function set exclusive state assuming that it's called only once per Metrics. -func MetricsFromProto(orig otlpmetrics.MetricsData) Metrics { - state := StateMutable - return NewMetrics(&otlpcollectormetrics.ExportMetricsServiceRequest{ +func MetricsFromProto(orig MetricsData) MetricsWrapper { + return NewMetricsWrapper(&ExportMetricsServiceRequest{ ResourceMetrics: orig.ResourceMetrics, - }, &state) + }, NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go index 5b5f0cc06ef..1a56d922975 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go @@ -3,35 +3,9 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -import ( - otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development" - otlpprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development" -) - -type Profiles struct { - orig *otlpcollectorprofile.ExportProfilesServiceRequest - state *State -} - -func GetOrigProfiles(ms Profiles) *otlpcollectorprofile.ExportProfilesServiceRequest { - return ms.orig -} - -func GetProfilesState(ms Profiles) *State { - return ms.state -} - -func SetProfilesState(ms Profiles, state State) { - *ms.state = state -} - -func NewProfiles(orig *otlpcollectorprofile.ExportProfilesServiceRequest, state *State) Profiles { - return Profiles{orig: orig, state: state} -} - // ProfilesToProto internal helper to convert Profiles to protobuf representation. -func ProfilesToProto(l Profiles) otlpprofile.ProfilesData { - return otlpprofile.ProfilesData{ +func ProfilesToProto(l ProfilesWrapper) ProfilesData { + return ProfilesData{ ResourceProfiles: l.orig.ResourceProfiles, Dictionary: l.orig.Dictionary, } @@ -39,10 +13,9 @@ func ProfilesToProto(l Profiles) otlpprofile.ProfilesData { // ProfilesFromProto internal helper to convert protobuf representation to Profiles. // This function set exclusive state assuming that it's called only once per Profiles. -func ProfilesFromProto(orig otlpprofile.ProfilesData) Profiles { - state := StateMutable - return NewProfiles(&otlpcollectorprofile.ExportProfilesServiceRequest{ +func ProfilesFromProto(orig ProfilesData) ProfilesWrapper { + return NewProfilesWrapper(&ExportProfilesServiceRequest{ ResourceProfiles: orig.ResourceProfiles, Dictionary: orig.Dictionary, - }, &state) + }, NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go deleted file mode 100644 index 5105cc6f3ad..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type Slice struct { - orig *[]otlpcommon.AnyValue - state *State -} - -func GetOrigSlice(ms Slice) *[]otlpcommon.AnyValue { - return ms.orig -} - -func GetSliceState(ms Slice) *State { - return ms.state -} - -func NewSlice(orig *[]otlpcommon.AnyValue, state *State) Slice { - return Slice{orig: orig, state: state} -} - -func CopyOrigSlice(dest, src []otlpcommon.AnyValue) []otlpcommon.AnyValue { - if cap(dest) < len(src) { - dest = make([]otlpcommon.AnyValue, len(src)) - } - dest = dest[:len(src)] - for i := 0; i < len(src); i++ { - CopyOrigValue(&dest[i], &src[i]) - } - return dest -} - -func GenerateTestSlice() Slice { - orig := []otlpcommon.AnyValue{} - state := StateMutable - tv := NewSlice(&orig, &state) - FillTestSlice(tv) - return tv -} - -func FillTestSlice(tv Slice) { - *tv.orig = make([]otlpcommon.AnyValue, 7) - for i := 0; i < 7; i++ { - state := StateMutable - FillTestValue(NewValue(&(*tv.orig)[i], &state)) - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go index 5a4cdadbde0..758a1cb27e0 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go @@ -3,44 +3,17 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -import ( - otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -type Traces struct { - orig *otlpcollectortrace.ExportTraceServiceRequest - state *State -} - -func GetOrigTraces(ms Traces) *otlpcollectortrace.ExportTraceServiceRequest { - return ms.orig -} - -func GetTracesState(ms Traces) *State { - return ms.state -} - -func SetTracesState(ms Traces, state State) { - *ms.state = state -} - -func NewTraces(orig *otlpcollectortrace.ExportTraceServiceRequest, state *State) Traces { - return Traces{orig: orig, state: state} -} - // TracesToProto internal helper to convert Traces to protobuf representation. -func TracesToProto(l Traces) otlptrace.TracesData { - return otlptrace.TracesData{ +func TracesToProto(l TracesWrapper) TracesData { + return TracesData{ ResourceSpans: l.orig.ResourceSpans, } } // TracesFromProto internal helper to convert protobuf representation to Traces. // This function set exclusive state assuming that it's called only once per Traces. -func TracesFromProto(orig otlptrace.TracesData) Traces { - state := StateMutable - return NewTraces(&otlpcollectortrace.ExportTraceServiceRequest{ +func TracesFromProto(orig TracesData) TracesWrapper { + return NewTracesWrapper(&ExportTraceServiceRequest{ ResourceSpans: orig.ResourceSpans, - }, &state) + }, NewState()) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go index d1d5c3cf865..56278b728dd 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go @@ -3,35 +3,29 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -type TraceState struct { +type TraceStateWrapper struct { orig *string state *State } -func GetOrigTraceState(ms TraceState) *string { +func GetTraceStateOrig(ms TraceStateWrapper) *string { return ms.orig } -func GetTraceStateState(ms TraceState) *State { +func GetTraceStateState(ms TraceStateWrapper) *State { return ms.state } -func NewTraceState(orig *string, state *State) TraceState { - return TraceState{orig: orig, state: state} +func NewTraceStateWrapper(orig *string, state *State) TraceStateWrapper { + return TraceStateWrapper{orig: orig, state: state} } -func CopyOrigTraceState(dest, src *string) { - *dest = *src +func GenTestTraceStateWrapper() TraceStateWrapper { + return NewTraceStateWrapper(GenTestTraceState(), NewState()) } -func GenerateTestTraceState() TraceState { - var orig string - state := StateMutable - ms := NewTraceState(&orig, &state) - FillTestTraceState(ms) - return ms -} - -func FillTestTraceState(dest TraceState) { - *dest.orig = "rojo=00f067aa0ba902b7" +func GenTestTraceState() *string { + orig := new(string) + *orig = "rojo=00f067aa0ba902b7" + return orig } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go index c0e0497d590..c0220c8f010 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go @@ -3,73 +3,73 @@ package internal // import "go.opentelemetry.io/collector/pdata/internal" -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type Value struct { - orig *otlpcommon.AnyValue +type ValueWrapper struct { + orig *AnyValue state *State } -func GetOrigValue(ms Value) *otlpcommon.AnyValue { +func GetValueOrig(ms ValueWrapper) *AnyValue { return ms.orig } -func GetValueState(ms Value) *State { +func GetValueState(ms ValueWrapper) *State { return ms.state } -func NewValue(orig *otlpcommon.AnyValue, state *State) Value { - return Value{orig: orig, state: state} +func NewValueWrapper(orig *AnyValue, state *State) ValueWrapper { + return ValueWrapper{orig: orig, state: state} +} + +func GenTestValueWrapper() ValueWrapper { + orig := GenTestAnyValue() + return NewValueWrapper(orig, NewState()) } -func CopyOrigValue(dest, src *otlpcommon.AnyValue) { - switch sv := src.Value.(type) { - case *otlpcommon.AnyValue_KvlistValue: - dv, ok := dest.Value.(*otlpcommon.AnyValue_KvlistValue) - if !ok { - dv = &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}} - dest.Value = dv - } - if sv.KvlistValue == nil { - dv.KvlistValue = nil - return - } - dv.KvlistValue.Values = CopyOrigMap(dv.KvlistValue.Values, sv.KvlistValue.Values) - case *otlpcommon.AnyValue_ArrayValue: - dv, ok := dest.Value.(*otlpcommon.AnyValue_ArrayValue) - if !ok { - dv = &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}} - dest.Value = dv - } - if sv.ArrayValue == nil { - dv.ArrayValue = nil - return - } - dv.ArrayValue.Values = CopyOrigSlice(dv.ArrayValue.Values, sv.ArrayValue.Values) - case *otlpcommon.AnyValue_BytesValue: - bv, ok := dest.Value.(*otlpcommon.AnyValue_BytesValue) - if !ok { - bv = &otlpcommon.AnyValue_BytesValue{} - dest.Value = bv - } - bv.BytesValue = make([]byte, len(sv.BytesValue)) - copy(bv.BytesValue, sv.BytesValue) - default: - // Primitive immutable type, no need for deep copy. - dest.Value = sv +func NewAnyValueStringValue() *AnyValue_StringValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_StringValue{} } + return ProtoPoolAnyValue_StringValue.Get().(*AnyValue_StringValue) } -func FillTestValue(dest Value) { - dest.orig.Value = &otlpcommon.AnyValue_StringValue{StringValue: "v"} +func NewAnyValueIntValue() *AnyValue_IntValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_IntValue{} + } + return ProtoPoolAnyValue_IntValue.Get().(*AnyValue_IntValue) } -func GenerateTestValue() Value { - var orig otlpcommon.AnyValue - state := StateMutable - ms := NewValue(&orig, &state) - FillTestValue(ms) - return ms +func NewAnyValueBoolValue() *AnyValue_BoolValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_BoolValue{} + } + return ProtoPoolAnyValue_BoolValue.Get().(*AnyValue_BoolValue) +} + +func NewAnyValueDoubleValue() *AnyValue_DoubleValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_DoubleValue{} + } + return ProtoPoolAnyValue_DoubleValue.Get().(*AnyValue_DoubleValue) +} + +func NewAnyValueBytesValue() *AnyValue_BytesValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_BytesValue{} + } + return ProtoPoolAnyValue_BytesValue.Get().(*AnyValue_BytesValue) +} + +func NewAnyValueArrayValue() *AnyValue_ArrayValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_ArrayValue{} + } + return ProtoPoolAnyValue_ArrayValue.Get().(*AnyValue_ArrayValue) +} + +func NewAnyValueKvlistValue() *AnyValue_KvlistValue { + if !UseProtoPooling.IsEnabled() { + return &AnyValue_KvlistValue{} + } + return ProtoPoolAnyValue_KvlistValue.Get().(*AnyValue_KvlistValue) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go index 9423fa0f1af..073b55d3416 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon @@ -18,32 +18,31 @@ import ( // // Must use NewByteSlice function to create new instances. // Important: zero-initialized instance is not valid for use. -type ByteSlice internal.ByteSlice +type ByteSlice internal.ByteSliceWrapper func (ms ByteSlice) getOrig() *[]byte { - return internal.GetOrigByteSlice(internal.ByteSlice(ms)) + return internal.GetByteSliceOrig(internal.ByteSliceWrapper(ms)) } func (ms ByteSlice) getState() *internal.State { - return internal.GetByteSliceState(internal.ByteSlice(ms)) + return internal.GetByteSliceState(internal.ByteSliceWrapper(ms)) } // NewByteSlice creates a new empty ByteSlice. func NewByteSlice() ByteSlice { orig := []byte(nil) - state := internal.StateMutable - return ByteSlice(internal.NewByteSlice(&orig, &state)) + return ByteSlice(internal.NewByteSliceWrapper(&orig, internal.NewState())) } // AsRaw returns a copy of the []byte slice. func (ms ByteSlice) AsRaw() []byte { - return internal.CopyOrigByteSlice(nil, *ms.getOrig()) + return copyByteSlice(nil, *ms.getOrig()) } // FromRaw copies raw []byte into the slice ByteSlice. func (ms ByteSlice) FromRaw(val []byte) { ms.getState().AssertMutable() - *ms.getOrig() = internal.CopyOrigByteSlice(*ms.getOrig(), val) + *ms.getOrig() = copyByteSlice(*ms.getOrig(), val) } // Len returns length of the []byte slice value. @@ -128,13 +127,42 @@ func (ms ByteSlice) MoveAndAppendTo(dest ByteSlice) { *ms.getOrig() = nil } +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (ms ByteSlice) RemoveIf(f func(byte) bool) { + ms.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*ms.getOrig()); i++ { + if f((*ms.getOrig())[i]) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*ms.getOrig())[newLen] = (*ms.getOrig())[i] + var zero byte + (*ms.getOrig())[i] = zero + newLen++ + } + *ms.getOrig() = (*ms.getOrig())[:newLen] +} + // CopyTo copies all elements from the current slice overriding the destination. func (ms ByteSlice) CopyTo(dest ByteSlice) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigByteSlice(*dest.getOrig(), *ms.getOrig()) + if ms.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = copyByteSlice(*dest.getOrig(), *ms.getOrig()) } // Equal checks equality with another ByteSlice func (ms ByteSlice) Equal(val ByteSlice) bool { return slices.Equal(*ms.getOrig(), *val.getOrig()) } + +func copyByteSlice(dst, src []byte) []byte { + return append(dst[:0], src...) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go index 957460aa43b..dac9ebc4edf 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon @@ -18,32 +18,31 @@ import ( // // Must use NewFloat64Slice function to create new instances. // Important: zero-initialized instance is not valid for use. -type Float64Slice internal.Float64Slice +type Float64Slice internal.Float64SliceWrapper func (ms Float64Slice) getOrig() *[]float64 { - return internal.GetOrigFloat64Slice(internal.Float64Slice(ms)) + return internal.GetFloat64SliceOrig(internal.Float64SliceWrapper(ms)) } func (ms Float64Slice) getState() *internal.State { - return internal.GetFloat64SliceState(internal.Float64Slice(ms)) + return internal.GetFloat64SliceState(internal.Float64SliceWrapper(ms)) } // NewFloat64Slice creates a new empty Float64Slice. func NewFloat64Slice() Float64Slice { orig := []float64(nil) - state := internal.StateMutable - return Float64Slice(internal.NewFloat64Slice(&orig, &state)) + return Float64Slice(internal.NewFloat64SliceWrapper(&orig, internal.NewState())) } // AsRaw returns a copy of the []float64 slice. func (ms Float64Slice) AsRaw() []float64 { - return internal.CopyOrigFloat64Slice(nil, *ms.getOrig()) + return copyFloat64Slice(nil, *ms.getOrig()) } // FromRaw copies raw []float64 into the slice Float64Slice. func (ms Float64Slice) FromRaw(val []float64) { ms.getState().AssertMutable() - *ms.getOrig() = internal.CopyOrigFloat64Slice(*ms.getOrig(), val) + *ms.getOrig() = copyFloat64Slice(*ms.getOrig(), val) } // Len returns length of the []float64 slice value. @@ -128,13 +127,42 @@ func (ms Float64Slice) MoveAndAppendTo(dest Float64Slice) { *ms.getOrig() = nil } +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (ms Float64Slice) RemoveIf(f func(float64) bool) { + ms.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*ms.getOrig()); i++ { + if f((*ms.getOrig())[i]) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*ms.getOrig())[newLen] = (*ms.getOrig())[i] + var zero float64 + (*ms.getOrig())[i] = zero + newLen++ + } + *ms.getOrig() = (*ms.getOrig())[:newLen] +} + // CopyTo copies all elements from the current slice overriding the destination. func (ms Float64Slice) CopyTo(dest Float64Slice) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigFloat64Slice(*dest.getOrig(), *ms.getOrig()) + if ms.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = copyFloat64Slice(*dest.getOrig(), *ms.getOrig()) } // Equal checks equality with another Float64Slice func (ms Float64Slice) Equal(val Float64Slice) bool { return slices.Equal(*ms.getOrig(), *val.getOrig()) } + +func copyFloat64Slice(dst, src []float64) []float64 { + return append(dst[:0], src...) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go index d6e27851ce5..6eeeab6e3cb 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon import ( "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" ) // InstrumentationScope is a message representing the instrumentation scope information. @@ -18,10 +17,10 @@ import ( // // Must use NewInstrumentationScope function to create new instances. // Important: zero-initialized instance is not valid for use. -type InstrumentationScope internal.InstrumentationScope +type InstrumentationScope internal.InstrumentationScopeWrapper -func newInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *internal.State) InstrumentationScope { - return InstrumentationScope(internal.NewInstrumentationScope(orig, state)) +func newInstrumentationScope(orig *internal.InstrumentationScope, state *internal.State) InstrumentationScope { + return InstrumentationScope(internal.NewInstrumentationScopeWrapper(orig, state)) } // NewInstrumentationScope creates a new empty InstrumentationScope. @@ -29,8 +28,7 @@ func newInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *inter // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewInstrumentationScope() InstrumentationScope { - state := internal.StateMutable - return newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &state) + return newInstrumentationScope(internal.NewInstrumentationScope(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -42,16 +40,8 @@ func (ms InstrumentationScope) MoveTo(dest InstrumentationScope) { if ms.getOrig() == dest.getOrig() { return } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = otlpcommon.InstrumentationScope{} -} - -func (ms InstrumentationScope) getOrig() *otlpcommon.InstrumentationScope { - return internal.GetOrigInstrumentationScope(internal.InstrumentationScope(ms)) -} - -func (ms InstrumentationScope) getState() *internal.State { - return internal.GetInstrumentationScopeState(internal.InstrumentationScope(ms)) + internal.DeleteInstrumentationScope(dest.getOrig(), false) + *dest.getOrig(), *ms.getOrig() = *ms.getOrig(), *dest.getOrig() } // Name returns the name associated with this InstrumentationScope. @@ -78,7 +68,7 @@ func (ms InstrumentationScope) SetVersion(v string) { // Attributes returns the Attributes associated with this InstrumentationScope. func (ms InstrumentationScope) Attributes() Map { - return Map(internal.NewMap(&ms.getOrig().Attributes, internal.GetInstrumentationScopeState(internal.InstrumentationScope(ms)))) + return Map(internal.NewMapWrapper(&ms.getOrig().Attributes, ms.getState())) } // DroppedAttributesCount returns the droppedattributescount associated with this InstrumentationScope. @@ -95,5 +85,13 @@ func (ms InstrumentationScope) SetDroppedAttributesCount(v uint32) { // CopyTo copies all properties from the current struct overriding the destination. func (ms InstrumentationScope) CopyTo(dest InstrumentationScope) { dest.getState().AssertMutable() - internal.CopyOrigInstrumentationScope(dest.getOrig(), ms.getOrig()) + internal.CopyInstrumentationScope(dest.getOrig(), ms.getOrig()) +} + +func (ms InstrumentationScope) getOrig() *internal.InstrumentationScope { + return internal.GetInstrumentationScopeOrig(internal.InstrumentationScopeWrapper(ms)) +} + +func (ms InstrumentationScope) getState() *internal.State { + return internal.GetInstrumentationScopeState(internal.InstrumentationScopeWrapper(ms)) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go index 23c07b9e33a..d2bb746df53 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon @@ -18,32 +18,31 @@ import ( // // Must use NewInt32Slice function to create new instances. // Important: zero-initialized instance is not valid for use. -type Int32Slice internal.Int32Slice +type Int32Slice internal.Int32SliceWrapper func (ms Int32Slice) getOrig() *[]int32 { - return internal.GetOrigInt32Slice(internal.Int32Slice(ms)) + return internal.GetInt32SliceOrig(internal.Int32SliceWrapper(ms)) } func (ms Int32Slice) getState() *internal.State { - return internal.GetInt32SliceState(internal.Int32Slice(ms)) + return internal.GetInt32SliceState(internal.Int32SliceWrapper(ms)) } // NewInt32Slice creates a new empty Int32Slice. func NewInt32Slice() Int32Slice { orig := []int32(nil) - state := internal.StateMutable - return Int32Slice(internal.NewInt32Slice(&orig, &state)) + return Int32Slice(internal.NewInt32SliceWrapper(&orig, internal.NewState())) } // AsRaw returns a copy of the []int32 slice. func (ms Int32Slice) AsRaw() []int32 { - return internal.CopyOrigInt32Slice(nil, *ms.getOrig()) + return copyInt32Slice(nil, *ms.getOrig()) } // FromRaw copies raw []int32 into the slice Int32Slice. func (ms Int32Slice) FromRaw(val []int32) { ms.getState().AssertMutable() - *ms.getOrig() = internal.CopyOrigInt32Slice(*ms.getOrig(), val) + *ms.getOrig() = copyInt32Slice(*ms.getOrig(), val) } // Len returns length of the []int32 slice value. @@ -128,13 +127,42 @@ func (ms Int32Slice) MoveAndAppendTo(dest Int32Slice) { *ms.getOrig() = nil } +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (ms Int32Slice) RemoveIf(f func(int32) bool) { + ms.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*ms.getOrig()); i++ { + if f((*ms.getOrig())[i]) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*ms.getOrig())[newLen] = (*ms.getOrig())[i] + var zero int32 + (*ms.getOrig())[i] = zero + newLen++ + } + *ms.getOrig() = (*ms.getOrig())[:newLen] +} + // CopyTo copies all elements from the current slice overriding the destination. func (ms Int32Slice) CopyTo(dest Int32Slice) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigInt32Slice(*dest.getOrig(), *ms.getOrig()) + if ms.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = copyInt32Slice(*dest.getOrig(), *ms.getOrig()) } // Equal checks equality with another Int32Slice func (ms Int32Slice) Equal(val Int32Slice) bool { return slices.Equal(*ms.getOrig(), *val.getOrig()) } + +func copyInt32Slice(dst, src []int32) []int32 { + return append(dst[:0], src...) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go index 6364eae37be..4c22f2ed825 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon @@ -18,32 +18,31 @@ import ( // // Must use NewInt64Slice function to create new instances. // Important: zero-initialized instance is not valid for use. -type Int64Slice internal.Int64Slice +type Int64Slice internal.Int64SliceWrapper func (ms Int64Slice) getOrig() *[]int64 { - return internal.GetOrigInt64Slice(internal.Int64Slice(ms)) + return internal.GetInt64SliceOrig(internal.Int64SliceWrapper(ms)) } func (ms Int64Slice) getState() *internal.State { - return internal.GetInt64SliceState(internal.Int64Slice(ms)) + return internal.GetInt64SliceState(internal.Int64SliceWrapper(ms)) } // NewInt64Slice creates a new empty Int64Slice. func NewInt64Slice() Int64Slice { orig := []int64(nil) - state := internal.StateMutable - return Int64Slice(internal.NewInt64Slice(&orig, &state)) + return Int64Slice(internal.NewInt64SliceWrapper(&orig, internal.NewState())) } // AsRaw returns a copy of the []int64 slice. func (ms Int64Slice) AsRaw() []int64 { - return internal.CopyOrigInt64Slice(nil, *ms.getOrig()) + return copyInt64Slice(nil, *ms.getOrig()) } // FromRaw copies raw []int64 into the slice Int64Slice. func (ms Int64Slice) FromRaw(val []int64) { ms.getState().AssertMutable() - *ms.getOrig() = internal.CopyOrigInt64Slice(*ms.getOrig(), val) + *ms.getOrig() = copyInt64Slice(*ms.getOrig(), val) } // Len returns length of the []int64 slice value. @@ -128,13 +127,42 @@ func (ms Int64Slice) MoveAndAppendTo(dest Int64Slice) { *ms.getOrig() = nil } +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (ms Int64Slice) RemoveIf(f func(int64) bool) { + ms.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*ms.getOrig()); i++ { + if f((*ms.getOrig())[i]) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*ms.getOrig())[newLen] = (*ms.getOrig())[i] + var zero int64 + (*ms.getOrig())[i] = zero + newLen++ + } + *ms.getOrig() = (*ms.getOrig())[:newLen] +} + // CopyTo copies all elements from the current slice overriding the destination. func (ms Int64Slice) CopyTo(dest Int64Slice) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigInt64Slice(*dest.getOrig(), *ms.getOrig()) + if ms.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = copyInt64Slice(*dest.getOrig(), *ms.getOrig()) } // Equal checks equality with another Int64Slice func (ms Int64Slice) Equal(val Int64Slice) bool { return slices.Equal(*ms.getOrig(), *val.getOrig()) } + +func copyInt64Slice(dst, src []int64) []int64 { + return append(dst[:0], src...) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go deleted file mode 100644 index 1a72889d554..00000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "go.opentelemetry.io/collector/pdata/internal" -) - -// IntSlice represents a []int slice. -// The instance of IntSlice can be assigned to multiple objects since it's immutable. -// -// Must use NewIntSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type IntSlice internal.IntSlice - -func (ms IntSlice) getOrig() *[]int { - return internal.GetOrigIntSlice(internal.IntSlice(ms)) -} - -func (ms IntSlice) getState() *internal.State { - return internal.GetIntSliceState(internal.IntSlice(ms)) -} - -// NewIntSlice creates a new empty IntSlice. -func NewIntSlice() IntSlice { - orig := []int(nil) - state := internal.StateMutable - return IntSlice(internal.NewIntSlice(&orig, &state)) -} - -// AsRaw returns a copy of the []int slice. -func (ms IntSlice) AsRaw() []int { - return copyIntSlice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []int into the slice IntSlice. -func (ms IntSlice) FromRaw(val []int) { - ms.getState().AssertMutable() - *ms.getOrig() = copyIntSlice(*ms.getOrig(), val) -} - -// Len returns length of the []int slice value. -// Equivalent of len(intSlice). -func (ms IntSlice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of intSlice[i]. -func (ms IntSlice) At(i int) int { - return (*ms.getOrig())[i] -} - -// SetAt sets int item at particular index. -// Equivalent of intSlice[i] = val -func (ms IntSlice) SetAt(i int, val int) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures IntSlice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]int, len(intSlice), newCap) -// copy(buf, intSlice) -// intSlice = buf -func (ms IntSlice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]int, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to IntSlice. -// Equivalent of intSlice = append(intSlice, elms...) -func (ms IntSlice) Append(elms ...int) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms IntSlice) MoveTo(dest IntSlice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms IntSlice) CopyTo(dest IntSlice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyIntSlice(*dest.getOrig(), *ms.getOrig()) -} - -func copyIntSlice(dst, src []int) []int { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go index 4d829e049d8..4f767693b72 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon import ( "go.opentelemetry.io/collector/pdata/internal" - otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" ) // Resource is a message representing the resource information. @@ -18,10 +17,10 @@ import ( // // Must use NewResource function to create new instances. // Important: zero-initialized instance is not valid for use. -type Resource internal.Resource +type Resource internal.ResourceWrapper -func newResource(orig *otlpresource.Resource, state *internal.State) Resource { - return Resource(internal.NewResource(orig, state)) +func newResource(orig *internal.Resource, state *internal.State) Resource { + return Resource(internal.NewResourceWrapper(orig, state)) } // NewResource creates a new empty Resource. @@ -29,8 +28,7 @@ func newResource(orig *otlpresource.Resource, state *internal.State) Resource { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResource() Resource { - state := internal.StateMutable - return newResource(&otlpresource.Resource{}, &state) + return newResource(internal.NewResource(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -42,21 +40,13 @@ func (ms Resource) MoveTo(dest Resource) { if ms.getOrig() == dest.getOrig() { return } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = otlpresource.Resource{} -} - -func (ms Resource) getOrig() *otlpresource.Resource { - return internal.GetOrigResource(internal.Resource(ms)) -} - -func (ms Resource) getState() *internal.State { - return internal.GetResourceState(internal.Resource(ms)) + internal.DeleteResource(dest.getOrig(), false) + *dest.getOrig(), *ms.getOrig() = *ms.getOrig(), *dest.getOrig() } // Attributes returns the Attributes associated with this Resource. func (ms Resource) Attributes() Map { - return Map(internal.NewMap(&ms.getOrig().Attributes, internal.GetResourceState(internal.Resource(ms)))) + return Map(internal.NewMapWrapper(&ms.getOrig().Attributes, ms.getState())) } // DroppedAttributesCount returns the droppedattributescount associated with this Resource. @@ -73,5 +63,13 @@ func (ms Resource) SetDroppedAttributesCount(v uint32) { // CopyTo copies all properties from the current struct overriding the destination. func (ms Resource) CopyTo(dest Resource) { dest.getState().AssertMutable() - internal.CopyOrigResource(dest.getOrig(), ms.getOrig()) + internal.CopyResource(dest.getOrig(), ms.getOrig()) +} + +func (ms Resource) getOrig() *internal.Resource { + return internal.GetResourceOrig(internal.ResourceWrapper(ms)) +} + +func (ms Resource) getState() *internal.State { + return internal.GetResourceState(internal.ResourceWrapper(ms)) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_slice.go new file mode 100644 index 00000000000..0a28bde3af6 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_slice.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pcommon + +import ( + "iter" + + "go.opentelemetry.io/collector/pdata/internal" +) + +// Slice logically represents a slice of Value. +// +// This is a reference type. If passed by value and callee modifies it, the +// caller will see the modification. +// +// Must use NewSlice function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Slice internal.SliceWrapper + +func newSlice(orig *[]internal.AnyValue, state *internal.State) Slice { + return Slice(internal.NewSliceWrapper(orig, state)) +} + +// NewSlice creates a SliceWrapper with 0 elements. +// Can use "EnsureCapacity" to initialize with a given capacity. +func NewSlice() Slice { + orig := []internal.AnyValue(nil) + return newSlice(&orig, internal.NewState()) +} + +// Len returns the number of elements in the slice. +// +// Returns "0" for a newly instance created with "NewSlice()". +func (es Slice) Len() int { + return len(*es.getOrig()) +} + +// At returns the element at the given index. +// +// This function is used mostly for iterating over all the values in the slice: +// +// for i := 0; i < es.Len(); i++ { +// e := es.At(i) +// ... // Do something with the element +// } +func (es Slice) At(i int) Value { + return newValue(&(*es.getOrig())[i], es.getState()) +} + +// All returns an iterator over index-value pairs in the slice. +// +// for i, v := range es.All() { +// ... // Do something with index-value pair +// } +func (es Slice) All() iter.Seq2[int, Value] { + return func(yield func(int, Value) bool) { + for i := 0; i < es.Len(); i++ { + if !yield(i, es.At(i)) { + return + } + } + } +} + +// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. +// 1. If the newCap <= cap then no change in capacity. +// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. +// +// Here is how a new Slice can be initialized: +// +// es := NewSlice() +// es.EnsureCapacity(4) +// for i := 0; i < 4; i++ { +// e := es.AppendEmpty() +// // Here should set all the values for e. +// } +func (es Slice) EnsureCapacity(newCap int) { + es.getState().AssertMutable() + oldCap := cap(*es.getOrig()) + if newCap <= oldCap { + return + } + + newOrig := make([]internal.AnyValue, len(*es.getOrig()), newCap) + copy(newOrig, *es.getOrig()) + *es.getOrig() = newOrig +} + +// AppendEmpty will append to the end of the slice an empty Value. +// It returns the newly added Value. +func (es Slice) AppendEmpty() Value { + es.getState().AssertMutable() + *es.getOrig() = append(*es.getOrig(), internal.AnyValue{}) + return es.At(es.Len() - 1) +} + +// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. +// The current slice will be cleared. +func (es Slice) MoveAndAppendTo(dest Slice) { + es.getState().AssertMutable() + dest.getState().AssertMutable() + // If they point to the same data, they are the same, nothing to do. + if es.getOrig() == dest.getOrig() { + return + } + if *dest.getOrig() == nil { + // We can simply move the entire vector and avoid any allocations. + *dest.getOrig() = *es.getOrig() + } else { + *dest.getOrig() = append(*dest.getOrig(), *es.getOrig()...) + } + *es.getOrig() = nil +} + +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (es Slice) RemoveIf(f func(Value) bool) { + es.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*es.getOrig()); i++ { + if f(es.At(i)) { + internal.DeleteAnyValue(&(*es.getOrig())[i], false) + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*es.getOrig())[newLen] = (*es.getOrig())[i] + (*es.getOrig())[i].Reset() + newLen++ + } + *es.getOrig() = (*es.getOrig())[:newLen] +} + +// CopyTo copies all elements from the current slice overriding the destination. +func (es Slice) CopyTo(dest Slice) { + dest.getState().AssertMutable() + if es.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = internal.CopyAnyValueSlice(*dest.getOrig(), *es.getOrig()) +} + +func (ms Slice) getOrig() *[]internal.AnyValue { + return internal.GetSliceOrig(internal.SliceWrapper(ms)) +} + +func (ms Slice) getState() *internal.State { + return internal.GetSliceState(internal.SliceWrapper(ms)) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go index 22c318e7a5b..ff8422805d8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon @@ -18,32 +18,31 @@ import ( // // Must use NewStringSlice function to create new instances. // Important: zero-initialized instance is not valid for use. -type StringSlice internal.StringSlice +type StringSlice internal.StringSliceWrapper func (ms StringSlice) getOrig() *[]string { - return internal.GetOrigStringSlice(internal.StringSlice(ms)) + return internal.GetStringSliceOrig(internal.StringSliceWrapper(ms)) } func (ms StringSlice) getState() *internal.State { - return internal.GetStringSliceState(internal.StringSlice(ms)) + return internal.GetStringSliceState(internal.StringSliceWrapper(ms)) } // NewStringSlice creates a new empty StringSlice. func NewStringSlice() StringSlice { orig := []string(nil) - state := internal.StateMutable - return StringSlice(internal.NewStringSlice(&orig, &state)) + return StringSlice(internal.NewStringSliceWrapper(&orig, internal.NewState())) } // AsRaw returns a copy of the []string slice. func (ms StringSlice) AsRaw() []string { - return internal.CopyOrigStringSlice(nil, *ms.getOrig()) + return copyStringSlice(nil, *ms.getOrig()) } // FromRaw copies raw []string into the slice StringSlice. func (ms StringSlice) FromRaw(val []string) { ms.getState().AssertMutable() - *ms.getOrig() = internal.CopyOrigStringSlice(*ms.getOrig(), val) + *ms.getOrig() = copyStringSlice(*ms.getOrig(), val) } // Len returns length of the []string slice value. @@ -128,13 +127,42 @@ func (ms StringSlice) MoveAndAppendTo(dest StringSlice) { *ms.getOrig() = nil } +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (ms StringSlice) RemoveIf(f func(string) bool) { + ms.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*ms.getOrig()); i++ { + if f((*ms.getOrig())[i]) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*ms.getOrig())[newLen] = (*ms.getOrig())[i] + var zero string + (*ms.getOrig())[i] = zero + newLen++ + } + *ms.getOrig() = (*ms.getOrig())[:newLen] +} + // CopyTo copies all elements from the current slice overriding the destination. func (ms StringSlice) CopyTo(dest StringSlice) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigStringSlice(*dest.getOrig(), *ms.getOrig()) + if ms.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = copyStringSlice(*dest.getOrig(), *ms.getOrig()) } // Equal checks equality with another StringSlice func (ms StringSlice) Equal(val StringSlice) bool { return slices.Equal(*ms.getOrig(), *val.getOrig()) } + +func copyStringSlice(dst, src []string) []string { + return append(dst[:0], src...) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go index df58ff360a9..22539d9875e 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pcommon @@ -18,32 +18,31 @@ import ( // // Must use NewUInt64Slice function to create new instances. // Important: zero-initialized instance is not valid for use. -type UInt64Slice internal.UInt64Slice +type UInt64Slice internal.UInt64SliceWrapper func (ms UInt64Slice) getOrig() *[]uint64 { - return internal.GetOrigUInt64Slice(internal.UInt64Slice(ms)) + return internal.GetUInt64SliceOrig(internal.UInt64SliceWrapper(ms)) } func (ms UInt64Slice) getState() *internal.State { - return internal.GetUInt64SliceState(internal.UInt64Slice(ms)) + return internal.GetUInt64SliceState(internal.UInt64SliceWrapper(ms)) } // NewUInt64Slice creates a new empty UInt64Slice. func NewUInt64Slice() UInt64Slice { orig := []uint64(nil) - state := internal.StateMutable - return UInt64Slice(internal.NewUInt64Slice(&orig, &state)) + return UInt64Slice(internal.NewUInt64SliceWrapper(&orig, internal.NewState())) } // AsRaw returns a copy of the []uint64 slice. func (ms UInt64Slice) AsRaw() []uint64 { - return internal.CopyOrigUInt64Slice(nil, *ms.getOrig()) + return copyUint64Slice(nil, *ms.getOrig()) } // FromRaw copies raw []uint64 into the slice UInt64Slice. func (ms UInt64Slice) FromRaw(val []uint64) { ms.getState().AssertMutable() - *ms.getOrig() = internal.CopyOrigUInt64Slice(*ms.getOrig(), val) + *ms.getOrig() = copyUint64Slice(*ms.getOrig(), val) } // Len returns length of the []uint64 slice value. @@ -128,13 +127,42 @@ func (ms UInt64Slice) MoveAndAppendTo(dest UInt64Slice) { *ms.getOrig() = nil } +// RemoveIf calls f sequentially for each element present in the slice. +// If f returns true, the element is removed from the slice. +func (ms UInt64Slice) RemoveIf(f func(uint64) bool) { + ms.getState().AssertMutable() + newLen := 0 + for i := 0; i < len(*ms.getOrig()); i++ { + if f((*ms.getOrig())[i]) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*ms.getOrig())[newLen] = (*ms.getOrig())[i] + var zero uint64 + (*ms.getOrig())[i] = zero + newLen++ + } + *ms.getOrig() = (*ms.getOrig())[:newLen] +} + // CopyTo copies all elements from the current slice overriding the destination. func (ms UInt64Slice) CopyTo(dest UInt64Slice) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigUInt64Slice(*dest.getOrig(), *ms.getOrig()) + if ms.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = copyUint64Slice(*dest.getOrig(), *ms.getOrig()) } // Equal checks equality with another UInt64Slice func (ms UInt64Slice) Equal(val UInt64Slice) bool { return slices.Equal(*ms.getOrig(), *val.getOrig()) } + +func copyUint64Slice(dst, src []uint64) []uint64 { + return append(dst[:0], src...) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go index ed71f9b410d..b5d94967c28 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go @@ -9,32 +9,30 @@ import ( "go.uber.org/multierr" "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" ) // Map stores a map of string keys to elements of Value type. // // Must use NewMap function to create new instances. // Important: zero-initialized instance is not valid for use. -type Map internal.Map +type Map internal.MapWrapper // NewMap creates a Map with 0 elements. func NewMap() Map { - orig := []otlpcommon.KeyValue(nil) - state := internal.StateMutable - return Map(internal.NewMap(&orig, &state)) + orig := []internal.KeyValue(nil) + return Map(internal.NewMapWrapper(&orig, internal.NewState())) } -func (m Map) getOrig() *[]otlpcommon.KeyValue { - return internal.GetOrigMap(internal.Map(m)) +func (m Map) getOrig() *[]internal.KeyValue { + return internal.GetMapOrig(internal.MapWrapper(m)) } func (m Map) getState() *internal.State { - return internal.GetMapState(internal.Map(m)) + return internal.GetMapState(internal.MapWrapper(m)) } -func newMap(orig *[]otlpcommon.KeyValue, state *internal.State) Map { - return Map(internal.NewMap(orig, state)) +func newMap(orig *[]internal.KeyValue, state *internal.State) Map { + return Map(internal.NewMapWrapper(orig, state)) } // Clear erases any existing entries in this Map instance. @@ -51,16 +49,18 @@ func (m Map) EnsureCapacity(capacity int) { if capacity <= cap(oldOrig) { return } - *m.getOrig() = make([]otlpcommon.KeyValue, len(oldOrig), capacity) + *m.getOrig() = make([]internal.KeyValue, len(oldOrig), capacity) copy(*m.getOrig(), oldOrig) } -// Get returns the Value associated with the key and true. Returned +// Get returns the Value associated with the key and true. The returned // Value is not a copy, it is a reference to the value stored in this map. // It is allowed to modify the returned value using Value.Set* functions. // Such modification will be applied to the value stored in this map. +// Accessing the returned value after modifying the underlying map +// (removing or adding new values) is an undefined behavior. // -// If the key does not exist returns a zero-initialized KeyValue and false. +// If the key does not exist, returns a zero-initialized KeyValue and false. // Calling any functions on the returned invalid instance may cause a panic. func (m Map) Get(key string) (Value, bool) { for i := range *m.getOrig() { @@ -92,8 +92,8 @@ func (m Map) RemoveIf(f func(string, Value) bool) { m.getState().AssertMutable() newLen := 0 for i := 0; i < len(*m.getOrig()); i++ { - akv := &(*m.getOrig())[i] - if f(akv.Key, newValue(&akv.Value, m.getState())) { + if f((*m.getOrig())[i].Key, newValue(&(*m.getOrig())[i].Value, m.getState())) { + (*m.getOrig())[i] = internal.KeyValue{} continue } if newLen == i { @@ -102,6 +102,7 @@ func (m Map) RemoveIf(f func(string, Value) bool) { continue } (*m.getOrig())[newLen] = (*m.getOrig())[i] + (*m.getOrig())[i] = internal.KeyValue{} newLen++ } *m.getOrig() = (*m.getOrig())[:newLen] @@ -115,20 +116,34 @@ func (m Map) PutEmpty(k string) Value { av.getOrig().Value = nil return newValue(av.getOrig(), m.getState()) } - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k}) + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k}) return newValue(&(*m.getOrig())[len(*m.getOrig())-1].Value, m.getState()) } +// GetOrPutEmpty returns the Value associated with the key and true (loaded) if the key exists in the map, +// otherwise inserts an empty value to the map under the given key and returns the inserted value +// and false (loaded). +func (m Map) GetOrPutEmpty(k string) (Value, bool) { + m.getState().AssertMutable() + if av, existing := m.Get(k); existing { + return av, true + } + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k}) + return newValue(&(*m.getOrig())[len(*m.getOrig())-1].Value, m.getState()), false +} + // PutStr performs the Insert or Update action. The Value is // inserted to the map that did not originally have the key. The key/value is // updated to the map where the key already existed. -func (m Map) PutStr(k string, v string) { +func (m Map) PutStr(k, v string) { m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetStr(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueString(k, v)) + return } + ov := internal.NewAnyValueStringValue() + ov.StringValue = v + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) } // PutInt performs the Insert or Update action. The int Value is @@ -138,9 +153,11 @@ func (m Map) PutInt(k string, v int64) { m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetInt(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueInt(k, v)) + return } + ov := internal.NewAnyValueIntValue() + ov.IntValue = v + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) } // PutDouble performs the Insert or Update action. The double Value is @@ -150,9 +167,11 @@ func (m Map) PutDouble(k string, v float64) { m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetDouble(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueDouble(k, v)) + return } + ov := internal.NewAnyValueDoubleValue() + ov.DoubleValue = v + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) } // PutBool performs the Insert or Update action. The bool Value is @@ -162,45 +181,46 @@ func (m Map) PutBool(k string, v bool) { m.getState().AssertMutable() if av, existing := m.Get(k); existing { av.SetBool(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueBool(k, v)) + return } + ov := internal.NewAnyValueBoolValue() + ov.BoolValue = v + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) } // PutEmptyBytes inserts or updates an empty byte slice under given key and returns it. func (m Map) PutEmptyBytes(k string) ByteSlice { m.getState().AssertMutable() - bv := otlpcommon.AnyValue_BytesValue{} if av, existing := m.Get(k); existing { - av.getOrig().Value = &bv - } else { - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &bv}}) + return av.SetEmptyBytes() } - return ByteSlice(internal.NewByteSlice(&bv.BytesValue, m.getState())) + ov := internal.NewAnyValueBytesValue() + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) + return ByteSlice(internal.NewByteSliceWrapper(&ov.BytesValue, m.getState())) } // PutEmptyMap inserts or updates an empty map under given key and returns it. func (m Map) PutEmptyMap(k string) Map { m.getState().AssertMutable() - kvl := otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{Values: []otlpcommon.KeyValue(nil)}} if av, existing := m.Get(k); existing { - av.getOrig().Value = &kvl - } else { - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &kvl}}) + return av.SetEmptyMap() } - return Map(internal.NewMap(&kvl.KvlistValue.Values, m.getState())) + ov := internal.NewAnyValueKvlistValue() + ov.KvlistValue = internal.NewKeyValueList() + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) + return Map(internal.NewMapWrapper(&ov.KvlistValue.Values, m.getState())) } // PutEmptySlice inserts or updates an empty slice under given key and returns it. func (m Map) PutEmptySlice(k string) Slice { m.getState().AssertMutable() - vl := otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{Values: []otlpcommon.AnyValue(nil)}} if av, existing := m.Get(k); existing { - av.getOrig().Value = &vl - } else { - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &vl}}) + return av.SetEmptySlice() } - return Slice(internal.NewSlice(&vl.ArrayValue.Values, m.getState())) + ov := internal.NewAnyValueArrayValue() + ov.ArrayValue = internal.NewArrayValue() + *m.getOrig() = append(*m.getOrig(), internal.KeyValue{Key: k, Value: internal.AnyValue{Value: ov}}) + return Slice(internal.NewSliceWrapper(&ov.ArrayValue.Values, m.getState())) } // Len returns the length of this map. @@ -221,7 +241,7 @@ func (m Map) Len() int { func (m Map) Range(f func(k string, v Value) bool) { for i := range *m.getOrig() { kv := &(*m.getOrig())[i] - if !f(kv.Key, Value(internal.NewValue(&kv.Value, m.getState()))) { + if !f(kv.Key, Value(internal.NewValueWrapper(&kv.Value, m.getState()))) { break } } @@ -236,7 +256,7 @@ func (m Map) All() iter.Seq2[string, Value] { return func(yield func(string, Value) bool) { for i := range *m.getOrig() { kv := &(*m.getOrig())[i] - if !yield(kv.Key, Value(internal.NewValue(&kv.Value, m.getState()))) { + if !yield(kv.Key, Value(internal.NewValueWrapper(&kv.Value, m.getState()))) { return } } @@ -259,7 +279,10 @@ func (m Map) MoveTo(dest Map) { // CopyTo copies all elements from the current map overriding the destination. func (m Map) CopyTo(dest Map) { dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigMap(*dest.getOrig(), *m.getOrig()) + if m.getOrig() == dest.getOrig() { + return + } + *dest.getOrig() = internal.CopyKeyValueSlice(*dest.getOrig(), *m.getOrig()) } // AsRaw returns a standard go map representation of this Map. @@ -281,7 +304,7 @@ func (m Map) FromRaw(rawMap map[string]any) error { } var errs error - origs := make([]otlpcommon.KeyValue, len(rawMap)) + origs := make([]internal.KeyValue, len(rawMap)) ix := 0 for k, iv := range rawMap { origs[ix].Key = k diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go index 5e6e431eb9b..380fc5c1b61 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go @@ -4,149 +4,11 @@ package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" import ( - "iter" - "go.uber.org/multierr" "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" ) -// Slice logically represents a slice of Value. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Slice internal.Slice - -func newSlice(orig *[]otlpcommon.AnyValue, state *internal.State) Slice { - return Slice(internal.NewSlice(orig, state)) -} - -func (es Slice) getOrig() *[]otlpcommon.AnyValue { - return internal.GetOrigSlice(internal.Slice(es)) -} - -func (es Slice) getState() *internal.State { - return internal.GetSliceState(internal.Slice(es)) -} - -// NewSlice creates a Slice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewSlice() Slice { - orig := []otlpcommon.AnyValue(nil) - state := internal.StateMutable - return Slice(internal.NewSlice(&orig, &state)) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewSlice()". -func (es Slice) Len() int { - return len(*es.getOrig()) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es Slice) At(ix int) Value { - return newValue(&(*es.getOrig())[ix], es.getState()) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es Slice) All() iter.Seq2[int, Value] { - return func(yield func(int, Value) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es Slice) CopyTo(dest Slice) { - dest.getState().AssertMutable() - *dest.getOrig() = internal.CopyOrigSlice(*dest.getOrig(), *es.getOrig()) -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new Slice can be initialized: -// -// es := NewSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es Slice) EnsureCapacity(newCap int) { - es.getState().AssertMutable() - oldCap := cap(*es.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]otlpcommon.AnyValue, len(*es.getOrig()), newCap) - copy(newOrig, *es.getOrig()) - *es.getOrig() = newOrig -} - -// AppendEmpty will append to the end of the slice an empty Value. -// It returns the newly added Value. -func (es Slice) AppendEmpty() Value { - es.getState().AssertMutable() - *es.getOrig() = append(*es.getOrig(), otlpcommon.AnyValue{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es Slice) MoveAndAppendTo(dest Slice) { - es.getState().AssertMutable() - dest.getState().AssertMutable() - if *dest.getOrig() == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.getOrig() = *es.getOrig() - } else { - *dest.getOrig() = append(*dest.getOrig(), *es.getOrig()...) - } - *es.getOrig() = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es Slice) RemoveIf(f func(Value) bool) { - es.getState().AssertMutable() - newLen := 0 - for i := 0; i < len(*es.getOrig()); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.getOrig())[newLen] = (*es.getOrig())[i] - newLen++ - } - *es.getOrig() = (*es.getOrig())[:newLen] -} - // AsRaw return []any copy of the Slice. func (es Slice) AsRaw() []any { rawSlice := make([]any, 0, es.Len()) @@ -164,7 +26,7 @@ func (es Slice) FromRaw(rawSlice []any) error { return nil } var errs error - origs := make([]otlpcommon.AnyValue, len(rawSlice)) + origs := make([]internal.AnyValue, len(rawSlice)) for ix, iv := range rawSlice { errs = multierr.Append(errs, newValue(&origs[ix], es.getState()).FromRaw(iv)) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go index 63399cb58ca..853c1a2d017 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go @@ -5,7 +5,7 @@ package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" import ( "encoding/hex" - "go.opentelemetry.io/collector/pdata/internal/data" + "go.opentelemetry.io/collector/pdata/internal" ) var emptySpanID = SpanID([8]byte{}) @@ -32,5 +32,5 @@ func (ms SpanID) String() string { // IsEmpty returns true if id doesn't contain at least one non-zero byte. func (ms SpanID) IsEmpty() bool { - return data.SpanID(ms).IsEmpty() + return internal.SpanID(ms).IsEmpty() } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go index 037213a0caf..5fd1758b1be 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go @@ -13,13 +13,11 @@ type Timestamp uint64 // NewTimestampFromTime constructs a new Timestamp from the provided time.Time. func NewTimestampFromTime(t time.Time) Timestamp { - //nolint:gosec return Timestamp(uint64(t.UnixNano())) } // AsTime converts this to a time.Time. func (ts Timestamp) AsTime() time.Time { - //nolint:gosec return time.Unix(0, int64(ts)).UTC() } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go index 3bde05482f5..167f7a3278c 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go @@ -11,19 +11,18 @@ import ( // // Must use NewTraceState function to create new instances. // Important: zero-initialized instance is not valid for use. -type TraceState internal.TraceState +type TraceState internal.TraceStateWrapper func NewTraceState() TraceState { - state := internal.StateMutable - return TraceState(internal.NewTraceState(new(string), &state)) + return TraceState(internal.NewTraceStateWrapper(new(string), internal.NewState())) } func (ms TraceState) getOrig() *string { - return internal.GetOrigTraceState(internal.TraceState(ms)) + return internal.GetTraceStateOrig(internal.TraceStateWrapper(ms)) } func (ms TraceState) getState() *internal.State { - return internal.GetTraceStateState(internal.TraceState(ms)) + return internal.GetTraceStateState(internal.TraceStateWrapper(ms)) } // AsRaw returns the string representation of the tracestate in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go index 22ad5a5af4e..fd1df45d2c2 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go @@ -6,7 +6,7 @@ package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" import ( "encoding/hex" - "go.opentelemetry.io/collector/pdata/internal/data" + "go.opentelemetry.io/collector/pdata/internal" ) var emptyTraceID = TraceID([16]byte{}) @@ -33,5 +33,5 @@ func (ms TraceID) String() string { // IsEmpty returns true if id doesn't contain at least one non-zero byte. func (ms TraceID) IsEmpty() bool { - return data.TraceID(ms).IsEmpty() + return internal.TraceID(ms).IsEmpty() } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go index 4a88fe29556..3c39e704ed9 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go @@ -11,7 +11,6 @@ import ( "strconv" "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" ) // ValueType specifies the type of Value. @@ -67,66 +66,85 @@ func (avt ValueType) String() string { // // Important: zero-initialized instance is not valid for use. All Value functions below must // be called only on instances that are created via NewValue+ functions. -type Value internal.Value +type Value internal.ValueWrapper // NewValueEmpty creates a new Value with an empty value. func NewValueEmpty() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{}, &state) + return newValue(&internal.AnyValue{}, internal.NewState()) } // NewValueStr creates a new Value with the given string value. func NewValueStr(v string) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: v}}, &state) + ov := internal.NewAnyValueStringValue() + ov.StringValue = v + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } // NewValueInt creates a new Value with the given int64 value. func NewValueInt(v int64) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_IntValue{IntValue: v}}, &state) + ov := internal.NewAnyValueIntValue() + ov.IntValue = v + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } // NewValueDouble creates a new Value with the given float64 value. func NewValueDouble(v float64) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_DoubleValue{DoubleValue: v}}, &state) + ov := internal.NewAnyValueDoubleValue() + ov.DoubleValue = v + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } // NewValueBool creates a new Value with the given bool value. func NewValueBool(v bool) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BoolValue{BoolValue: v}}, &state) + ov := internal.NewAnyValueBoolValue() + ov.BoolValue = v + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } // NewValueMap creates a new Value of map type. func NewValueMap() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}}}, &state) + ov := internal.NewAnyValueKvlistValue() + ov.KvlistValue = internal.NewKeyValueList() + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } // NewValueSlice creates a new Value of array type. func NewValueSlice() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}}}, &state) + ov := internal.NewAnyValueArrayValue() + ov.ArrayValue = internal.NewArrayValue() + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } // NewValueBytes creates a new empty Value of byte type. func NewValueBytes() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BytesValue{BytesValue: nil}}, &state) + ov := internal.NewAnyValueBytesValue() + orig := internal.NewAnyValue() + orig.Value = ov + return newValue(orig, internal.NewState()) } -func newValue(orig *otlpcommon.AnyValue, state *internal.State) Value { - return Value(internal.NewValue(orig, state)) +func newValue(orig *internal.AnyValue, state *internal.State) Value { + return Value(internal.NewValueWrapper(orig, state)) } -func (v Value) getOrig() *otlpcommon.AnyValue { - return internal.GetOrigValue(internal.Value(v)) +func (v Value) getOrig() *internal.AnyValue { + return internal.GetValueOrig(internal.ValueWrapper(v)) } func (v Value) getState() *internal.State { - return internal.GetValueState(internal.Value(v)) + return internal.GetValueState(internal.ValueWrapper(v)) } // FromRaw sets the value from the given raw value. @@ -148,7 +166,6 @@ func (v Value) FromRaw(iv any) error { case int64: v.SetInt(tv) case uint: - //nolint:gosec v.SetInt(int64(tv)) case uint8: v.SetInt(int64(tv)) @@ -157,7 +174,6 @@ func (v Value) FromRaw(iv any) error { case uint32: v.SetInt(int64(tv)) case uint64: - //nolint:gosec v.SetInt(int64(tv)) case float32: v.SetDouble(float64(tv)) @@ -181,19 +197,19 @@ func (v Value) FromRaw(iv any) error { // Calling this function on zero-initialized Value will cause a panic. func (v Value) Type() ValueType { switch v.getOrig().Value.(type) { - case *otlpcommon.AnyValue_StringValue: + case *internal.AnyValue_StringValue: return ValueTypeStr - case *otlpcommon.AnyValue_BoolValue: + case *internal.AnyValue_BoolValue: return ValueTypeBool - case *otlpcommon.AnyValue_IntValue: + case *internal.AnyValue_IntValue: return ValueTypeInt - case *otlpcommon.AnyValue_DoubleValue: + case *internal.AnyValue_DoubleValue: return ValueTypeDouble - case *otlpcommon.AnyValue_KvlistValue: + case *internal.AnyValue_KvlistValue: return ValueTypeMap - case *otlpcommon.AnyValue_ArrayValue: + case *internal.AnyValue_ArrayValue: return ValueTypeSlice - case *otlpcommon.AnyValue_BytesValue: + case *internal.AnyValue_BytesValue: return ValueTypeBytes } return ValueTypeEmpty @@ -232,7 +248,7 @@ func (v Value) Map() Map { if kvlist == nil { return Map{} } - return newMap(&kvlist.Values, internal.GetValueState(internal.Value(v))) + return newMap(&kvlist.Values, internal.GetValueState(internal.ValueWrapper(v))) } // Slice returns the slice value associated with this Value. @@ -243,18 +259,18 @@ func (v Value) Slice() Slice { if arr == nil { return Slice{} } - return newSlice(&arr.Values, internal.GetValueState(internal.Value(v))) + return newSlice(&arr.Values, internal.GetValueState(internal.ValueWrapper(v))) } // Bytes returns the ByteSlice value associated with this Value. // If the function is called on zero-initialized Value or if the Type() is not ValueTypeBytes // then returns an invalid ByteSlice object. Note that using such slice can cause panic. func (v Value) Bytes() ByteSlice { - bv, ok := v.getOrig().GetValue().(*otlpcommon.AnyValue_BytesValue) + bv, ok := v.getOrig().GetValue().(*internal.AnyValue_BytesValue) if !ok { return ByteSlice{} } - return ByteSlice(internal.NewByteSlice(&bv.BytesValue, internal.GetValueState(internal.Value(v)))) + return ByteSlice(internal.NewByteSliceWrapper(&bv.BytesValue, internal.GetValueState(internal.ValueWrapper(v)))) } // SetStr replaces the string value associated with this Value, @@ -264,7 +280,11 @@ func (v Value) Bytes() ByteSlice { // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetStr(sv string) { v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_StringValue{StringValue: sv} + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + ov := internal.NewAnyValueStringValue() + ov.StringValue = sv + v.getOrig().Value = ov } // SetInt replaces the int64 value associated with this Value, @@ -272,7 +292,11 @@ func (v Value) SetStr(sv string) { // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetInt(iv int64) { v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_IntValue{IntValue: iv} + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + ov := internal.NewAnyValueIntValue() + ov.IntValue = iv + v.getOrig().Value = ov } // SetDouble replaces the float64 value associated with this Value, @@ -280,7 +304,11 @@ func (v Value) SetInt(iv int64) { // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetDouble(dv float64) { v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_DoubleValue{DoubleValue: dv} + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + ov := internal.NewAnyValueDoubleValue() + ov.DoubleValue = dv + v.getOrig().Value = ov } // SetBool replaces the bool value associated with this Value, @@ -288,34 +316,46 @@ func (v Value) SetDouble(dv float64) { // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetBool(bv bool) { v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_BoolValue{BoolValue: bv} + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + ov := internal.NewAnyValueBoolValue() + ov.BoolValue = bv + v.getOrig().Value = ov } // SetEmptyBytes sets value to an empty byte slice and returns it. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetEmptyBytes() ByteSlice { v.getState().AssertMutable() - bv := otlpcommon.AnyValue_BytesValue{BytesValue: nil} - v.getOrig().Value = &bv - return ByteSlice(internal.NewByteSlice(&bv.BytesValue, v.getState())) + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + bv := internal.NewAnyValueBytesValue() + v.getOrig().Value = bv + return ByteSlice(internal.NewByteSliceWrapper(&bv.BytesValue, v.getState())) } // SetEmptyMap sets value to an empty map and returns it. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetEmptyMap() Map { v.getState().AssertMutable() - kv := &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}} - v.getOrig().Value = kv - return newMap(&kv.KvlistValue.Values, v.getState()) + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + ov := internal.NewAnyValueKvlistValue() + ov.KvlistValue = internal.NewKeyValueList() + v.getOrig().Value = ov + return newMap(&ov.KvlistValue.Values, v.getState()) } // SetEmptySlice sets value to an empty slice and returns it. // Calling this function on zero-initialized Value will cause a panic. func (v Value) SetEmptySlice() Slice { v.getState().AssertMutable() - av := &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}} - v.getOrig().Value = av - return newSlice(&av.ArrayValue.Values, v.getState()) + // Delete everything but the AnyValue object itself. + internal.DeleteAnyValue(v.getOrig(), false) + ov := internal.NewAnyValueArrayValue() + ov.ArrayValue = internal.NewArrayValue() + v.getOrig().Value = ov + return newSlice(&ov.ArrayValue.Values, v.getState()) } // MoveTo moves the Value from current overriding the destination and @@ -336,7 +376,7 @@ func (v Value) MoveTo(dest Value) { // Calling this function on zero-initialized Value will cause a panic. func (v Value) CopyTo(dest Value) { dest.getState().AssertMutable() - internal.CopyOrigValue(dest.getOrig(), v.getOrig()) + internal.CopyAnyValue(dest.getOrig(), v.getOrig()) } // AsString converts an OTLP Value object of any type to its equivalent string @@ -455,35 +495,3 @@ func (v Value) Equal(c Value) bool { return false } - -func newKeyValueString(k string, v string) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetStr(v) - return orig -} - -func newKeyValueInt(k string, v int64) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetInt(v) - return orig -} - -func newKeyValueDouble(k string, v float64) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetDouble(v) - return orig -} - -func newKeyValueBool(k string, v bool) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetBool(v) - return orig -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/encoding.go b/vendor/go.opentelemetry.io/collector/pdata/plog/encoding.go index 99e6ac83653..92f3dc1ecaa 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/encoding.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/encoding.go @@ -9,17 +9,17 @@ type MarshalSizer interface { Sizer } -// Marshaler marshals pdata.Logs into bytes. +// Marshaler marshals Logs into bytes. type Marshaler interface { - // MarshalLogs the given pdata.Logs into bytes. + // MarshalLogs the given Logs into bytes. // If the error is not nil, the returned bytes slice cannot be used. MarshalLogs(ld Logs) ([]byte, error) } -// Unmarshaler unmarshalls bytes into pdata.Logs. +// Unmarshaler unmarshalls bytes into Logs. type Unmarshaler interface { - // UnmarshalLogs the given bytes into pdata.Logs. - // If the error is not nil, the returned pdata.Logs cannot be used. + // UnmarshalLogs the given bytes into Logs. + // If the error is not nil, the returned Logs cannot be used. UnmarshalLogs(buf []byte) (Logs, error) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecord.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecord.go index e9d8fa3daf9..80910c903fc 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecord.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecord.go @@ -1,15 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package plog import ( "go.opentelemetry.io/collector/pdata/internal" - "go.opentelemetry.io/collector/pdata/internal/data" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,11 +19,11 @@ import ( // Must use NewLogRecord function to create new instances. // Important: zero-initialized instance is not valid for use. type LogRecord struct { - orig *otlplogs.LogRecord + orig *internal.LogRecord state *internal.State } -func newLogRecord(orig *otlplogs.LogRecord, state *internal.State) LogRecord { +func newLogRecord(orig *internal.LogRecord, state *internal.State) LogRecord { return LogRecord{orig: orig, state: state} } @@ -34,8 +32,7 @@ func newLogRecord(orig *otlplogs.LogRecord, state *internal.State) LogRecord { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewLogRecord() LogRecord { - state := internal.StateMutable - return newLogRecord(&otlplogs.LogRecord{}, &state) + return newLogRecord(internal.NewLogRecord(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -47,8 +44,19 @@ func (ms LogRecord) MoveTo(dest LogRecord) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlplogs.LogRecord{} + internal.DeleteLogRecord(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig +} + +// Timestamp returns the timestamp associated with this LogRecord. +func (ms LogRecord) Timestamp() pcommon.Timestamp { + return pcommon.Timestamp(ms.orig.TimeUnixNano) +} + +// SetTimestamp replaces the timestamp associated with this LogRecord. +func (ms LogRecord) SetTimestamp(v pcommon.Timestamp) { + ms.state.AssertMutable() + ms.orig.TimeUnixNano = uint64(v) } // ObservedTimestamp returns the observedtimestamp associated with this LogRecord. @@ -62,37 +70,47 @@ func (ms LogRecord) SetObservedTimestamp(v pcommon.Timestamp) { ms.orig.ObservedTimeUnixNano = uint64(v) } -// Timestamp returns the timestamp associated with this LogRecord. -func (ms LogRecord) Timestamp() pcommon.Timestamp { - return pcommon.Timestamp(ms.orig.TimeUnixNano) +// SeverityNumber returns the severitynumber associated with this LogRecord. +func (ms LogRecord) SeverityNumber() SeverityNumber { + return SeverityNumber(ms.orig.SeverityNumber) } -// SetTimestamp replaces the timestamp associated with this LogRecord. -func (ms LogRecord) SetTimestamp(v pcommon.Timestamp) { +// SetSeverityNumber replaces the severitynumber associated with this LogRecord. +func (ms LogRecord) SetSeverityNumber(v SeverityNumber) { ms.state.AssertMutable() - ms.orig.TimeUnixNano = uint64(v) + ms.orig.SeverityNumber = internal.SeverityNumber(v) } -// TraceID returns the traceid associated with this LogRecord. -func (ms LogRecord) TraceID() pcommon.TraceID { - return pcommon.TraceID(ms.orig.TraceId) +// SeverityText returns the severitytext associated with this LogRecord. +func (ms LogRecord) SeverityText() string { + return ms.orig.SeverityText } -// SetTraceID replaces the traceid associated with this LogRecord. -func (ms LogRecord) SetTraceID(v pcommon.TraceID) { +// SetSeverityText replaces the severitytext associated with this LogRecord. +func (ms LogRecord) SetSeverityText(v string) { ms.state.AssertMutable() - ms.orig.TraceId = data.TraceID(v) + ms.orig.SeverityText = v } -// SpanID returns the spanid associated with this LogRecord. -func (ms LogRecord) SpanID() pcommon.SpanID { - return pcommon.SpanID(ms.orig.SpanId) +// Body returns the body associated with this LogRecord. +func (ms LogRecord) Body() pcommon.Value { + return pcommon.Value(internal.NewValueWrapper(&ms.orig.Body, ms.state)) } -// SetSpanID replaces the spanid associated with this LogRecord. -func (ms LogRecord) SetSpanID(v pcommon.SpanID) { +// Attributes returns the Attributes associated with this LogRecord. +func (ms LogRecord) Attributes() pcommon.Map { + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) +} + +// DroppedAttributesCount returns the droppedattributescount associated with this LogRecord. +func (ms LogRecord) DroppedAttributesCount() uint32 { + return ms.orig.DroppedAttributesCount +} + +// SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord. +func (ms LogRecord) SetDroppedAttributesCount(v uint32) { ms.state.AssertMutable() - ms.orig.SpanId = data.SpanID(v) + ms.orig.DroppedAttributesCount = v } // Flags returns the flags associated with this LogRecord. @@ -106,76 +124,41 @@ func (ms LogRecord) SetFlags(v LogRecordFlags) { ms.orig.Flags = uint32(v) } -// EventName returns the eventname associated with this LogRecord. -func (ms LogRecord) EventName() string { - return ms.orig.EventName -} - -// SetEventName replaces the eventname associated with this LogRecord. -func (ms LogRecord) SetEventName(v string) { - ms.state.AssertMutable() - ms.orig.EventName = v -} - -// SeverityText returns the severitytext associated with this LogRecord. -func (ms LogRecord) SeverityText() string { - return ms.orig.SeverityText +// TraceID returns the traceid associated with this LogRecord. +func (ms LogRecord) TraceID() pcommon.TraceID { + return pcommon.TraceID(ms.orig.TraceId) } -// SetSeverityText replaces the severitytext associated with this LogRecord. -func (ms LogRecord) SetSeverityText(v string) { +// SetTraceID replaces the traceid associated with this LogRecord. +func (ms LogRecord) SetTraceID(v pcommon.TraceID) { ms.state.AssertMutable() - ms.orig.SeverityText = v + ms.orig.TraceId = internal.TraceID(v) } -// SeverityNumber returns the severitynumber associated with this LogRecord. -func (ms LogRecord) SeverityNumber() SeverityNumber { - return SeverityNumber(ms.orig.SeverityNumber) +// SpanID returns the spanid associated with this LogRecord. +func (ms LogRecord) SpanID() pcommon.SpanID { + return pcommon.SpanID(ms.orig.SpanId) } -// SetSeverityNumber replaces the severitynumber associated with this LogRecord. -func (ms LogRecord) SetSeverityNumber(v SeverityNumber) { +// SetSpanID replaces the spanid associated with this LogRecord. +func (ms LogRecord) SetSpanID(v pcommon.SpanID) { ms.state.AssertMutable() - ms.orig.SeverityNumber = otlplogs.SeverityNumber(v) -} - -// Body returns the body associated with this LogRecord. -func (ms LogRecord) Body() pcommon.Value { - return pcommon.Value(internal.NewValue(&ms.orig.Body, ms.state)) -} - -// Attributes returns the Attributes associated with this LogRecord. -func (ms LogRecord) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + ms.orig.SpanId = internal.SpanID(v) } -// DroppedAttributesCount returns the droppedattributescount associated with this LogRecord. -func (ms LogRecord) DroppedAttributesCount() uint32 { - return ms.orig.DroppedAttributesCount +// EventName returns the eventname associated with this LogRecord. +func (ms LogRecord) EventName() string { + return ms.orig.EventName } -// SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord. -func (ms LogRecord) SetDroppedAttributesCount(v uint32) { +// SetEventName replaces the eventname associated with this LogRecord. +func (ms LogRecord) SetEventName(v string) { ms.state.AssertMutable() - ms.orig.DroppedAttributesCount = v + ms.orig.EventName = v } // CopyTo copies all properties from the current struct overriding the destination. func (ms LogRecord) CopyTo(dest LogRecord) { dest.state.AssertMutable() - copyOrigLogRecord(dest.orig, ms.orig) -} - -func copyOrigLogRecord(dest, src *otlplogs.LogRecord) { - dest.ObservedTimeUnixNano = src.ObservedTimeUnixNano - dest.TimeUnixNano = src.TimeUnixNano - dest.TraceId = src.TraceId - dest.SpanId = src.SpanId - dest.Flags = src.Flags - dest.EventName = src.EventName - dest.SeverityText = src.SeverityText - dest.SeverityNumber = src.SeverityNumber - internal.CopyOrigValue(&dest.Body, &src.Body) - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.DroppedAttributesCount = src.DroppedAttributesCount + internal.CopyLogRecord(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecordslice.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecordslice.go index bdd40031b3a..58751158d7b 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecordslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logrecordslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package plog @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) // LogRecordSlice logically represents a slice of LogRecord. @@ -22,20 +21,19 @@ import ( // Must use NewLogRecordSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type LogRecordSlice struct { - orig *[]*otlplogs.LogRecord + orig *[]*internal.LogRecord state *internal.State } -func newLogRecordSlice(orig *[]*otlplogs.LogRecord, state *internal.State) LogRecordSlice { +func newLogRecordSlice(orig *[]*internal.LogRecord, state *internal.State) LogRecordSlice { return LogRecordSlice{orig: orig, state: state} } -// NewLogRecordSlice creates a LogRecordSlice with 0 elements. +// NewLogRecordSlice creates a LogRecordSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewLogRecordSlice() LogRecordSlice { - orig := []*otlplogs.LogRecord(nil) - state := internal.StateMutable - return newLogRecordSlice(&orig, &state) + orig := []*internal.LogRecord(nil) + return newLogRecordSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es LogRecordSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlplogs.LogRecord, len(*es.orig), newCap) + newOrig := make([]*internal.LogRecord, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es LogRecordSlice) EnsureCapacity(newCap int) { // It returns the newly added LogRecord. func (es LogRecordSlice) AppendEmpty() LogRecord { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlplogs.LogRecord{}) + *es.orig = append(*es.orig, internal.NewLogRecord()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es LogRecordSlice) RemoveIf(f func(LogRecord) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteLogRecord((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es LogRecordSlice) RemoveIf(f func(LogRecord) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es LogRecordSlice) RemoveIf(f func(LogRecord) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es LogRecordSlice) CopyTo(dest LogRecordSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigLogRecordSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyLogRecordPtrSlice(*dest.orig, *es.orig) } // Sort sorts the LogRecord elements within LogRecordSlice given the @@ -155,18 +161,3 @@ func (es LogRecordSlice) Sort(less func(a, b LogRecord) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigLogRecordSlice(dest, src []*otlplogs.LogRecord) []*otlplogs.LogRecord { - if cap(dest) < len(src) { - dest = make([]*otlplogs.LogRecord, len(src)) - data := make([]otlplogs.LogRecord, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigLogRecord(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logs.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logs.go new file mode 100644 index 00000000000..238ed8764d5 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_logs.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package plog + +import ( + "go.opentelemetry.io/collector/pdata/internal" +) + +// Logs is the top-level struct that is propagated through the logs pipeline. +// Use NewLogs to create new instance, zero-initialized instance is not valid for use. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewLogs function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Logs internal.LogsWrapper + +func newLogs(orig *internal.ExportLogsServiceRequest, state *internal.State) Logs { + return Logs(internal.NewLogsWrapper(orig, state)) +} + +// NewLogs creates a new empty Logs. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewLogs() Logs { + return newLogs(internal.NewExportLogsServiceRequest(), internal.NewState()) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Logs) MoveTo(dest Logs) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() + // If they point to the same data, they are the same, nothing to do. + if ms.getOrig() == dest.getOrig() { + return + } + internal.DeleteExportLogsServiceRequest(dest.getOrig(), false) + *dest.getOrig(), *ms.getOrig() = *ms.getOrig(), *dest.getOrig() +} + +// ResourceLogs returns the ResourceLogs associated with this Logs. +func (ms Logs) ResourceLogs() ResourceLogsSlice { + return newResourceLogsSlice(&ms.getOrig().ResourceLogs, ms.getState()) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Logs) CopyTo(dest Logs) { + dest.getState().AssertMutable() + internal.CopyExportLogsServiceRequest(dest.getOrig(), ms.getOrig()) +} + +func (ms Logs) getOrig() *internal.ExportLogsServiceRequest { + return internal.GetLogsOrig(internal.LogsWrapper(ms)) +} + +func (ms Logs) getState() *internal.State { + return internal.GetLogsState(internal.LogsWrapper(ms)) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogs.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogs.go index bf2c916329a..b3b64ff4461 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogs.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogs.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package plog import ( "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewResourceLogs function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceLogs struct { - orig *otlplogs.ResourceLogs + orig *internal.ResourceLogs state *internal.State } -func newResourceLogs(orig *otlplogs.ResourceLogs, state *internal.State) ResourceLogs { +func newResourceLogs(orig *internal.ResourceLogs, state *internal.State) ResourceLogs { return ResourceLogs{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newResourceLogs(orig *otlplogs.ResourceLogs, state *internal.State) Resourc // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResourceLogs() ResourceLogs { - state := internal.StateMutable - return newResourceLogs(&otlplogs.ResourceLogs{}, &state) + return newResourceLogs(internal.NewResourceLogs(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,18 @@ func (ms ResourceLogs) MoveTo(dest ResourceLogs) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlplogs.ResourceLogs{} + internal.DeleteResourceLogs(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Resource returns the resource associated with this ResourceLogs. func (ms ResourceLogs) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) + return pcommon.Resource(internal.NewResourceWrapper(&ms.orig.Resource, ms.state)) +} + +// ScopeLogs returns the ScopeLogs associated with this ResourceLogs. +func (ms ResourceLogs) ScopeLogs() ScopeLogsSlice { + return newScopeLogsSlice(&ms.orig.ScopeLogs, ms.state) } // SchemaUrl returns the schemaurl associated with this ResourceLogs. @@ -66,19 +69,8 @@ func (ms ResourceLogs) SetSchemaUrl(v string) { ms.orig.SchemaUrl = v } -// ScopeLogs returns the ScopeLogs associated with this ResourceLogs. -func (ms ResourceLogs) ScopeLogs() ScopeLogsSlice { - return newScopeLogsSlice(&ms.orig.ScopeLogs, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms ResourceLogs) CopyTo(dest ResourceLogs) { dest.state.AssertMutable() - copyOrigResourceLogs(dest.orig, ms.orig) -} - -func copyOrigResourceLogs(dest, src *otlplogs.ResourceLogs) { - internal.CopyOrigResource(&dest.Resource, &src.Resource) - dest.SchemaUrl = src.SchemaUrl - dest.ScopeLogs = copyOrigScopeLogsSlice(dest.ScopeLogs, src.ScopeLogs) + internal.CopyResourceLogs(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogsslice.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogsslice.go index b016f7cdf8d..d730aed983a 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogsslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_resourcelogsslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package plog @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) // ResourceLogsSlice logically represents a slice of ResourceLogs. @@ -22,20 +21,19 @@ import ( // Must use NewResourceLogsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceLogsSlice struct { - orig *[]*otlplogs.ResourceLogs + orig *[]*internal.ResourceLogs state *internal.State } -func newResourceLogsSlice(orig *[]*otlplogs.ResourceLogs, state *internal.State) ResourceLogsSlice { +func newResourceLogsSlice(orig *[]*internal.ResourceLogs, state *internal.State) ResourceLogsSlice { return ResourceLogsSlice{orig: orig, state: state} } -// NewResourceLogsSlice creates a ResourceLogsSlice with 0 elements. +// NewResourceLogsSlice creates a ResourceLogsSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewResourceLogsSlice() ResourceLogsSlice { - orig := []*otlplogs.ResourceLogs(nil) - state := internal.StateMutable - return newResourceLogsSlice(&orig, &state) + orig := []*internal.ResourceLogs(nil) + return newResourceLogsSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ResourceLogsSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlplogs.ResourceLogs, len(*es.orig), newCap) + newOrig := make([]*internal.ResourceLogs, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ResourceLogsSlice) EnsureCapacity(newCap int) { // It returns the newly added ResourceLogs. func (es ResourceLogsSlice) AppendEmpty() ResourceLogs { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlplogs.ResourceLogs{}) + *es.orig = append(*es.orig, internal.NewResourceLogs()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteResourceLogs((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigResourceLogsSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyResourceLogsPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ResourceLogs elements within ResourceLogsSlice given the @@ -155,18 +161,3 @@ func (es ResourceLogsSlice) Sort(less func(a, b ResourceLogs) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigResourceLogsSlice(dest, src []*otlplogs.ResourceLogs) []*otlplogs.ResourceLogs { - if cap(dest) < len(src) { - dest = make([]*otlplogs.ResourceLogs, len(src)) - data := make([]otlplogs.ResourceLogs, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigResourceLogs(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogs.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogs.go index 857cc921866..9cb55863ad2 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogs.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogs.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package plog import ( "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewScopeLogs function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeLogs struct { - orig *otlplogs.ScopeLogs + orig *internal.ScopeLogs state *internal.State } -func newScopeLogs(orig *otlplogs.ScopeLogs, state *internal.State) ScopeLogs { +func newScopeLogs(orig *internal.ScopeLogs, state *internal.State) ScopeLogs { return ScopeLogs{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newScopeLogs(orig *otlplogs.ScopeLogs, state *internal.State) ScopeLogs { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewScopeLogs() ScopeLogs { - state := internal.StateMutable - return newScopeLogs(&otlplogs.ScopeLogs{}, &state) + return newScopeLogs(internal.NewScopeLogs(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,18 @@ func (ms ScopeLogs) MoveTo(dest ScopeLogs) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlplogs.ScopeLogs{} + internal.DeleteScopeLogs(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Scope returns the scope associated with this ScopeLogs. func (ms ScopeLogs) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) + return pcommon.InstrumentationScope(internal.NewInstrumentationScopeWrapper(&ms.orig.Scope, ms.state)) +} + +// LogRecords returns the LogRecords associated with this ScopeLogs. +func (ms ScopeLogs) LogRecords() LogRecordSlice { + return newLogRecordSlice(&ms.orig.LogRecords, ms.state) } // SchemaUrl returns the schemaurl associated with this ScopeLogs. @@ -66,19 +69,8 @@ func (ms ScopeLogs) SetSchemaUrl(v string) { ms.orig.SchemaUrl = v } -// LogRecords returns the LogRecords associated with this ScopeLogs. -func (ms ScopeLogs) LogRecords() LogRecordSlice { - return newLogRecordSlice(&ms.orig.LogRecords, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms ScopeLogs) CopyTo(dest ScopeLogs) { dest.state.AssertMutable() - copyOrigScopeLogs(dest.orig, ms.orig) -} - -func copyOrigScopeLogs(dest, src *otlplogs.ScopeLogs) { - internal.CopyOrigInstrumentationScope(&dest.Scope, &src.Scope) - dest.SchemaUrl = src.SchemaUrl - dest.LogRecords = copyOrigLogRecordSlice(dest.LogRecords, src.LogRecords) + internal.CopyScopeLogs(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogsslice.go b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogsslice.go index 1eff72908ba..50309c7df9e 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogsslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/generated_scopelogsslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package plog @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" ) // ScopeLogsSlice logically represents a slice of ScopeLogs. @@ -22,20 +21,19 @@ import ( // Must use NewScopeLogsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeLogsSlice struct { - orig *[]*otlplogs.ScopeLogs + orig *[]*internal.ScopeLogs state *internal.State } -func newScopeLogsSlice(orig *[]*otlplogs.ScopeLogs, state *internal.State) ScopeLogsSlice { +func newScopeLogsSlice(orig *[]*internal.ScopeLogs, state *internal.State) ScopeLogsSlice { return ScopeLogsSlice{orig: orig, state: state} } -// NewScopeLogsSlice creates a ScopeLogsSlice with 0 elements. +// NewScopeLogsSlice creates a ScopeLogsSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewScopeLogsSlice() ScopeLogsSlice { - orig := []*otlplogs.ScopeLogs(nil) - state := internal.StateMutable - return newScopeLogsSlice(&orig, &state) + orig := []*internal.ScopeLogs(nil) + return newScopeLogsSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ScopeLogsSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlplogs.ScopeLogs, len(*es.orig), newCap) + newOrig := make([]*internal.ScopeLogs, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ScopeLogsSlice) EnsureCapacity(newCap int) { // It returns the newly added ScopeLogs. func (es ScopeLogsSlice) AppendEmpty() ScopeLogs { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlplogs.ScopeLogs{}) + *es.orig = append(*es.orig, internal.NewScopeLogs()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ScopeLogsSlice) RemoveIf(f func(ScopeLogs) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteScopeLogs((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ScopeLogsSlice) RemoveIf(f func(ScopeLogs) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ScopeLogsSlice) RemoveIf(f func(ScopeLogs) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ScopeLogsSlice) CopyTo(dest ScopeLogsSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigScopeLogsSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyScopeLogsPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ScopeLogs elements within ScopeLogsSlice given the @@ -155,18 +161,3 @@ func (es ScopeLogsSlice) Sort(less func(a, b ScopeLogs) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigScopeLogsSlice(dest, src []*otlplogs.ScopeLogs) []*otlplogs.ScopeLogs { - if cap(dest) < len(src) { - dest = make([]*otlplogs.ScopeLogs, len(src)) - data := make([]otlplogs.ScopeLogs, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigScopeLogs(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/json.go b/vendor/go.opentelemetry.io/collector/pdata/plog/json.go index 5e1cdd70d5b..7d7bdaae256 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/json.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/json.go @@ -4,134 +4,40 @@ package plog // import "go.opentelemetry.io/collector/pdata/plog" import ( - "bytes" - "fmt" + "slices" - jsoniter "github.com/json-iterator/go" - - "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" "go.opentelemetry.io/collector/pdata/internal/json" "go.opentelemetry.io/collector/pdata/internal/otlp" ) -// JSONMarshaler marshals pdata.Logs to JSON bytes using the OTLP/JSON format. +// JSONMarshaler marshals Logs to JSON bytes using the OTLP/JSON format. type JSONMarshaler struct{} // MarshalLogs to the OTLP/JSON format. func (*JSONMarshaler) MarshalLogs(ld Logs) ([]byte, error) { - buf := bytes.Buffer{} - pb := internal.LogsToProto(internal.Logs(ld)) - err := json.Marshal(&buf, &pb) - return buf.Bytes(), err + dest := json.BorrowStream(nil) + defer json.ReturnStream(dest) + ld.getOrig().MarshalJSON(dest) + if dest.Error() != nil { + return nil, dest.Error() + } + return slices.Clone(dest.Buffer()), nil } var _ Unmarshaler = (*JSONUnmarshaler)(nil) -// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Logs. +// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to Logs. type JSONUnmarshaler struct{} -// UnmarshalLogs from OTLP/JSON format into pdata.Logs. +// UnmarshalLogs from OTLP/JSON format into Logs. func (*JSONUnmarshaler) UnmarshalLogs(buf []byte) (Logs, error) { - iter := jsoniter.ConfigFastest.BorrowIterator(buf) - defer jsoniter.ConfigFastest.ReturnIterator(iter) + iter := json.BorrowIterator(buf) + defer json.ReturnIterator(iter) ld := NewLogs() - ld.unmarshalJsoniter(iter) - if iter.Error != nil { - return Logs{}, iter.Error + ld.getOrig().UnmarshalJSON(iter) + if iter.Error() != nil { + return Logs{}, iter.Error() } otlp.MigrateLogs(ld.getOrig().ResourceLogs) return ld, nil } - -func (ms Logs) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resource_logs", "resourceLogs": - iter.ReadArrayCB(func(*jsoniter.Iterator) bool { - ms.ResourceLogs().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms ResourceLogs) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resource": - json.ReadResource(iter, &ms.orig.Resource) - case "scope_logs", "scopeLogs": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.ScopeLogs().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (ms ScopeLogs) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "scope": - json.ReadScope(iter, &ms.orig.Scope) - case "log_records", "logRecords": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.LogRecords().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (ms LogRecord) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - ms.orig.TimeUnixNano = json.ReadUint64(iter) - case "observed_time_unix_nano", "observedTimeUnixNano": - ms.orig.ObservedTimeUnixNano = json.ReadUint64(iter) - case "severity_number", "severityNumber": - ms.orig.SeverityNumber = otlplogs.SeverityNumber(json.ReadEnumValue(iter, otlplogs.SeverityNumber_value)) - case "severity_text", "severityText": - ms.orig.SeverityText = iter.ReadString() - case "event_name", "eventName": - ms.orig.EventName = iter.ReadString() - case "body": - json.ReadValue(iter, &ms.orig.Body) - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.Attributes = append(ms.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - ms.orig.DroppedAttributesCount = json.ReadUint32(iter) - case "flags": - ms.orig.Flags = json.ReadUint32(iter) - case "traceId", "trace_id": - if err := ms.orig.TraceId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readLog.traceId", fmt.Sprintf("parse trace_id:%v", err)) - } - case "spanId", "span_id": - if err := ms.orig.SpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readLog.spanId", fmt.Sprintf("parse span_id:%v", err)) - } - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/logs.go b/vendor/go.opentelemetry.io/collector/pdata/plog/logs.go index 490526090f8..8fd939e7f35 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/logs.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/logs.go @@ -3,41 +3,14 @@ package plog // import "go.opentelemetry.io/collector/pdata/plog" -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" -) - -// Logs is the top-level struct that is propagated through the logs pipeline. -// Use NewLogs to create new instance, zero-initialized instance is not valid for use. -type Logs internal.Logs - -func newLogs(orig *otlpcollectorlog.ExportLogsServiceRequest) Logs { - state := internal.StateMutable - return Logs(internal.NewLogs(orig, &state)) -} - -func (ms Logs) getOrig() *otlpcollectorlog.ExportLogsServiceRequest { - return internal.GetOrigLogs(internal.Logs(ms)) -} - -func (ms Logs) getState() *internal.State { - return internal.GetLogsState(internal.Logs(ms)) -} - -// NewLogs creates a new Logs struct. -func NewLogs() Logs { - return newLogs(&otlpcollectorlog.ExportLogsServiceRequest{}) +// MarkReadOnly marks the Logs as shared so that no further modifications can be done on it. +func (ms Logs) MarkReadOnly() { + ms.getState().MarkReadOnly() } // IsReadOnly returns true if this Logs instance is read-only. func (ms Logs) IsReadOnly() bool { - return *ms.getState() == internal.StateReadOnly -} - -// CopyTo copies the Logs instance overriding the destination. -func (ms Logs) CopyTo(dest Logs) { - ms.ResourceLogs().CopyTo(dest.ResourceLogs()) + return ms.getState().IsReadOnly() } // LogRecordCount calculates the total number of log records. @@ -54,13 +27,3 @@ func (ms Logs) LogRecordCount() int { } return logCount } - -// ResourceLogs returns the ResourceLogsSlice associated with this Logs. -func (ms Logs) ResourceLogs() ResourceLogsSlice { - return newResourceLogsSlice(&ms.getOrig().ResourceLogs, internal.GetLogsState(internal.Logs(ms))) -} - -// MarkReadOnly marks the Logs as shared so that no further modifications can be done on it. -func (ms Logs) MarkReadOnly() { - internal.SetLogsState(internal.Logs(ms), internal.StateReadOnly) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/pb.go b/vendor/go.opentelemetry.io/collector/pdata/plog/pb.go index a4cb09eb6ea..1f717928f93 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/pb.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/pb.go @@ -3,35 +3,31 @@ package plog // import "go.opentelemetry.io/collector/pdata/plog" -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" -) - var _ MarshalSizer = (*ProtoMarshaler)(nil) type ProtoMarshaler struct{} func (e *ProtoMarshaler) MarshalLogs(ld Logs) ([]byte, error) { - pb := internal.LogsToProto(internal.Logs(ld)) - return pb.Marshal() + size := ld.getOrig().SizeProto() + buf := make([]byte, size) + _ = ld.getOrig().MarshalProto(buf) + return buf, nil } func (e *ProtoMarshaler) LogsSize(ld Logs) int { - pb := internal.LogsToProto(internal.Logs(ld)) - return pb.Size() + return ld.getOrig().SizeProto() } -func (e *ProtoMarshaler) ResourceLogsSize(rl ResourceLogs) int { - return rl.orig.Size() +func (e *ProtoMarshaler) ResourceLogsSize(ld ResourceLogs) int { + return ld.orig.SizeProto() } -func (e *ProtoMarshaler) ScopeLogsSize(sl ScopeLogs) int { - return sl.orig.Size() +func (e *ProtoMarshaler) ScopeLogsSize(ld ScopeLogs) int { + return ld.orig.SizeProto() } -func (e *ProtoMarshaler) LogRecordSize(lr LogRecord) int { - return lr.orig.Size() +func (e *ProtoMarshaler) LogRecordSize(ld LogRecord) int { + return ld.orig.SizeProto() } var _ Unmarshaler = (*ProtoUnmarshaler)(nil) @@ -39,7 +35,10 @@ var _ Unmarshaler = (*ProtoUnmarshaler)(nil) type ProtoUnmarshaler struct{} func (d *ProtoUnmarshaler) UnmarshalLogs(buf []byte) (Logs, error) { - pb := otlplogs.LogsData{} - err := pb.Unmarshal(buf) - return Logs(internal.LogsFromProto(pb)), err + ld := NewLogs() + err := ld.getOrig().UnmarshalProto(buf) + if err != nil { + return Logs{}, err + } + return ld, nil } diff --git a/vendor/go.opentelemetry.io/collector/pdata/plog/severity_number.go b/vendor/go.opentelemetry.io/collector/pdata/plog/severity_number.go index 53a9d4179c4..5df0690872b 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/plog/severity_number.go +++ b/vendor/go.opentelemetry.io/collector/pdata/plog/severity_number.go @@ -4,38 +4,38 @@ package plog // import "go.opentelemetry.io/collector/pdata/plog" import ( - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // SeverityNumber represents severity number of a log record. type SeverityNumber int32 const ( - SeverityNumberUnspecified = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED) - SeverityNumberTrace = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE) - SeverityNumberTrace2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE2) - SeverityNumberTrace3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE3) - SeverityNumberTrace4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE4) - SeverityNumberDebug = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG) - SeverityNumberDebug2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG2) - SeverityNumberDebug3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG3) - SeverityNumberDebug4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG4) - SeverityNumberInfo = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO) - SeverityNumberInfo2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO2) - SeverityNumberInfo3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO3) - SeverityNumberInfo4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO4) - SeverityNumberWarn = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN) - SeverityNumberWarn2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN2) - SeverityNumberWarn3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN3) - SeverityNumberWarn4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN4) - SeverityNumberError = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR) - SeverityNumberError2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR2) - SeverityNumberError3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR3) - SeverityNumberError4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR4) - SeverityNumberFatal = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL) - SeverityNumberFatal2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL2) - SeverityNumberFatal3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL3) - SeverityNumberFatal4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL4) + SeverityNumberUnspecified = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED) + SeverityNumberTrace = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_TRACE) + SeverityNumberTrace2 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_TRACE2) + SeverityNumberTrace3 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_TRACE3) + SeverityNumberTrace4 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_TRACE4) + SeverityNumberDebug = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_DEBUG) + SeverityNumberDebug2 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_DEBUG2) + SeverityNumberDebug3 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_DEBUG3) + SeverityNumberDebug4 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_DEBUG4) + SeverityNumberInfo = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_INFO) + SeverityNumberInfo2 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_INFO2) + SeverityNumberInfo3 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_INFO3) + SeverityNumberInfo4 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_INFO4) + SeverityNumberWarn = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_WARN) + SeverityNumberWarn2 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_WARN2) + SeverityNumberWarn3 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_WARN3) + SeverityNumberWarn4 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_WARN4) + SeverityNumberError = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_ERROR) + SeverityNumberError2 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_ERROR2) + SeverityNumberError3 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_ERROR3) + SeverityNumberError4 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_ERROR4) + SeverityNumberFatal = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_FATAL) + SeverityNumberFatal2 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_FATAL2) + SeverityNumberFatal3 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_FATAL3) + SeverityNumberFatal4 = SeverityNumber(internal.SeverityNumber_SEVERITY_NUMBER_FATAL4) ) // String returns the string representation of the SeverityNumber. diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/aggregation_temporality.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/aggregation_temporality.go index 0ba2b28c29b..f2abb4f62b8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/aggregation_temporality.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/aggregation_temporality.go @@ -4,7 +4,7 @@ package pmetric // import "go.opentelemetry.io/collector/pdata/pmetric" import ( - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // AggregationTemporality defines how a metric aggregator reports aggregated values. @@ -13,11 +13,11 @@ type AggregationTemporality int32 const ( // AggregationTemporalityUnspecified is the default AggregationTemporality, it MUST NOT be used. - AggregationTemporalityUnspecified = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED) + AggregationTemporalityUnspecified = AggregationTemporality(internal.AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED) // AggregationTemporalityDelta is a AggregationTemporality for a metric aggregator which reports changes since last report time. - AggregationTemporalityDelta = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA) + AggregationTemporalityDelta = AggregationTemporality(internal.AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA) // AggregationTemporalityCumulative is a AggregationTemporality for a metric aggregator which reports changes since a fixed start time. - AggregationTemporalityCumulative = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE) + AggregationTemporalityCumulative = AggregationTemporality(internal.AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE) ) // String returns the string representation of the AggregationTemporality. diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplar.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplar.go index f8f6168b20b..12c9984abc6 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplar.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplar.go @@ -1,15 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - "go.opentelemetry.io/collector/pdata/internal/data" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -24,11 +22,11 @@ import ( // Must use NewExemplar function to create new instances. // Important: zero-initialized instance is not valid for use. type Exemplar struct { - orig *otlpmetrics.Exemplar + orig *internal.Exemplar state *internal.State } -func newExemplar(orig *otlpmetrics.Exemplar, state *internal.State) Exemplar { +func newExemplar(orig *internal.Exemplar, state *internal.State) Exemplar { return Exemplar{orig: orig, state: state} } @@ -37,8 +35,7 @@ func newExemplar(orig *otlpmetrics.Exemplar, state *internal.State) Exemplar { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExemplar() Exemplar { - state := internal.StateMutable - return newExemplar(&otlpmetrics.Exemplar{}, &state) + return newExemplar(internal.NewExemplar(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -50,8 +47,13 @@ func (ms Exemplar) MoveTo(dest Exemplar) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.Exemplar{} + internal.DeleteExemplar(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig +} + +// FilteredAttributes returns the FilteredAttributes associated with this Exemplar. +func (ms Exemplar) FilteredAttributes() pcommon.Map { + return pcommon.Map(internal.NewMapWrapper(&ms.orig.FilteredAttributes, ms.state)) } // Timestamp returns the timestamp associated with this Exemplar. @@ -69,9 +71,9 @@ func (ms Exemplar) SetTimestamp(v pcommon.Timestamp) { // Calling this function on zero-initialized Exemplar will cause a panic. func (ms Exemplar) ValueType() ExemplarValueType { switch ms.orig.Value.(type) { - case *otlpmetrics.Exemplar_AsDouble: + case *internal.Exemplar_AsDouble: return ExemplarValueTypeDouble - case *otlpmetrics.Exemplar_AsInt: + case *internal.Exemplar_AsInt: return ExemplarValueTypeInt } return ExemplarValueTypeEmpty @@ -85,12 +87,15 @@ func (ms Exemplar) DoubleValue() float64 { // SetDoubleValue replaces the double associated with this Exemplar. func (ms Exemplar) SetDoubleValue(v float64) { ms.state.AssertMutable() - ms.orig.Value = &otlpmetrics.Exemplar_AsDouble{ - AsDouble: v, + var ov *internal.Exemplar_AsDouble + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Exemplar_AsDouble{} + } else { + ov = internal.ProtoPoolExemplar_AsDouble.Get().(*internal.Exemplar_AsDouble) } -} - -// IntValue returns the int associated with this Exemplar. + ov.AsDouble = v + ms.orig.Value = ov +} // IntValue returns the int associated with this Exemplar. func (ms Exemplar) IntValue() int64 { return ms.orig.GetAsInt() } @@ -98,14 +103,14 @@ func (ms Exemplar) IntValue() int64 { // SetIntValue replaces the int associated with this Exemplar. func (ms Exemplar) SetIntValue(v int64) { ms.state.AssertMutable() - ms.orig.Value = &otlpmetrics.Exemplar_AsInt{ - AsInt: v, + var ov *internal.Exemplar_AsInt + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Exemplar_AsInt{} + } else { + ov = internal.ProtoPoolExemplar_AsInt.Get().(*internal.Exemplar_AsInt) } -} - -// FilteredAttributes returns the FilteredAttributes associated with this Exemplar. -func (ms Exemplar) FilteredAttributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.FilteredAttributes, ms.state)) + ov.AsInt = v + ms.orig.Value = ov } // TraceID returns the traceid associated with this Exemplar. @@ -116,7 +121,7 @@ func (ms Exemplar) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this Exemplar. func (ms Exemplar) SetTraceID(v pcommon.TraceID) { ms.state.AssertMutable() - ms.orig.TraceId = data.TraceID(v) + ms.orig.TraceId = internal.TraceID(v) } // SpanID returns the spanid associated with this Exemplar. @@ -127,24 +132,11 @@ func (ms Exemplar) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this Exemplar. func (ms Exemplar) SetSpanID(v pcommon.SpanID) { ms.state.AssertMutable() - ms.orig.SpanId = data.SpanID(v) + ms.orig.SpanId = internal.SpanID(v) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Exemplar) CopyTo(dest Exemplar) { dest.state.AssertMutable() - copyOrigExemplar(dest.orig, ms.orig) -} - -func copyOrigExemplar(dest, src *otlpmetrics.Exemplar) { - dest.TimeUnixNano = src.TimeUnixNano - switch t := src.Value.(type) { - case *otlpmetrics.Exemplar_AsDouble: - dest.Value = &otlpmetrics.Exemplar_AsDouble{AsDouble: t.AsDouble} - case *otlpmetrics.Exemplar_AsInt: - dest.Value = &otlpmetrics.Exemplar_AsInt{AsInt: t.AsInt} - } - dest.FilteredAttributes = internal.CopyOrigMap(dest.FilteredAttributes, src.FilteredAttributes) - dest.TraceId = src.TraceId - dest.SpanId = src.SpanId + internal.CopyExemplar(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplarslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplarslice.go index 49dd8db254f..d6fb809cf7a 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplarslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exemplarslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -10,7 +10,6 @@ import ( "iter" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // ExemplarSlice logically represents a slice of Exemplar. @@ -21,20 +20,19 @@ import ( // Must use NewExemplarSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ExemplarSlice struct { - orig *[]otlpmetrics.Exemplar + orig *[]internal.Exemplar state *internal.State } -func newExemplarSlice(orig *[]otlpmetrics.Exemplar, state *internal.State) ExemplarSlice { +func newExemplarSlice(orig *[]internal.Exemplar, state *internal.State) ExemplarSlice { return ExemplarSlice{orig: orig, state: state} } -// NewExemplarSlice creates a ExemplarSlice with 0 elements. +// NewExemplarSlice creates a ExemplarSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewExemplarSlice() ExemplarSlice { - orig := []otlpmetrics.Exemplar(nil) - state := internal.StateMutable - return newExemplarSlice(&orig, &state) + orig := []internal.Exemplar(nil) + return newExemplarSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -90,7 +88,7 @@ func (es ExemplarSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpmetrics.Exemplar, len(*es.orig), newCap) + newOrig := make([]internal.Exemplar, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -99,7 +97,7 @@ func (es ExemplarSlice) EnsureCapacity(newCap int) { // It returns the newly added Exemplar. func (es ExemplarSlice) AppendEmpty() Exemplar { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpmetrics.Exemplar{}) + *es.orig = append(*es.orig, internal.Exemplar{}) return es.At(es.Len() - 1) } @@ -128,6 +126,7 @@ func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteExemplar(&(*es.orig)[i], false) continue } if newLen == i { @@ -136,6 +135,7 @@ func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + (*es.orig)[i].Reset() newLen++ } *es.orig = (*es.orig)[:newLen] @@ -144,16 +144,8 @@ func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ExemplarSlice) CopyTo(dest ExemplarSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigExemplarSlice(*dest.orig, *es.orig) -} - -func copyOrigExemplarSlice(dest, src []otlpmetrics.Exemplar) []otlpmetrics.Exemplar { - if cap(dest) < len(src) { - dest = make([]otlpmetrics.Exemplar, len(src)) - } - dest = dest[:len(src)] - for i := range src { - copyOrigExemplar(&dest[i], &src[i]) + if es.orig == dest.orig { + return } - return dest + *dest.orig = internal.CopyExemplarSlice(*dest.orig, *es.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogram.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogram.go index ceddeacc357..9970cb5878c 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogram.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogram.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // ExponentialHistogram represents the type of a metric that is calculated by aggregating @@ -20,11 +19,11 @@ import ( // Must use NewExponentialHistogram function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogram struct { - orig *otlpmetrics.ExponentialHistogram + orig *internal.ExponentialHistogram state *internal.State } -func newExponentialHistogram(orig *otlpmetrics.ExponentialHistogram, state *internal.State) ExponentialHistogram { +func newExponentialHistogram(orig *internal.ExponentialHistogram, state *internal.State) ExponentialHistogram { return ExponentialHistogram{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newExponentialHistogram(orig *otlpmetrics.ExponentialHistogram, state *inte // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExponentialHistogram() ExponentialHistogram { - state := internal.StateMutable - return newExponentialHistogram(&otlpmetrics.ExponentialHistogram{}, &state) + return newExponentialHistogram(internal.NewExponentialHistogram(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,8 +44,13 @@ func (ms ExponentialHistogram) MoveTo(dest ExponentialHistogram) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.ExponentialHistogram{} + internal.DeleteExponentialHistogram(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig +} + +// DataPoints returns the DataPoints associated with this ExponentialHistogram. +func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice { + return newExponentialHistogramDataPointSlice(&ms.orig.DataPoints, ms.state) } // AggregationTemporality returns the aggregationtemporality associated with this ExponentialHistogram. @@ -58,21 +61,11 @@ func (ms ExponentialHistogram) AggregationTemporality() AggregationTemporality { // SetAggregationTemporality replaces the aggregationtemporality associated with this ExponentialHistogram. func (ms ExponentialHistogram) SetAggregationTemporality(v AggregationTemporality) { ms.state.AssertMutable() - ms.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(v) -} - -// DataPoints returns the DataPoints associated with this ExponentialHistogram. -func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice { - return newExponentialHistogramDataPointSlice(&ms.orig.DataPoints, ms.state) + ms.orig.AggregationTemporality = internal.AggregationTemporality(v) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExponentialHistogram) CopyTo(dest ExponentialHistogram) { dest.state.AssertMutable() - copyOrigExponentialHistogram(dest.orig, ms.orig) -} - -func copyOrigExponentialHistogram(dest, src *otlpmetrics.ExponentialHistogram) { - dest.AggregationTemporality = src.AggregationTemporality - dest.DataPoints = copyOrigExponentialHistogramDataPointSlice(dest.DataPoints, src.DataPoints) + internal.CopyExponentialHistogram(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapoint.go index 299d13f38ee..d21bb141025 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapoint.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapoint.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -23,11 +22,11 @@ import ( // Must use NewExponentialHistogramDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogramDataPoint struct { - orig *otlpmetrics.ExponentialHistogramDataPoint + orig *internal.ExponentialHistogramDataPoint state *internal.State } -func newExponentialHistogramDataPoint(orig *otlpmetrics.ExponentialHistogramDataPoint, state *internal.State) ExponentialHistogramDataPoint { +func newExponentialHistogramDataPoint(orig *internal.ExponentialHistogramDataPoint, state *internal.State) ExponentialHistogramDataPoint { return ExponentialHistogramDataPoint{orig: orig, state: state} } @@ -36,8 +35,7 @@ func newExponentialHistogramDataPoint(orig *otlpmetrics.ExponentialHistogramData // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExponentialHistogramDataPoint() ExponentialHistogramDataPoint { - state := internal.StateMutable - return newExponentialHistogramDataPoint(&otlpmetrics.ExponentialHistogramDataPoint{}, &state) + return newExponentialHistogramDataPoint(internal.NewExponentialHistogramDataPoint(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -49,13 +47,13 @@ func (ms ExponentialHistogramDataPoint) MoveTo(dest ExponentialHistogramDataPoin if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.ExponentialHistogramDataPoint{} + internal.DeleteExponentialHistogramDataPoint(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Attributes returns the Attributes associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this ExponentialHistogramDataPoint. @@ -91,6 +89,29 @@ func (ms ExponentialHistogramDataPoint) SetCount(v uint64) { ms.orig.Count = v } +// Sum returns the sum associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) Sum() float64 { + return ms.orig.Sum +} + +// HasSum returns true if the ExponentialHistogramDataPoint contains a +// Sum value otherwise. +func (ms ExponentialHistogramDataPoint) HasSum() bool { + return ms.orig.HasSum() +} + +// SetSum replaces the sum associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) SetSum(v float64) { + ms.state.AssertMutable() + ms.orig.SetSum(v) +} + +// RemoveSum removes the sum associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) RemoveSum() { + ms.state.AssertMutable() + ms.orig.RemoveSum() +} + // Scale returns the scale associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Scale() int32 { return ms.orig.Scale @@ -123,11 +144,6 @@ func (ms ExponentialHistogramDataPoint) Negative() ExponentialHistogramDataPoint return newExponentialHistogramDataPointBuckets(&ms.orig.Negative, ms.state) } -// Exemplars returns the Exemplars associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice { - return newExemplarSlice(&ms.orig.Exemplars, ms.state) -} - // Flags returns the flags associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Flags() DataPointFlags { return DataPointFlags(ms.orig.Flags) @@ -139,73 +155,55 @@ func (ms ExponentialHistogramDataPoint) SetFlags(v DataPointFlags) { ms.orig.Flags = uint32(v) } -// Sum returns the sum associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) Sum() float64 { - return ms.orig.GetSum() -} - -// HasSum returns true if the ExponentialHistogramDataPoint contains a -// Sum value, false otherwise. -func (ms ExponentialHistogramDataPoint) HasSum() bool { - return ms.orig.Sum_ != nil -} - -// SetSum replaces the sum associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) SetSum(v float64) { - ms.state.AssertMutable() - ms.orig.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{Sum: v} -} - -// RemoveSum removes the sum associated with this ExponentialHistogramDataPoint. -func (ms ExponentialHistogramDataPoint) RemoveSum() { - ms.state.AssertMutable() - ms.orig.Sum_ = nil +// Exemplars returns the Exemplars associated with this ExponentialHistogramDataPoint. +func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice { + return newExemplarSlice(&ms.orig.Exemplars, ms.state) } // Min returns the min associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Min() float64 { - return ms.orig.GetMin() + return ms.orig.Min } // HasMin returns true if the ExponentialHistogramDataPoint contains a -// Min value, false otherwise. +// Min value otherwise. func (ms ExponentialHistogramDataPoint) HasMin() bool { - return ms.orig.Min_ != nil + return ms.orig.HasMin() } // SetMin replaces the min associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetMin(v float64) { ms.state.AssertMutable() - ms.orig.Min_ = &otlpmetrics.ExponentialHistogramDataPoint_Min{Min: v} + ms.orig.SetMin(v) } // RemoveMin removes the min associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) RemoveMin() { ms.state.AssertMutable() - ms.orig.Min_ = nil + ms.orig.RemoveMin() } // Max returns the max associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) Max() float64 { - return ms.orig.GetMax() + return ms.orig.Max } // HasMax returns true if the ExponentialHistogramDataPoint contains a -// Max value, false otherwise. +// Max value otherwise. func (ms ExponentialHistogramDataPoint) HasMax() bool { - return ms.orig.Max_ != nil + return ms.orig.HasMax() } // SetMax replaces the max associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) SetMax(v float64) { ms.state.AssertMutable() - ms.orig.Max_ = &otlpmetrics.ExponentialHistogramDataPoint_Max{Max: v} + ms.orig.SetMax(v) } // RemoveMax removes the max associated with this ExponentialHistogramDataPoint. func (ms ExponentialHistogramDataPoint) RemoveMax() { ms.state.AssertMutable() - ms.orig.Max_ = nil + ms.orig.RemoveMax() } // ZeroThreshold returns the zerothreshold associated with this ExponentialHistogramDataPoint. @@ -222,34 +220,5 @@ func (ms ExponentialHistogramDataPoint) SetZeroThreshold(v float64) { // CopyTo copies all properties from the current struct overriding the destination. func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint) { dest.state.AssertMutable() - copyOrigExponentialHistogramDataPoint(dest.orig, ms.orig) -} - -func copyOrigExponentialHistogramDataPoint(dest, src *otlpmetrics.ExponentialHistogramDataPoint) { - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.StartTimeUnixNano = src.StartTimeUnixNano - dest.TimeUnixNano = src.TimeUnixNano - dest.Count = src.Count - dest.Scale = src.Scale - dest.ZeroCount = src.ZeroCount - copyOrigExponentialHistogramDataPointBuckets(&dest.Positive, &src.Positive) - copyOrigExponentialHistogramDataPointBuckets(&dest.Negative, &src.Negative) - dest.Exemplars = copyOrigExemplarSlice(dest.Exemplars, src.Exemplars) - dest.Flags = src.Flags - if src.Sum_ == nil { - dest.Sum_ = nil - } else { - dest.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{Sum: src.GetSum()} - } - if src.Min_ == nil { - dest.Min_ = nil - } else { - dest.Min_ = &otlpmetrics.ExponentialHistogramDataPoint_Min{Min: src.GetMin()} - } - if src.Max_ == nil { - dest.Max_ = nil - } else { - dest.Max_ = &otlpmetrics.ExponentialHistogramDataPoint_Max{Max: src.GetMax()} - } - dest.ZeroThreshold = src.ZeroThreshold + internal.CopyExponentialHistogramDataPoint(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go index b4d0666ae54..5864cd1a3d8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointbuckets.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewExponentialHistogramDataPointBuckets function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogramDataPointBuckets struct { - orig *otlpmetrics.ExponentialHistogramDataPoint_Buckets + orig *internal.ExponentialHistogramDataPointBuckets state *internal.State } -func newExponentialHistogramDataPointBuckets(orig *otlpmetrics.ExponentialHistogramDataPoint_Buckets, state *internal.State) ExponentialHistogramDataPointBuckets { +func newExponentialHistogramDataPointBuckets(orig *internal.ExponentialHistogramDataPointBuckets, state *internal.State) ExponentialHistogramDataPointBuckets { return ExponentialHistogramDataPointBuckets{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newExponentialHistogramDataPointBuckets(orig *otlpmetrics.ExponentialHistog // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExponentialHistogramDataPointBuckets() ExponentialHistogramDataPointBuckets { - state := internal.StateMutable - return newExponentialHistogramDataPointBuckets(&otlpmetrics.ExponentialHistogramDataPoint_Buckets{}, &state) + return newExponentialHistogramDataPointBuckets(internal.NewExponentialHistogramDataPointBuckets(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,8 +44,8 @@ func (ms ExponentialHistogramDataPointBuckets) MoveTo(dest ExponentialHistogramD if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.ExponentialHistogramDataPoint_Buckets{} + internal.DeleteExponentialHistogramDataPointBuckets(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Offset returns the offset associated with this ExponentialHistogramDataPointBuckets. @@ -61,18 +59,13 @@ func (ms ExponentialHistogramDataPointBuckets) SetOffset(v int32) { ms.orig.Offset = v } -// BucketCounts returns the bucketcounts associated with this ExponentialHistogramDataPointBuckets. +// BucketCounts returns the BucketCounts associated with this ExponentialHistogramDataPointBuckets. func (ms ExponentialHistogramDataPointBuckets) BucketCounts() pcommon.UInt64Slice { - return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.BucketCounts, ms.state)) + return pcommon.UInt64Slice(internal.NewUInt64SliceWrapper(&ms.orig.BucketCounts, ms.state)) } // CopyTo copies all properties from the current struct overriding the destination. func (ms ExponentialHistogramDataPointBuckets) CopyTo(dest ExponentialHistogramDataPointBuckets) { dest.state.AssertMutable() - copyOrigExponentialHistogramDataPointBuckets(dest.orig, ms.orig) -} - -func copyOrigExponentialHistogramDataPointBuckets(dest, src *otlpmetrics.ExponentialHistogramDataPoint_Buckets) { - dest.Offset = src.Offset - dest.BucketCounts = internal.CopyOrigUInt64Slice(dest.BucketCounts, src.BucketCounts) + internal.CopyExponentialHistogramDataPointBuckets(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointslice.go index 41c194d7729..c672d5cedaa 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_exponentialhistogramdatapointslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // ExponentialHistogramDataPointSlice logically represents a slice of ExponentialHistogramDataPoint. @@ -22,20 +21,19 @@ import ( // Must use NewExponentialHistogramDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ExponentialHistogramDataPointSlice struct { - orig *[]*otlpmetrics.ExponentialHistogramDataPoint + orig *[]*internal.ExponentialHistogramDataPoint state *internal.State } -func newExponentialHistogramDataPointSlice(orig *[]*otlpmetrics.ExponentialHistogramDataPoint, state *internal.State) ExponentialHistogramDataPointSlice { +func newExponentialHistogramDataPointSlice(orig *[]*internal.ExponentialHistogramDataPoint, state *internal.State) ExponentialHistogramDataPointSlice { return ExponentialHistogramDataPointSlice{orig: orig, state: state} } -// NewExponentialHistogramDataPointSlice creates a ExponentialHistogramDataPointSlice with 0 elements. +// NewExponentialHistogramDataPointSlice creates a ExponentialHistogramDataPointSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewExponentialHistogramDataPointSlice() ExponentialHistogramDataPointSlice { - orig := []*otlpmetrics.ExponentialHistogramDataPoint(nil) - state := internal.StateMutable - return newExponentialHistogramDataPointSlice(&orig, &state) + orig := []*internal.ExponentialHistogramDataPoint(nil) + return newExponentialHistogramDataPointSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.ExponentialHistogramDataPoint, len(*es.orig), newCap) + newOrig := make([]*internal.ExponentialHistogramDataPoint, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int) { // It returns the newly added ExponentialHistogramDataPoint. func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramDataPoint { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.ExponentialHistogramDataPoint{}) + *es.orig = append(*es.orig, internal.NewExponentialHistogramDataPoint()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogra newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteExponentialHistogramDataPoint((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogra continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogra // CopyTo copies all elements from the current slice overriding the destination. func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDataPointSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigExponentialHistogramDataPointSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyExponentialHistogramDataPointPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ExponentialHistogramDataPoint elements within ExponentialHistogramDataPointSlice given the @@ -155,18 +161,3 @@ func (es ExponentialHistogramDataPointSlice) Sort(less func(a, b ExponentialHist es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigExponentialHistogramDataPointSlice(dest, src []*otlpmetrics.ExponentialHistogramDataPoint) []*otlpmetrics.ExponentialHistogramDataPoint { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.ExponentialHistogramDataPoint, len(src)) - data := make([]otlpmetrics.ExponentialHistogramDataPoint, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigExponentialHistogramDataPoint(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_gauge.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_gauge.go index 46ca09fd1b0..c05f403a6bc 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_gauge.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_gauge.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // Gauge represents the type of a numeric metric that always exports the "current value" for every data point. @@ -19,11 +18,11 @@ import ( // Must use NewGauge function to create new instances. // Important: zero-initialized instance is not valid for use. type Gauge struct { - orig *otlpmetrics.Gauge + orig *internal.Gauge state *internal.State } -func newGauge(orig *otlpmetrics.Gauge, state *internal.State) Gauge { +func newGauge(orig *internal.Gauge, state *internal.State) Gauge { return Gauge{orig: orig, state: state} } @@ -32,8 +31,7 @@ func newGauge(orig *otlpmetrics.Gauge, state *internal.State) Gauge { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewGauge() Gauge { - state := internal.StateMutable - return newGauge(&otlpmetrics.Gauge{}, &state) + return newGauge(internal.NewGauge(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -45,8 +43,8 @@ func (ms Gauge) MoveTo(dest Gauge) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.Gauge{} + internal.DeleteGauge(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // DataPoints returns the DataPoints associated with this Gauge. @@ -57,9 +55,5 @@ func (ms Gauge) DataPoints() NumberDataPointSlice { // CopyTo copies all properties from the current struct overriding the destination. func (ms Gauge) CopyTo(dest Gauge) { dest.state.AssertMutable() - copyOrigGauge(dest.orig, ms.orig) -} - -func copyOrigGauge(dest, src *otlpmetrics.Gauge) { - dest.DataPoints = copyOrigNumberDataPointSlice(dest.DataPoints, src.DataPoints) + internal.CopyGauge(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogram.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogram.go index 8926bf69837..924cd4f1d70 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogram.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogram.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval. @@ -19,11 +18,11 @@ import ( // Must use NewHistogram function to create new instances. // Important: zero-initialized instance is not valid for use. type Histogram struct { - orig *otlpmetrics.Histogram + orig *internal.Histogram state *internal.State } -func newHistogram(orig *otlpmetrics.Histogram, state *internal.State) Histogram { +func newHistogram(orig *internal.Histogram, state *internal.State) Histogram { return Histogram{orig: orig, state: state} } @@ -32,8 +31,7 @@ func newHistogram(orig *otlpmetrics.Histogram, state *internal.State) Histogram // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewHistogram() Histogram { - state := internal.StateMutable - return newHistogram(&otlpmetrics.Histogram{}, &state) + return newHistogram(internal.NewHistogram(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -45,8 +43,13 @@ func (ms Histogram) MoveTo(dest Histogram) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.Histogram{} + internal.DeleteHistogram(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig +} + +// DataPoints returns the DataPoints associated with this Histogram. +func (ms Histogram) DataPoints() HistogramDataPointSlice { + return newHistogramDataPointSlice(&ms.orig.DataPoints, ms.state) } // AggregationTemporality returns the aggregationtemporality associated with this Histogram. @@ -57,21 +60,11 @@ func (ms Histogram) AggregationTemporality() AggregationTemporality { // SetAggregationTemporality replaces the aggregationtemporality associated with this Histogram. func (ms Histogram) SetAggregationTemporality(v AggregationTemporality) { ms.state.AssertMutable() - ms.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(v) -} - -// DataPoints returns the DataPoints associated with this Histogram. -func (ms Histogram) DataPoints() HistogramDataPointSlice { - return newHistogramDataPointSlice(&ms.orig.DataPoints, ms.state) + ms.orig.AggregationTemporality = internal.AggregationTemporality(v) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Histogram) CopyTo(dest Histogram) { dest.state.AssertMutable() - copyOrigHistogram(dest.orig, ms.orig) -} - -func copyOrigHistogram(dest, src *otlpmetrics.Histogram) { - dest.AggregationTemporality = src.AggregationTemporality - dest.DataPoints = copyOrigHistogramDataPointSlice(dest.DataPoints, src.DataPoints) + internal.CopyHistogram(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapoint.go index 0f864d2e49e..8426506ec66 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapoint.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapoint.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewHistogramDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type HistogramDataPoint struct { - orig *otlpmetrics.HistogramDataPoint + orig *internal.HistogramDataPoint state *internal.State } -func newHistogramDataPoint(orig *otlpmetrics.HistogramDataPoint, state *internal.State) HistogramDataPoint { +func newHistogramDataPoint(orig *internal.HistogramDataPoint, state *internal.State) HistogramDataPoint { return HistogramDataPoint{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newHistogramDataPoint(orig *otlpmetrics.HistogramDataPoint, state *internal // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewHistogramDataPoint() HistogramDataPoint { - state := internal.StateMutable - return newHistogramDataPoint(&otlpmetrics.HistogramDataPoint{}, &state) + return newHistogramDataPoint(internal.NewHistogramDataPoint(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,13 @@ func (ms HistogramDataPoint) MoveTo(dest HistogramDataPoint) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.HistogramDataPoint{} + internal.DeleteHistogramDataPoint(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Attributes returns the Attributes associated with this HistogramDataPoint. func (ms HistogramDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this HistogramDataPoint. @@ -88,14 +86,37 @@ func (ms HistogramDataPoint) SetCount(v uint64) { ms.orig.Count = v } -// BucketCounts returns the bucketcounts associated with this HistogramDataPoint. +// Sum returns the sum associated with this HistogramDataPoint. +func (ms HistogramDataPoint) Sum() float64 { + return ms.orig.Sum +} + +// HasSum returns true if the HistogramDataPoint contains a +// Sum value otherwise. +func (ms HistogramDataPoint) HasSum() bool { + return ms.orig.HasSum() +} + +// SetSum replaces the sum associated with this HistogramDataPoint. +func (ms HistogramDataPoint) SetSum(v float64) { + ms.state.AssertMutable() + ms.orig.SetSum(v) +} + +// RemoveSum removes the sum associated with this HistogramDataPoint. +func (ms HistogramDataPoint) RemoveSum() { + ms.state.AssertMutable() + ms.orig.RemoveSum() +} + +// BucketCounts returns the BucketCounts associated with this HistogramDataPoint. func (ms HistogramDataPoint) BucketCounts() pcommon.UInt64Slice { - return pcommon.UInt64Slice(internal.NewUInt64Slice(&ms.orig.BucketCounts, ms.state)) + return pcommon.UInt64Slice(internal.NewUInt64SliceWrapper(&ms.orig.BucketCounts, ms.state)) } -// ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint. +// ExplicitBounds returns the ExplicitBounds associated with this HistogramDataPoint. func (ms HistogramDataPoint) ExplicitBounds() pcommon.Float64Slice { - return pcommon.Float64Slice(internal.NewFloat64Slice(&ms.orig.ExplicitBounds, ms.state)) + return pcommon.Float64Slice(internal.NewFloat64SliceWrapper(&ms.orig.ExplicitBounds, ms.state)) } // Exemplars returns the Exemplars associated with this HistogramDataPoint. @@ -114,103 +135,54 @@ func (ms HistogramDataPoint) SetFlags(v DataPointFlags) { ms.orig.Flags = uint32(v) } -// Sum returns the sum associated with this HistogramDataPoint. -func (ms HistogramDataPoint) Sum() float64 { - return ms.orig.GetSum() -} - -// HasSum returns true if the HistogramDataPoint contains a -// Sum value, false otherwise. -func (ms HistogramDataPoint) HasSum() bool { - return ms.orig.Sum_ != nil -} - -// SetSum replaces the sum associated with this HistogramDataPoint. -func (ms HistogramDataPoint) SetSum(v float64) { - ms.state.AssertMutable() - ms.orig.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: v} -} - -// RemoveSum removes the sum associated with this HistogramDataPoint. -func (ms HistogramDataPoint) RemoveSum() { - ms.state.AssertMutable() - ms.orig.Sum_ = nil -} - // Min returns the min associated with this HistogramDataPoint. func (ms HistogramDataPoint) Min() float64 { - return ms.orig.GetMin() + return ms.orig.Min } // HasMin returns true if the HistogramDataPoint contains a -// Min value, false otherwise. +// Min value otherwise. func (ms HistogramDataPoint) HasMin() bool { - return ms.orig.Min_ != nil + return ms.orig.HasMin() } // SetMin replaces the min associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetMin(v float64) { ms.state.AssertMutable() - ms.orig.Min_ = &otlpmetrics.HistogramDataPoint_Min{Min: v} + ms.orig.SetMin(v) } // RemoveMin removes the min associated with this HistogramDataPoint. func (ms HistogramDataPoint) RemoveMin() { ms.state.AssertMutable() - ms.orig.Min_ = nil + ms.orig.RemoveMin() } // Max returns the max associated with this HistogramDataPoint. func (ms HistogramDataPoint) Max() float64 { - return ms.orig.GetMax() + return ms.orig.Max } // HasMax returns true if the HistogramDataPoint contains a -// Max value, false otherwise. +// Max value otherwise. func (ms HistogramDataPoint) HasMax() bool { - return ms.orig.Max_ != nil + return ms.orig.HasMax() } // SetMax replaces the max associated with this HistogramDataPoint. func (ms HistogramDataPoint) SetMax(v float64) { ms.state.AssertMutable() - ms.orig.Max_ = &otlpmetrics.HistogramDataPoint_Max{Max: v} + ms.orig.SetMax(v) } // RemoveMax removes the max associated with this HistogramDataPoint. func (ms HistogramDataPoint) RemoveMax() { ms.state.AssertMutable() - ms.orig.Max_ = nil + ms.orig.RemoveMax() } // CopyTo copies all properties from the current struct overriding the destination. func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint) { dest.state.AssertMutable() - copyOrigHistogramDataPoint(dest.orig, ms.orig) -} - -func copyOrigHistogramDataPoint(dest, src *otlpmetrics.HistogramDataPoint) { - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.StartTimeUnixNano = src.StartTimeUnixNano - dest.TimeUnixNano = src.TimeUnixNano - dest.Count = src.Count - dest.BucketCounts = internal.CopyOrigUInt64Slice(dest.BucketCounts, src.BucketCounts) - dest.ExplicitBounds = internal.CopyOrigFloat64Slice(dest.ExplicitBounds, src.ExplicitBounds) - dest.Exemplars = copyOrigExemplarSlice(dest.Exemplars, src.Exemplars) - dest.Flags = src.Flags - if src.Sum_ == nil { - dest.Sum_ = nil - } else { - dest.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: src.GetSum()} - } - if src.Min_ == nil { - dest.Min_ = nil - } else { - dest.Min_ = &otlpmetrics.HistogramDataPoint_Min{Min: src.GetMin()} - } - if src.Max_ == nil { - dest.Max_ = nil - } else { - dest.Max_ = &otlpmetrics.HistogramDataPoint_Max{Max: src.GetMax()} - } + internal.CopyHistogramDataPoint(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapointslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapointslice.go index 0268cc4a35e..296c372b433 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapointslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_histogramdatapointslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // HistogramDataPointSlice logically represents a slice of HistogramDataPoint. @@ -22,20 +21,19 @@ import ( // Must use NewHistogramDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type HistogramDataPointSlice struct { - orig *[]*otlpmetrics.HistogramDataPoint + orig *[]*internal.HistogramDataPoint state *internal.State } -func newHistogramDataPointSlice(orig *[]*otlpmetrics.HistogramDataPoint, state *internal.State) HistogramDataPointSlice { +func newHistogramDataPointSlice(orig *[]*internal.HistogramDataPoint, state *internal.State) HistogramDataPointSlice { return HistogramDataPointSlice{orig: orig, state: state} } -// NewHistogramDataPointSlice creates a HistogramDataPointSlice with 0 elements. +// NewHistogramDataPointSlice creates a HistogramDataPointSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewHistogramDataPointSlice() HistogramDataPointSlice { - orig := []*otlpmetrics.HistogramDataPoint(nil) - state := internal.StateMutable - return newHistogramDataPointSlice(&orig, &state) + orig := []*internal.HistogramDataPoint(nil) + return newHistogramDataPointSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es HistogramDataPointSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.HistogramDataPoint, len(*es.orig), newCap) + newOrig := make([]*internal.HistogramDataPoint, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es HistogramDataPointSlice) EnsureCapacity(newCap int) { // It returns the newly added HistogramDataPoint. func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.HistogramDataPoint{}) + *es.orig = append(*es.orig, internal.NewHistogramDataPoint()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteHistogramDataPoint((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigHistogramDataPointSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyHistogramDataPointPtrSlice(*dest.orig, *es.orig) } // Sort sorts the HistogramDataPoint elements within HistogramDataPointSlice given the @@ -155,18 +161,3 @@ func (es HistogramDataPointSlice) Sort(less func(a, b HistogramDataPoint) bool) es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigHistogramDataPointSlice(dest, src []*otlpmetrics.HistogramDataPoint) []*otlpmetrics.HistogramDataPoint { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.HistogramDataPoint, len(src)) - data := make([]otlpmetrics.HistogramDataPoint, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigHistogramDataPoint(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metric.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metric.go index 70b282a46da..792d38da8fd 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metric.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metric.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,11 +20,11 @@ import ( // Must use NewMetric function to create new instances. // Important: zero-initialized instance is not valid for use. type Metric struct { - orig *otlpmetrics.Metric + orig *internal.Metric state *internal.State } -func newMetric(orig *otlpmetrics.Metric, state *internal.State) Metric { +func newMetric(orig *internal.Metric, state *internal.State) Metric { return Metric{orig: orig, state: state} } @@ -34,8 +33,7 @@ func newMetric(orig *otlpmetrics.Metric, state *internal.State) Metric { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewMetric() Metric { - state := internal.StateMutable - return newMetric(&otlpmetrics.Metric{}, &state) + return newMetric(internal.NewMetric(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -47,8 +45,8 @@ func (ms Metric) MoveTo(dest Metric) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.Metric{} + internal.DeleteMetric(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Name returns the name associated with this Metric. @@ -84,24 +82,19 @@ func (ms Metric) SetUnit(v string) { ms.orig.Unit = v } -// Metadata returns the Metadata associated with this Metric. -func (ms Metric) Metadata() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Metadata, ms.state)) -} - // Type returns the type of the data for this Metric. // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) Type() MetricType { switch ms.orig.Data.(type) { - case *otlpmetrics.Metric_Gauge: + case *internal.Metric_Gauge: return MetricTypeGauge - case *otlpmetrics.Metric_Sum: + case *internal.Metric_Sum: return MetricTypeSum - case *otlpmetrics.Metric_Histogram: + case *internal.Metric_Histogram: return MetricTypeHistogram - case *otlpmetrics.Metric_ExponentialHistogram: + case *internal.Metric_ExponentialHistogram: return MetricTypeExponentialHistogram - case *otlpmetrics.Metric_Summary: + case *internal.Metric_Summary: return MetricTypeSummary } return MetricTypeEmpty @@ -114,7 +107,7 @@ func (ms Metric) Type() MetricType { // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) Gauge() Gauge { - v, ok := ms.orig.GetData().(*otlpmetrics.Metric_Gauge) + v, ok := ms.orig.GetData().(*internal.Metric_Gauge) if !ok { return Gauge{} } @@ -128,19 +121,22 @@ func (ms Metric) Gauge() Gauge { // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptyGauge() Gauge { ms.state.AssertMutable() - val := &otlpmetrics.Gauge{} - ms.orig.Data = &otlpmetrics.Metric_Gauge{Gauge: val} - return newGauge(val, ms.state) -} - -// Sum returns the sum associated with this Metric. -// + var ov *internal.Metric_Gauge + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Metric_Gauge{} + } else { + ov = internal.ProtoPoolMetric_Gauge.Get().(*internal.Metric_Gauge) + } + ov.Gauge = internal.NewGauge() + ms.orig.Data = ov + return newGauge(ov.Gauge, ms.state) +} // Sum returns the sum associated with this Metric. // Calling this function when Type() != MetricTypeSum returns an invalid // zero-initialized instance of Sum. Note that using such Sum instance can cause panic. // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) Sum() Sum { - v, ok := ms.orig.GetData().(*otlpmetrics.Metric_Sum) + v, ok := ms.orig.GetData().(*internal.Metric_Sum) if !ok { return Sum{} } @@ -154,19 +150,22 @@ func (ms Metric) Sum() Sum { // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptySum() Sum { ms.state.AssertMutable() - val := &otlpmetrics.Sum{} - ms.orig.Data = &otlpmetrics.Metric_Sum{Sum: val} - return newSum(val, ms.state) -} - -// Histogram returns the histogram associated with this Metric. -// + var ov *internal.Metric_Sum + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Metric_Sum{} + } else { + ov = internal.ProtoPoolMetric_Sum.Get().(*internal.Metric_Sum) + } + ov.Sum = internal.NewSum() + ms.orig.Data = ov + return newSum(ov.Sum, ms.state) +} // Histogram returns the histogram associated with this Metric. // Calling this function when Type() != MetricTypeHistogram returns an invalid // zero-initialized instance of Histogram. Note that using such Histogram instance can cause panic. // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) Histogram() Histogram { - v, ok := ms.orig.GetData().(*otlpmetrics.Metric_Histogram) + v, ok := ms.orig.GetData().(*internal.Metric_Histogram) if !ok { return Histogram{} } @@ -180,19 +179,22 @@ func (ms Metric) Histogram() Histogram { // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptyHistogram() Histogram { ms.state.AssertMutable() - val := &otlpmetrics.Histogram{} - ms.orig.Data = &otlpmetrics.Metric_Histogram{Histogram: val} - return newHistogram(val, ms.state) -} - -// ExponentialHistogram returns the exponentialhistogram associated with this Metric. -// + var ov *internal.Metric_Histogram + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Metric_Histogram{} + } else { + ov = internal.ProtoPoolMetric_Histogram.Get().(*internal.Metric_Histogram) + } + ov.Histogram = internal.NewHistogram() + ms.orig.Data = ov + return newHistogram(ov.Histogram, ms.state) +} // ExponentialHistogram returns the exponentialhistogram associated with this Metric. // Calling this function when Type() != MetricTypeExponentialHistogram returns an invalid // zero-initialized instance of ExponentialHistogram. Note that using such ExponentialHistogram instance can cause panic. // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) ExponentialHistogram() ExponentialHistogram { - v, ok := ms.orig.GetData().(*otlpmetrics.Metric_ExponentialHistogram) + v, ok := ms.orig.GetData().(*internal.Metric_ExponentialHistogram) if !ok { return ExponentialHistogram{} } @@ -206,19 +208,22 @@ func (ms Metric) ExponentialHistogram() ExponentialHistogram { // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptyExponentialHistogram() ExponentialHistogram { ms.state.AssertMutable() - val := &otlpmetrics.ExponentialHistogram{} - ms.orig.Data = &otlpmetrics.Metric_ExponentialHistogram{ExponentialHistogram: val} - return newExponentialHistogram(val, ms.state) -} - -// Summary returns the summary associated with this Metric. -// + var ov *internal.Metric_ExponentialHistogram + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Metric_ExponentialHistogram{} + } else { + ov = internal.ProtoPoolMetric_ExponentialHistogram.Get().(*internal.Metric_ExponentialHistogram) + } + ov.ExponentialHistogram = internal.NewExponentialHistogram() + ms.orig.Data = ov + return newExponentialHistogram(ov.ExponentialHistogram, ms.state) +} // Summary returns the summary associated with this Metric. // Calling this function when Type() != MetricTypeSummary returns an invalid // zero-initialized instance of Summary. Note that using such Summary instance can cause panic. // // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) Summary() Summary { - v, ok := ms.orig.GetData().(*otlpmetrics.Metric_Summary) + v, ok := ms.orig.GetData().(*internal.Metric_Summary) if !ok { return Summary{} } @@ -232,52 +237,24 @@ func (ms Metric) Summary() Summary { // Calling this function on zero-initialized Metric will cause a panic. func (ms Metric) SetEmptySummary() Summary { ms.state.AssertMutable() - val := &otlpmetrics.Summary{} - ms.orig.Data = &otlpmetrics.Metric_Summary{Summary: val} - return newSummary(val, ms.state) + var ov *internal.Metric_Summary + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.Metric_Summary{} + } else { + ov = internal.ProtoPoolMetric_Summary.Get().(*internal.Metric_Summary) + } + ov.Summary = internal.NewSummary() + ms.orig.Data = ov + return newSummary(ov.Summary, ms.state) +} + +// Metadata returns the Metadata associated with this Metric. +func (ms Metric) Metadata() pcommon.Map { + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Metadata, ms.state)) } // CopyTo copies all properties from the current struct overriding the destination. func (ms Metric) CopyTo(dest Metric) { dest.state.AssertMutable() - copyOrigMetric(dest.orig, ms.orig) -} - -func copyOrigMetric(dest, src *otlpmetrics.Metric) { - dest.Name = src.Name - dest.Description = src.Description - dest.Unit = src.Unit - dest.Metadata = internal.CopyOrigMap(dest.Metadata, src.Metadata) - switch t := src.Data.(type) { - case *otlpmetrics.Metric_Gauge: - gauge := &otlpmetrics.Gauge{} - copyOrigGauge(gauge, t.Gauge) - dest.Data = &otlpmetrics.Metric_Gauge{ - Gauge: gauge, - } - case *otlpmetrics.Metric_Sum: - sum := &otlpmetrics.Sum{} - copyOrigSum(sum, t.Sum) - dest.Data = &otlpmetrics.Metric_Sum{ - Sum: sum, - } - case *otlpmetrics.Metric_Histogram: - histogram := &otlpmetrics.Histogram{} - copyOrigHistogram(histogram, t.Histogram) - dest.Data = &otlpmetrics.Metric_Histogram{ - Histogram: histogram, - } - case *otlpmetrics.Metric_ExponentialHistogram: - exponentialhistogram := &otlpmetrics.ExponentialHistogram{} - copyOrigExponentialHistogram(exponentialhistogram, t.ExponentialHistogram) - dest.Data = &otlpmetrics.Metric_ExponentialHistogram{ - ExponentialHistogram: exponentialhistogram, - } - case *otlpmetrics.Metric_Summary: - summary := &otlpmetrics.Summary{} - copyOrigSummary(summary, t.Summary) - dest.Data = &otlpmetrics.Metric_Summary{ - Summary: summary, - } - } + internal.CopyMetric(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metrics.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metrics.go new file mode 100644 index 00000000000..9d873d5ee0b --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metrics.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pmetric + +import ( + "go.opentelemetry.io/collector/pdata/internal" +) + +// Metrics is the top-level struct that is propagated through the metrics pipeline. +// Use NewMetrics to create new instance, zero-initialized instance is not valid for use. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewMetrics function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Metrics internal.MetricsWrapper + +func newMetrics(orig *internal.ExportMetricsServiceRequest, state *internal.State) Metrics { + return Metrics(internal.NewMetricsWrapper(orig, state)) +} + +// NewMetrics creates a new empty Metrics. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewMetrics() Metrics { + return newMetrics(internal.NewExportMetricsServiceRequest(), internal.NewState()) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Metrics) MoveTo(dest Metrics) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() + // If they point to the same data, they are the same, nothing to do. + if ms.getOrig() == dest.getOrig() { + return + } + internal.DeleteExportMetricsServiceRequest(dest.getOrig(), false) + *dest.getOrig(), *ms.getOrig() = *ms.getOrig(), *dest.getOrig() +} + +// ResourceMetrics returns the ResourceMetrics associated with this Metrics. +func (ms Metrics) ResourceMetrics() ResourceMetricsSlice { + return newResourceMetricsSlice(&ms.getOrig().ResourceMetrics, ms.getState()) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Metrics) CopyTo(dest Metrics) { + dest.getState().AssertMutable() + internal.CopyExportMetricsServiceRequest(dest.getOrig(), ms.getOrig()) +} + +func (ms Metrics) getOrig() *internal.ExportMetricsServiceRequest { + return internal.GetMetricsOrig(internal.MetricsWrapper(ms)) +} + +func (ms Metrics) getState() *internal.State { + return internal.GetMetricsState(internal.MetricsWrapper(ms)) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metricslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metricslice.go index f57ae001705..3c8d26481e8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metricslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_metricslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // MetricSlice logically represents a slice of Metric. @@ -22,20 +21,19 @@ import ( // Must use NewMetricSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type MetricSlice struct { - orig *[]*otlpmetrics.Metric + orig *[]*internal.Metric state *internal.State } -func newMetricSlice(orig *[]*otlpmetrics.Metric, state *internal.State) MetricSlice { +func newMetricSlice(orig *[]*internal.Metric, state *internal.State) MetricSlice { return MetricSlice{orig: orig, state: state} } -// NewMetricSlice creates a MetricSlice with 0 elements. +// NewMetricSlice creates a MetricSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewMetricSlice() MetricSlice { - orig := []*otlpmetrics.Metric(nil) - state := internal.StateMutable - return newMetricSlice(&orig, &state) + orig := []*internal.Metric(nil) + return newMetricSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es MetricSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.Metric, len(*es.orig), newCap) + newOrig := make([]*internal.Metric, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es MetricSlice) EnsureCapacity(newCap int) { // It returns the newly added Metric. func (es MetricSlice) AppendEmpty() Metric { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.Metric{}) + *es.orig = append(*es.orig, internal.NewMetric()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es MetricSlice) RemoveIf(f func(Metric) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteMetric((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es MetricSlice) RemoveIf(f func(Metric) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es MetricSlice) RemoveIf(f func(Metric) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es MetricSlice) CopyTo(dest MetricSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigMetricSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyMetricPtrSlice(*dest.orig, *es.orig) } // Sort sorts the Metric elements within MetricSlice given the @@ -155,18 +161,3 @@ func (es MetricSlice) Sort(less func(a, b Metric) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigMetricSlice(dest, src []*otlpmetrics.Metric) []*otlpmetrics.Metric { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.Metric, len(src)) - data := make([]otlpmetrics.Metric, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigMetric(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapoint.go index d1dbc66c452..8dc926bbef4 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapoint.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapoint.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewNumberDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type NumberDataPoint struct { - orig *otlpmetrics.NumberDataPoint + orig *internal.NumberDataPoint state *internal.State } -func newNumberDataPoint(orig *otlpmetrics.NumberDataPoint, state *internal.State) NumberDataPoint { +func newNumberDataPoint(orig *internal.NumberDataPoint, state *internal.State) NumberDataPoint { return NumberDataPoint{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newNumberDataPoint(orig *otlpmetrics.NumberDataPoint, state *internal.State // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewNumberDataPoint() NumberDataPoint { - state := internal.StateMutable - return newNumberDataPoint(&otlpmetrics.NumberDataPoint{}, &state) + return newNumberDataPoint(internal.NewNumberDataPoint(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,13 @@ func (ms NumberDataPoint) MoveTo(dest NumberDataPoint) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.NumberDataPoint{} + internal.DeleteNumberDataPoint(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Attributes returns the Attributes associated with this NumberDataPoint. func (ms NumberDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this NumberDataPoint. @@ -81,9 +79,9 @@ func (ms NumberDataPoint) SetTimestamp(v pcommon.Timestamp) { // Calling this function on zero-initialized NumberDataPoint will cause a panic. func (ms NumberDataPoint) ValueType() NumberDataPointValueType { switch ms.orig.Value.(type) { - case *otlpmetrics.NumberDataPoint_AsDouble: + case *internal.NumberDataPoint_AsDouble: return NumberDataPointValueTypeDouble - case *otlpmetrics.NumberDataPoint_AsInt: + case *internal.NumberDataPoint_AsInt: return NumberDataPointValueTypeInt } return NumberDataPointValueTypeEmpty @@ -97,12 +95,15 @@ func (ms NumberDataPoint) DoubleValue() float64 { // SetDoubleValue replaces the double associated with this NumberDataPoint. func (ms NumberDataPoint) SetDoubleValue(v float64) { ms.state.AssertMutable() - ms.orig.Value = &otlpmetrics.NumberDataPoint_AsDouble{ - AsDouble: v, + var ov *internal.NumberDataPoint_AsDouble + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.NumberDataPoint_AsDouble{} + } else { + ov = internal.ProtoPoolNumberDataPoint_AsDouble.Get().(*internal.NumberDataPoint_AsDouble) } -} - -// IntValue returns the int associated with this NumberDataPoint. + ov.AsDouble = v + ms.orig.Value = ov +} // IntValue returns the int associated with this NumberDataPoint. func (ms NumberDataPoint) IntValue() int64 { return ms.orig.GetAsInt() } @@ -110,9 +111,14 @@ func (ms NumberDataPoint) IntValue() int64 { // SetIntValue replaces the int associated with this NumberDataPoint. func (ms NumberDataPoint) SetIntValue(v int64) { ms.state.AssertMutable() - ms.orig.Value = &otlpmetrics.NumberDataPoint_AsInt{ - AsInt: v, + var ov *internal.NumberDataPoint_AsInt + if !internal.UseProtoPooling.IsEnabled() { + ov = &internal.NumberDataPoint_AsInt{} + } else { + ov = internal.ProtoPoolNumberDataPoint_AsInt.Get().(*internal.NumberDataPoint_AsInt) } + ov.AsInt = v + ms.orig.Value = ov } // Exemplars returns the Exemplars associated with this NumberDataPoint. @@ -134,19 +140,5 @@ func (ms NumberDataPoint) SetFlags(v DataPointFlags) { // CopyTo copies all properties from the current struct overriding the destination. func (ms NumberDataPoint) CopyTo(dest NumberDataPoint) { dest.state.AssertMutable() - copyOrigNumberDataPoint(dest.orig, ms.orig) -} - -func copyOrigNumberDataPoint(dest, src *otlpmetrics.NumberDataPoint) { - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.StartTimeUnixNano = src.StartTimeUnixNano - dest.TimeUnixNano = src.TimeUnixNano - switch t := src.Value.(type) { - case *otlpmetrics.NumberDataPoint_AsDouble: - dest.Value = &otlpmetrics.NumberDataPoint_AsDouble{AsDouble: t.AsDouble} - case *otlpmetrics.NumberDataPoint_AsInt: - dest.Value = &otlpmetrics.NumberDataPoint_AsInt{AsInt: t.AsInt} - } - dest.Exemplars = copyOrigExemplarSlice(dest.Exemplars, src.Exemplars) - dest.Flags = src.Flags + internal.CopyNumberDataPoint(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapointslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapointslice.go index ff7f0f9c958..0daafa7e7a4 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapointslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_numberdatapointslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // NumberDataPointSlice logically represents a slice of NumberDataPoint. @@ -22,20 +21,19 @@ import ( // Must use NewNumberDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type NumberDataPointSlice struct { - orig *[]*otlpmetrics.NumberDataPoint + orig *[]*internal.NumberDataPoint state *internal.State } -func newNumberDataPointSlice(orig *[]*otlpmetrics.NumberDataPoint, state *internal.State) NumberDataPointSlice { +func newNumberDataPointSlice(orig *[]*internal.NumberDataPoint, state *internal.State) NumberDataPointSlice { return NumberDataPointSlice{orig: orig, state: state} } -// NewNumberDataPointSlice creates a NumberDataPointSlice with 0 elements. +// NewNumberDataPointSlice creates a NumberDataPointSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewNumberDataPointSlice() NumberDataPointSlice { - orig := []*otlpmetrics.NumberDataPoint(nil) - state := internal.StateMutable - return newNumberDataPointSlice(&orig, &state) + orig := []*internal.NumberDataPoint(nil) + return newNumberDataPointSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es NumberDataPointSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.NumberDataPoint, len(*es.orig), newCap) + newOrig := make([]*internal.NumberDataPoint, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es NumberDataPointSlice) EnsureCapacity(newCap int) { // It returns the newly added NumberDataPoint. func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.NumberDataPoint{}) + *es.orig = append(*es.orig, internal.NewNumberDataPoint()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteNumberDataPoint((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigNumberDataPointSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyNumberDataPointPtrSlice(*dest.orig, *es.orig) } // Sort sorts the NumberDataPoint elements within NumberDataPointSlice given the @@ -155,18 +161,3 @@ func (es NumberDataPointSlice) Sort(less func(a, b NumberDataPoint) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigNumberDataPointSlice(dest, src []*otlpmetrics.NumberDataPoint) []*otlpmetrics.NumberDataPoint { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.NumberDataPoint, len(src)) - data := make([]otlpmetrics.NumberDataPoint, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigNumberDataPoint(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetrics.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetrics.go index 23803d13e2d..a7c3dbc061e 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetrics.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetrics.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewResourceMetrics function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceMetrics struct { - orig *otlpmetrics.ResourceMetrics + orig *internal.ResourceMetrics state *internal.State } -func newResourceMetrics(orig *otlpmetrics.ResourceMetrics, state *internal.State) ResourceMetrics { +func newResourceMetrics(orig *internal.ResourceMetrics, state *internal.State) ResourceMetrics { return ResourceMetrics{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newResourceMetrics(orig *otlpmetrics.ResourceMetrics, state *internal.State // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResourceMetrics() ResourceMetrics { - state := internal.StateMutable - return newResourceMetrics(&otlpmetrics.ResourceMetrics{}, &state) + return newResourceMetrics(internal.NewResourceMetrics(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,18 @@ func (ms ResourceMetrics) MoveTo(dest ResourceMetrics) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.ResourceMetrics{} + internal.DeleteResourceMetrics(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Resource returns the resource associated with this ResourceMetrics. func (ms ResourceMetrics) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) + return pcommon.Resource(internal.NewResourceWrapper(&ms.orig.Resource, ms.state)) +} + +// ScopeMetrics returns the ScopeMetrics associated with this ResourceMetrics. +func (ms ResourceMetrics) ScopeMetrics() ScopeMetricsSlice { + return newScopeMetricsSlice(&ms.orig.ScopeMetrics, ms.state) } // SchemaUrl returns the schemaurl associated with this ResourceMetrics. @@ -66,19 +69,8 @@ func (ms ResourceMetrics) SetSchemaUrl(v string) { ms.orig.SchemaUrl = v } -// ScopeMetrics returns the ScopeMetrics associated with this ResourceMetrics. -func (ms ResourceMetrics) ScopeMetrics() ScopeMetricsSlice { - return newScopeMetricsSlice(&ms.orig.ScopeMetrics, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms ResourceMetrics) CopyTo(dest ResourceMetrics) { dest.state.AssertMutable() - copyOrigResourceMetrics(dest.orig, ms.orig) -} - -func copyOrigResourceMetrics(dest, src *otlpmetrics.ResourceMetrics) { - internal.CopyOrigResource(&dest.Resource, &src.Resource) - dest.SchemaUrl = src.SchemaUrl - dest.ScopeMetrics = copyOrigScopeMetricsSlice(dest.ScopeMetrics, src.ScopeMetrics) + internal.CopyResourceMetrics(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetricsslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetricsslice.go index b46d0c3e279..d434ad3d24e 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetricsslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_resourcemetricsslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // ResourceMetricsSlice logically represents a slice of ResourceMetrics. @@ -22,20 +21,19 @@ import ( // Must use NewResourceMetricsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceMetricsSlice struct { - orig *[]*otlpmetrics.ResourceMetrics + orig *[]*internal.ResourceMetrics state *internal.State } -func newResourceMetricsSlice(orig *[]*otlpmetrics.ResourceMetrics, state *internal.State) ResourceMetricsSlice { +func newResourceMetricsSlice(orig *[]*internal.ResourceMetrics, state *internal.State) ResourceMetricsSlice { return ResourceMetricsSlice{orig: orig, state: state} } -// NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. +// NewResourceMetricsSlice creates a ResourceMetricsSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewResourceMetricsSlice() ResourceMetricsSlice { - orig := []*otlpmetrics.ResourceMetrics(nil) - state := internal.StateMutable - return newResourceMetricsSlice(&orig, &state) + orig := []*internal.ResourceMetrics(nil) + return newResourceMetricsSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ResourceMetricsSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.ResourceMetrics, len(*es.orig), newCap) + newOrig := make([]*internal.ResourceMetrics, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ResourceMetricsSlice) EnsureCapacity(newCap int) { // It returns the newly added ResourceMetrics. func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.ResourceMetrics{}) + *es.orig = append(*es.orig, internal.NewResourceMetrics()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteResourceMetrics((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigResourceMetricsSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyResourceMetricsPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ResourceMetrics elements within ResourceMetricsSlice given the @@ -155,18 +161,3 @@ func (es ResourceMetricsSlice) Sort(less func(a, b ResourceMetrics) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigResourceMetricsSlice(dest, src []*otlpmetrics.ResourceMetrics) []*otlpmetrics.ResourceMetrics { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.ResourceMetrics, len(src)) - data := make([]otlpmetrics.ResourceMetrics, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigResourceMetrics(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetrics.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetrics.go index d13626f061b..563153a491f 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetrics.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetrics.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewScopeMetrics function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeMetrics struct { - orig *otlpmetrics.ScopeMetrics + orig *internal.ScopeMetrics state *internal.State } -func newScopeMetrics(orig *otlpmetrics.ScopeMetrics, state *internal.State) ScopeMetrics { +func newScopeMetrics(orig *internal.ScopeMetrics, state *internal.State) ScopeMetrics { return ScopeMetrics{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newScopeMetrics(orig *otlpmetrics.ScopeMetrics, state *internal.State) Scop // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewScopeMetrics() ScopeMetrics { - state := internal.StateMutable - return newScopeMetrics(&otlpmetrics.ScopeMetrics{}, &state) + return newScopeMetrics(internal.NewScopeMetrics(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,18 @@ func (ms ScopeMetrics) MoveTo(dest ScopeMetrics) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.ScopeMetrics{} + internal.DeleteScopeMetrics(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Scope returns the scope associated with this ScopeMetrics. func (ms ScopeMetrics) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) + return pcommon.InstrumentationScope(internal.NewInstrumentationScopeWrapper(&ms.orig.Scope, ms.state)) +} + +// Metrics returns the Metrics associated with this ScopeMetrics. +func (ms ScopeMetrics) Metrics() MetricSlice { + return newMetricSlice(&ms.orig.Metrics, ms.state) } // SchemaUrl returns the schemaurl associated with this ScopeMetrics. @@ -66,19 +69,8 @@ func (ms ScopeMetrics) SetSchemaUrl(v string) { ms.orig.SchemaUrl = v } -// Metrics returns the Metrics associated with this ScopeMetrics. -func (ms ScopeMetrics) Metrics() MetricSlice { - return newMetricSlice(&ms.orig.Metrics, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms ScopeMetrics) CopyTo(dest ScopeMetrics) { dest.state.AssertMutable() - copyOrigScopeMetrics(dest.orig, ms.orig) -} - -func copyOrigScopeMetrics(dest, src *otlpmetrics.ScopeMetrics) { - internal.CopyOrigInstrumentationScope(&dest.Scope, &src.Scope) - dest.SchemaUrl = src.SchemaUrl - dest.Metrics = copyOrigMetricSlice(dest.Metrics, src.Metrics) + internal.CopyScopeMetrics(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetricsslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetricsslice.go index 2a1fc16c671..553e38a3c4c 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetricsslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_scopemetricsslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // ScopeMetricsSlice logically represents a slice of ScopeMetrics. @@ -22,20 +21,19 @@ import ( // Must use NewScopeMetricsSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeMetricsSlice struct { - orig *[]*otlpmetrics.ScopeMetrics + orig *[]*internal.ScopeMetrics state *internal.State } -func newScopeMetricsSlice(orig *[]*otlpmetrics.ScopeMetrics, state *internal.State) ScopeMetricsSlice { +func newScopeMetricsSlice(orig *[]*internal.ScopeMetrics, state *internal.State) ScopeMetricsSlice { return ScopeMetricsSlice{orig: orig, state: state} } -// NewScopeMetricsSlice creates a ScopeMetricsSlice with 0 elements. +// NewScopeMetricsSlice creates a ScopeMetricsSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewScopeMetricsSlice() ScopeMetricsSlice { - orig := []*otlpmetrics.ScopeMetrics(nil) - state := internal.StateMutable - return newScopeMetricsSlice(&orig, &state) + orig := []*internal.ScopeMetrics(nil) + return newScopeMetricsSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ScopeMetricsSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.ScopeMetrics, len(*es.orig), newCap) + newOrig := make([]*internal.ScopeMetrics, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ScopeMetricsSlice) EnsureCapacity(newCap int) { // It returns the newly added ScopeMetrics. func (es ScopeMetricsSlice) AppendEmpty() ScopeMetrics { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.ScopeMetrics{}) + *es.orig = append(*es.orig, internal.NewScopeMetrics()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteScopeMetrics((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ScopeMetricsSlice) RemoveIf(f func(ScopeMetrics) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ScopeMetricsSlice) CopyTo(dest ScopeMetricsSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigScopeMetricsSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyScopeMetricsPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ScopeMetrics elements within ScopeMetricsSlice given the @@ -155,18 +161,3 @@ func (es ScopeMetricsSlice) Sort(less func(a, b ScopeMetrics) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigScopeMetricsSlice(dest, src []*otlpmetrics.ScopeMetrics) []*otlpmetrics.ScopeMetrics { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.ScopeMetrics, len(src)) - data := make([]otlpmetrics.ScopeMetrics, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigScopeMetrics(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_sum.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_sum.go index 6b9c01d08d7..a56ece7dc53 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_sum.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_sum.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // Sum represents the type of a numeric metric that is calculated as a sum of all reported measurements over a time interval. @@ -19,11 +18,11 @@ import ( // Must use NewSum function to create new instances. // Important: zero-initialized instance is not valid for use. type Sum struct { - orig *otlpmetrics.Sum + orig *internal.Sum state *internal.State } -func newSum(orig *otlpmetrics.Sum, state *internal.State) Sum { +func newSum(orig *internal.Sum, state *internal.State) Sum { return Sum{orig: orig, state: state} } @@ -32,8 +31,7 @@ func newSum(orig *otlpmetrics.Sum, state *internal.State) Sum { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSum() Sum { - state := internal.StateMutable - return newSum(&otlpmetrics.Sum{}, &state) + return newSum(internal.NewSum(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -45,8 +43,13 @@ func (ms Sum) MoveTo(dest Sum) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.Sum{} + internal.DeleteSum(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig +} + +// DataPoints returns the DataPoints associated with this Sum. +func (ms Sum) DataPoints() NumberDataPointSlice { + return newNumberDataPointSlice(&ms.orig.DataPoints, ms.state) } // AggregationTemporality returns the aggregationtemporality associated with this Sum. @@ -57,7 +60,7 @@ func (ms Sum) AggregationTemporality() AggregationTemporality { // SetAggregationTemporality replaces the aggregationtemporality associated with this Sum. func (ms Sum) SetAggregationTemporality(v AggregationTemporality) { ms.state.AssertMutable() - ms.orig.AggregationTemporality = otlpmetrics.AggregationTemporality(v) + ms.orig.AggregationTemporality = internal.AggregationTemporality(v) } // IsMonotonic returns the ismonotonic associated with this Sum. @@ -71,19 +74,8 @@ func (ms Sum) SetIsMonotonic(v bool) { ms.orig.IsMonotonic = v } -// DataPoints returns the DataPoints associated with this Sum. -func (ms Sum) DataPoints() NumberDataPointSlice { - return newNumberDataPointSlice(&ms.orig.DataPoints, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms Sum) CopyTo(dest Sum) { dest.state.AssertMutable() - copyOrigSum(dest.orig, ms.orig) -} - -func copyOrigSum(dest, src *otlpmetrics.Sum) { - dest.AggregationTemporality = src.AggregationTemporality - dest.IsMonotonic = src.IsMonotonic - dest.DataPoints = copyOrigNumberDataPointSlice(dest.DataPoints, src.DataPoints) + internal.CopySum(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summary.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summary.go index 85c119fc7cf..c6ec844d4d6 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summary.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summary.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // Summary represents the type of a metric that is calculated by aggregating as a Summary of all reported double measurements over a time interval. @@ -19,11 +18,11 @@ import ( // Must use NewSummary function to create new instances. // Important: zero-initialized instance is not valid for use. type Summary struct { - orig *otlpmetrics.Summary + orig *internal.Summary state *internal.State } -func newSummary(orig *otlpmetrics.Summary, state *internal.State) Summary { +func newSummary(orig *internal.Summary, state *internal.State) Summary { return Summary{orig: orig, state: state} } @@ -32,8 +31,7 @@ func newSummary(orig *otlpmetrics.Summary, state *internal.State) Summary { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSummary() Summary { - state := internal.StateMutable - return newSummary(&otlpmetrics.Summary{}, &state) + return newSummary(internal.NewSummary(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -45,8 +43,8 @@ func (ms Summary) MoveTo(dest Summary) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.Summary{} + internal.DeleteSummary(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // DataPoints returns the DataPoints associated with this Summary. @@ -57,9 +55,5 @@ func (ms Summary) DataPoints() SummaryDataPointSlice { // CopyTo copies all properties from the current struct overriding the destination. func (ms Summary) CopyTo(dest Summary) { dest.state.AssertMutable() - copyOrigSummary(dest.orig, ms.orig) -} - -func copyOrigSummary(dest, src *otlpmetrics.Summary) { - dest.DataPoints = copyOrigSummaryDataPointSlice(dest.DataPoints, src.DataPoints) + internal.CopySummary(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapoint.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapoint.go index afdc32c3f57..715ef7247d1 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapoint.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapoint.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewSummaryDataPoint function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPoint struct { - orig *otlpmetrics.SummaryDataPoint + orig *internal.SummaryDataPoint state *internal.State } -func newSummaryDataPoint(orig *otlpmetrics.SummaryDataPoint, state *internal.State) SummaryDataPoint { +func newSummaryDataPoint(orig *internal.SummaryDataPoint, state *internal.State) SummaryDataPoint { return SummaryDataPoint{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newSummaryDataPoint(orig *otlpmetrics.SummaryDataPoint, state *internal.Sta // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSummaryDataPoint() SummaryDataPoint { - state := internal.StateMutable - return newSummaryDataPoint(&otlpmetrics.SummaryDataPoint{}, &state) + return newSummaryDataPoint(internal.NewSummaryDataPoint(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,13 @@ func (ms SummaryDataPoint) MoveTo(dest SummaryDataPoint) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.SummaryDataPoint{} + internal.DeleteSummaryDataPoint(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Attributes returns the Attributes associated with this SummaryDataPoint. func (ms SummaryDataPoint) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // StartTimestamp returns the starttimestamp associated with this SummaryDataPoint. @@ -118,15 +116,5 @@ func (ms SummaryDataPoint) SetFlags(v DataPointFlags) { // CopyTo copies all properties from the current struct overriding the destination. func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint) { dest.state.AssertMutable() - copyOrigSummaryDataPoint(dest.orig, ms.orig) -} - -func copyOrigSummaryDataPoint(dest, src *otlpmetrics.SummaryDataPoint) { - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.StartTimeUnixNano = src.StartTimeUnixNano - dest.TimeUnixNano = src.TimeUnixNano - dest.Count = src.Count - dest.Sum = src.Sum - dest.QuantileValues = copyOrigSummaryDataPointValueAtQuantileSlice(dest.QuantileValues, src.QuantileValues) - dest.Flags = src.Flags + internal.CopySummaryDataPoint(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointslice.go index fc2652c3a77..0a76d5ec332 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // SummaryDataPointSlice logically represents a slice of SummaryDataPoint. @@ -22,20 +21,19 @@ import ( // Must use NewSummaryDataPointSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPointSlice struct { - orig *[]*otlpmetrics.SummaryDataPoint + orig *[]*internal.SummaryDataPoint state *internal.State } -func newSummaryDataPointSlice(orig *[]*otlpmetrics.SummaryDataPoint, state *internal.State) SummaryDataPointSlice { +func newSummaryDataPointSlice(orig *[]*internal.SummaryDataPoint, state *internal.State) SummaryDataPointSlice { return SummaryDataPointSlice{orig: orig, state: state} } -// NewSummaryDataPointSlice creates a SummaryDataPointSlice with 0 elements. +// NewSummaryDataPointSlice creates a SummaryDataPointSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSummaryDataPointSlice() SummaryDataPointSlice { - orig := []*otlpmetrics.SummaryDataPoint(nil) - state := internal.StateMutable - return newSummaryDataPointSlice(&orig, &state) + orig := []*internal.SummaryDataPoint(nil) + return newSummaryDataPointSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es SummaryDataPointSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.SummaryDataPoint, len(*es.orig), newCap) + newOrig := make([]*internal.SummaryDataPoint, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es SummaryDataPointSlice) EnsureCapacity(newCap int) { // It returns the newly added SummaryDataPoint. func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.SummaryDataPoint{}) + *es.orig = append(*es.orig, internal.NewSummaryDataPoint()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteSummaryDataPoint((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigSummaryDataPointSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopySummaryDataPointPtrSlice(*dest.orig, *es.orig) } // Sort sorts the SummaryDataPoint elements within SummaryDataPointSlice given the @@ -155,18 +161,3 @@ func (es SummaryDataPointSlice) Sort(less func(a, b SummaryDataPoint) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigSummaryDataPointSlice(dest, src []*otlpmetrics.SummaryDataPoint) []*otlpmetrics.SummaryDataPoint { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.SummaryDataPoint, len(src)) - data := make([]otlpmetrics.SummaryDataPoint, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigSummaryDataPoint(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantile.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantile.go index aad8eb56c6d..8275d2ecefa 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantile.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantile.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric import ( "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // SummaryDataPointValueAtQuantile is a quantile value within a Summary data point. @@ -19,11 +18,11 @@ import ( // Must use NewSummaryDataPointValueAtQuantile function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPointValueAtQuantile struct { - orig *otlpmetrics.SummaryDataPoint_ValueAtQuantile + orig *internal.SummaryDataPointValueAtQuantile state *internal.State } -func newSummaryDataPointValueAtQuantile(orig *otlpmetrics.SummaryDataPoint_ValueAtQuantile, state *internal.State) SummaryDataPointValueAtQuantile { +func newSummaryDataPointValueAtQuantile(orig *internal.SummaryDataPointValueAtQuantile, state *internal.State) SummaryDataPointValueAtQuantile { return SummaryDataPointValueAtQuantile{orig: orig, state: state} } @@ -32,8 +31,7 @@ func newSummaryDataPointValueAtQuantile(orig *otlpmetrics.SummaryDataPoint_Value // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSummaryDataPointValueAtQuantile() SummaryDataPointValueAtQuantile { - state := internal.StateMutable - return newSummaryDataPointValueAtQuantile(&otlpmetrics.SummaryDataPoint_ValueAtQuantile{}, &state) + return newSummaryDataPointValueAtQuantile(internal.NewSummaryDataPointValueAtQuantile(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -45,8 +43,8 @@ func (ms SummaryDataPointValueAtQuantile) MoveTo(dest SummaryDataPointValueAtQua if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpmetrics.SummaryDataPoint_ValueAtQuantile{} + internal.DeleteSummaryDataPointValueAtQuantile(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Quantile returns the quantile associated with this SummaryDataPointValueAtQuantile. @@ -74,10 +72,5 @@ func (ms SummaryDataPointValueAtQuantile) SetValue(v float64) { // CopyTo copies all properties from the current struct overriding the destination. func (ms SummaryDataPointValueAtQuantile) CopyTo(dest SummaryDataPointValueAtQuantile) { dest.state.AssertMutable() - copyOrigSummaryDataPointValueAtQuantile(dest.orig, ms.orig) -} - -func copyOrigSummaryDataPointValueAtQuantile(dest, src *otlpmetrics.SummaryDataPoint_ValueAtQuantile) { - dest.Quantile = src.Quantile - dest.Value = src.Value + internal.CopySummaryDataPointValueAtQuantile(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go index 32b812c66cb..0aa50533057 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/generated_summarydatapointvalueatquantileslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetric @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" ) // SummaryDataPointValueAtQuantileSlice logically represents a slice of SummaryDataPointValueAtQuantile. @@ -22,20 +21,19 @@ import ( // Must use NewSummaryDataPointValueAtQuantileSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SummaryDataPointValueAtQuantileSlice struct { - orig *[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile + orig *[]*internal.SummaryDataPointValueAtQuantile state *internal.State } -func newSummaryDataPointValueAtQuantileSlice(orig *[]*otlpmetrics.SummaryDataPoint_ValueAtQuantile, state *internal.State) SummaryDataPointValueAtQuantileSlice { +func newSummaryDataPointValueAtQuantileSlice(orig *[]*internal.SummaryDataPointValueAtQuantile, state *internal.State) SummaryDataPointValueAtQuantileSlice { return SummaryDataPointValueAtQuantileSlice{orig: orig, state: state} } -// NewSummaryDataPointValueAtQuantileSlice creates a SummaryDataPointValueAtQuantileSlice with 0 elements. +// NewSummaryDataPointValueAtQuantileSlice creates a SummaryDataPointValueAtQuantileSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSummaryDataPointValueAtQuantileSlice() SummaryDataPointValueAtQuantileSlice { - orig := []*otlpmetrics.SummaryDataPoint_ValueAtQuantile(nil) - state := internal.StateMutable - return newSummaryDataPointValueAtQuantileSlice(&orig, &state) + orig := []*internal.SummaryDataPointValueAtQuantile(nil) + return newSummaryDataPointValueAtQuantileSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es SummaryDataPointValueAtQuantileSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlpmetrics.SummaryDataPoint_ValueAtQuantile, len(*es.orig), newCap) + newOrig := make([]*internal.SummaryDataPointValueAtQuantile, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es SummaryDataPointValueAtQuantileSlice) EnsureCapacity(newCap int) { // It returns the newly added SummaryDataPointValueAtQuantile. func (es SummaryDataPointValueAtQuantileSlice) AppendEmpty() SummaryDataPointValueAtQuantile { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlpmetrics.SummaryDataPoint_ValueAtQuantile{}) + *es.orig = append(*es.orig, internal.NewSummaryDataPointValueAtQuantile()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointV newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteSummaryDataPointValueAtQuantile((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointV continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es SummaryDataPointValueAtQuantileSlice) RemoveIf(f func(SummaryDataPointV // CopyTo copies all elements from the current slice overriding the destination. func (es SummaryDataPointValueAtQuantileSlice) CopyTo(dest SummaryDataPointValueAtQuantileSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigSummaryDataPointValueAtQuantileSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopySummaryDataPointValueAtQuantilePtrSlice(*dest.orig, *es.orig) } // Sort sorts the SummaryDataPointValueAtQuantile elements within SummaryDataPointValueAtQuantileSlice given the @@ -155,18 +161,3 @@ func (es SummaryDataPointValueAtQuantileSlice) Sort(less func(a, b SummaryDataPo es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigSummaryDataPointValueAtQuantileSlice(dest, src []*otlpmetrics.SummaryDataPoint_ValueAtQuantile) []*otlpmetrics.SummaryDataPoint_ValueAtQuantile { - if cap(dest) < len(src) { - dest = make([]*otlpmetrics.SummaryDataPoint_ValueAtQuantile, len(src)) - data := make([]otlpmetrics.SummaryDataPoint_ValueAtQuantile, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigSummaryDataPointValueAtQuantile(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/json.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/json.go index 394b8af7c65..cd3825f7f13 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/json.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/json.go @@ -4,437 +4,40 @@ package pmetric // import "go.opentelemetry.io/collector/pdata/pmetric" import ( - "bytes" - "fmt" + "slices" - jsoniter "github.com/json-iterator/go" - - "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" "go.opentelemetry.io/collector/pdata/internal/json" "go.opentelemetry.io/collector/pdata/internal/otlp" ) var _ Marshaler = (*JSONMarshaler)(nil) -// JSONMarshaler marshals pdata.Metrics to JSON bytes using the OTLP/JSON format. +// JSONMarshaler marshals Metrics to JSON bytes using the OTLP/JSON format. type JSONMarshaler struct{} // MarshalMetrics to the OTLP/JSON format. func (*JSONMarshaler) MarshalMetrics(md Metrics) ([]byte, error) { - buf := bytes.Buffer{} - pb := internal.MetricsToProto(internal.Metrics(md)) - err := json.Marshal(&buf, &pb) - return buf.Bytes(), err + dest := json.BorrowStream(nil) + defer json.ReturnStream(dest) + md.getOrig().MarshalJSON(dest) + if dest.Error() != nil { + return nil, dest.Error() + } + return slices.Clone(dest.Buffer()), nil } -// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Metrics. +// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to Metrics. type JSONUnmarshaler struct{} -// UnmarshalMetrics from OTLP/JSON format into pdata.Metrics. +// UnmarshalMetrics from OTLP/JSON format into Metrics. func (*JSONUnmarshaler) UnmarshalMetrics(buf []byte) (Metrics, error) { - iter := jsoniter.ConfigFastest.BorrowIterator(buf) - defer jsoniter.ConfigFastest.ReturnIterator(iter) + iter := json.BorrowIterator(buf) + defer json.ReturnIterator(iter) md := NewMetrics() - md.unmarshalJsoniter(iter) - if iter.Error != nil { - return Metrics{}, iter.Error + md.getOrig().UnmarshalJSON(iter) + if iter.Error() != nil { + return Metrics{}, iter.Error() } otlp.MigrateMetrics(md.getOrig().ResourceMetrics) return md, nil } - -func (ms Metrics) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resource_metrics", "resourceMetrics": - iter.ReadArrayCB(func(*jsoniter.Iterator) bool { - ms.ResourceMetrics().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms ResourceMetrics) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resource": - json.ReadResource(iter, &ms.orig.Resource) - case "scopeMetrics", "scope_metrics": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.ScopeMetrics().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (ms ScopeMetrics) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "scope": - json.ReadScope(iter, &ms.orig.Scope) - case "metrics": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.Metrics().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (ms Metric) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "name": - ms.orig.Name = iter.ReadString() - case "description": - ms.orig.Description = iter.ReadString() - case "unit": - ms.orig.Unit = iter.ReadString() - case "metadata": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.Metadata = append(ms.orig.Metadata, json.ReadAttribute(iter)) - return true - }) - case "sum": - ms.SetEmptySum().unmarshalJsoniter(iter) - case "gauge": - ms.SetEmptyGauge().unmarshalJsoniter(iter) - case "histogram": - ms.SetEmptyHistogram().unmarshalJsoniter(iter) - case "exponential_histogram", "exponentialHistogram": - ms.SetEmptyExponentialHistogram().unmarshalJsoniter(iter) - case "summary": - ms.SetEmptySummary().unmarshalJsoniter(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms Sum) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "aggregation_temporality", "aggregationTemporality": - ms.orig.AggregationTemporality = readAggregationTemporality(iter) - case "is_monotonic", "isMonotonic": - ms.orig.IsMonotonic = iter.ReadBool() - case "data_points", "dataPoints": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.DataPoints().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms Gauge) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "data_points", "dataPoints": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.DataPoints().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms Histogram) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "data_points", "dataPoints": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.DataPoints().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "aggregation_temporality", "aggregationTemporality": - ms.orig.AggregationTemporality = readAggregationTemporality(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms ExponentialHistogram) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "data_points", "dataPoints": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.DataPoints().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "aggregation_temporality", "aggregationTemporality": - ms.orig.AggregationTemporality = readAggregationTemporality(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms Summary) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "data_points", "dataPoints": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.DataPoints().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms NumberDataPoint) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - ms.orig.TimeUnixNano = json.ReadUint64(iter) - case "start_time_unix_nano", "startTimeUnixNano": - ms.orig.StartTimeUnixNano = json.ReadUint64(iter) - case "as_int", "asInt": - ms.orig.Value = &otlpmetrics.NumberDataPoint_AsInt{ - AsInt: json.ReadInt64(iter), - } - case "as_double", "asDouble": - ms.orig.Value = &otlpmetrics.NumberDataPoint_AsDouble{ - AsDouble: json.ReadFloat64(iter), - } - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.Attributes = append(ms.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "exemplars": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.Exemplars().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "flags": - ms.orig.Flags = json.ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms HistogramDataPoint) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - ms.orig.TimeUnixNano = json.ReadUint64(iter) - case "start_time_unix_nano", "startTimeUnixNano": - ms.orig.StartTimeUnixNano = json.ReadUint64(iter) - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.Attributes = append(ms.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "count": - ms.orig.Count = json.ReadUint64(iter) - case "sum": - ms.orig.Sum_ = &otlpmetrics.HistogramDataPoint_Sum{Sum: json.ReadFloat64(iter)} - case "bucket_counts", "bucketCounts": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.BucketCounts = append(ms.orig.BucketCounts, json.ReadUint64(iter)) - return true - }) - case "explicit_bounds", "explicitBounds": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.ExplicitBounds = append(ms.orig.ExplicitBounds, json.ReadFloat64(iter)) - return true - }) - case "exemplars": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.Exemplars().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "flags": - ms.orig.Flags = json.ReadUint32(iter) - case "max": - ms.orig.Max_ = &otlpmetrics.HistogramDataPoint_Max{ - Max: json.ReadFloat64(iter), - } - case "min": - ms.orig.Min_ = &otlpmetrics.HistogramDataPoint_Min{ - Min: json.ReadFloat64(iter), - } - default: - iter.Skip() - } - return true - }) -} - -func (ms ExponentialHistogramDataPoint) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - ms.orig.TimeUnixNano = json.ReadUint64(iter) - case "start_time_unix_nano", "startTimeUnixNano": - ms.orig.StartTimeUnixNano = json.ReadUint64(iter) - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.Attributes = append(ms.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "count": - ms.orig.Count = json.ReadUint64(iter) - case "sum": - ms.orig.Sum_ = &otlpmetrics.ExponentialHistogramDataPoint_Sum{ - Sum: json.ReadFloat64(iter), - } - case "scale": - ms.orig.Scale = iter.ReadInt32() - case "zero_count", "zeroCount": - ms.orig.ZeroCount = json.ReadUint64(iter) - case "positive": - ms.Positive().unmarshalJsoniter(iter) - case "negative": - ms.Negative().unmarshalJsoniter(iter) - case "exemplars": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.Exemplars().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "flags": - ms.orig.Flags = json.ReadUint32(iter) - case "max": - ms.orig.Max_ = &otlpmetrics.ExponentialHistogramDataPoint_Max{ - Max: json.ReadFloat64(iter), - } - case "min": - ms.orig.Min_ = &otlpmetrics.ExponentialHistogramDataPoint_Min{ - Min: json.ReadFloat64(iter), - } - default: - iter.Skip() - } - return true - }) -} - -func (ms SummaryDataPoint) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - ms.orig.TimeUnixNano = json.ReadUint64(iter) - case "start_time_unix_nano", "startTimeUnixNano": - ms.orig.StartTimeUnixNano = json.ReadUint64(iter) - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.Attributes = append(ms.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "count": - ms.orig.Count = json.ReadUint64(iter) - case "sum": - ms.orig.Sum = json.ReadFloat64(iter) - case "quantile_values", "quantileValues": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.QuantileValues().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "flags": - ms.orig.Flags = json.ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms ExponentialHistogramDataPointBuckets) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "bucket_counts", "bucketCounts": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.BucketCounts = append(ms.orig.BucketCounts, json.ReadUint64(iter)) - return true - }) - case "offset": - ms.orig.Offset = iter.ReadInt32() - default: - iter.Skip() - } - return true - }) -} - -func (ms SummaryDataPointValueAtQuantile) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "quantile": - ms.orig.Quantile = json.ReadFloat64(iter) - case "value": - ms.orig.Value = json.ReadFloat64(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms Exemplar) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "filtered_attributes", "filteredAttributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.orig.FilteredAttributes = append(ms.orig.FilteredAttributes, json.ReadAttribute(iter)) - return true - }) - case "timeUnixNano", "time_unix_nano": - ms.orig.TimeUnixNano = json.ReadUint64(iter) - case "as_int", "asInt": - ms.orig.Value = &otlpmetrics.Exemplar_AsInt{ - AsInt: json.ReadInt64(iter), - } - case "as_double", "asDouble": - ms.orig.Value = &otlpmetrics.Exemplar_AsDouble{ - AsDouble: json.ReadFloat64(iter), - } - case "traceId", "trace_id": - if err := ms.orig.TraceId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("exemplar.traceId", fmt.Sprintf("parse trace_id:%v", err)) - } - case "spanId", "span_id": - if err := ms.orig.SpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("exemplar.spanId", fmt.Sprintf("parse span_id:%v", err)) - } - default: - iter.Skip() - } - return true - }) -} - -func readAggregationTemporality(iter *jsoniter.Iterator) otlpmetrics.AggregationTemporality { - return otlpmetrics.AggregationTemporality(json.ReadEnumValue(iter, otlpmetrics.AggregationTemporality_value)) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/metrics.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/metrics.go index 91195ca4dfa..2f3ac098a5b 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/metrics.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/metrics.go @@ -3,46 +3,14 @@ package pmetric // import "go.opentelemetry.io/collector/pdata/pmetric" -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" -) - -// Metrics is the top-level struct that is propagated through the metrics pipeline. -// Use NewMetrics to create new instance, zero-initialized instance is not valid for use. -type Metrics internal.Metrics - -func newMetrics(orig *otlpcollectormetrics.ExportMetricsServiceRequest) Metrics { - state := internal.StateMutable - return Metrics(internal.NewMetrics(orig, &state)) -} - -func (ms Metrics) getOrig() *otlpcollectormetrics.ExportMetricsServiceRequest { - return internal.GetOrigMetrics(internal.Metrics(ms)) -} - -func (ms Metrics) getState() *internal.State { - return internal.GetMetricsState(internal.Metrics(ms)) -} - -// NewMetrics creates a new Metrics struct. -func NewMetrics() Metrics { - return newMetrics(&otlpcollectormetrics.ExportMetricsServiceRequest{}) +// MarkReadOnly marks the Metrics as shared so that no further modifications can be done on it. +func (ms Metrics) MarkReadOnly() { + ms.getState().MarkReadOnly() } // IsReadOnly returns true if this Metrics instance is read-only. func (ms Metrics) IsReadOnly() bool { - return *ms.getState() == internal.StateReadOnly -} - -// CopyTo copies the Metrics instance overriding the destination. -func (ms Metrics) CopyTo(dest Metrics) { - ms.ResourceMetrics().CopyTo(dest.ResourceMetrics()) -} - -// ResourceMetrics returns the ResourceMetricsSlice associated with this Metrics. -func (ms Metrics) ResourceMetrics() ResourceMetricsSlice { - return newResourceMetricsSlice(&ms.getOrig().ResourceMetrics, internal.GetMetricsState(internal.Metrics(ms))) + return ms.getState().IsReadOnly() } // MetricCount calculates the total number of metrics. @@ -86,10 +54,5 @@ func (ms Metrics) DataPointCount() (dataPointCount int) { } } } - return -} - -// MarkReadOnly marks the Metrics as shared so that no further modifications can be done on it. -func (ms Metrics) MarkReadOnly() { - internal.SetMetricsState(internal.Metrics(ms), internal.StateReadOnly) + return dataPointCount } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pb.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pb.go index 775a96f6a7e..bf703a764a7 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pb.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pb.go @@ -3,57 +3,56 @@ package pmetric // import "go.opentelemetry.io/collector/pdata/pmetric" -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" -) - var _ MarshalSizer = (*ProtoMarshaler)(nil) type ProtoMarshaler struct{} func (e *ProtoMarshaler) MarshalMetrics(md Metrics) ([]byte, error) { - pb := internal.MetricsToProto(internal.Metrics(md)) - return pb.Marshal() + size := md.getOrig().SizeProto() + buf := make([]byte, size) + _ = md.getOrig().MarshalProto(buf) + return buf, nil } func (e *ProtoMarshaler) MetricsSize(md Metrics) int { - pb := internal.MetricsToProto(internal.Metrics(md)) - return pb.Size() + return md.getOrig().SizeProto() } -func (e *ProtoMarshaler) ResourceMetricsSize(rm ResourceMetrics) int { - return rm.orig.Size() +func (e *ProtoMarshaler) ResourceMetricsSize(md ResourceMetrics) int { + return md.orig.SizeProto() } -func (e *ProtoMarshaler) ScopeMetricsSize(sm ScopeMetrics) int { - return sm.orig.Size() +func (e *ProtoMarshaler) ScopeMetricsSize(md ScopeMetrics) int { + return md.orig.SizeProto() } -func (e *ProtoMarshaler) MetricSize(m Metric) int { - return m.orig.Size() +func (e *ProtoMarshaler) MetricSize(md Metric) int { + return md.orig.SizeProto() } -func (e *ProtoMarshaler) NumberDataPointSize(ndp NumberDataPoint) int { - return ndp.orig.Size() +func (e *ProtoMarshaler) NumberDataPointSize(md NumberDataPoint) int { + return md.orig.SizeProto() } -func (e *ProtoMarshaler) SummaryDataPointSize(sdps SummaryDataPoint) int { - return sdps.orig.Size() +func (e *ProtoMarshaler) SummaryDataPointSize(md SummaryDataPoint) int { + return md.orig.SizeProto() } -func (e *ProtoMarshaler) HistogramDataPointSize(hdp HistogramDataPoint) int { - return hdp.orig.Size() +func (e *ProtoMarshaler) HistogramDataPointSize(md HistogramDataPoint) int { + return md.orig.SizeProto() } -func (e *ProtoMarshaler) ExponentialHistogramDataPointSize(ehdp ExponentialHistogramDataPoint) int { - return ehdp.orig.Size() +func (e *ProtoMarshaler) ExponentialHistogramDataPointSize(md ExponentialHistogramDataPoint) int { + return md.orig.SizeProto() } type ProtoUnmarshaler struct{} func (d *ProtoUnmarshaler) UnmarshalMetrics(buf []byte) (Metrics, error) { - pb := otlpmetrics.MetricsData{} - err := pb.Unmarshal(buf) - return Metrics(internal.MetricsFromProto(pb)), err + md := NewMetrics() + err := md.getOrig().UnmarshalProto(buf) + if err != nil { + return Metrics{}, err + } + return md, nil } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go index 70b1735efe6..df57abed3a8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportpartialsuccess.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package pmetricotlp import ( "go.opentelemetry.io/collector/pdata/internal" - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" ) // ExportPartialSuccess represents the details of a partially successful export request. @@ -19,11 +18,11 @@ import ( // Must use NewExportPartialSuccess function to create new instances. // Important: zero-initialized instance is not valid for use. type ExportPartialSuccess struct { - orig *otlpcollectormetrics.ExportMetricsPartialSuccess + orig *internal.ExportMetricsPartialSuccess state *internal.State } -func newExportPartialSuccess(orig *otlpcollectormetrics.ExportMetricsPartialSuccess, state *internal.State) ExportPartialSuccess { +func newExportPartialSuccess(orig *internal.ExportMetricsPartialSuccess, state *internal.State) ExportPartialSuccess { return ExportPartialSuccess{orig: orig, state: state} } @@ -32,8 +31,7 @@ func newExportPartialSuccess(orig *otlpcollectormetrics.ExportMetricsPartialSucc // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewExportPartialSuccess() ExportPartialSuccess { - state := internal.StateMutable - return newExportPartialSuccess(&otlpcollectormetrics.ExportMetricsPartialSuccess{}, &state) + return newExportPartialSuccess(internal.NewExportMetricsPartialSuccess(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -45,8 +43,8 @@ func (ms ExportPartialSuccess) MoveTo(dest ExportPartialSuccess) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlpcollectormetrics.ExportMetricsPartialSuccess{} + internal.DeleteExportMetricsPartialSuccess(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // RejectedDataPoints returns the rejecteddatapoints associated with this ExportPartialSuccess. @@ -74,10 +72,5 @@ func (ms ExportPartialSuccess) SetErrorMessage(v string) { // CopyTo copies all properties from the current struct overriding the destination. func (ms ExportPartialSuccess) CopyTo(dest ExportPartialSuccess) { dest.state.AssertMutable() - copyOrigExportPartialSuccess(dest.orig, ms.orig) -} - -func copyOrigExportPartialSuccess(dest, src *otlpcollectormetrics.ExportMetricsPartialSuccess) { - dest.RejectedDataPoints = src.RejectedDataPoints - dest.ErrorMessage = src.ErrorMessage + internal.CopyExportMetricsPartialSuccess(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportresponse.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportresponse.go new file mode 100644 index 00000000000..53323987f1b --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/generated_exportresponse.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package pmetricotlp + +import ( + "go.opentelemetry.io/collector/pdata/internal" +) + +// ExportResponse represents the response for gRPC/HTTP client/server. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewExportResponse function to create new instances. +// Important: zero-initialized instance is not valid for use. +type ExportResponse struct { + orig *internal.ExportMetricsServiceResponse + state *internal.State +} + +func newExportResponse(orig *internal.ExportMetricsServiceResponse, state *internal.State) ExportResponse { + return ExportResponse{orig: orig, state: state} +} + +// NewExportResponse creates a new empty ExportResponse. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewExportResponse() ExportResponse { + return newExportResponse(internal.NewExportMetricsServiceResponse(), internal.NewState()) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms ExportResponse) MoveTo(dest ExportResponse) { + ms.state.AssertMutable() + dest.state.AssertMutable() + // If they point to the same data, they are the same, nothing to do. + if ms.orig == dest.orig { + return + } + internal.DeleteExportMetricsServiceResponse(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig +} + +// PartialSuccess returns the partialsuccess associated with this ExportResponse. +func (ms ExportResponse) PartialSuccess() ExportPartialSuccess { + return newExportPartialSuccess(&ms.orig.PartialSuccess, ms.state) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms ExportResponse) CopyTo(dest ExportResponse) { + dest.state.AssertMutable() + internal.CopyExportMetricsServiceResponse(dest.orig, ms.orig) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/grpc.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/grpc.go index 98d864d7371..656f0e17650 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/grpc.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/grpc.go @@ -11,7 +11,7 @@ import ( "google.golang.org/grpc/status" "go.opentelemetry.io/collector/pdata/internal" - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" + "go.opentelemetry.io/collector/pdata/internal/otelgrpc" "go.opentelemetry.io/collector/pdata/internal/otlp" ) @@ -31,11 +31,11 @@ type GRPCClient interface { // NewGRPCClient returns a new GRPCClient connected using the given connection. func NewGRPCClient(cc *grpc.ClientConn) GRPCClient { - return &grpcClient{rawClient: otlpcollectormetrics.NewMetricsServiceClient(cc)} + return &grpcClient{rawClient: otelgrpc.NewMetricsServiceClient(cc)} } type grpcClient struct { - rawClient otlpcollectormetrics.MetricsServiceClient + rawClient otelgrpc.MetricsServiceClient } func (c *grpcClient) Export(ctx context.Context, request ExportRequest, opts ...grpc.CallOption) (ExportResponse, error) { @@ -43,8 +43,7 @@ func (c *grpcClient) Export(ctx context.Context, request ExportRequest, opts ... if err != nil { return ExportResponse{}, err } - state := internal.StateMutable - return ExportResponse{orig: rsp, state: &state}, err + return ExportResponse{orig: rsp, state: internal.NewState()}, err } func (c *grpcClient) unexported() {} @@ -75,16 +74,15 @@ func (*UnimplementedGRPCServer) unexported() {} // RegisterGRPCServer registers the GRPCServer to the grpc.Server. func RegisterGRPCServer(s *grpc.Server, srv GRPCServer) { - otlpcollectormetrics.RegisterMetricsServiceServer(s, &rawMetricsServer{srv: srv}) + otelgrpc.RegisterMetricsServiceServer(s, &rawMetricsServer{srv: srv}) } type rawMetricsServer struct { srv GRPCServer } -func (s rawMetricsServer) Export(ctx context.Context, request *otlpcollectormetrics.ExportMetricsServiceRequest) (*otlpcollectormetrics.ExportMetricsServiceResponse, error) { +func (s rawMetricsServer) Export(ctx context.Context, request *internal.ExportMetricsServiceRequest) (*internal.ExportMetricsServiceResponse, error) { otlp.MigrateMetrics(request.ResourceMetrics) - state := internal.StateMutable - rsp, err := s.srv.Export(ctx, ExportRequest{orig: request, state: &state}) + rsp, err := s.srv.Export(ctx, ExportRequest{orig: request, state: internal.NewState()}) return rsp.orig, err } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/request.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/request.go index 4cca31a609f..895c0681834 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/request.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/request.go @@ -4,29 +4,26 @@ package pmetricotlp // import "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" import ( - "bytes" + "slices" "go.opentelemetry.io/collector/pdata/internal" - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" "go.opentelemetry.io/collector/pdata/internal/json" + "go.opentelemetry.io/collector/pdata/internal/otlp" "go.opentelemetry.io/collector/pdata/pmetric" ) -var jsonUnmarshaler = &pmetric.JSONUnmarshaler{} - // ExportRequest represents the request for gRPC/HTTP client/server. // It's a wrapper for pmetric.Metrics data. type ExportRequest struct { - orig *otlpcollectormetrics.ExportMetricsServiceRequest + orig *internal.ExportMetricsServiceRequest state *internal.State } // NewExportRequest returns an empty ExportRequest. func NewExportRequest() ExportRequest { - state := internal.StateMutable return ExportRequest{ - orig: &otlpcollectormetrics.ExportMetricsServiceRequest{}, - state: &state, + orig: &internal.ExportMetricsServiceRequest{}, + state: internal.NewState(), } } @@ -35,40 +32,48 @@ func NewExportRequest() ExportRequest { // any changes to the provided Metrics struct will be reflected in the ExportRequest and vice versa. func NewExportRequestFromMetrics(md pmetric.Metrics) ExportRequest { return ExportRequest{ - orig: internal.GetOrigMetrics(internal.Metrics(md)), - state: internal.GetMetricsState(internal.Metrics(md)), + orig: internal.GetMetricsOrig(internal.MetricsWrapper(md)), + state: internal.GetMetricsState(internal.MetricsWrapper(md)), } } // MarshalProto marshals ExportRequest into proto bytes. func (ms ExportRequest) MarshalProto() ([]byte, error) { - return ms.orig.Marshal() + size := ms.orig.SizeProto() + buf := make([]byte, size) + _ = ms.orig.MarshalProto(buf) + return buf, nil } // UnmarshalProto unmarshalls ExportRequest from proto bytes. func (ms ExportRequest) UnmarshalProto(data []byte) error { - return ms.orig.Unmarshal(data) + err := ms.orig.UnmarshalProto(data) + if err != nil { + return err + } + otlp.MigrateMetrics(ms.orig.ResourceMetrics) + return nil } // MarshalJSON marshals ExportRequest into JSON bytes. func (ms ExportRequest) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - if err := json.Marshal(&buf, ms.orig); err != nil { - return nil, err + dest := json.BorrowStream(nil) + defer json.ReturnStream(dest) + ms.orig.MarshalJSON(dest) + if dest.Error() != nil { + return nil, dest.Error() } - return buf.Bytes(), nil + return slices.Clone(dest.Buffer()), nil } // UnmarshalJSON unmarshalls ExportRequest from JSON bytes. func (ms ExportRequest) UnmarshalJSON(data []byte) error { - md, err := jsonUnmarshaler.UnmarshalMetrics(data) - if err != nil { - return err - } - *ms.orig = *internal.GetOrigMetrics(internal.Metrics(md)) - return nil + iter := json.BorrowIterator(data) + defer json.ReturnIterator(iter) + ms.orig.UnmarshalJSON(iter) + return iter.Error() } func (ms ExportRequest) Metrics() pmetric.Metrics { - return pmetric.Metrics(internal.NewMetrics(ms.orig, ms.state)) + return pmetric.Metrics(internal.NewMetricsWrapper(ms.orig, ms.state)) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/response.go b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/response.go index 5942568ddb6..fe985edf2da 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/response.go +++ b/vendor/go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp/response.go @@ -4,84 +4,36 @@ package pmetricotlp // import "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" import ( - "bytes" + "slices" - jsoniter "github.com/json-iterator/go" - - "go.opentelemetry.io/collector/pdata/internal" - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" "go.opentelemetry.io/collector/pdata/internal/json" ) -// ExportResponse represents the response for gRPC/HTTP client/server. -type ExportResponse struct { - orig *otlpcollectormetrics.ExportMetricsServiceResponse - state *internal.State -} - -// NewExportResponse returns an empty ExportResponse. -func NewExportResponse() ExportResponse { - state := internal.StateMutable - return ExportResponse{ - orig: &otlpcollectormetrics.ExportMetricsServiceResponse{}, - state: &state, - } -} - // MarshalProto marshals ExportResponse into proto bytes. func (ms ExportResponse) MarshalProto() ([]byte, error) { - return ms.orig.Marshal() + size := ms.orig.SizeProto() + buf := make([]byte, size) + _ = ms.orig.MarshalProto(buf) + return buf, nil } // UnmarshalProto unmarshalls ExportResponse from proto bytes. func (ms ExportResponse) UnmarshalProto(data []byte) error { - return ms.orig.Unmarshal(data) + return ms.orig.UnmarshalProto(data) } // MarshalJSON marshals ExportResponse into JSON bytes. func (ms ExportResponse) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - if err := json.Marshal(&buf, ms.orig); err != nil { - return nil, err - } - return buf.Bytes(), nil + dest := json.BorrowStream(nil) + defer json.ReturnStream(dest) + ms.orig.MarshalJSON(dest) + return slices.Clone(dest.Buffer()), dest.Error() } // UnmarshalJSON unmarshalls ExportResponse from JSON bytes. func (ms ExportResponse) UnmarshalJSON(data []byte) error { - iter := jsoniter.ConfigFastest.BorrowIterator(data) - defer jsoniter.ConfigFastest.ReturnIterator(iter) - ms.unmarshalJsoniter(iter) - return iter.Error -} - -// PartialSuccess returns the ExportLogsPartialSuccess associated with this ExportResponse. -func (ms ExportResponse) PartialSuccess() ExportPartialSuccess { - return newExportPartialSuccess(&ms.orig.PartialSuccess, ms.state) -} - -func (ms ExportResponse) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "partial_success", "partialSuccess": - ms.PartialSuccess().unmarshalJsoniter(iter) - default: - iter.Skip() - } - return true - }) -} - -func (ms ExportPartialSuccess) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(_ *jsoniter.Iterator, f string) bool { - switch f { - case "rejected_data_points", "rejectedDataPoints": - ms.orig.RejectedDataPoints = json.ReadInt64(iter) - case "error_message", "errorMessage": - ms.orig.ErrorMessage = iter.ReadString() - default: - iter.Skip() - } - return true - }) + iter := json.BorrowIterator(data) + defer json.ReturnIterator(iter) + ms.orig.UnmarshalJSON(iter) + return iter.Error() } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go index 8212a03e11c..400b24659b2 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go @@ -9,17 +9,17 @@ type MarshalSizer interface { Sizer } -// Marshaler marshals pdata.Traces into bytes. +// Marshaler marshals Traces into bytes. type Marshaler interface { - // MarshalTraces the given pdata.Traces into bytes. + // MarshalTraces the given Traces into bytes. // If the error is not nil, the returned bytes slice cannot be used. MarshalTraces(td Traces) ([]byte, error) } -// Unmarshaler unmarshalls bytes into pdata.Traces. +// Unmarshaler unmarshalls bytes into Traces. type Unmarshaler interface { - // UnmarshalTraces the given bytes into pdata.Traces. - // If the error is not nil, the returned pdata.Traces cannot be used. + // UnmarshalTraces the given bytes into Traces. + // If the error is not nil, the returned Traces cannot be used. UnmarshalTraces(buf []byte) (Traces, error) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go index 9663d33f030..c68406cadeb 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace import ( "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewResourceSpans function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceSpans struct { - orig *otlptrace.ResourceSpans + orig *internal.ResourceSpans state *internal.State } -func newResourceSpans(orig *otlptrace.ResourceSpans, state *internal.State) ResourceSpans { +func newResourceSpans(orig *internal.ResourceSpans, state *internal.State) ResourceSpans { return ResourceSpans{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newResourceSpans(orig *otlptrace.ResourceSpans, state *internal.State) Reso // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewResourceSpans() ResourceSpans { - state := internal.StateMutable - return newResourceSpans(&otlptrace.ResourceSpans{}, &state) + return newResourceSpans(internal.NewResourceSpans(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,18 @@ func (ms ResourceSpans) MoveTo(dest ResourceSpans) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlptrace.ResourceSpans{} + internal.DeleteResourceSpans(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Resource returns the resource associated with this ResourceSpans. func (ms ResourceSpans) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) + return pcommon.Resource(internal.NewResourceWrapper(&ms.orig.Resource, ms.state)) +} + +// ScopeSpans returns the ScopeSpans associated with this ResourceSpans. +func (ms ResourceSpans) ScopeSpans() ScopeSpansSlice { + return newScopeSpansSlice(&ms.orig.ScopeSpans, ms.state) } // SchemaUrl returns the schemaurl associated with this ResourceSpans. @@ -66,19 +69,8 @@ func (ms ResourceSpans) SetSchemaUrl(v string) { ms.orig.SchemaUrl = v } -// ScopeSpans returns the ScopeSpans associated with this ResourceSpans. -func (ms ResourceSpans) ScopeSpans() ScopeSpansSlice { - return newScopeSpansSlice(&ms.orig.ScopeSpans, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms ResourceSpans) CopyTo(dest ResourceSpans) { dest.state.AssertMutable() - copyOrigResourceSpans(dest.orig, ms.orig) -} - -func copyOrigResourceSpans(dest, src *otlptrace.ResourceSpans) { - internal.CopyOrigResource(&dest.Resource, &src.Resource) - dest.SchemaUrl = src.SchemaUrl - dest.ScopeSpans = copyOrigScopeSpansSlice(dest.ScopeSpans, src.ScopeSpans) + internal.CopyResourceSpans(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go index bf9776647a2..ed2a7a87230 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) // ResourceSpansSlice logically represents a slice of ResourceSpans. @@ -22,20 +21,19 @@ import ( // Must use NewResourceSpansSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ResourceSpansSlice struct { - orig *[]*otlptrace.ResourceSpans + orig *[]*internal.ResourceSpans state *internal.State } -func newResourceSpansSlice(orig *[]*otlptrace.ResourceSpans, state *internal.State) ResourceSpansSlice { +func newResourceSpansSlice(orig *[]*internal.ResourceSpans, state *internal.State) ResourceSpansSlice { return ResourceSpansSlice{orig: orig, state: state} } -// NewResourceSpansSlice creates a ResourceSpansSlice with 0 elements. +// NewResourceSpansSlice creates a ResourceSpansSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewResourceSpansSlice() ResourceSpansSlice { - orig := []*otlptrace.ResourceSpans(nil) - state := internal.StateMutable - return newResourceSpansSlice(&orig, &state) + orig := []*internal.ResourceSpans(nil) + return newResourceSpansSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ResourceSpansSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlptrace.ResourceSpans, len(*es.orig), newCap) + newOrig := make([]*internal.ResourceSpans, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ResourceSpansSlice) EnsureCapacity(newCap int) { // It returns the newly added ResourceSpans. func (es ResourceSpansSlice) AppendEmpty() ResourceSpans { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.ResourceSpans{}) + *es.orig = append(*es.orig, internal.NewResourceSpans()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteResourceSpans((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigResourceSpansSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyResourceSpansPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ResourceSpans elements within ResourceSpansSlice given the @@ -155,18 +161,3 @@ func (es ResourceSpansSlice) Sort(less func(a, b ResourceSpans) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigResourceSpansSlice(dest, src []*otlptrace.ResourceSpans) []*otlptrace.ResourceSpans { - if cap(dest) < len(src) { - dest = make([]*otlptrace.ResourceSpans, len(src)) - data := make([]otlptrace.ResourceSpans, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigResourceSpans(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go index 06837b24339..a06c1df34d9 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace import ( "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -20,11 +19,11 @@ import ( // Must use NewScopeSpans function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeSpans struct { - orig *otlptrace.ScopeSpans + orig *internal.ScopeSpans state *internal.State } -func newScopeSpans(orig *otlptrace.ScopeSpans, state *internal.State) ScopeSpans { +func newScopeSpans(orig *internal.ScopeSpans, state *internal.State) ScopeSpans { return ScopeSpans{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newScopeSpans(orig *otlptrace.ScopeSpans, state *internal.State) ScopeSpans // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewScopeSpans() ScopeSpans { - state := internal.StateMutable - return newScopeSpans(&otlptrace.ScopeSpans{}, &state) + return newScopeSpans(internal.NewScopeSpans(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,13 +44,18 @@ func (ms ScopeSpans) MoveTo(dest ScopeSpans) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlptrace.ScopeSpans{} + internal.DeleteScopeSpans(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Scope returns the scope associated with this ScopeSpans. func (ms ScopeSpans) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) + return pcommon.InstrumentationScope(internal.NewInstrumentationScopeWrapper(&ms.orig.Scope, ms.state)) +} + +// Spans returns the Spans associated with this ScopeSpans. +func (ms ScopeSpans) Spans() SpanSlice { + return newSpanSlice(&ms.orig.Spans, ms.state) } // SchemaUrl returns the schemaurl associated with this ScopeSpans. @@ -66,19 +69,8 @@ func (ms ScopeSpans) SetSchemaUrl(v string) { ms.orig.SchemaUrl = v } -// Spans returns the Spans associated with this ScopeSpans. -func (ms ScopeSpans) Spans() SpanSlice { - return newSpanSlice(&ms.orig.Spans, ms.state) -} - // CopyTo copies all properties from the current struct overriding the destination. func (ms ScopeSpans) CopyTo(dest ScopeSpans) { dest.state.AssertMutable() - copyOrigScopeSpans(dest.orig, ms.orig) -} - -func copyOrigScopeSpans(dest, src *otlptrace.ScopeSpans) { - internal.CopyOrigInstrumentationScope(&dest.Scope, &src.Scope) - dest.SchemaUrl = src.SchemaUrl - dest.Spans = copyOrigSpanSlice(dest.Spans, src.Spans) + internal.CopyScopeSpans(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go index 63c526597f3..2522d5b2b6c 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) // ScopeSpansSlice logically represents a slice of ScopeSpans. @@ -22,20 +21,19 @@ import ( // Must use NewScopeSpansSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ScopeSpansSlice struct { - orig *[]*otlptrace.ScopeSpans + orig *[]*internal.ScopeSpans state *internal.State } -func newScopeSpansSlice(orig *[]*otlptrace.ScopeSpans, state *internal.State) ScopeSpansSlice { +func newScopeSpansSlice(orig *[]*internal.ScopeSpans, state *internal.State) ScopeSpansSlice { return ScopeSpansSlice{orig: orig, state: state} } -// NewScopeSpansSlice creates a ScopeSpansSlice with 0 elements. +// NewScopeSpansSlice creates a ScopeSpansSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewScopeSpansSlice() ScopeSpansSlice { - orig := []*otlptrace.ScopeSpans(nil) - state := internal.StateMutable - return newScopeSpansSlice(&orig, &state) + orig := []*internal.ScopeSpans(nil) + return newScopeSpansSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es ScopeSpansSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlptrace.ScopeSpans, len(*es.orig), newCap) + newOrig := make([]*internal.ScopeSpans, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es ScopeSpansSlice) EnsureCapacity(newCap int) { // It returns the newly added ScopeSpans. func (es ScopeSpansSlice) AppendEmpty() ScopeSpans { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.ScopeSpans{}) + *es.orig = append(*es.orig, internal.NewScopeSpans()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es ScopeSpansSlice) RemoveIf(f func(ScopeSpans) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteScopeSpans((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es ScopeSpansSlice) RemoveIf(f func(ScopeSpans) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es ScopeSpansSlice) RemoveIf(f func(ScopeSpans) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es ScopeSpansSlice) CopyTo(dest ScopeSpansSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigScopeSpansSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopyScopeSpansPtrSlice(*dest.orig, *es.orig) } // Sort sorts the ScopeSpans elements within ScopeSpansSlice given the @@ -155,18 +161,3 @@ func (es ScopeSpansSlice) Sort(less func(a, b ScopeSpans) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigScopeSpansSlice(dest, src []*otlptrace.ScopeSpans) []*otlptrace.ScopeSpans { - if cap(dest) < len(src) { - dest = make([]*otlptrace.ScopeSpans, len(src)) - data := make([]otlptrace.ScopeSpans, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigScopeSpans(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go index 16e997ede99..238386c1798 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go @@ -1,15 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace import ( "go.opentelemetry.io/collector/pdata/internal" - "go.opentelemetry.io/collector/pdata/internal/data" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -22,11 +20,11 @@ import ( // Must use NewSpan function to create new instances. // Important: zero-initialized instance is not valid for use. type Span struct { - orig *otlptrace.Span + orig *internal.Span state *internal.State } -func newSpan(orig *otlptrace.Span, state *internal.State) Span { +func newSpan(orig *internal.Span, state *internal.State) Span { return Span{orig: orig, state: state} } @@ -35,8 +33,7 @@ func newSpan(orig *otlptrace.Span, state *internal.State) Span { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSpan() Span { - state := internal.StateMutable - return newSpan(&otlptrace.Span{}, &state) + return newSpan(internal.NewSpan(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -48,8 +45,8 @@ func (ms Span) MoveTo(dest Span) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Span{} + internal.DeleteSpan(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // TraceID returns the traceid associated with this Span. @@ -60,7 +57,7 @@ func (ms Span) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this Span. func (ms Span) SetTraceID(v pcommon.TraceID) { ms.state.AssertMutable() - ms.orig.TraceId = data.TraceID(v) + ms.orig.TraceId = internal.TraceID(v) } // SpanID returns the spanid associated with this Span. @@ -71,12 +68,12 @@ func (ms Span) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this Span. func (ms Span) SetSpanID(v pcommon.SpanID) { ms.state.AssertMutable() - ms.orig.SpanId = data.SpanID(v) + ms.orig.SpanId = internal.SpanID(v) } // TraceState returns the tracestate associated with this Span. func (ms Span) TraceState() pcommon.TraceState { - return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState, ms.state)) + return pcommon.TraceState(internal.NewTraceStateWrapper(&ms.orig.TraceState, ms.state)) } // ParentSpanID returns the parentspanid associated with this Span. @@ -87,18 +84,7 @@ func (ms Span) ParentSpanID() pcommon.SpanID { // SetParentSpanID replaces the parentspanid associated with this Span. func (ms Span) SetParentSpanID(v pcommon.SpanID) { ms.state.AssertMutable() - ms.orig.ParentSpanId = data.SpanID(v) -} - -// Name returns the name associated with this Span. -func (ms Span) Name() string { - return ms.orig.Name -} - -// SetName replaces the name associated with this Span. -func (ms Span) SetName(v string) { - ms.state.AssertMutable() - ms.orig.Name = v + ms.orig.ParentSpanId = internal.SpanID(v) } // Flags returns the flags associated with this Span. @@ -112,6 +98,17 @@ func (ms Span) SetFlags(v uint32) { ms.orig.Flags = v } +// Name returns the name associated with this Span. +func (ms Span) Name() string { + return ms.orig.Name +} + +// SetName replaces the name associated with this Span. +func (ms Span) SetName(v string) { + ms.state.AssertMutable() + ms.orig.Name = v +} + // Kind returns the kind associated with this Span. func (ms Span) Kind() SpanKind { return SpanKind(ms.orig.Kind) @@ -120,7 +117,7 @@ func (ms Span) Kind() SpanKind { // SetKind replaces the kind associated with this Span. func (ms Span) SetKind(v SpanKind) { ms.state.AssertMutable() - ms.orig.Kind = otlptrace.Span_SpanKind(v) + ms.orig.Kind = internal.SpanKind(v) } // StartTimestamp returns the starttimestamp associated with this Span. @@ -147,7 +144,7 @@ func (ms Span) SetEndTimestamp(v pcommon.Timestamp) { // Attributes returns the Attributes associated with this Span. func (ms Span) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this Span. @@ -201,24 +198,5 @@ func (ms Span) Status() Status { // CopyTo copies all properties from the current struct overriding the destination. func (ms Span) CopyTo(dest Span) { dest.state.AssertMutable() - copyOrigSpan(dest.orig, ms.orig) -} - -func copyOrigSpan(dest, src *otlptrace.Span) { - dest.TraceId = src.TraceId - dest.SpanId = src.SpanId - internal.CopyOrigTraceState(&dest.TraceState, &src.TraceState) - dest.ParentSpanId = src.ParentSpanId - dest.Name = src.Name - dest.Flags = src.Flags - dest.Kind = src.Kind - dest.StartTimeUnixNano = src.StartTimeUnixNano - dest.EndTimeUnixNano = src.EndTimeUnixNano - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.DroppedAttributesCount = src.DroppedAttributesCount - dest.Events = copyOrigSpanEventSlice(dest.Events, src.Events) - dest.DroppedEventsCount = src.DroppedEventsCount - dest.Links = copyOrigSpanLinkSlice(dest.Links, src.Links) - dest.DroppedLinksCount = src.DroppedLinksCount - copyOrigStatus(&dest.Status, &src.Status) + internal.CopySpan(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go index 337b5327d2a..333f5d47b4f 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace import ( "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -21,11 +20,11 @@ import ( // Must use NewSpanEvent function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanEvent struct { - orig *otlptrace.Span_Event + orig *internal.SpanEvent state *internal.State } -func newSpanEvent(orig *otlptrace.Span_Event, state *internal.State) SpanEvent { +func newSpanEvent(orig *internal.SpanEvent, state *internal.State) SpanEvent { return SpanEvent{orig: orig, state: state} } @@ -34,8 +33,7 @@ func newSpanEvent(orig *otlptrace.Span_Event, state *internal.State) SpanEvent { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSpanEvent() SpanEvent { - state := internal.StateMutable - return newSpanEvent(&otlptrace.Span_Event{}, &state) + return newSpanEvent(internal.NewSpanEvent(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -47,8 +45,8 @@ func (ms SpanEvent) MoveTo(dest SpanEvent) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Span_Event{} + internal.DeleteSpanEvent(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Timestamp returns the timestamp associated with this SpanEvent. @@ -75,7 +73,7 @@ func (ms SpanEvent) SetName(v string) { // Attributes returns the Attributes associated with this SpanEvent. func (ms SpanEvent) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent. @@ -92,12 +90,5 @@ func (ms SpanEvent) SetDroppedAttributesCount(v uint32) { // CopyTo copies all properties from the current struct overriding the destination. func (ms SpanEvent) CopyTo(dest SpanEvent) { dest.state.AssertMutable() - copyOrigSpanEvent(dest.orig, ms.orig) -} - -func copyOrigSpanEvent(dest, src *otlptrace.Span_Event) { - dest.TimeUnixNano = src.TimeUnixNano - dest.Name = src.Name - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.DroppedAttributesCount = src.DroppedAttributesCount + internal.CopySpanEvent(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go index cd98da1bb56..f21a4d671a8 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) // SpanEventSlice logically represents a slice of SpanEvent. @@ -22,20 +21,19 @@ import ( // Must use NewSpanEventSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanEventSlice struct { - orig *[]*otlptrace.Span_Event + orig *[]*internal.SpanEvent state *internal.State } -func newSpanEventSlice(orig *[]*otlptrace.Span_Event, state *internal.State) SpanEventSlice { +func newSpanEventSlice(orig *[]*internal.SpanEvent, state *internal.State) SpanEventSlice { return SpanEventSlice{orig: orig, state: state} } -// NewSpanEventSlice creates a SpanEventSlice with 0 elements. +// NewSpanEventSlice creates a SpanEventSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSpanEventSlice() SpanEventSlice { - orig := []*otlptrace.Span_Event(nil) - state := internal.StateMutable - return newSpanEventSlice(&orig, &state) + orig := []*internal.SpanEvent(nil) + return newSpanEventSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es SpanEventSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlptrace.Span_Event, len(*es.orig), newCap) + newOrig := make([]*internal.SpanEvent, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es SpanEventSlice) EnsureCapacity(newCap int) { // It returns the newly added SpanEvent. func (es SpanEventSlice) AppendEmpty() SpanEvent { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.Span_Event{}) + *es.orig = append(*es.orig, internal.NewSpanEvent()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteSpanEvent((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es SpanEventSlice) CopyTo(dest SpanEventSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigSpanEventSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopySpanEventPtrSlice(*dest.orig, *es.orig) } // Sort sorts the SpanEvent elements within SpanEventSlice given the @@ -155,18 +161,3 @@ func (es SpanEventSlice) Sort(less func(a, b SpanEvent) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigSpanEventSlice(dest, src []*otlptrace.Span_Event) []*otlptrace.Span_Event { - if cap(dest) < len(src) { - dest = make([]*otlptrace.Span_Event, len(src)) - data := make([]otlptrace.Span_Event, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigSpanEvent(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go index 85a5350b1eb..ab585857a56 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go @@ -1,15 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace import ( "go.opentelemetry.io/collector/pdata/internal" - "go.opentelemetry.io/collector/pdata/internal/data" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/pcommon" ) @@ -23,11 +21,11 @@ import ( // Must use NewSpanLink function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanLink struct { - orig *otlptrace.Span_Link + orig *internal.SpanLink state *internal.State } -func newSpanLink(orig *otlptrace.Span_Link, state *internal.State) SpanLink { +func newSpanLink(orig *internal.SpanLink, state *internal.State) SpanLink { return SpanLink{orig: orig, state: state} } @@ -36,8 +34,7 @@ func newSpanLink(orig *otlptrace.Span_Link, state *internal.State) SpanLink { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewSpanLink() SpanLink { - state := internal.StateMutable - return newSpanLink(&otlptrace.Span_Link{}, &state) + return newSpanLink(internal.NewSpanLink(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -49,8 +46,8 @@ func (ms SpanLink) MoveTo(dest SpanLink) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Span_Link{} + internal.DeleteSpanLink(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // TraceID returns the traceid associated with this SpanLink. @@ -61,7 +58,7 @@ func (ms SpanLink) TraceID() pcommon.TraceID { // SetTraceID replaces the traceid associated with this SpanLink. func (ms SpanLink) SetTraceID(v pcommon.TraceID) { ms.state.AssertMutable() - ms.orig.TraceId = data.TraceID(v) + ms.orig.TraceId = internal.TraceID(v) } // SpanID returns the spanid associated with this SpanLink. @@ -72,28 +69,17 @@ func (ms SpanLink) SpanID() pcommon.SpanID { // SetSpanID replaces the spanid associated with this SpanLink. func (ms SpanLink) SetSpanID(v pcommon.SpanID) { ms.state.AssertMutable() - ms.orig.SpanId = data.SpanID(v) + ms.orig.SpanId = internal.SpanID(v) } // TraceState returns the tracestate associated with this SpanLink. func (ms SpanLink) TraceState() pcommon.TraceState { - return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState, ms.state)) -} - -// Flags returns the flags associated with this SpanLink. -func (ms SpanLink) Flags() uint32 { - return ms.orig.Flags -} - -// SetFlags replaces the flags associated with this SpanLink. -func (ms SpanLink) SetFlags(v uint32) { - ms.state.AssertMutable() - ms.orig.Flags = v + return pcommon.TraceState(internal.NewTraceStateWrapper(&ms.orig.TraceState, ms.state)) } // Attributes returns the Attributes associated with this SpanLink. func (ms SpanLink) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) + return pcommon.Map(internal.NewMapWrapper(&ms.orig.Attributes, ms.state)) } // DroppedAttributesCount returns the droppedattributescount associated with this SpanLink. @@ -107,17 +93,19 @@ func (ms SpanLink) SetDroppedAttributesCount(v uint32) { ms.orig.DroppedAttributesCount = v } +// Flags returns the flags associated with this SpanLink. +func (ms SpanLink) Flags() uint32 { + return ms.orig.Flags +} + +// SetFlags replaces the flags associated with this SpanLink. +func (ms SpanLink) SetFlags(v uint32) { + ms.state.AssertMutable() + ms.orig.Flags = v +} + // CopyTo copies all properties from the current struct overriding the destination. func (ms SpanLink) CopyTo(dest SpanLink) { dest.state.AssertMutable() - copyOrigSpanLink(dest.orig, ms.orig) -} - -func copyOrigSpanLink(dest, src *otlptrace.Span_Link) { - dest.TraceId = src.TraceId - dest.SpanId = src.SpanId - internal.CopyOrigTraceState(&dest.TraceState, &src.TraceState) - dest.Flags = src.Flags - dest.Attributes = internal.CopyOrigMap(dest.Attributes, src.Attributes) - dest.DroppedAttributesCount = src.DroppedAttributesCount + internal.CopySpanLink(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go index af205452e78..65b8b473591 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) // SpanLinkSlice logically represents a slice of SpanLink. @@ -22,20 +21,19 @@ import ( // Must use NewSpanLinkSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanLinkSlice struct { - orig *[]*otlptrace.Span_Link + orig *[]*internal.SpanLink state *internal.State } -func newSpanLinkSlice(orig *[]*otlptrace.Span_Link, state *internal.State) SpanLinkSlice { +func newSpanLinkSlice(orig *[]*internal.SpanLink, state *internal.State) SpanLinkSlice { return SpanLinkSlice{orig: orig, state: state} } -// NewSpanLinkSlice creates a SpanLinkSlice with 0 elements. +// NewSpanLinkSlice creates a SpanLinkSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSpanLinkSlice() SpanLinkSlice { - orig := []*otlptrace.Span_Link(nil) - state := internal.StateMutable - return newSpanLinkSlice(&orig, &state) + orig := []*internal.SpanLink(nil) + return newSpanLinkSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es SpanLinkSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlptrace.Span_Link, len(*es.orig), newCap) + newOrig := make([]*internal.SpanLink, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es SpanLinkSlice) EnsureCapacity(newCap int) { // It returns the newly added SpanLink. func (es SpanLinkSlice) AppendEmpty() SpanLink { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.Span_Link{}) + *es.orig = append(*es.orig, internal.NewSpanLink()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteSpanLink((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigSpanLinkSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopySpanLinkPtrSlice(*dest.orig, *es.orig) } // Sort sorts the SpanLink elements within SpanLinkSlice given the @@ -155,18 +161,3 @@ func (es SpanLinkSlice) Sort(less func(a, b SpanLink) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigSpanLinkSlice(dest, src []*otlptrace.Span_Link) []*otlptrace.Span_Link { - if cap(dest) < len(src) { - dest = make([]*otlptrace.Span_Link, len(src)) - data := make([]otlptrace.Span_Link, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigSpanLink(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go index 306e59158af..9cbc685062d 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace @@ -11,7 +11,6 @@ import ( "sort" "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) // SpanSlice logically represents a slice of Span. @@ -22,20 +21,19 @@ import ( // Must use NewSpanSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SpanSlice struct { - orig *[]*otlptrace.Span + orig *[]*internal.Span state *internal.State } -func newSpanSlice(orig *[]*otlptrace.Span, state *internal.State) SpanSlice { +func newSpanSlice(orig *[]*internal.Span, state *internal.State) SpanSlice { return SpanSlice{orig: orig, state: state} } -// NewSpanSlice creates a SpanSlice with 0 elements. +// NewSpanSlice creates a SpanSliceWrapper with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSpanSlice() SpanSlice { - orig := []*otlptrace.Span(nil) - state := internal.StateMutable - return newSpanSlice(&orig, &state) + orig := []*internal.Span(nil) + return newSpanSlice(&orig, internal.NewState()) } // Len returns the number of elements in the slice. @@ -91,7 +89,7 @@ func (es SpanSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]*otlptrace.Span, len(*es.orig), newCap) + newOrig := make([]*internal.Span, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -100,7 +98,7 @@ func (es SpanSlice) EnsureCapacity(newCap int) { // It returns the newly added Span. func (es SpanSlice) AppendEmpty() Span { es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.Span{}) + *es.orig = append(*es.orig, internal.NewSpan()) return es.At(es.Len() - 1) } @@ -129,6 +127,9 @@ func (es SpanSlice) RemoveIf(f func(Span) bool) { newLen := 0 for i := 0; i < len(*es.orig); i++ { if f(es.At(i)) { + internal.DeleteSpan((*es.orig)[i], true) + (*es.orig)[i] = nil + continue } if newLen == i { @@ -137,6 +138,8 @@ func (es SpanSlice) RemoveIf(f func(Span) bool) { continue } (*es.orig)[newLen] = (*es.orig)[i] + // Cannot delete here since we just move the data(or pointer to data) to a different position in the slice. + (*es.orig)[i] = nil newLen++ } *es.orig = (*es.orig)[:newLen] @@ -145,7 +148,10 @@ func (es SpanSlice) RemoveIf(f func(Span) bool) { // CopyTo copies all elements from the current slice overriding the destination. func (es SpanSlice) CopyTo(dest SpanSlice) { dest.state.AssertMutable() - *dest.orig = copyOrigSpanSlice(*dest.orig, *es.orig) + if es.orig == dest.orig { + return + } + *dest.orig = internal.CopySpanPtrSlice(*dest.orig, *es.orig) } // Sort sorts the Span elements within SpanSlice given the @@ -155,18 +161,3 @@ func (es SpanSlice) Sort(less func(a, b Span) bool) { es.state.AssertMutable() sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } - -func copyOrigSpanSlice(dest, src []*otlptrace.Span) []*otlptrace.Span { - if cap(dest) < len(src) { - dest = make([]*otlptrace.Span, len(src)) - data := make([]otlptrace.Span, len(src)) - for i := range src { - dest[i] = &data[i] - } - } - dest = dest[:len(src)] - for i := range src { - copyOrigSpan(dest[i], src[i]) - } - return dest -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go index 2040674d6cb..da1a8272601 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go @@ -1,14 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. // To regenerate this file run "make genpdata". package ptrace import ( "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" ) // Status is an optional final status for this span. Semantically, when Status was not @@ -20,11 +19,11 @@ import ( // Must use NewStatus function to create new instances. // Important: zero-initialized instance is not valid for use. type Status struct { - orig *otlptrace.Status + orig *internal.Status state *internal.State } -func newStatus(orig *otlptrace.Status, state *internal.State) Status { +func newStatus(orig *internal.Status, state *internal.State) Status { return Status{orig: orig, state: state} } @@ -33,8 +32,7 @@ func newStatus(orig *otlptrace.Status, state *internal.State) Status { // This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, // OR directly access the member if this is embedded in another struct. func NewStatus() Status { - state := internal.StateMutable - return newStatus(&otlptrace.Status{}, &state) + return newStatus(internal.NewStatus(), internal.NewState()) } // MoveTo moves all properties from the current struct overriding the destination and @@ -46,19 +44,8 @@ func (ms Status) MoveTo(dest Status) { if ms.orig == dest.orig { return } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Status{} -} - -// Code returns the code associated with this Status. -func (ms Status) Code() StatusCode { - return StatusCode(ms.orig.Code) -} - -// SetCode replaces the code associated with this Status. -func (ms Status) SetCode(v StatusCode) { - ms.state.AssertMutable() - ms.orig.Code = otlptrace.Status_StatusCode(v) + internal.DeleteStatus(dest.orig, false) + *dest.orig, *ms.orig = *ms.orig, *dest.orig } // Message returns the message associated with this Status. @@ -72,13 +59,19 @@ func (ms Status) SetMessage(v string) { ms.orig.Message = v } +// Code returns the code associated with this Status. +func (ms Status) Code() StatusCode { + return StatusCode(ms.orig.Code) +} + +// SetCode replaces the code associated with this Status. +func (ms Status) SetCode(v StatusCode) { + ms.state.AssertMutable() + ms.orig.Code = internal.StatusCode(v) +} + // CopyTo copies all properties from the current struct overriding the destination. func (ms Status) CopyTo(dest Status) { dest.state.AssertMutable() - copyOrigStatus(dest.orig, ms.orig) -} - -func copyOrigStatus(dest, src *otlptrace.Status) { - dest.Code = src.Code - dest.Message = src.Message + internal.CopyStatus(dest.orig, ms.orig) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_traces.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_traces.go new file mode 100644 index 00000000000..5e69bc03f27 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_traces.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by "internal/cmd/pdatagen/main.go". DO NOT EDIT. +// To regenerate this file run "make genpdata". + +package ptrace + +import ( + "go.opentelemetry.io/collector/pdata/internal" +) + +// Traces is the top-level struct that is propagated through the traces pipeline. +// Use NewTraces to create new instance, zero-initialized instance is not valid for use. +// +// This is a reference type, if passed by value and callee modifies it the +// caller will see the modification. +// +// Must use NewTraces function to create new instances. +// Important: zero-initialized instance is not valid for use. +type Traces internal.TracesWrapper + +func newTraces(orig *internal.ExportTraceServiceRequest, state *internal.State) Traces { + return Traces(internal.NewTracesWrapper(orig, state)) +} + +// NewTraces creates a new empty Traces. +// +// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, +// OR directly access the member if this is embedded in another struct. +func NewTraces() Traces { + return newTraces(internal.NewExportTraceServiceRequest(), internal.NewState()) +} + +// MoveTo moves all properties from the current struct overriding the destination and +// resetting the current instance to its zero value +func (ms Traces) MoveTo(dest Traces) { + ms.getState().AssertMutable() + dest.getState().AssertMutable() + // If they point to the same data, they are the same, nothing to do. + if ms.getOrig() == dest.getOrig() { + return + } + internal.DeleteExportTraceServiceRequest(dest.getOrig(), false) + *dest.getOrig(), *ms.getOrig() = *ms.getOrig(), *dest.getOrig() +} + +// ResourceSpans returns the ResourceSpans associated with this Traces. +func (ms Traces) ResourceSpans() ResourceSpansSlice { + return newResourceSpansSlice(&ms.getOrig().ResourceSpans, ms.getState()) +} + +// CopyTo copies all properties from the current struct overriding the destination. +func (ms Traces) CopyTo(dest Traces) { + dest.getState().AssertMutable() + internal.CopyExportTraceServiceRequest(dest.getOrig(), ms.getOrig()) +} + +func (ms Traces) getOrig() *internal.ExportTraceServiceRequest { + return internal.GetTracesOrig(internal.TracesWrapper(ms)) +} + +func (ms Traces) getState() *internal.State { + return internal.GetTracesState(internal.TracesWrapper(ms)) +} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go index 2e35a95913a..a6f0dd36f41 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go @@ -4,214 +4,38 @@ package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" import ( - "bytes" - "fmt" + "slices" - jsoniter "github.com/json-iterator/go" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" "go.opentelemetry.io/collector/pdata/internal/json" "go.opentelemetry.io/collector/pdata/internal/otlp" ) -// JSONMarshaler marshals pdata.Traces to JSON bytes using the OTLP/JSON format. +// JSONMarshaler marshals Traces to JSON bytes using the OTLP/JSON format. type JSONMarshaler struct{} // MarshalTraces to the OTLP/JSON format. func (*JSONMarshaler) MarshalTraces(td Traces) ([]byte, error) { - buf := bytes.Buffer{} - pb := internal.TracesToProto(internal.Traces(td)) - err := json.Marshal(&buf, &pb) - return buf.Bytes(), err + dest := json.BorrowStream(nil) + defer json.ReturnStream(dest) + td.getOrig().MarshalJSON(dest) + if dest.Error() != nil { + return nil, dest.Error() + } + return slices.Clone(dest.Buffer()), nil } -// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Traces. +// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to Traces. type JSONUnmarshaler struct{} -// UnmarshalTraces from OTLP/JSON format into pdata.Traces. +// UnmarshalTraces from OTLP/JSON format into Traces. func (*JSONUnmarshaler) UnmarshalTraces(buf []byte) (Traces, error) { - iter := jsoniter.ConfigFastest.BorrowIterator(buf) - defer jsoniter.ConfigFastest.ReturnIterator(iter) + iter := json.BorrowIterator(buf) + defer json.ReturnIterator(iter) td := NewTraces() - td.unmarshalJsoniter(iter) - if iter.Error != nil { - return Traces{}, iter.Error + td.getOrig().UnmarshalJSON(iter) + if iter.Error() != nil { + return Traces{}, iter.Error() } otlp.MigrateTraces(td.getOrig().ResourceSpans) return td, nil } - -func (ms Traces) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resourceSpans", "resource_spans": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.ResourceSpans().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms ResourceSpans) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resource": - json.ReadResource(iter, internal.GetOrigResource(internal.Resource(ms.Resource()))) - case "scopeSpans", "scope_spans": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.ScopeSpans().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (ms ScopeSpans) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "scope": - json.ReadScope(iter, &ms.orig.Scope) - case "spans": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.Spans().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (dest Span) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "traceId", "trace_id": - if err := dest.orig.TraceId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpan.traceId", fmt.Sprintf("parse trace_id:%v", err)) - } - case "spanId", "span_id": - if err := dest.orig.SpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpan.spanId", fmt.Sprintf("parse span_id:%v", err)) - } - case "traceState", "trace_state": - dest.TraceState().FromRaw(iter.ReadString()) - case "parentSpanId", "parent_span_id": - if err := dest.orig.ParentSpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpan.parentSpanId", fmt.Sprintf("parse parent_span_id:%v", err)) - } - case "flags": - dest.orig.Flags = json.ReadUint32(iter) - case "name": - dest.orig.Name = iter.ReadString() - case "kind": - dest.orig.Kind = otlptrace.Span_SpanKind(json.ReadEnumValue(iter, otlptrace.Span_SpanKind_value)) - case "startTimeUnixNano", "start_time_unix_nano": - dest.orig.StartTimeUnixNano = json.ReadUint64(iter) - case "endTimeUnixNano", "end_time_unix_nano": - dest.orig.EndTimeUnixNano = json.ReadUint64(iter) - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.orig.Attributes = append(dest.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - dest.orig.DroppedAttributesCount = json.ReadUint32(iter) - case "events": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.Events().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "droppedEventsCount", "dropped_events_count": - dest.orig.DroppedEventsCount = json.ReadUint32(iter) - case "links": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.Links().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "droppedLinksCount", "dropped_links_count": - dest.orig.DroppedLinksCount = json.ReadUint32(iter) - case "status": - dest.Status().unmarshalJsoniter(iter) - default: - iter.Skip() - } - return true - }) -} - -func (dest Status) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "message": - dest.orig.Message = iter.ReadString() - case "code": - dest.orig.Code = otlptrace.Status_StatusCode(json.ReadEnumValue(iter, otlptrace.Status_StatusCode_value)) - default: - iter.Skip() - } - return true - }) -} - -func (dest SpanLink) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "traceId", "trace_id": - if err := dest.orig.TraceId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpanLink", fmt.Sprintf("parse trace_id:%v", err)) - } - case "spanId", "span_id": - if err := dest.orig.SpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpanLink", fmt.Sprintf("parse span_id:%v", err)) - } - case "traceState", "trace_state": - dest.orig.TraceState = iter.ReadString() - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.orig.Attributes = append(dest.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - dest.orig.DroppedAttributesCount = json.ReadUint32(iter) - case "flags": - dest.orig.Flags = json.ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} - -func (dest SpanEvent) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - dest.orig.TimeUnixNano = json.ReadUint64(iter) - case "name": - dest.orig.Name = iter.ReadString() - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.orig.Attributes = append(dest.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - dest.orig.DroppedAttributesCount = json.ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go index a3c78be27c1..c9a02b2899a 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go @@ -3,41 +3,40 @@ package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - var _ MarshalSizer = (*ProtoMarshaler)(nil) type ProtoMarshaler struct{} func (e *ProtoMarshaler) MarshalTraces(td Traces) ([]byte, error) { - pb := internal.TracesToProto(internal.Traces(td)) - return pb.Marshal() + size := td.getOrig().SizeProto() + buf := make([]byte, size) + _ = td.getOrig().MarshalProto(buf) + return buf, nil } func (e *ProtoMarshaler) TracesSize(td Traces) int { - pb := internal.TracesToProto(internal.Traces(td)) - return pb.Size() + return td.getOrig().SizeProto() } -func (e *ProtoMarshaler) ResourceSpansSize(rs ResourceSpans) int { - return rs.orig.Size() +func (e *ProtoMarshaler) ResourceSpansSize(td ResourceSpans) int { + return td.orig.SizeProto() } -func (e *ProtoMarshaler) ScopeSpansSize(ss ScopeSpans) int { - return ss.orig.Size() +func (e *ProtoMarshaler) ScopeSpansSize(td ScopeSpans) int { + return td.orig.SizeProto() } -func (e *ProtoMarshaler) SpanSize(span Span) int { - return span.orig.Size() +func (e *ProtoMarshaler) SpanSize(td Span) int { + return td.orig.SizeProto() } type ProtoUnmarshaler struct{} func (d *ProtoUnmarshaler) UnmarshalTraces(buf []byte) (Traces, error) { - pb := otlptrace.TracesData{} - err := pb.Unmarshal(buf) - return Traces(internal.TracesFromProto(pb)), err + td := NewTraces() + err := td.getOrig().UnmarshalProto(buf) + if err != nil { + return Traces{}, err + } + return td, nil } diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go index 561d82cfffa..bb1702ffe15 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go @@ -4,7 +4,7 @@ package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" import ( - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // SpanKind is the type of span. Can be used to specify additional relationships between spans @@ -13,25 +13,25 @@ type SpanKind int32 const ( // SpanKindUnspecified represents that the SpanKind is unspecified, it MUST NOT be used. - SpanKindUnspecified = SpanKind(otlptrace.Span_SPAN_KIND_UNSPECIFIED) + SpanKindUnspecified = SpanKind(internal.SpanKind_SPAN_KIND_UNSPECIFIED) // SpanKindInternal indicates that the span represents an internal operation within an application, // as opposed to an operation happening at the boundaries. Default value. - SpanKindInternal = SpanKind(otlptrace.Span_SPAN_KIND_INTERNAL) + SpanKindInternal = SpanKind(internal.SpanKind_SPAN_KIND_INTERNAL) // SpanKindServer indicates that the span covers server-side handling of an RPC or other // remote network request. - SpanKindServer = SpanKind(otlptrace.Span_SPAN_KIND_SERVER) + SpanKindServer = SpanKind(internal.SpanKind_SPAN_KIND_SERVER) // SpanKindClient indicates that the span describes a request to some remote service. - SpanKindClient = SpanKind(otlptrace.Span_SPAN_KIND_CLIENT) + SpanKindClient = SpanKind(internal.SpanKind_SPAN_KIND_CLIENT) // SpanKindProducer 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(otlptrace.Span_SPAN_KIND_PRODUCER) + SpanKindProducer = SpanKind(internal.SpanKind_SPAN_KIND_PRODUCER) // SpanKindConsumer 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(otlptrace.Span_SPAN_KIND_CONSUMER) + SpanKindConsumer = SpanKind(internal.SpanKind_SPAN_KIND_CONSUMER) ) // String returns the string representation of the SpanKind. diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go index 18a21f56ba8..d1da464363e 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go @@ -4,7 +4,7 @@ package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" import ( - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" + "go.opentelemetry.io/collector/pdata/internal" ) // StatusCode mirrors the codes defined at @@ -12,9 +12,9 @@ import ( type StatusCode int32 const ( - StatusCodeUnset = StatusCode(otlptrace.Status_STATUS_CODE_UNSET) - StatusCodeOk = StatusCode(otlptrace.Status_STATUS_CODE_OK) - StatusCodeError = StatusCode(otlptrace.Status_STATUS_CODE_ERROR) + StatusCodeUnset = StatusCode(internal.StatusCode_STATUS_CODE_UNSET) + StatusCodeOk = StatusCode(internal.StatusCode_STATUS_CODE_OK) + StatusCodeError = StatusCode(internal.StatusCode_STATUS_CODE_ERROR) ) // String returns the string representation of the StatusCode. diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go index a4b71e17853..90833ee6385 100644 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go +++ b/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go @@ -3,41 +3,14 @@ package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" -) - -// Traces is the top-level struct that is propagated through the traces pipeline. -// Use NewTraces to create new instance, zero-initialized instance is not valid for use. -type Traces internal.Traces - -func newTraces(orig *otlpcollectortrace.ExportTraceServiceRequest) Traces { - state := internal.StateMutable - return Traces(internal.NewTraces(orig, &state)) -} - -func (ms Traces) getOrig() *otlpcollectortrace.ExportTraceServiceRequest { - return internal.GetOrigTraces(internal.Traces(ms)) -} - -func (ms Traces) getState() *internal.State { - return internal.GetTracesState(internal.Traces(ms)) -} - -// NewTraces creates a new Traces struct. -func NewTraces() Traces { - return newTraces(&otlpcollectortrace.ExportTraceServiceRequest{}) +// MarkReadOnly marks the Traces as shared so that no further modifications can be done on it. +func (ms Traces) MarkReadOnly() { + ms.getState().MarkReadOnly() } // IsReadOnly returns true if this Traces instance is read-only. func (ms Traces) IsReadOnly() bool { - return *ms.getState() == internal.StateReadOnly -} - -// CopyTo copies the Traces instance overriding the destination. -func (ms Traces) CopyTo(dest Traces) { - ms.ResourceSpans().CopyTo(dest.ResourceSpans()) + return ms.getState().IsReadOnly() } // SpanCount calculates the total number of spans. @@ -53,13 +26,3 @@ func (ms Traces) SpanCount() int { } return spanCount } - -// ResourceSpans returns the ResourceSpansSlice associated with this Metrics. -func (ms Traces) ResourceSpans() ResourceSpansSlice { - return newResourceSpansSlice(&ms.getOrig().ResourceSpans, internal.GetTracesState(internal.Traces(ms))) -} - -// MarkReadOnly marks the Traces as shared so that no further modifications can be done on it. -func (ms Traces) MarkReadOnly() { - internal.SetTracesState(internal.Traces(ms), internal.StateReadOnly) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/LICENSE b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/LICENSE index 261eeb9e9f8..f1aee0f1100 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/LICENSE +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/LICENSE @@ -199,3 +199,33 @@ 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go index 222b35871fa..942566e6550 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go @@ -11,11 +11,12 @@ import ( "strings" "sync" - "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" ) // ScopeName is the instrumentation scope name. @@ -360,7 +361,10 @@ func (ct *clientTracer) got100Continue() { if ct.useSpans { span = ct.span("http.receive") } - span.AddEvent("GOT 100 - Continue") + // It's possible that Got100Continue is called before GotFirstResponseByte at which point span can be `nil`. + if span != nil { + span.AddEvent("GOT 100 - Continue") + } } func (ct *clientTracer) wait100Continue() { @@ -368,7 +372,10 @@ func (ct *clientTracer) wait100Continue() { if ct.useSpans { span = ct.span("http.send") } - span.AddEvent("GOT 100 - Wait") + // It's possible that Wait100Continue is called before GotFirstResponseByte at which point span can be `nil`. + if span != nil { + span.AddEvent("GOT 100 - Wait") + } } func (ct *clientTracer) got1xxResponse(code int, header textproto.MIMEHeader) error { @@ -376,10 +383,13 @@ func (ct *clientTracer) got1xxResponse(code int, header textproto.MIMEHeader) er if ct.useSpans { span = ct.span("http.receive") } - span.AddEvent("GOT 1xx", trace.WithAttributes( - HTTPStatus.Int(code), - HTTPHeaderMIME.String(sm2s(header)), - )) + // It's possible that Got1xxResponse is called before GotFirstResponseByte at which point span can be `nil`. + if span != nil { + span.AddEvent("GOT 1xx", trace.WithAttributes( + HTTPStatus.Int(code), + HTTPHeaderMIME.String(sm2s(header)), + )) + } return nil } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go index 0186b0afb8e..549494192a2 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go @@ -9,12 +9,13 @@ import ( "context" "net/http" - "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/baggage" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" ) // Option allows configuration of the httptrace Extract() diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go new file mode 100644 index 00000000000..10895b8db34 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go @@ -0,0 +1,305 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/semconv/client.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv provides OpenTelemetry semantic convention types and +// functionality. +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" + +import ( + "context" + "fmt" + "net/http" + "reflect" + "slices" + "strconv" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/semconv/v1.37.0/httpconv" +) + +type HTTPClient struct{ + requestBodySize httpconv.ClientRequestBodySize + requestDuration httpconv.ClientRequestDuration +} + +func NewHTTPClient(meter metric.Meter) HTTPClient { + client := HTTPClient{} + + var err error + client.requestBodySize, err = httpconv.NewClientRequestBodySize(meter) + handleErr(err) + + client.requestDuration, err = httpconv.NewClientRequestDuration( + meter, + metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), + ) + handleErr(err) + + return client +} + +func (n HTTPClient) Status(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 400 { + return codes.Error, "" + } + return codes.Unset, "" +} + +// RequestTraceAttrs returns trace attributes for an HTTP request made by a client. +func (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { + /* + below attributes are returned: + - http.request.method + - http.request.method.original + - url.full + - server.address + - server.port + - network.protocol.name + - network.protocol.version + */ + numOfAttributes := 3 // URL, server address, proto, and method. + + var urlHost string + if req.URL != nil { + urlHost = req.URL.Host + } + var requestHost string + var requestPort int + for _, hostport := range []string{urlHost, req.Header.Get("Host")} { + requestHost, requestPort = SplitHostPort(hostport) + if requestHost != "" || requestPort > 0 { + break + } + } + + eligiblePort := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) + if eligiblePort > 0 { + numOfAttributes++ + } + useragent := req.UserAgent() + if useragent != "" { + numOfAttributes++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" && protoName != "http" { + numOfAttributes++ + } + if protoVersion != "" { + numOfAttributes++ + } + + method, originalMethod := n.method(req.Method) + if originalMethod != (attribute.KeyValue{}) { + numOfAttributes++ + } + + attrs := make([]attribute.KeyValue, 0, numOfAttributes) + + attrs = append(attrs, method) + if originalMethod != (attribute.KeyValue{}) { + attrs = append(attrs, originalMethod) + } + + var u string + if req.URL != nil { + // Remove any username/password info that may be in the URL. + userinfo := req.URL.User + req.URL.User = nil + u = req.URL.String() + // Restore any username/password info that was removed. + req.URL.User = userinfo + } + attrs = append(attrs, semconv.URLFull(u)) + + attrs = append(attrs, semconv.ServerAddress(requestHost)) + if eligiblePort > 0 { + attrs = append(attrs, semconv.ServerPort(eligiblePort)) + } + + if protoName != "" && protoName != "http" { + attrs = append(attrs, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion)) + } + + return attrs +} + +// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client. +func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { + /* + below attributes are returned: + - http.response.status_code + - error.type + */ + var count int + if resp.StatusCode > 0 { + count++ + } + + if isErrorStatusCode(resp.StatusCode) { + count++ + } + + attrs := make([]attribute.KeyValue, 0, count) + if resp.StatusCode > 0 { + attrs = append(attrs, semconv.HTTPResponseStatusCode(resp.StatusCode)) + } + + if isErrorStatusCode(resp.StatusCode) { + errorType := strconv.Itoa(resp.StatusCode) + attrs = append(attrs, semconv.ErrorTypeKey.String(errorType)) + } + return attrs +} + +func (n HTTPClient) ErrorType(err error) attribute.KeyValue { + t := reflect.TypeOf(err) + var value string + if t.PkgPath() == "" && t.Name() == "" { + // Likely a builtin type. + value = t.String() + } else { + value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) + } + + if value == "" { + return semconv.ErrorTypeOther + } + + return semconv.ErrorTypeKey.String(value) +} + +func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) { + if method == "" { + return semconv.HTTPRequestMethodGet, attribute.KeyValue{} + } + if attr, ok := methodLookup[method]; ok { + return attr, attribute.KeyValue{} + } + + orig := semconv.HTTPRequestMethodOriginal(method) + if attr, ok := methodLookup[strings.ToUpper(method)]; ok { + return attr, orig + } + return semconv.HTTPRequestMethodGet, orig +} + +func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { + num := len(additionalAttributes) + 2 + var h string + if req.URL != nil { + h = req.URL.Host + } + var requestHost string + var requestPort int + for _, hostport := range []string{h, req.Header.Get("Host")} { + requestHost, requestPort = SplitHostPort(hostport) + if requestHost != "" || requestPort > 0 { + break + } + } + + port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) + if port > 0 { + num++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" { + num++ + } + if protoVersion != "" { + num++ + } + + if statusCode > 0 { + num++ + } + + attributes := slices.Grow(additionalAttributes, num) + attributes = append(attributes, + semconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), + semconv.ServerAddress(requestHost), + n.scheme(req), + ) + + if port > 0 { + attributes = append(attributes, semconv.ServerPort(port)) + } + if protoName != "" { + attributes = append(attributes, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attributes = append(attributes, semconv.NetworkProtocolVersion(protoVersion)) + } + + if statusCode > 0 { + attributes = append(attributes, semconv.HTTPResponseStatusCode(statusCode)) + } + return attributes +} + +type MetricOpts struct { + measurement metric.MeasurementOption + addOptions metric.AddOption +} + +func (o MetricOpts) MeasurementOption() metric.MeasurementOption { + return o.measurement +} + +func (o MetricOpts) AddOptions() metric.AddOption { + return o.addOptions +} + +func (n HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts { + opts := map[string]MetricOpts{} + + attributes := n.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) + set := metric.WithAttributeSet(attribute.NewSet(attributes...)) + opts["new"] = MetricOpts{ + measurement: set, + addOptions: set, + } + + return opts +} + +func (n HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) { + n.requestBodySize.Inst().Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) + n.requestDuration.Inst().Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) +} + +// TraceAttributes returns attributes for httptrace. +func (n HTTPClient) TraceAttributes(host string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.ServerAddress(host), + } +} + +func (n HTTPClient) scheme(req *http.Request) attribute.KeyValue { + if req.URL != nil && req.URL.Scheme != "" { + return semconv.URLScheme(req.URL.Scheme) + } + if req.TLS != nil { + return semconv.URLScheme("https") + } + return semconv.URLScheme("http") +} + +func isErrorStatusCode(code int) bool { + return code >= 400 || code < 100 +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/env.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/env.go deleted file mode 100644 index 631466ae6af..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/env.go +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/env.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" - -import ( - "context" - "fmt" - "net/http" - "os" - "strings" - "sync" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" -) - -// OTelSemConvStabilityOptIn is an environment variable. -// That can be set to "http/dup" to keep getting the old HTTP semantic conventions. -const OTelSemConvStabilityOptIn = "OTEL_SEMCONV_STABILITY_OPT_IN" - -type ResponseTelemetry struct { - StatusCode int - ReadBytes int64 - ReadError error - WriteBytes int64 - WriteError error -} - -type HTTPServer struct { - duplicate bool - - // Old metrics - requestBytesCounter metric.Int64Counter - responseBytesCounter metric.Int64Counter - serverLatencyMeasure metric.Float64Histogram - - // New metrics - requestBodySizeHistogram metric.Int64Histogram - responseBodySizeHistogram metric.Int64Histogram - requestDurationHistogram metric.Float64Histogram -} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (s HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { - attrs := CurrentHTTPServer{}.RequestTraceAttrs(server, req, opts) - if s.duplicate { - return OldHTTPServer{}.RequestTraceAttrs(server, req, attrs) - } - return attrs -} - -func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue { - if s.duplicate { - return []attribute.KeyValue{ - OldHTTPServer{}.NetworkTransportAttr(network), - CurrentHTTPServer{}.NetworkTransportAttr(network), - } - } - return []attribute.KeyValue{ - CurrentHTTPServer{}.NetworkTransportAttr(network), - } -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. -func (s HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { - attrs := CurrentHTTPServer{}.ResponseTraceAttrs(resp) - if s.duplicate { - return OldHTTPServer{}.ResponseTraceAttrs(resp, attrs) - } - return attrs -} - -// Route returns the attribute for the route. -func (s HTTPServer) Route(route string) attribute.KeyValue { - return CurrentHTTPServer{}.Route(route) -} - -// Status returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (s HTTPServer) Status(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 500 { - return codes.Error, "" - } - return codes.Unset, "" -} - -type ServerMetricData struct { - ServerName string - ResponseSize int64 - - MetricData - MetricAttributes -} - -type MetricAttributes struct { - Req *http.Request - StatusCode int - AdditionalAttributes []attribute.KeyValue -} - -type MetricData struct { - RequestSize int64 - - // The request duration, in milliseconds - ElapsedTime float64 -} - -var ( - metricAddOptionPool = &sync.Pool{ - New: func() interface{} { - return &[]metric.AddOption{} - }, - } - - metricRecordOptionPool = &sync.Pool{ - New: func() interface{} { - return &[]metric.RecordOption{} - }, - } -) - -func (s HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) { - if s.requestDurationHistogram != nil && s.requestBodySizeHistogram != nil && s.responseBodySizeHistogram != nil { - attributes := CurrentHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) - *recordOpts = append(*recordOpts, o) - s.requestBodySizeHistogram.Record(ctx, md.RequestSize, *recordOpts...) - s.responseBodySizeHistogram.Record(ctx, md.ResponseSize, *recordOpts...) - s.requestDurationHistogram.Record(ctx, md.ElapsedTime/1000.0, o) - *recordOpts = (*recordOpts)[:0] - metricRecordOptionPool.Put(recordOpts) - } - - if s.duplicate && s.requestBytesCounter != nil && s.responseBytesCounter != nil && s.serverLatencyMeasure != nil { - attributes := OldHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - addOpts := metricAddOptionPool.Get().(*[]metric.AddOption) - *addOpts = append(*addOpts, o) - s.requestBytesCounter.Add(ctx, md.RequestSize, *addOpts...) - s.responseBytesCounter.Add(ctx, md.ResponseSize, *addOpts...) - s.serverLatencyMeasure.Record(ctx, md.ElapsedTime, o) - *addOpts = (*addOpts)[:0] - metricAddOptionPool.Put(addOpts) - } -} - -// hasOptIn returns true if the comma-separated version string contains the -// exact optIn value. -func hasOptIn(version, optIn string) bool { - for _, v := range strings.Split(version, ",") { - if strings.TrimSpace(v) == optIn { - return true - } - } - return false -} - -func NewHTTPServer(meter metric.Meter) HTTPServer { - env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn)) - duplicate := hasOptIn(env, "http/dup") - server := HTTPServer{ - duplicate: duplicate, - } - server.requestBodySizeHistogram, server.responseBodySizeHistogram, server.requestDurationHistogram = CurrentHTTPServer{}.createMeasures(meter) - if duplicate { - server.requestBytesCounter, server.responseBytesCounter, server.serverLatencyMeasure = OldHTTPServer{}.createMeasures(meter) - } - return server -} - -type HTTPClient struct { - duplicate bool - - // old metrics - requestBytesCounter metric.Int64Counter - responseBytesCounter metric.Int64Counter - latencyMeasure metric.Float64Histogram - - // new metrics - requestBodySize metric.Int64Histogram - requestDuration metric.Float64Histogram -} - -func NewHTTPClient(meter metric.Meter) HTTPClient { - env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn)) - duplicate := hasOptIn(env, "http/dup") - client := HTTPClient{ - duplicate: duplicate, - } - client.requestBodySize, client.requestDuration = CurrentHTTPClient{}.createMeasures(meter) - if duplicate { - client.requestBytesCounter, client.responseBytesCounter, client.latencyMeasure = OldHTTPClient{}.createMeasures(meter) - } - - return client -} - -// RequestTraceAttrs returns attributes for an HTTP request made by a client. -func (c HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.RequestTraceAttrs(req) - if c.duplicate { - return OldHTTPClient{}.RequestTraceAttrs(req, attrs) - } - return attrs -} - -// ResponseTraceAttrs returns metric attributes for an HTTP request made by a client. -func (c HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.ResponseTraceAttrs(resp) - if c.duplicate { - return OldHTTPClient{}.ResponseTraceAttrs(resp, attrs) - } - return attrs -} - -func (c HTTPClient) Status(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 400 { - return codes.Error, "" - } - return codes.Unset, "" -} - -func (c HTTPClient) ErrorType(err error) attribute.KeyValue { - return CurrentHTTPClient{}.ErrorType(err) -} - -type MetricOpts struct { - measurement metric.MeasurementOption - addOptions metric.AddOption -} - -func (o MetricOpts) MeasurementOption() metric.MeasurementOption { - return o.measurement -} - -func (o MetricOpts) AddOptions() metric.AddOption { - return o.addOptions -} - -func (c HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts { - opts := map[string]MetricOpts{} - - attributes := CurrentHTTPClient{}.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) - set := metric.WithAttributeSet(attribute.NewSet(attributes...)) - opts["new"] = MetricOpts{ - measurement: set, - addOptions: set, - } - - if c.duplicate { - attributes := OldHTTPClient{}.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) - set := metric.WithAttributeSet(attribute.NewSet(attributes...)) - opts["old"] = MetricOpts{ - measurement: set, - addOptions: set, - } - } - - return opts -} - -func (s HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) { - if s.requestBodySize == nil || s.requestDuration == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.requestBodySize.Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) - s.requestDuration.Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) - - if s.duplicate { - s.requestBytesCounter.Add(ctx, md.RequestSize, opts["old"].AddOptions()) - s.latencyMeasure.Record(ctx, md.ElapsedTime, opts["old"].MeasurementOption()) - } -} - -func (s HTTPClient) RecordResponseSize(ctx context.Context, responseData int64, opts map[string]MetricOpts) { - if s.responseBytesCounter == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.responseBytesCounter.Add(ctx, responseData, opts["old"].AddOptions()) -} - -func (s HTTPClient) TraceAttributes(host string) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.TraceAttributes(host) - if s.duplicate { - return OldHTTPClient{}.TraceAttributes(host, attrs) - } - - return attrs -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go index fd9b8f6ac8f..d6aed214ef9 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go @@ -5,10 +5,11 @@ package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/ // Generate semconv package: //go:generate gotmpl --body=../../../../../../../internal/shared/semconv/bench_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=bench_test.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/env.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=env.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/env_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=env_test.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/httpconv.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=httpconv.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/httpconv_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=httpconv_test.go +//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/common_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=common_test.go +//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/server.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=server.go +//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/server_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=server_test.go +//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/client.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=client.go +//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/client_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=client_test.go +//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/httpconvtest_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=httpconvtest_test.go //go:generate gotmpl --body=../../../../../../../internal/shared/semconv/util.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=util.go //go:generate gotmpl --body=../../../../../../../internal/shared/semconv/util_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=util_test.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/v1.20.0.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=v1.20.0.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/httpconv.go deleted file mode 100644 index e016f0176fc..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/httpconv.go +++ /dev/null @@ -1,573 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/httpconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv provides OpenTelemetry semantic convention types and -// functionality. -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" - -import ( - "fmt" - "net/http" - "reflect" - "slices" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" -) - -type RequestTraceAttrsOpts struct { - // If set, this is used as value for the "http.client_ip" attribute. - HTTPClientIP string -} - -type CurrentHTTPServer struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (n CurrentHTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { - count := 3 // ServerAddress, Method, Scheme - - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - count++ - } - - method, methodOriginal := n.method(req.Method) - if methodOriginal != (attribute.KeyValue{}) { - count++ - } - - scheme := n.scheme(req.TLS != nil) - - peer, peerPort := SplitHostPort(req.RemoteAddr) - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - count++ - if peerPort > 0 { - count++ - } - } - - useragent := req.UserAgent() - if useragent != "" { - count++ - } - - // For client IP, use, in order: - // 1. The value passed in the options - // 2. The value in the X-Forwarded-For header - // 3. The peer address - clientIP := opts.HTTPClientIP - if clientIP == "" { - clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP == "" { - clientIP = peer - } - } - if clientIP != "" { - count++ - } - - if req.URL != nil && req.URL.Path != "" { - count++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - count++ - } - if protoVersion != "" { - count++ - } - - route := httpRoute(req.Pattern) - if route != "" { - count++ - } - - attrs := make([]attribute.KeyValue, 0, count) - attrs = append(attrs, - semconvNew.ServerAddress(host), - method, - scheme, - ) - - if hostPort > 0 { - attrs = append(attrs, semconvNew.ServerPort(hostPort)) - } - if methodOriginal != (attribute.KeyValue{}) { - attrs = append(attrs, methodOriginal) - } - - if peer, peerPort := SplitHostPort(req.RemoteAddr); peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, semconvNew.NetworkPeerAddress(peer)) - if peerPort > 0 { - attrs = append(attrs, semconvNew.NetworkPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, semconvNew.UserAgentOriginal(useragent)) - } - - if clientIP != "" { - attrs = append(attrs, semconvNew.ClientAddress(clientIP)) - } - - if req.URL != nil && req.URL.Path != "" { - attrs = append(attrs, semconvNew.URLPath(req.URL.Path)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if route != "" { - attrs = append(attrs, n.Route(route)) - } - - return attrs -} - -func (n CurrentHTTPServer) NetworkTransportAttr(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return semconvNew.NetworkTransportTCP - case "udp", "udp4", "udp6": - return semconvNew.NetworkTransportUDP - case "unix", "unixgram", "unixpacket": - return semconvNew.NetworkTransportUnix - default: - return semconvNew.NetworkTransportPipe - } -} - -func (n CurrentHTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { - if method == "" { - return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} - } - if attr, ok := methodLookup[method]; ok { - return attr, attribute.KeyValue{} - } - - orig := semconvNew.HTTPRequestMethodOriginal(method) - if attr, ok := methodLookup[strings.ToUpper(method)]; ok { - return attr, orig - } - return semconvNew.HTTPRequestMethodGet, orig -} - -func (n CurrentHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return semconvNew.URLScheme("https") - } - return semconvNew.URLScheme("http") -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP -// response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will -// be omitted. -func (n CurrentHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { - var count int - - if resp.ReadBytes > 0 { - count++ - } - if resp.WriteBytes > 0 { - count++ - } - if resp.StatusCode > 0 { - count++ - } - - attributes := make([]attribute.KeyValue, 0, count) - - if resp.ReadBytes > 0 { - attributes = append(attributes, - semconvNew.HTTPRequestBodySize(int(resp.ReadBytes)), - ) - } - if resp.WriteBytes > 0 { - attributes = append(attributes, - semconvNew.HTTPResponseBodySize(int(resp.WriteBytes)), - ) - } - if resp.StatusCode > 0 { - attributes = append(attributes, - semconvNew.HTTPResponseStatusCode(resp.StatusCode), - ) - } - - return attributes -} - -// Route returns the attribute for the route. -func (n CurrentHTTPServer) Route(route string) attribute.KeyValue { - return semconvNew.HTTPRoute(route) -} - -func (n CurrentHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPServerRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerRequestBodySizeDescription), - ) - handleErr(err) - - responseBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerResponseBodySizeName, - metric.WithUnit(semconvNew.HTTPServerResponseBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerResponseBodySizeDescription), - ) - handleErr(err) - requestDurationHistogram, err := meter.Float64Histogram( - semconvNew.HTTPServerRequestDurationName, - metric.WithUnit(semconvNew.HTTPServerRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPServerRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySizeHistogram, responseBodySizeHistogram, requestDurationHistogram -} - -func (n CurrentHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - num := len(additionalAttributes) + 3 - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - num++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - num++ - } - if protoVersion != "" { - num++ - } - - if statusCode > 0 { - num++ - } - - attributes := slices.Grow(additionalAttributes, num) - attributes = append(attributes, - semconvNew.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), - n.scheme(req.TLS != nil), - semconvNew.ServerAddress(host)) - - if hostPort > 0 { - attributes = append(attributes, semconvNew.ServerPort(hostPort)) - } - if protoName != "" { - attributes = append(attributes, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconvNew.HTTPResponseStatusCode(statusCode)) - } - return attributes -} - -type CurrentHTTPClient struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request made by a client. -func (n CurrentHTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { - /* - below attributes are returned: - - http.request.method - - http.request.method.original - - url.full - - server.address - - server.port - - network.protocol.name - - network.protocol.version - */ - numOfAttributes := 3 // URL, server address, proto, and method. - - var urlHost string - if req.URL != nil { - urlHost = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{urlHost, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - eligiblePort := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if eligiblePort > 0 { - numOfAttributes++ - } - useragent := req.UserAgent() - if useragent != "" { - numOfAttributes++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - numOfAttributes++ - } - if protoVersion != "" { - numOfAttributes++ - } - - method, originalMethod := n.method(req.Method) - if originalMethod != (attribute.KeyValue{}) { - numOfAttributes++ - } - - attrs := make([]attribute.KeyValue, 0, numOfAttributes) - - attrs = append(attrs, method) - if originalMethod != (attribute.KeyValue{}) { - attrs = append(attrs, originalMethod) - } - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, semconvNew.URLFull(u)) - - attrs = append(attrs, semconvNew.ServerAddress(requestHost)) - if eligiblePort > 0 { - attrs = append(attrs, semconvNew.ServerPort(eligiblePort)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - return attrs -} - -// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client. -func (n CurrentHTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { - /* - below attributes are returned: - - http.response.status_code - - error.type - */ - var count int - if resp.StatusCode > 0 { - count++ - } - - if isErrorStatusCode(resp.StatusCode) { - count++ - } - - attrs := make([]attribute.KeyValue, 0, count) - if resp.StatusCode > 0 { - attrs = append(attrs, semconvNew.HTTPResponseStatusCode(resp.StatusCode)) - } - - if isErrorStatusCode(resp.StatusCode) { - errorType := strconv.Itoa(resp.StatusCode) - attrs = append(attrs, semconvNew.ErrorTypeKey.String(errorType)) - } - return attrs -} - -func (n CurrentHTTPClient) ErrorType(err error) attribute.KeyValue { - t := reflect.TypeOf(err) - var value string - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - value = t.String() - } else { - value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) - } - - if value == "" { - return semconvNew.ErrorTypeOther - } - - return semconvNew.ErrorTypeKey.String(value) -} - -func (n CurrentHTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) { - if method == "" { - return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} - } - if attr, ok := methodLookup[method]; ok { - return attr, attribute.KeyValue{} - } - - orig := semconvNew.HTTPRequestMethodOriginal(method) - if attr, ok := methodLookup[strings.ToUpper(method)]; ok { - return attr, orig - } - return semconvNew.HTTPRequestMethodGet, orig -} - -func (n CurrentHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySize, err := meter.Int64Histogram( - semconvNew.HTTPClientRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPClientRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPClientRequestBodySizeDescription), - ) - handleErr(err) - - requestDuration, err := meter.Float64Histogram( - semconvNew.HTTPClientRequestDurationName, - metric.WithUnit(semconvNew.HTTPClientRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPClientRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySize, requestDuration -} - -func (n CurrentHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - num := len(additionalAttributes) + 2 - var h string - if req.URL != nil { - h = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{h, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if port > 0 { - num++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - num++ - } - if protoVersion != "" { - num++ - } - - if statusCode > 0 { - num++ - } - - attributes := slices.Grow(additionalAttributes, num) - attributes = append(attributes, - semconvNew.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), - semconvNew.ServerAddress(requestHost), - n.scheme(req), - ) - - if port > 0 { - attributes = append(attributes, semconvNew.ServerPort(port)) - } - if protoName != "" { - attributes = append(attributes, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconvNew.HTTPResponseStatusCode(statusCode)) - } - return attributes -} - -// TraceAttributes returns attributes for httptrace. -func (n CurrentHTTPClient) TraceAttributes(host string) []attribute.KeyValue { - return []attribute.KeyValue{ - semconvNew.ServerAddress(host), - } -} - -func (n CurrentHTTPClient) scheme(req *http.Request) attribute.KeyValue { - if req.URL != nil && req.URL.Scheme != "" { - return semconvNew.URLScheme(req.URL.Scheme) - } - if req.TLS != nil { - return semconvNew.URLScheme("https") - } - return semconvNew.URLScheme("http") -} - -func isErrorStatusCode(code int) bool { - return code >= 400 || code < 100 -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go new file mode 100644 index 00000000000..5e770b74ad6 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go @@ -0,0 +1,403 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/semconv/server.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv provides OpenTelemetry semantic convention types and +// functionality. +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" + +import ( + "context" + "fmt" + "net/http" + "slices" + "strings" + "sync" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/semconv/v1.37.0/httpconv" +) + +type RequestTraceAttrsOpts struct { + // If set, this is used as value for the "http.client_ip" attribute. + HTTPClientIP string +} + +type ResponseTelemetry struct { + StatusCode int + ReadBytes int64 + ReadError error + WriteBytes int64 + WriteError error +} + +type HTTPServer struct{ + requestBodySizeHistogram httpconv.ServerRequestBodySize + responseBodySizeHistogram httpconv.ServerResponseBodySize + requestDurationHistogram httpconv.ServerRequestDuration +} + +func NewHTTPServer(meter metric.Meter) HTTPServer { + server := HTTPServer{} + + var err error + server.requestBodySizeHistogram, err = httpconv.NewServerRequestBodySize(meter) + handleErr(err) + + server.responseBodySizeHistogram, err = httpconv.NewServerResponseBodySize(meter) + handleErr(err) + + server.requestDurationHistogram, err = httpconv.NewServerRequestDuration( + meter, + metric.WithExplicitBucketBoundaries( + 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, + 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + ), + ) + handleErr(err) + return server +} + +// Status returns a span status code and message for an HTTP status code +// value returned by a server. Status codes in the 400-499 range are not +// returned as errors. +func (n HTTPServer) Status(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 500 { + return codes.Error, "" + } + return codes.Unset, "" +} + +// RequestTraceAttrs returns trace attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +func (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { + count := 3 // ServerAddress, Method, Scheme + + var host string + var p int + if server == "" { + host, p = SplitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = SplitHostPort(server) + if p < 0 { + _, p = SplitHostPort(req.Host) + } + } + + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + count++ + } + + method, methodOriginal := n.method(req.Method) + if methodOriginal != (attribute.KeyValue{}) { + count++ + } + + scheme := n.scheme(req.TLS != nil) + + peer, peerPort := SplitHostPort(req.RemoteAddr) + if peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + count++ + if peerPort > 0 { + count++ + } + } + + useragent := req.UserAgent() + if useragent != "" { + count++ + } + + // For client IP, use, in order: + // 1. The value passed in the options + // 2. The value in the X-Forwarded-For header + // 3. The peer address + clientIP := opts.HTTPClientIP + if clientIP == "" { + clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) + if clientIP == "" { + clientIP = peer + } + } + if clientIP != "" { + count++ + } + + if req.URL != nil && req.URL.Path != "" { + count++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" && protoName != "http" { + count++ + } + if protoVersion != "" { + count++ + } + + route := httpRoute(req.Pattern) + if route != "" { + count++ + } + + attrs := make([]attribute.KeyValue, 0, count) + attrs = append(attrs, + semconv.ServerAddress(host), + method, + scheme, + ) + + if hostPort > 0 { + attrs = append(attrs, semconv.ServerPort(hostPort)) + } + if methodOriginal != (attribute.KeyValue{}) { + attrs = append(attrs, methodOriginal) + } + + if peer, peerPort := SplitHostPort(req.RemoteAddr); peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + attrs = append(attrs, semconv.NetworkPeerAddress(peer)) + if peerPort > 0 { + attrs = append(attrs, semconv.NetworkPeerPort(peerPort)) + } + } + + if useragent != "" { + attrs = append(attrs, semconv.UserAgentOriginal(useragent)) + } + + if clientIP != "" { + attrs = append(attrs, semconv.ClientAddress(clientIP)) + } + + if req.URL != nil && req.URL.Path != "" { + attrs = append(attrs, semconv.URLPath(req.URL.Path)) + } + + if protoName != "" && protoName != "http" { + attrs = append(attrs, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion)) + } + + if route != "" { + attrs = append(attrs, n.Route(route)) + } + + return attrs +} + +func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue { + attr := semconv.NetworkTransportPipe + switch network { + case "tcp", "tcp4", "tcp6": + attr = semconv.NetworkTransportTCP + case "udp", "udp4", "udp6": + attr = semconv.NetworkTransportUDP + case "unix", "unixgram", "unixpacket": + attr = semconv.NetworkTransportUnix + } + + return []attribute.KeyValue{attr} +} + +type ServerMetricData struct { + ServerName string + ResponseSize int64 + + MetricData + MetricAttributes +} + +type MetricAttributes struct { + Req *http.Request + StatusCode int + Route string + AdditionalAttributes []attribute.KeyValue +} + +type MetricData struct { + RequestSize int64 + + // The request duration, in milliseconds + ElapsedTime float64 +} + +var ( + metricAddOptionPool = &sync.Pool{ + New: func() any { + return &[]metric.AddOption{} + }, + } + + metricRecordOptionPool = &sync.Pool{ + New: func() any { + return &[]metric.RecordOption{} + }, + } +) + +func (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) { + attributes := n.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.Route, md.AdditionalAttributes) + o := metric.WithAttributeSet(attribute.NewSet(attributes...)) + recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) + *recordOpts = append(*recordOpts, o) + n.requestBodySizeHistogram.Inst().Record(ctx, md.RequestSize, *recordOpts...) + n.responseBodySizeHistogram.Inst().Record(ctx, md.ResponseSize, *recordOpts...) + n.requestDurationHistogram.Inst().Record(ctx, md.ElapsedTime/1000.0, o) + *recordOpts = (*recordOpts)[:0] + metricRecordOptionPool.Put(recordOpts) +} + +func (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { + if method == "" { + return semconv.HTTPRequestMethodGet, attribute.KeyValue{} + } + if attr, ok := methodLookup[method]; ok { + return attr, attribute.KeyValue{} + } + + orig := semconv.HTTPRequestMethodOriginal(method) + if attr, ok := methodLookup[strings.ToUpper(method)]; ok { + return attr, orig + } + return semconv.HTTPRequestMethodGet, orig +} + +func (n HTTPServer) scheme(https bool) attribute.KeyValue { //nolint:revive // ignore linter + if https { + return semconv.URLScheme("https") + } + return semconv.URLScheme("http") +} + +// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP +// response. +// +// If any of the fields in the ResponseTelemetry are not set the attribute will +// be omitted. +func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { + var count int + + if resp.ReadBytes > 0 { + count++ + } + if resp.WriteBytes > 0 { + count++ + } + if resp.StatusCode > 0 { + count++ + } + + attributes := make([]attribute.KeyValue, 0, count) + + if resp.ReadBytes > 0 { + attributes = append(attributes, + semconv.HTTPRequestBodySize(int(resp.ReadBytes)), + ) + } + if resp.WriteBytes > 0 { + attributes = append(attributes, + semconv.HTTPResponseBodySize(int(resp.WriteBytes)), + ) + } + if resp.StatusCode > 0 { + attributes = append(attributes, + semconv.HTTPResponseStatusCode(resp.StatusCode), + ) + } + + return attributes +} + +// Route returns the attribute for the route. +func (n HTTPServer) Route(route string) attribute.KeyValue { + return semconv.HTTPRoute(route) +} + +func (n HTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, route string, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { + num := len(additionalAttributes) + 3 + var host string + var p int + if server == "" { + host, p = SplitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = SplitHostPort(server) + if p < 0 { + _, p = SplitHostPort(req.Host) + } + } + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + num++ + } + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" { + num++ + } + if protoVersion != "" { + num++ + } + + if statusCode > 0 { + num++ + } + + if route != "" { + num++ + } + + attributes := slices.Grow(additionalAttributes, num) + attributes = append(attributes, + semconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), + n.scheme(req.TLS != nil), + semconv.ServerAddress(host)) + + if hostPort > 0 { + attributes = append(attributes, semconv.ServerPort(hostPort)) + } + if protoName != "" { + attributes = append(attributes, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attributes = append(attributes, semconv.NetworkProtocolVersion(protoVersion)) + } + + if statusCode > 0 { + attributes = append(attributes, semconv.HTTPResponseStatusCode(statusCode)) + } + + if route != "" { + attributes = append(attributes, semconv.HTTPRoute(route)) + } + return attributes +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go index 18dc1c77f45..f058139d1a6 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" + semconvNew "go.opentelemetry.io/otel/semconv/v1.37.0" ) // SplitHostPort splits a network address hostport of the form "host", @@ -53,10 +53,10 @@ func SplitHostPort(hostport string) (host string, port int) { if err != nil { return } - return host, int(p) // nolint: gosec // Byte size checked 16 above. + return host, int(p) //nolint:gosec // Byte size checked 16 above. } -func requiredHTTPPort(https bool, port int) int { // nolint:revive +func requiredHTTPPort(https bool, port int) int { //nolint:revive // ignore linter if https { if port > 0 && port != 443 { return port diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/v1.20.0.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/v1.20.0.go deleted file mode 100644 index d5fc58708a2..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/v1.20.0.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/v120.0.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv" - -import ( - "errors" - "io" - "net/http" - "slices" - - "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -type OldHTTPServer struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (o OldHTTPServer) RequestTraceAttrs(server string, req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPServerRequest(server, req, semconvutil.HTTPServerRequestOptions{}, attrs) -} - -func (o OldHTTPServer) NetworkTransportAttr(network string) attribute.KeyValue { - return semconvutil.NetTransport(network) -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. -func (o OldHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry, attributes []attribute.KeyValue) []attribute.KeyValue { - if resp.ReadBytes > 0 { - attributes = append(attributes, semconv.HTTPRequestContentLength(int(resp.ReadBytes))) - } - if resp.ReadError != nil && !errors.Is(resp.ReadError, io.EOF) { - // This is not in the semantic conventions, but is historically provided - attributes = append(attributes, attribute.String("http.read_error", resp.ReadError.Error())) - } - if resp.WriteBytes > 0 { - attributes = append(attributes, semconv.HTTPResponseContentLength(int(resp.WriteBytes))) - } - if resp.StatusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(resp.StatusCode)) - } - if resp.WriteError != nil && !errors.Is(resp.WriteError, io.EOF) { - // This is not in the semantic conventions, but is historically provided - attributes = append(attributes, attribute.String("http.write_error", resp.WriteError.Error())) - } - - return attributes -} - -// Route returns the attribute for the route. -func (o OldHTTPServer) Route(route string) attribute.KeyValue { - return semconv.HTTPRoute(route) -} - -// HTTPStatusCode returns the attribute for the HTTP status code. -// This is a temporary function needed by metrics. This will be removed when MetricsRequest is added. -func HTTPStatusCode(status int) attribute.KeyValue { - return semconv.HTTPStatusCode(status) -} - -// Server HTTP metrics. -const ( - serverRequestSize = "http.server.request.size" // Incoming request bytes total - serverResponseSize = "http.server.response.size" // Incoming response bytes total - serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds -) - -func (h OldHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Counter, metric.Int64Counter, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Counter{}, noop.Int64Counter{}, noop.Float64Histogram{} - } - var err error - requestBytesCounter, err := meter.Int64Counter( - serverRequestSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP request messages."), - ) - handleErr(err) - - responseBytesCounter, err := meter.Int64Counter( - serverResponseSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP response messages."), - ) - handleErr(err) - - serverLatencyMeasure, err := meter.Float64Histogram( - serverDuration, - metric.WithUnit("ms"), - metric.WithDescription("Measures the duration of inbound HTTP requests."), - ) - handleErr(err) - - return requestBytesCounter, responseBytesCounter, serverLatencyMeasure -} - -func (o OldHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - n := len(additionalAttributes) + 3 - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - n++ - } - if protoVersion != "" { - n++ - } - - if statusCode > 0 { - n++ - } - - attributes := slices.Grow(additionalAttributes, n) - attributes = append(attributes, - semconv.HTTPMethod(standardizeHTTPMethod(req.Method)), - o.scheme(req.TLS != nil), - semconv.NetHostName(host)) - - if hostPort > 0 { - attributes = append(attributes, semconv.NetHostPort(hostPort)) - } - if protoName != "" { - attributes = append(attributes, semconv.NetProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconv.NetProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(statusCode)) - } - return attributes -} - -func (o OldHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return semconv.HTTPSchemeHTTPS - } - return semconv.HTTPSchemeHTTP -} - -type OldHTTPClient struct{} - -func (o OldHTTPClient) RequestTraceAttrs(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPClientRequest(req, attrs) -} - -func (o OldHTTPClient) ResponseTraceAttrs(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPClientResponse(resp, attrs) -} - -func (o OldHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - http.status_code int - net.peer.name string - net.peer.port int - */ - - n := 2 // method, peer name. - var h string - if req.URL != nil { - h = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{h, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if port > 0 { - n++ - } - - if statusCode > 0 { - n++ - } - - attributes := slices.Grow(additionalAttributes, n) - attributes = append(attributes, - semconv.HTTPMethod(standardizeHTTPMethod(req.Method)), - semconv.NetPeerName(requestHost), - ) - - if port > 0 { - attributes = append(attributes, semconv.NetPeerPort(port)) - } - - if statusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(statusCode)) - } - return attributes -} - -// Client HTTP metrics. -const ( - clientRequestSize = "http.client.request.size" // Incoming request bytes total - clientResponseSize = "http.client.response.size" // Incoming response bytes total - clientDuration = "http.client.duration" // Incoming end to end duration, milliseconds -) - -func (o OldHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Counter, metric.Int64Counter, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Counter{}, noop.Int64Counter{}, noop.Float64Histogram{} - } - requestBytesCounter, err := meter.Int64Counter( - clientRequestSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP request messages."), - ) - handleErr(err) - - responseBytesCounter, err := meter.Int64Counter( - clientResponseSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP response messages."), - ) - handleErr(err) - - latencyMeasure, err := meter.Float64Histogram( - clientDuration, - metric.WithUnit("ms"), - metric.WithDescription("Measures the duration of outbound HTTP requests."), - ) - handleErr(err) - - return requestBytesCounter, responseBytesCounter, latencyMeasure -} - -// TraceAttributes returns attributes for httptrace. -func (c OldHTTPClient) TraceAttributes(host string, attrs []attribute.KeyValue) []attribute.KeyValue { - return append(attrs, semconv.NetHostName(host)) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/gen.go deleted file mode 100644 index 4e9c361102e..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil" - -// Generate semconvutil package: -//go:generate gotmpl --body=../../../../../../../internal/shared/semconvutil/httpconv_test.go.tmpl "--data={}" --out=httpconv_test.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconvutil/httpconv.go.tmpl "--data={}" --out=httpconv.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconvutil/netconv_test.go.tmpl "--data={}" --out=netconv_test.go -//go:generate gotmpl --body=../../../../../../../internal/shared/semconvutil/netconv.go.tmpl "--data={}" --out=netconv.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/httpconv.go deleted file mode 100644 index 76004b734bf..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/httpconv.go +++ /dev/null @@ -1,594 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconvutil/httpconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconvutil provides OpenTelemetry semantic convention utilities. -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil" - -import ( - "fmt" - "net/http" - "slices" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -type HTTPServerRequestOptions struct { - // If set, this is used as value for the "http.client_ip" attribute. - HTTPClientIP string -} - -// HTTPClientResponse returns trace attributes for an HTTP response received by a -// client from a server. It will return the following attributes if the related -// values are defined in resp: "http.status.code", -// "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// HTTPClientResponse(resp, ClientRequest(resp.Request))) -func HTTPClientResponse(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ClientResponse(resp, attrs) -} - -// HTTPClientRequest returns trace attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.url", "http.method", -// "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "user_agent.original", -// "http.request_content_length". -func HTTPClientRequest(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ClientRequest(req, attrs) -} - -// HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.method", "net.peer.name". -// The following attributes are returned if the -// related values are defined in req: "net.peer.port". -func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue { - return hc.ClientRequestMetrics(req) -} - -// HTTPClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func HTTPClientStatus(code int) (codes.Code, string) { - return hc.ClientStatus(code) -} - -// HTTPServerRequest returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.target", "net.host.name". The following attributes are returned if -// they related values are defined in req: "net.host.port", "net.sock.peer.addr", -// "net.sock.peer.port", "user_agent.original", "http.client_ip". -func HTTPServerRequest(server string, req *http.Request, opts HTTPServerRequestOptions, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ServerRequest(server, req, opts, attrs) -} - -// HTTPServerRequestMetrics returns metric attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "net.host.name". The following attributes are returned if they related -// values are defined in req: "net.host.port". -func HTTPServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { - return hc.ServerRequestMetrics(server, req) -} - -// HTTPServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func HTTPServerStatus(code int) (codes.Code, string) { - return hc.ServerStatus(code) -} - -// httpConv are the HTTP semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type httpConv struct { - NetConv *netConv - - HTTPClientIPKey attribute.Key - HTTPMethodKey attribute.Key - HTTPRequestContentLengthKey attribute.Key - HTTPResponseContentLengthKey attribute.Key - HTTPRouteKey attribute.Key - HTTPSchemeHTTP attribute.KeyValue - HTTPSchemeHTTPS attribute.KeyValue - HTTPStatusCodeKey attribute.Key - HTTPTargetKey attribute.Key - HTTPURLKey attribute.Key - UserAgentOriginalKey attribute.Key -} - -var hc = &httpConv{ - NetConv: nc, - - HTTPClientIPKey: semconv.HTTPClientIPKey, - HTTPMethodKey: semconv.HTTPMethodKey, - HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey, - HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey, - HTTPRouteKey: semconv.HTTPRouteKey, - HTTPSchemeHTTP: semconv.HTTPSchemeHTTP, - HTTPSchemeHTTPS: semconv.HTTPSchemeHTTPS, - HTTPStatusCodeKey: semconv.HTTPStatusCodeKey, - HTTPTargetKey: semconv.HTTPTargetKey, - HTTPURLKey: semconv.HTTPURLKey, - UserAgentOriginalKey: semconv.UserAgentOriginalKey, -} - -// ClientResponse returns attributes for an HTTP response received by a client -// from a server. The following attributes are returned if the related values -// are defined in resp: "http.status.code", "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// ClientResponse(resp, ClientRequest(resp.Request)) -func (c *httpConv) ClientResponse(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.status_code int - http.response_content_length int - */ - var n int - if resp.StatusCode > 0 { - n++ - } - if resp.ContentLength > 0 { - n++ - } - if n == 0 { - return attrs - } - - attrs = slices.Grow(attrs, n) - if resp.StatusCode > 0 { - attrs = append(attrs, c.HTTPStatusCodeKey.Int(resp.StatusCode)) - } - if resp.ContentLength > 0 { - attrs = append(attrs, c.HTTPResponseContentLengthKey.Int(int(resp.ContentLength))) - } - return attrs -} - -// ClientRequest returns attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.url", "http.method", -// "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "user_agent.original", -// "http.request_content_length", "user_agent.original". -func (c *httpConv) ClientRequest(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - user_agent.original string - http.url string - net.peer.name string - net.peer.port int - http.request_content_length int - */ - - /* The following semantic conventions are not returned: - http.status_code This requires the response. See ClientResponse. - http.response_content_length This requires the response. See ClientResponse. - net.sock.family This requires the socket used. - net.sock.peer.addr This requires the socket used. - net.sock.peer.name This requires the socket used. - net.sock.peer.port This requires the socket used. - http.resend_count This is something outside of a single request. - net.protocol.name The value is the Request is ignored, and the go client will always use "http". - net.protocol.version The value in the Request is ignored, and the go client will always use 1.1 or 2.0. - */ - n := 3 // URL, peer name, proto, and method. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - if req.ContentLength > 0 { - n++ - } - - attrs = slices.Grow(attrs, n) - attrs = append(attrs, c.method(req.Method)) - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, c.HTTPURLKey.String(u)) - - attrs = append(attrs, c.NetConv.PeerName(peer)) - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - if useragent != "" { - attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) - } - - if l := req.ContentLength; l > 0 { - attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l)) - } - - return attrs -} - -// ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.method", "net.peer.name". -// The following attributes are returned if the related values -// are defined in req: "net.peer.port". -func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - net.peer.name string - net.peer.port int - */ - - n := 2 // method, peer name. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer)) - - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - return attrs -} - -// ServerRequest returns attributes for an HTTP request received by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.target", "net.host.name". The following attributes are returned if they -// related values are defined in req: "net.host.port", "net.sock.peer.addr", -// "net.sock.peer.port", "user_agent.original", "http.client_ip", -// "net.protocol.name", "net.protocol.version". -func (c *httpConv) ServerRequest(server string, req *http.Request, opts HTTPServerRequestOptions, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - http.scheme string - net.host.name string - net.host.port int - net.sock.peer.addr string - net.sock.peer.port int - user_agent.original string - http.client_ip string - net.protocol.name string Note: not set if the value is "http". - net.protocol.version string - http.target string Note: doesn't include the query parameter. - */ - - /* The following semantic conventions are not returned: - http.status_code This requires the response. - http.request_content_length This requires the len() of body, which can mutate it. - http.response_content_length This requires the response. - http.route This is not available. - net.sock.peer.name This would require a DNS lookup. - net.sock.host.addr The request doesn't have access to the underlying socket. - net.sock.host.port The request doesn't have access to the underlying socket. - - */ - n := 4 // Method, scheme, proto, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - peer, peerPort := splitHostPort(req.RemoteAddr) - if peer != "" { - n++ - if peerPort > 0 { - n++ - } - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - - // For client IP, use, in order: - // 1. The value passed in the options - // 2. The value in the X-Forwarded-For header - // 3. The peer address - clientIP := opts.HTTPClientIP - if clientIP == "" { - clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP == "" { - clientIP = peer - } - } - if clientIP != "" { - n++ - } - - var target string - if req.URL != nil { - target = req.URL.Path - if target != "" { - n++ - } - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - n++ - } - if protoVersion != "" { - n++ - } - - attrs = slices.Grow(attrs, n) - - attrs = append(attrs, c.method(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, c.NetConv.SockPeerAddr(peer)) - if peerPort > 0 { - attrs = append(attrs, c.NetConv.SockPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) - } - - if clientIP != "" { - attrs = append(attrs, c.HTTPClientIPKey.String(clientIP)) - } - - if target != "" { - attrs = append(attrs, c.HTTPTargetKey.String(target)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) - } - - return attrs -} - -// ServerRequestMetrics returns metric attributes for an HTTP request received -// by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "net.host.name". The following attributes are returned if they related -// values are defined in req: "net.host.port". -func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.scheme string - http.route string - http.method string - http.status_code int - net.host.name string - net.host.port int - net.protocol.name string Note: not set if the value is "http". - net.protocol.version string - */ - - n := 3 // Method, scheme, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - n++ - } - if protoVersion != "" { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - - attrs = append(attrs, c.methodMetric(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - if protoName != "" { - attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) - } - - return attrs -} - -func (c *httpConv) method(method string) attribute.KeyValue { - if method == "" { - return c.HTTPMethodKey.String(http.MethodGet) - } - return c.HTTPMethodKey.String(method) -} - -func (c *httpConv) methodMetric(method string) attribute.KeyValue { - method = strings.ToUpper(method) - switch method { - case http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace: - default: - method = "_OTHER" - } - return c.HTTPMethodKey.String(method) -} - -func (c *httpConv) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return c.HTTPSchemeHTTPS - } - return c.HTTPSchemeHTTP -} - -func serverClientIP(xForwardedFor string) string { - if idx := strings.Index(xForwardedFor, ","); idx >= 0 { - xForwardedFor = xForwardedFor[:idx] - } - return xForwardedFor -} - -func requiredHTTPPort(https bool, port int) int { // nolint:revive - if https { - if port > 0 && port != 443 { - return port - } - } else { - if port > 0 && port != 80 { - return port - } - } - return -1 -} - -// Return the request host and port from the first non-empty source. -func firstHostPort(source ...string) (host string, port int) { - for _, hostport := range source { - host, port = splitHostPort(hostport) - if host != "" || port > 0 { - break - } - } - return -} - -// ClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func (c *httpConv) ClientStatus(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 400 { - return codes.Error, "" - } - return codes.Unset, "" -} - -// ServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (c *httpConv) ServerStatus(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 500 { - return codes.Error, "" - } - return codes.Unset, "" -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go deleted file mode 100644 index 1cb0e4a245e..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconvutil/netconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil" - -import ( - "net" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -// NetTransport returns a trace attribute describing the transport protocol of the -// passed network. See the net.Dial for information about acceptable network -// values. -func NetTransport(network string) attribute.KeyValue { - return nc.Transport(network) -} - -// netConv are the network semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type netConv struct { - NetHostNameKey attribute.Key - NetHostPortKey attribute.Key - NetPeerNameKey attribute.Key - NetPeerPortKey attribute.Key - NetProtocolName attribute.Key - NetProtocolVersion attribute.Key - NetSockFamilyKey attribute.Key - NetSockPeerAddrKey attribute.Key - NetSockPeerPortKey attribute.Key - NetSockHostAddrKey attribute.Key - NetSockHostPortKey attribute.Key - NetTransportOther attribute.KeyValue - NetTransportTCP attribute.KeyValue - NetTransportUDP attribute.KeyValue - NetTransportInProc attribute.KeyValue -} - -var nc = &netConv{ - NetHostNameKey: semconv.NetHostNameKey, - NetHostPortKey: semconv.NetHostPortKey, - NetPeerNameKey: semconv.NetPeerNameKey, - NetPeerPortKey: semconv.NetPeerPortKey, - NetProtocolName: semconv.NetProtocolNameKey, - NetProtocolVersion: semconv.NetProtocolVersionKey, - NetSockFamilyKey: semconv.NetSockFamilyKey, - NetSockPeerAddrKey: semconv.NetSockPeerAddrKey, - NetSockPeerPortKey: semconv.NetSockPeerPortKey, - NetSockHostAddrKey: semconv.NetSockHostAddrKey, - NetSockHostPortKey: semconv.NetSockHostPortKey, - NetTransportOther: semconv.NetTransportOther, - NetTransportTCP: semconv.NetTransportTCP, - NetTransportUDP: semconv.NetTransportUDP, - NetTransportInProc: semconv.NetTransportInProc, -} - -func (c *netConv) Transport(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return c.NetTransportTCP - case "udp", "udp4", "udp6": - return c.NetTransportUDP - case "unix", "unixgram", "unixpacket": - return c.NetTransportInProc - default: - // "ip:*", "ip4:*", and "ip6:*" all are considered other. - return c.NetTransportOther - } -} - -// Host returns attributes for a network host address. -func (c *netConv) Host(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.HostName(h)) - if p > 0 { - attrs = append(attrs, c.HostPort(p)) - } - return attrs -} - -func (c *netConv) HostName(name string) attribute.KeyValue { - return c.NetHostNameKey.String(name) -} - -func (c *netConv) HostPort(port int) attribute.KeyValue { - return c.NetHostPortKey.Int(port) -} - -func family(network, address string) string { - switch network { - case "unix", "unixgram", "unixpacket": - return "unix" - default: - if ip := net.ParseIP(address); ip != nil { - if ip.To4() == nil { - return "inet6" - } - return "inet" - } - } - return "" -} - -// Peer returns attributes for a network peer address. -func (c *netConv) Peer(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.PeerName(h)) - if p > 0 { - attrs = append(attrs, c.PeerPort(p)) - } - return attrs -} - -func (c *netConv) PeerName(name string) attribute.KeyValue { - return c.NetPeerNameKey.String(name) -} - -func (c *netConv) PeerPort(port int) attribute.KeyValue { - return c.NetPeerPortKey.Int(port) -} - -func (c *netConv) SockPeerAddr(addr string) attribute.KeyValue { - return c.NetSockPeerAddrKey.String(addr) -} - -func (c *netConv) SockPeerPort(port int) attribute.KeyValue { - return c.NetSockPeerPortKey.Int(port) -} - -// splitHostPort splits a network address hostport of the form "host", -// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", -// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and -// port. -// -// An empty host is returned if it is not provided or unparsable. A negative -// port is returned if it is not provided or unparsable. -func splitHostPort(hostport string) (host string, port int) { - port = -1 - - if strings.HasPrefix(hostport, "[") { - addrEnd := strings.LastIndex(hostport, "]") - if addrEnd < 0 { - // Invalid hostport. - return - } - if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { - host = hostport[1:addrEnd] - return - } - } else { - if i := strings.LastIndex(hostport, ":"); i < 0 { - host = hostport - return - } - } - - host, pStr, err := net.SplitHostPort(hostport) - if err != nil { - return - } - - p, err := strconv.ParseUint(pStr, 10, 16) - if err != nil { - return - } - return host, int(p) // nolint: gosec // Bitsize checked to be 16 above. -} - -func netProtocol(proto string) (name string, version string) { - name, version, _ = strings.Cut(proto, "/") - switch name { - case "HTTP": - name = "http" - case "QUIC": - name = "quic" - case "SPDY": - name = "spdy" - default: - name = strings.ToLower(name) - } - return name, version -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go index 74bc899de2c..ba8a5df0edd 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go @@ -5,6 +5,6 @@ package otelhttptrace // import "go.opentelemetry.io/contrib/instrumentation/net // Version is the current release version of the httptrace instrumentation. func Version() string { - return "0.61.0" + return "0.64.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE index 261eeb9e9f8..f1aee0f1100 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE @@ -199,3 +199,33 @@ 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go index b25641c55d3..e980ab62b85 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go @@ -14,11 +14,17 @@ import ( // DefaultClient is the default Client and is used by Get, Head, Post and PostForm. // Please be careful of initialization order - for example, if you change // the global propagator, the DefaultClient might still be using the old one. +// +// Deprecated: [DefaultClient] will be removed in a future release. +// Create your own [http.Client] based on the [Transport] example: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#example-NewTransport var DefaultClient = &http.Client{Transport: NewTransport(http.DefaultTransport)} // Get is a convenient replacement for http.Get that adds a span around the request. +// +// Deprecated: [Get] will be removed in a future release. +// Create your own [http.Client] based on the [Transport] example: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#example-NewTransport func Get(ctx context.Context, targetURL string) (resp *http.Response, err error) { - req, err := http.NewRequestWithContext(ctx, http.MethodGet, targetURL, nil) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, targetURL, http.NoBody) if err != nil { return nil, err } @@ -26,8 +32,11 @@ func Get(ctx context.Context, targetURL string) (resp *http.Response, err error) } // Head is a convenient replacement for http.Head that adds a span around the request. +// +// Deprecated: [Head] will be removed in a future release. +// Create your own [http.Client] based on the [Transport] example: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#example-NewTransport func Head(ctx context.Context, targetURL string) (resp *http.Response, err error) { - req, err := http.NewRequestWithContext(ctx, http.MethodHead, targetURL, nil) + req, err := http.NewRequestWithContext(ctx, http.MethodHead, targetURL, http.NoBody) if err != nil { return nil, err } @@ -35,6 +44,9 @@ func Head(ctx context.Context, targetURL string) (resp *http.Response, err error } // Post is a convenient replacement for http.Post that adds a span around the request. +// +// Deprecated: [Post] will be removed in a future release. +// Create your own [http.Client] based on the [Transport] example: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#example-NewTransport func Post(ctx context.Context, targetURL, contentType string, body io.Reader) (resp *http.Response, err error) { req, err := http.NewRequestWithContext(ctx, http.MethodPost, targetURL, body) if err != nil { @@ -45,6 +57,9 @@ func Post(ctx context.Context, targetURL, contentType string, body io.Reader) (r } // PostForm is a convenient replacement for http.PostForm that adds a span around the request. +// +// Deprecated: [PostForm] will be removed in a future release. +// Create your own [http.Client] based on the [Transport] example: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#example-NewTransport func PostForm(ctx context.Context, targetURL string, data url.Values) (resp *http.Response, err error) { return Post(ctx, targetURL, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go index 6bd50d4c9b4..c3be78616b2 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go @@ -8,9 +8,8 @@ import ( "net/http" "net/http/httptrace" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" @@ -27,7 +26,6 @@ type config struct { Meter metric.Meter Propagators propagation.TextMapPropagator SpanStartOptions []trace.SpanStartOption - PublicEndpoint bool PublicEndpointFn func(*http.Request) bool ReadEvent bool WriteEvent bool @@ -97,17 +95,19 @@ func WithMeterProvider(provider metric.MeterProvider) Option { // WithPublicEndpoint configures the Handler to link the span with an incoming // span context. If this option is not provided, then the association is a child // association instead of a link. +// +// Deprecated: Use [WithPublicEndpointFn] instead. +// To migrate, replace WithPublicEndpoint() with: +// +// WithPublicEndpointFn(func(*http.Request) bool { return true }) func WithPublicEndpoint() Option { - return optionFunc(func(c *config) { - c.PublicEndpoint = true - }) + return WithPublicEndpointFn(func(*http.Request) bool { return true }) } // WithPublicEndpointFn runs with every request, and allows conditionally // configuring the Handler to link the span with an incoming span context. If // this option is not provided or returns false, then the association is a // child association instead of a link. -// Note: WithPublicEndpoint takes precedence over WithPublicEndpointFn. func WithPublicEndpointFn(fn func(*http.Request) bool) Option { return optionFunc(func(c *config) { c.PublicEndpointFn = fn @@ -144,11 +144,13 @@ func WithFilter(f Filter) Option { }) } -type event int +// Event represents message event types for [WithMessageEvents]. +type Event int // Different types of events that can be recorded, see WithMessageEvents. const ( - ReadEvents event = iota + unspecifiedEvents Event = iota + ReadEvents WriteEvents ) @@ -161,7 +163,7 @@ const ( // using the ReadBytesKey // - WriteEvents: Record the number of bytes written after every http.ResponeWriter.Write // using the WriteBytesKey -func WithMessageEvents(events ...event) Option { +func WithMessageEvents(events ...Event) Option { return optionFunc(func(c *config) { for _, e := range events { switch e { diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go index 56b24b982ae..1c9aa3ff425 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go @@ -2,6 +2,5 @@ // SPDX-License-Identifier: Apache-2.0 // Package otelhttp provides an http.Handler and functions that are intended -// to be used to add tracing by wrapping existing handlers (with Handler) and -// routes WithRouteTag. +// to be used to add tracing by wrapping existing handlers. package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go index 937f9b4e737..c1bbf3a3c2d 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go @@ -8,13 +8,13 @@ import ( "time" "github.com/felixge/httpsnoop" - - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" ) // middleware is an http middleware which wraps the next handler in a span. @@ -29,7 +29,6 @@ type middleware struct { writeEvent bool filters []Filter spanNameFormatter func(string, *http.Request) string - publicEndpoint bool publicEndpointFn func(*http.Request) bool metricAttributesFn func(*http.Request) []attribute.KeyValue @@ -77,7 +76,6 @@ func (h *middleware) configure(c *config) { h.writeEvent = c.WriteEvent h.filters = c.Filters h.spanNameFormatter = c.SpanNameFormatter - h.publicEndpoint = c.PublicEndpoint h.publicEndpointFn = c.PublicEndpointFn h.server = c.ServerName h.semconv = semconv.NewHTTPServer(c.Meter) @@ -102,7 +100,7 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http } opts = append(opts, h.spanStartOptions...) - if h.publicEndpoint || (h.publicEndpointFn != nil && h.publicEndpointFn(r.WithContext(ctx))) { + if h.publicEndpointFn != nil && h.publicEndpointFn(r.WithContext(ctx)) { opts = append(opts, trace.WithNewRoot()) // Linking incoming span context if any for public endpoint. if s := trace.SpanContextFromContext(ctx); s.IsValid() && s.IsRemote() { @@ -224,6 +222,9 @@ func (h *middleware) metricAttributesFromRequest(r *http.Request) []attribute.Ke // WithRouteTag annotates spans and metrics with the provided route name // with HTTP route attribute. +// +// Deprecated: spans are automatically annotated with the route attribute. +// To annotate metrics, use the [WithMetricAttributesFn] option. func WithRouteTag(route string, h http.Handler) http.Handler { attr := semconv.NewHTTPServer(nil).Route(route) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go new file mode 100644 index 00000000000..45d3d934f52 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go @@ -0,0 +1,305 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/semconv/client.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv provides OpenTelemetry semantic convention types and +// functionality. +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + +import ( + "context" + "fmt" + "net/http" + "reflect" + "slices" + "strconv" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/semconv/v1.37.0/httpconv" +) + +type HTTPClient struct{ + requestBodySize httpconv.ClientRequestBodySize + requestDuration httpconv.ClientRequestDuration +} + +func NewHTTPClient(meter metric.Meter) HTTPClient { + client := HTTPClient{} + + var err error + client.requestBodySize, err = httpconv.NewClientRequestBodySize(meter) + handleErr(err) + + client.requestDuration, err = httpconv.NewClientRequestDuration( + meter, + metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), + ) + handleErr(err) + + return client +} + +func (n HTTPClient) Status(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 400 { + return codes.Error, "" + } + return codes.Unset, "" +} + +// RequestTraceAttrs returns trace attributes for an HTTP request made by a client. +func (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { + /* + below attributes are returned: + - http.request.method + - http.request.method.original + - url.full + - server.address + - server.port + - network.protocol.name + - network.protocol.version + */ + numOfAttributes := 3 // URL, server address, proto, and method. + + var urlHost string + if req.URL != nil { + urlHost = req.URL.Host + } + var requestHost string + var requestPort int + for _, hostport := range []string{urlHost, req.Header.Get("Host")} { + requestHost, requestPort = SplitHostPort(hostport) + if requestHost != "" || requestPort > 0 { + break + } + } + + eligiblePort := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) + if eligiblePort > 0 { + numOfAttributes++ + } + useragent := req.UserAgent() + if useragent != "" { + numOfAttributes++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" && protoName != "http" { + numOfAttributes++ + } + if protoVersion != "" { + numOfAttributes++ + } + + method, originalMethod := n.method(req.Method) + if originalMethod != (attribute.KeyValue{}) { + numOfAttributes++ + } + + attrs := make([]attribute.KeyValue, 0, numOfAttributes) + + attrs = append(attrs, method) + if originalMethod != (attribute.KeyValue{}) { + attrs = append(attrs, originalMethod) + } + + var u string + if req.URL != nil { + // Remove any username/password info that may be in the URL. + userinfo := req.URL.User + req.URL.User = nil + u = req.URL.String() + // Restore any username/password info that was removed. + req.URL.User = userinfo + } + attrs = append(attrs, semconv.URLFull(u)) + + attrs = append(attrs, semconv.ServerAddress(requestHost)) + if eligiblePort > 0 { + attrs = append(attrs, semconv.ServerPort(eligiblePort)) + } + + if protoName != "" && protoName != "http" { + attrs = append(attrs, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion)) + } + + return attrs +} + +// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client. +func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { + /* + below attributes are returned: + - http.response.status_code + - error.type + */ + var count int + if resp.StatusCode > 0 { + count++ + } + + if isErrorStatusCode(resp.StatusCode) { + count++ + } + + attrs := make([]attribute.KeyValue, 0, count) + if resp.StatusCode > 0 { + attrs = append(attrs, semconv.HTTPResponseStatusCode(resp.StatusCode)) + } + + if isErrorStatusCode(resp.StatusCode) { + errorType := strconv.Itoa(resp.StatusCode) + attrs = append(attrs, semconv.ErrorTypeKey.String(errorType)) + } + return attrs +} + +func (n HTTPClient) ErrorType(err error) attribute.KeyValue { + t := reflect.TypeOf(err) + var value string + if t.PkgPath() == "" && t.Name() == "" { + // Likely a builtin type. + value = t.String() + } else { + value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) + } + + if value == "" { + return semconv.ErrorTypeOther + } + + return semconv.ErrorTypeKey.String(value) +} + +func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) { + if method == "" { + return semconv.HTTPRequestMethodGet, attribute.KeyValue{} + } + if attr, ok := methodLookup[method]; ok { + return attr, attribute.KeyValue{} + } + + orig := semconv.HTTPRequestMethodOriginal(method) + if attr, ok := methodLookup[strings.ToUpper(method)]; ok { + return attr, orig + } + return semconv.HTTPRequestMethodGet, orig +} + +func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { + num := len(additionalAttributes) + 2 + var h string + if req.URL != nil { + h = req.URL.Host + } + var requestHost string + var requestPort int + for _, hostport := range []string{h, req.Header.Get("Host")} { + requestHost, requestPort = SplitHostPort(hostport) + if requestHost != "" || requestPort > 0 { + break + } + } + + port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) + if port > 0 { + num++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" { + num++ + } + if protoVersion != "" { + num++ + } + + if statusCode > 0 { + num++ + } + + attributes := slices.Grow(additionalAttributes, num) + attributes = append(attributes, + semconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), + semconv.ServerAddress(requestHost), + n.scheme(req), + ) + + if port > 0 { + attributes = append(attributes, semconv.ServerPort(port)) + } + if protoName != "" { + attributes = append(attributes, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attributes = append(attributes, semconv.NetworkProtocolVersion(protoVersion)) + } + + if statusCode > 0 { + attributes = append(attributes, semconv.HTTPResponseStatusCode(statusCode)) + } + return attributes +} + +type MetricOpts struct { + measurement metric.MeasurementOption + addOptions metric.AddOption +} + +func (o MetricOpts) MeasurementOption() metric.MeasurementOption { + return o.measurement +} + +func (o MetricOpts) AddOptions() metric.AddOption { + return o.addOptions +} + +func (n HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts { + opts := map[string]MetricOpts{} + + attributes := n.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) + set := metric.WithAttributeSet(attribute.NewSet(attributes...)) + opts["new"] = MetricOpts{ + measurement: set, + addOptions: set, + } + + return opts +} + +func (n HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) { + n.requestBodySize.Inst().Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) + n.requestDuration.Inst().Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) +} + +// TraceAttributes returns attributes for httptrace. +func (n HTTPClient) TraceAttributes(host string) []attribute.KeyValue { + return []attribute.KeyValue{ + semconv.ServerAddress(host), + } +} + +func (n HTTPClient) scheme(req *http.Request) attribute.KeyValue { + if req.URL != nil && req.URL.Scheme != "" { + return semconv.URLScheme(req.URL.Scheme) + } + if req.TLS != nil { + return semconv.URLScheme("https") + } + return semconv.URLScheme("http") +} + +func isErrorStatusCode(code int) bool { + return code >= 400 || code < 100 +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go deleted file mode 100644 index 7cb9693d984..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/env.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "context" - "fmt" - "net/http" - "os" - "strings" - "sync" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" -) - -// OTelSemConvStabilityOptIn is an environment variable. -// That can be set to "http/dup" to keep getting the old HTTP semantic conventions. -const OTelSemConvStabilityOptIn = "OTEL_SEMCONV_STABILITY_OPT_IN" - -type ResponseTelemetry struct { - StatusCode int - ReadBytes int64 - ReadError error - WriteBytes int64 - WriteError error -} - -type HTTPServer struct { - duplicate bool - - // Old metrics - requestBytesCounter metric.Int64Counter - responseBytesCounter metric.Int64Counter - serverLatencyMeasure metric.Float64Histogram - - // New metrics - requestBodySizeHistogram metric.Int64Histogram - responseBodySizeHistogram metric.Int64Histogram - requestDurationHistogram metric.Float64Histogram -} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (s HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { - attrs := CurrentHTTPServer{}.RequestTraceAttrs(server, req, opts) - if s.duplicate { - return OldHTTPServer{}.RequestTraceAttrs(server, req, attrs) - } - return attrs -} - -func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue { - if s.duplicate { - return []attribute.KeyValue{ - OldHTTPServer{}.NetworkTransportAttr(network), - CurrentHTTPServer{}.NetworkTransportAttr(network), - } - } - return []attribute.KeyValue{ - CurrentHTTPServer{}.NetworkTransportAttr(network), - } -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. -func (s HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { - attrs := CurrentHTTPServer{}.ResponseTraceAttrs(resp) - if s.duplicate { - return OldHTTPServer{}.ResponseTraceAttrs(resp, attrs) - } - return attrs -} - -// Route returns the attribute for the route. -func (s HTTPServer) Route(route string) attribute.KeyValue { - return CurrentHTTPServer{}.Route(route) -} - -// Status returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (s HTTPServer) Status(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 500 { - return codes.Error, "" - } - return codes.Unset, "" -} - -type ServerMetricData struct { - ServerName string - ResponseSize int64 - - MetricData - MetricAttributes -} - -type MetricAttributes struct { - Req *http.Request - StatusCode int - AdditionalAttributes []attribute.KeyValue -} - -type MetricData struct { - RequestSize int64 - - // The request duration, in milliseconds - ElapsedTime float64 -} - -var ( - metricAddOptionPool = &sync.Pool{ - New: func() interface{} { - return &[]metric.AddOption{} - }, - } - - metricRecordOptionPool = &sync.Pool{ - New: func() interface{} { - return &[]metric.RecordOption{} - }, - } -) - -func (s HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) { - if s.requestDurationHistogram != nil && s.requestBodySizeHistogram != nil && s.responseBodySizeHistogram != nil { - attributes := CurrentHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) - *recordOpts = append(*recordOpts, o) - s.requestBodySizeHistogram.Record(ctx, md.RequestSize, *recordOpts...) - s.responseBodySizeHistogram.Record(ctx, md.ResponseSize, *recordOpts...) - s.requestDurationHistogram.Record(ctx, md.ElapsedTime/1000.0, o) - *recordOpts = (*recordOpts)[:0] - metricRecordOptionPool.Put(recordOpts) - } - - if s.duplicate && s.requestBytesCounter != nil && s.responseBytesCounter != nil && s.serverLatencyMeasure != nil { - attributes := OldHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - addOpts := metricAddOptionPool.Get().(*[]metric.AddOption) - *addOpts = append(*addOpts, o) - s.requestBytesCounter.Add(ctx, md.RequestSize, *addOpts...) - s.responseBytesCounter.Add(ctx, md.ResponseSize, *addOpts...) - s.serverLatencyMeasure.Record(ctx, md.ElapsedTime, o) - *addOpts = (*addOpts)[:0] - metricAddOptionPool.Put(addOpts) - } -} - -// hasOptIn returns true if the comma-separated version string contains the -// exact optIn value. -func hasOptIn(version, optIn string) bool { - for _, v := range strings.Split(version, ",") { - if strings.TrimSpace(v) == optIn { - return true - } - } - return false -} - -func NewHTTPServer(meter metric.Meter) HTTPServer { - env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn)) - duplicate := hasOptIn(env, "http/dup") - server := HTTPServer{ - duplicate: duplicate, - } - server.requestBodySizeHistogram, server.responseBodySizeHistogram, server.requestDurationHistogram = CurrentHTTPServer{}.createMeasures(meter) - if duplicate { - server.requestBytesCounter, server.responseBytesCounter, server.serverLatencyMeasure = OldHTTPServer{}.createMeasures(meter) - } - return server -} - -type HTTPClient struct { - duplicate bool - - // old metrics - requestBytesCounter metric.Int64Counter - responseBytesCounter metric.Int64Counter - latencyMeasure metric.Float64Histogram - - // new metrics - requestBodySize metric.Int64Histogram - requestDuration metric.Float64Histogram -} - -func NewHTTPClient(meter metric.Meter) HTTPClient { - env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn)) - duplicate := hasOptIn(env, "http/dup") - client := HTTPClient{ - duplicate: duplicate, - } - client.requestBodySize, client.requestDuration = CurrentHTTPClient{}.createMeasures(meter) - if duplicate { - client.requestBytesCounter, client.responseBytesCounter, client.latencyMeasure = OldHTTPClient{}.createMeasures(meter) - } - - return client -} - -// RequestTraceAttrs returns attributes for an HTTP request made by a client. -func (c HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.RequestTraceAttrs(req) - if c.duplicate { - return OldHTTPClient{}.RequestTraceAttrs(req, attrs) - } - return attrs -} - -// ResponseTraceAttrs returns metric attributes for an HTTP request made by a client. -func (c HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.ResponseTraceAttrs(resp) - if c.duplicate { - return OldHTTPClient{}.ResponseTraceAttrs(resp, attrs) - } - return attrs -} - -func (c HTTPClient) Status(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 400 { - return codes.Error, "" - } - return codes.Unset, "" -} - -func (c HTTPClient) ErrorType(err error) attribute.KeyValue { - return CurrentHTTPClient{}.ErrorType(err) -} - -type MetricOpts struct { - measurement metric.MeasurementOption - addOptions metric.AddOption -} - -func (o MetricOpts) MeasurementOption() metric.MeasurementOption { - return o.measurement -} - -func (o MetricOpts) AddOptions() metric.AddOption { - return o.addOptions -} - -func (c HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts { - opts := map[string]MetricOpts{} - - attributes := CurrentHTTPClient{}.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) - set := metric.WithAttributeSet(attribute.NewSet(attributes...)) - opts["new"] = MetricOpts{ - measurement: set, - addOptions: set, - } - - if c.duplicate { - attributes := OldHTTPClient{}.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) - set := metric.WithAttributeSet(attribute.NewSet(attributes...)) - opts["old"] = MetricOpts{ - measurement: set, - addOptions: set, - } - } - - return opts -} - -func (s HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) { - if s.requestBodySize == nil || s.requestDuration == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.requestBodySize.Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) - s.requestDuration.Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) - - if s.duplicate { - s.requestBytesCounter.Add(ctx, md.RequestSize, opts["old"].AddOptions()) - s.latencyMeasure.Record(ctx, md.ElapsedTime, opts["old"].MeasurementOption()) - } -} - -func (s HTTPClient) RecordResponseSize(ctx context.Context, responseData int64, opts map[string]MetricOpts) { - if s.responseBytesCounter == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.responseBytesCounter.Add(ctx, responseData, opts["old"].AddOptions()) -} - -func (s HTTPClient) TraceAttributes(host string) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.TraceAttributes(host) - if s.duplicate { - return OldHTTPClient{}.TraceAttributes(host, attrs) - } - - return attrs -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go index f2cf8a152d3..a8a0d58df35 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go @@ -5,10 +5,11 @@ package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/ // Generate semconv package: //go:generate gotmpl --body=../../../../../../internal/shared/semconv/bench_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=bench_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/env.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=env.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/env_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=env_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconv.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconv.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconv_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconv_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/common_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=common_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/server.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=server.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/server_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=server_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/client.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=client.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/client_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=client_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconvtest_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconvtest_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/util.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=util.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/util_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=util_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/v1.20.0.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=v1.20.0.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go deleted file mode 100644 index 53976b0d5a6..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go +++ /dev/null @@ -1,573 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/httpconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv provides OpenTelemetry semantic convention types and -// functionality. -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "fmt" - "net/http" - "reflect" - "slices" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" -) - -type RequestTraceAttrsOpts struct { - // If set, this is used as value for the "http.client_ip" attribute. - HTTPClientIP string -} - -type CurrentHTTPServer struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (n CurrentHTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { - count := 3 // ServerAddress, Method, Scheme - - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - count++ - } - - method, methodOriginal := n.method(req.Method) - if methodOriginal != (attribute.KeyValue{}) { - count++ - } - - scheme := n.scheme(req.TLS != nil) - - peer, peerPort := SplitHostPort(req.RemoteAddr) - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - count++ - if peerPort > 0 { - count++ - } - } - - useragent := req.UserAgent() - if useragent != "" { - count++ - } - - // For client IP, use, in order: - // 1. The value passed in the options - // 2. The value in the X-Forwarded-For header - // 3. The peer address - clientIP := opts.HTTPClientIP - if clientIP == "" { - clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP == "" { - clientIP = peer - } - } - if clientIP != "" { - count++ - } - - if req.URL != nil && req.URL.Path != "" { - count++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - count++ - } - if protoVersion != "" { - count++ - } - - route := httpRoute(req.Pattern) - if route != "" { - count++ - } - - attrs := make([]attribute.KeyValue, 0, count) - attrs = append(attrs, - semconvNew.ServerAddress(host), - method, - scheme, - ) - - if hostPort > 0 { - attrs = append(attrs, semconvNew.ServerPort(hostPort)) - } - if methodOriginal != (attribute.KeyValue{}) { - attrs = append(attrs, methodOriginal) - } - - if peer, peerPort := SplitHostPort(req.RemoteAddr); peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, semconvNew.NetworkPeerAddress(peer)) - if peerPort > 0 { - attrs = append(attrs, semconvNew.NetworkPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, semconvNew.UserAgentOriginal(useragent)) - } - - if clientIP != "" { - attrs = append(attrs, semconvNew.ClientAddress(clientIP)) - } - - if req.URL != nil && req.URL.Path != "" { - attrs = append(attrs, semconvNew.URLPath(req.URL.Path)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if route != "" { - attrs = append(attrs, n.Route(route)) - } - - return attrs -} - -func (n CurrentHTTPServer) NetworkTransportAttr(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return semconvNew.NetworkTransportTCP - case "udp", "udp4", "udp6": - return semconvNew.NetworkTransportUDP - case "unix", "unixgram", "unixpacket": - return semconvNew.NetworkTransportUnix - default: - return semconvNew.NetworkTransportPipe - } -} - -func (n CurrentHTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { - if method == "" { - return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} - } - if attr, ok := methodLookup[method]; ok { - return attr, attribute.KeyValue{} - } - - orig := semconvNew.HTTPRequestMethodOriginal(method) - if attr, ok := methodLookup[strings.ToUpper(method)]; ok { - return attr, orig - } - return semconvNew.HTTPRequestMethodGet, orig -} - -func (n CurrentHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return semconvNew.URLScheme("https") - } - return semconvNew.URLScheme("http") -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP -// response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will -// be omitted. -func (n CurrentHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { - var count int - - if resp.ReadBytes > 0 { - count++ - } - if resp.WriteBytes > 0 { - count++ - } - if resp.StatusCode > 0 { - count++ - } - - attributes := make([]attribute.KeyValue, 0, count) - - if resp.ReadBytes > 0 { - attributes = append(attributes, - semconvNew.HTTPRequestBodySize(int(resp.ReadBytes)), - ) - } - if resp.WriteBytes > 0 { - attributes = append(attributes, - semconvNew.HTTPResponseBodySize(int(resp.WriteBytes)), - ) - } - if resp.StatusCode > 0 { - attributes = append(attributes, - semconvNew.HTTPResponseStatusCode(resp.StatusCode), - ) - } - - return attributes -} - -// Route returns the attribute for the route. -func (n CurrentHTTPServer) Route(route string) attribute.KeyValue { - return semconvNew.HTTPRoute(route) -} - -func (n CurrentHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPServerRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerRequestBodySizeDescription), - ) - handleErr(err) - - responseBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerResponseBodySizeName, - metric.WithUnit(semconvNew.HTTPServerResponseBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerResponseBodySizeDescription), - ) - handleErr(err) - requestDurationHistogram, err := meter.Float64Histogram( - semconvNew.HTTPServerRequestDurationName, - metric.WithUnit(semconvNew.HTTPServerRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPServerRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySizeHistogram, responseBodySizeHistogram, requestDurationHistogram -} - -func (n CurrentHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - num := len(additionalAttributes) + 3 - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - num++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - num++ - } - if protoVersion != "" { - num++ - } - - if statusCode > 0 { - num++ - } - - attributes := slices.Grow(additionalAttributes, num) - attributes = append(attributes, - semconvNew.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), - n.scheme(req.TLS != nil), - semconvNew.ServerAddress(host)) - - if hostPort > 0 { - attributes = append(attributes, semconvNew.ServerPort(hostPort)) - } - if protoName != "" { - attributes = append(attributes, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconvNew.HTTPResponseStatusCode(statusCode)) - } - return attributes -} - -type CurrentHTTPClient struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request made by a client. -func (n CurrentHTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { - /* - below attributes are returned: - - http.request.method - - http.request.method.original - - url.full - - server.address - - server.port - - network.protocol.name - - network.protocol.version - */ - numOfAttributes := 3 // URL, server address, proto, and method. - - var urlHost string - if req.URL != nil { - urlHost = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{urlHost, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - eligiblePort := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if eligiblePort > 0 { - numOfAttributes++ - } - useragent := req.UserAgent() - if useragent != "" { - numOfAttributes++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - numOfAttributes++ - } - if protoVersion != "" { - numOfAttributes++ - } - - method, originalMethod := n.method(req.Method) - if originalMethod != (attribute.KeyValue{}) { - numOfAttributes++ - } - - attrs := make([]attribute.KeyValue, 0, numOfAttributes) - - attrs = append(attrs, method) - if originalMethod != (attribute.KeyValue{}) { - attrs = append(attrs, originalMethod) - } - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, semconvNew.URLFull(u)) - - attrs = append(attrs, semconvNew.ServerAddress(requestHost)) - if eligiblePort > 0 { - attrs = append(attrs, semconvNew.ServerPort(eligiblePort)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - return attrs -} - -// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client. -func (n CurrentHTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { - /* - below attributes are returned: - - http.response.status_code - - error.type - */ - var count int - if resp.StatusCode > 0 { - count++ - } - - if isErrorStatusCode(resp.StatusCode) { - count++ - } - - attrs := make([]attribute.KeyValue, 0, count) - if resp.StatusCode > 0 { - attrs = append(attrs, semconvNew.HTTPResponseStatusCode(resp.StatusCode)) - } - - if isErrorStatusCode(resp.StatusCode) { - errorType := strconv.Itoa(resp.StatusCode) - attrs = append(attrs, semconvNew.ErrorTypeKey.String(errorType)) - } - return attrs -} - -func (n CurrentHTTPClient) ErrorType(err error) attribute.KeyValue { - t := reflect.TypeOf(err) - var value string - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - value = t.String() - } else { - value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) - } - - if value == "" { - return semconvNew.ErrorTypeOther - } - - return semconvNew.ErrorTypeKey.String(value) -} - -func (n CurrentHTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) { - if method == "" { - return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} - } - if attr, ok := methodLookup[method]; ok { - return attr, attribute.KeyValue{} - } - - orig := semconvNew.HTTPRequestMethodOriginal(method) - if attr, ok := methodLookup[strings.ToUpper(method)]; ok { - return attr, orig - } - return semconvNew.HTTPRequestMethodGet, orig -} - -func (n CurrentHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySize, err := meter.Int64Histogram( - semconvNew.HTTPClientRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPClientRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPClientRequestBodySizeDescription), - ) - handleErr(err) - - requestDuration, err := meter.Float64Histogram( - semconvNew.HTTPClientRequestDurationName, - metric.WithUnit(semconvNew.HTTPClientRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPClientRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySize, requestDuration -} - -func (n CurrentHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - num := len(additionalAttributes) + 2 - var h string - if req.URL != nil { - h = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{h, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if port > 0 { - num++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - num++ - } - if protoVersion != "" { - num++ - } - - if statusCode > 0 { - num++ - } - - attributes := slices.Grow(additionalAttributes, num) - attributes = append(attributes, - semconvNew.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), - semconvNew.ServerAddress(requestHost), - n.scheme(req), - ) - - if port > 0 { - attributes = append(attributes, semconvNew.ServerPort(port)) - } - if protoName != "" { - attributes = append(attributes, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconvNew.HTTPResponseStatusCode(statusCode)) - } - return attributes -} - -// TraceAttributes returns attributes for httptrace. -func (n CurrentHTTPClient) TraceAttributes(host string) []attribute.KeyValue { - return []attribute.KeyValue{ - semconvNew.ServerAddress(host), - } -} - -func (n CurrentHTTPClient) scheme(req *http.Request) attribute.KeyValue { - if req.URL != nil && req.URL.Scheme != "" { - return semconvNew.URLScheme(req.URL.Scheme) - } - if req.TLS != nil { - return semconvNew.URLScheme("https") - } - return semconvNew.URLScheme("http") -} - -func isErrorStatusCode(code int) bool { - return code >= 400 || code < 100 -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go new file mode 100644 index 00000000000..5ae6a07386b --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go @@ -0,0 +1,403 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/semconv/server.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv provides OpenTelemetry semantic convention types and +// functionality. +package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" + +import ( + "context" + "fmt" + "net/http" + "slices" + "strings" + "sync" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/semconv/v1.37.0/httpconv" +) + +type RequestTraceAttrsOpts struct { + // If set, this is used as value for the "http.client_ip" attribute. + HTTPClientIP string +} + +type ResponseTelemetry struct { + StatusCode int + ReadBytes int64 + ReadError error + WriteBytes int64 + WriteError error +} + +type HTTPServer struct{ + requestBodySizeHistogram httpconv.ServerRequestBodySize + responseBodySizeHistogram httpconv.ServerResponseBodySize + requestDurationHistogram httpconv.ServerRequestDuration +} + +func NewHTTPServer(meter metric.Meter) HTTPServer { + server := HTTPServer{} + + var err error + server.requestBodySizeHistogram, err = httpconv.NewServerRequestBodySize(meter) + handleErr(err) + + server.responseBodySizeHistogram, err = httpconv.NewServerResponseBodySize(meter) + handleErr(err) + + server.requestDurationHistogram, err = httpconv.NewServerRequestDuration( + meter, + metric.WithExplicitBucketBoundaries( + 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, + 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + ), + ) + handleErr(err) + return server +} + +// Status returns a span status code and message for an HTTP status code +// value returned by a server. Status codes in the 400-499 range are not +// returned as errors. +func (n HTTPServer) Status(code int) (codes.Code, string) { + if code < 100 || code >= 600 { + return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) + } + if code >= 500 { + return codes.Error, "" + } + return codes.Unset, "" +} + +// RequestTraceAttrs returns trace attributes for an HTTP request received by a +// server. +// +// The server must be the primary server name if it is known. For example this +// would be the ServerName directive +// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache +// server, and the server_name directive +// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an +// nginx server. More generically, the primary server name would be the host +// header value that matches the default virtual host of an HTTP server. It +// should include the host identifier and if a port is used to route to the +// server that port identifier should be included as an appropriate port +// suffix. +// +// If the primary server name is not known, server should be an empty string. +// The req Host will be used to determine the server instead. +func (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { + count := 3 // ServerAddress, Method, Scheme + + var host string + var p int + if server == "" { + host, p = SplitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = SplitHostPort(server) + if p < 0 { + _, p = SplitHostPort(req.Host) + } + } + + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + count++ + } + + method, methodOriginal := n.method(req.Method) + if methodOriginal != (attribute.KeyValue{}) { + count++ + } + + scheme := n.scheme(req.TLS != nil) + + peer, peerPort := SplitHostPort(req.RemoteAddr) + if peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + count++ + if peerPort > 0 { + count++ + } + } + + useragent := req.UserAgent() + if useragent != "" { + count++ + } + + // For client IP, use, in order: + // 1. The value passed in the options + // 2. The value in the X-Forwarded-For header + // 3. The peer address + clientIP := opts.HTTPClientIP + if clientIP == "" { + clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) + if clientIP == "" { + clientIP = peer + } + } + if clientIP != "" { + count++ + } + + if req.URL != nil && req.URL.Path != "" { + count++ + } + + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" && protoName != "http" { + count++ + } + if protoVersion != "" { + count++ + } + + route := httpRoute(req.Pattern) + if route != "" { + count++ + } + + attrs := make([]attribute.KeyValue, 0, count) + attrs = append(attrs, + semconv.ServerAddress(host), + method, + scheme, + ) + + if hostPort > 0 { + attrs = append(attrs, semconv.ServerPort(hostPort)) + } + if methodOriginal != (attribute.KeyValue{}) { + attrs = append(attrs, methodOriginal) + } + + if peer, peerPort := SplitHostPort(req.RemoteAddr); peer != "" { + // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a + // file-path that would be interpreted with a sock family. + attrs = append(attrs, semconv.NetworkPeerAddress(peer)) + if peerPort > 0 { + attrs = append(attrs, semconv.NetworkPeerPort(peerPort)) + } + } + + if useragent != "" { + attrs = append(attrs, semconv.UserAgentOriginal(useragent)) + } + + if clientIP != "" { + attrs = append(attrs, semconv.ClientAddress(clientIP)) + } + + if req.URL != nil && req.URL.Path != "" { + attrs = append(attrs, semconv.URLPath(req.URL.Path)) + } + + if protoName != "" && protoName != "http" { + attrs = append(attrs, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion)) + } + + if route != "" { + attrs = append(attrs, n.Route(route)) + } + + return attrs +} + +func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue { + attr := semconv.NetworkTransportPipe + switch network { + case "tcp", "tcp4", "tcp6": + attr = semconv.NetworkTransportTCP + case "udp", "udp4", "udp6": + attr = semconv.NetworkTransportUDP + case "unix", "unixgram", "unixpacket": + attr = semconv.NetworkTransportUnix + } + + return []attribute.KeyValue{attr} +} + +type ServerMetricData struct { + ServerName string + ResponseSize int64 + + MetricData + MetricAttributes +} + +type MetricAttributes struct { + Req *http.Request + StatusCode int + Route string + AdditionalAttributes []attribute.KeyValue +} + +type MetricData struct { + RequestSize int64 + + // The request duration, in milliseconds + ElapsedTime float64 +} + +var ( + metricAddOptionPool = &sync.Pool{ + New: func() any { + return &[]metric.AddOption{} + }, + } + + metricRecordOptionPool = &sync.Pool{ + New: func() any { + return &[]metric.RecordOption{} + }, + } +) + +func (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) { + attributes := n.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.Route, md.AdditionalAttributes) + o := metric.WithAttributeSet(attribute.NewSet(attributes...)) + recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) + *recordOpts = append(*recordOpts, o) + n.requestBodySizeHistogram.Inst().Record(ctx, md.RequestSize, *recordOpts...) + n.responseBodySizeHistogram.Inst().Record(ctx, md.ResponseSize, *recordOpts...) + n.requestDurationHistogram.Inst().Record(ctx, md.ElapsedTime/1000.0, o) + *recordOpts = (*recordOpts)[:0] + metricRecordOptionPool.Put(recordOpts) +} + +func (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { + if method == "" { + return semconv.HTTPRequestMethodGet, attribute.KeyValue{} + } + if attr, ok := methodLookup[method]; ok { + return attr, attribute.KeyValue{} + } + + orig := semconv.HTTPRequestMethodOriginal(method) + if attr, ok := methodLookup[strings.ToUpper(method)]; ok { + return attr, orig + } + return semconv.HTTPRequestMethodGet, orig +} + +func (n HTTPServer) scheme(https bool) attribute.KeyValue { //nolint:revive // ignore linter + if https { + return semconv.URLScheme("https") + } + return semconv.URLScheme("http") +} + +// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP +// response. +// +// If any of the fields in the ResponseTelemetry are not set the attribute will +// be omitted. +func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { + var count int + + if resp.ReadBytes > 0 { + count++ + } + if resp.WriteBytes > 0 { + count++ + } + if resp.StatusCode > 0 { + count++ + } + + attributes := make([]attribute.KeyValue, 0, count) + + if resp.ReadBytes > 0 { + attributes = append(attributes, + semconv.HTTPRequestBodySize(int(resp.ReadBytes)), + ) + } + if resp.WriteBytes > 0 { + attributes = append(attributes, + semconv.HTTPResponseBodySize(int(resp.WriteBytes)), + ) + } + if resp.StatusCode > 0 { + attributes = append(attributes, + semconv.HTTPResponseStatusCode(resp.StatusCode), + ) + } + + return attributes +} + +// Route returns the attribute for the route. +func (n HTTPServer) Route(route string) attribute.KeyValue { + return semconv.HTTPRoute(route) +} + +func (n HTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, route string, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { + num := len(additionalAttributes) + 3 + var host string + var p int + if server == "" { + host, p = SplitHostPort(req.Host) + } else { + // Prioritize the primary server name. + host, p = SplitHostPort(server) + if p < 0 { + _, p = SplitHostPort(req.Host) + } + } + hostPort := requiredHTTPPort(req.TLS != nil, p) + if hostPort > 0 { + num++ + } + protoName, protoVersion := netProtocol(req.Proto) + if protoName != "" { + num++ + } + if protoVersion != "" { + num++ + } + + if statusCode > 0 { + num++ + } + + if route != "" { + num++ + } + + attributes := slices.Grow(additionalAttributes, num) + attributes = append(attributes, + semconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), + n.scheme(req.TLS != nil), + semconv.ServerAddress(host)) + + if hostPort > 0 { + attributes = append(attributes, semconv.ServerPort(hostPort)) + } + if protoName != "" { + attributes = append(attributes, semconv.NetworkProtocolName(protoName)) + } + if protoVersion != "" { + attributes = append(attributes, semconv.NetworkProtocolVersion(protoVersion)) + } + + if statusCode > 0 { + attributes = append(attributes, semconv.HTTPResponseStatusCode(statusCode)) + } + + if route != "" { + attributes = append(attributes, semconv.HTTPRoute(route)) + } + return attributes +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go index bc1f7751dbc..96422ad1ed2 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" + semconvNew "go.opentelemetry.io/otel/semconv/v1.37.0" ) // SplitHostPort splits a network address hostport of the form "host", @@ -53,10 +53,10 @@ func SplitHostPort(hostport string) (host string, port int) { if err != nil { return } - return host, int(p) // nolint: gosec // Byte size checked 16 above. + return host, int(p) //nolint:gosec // Byte size checked 16 above. } -func requiredHTTPPort(https bool, port int) int { // nolint:revive +func requiredHTTPPort(https bool, port int) int { //nolint:revive // ignore linter if https { if port > 0 && port != 443 { return port diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go deleted file mode 100644 index ba7fccf1efd..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/v120.0.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "errors" - "io" - "net/http" - "slices" - - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -type OldHTTPServer struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (o OldHTTPServer) RequestTraceAttrs(server string, req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPServerRequest(server, req, semconvutil.HTTPServerRequestOptions{}, attrs) -} - -func (o OldHTTPServer) NetworkTransportAttr(network string) attribute.KeyValue { - return semconvutil.NetTransport(network) -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. -func (o OldHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry, attributes []attribute.KeyValue) []attribute.KeyValue { - if resp.ReadBytes > 0 { - attributes = append(attributes, semconv.HTTPRequestContentLength(int(resp.ReadBytes))) - } - if resp.ReadError != nil && !errors.Is(resp.ReadError, io.EOF) { - // This is not in the semantic conventions, but is historically provided - attributes = append(attributes, attribute.String("http.read_error", resp.ReadError.Error())) - } - if resp.WriteBytes > 0 { - attributes = append(attributes, semconv.HTTPResponseContentLength(int(resp.WriteBytes))) - } - if resp.StatusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(resp.StatusCode)) - } - if resp.WriteError != nil && !errors.Is(resp.WriteError, io.EOF) { - // This is not in the semantic conventions, but is historically provided - attributes = append(attributes, attribute.String("http.write_error", resp.WriteError.Error())) - } - - return attributes -} - -// Route returns the attribute for the route. -func (o OldHTTPServer) Route(route string) attribute.KeyValue { - return semconv.HTTPRoute(route) -} - -// HTTPStatusCode returns the attribute for the HTTP status code. -// This is a temporary function needed by metrics. This will be removed when MetricsRequest is added. -func HTTPStatusCode(status int) attribute.KeyValue { - return semconv.HTTPStatusCode(status) -} - -// Server HTTP metrics. -const ( - serverRequestSize = "http.server.request.size" // Incoming request bytes total - serverResponseSize = "http.server.response.size" // Incoming response bytes total - serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds -) - -func (h OldHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Counter, metric.Int64Counter, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Counter{}, noop.Int64Counter{}, noop.Float64Histogram{} - } - var err error - requestBytesCounter, err := meter.Int64Counter( - serverRequestSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP request messages."), - ) - handleErr(err) - - responseBytesCounter, err := meter.Int64Counter( - serverResponseSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP response messages."), - ) - handleErr(err) - - serverLatencyMeasure, err := meter.Float64Histogram( - serverDuration, - metric.WithUnit("ms"), - metric.WithDescription("Measures the duration of inbound HTTP requests."), - ) - handleErr(err) - - return requestBytesCounter, responseBytesCounter, serverLatencyMeasure -} - -func (o OldHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - n := len(additionalAttributes) + 3 - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - n++ - } - if protoVersion != "" { - n++ - } - - if statusCode > 0 { - n++ - } - - attributes := slices.Grow(additionalAttributes, n) - attributes = append(attributes, - semconv.HTTPMethod(standardizeHTTPMethod(req.Method)), - o.scheme(req.TLS != nil), - semconv.NetHostName(host)) - - if hostPort > 0 { - attributes = append(attributes, semconv.NetHostPort(hostPort)) - } - if protoName != "" { - attributes = append(attributes, semconv.NetProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconv.NetProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(statusCode)) - } - return attributes -} - -func (o OldHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return semconv.HTTPSchemeHTTPS - } - return semconv.HTTPSchemeHTTP -} - -type OldHTTPClient struct{} - -func (o OldHTTPClient) RequestTraceAttrs(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPClientRequest(req, attrs) -} - -func (o OldHTTPClient) ResponseTraceAttrs(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPClientResponse(resp, attrs) -} - -func (o OldHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - http.status_code int - net.peer.name string - net.peer.port int - */ - - n := 2 // method, peer name. - var h string - if req.URL != nil { - h = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{h, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if port > 0 { - n++ - } - - if statusCode > 0 { - n++ - } - - attributes := slices.Grow(additionalAttributes, n) - attributes = append(attributes, - semconv.HTTPMethod(standardizeHTTPMethod(req.Method)), - semconv.NetPeerName(requestHost), - ) - - if port > 0 { - attributes = append(attributes, semconv.NetPeerPort(port)) - } - - if statusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(statusCode)) - } - return attributes -} - -// Client HTTP metrics. -const ( - clientRequestSize = "http.client.request.size" // Incoming request bytes total - clientResponseSize = "http.client.response.size" // Incoming response bytes total - clientDuration = "http.client.duration" // Incoming end to end duration, milliseconds -) - -func (o OldHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Counter, metric.Int64Counter, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Counter{}, noop.Int64Counter{}, noop.Float64Histogram{} - } - requestBytesCounter, err := meter.Int64Counter( - clientRequestSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP request messages."), - ) - handleErr(err) - - responseBytesCounter, err := meter.Int64Counter( - clientResponseSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP response messages."), - ) - handleErr(err) - - latencyMeasure, err := meter.Float64Histogram( - clientDuration, - metric.WithUnit("ms"), - metric.WithDescription("Measures the duration of outbound HTTP requests."), - ) - handleErr(err) - - return requestBytesCounter, responseBytesCounter, latencyMeasure -} - -// TraceAttributes returns attributes for httptrace. -func (c OldHTTPClient) TraceAttributes(host string, attrs []attribute.KeyValue) []attribute.KeyValue { - return append(attrs, semconv.NetHostName(host)) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go deleted file mode 100644 index 7aa5f99e815..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - -// Generate semconvutil package: -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv_test.go.tmpl "--data={}" --out=httpconv_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv.go.tmpl "--data={}" --out=httpconv.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv_test.go.tmpl "--data={}" --out=netconv_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv.go.tmpl "--data={}" --out=netconv.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go deleted file mode 100644 index b9973547931..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go +++ /dev/null @@ -1,594 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconvutil/httpconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconvutil provides OpenTelemetry semantic convention utilities. -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - -import ( - "fmt" - "net/http" - "slices" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -type HTTPServerRequestOptions struct { - // If set, this is used as value for the "http.client_ip" attribute. - HTTPClientIP string -} - -// HTTPClientResponse returns trace attributes for an HTTP response received by a -// client from a server. It will return the following attributes if the related -// values are defined in resp: "http.status.code", -// "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// HTTPClientResponse(resp, ClientRequest(resp.Request))) -func HTTPClientResponse(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ClientResponse(resp, attrs) -} - -// HTTPClientRequest returns trace attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.url", "http.method", -// "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "user_agent.original", -// "http.request_content_length". -func HTTPClientRequest(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ClientRequest(req, attrs) -} - -// HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.method", "net.peer.name". -// The following attributes are returned if the -// related values are defined in req: "net.peer.port". -func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue { - return hc.ClientRequestMetrics(req) -} - -// HTTPClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func HTTPClientStatus(code int) (codes.Code, string) { - return hc.ClientStatus(code) -} - -// HTTPServerRequest returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.target", "net.host.name". The following attributes are returned if -// they related values are defined in req: "net.host.port", "net.sock.peer.addr", -// "net.sock.peer.port", "user_agent.original", "http.client_ip". -func HTTPServerRequest(server string, req *http.Request, opts HTTPServerRequestOptions, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ServerRequest(server, req, opts, attrs) -} - -// HTTPServerRequestMetrics returns metric attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "net.host.name". The following attributes are returned if they related -// values are defined in req: "net.host.port". -func HTTPServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { - return hc.ServerRequestMetrics(server, req) -} - -// HTTPServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func HTTPServerStatus(code int) (codes.Code, string) { - return hc.ServerStatus(code) -} - -// httpConv are the HTTP semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type httpConv struct { - NetConv *netConv - - HTTPClientIPKey attribute.Key - HTTPMethodKey attribute.Key - HTTPRequestContentLengthKey attribute.Key - HTTPResponseContentLengthKey attribute.Key - HTTPRouteKey attribute.Key - HTTPSchemeHTTP attribute.KeyValue - HTTPSchemeHTTPS attribute.KeyValue - HTTPStatusCodeKey attribute.Key - HTTPTargetKey attribute.Key - HTTPURLKey attribute.Key - UserAgentOriginalKey attribute.Key -} - -var hc = &httpConv{ - NetConv: nc, - - HTTPClientIPKey: semconv.HTTPClientIPKey, - HTTPMethodKey: semconv.HTTPMethodKey, - HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey, - HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey, - HTTPRouteKey: semconv.HTTPRouteKey, - HTTPSchemeHTTP: semconv.HTTPSchemeHTTP, - HTTPSchemeHTTPS: semconv.HTTPSchemeHTTPS, - HTTPStatusCodeKey: semconv.HTTPStatusCodeKey, - HTTPTargetKey: semconv.HTTPTargetKey, - HTTPURLKey: semconv.HTTPURLKey, - UserAgentOriginalKey: semconv.UserAgentOriginalKey, -} - -// ClientResponse returns attributes for an HTTP response received by a client -// from a server. The following attributes are returned if the related values -// are defined in resp: "http.status.code", "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// ClientResponse(resp, ClientRequest(resp.Request)) -func (c *httpConv) ClientResponse(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.status_code int - http.response_content_length int - */ - var n int - if resp.StatusCode > 0 { - n++ - } - if resp.ContentLength > 0 { - n++ - } - if n == 0 { - return attrs - } - - attrs = slices.Grow(attrs, n) - if resp.StatusCode > 0 { - attrs = append(attrs, c.HTTPStatusCodeKey.Int(resp.StatusCode)) - } - if resp.ContentLength > 0 { - attrs = append(attrs, c.HTTPResponseContentLengthKey.Int(int(resp.ContentLength))) - } - return attrs -} - -// ClientRequest returns attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.url", "http.method", -// "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "user_agent.original", -// "http.request_content_length", "user_agent.original". -func (c *httpConv) ClientRequest(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - user_agent.original string - http.url string - net.peer.name string - net.peer.port int - http.request_content_length int - */ - - /* The following semantic conventions are not returned: - http.status_code This requires the response. See ClientResponse. - http.response_content_length This requires the response. See ClientResponse. - net.sock.family This requires the socket used. - net.sock.peer.addr This requires the socket used. - net.sock.peer.name This requires the socket used. - net.sock.peer.port This requires the socket used. - http.resend_count This is something outside of a single request. - net.protocol.name The value is the Request is ignored, and the go client will always use "http". - net.protocol.version The value in the Request is ignored, and the go client will always use 1.1 or 2.0. - */ - n := 3 // URL, peer name, proto, and method. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - if req.ContentLength > 0 { - n++ - } - - attrs = slices.Grow(attrs, n) - attrs = append(attrs, c.method(req.Method)) - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, c.HTTPURLKey.String(u)) - - attrs = append(attrs, c.NetConv.PeerName(peer)) - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - if useragent != "" { - attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) - } - - if l := req.ContentLength; l > 0 { - attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l)) - } - - return attrs -} - -// ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.method", "net.peer.name". -// The following attributes are returned if the related values -// are defined in req: "net.peer.port". -func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - net.peer.name string - net.peer.port int - */ - - n := 2 // method, peer name. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer)) - - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - return attrs -} - -// ServerRequest returns attributes for an HTTP request received by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.target", "net.host.name". The following attributes are returned if they -// related values are defined in req: "net.host.port", "net.sock.peer.addr", -// "net.sock.peer.port", "user_agent.original", "http.client_ip", -// "net.protocol.name", "net.protocol.version". -func (c *httpConv) ServerRequest(server string, req *http.Request, opts HTTPServerRequestOptions, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - http.scheme string - net.host.name string - net.host.port int - net.sock.peer.addr string - net.sock.peer.port int - user_agent.original string - http.client_ip string - net.protocol.name string Note: not set if the value is "http". - net.protocol.version string - http.target string Note: doesn't include the query parameter. - */ - - /* The following semantic conventions are not returned: - http.status_code This requires the response. - http.request_content_length This requires the len() of body, which can mutate it. - http.response_content_length This requires the response. - http.route This is not available. - net.sock.peer.name This would require a DNS lookup. - net.sock.host.addr The request doesn't have access to the underlying socket. - net.sock.host.port The request doesn't have access to the underlying socket. - - */ - n := 4 // Method, scheme, proto, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - peer, peerPort := splitHostPort(req.RemoteAddr) - if peer != "" { - n++ - if peerPort > 0 { - n++ - } - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - - // For client IP, use, in order: - // 1. The value passed in the options - // 2. The value in the X-Forwarded-For header - // 3. The peer address - clientIP := opts.HTTPClientIP - if clientIP == "" { - clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP == "" { - clientIP = peer - } - } - if clientIP != "" { - n++ - } - - var target string - if req.URL != nil { - target = req.URL.Path - if target != "" { - n++ - } - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - n++ - } - if protoVersion != "" { - n++ - } - - attrs = slices.Grow(attrs, n) - - attrs = append(attrs, c.method(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, c.NetConv.SockPeerAddr(peer)) - if peerPort > 0 { - attrs = append(attrs, c.NetConv.SockPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) - } - - if clientIP != "" { - attrs = append(attrs, c.HTTPClientIPKey.String(clientIP)) - } - - if target != "" { - attrs = append(attrs, c.HTTPTargetKey.String(target)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) - } - - return attrs -} - -// ServerRequestMetrics returns metric attributes for an HTTP request received -// by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "net.host.name". The following attributes are returned if they related -// values are defined in req: "net.host.port". -func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.scheme string - http.route string - http.method string - http.status_code int - net.host.name string - net.host.port int - net.protocol.name string Note: not set if the value is "http". - net.protocol.version string - */ - - n := 3 // Method, scheme, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - n++ - } - if protoVersion != "" { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - - attrs = append(attrs, c.methodMetric(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - if protoName != "" { - attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) - } - - return attrs -} - -func (c *httpConv) method(method string) attribute.KeyValue { - if method == "" { - return c.HTTPMethodKey.String(http.MethodGet) - } - return c.HTTPMethodKey.String(method) -} - -func (c *httpConv) methodMetric(method string) attribute.KeyValue { - method = strings.ToUpper(method) - switch method { - case http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace: - default: - method = "_OTHER" - } - return c.HTTPMethodKey.String(method) -} - -func (c *httpConv) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return c.HTTPSchemeHTTPS - } - return c.HTTPSchemeHTTP -} - -func serverClientIP(xForwardedFor string) string { - if idx := strings.Index(xForwardedFor, ","); idx >= 0 { - xForwardedFor = xForwardedFor[:idx] - } - return xForwardedFor -} - -func requiredHTTPPort(https bool, port int) int { // nolint:revive - if https { - if port > 0 && port != 443 { - return port - } - } else { - if port > 0 && port != 80 { - return port - } - } - return -1 -} - -// Return the request host and port from the first non-empty source. -func firstHostPort(source ...string) (host string, port int) { - for _, hostport := range source { - host, port = splitHostPort(hostport) - if host != "" || port > 0 { - break - } - } - return -} - -// ClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func (c *httpConv) ClientStatus(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 400 { - return codes.Error, "" - } - return codes.Unset, "" -} - -// ServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (c *httpConv) ServerStatus(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 500 { - return codes.Error, "" - } - return codes.Unset, "" -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go deleted file mode 100644 index df97255e418..00000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconvutil/netconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - -import ( - "net" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -// NetTransport returns a trace attribute describing the transport protocol of the -// passed network. See the net.Dial for information about acceptable network -// values. -func NetTransport(network string) attribute.KeyValue { - return nc.Transport(network) -} - -// netConv are the network semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type netConv struct { - NetHostNameKey attribute.Key - NetHostPortKey attribute.Key - NetPeerNameKey attribute.Key - NetPeerPortKey attribute.Key - NetProtocolName attribute.Key - NetProtocolVersion attribute.Key - NetSockFamilyKey attribute.Key - NetSockPeerAddrKey attribute.Key - NetSockPeerPortKey attribute.Key - NetSockHostAddrKey attribute.Key - NetSockHostPortKey attribute.Key - NetTransportOther attribute.KeyValue - NetTransportTCP attribute.KeyValue - NetTransportUDP attribute.KeyValue - NetTransportInProc attribute.KeyValue -} - -var nc = &netConv{ - NetHostNameKey: semconv.NetHostNameKey, - NetHostPortKey: semconv.NetHostPortKey, - NetPeerNameKey: semconv.NetPeerNameKey, - NetPeerPortKey: semconv.NetPeerPortKey, - NetProtocolName: semconv.NetProtocolNameKey, - NetProtocolVersion: semconv.NetProtocolVersionKey, - NetSockFamilyKey: semconv.NetSockFamilyKey, - NetSockPeerAddrKey: semconv.NetSockPeerAddrKey, - NetSockPeerPortKey: semconv.NetSockPeerPortKey, - NetSockHostAddrKey: semconv.NetSockHostAddrKey, - NetSockHostPortKey: semconv.NetSockHostPortKey, - NetTransportOther: semconv.NetTransportOther, - NetTransportTCP: semconv.NetTransportTCP, - NetTransportUDP: semconv.NetTransportUDP, - NetTransportInProc: semconv.NetTransportInProc, -} - -func (c *netConv) Transport(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return c.NetTransportTCP - case "udp", "udp4", "udp6": - return c.NetTransportUDP - case "unix", "unixgram", "unixpacket": - return c.NetTransportInProc - default: - // "ip:*", "ip4:*", and "ip6:*" all are considered other. - return c.NetTransportOther - } -} - -// Host returns attributes for a network host address. -func (c *netConv) Host(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.HostName(h)) - if p > 0 { - attrs = append(attrs, c.HostPort(p)) - } - return attrs -} - -func (c *netConv) HostName(name string) attribute.KeyValue { - return c.NetHostNameKey.String(name) -} - -func (c *netConv) HostPort(port int) attribute.KeyValue { - return c.NetHostPortKey.Int(port) -} - -func family(network, address string) string { - switch network { - case "unix", "unixgram", "unixpacket": - return "unix" - default: - if ip := net.ParseIP(address); ip != nil { - if ip.To4() == nil { - return "inet6" - } - return "inet" - } - } - return "" -} - -// Peer returns attributes for a network peer address. -func (c *netConv) Peer(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.PeerName(h)) - if p > 0 { - attrs = append(attrs, c.PeerPort(p)) - } - return attrs -} - -func (c *netConv) PeerName(name string) attribute.KeyValue { - return c.NetPeerNameKey.String(name) -} - -func (c *netConv) PeerPort(port int) attribute.KeyValue { - return c.NetPeerPortKey.Int(port) -} - -func (c *netConv) SockPeerAddr(addr string) attribute.KeyValue { - return c.NetSockPeerAddrKey.String(addr) -} - -func (c *netConv) SockPeerPort(port int) attribute.KeyValue { - return c.NetSockPeerPortKey.Int(port) -} - -// splitHostPort splits a network address hostport of the form "host", -// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", -// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and -// port. -// -// An empty host is returned if it is not provided or unparsable. A negative -// port is returned if it is not provided or unparsable. -func splitHostPort(hostport string) (host string, port int) { - port = -1 - - if strings.HasPrefix(hostport, "[") { - addrEnd := strings.LastIndex(hostport, "]") - if addrEnd < 0 { - // Invalid hostport. - return - } - if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { - host = hostport[1:addrEnd] - return - } - } else { - if i := strings.LastIndex(hostport, ":"); i < 0 { - host = hostport - return - } - } - - host, pStr, err := net.SplitHostPort(hostport) - if err != nil { - return - } - - p, err := strconv.ParseUint(pStr, 10, 16) - if err != nil { - return - } - return host, int(p) // nolint: gosec // Bitsize checked to be 16 above. -} - -func netProtocol(proto string) (name string, version string) { - name, version, _ = strings.Cut(proto, "/") - switch name { - case "HTTP": - name = "http" - case "QUIC": - name = "quic" - case "SPDY": - name = "spdy" - default: - name = strings.ToLower(name) - } - return name, version -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go index 44b86ad8609..514ae6753b7 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go @@ -11,14 +11,14 @@ import ( "sync/atomic" "time" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" ) // Transport implements the http.RoundTripper interface and wraps @@ -129,6 +129,37 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header)) res, err := t.rt.RoundTrip(r) + + // Defer metrics recording function to record the metrics on error or no error. + defer func() { + metricAttributes := semconv.MetricAttributes{ + Req: r, + AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...), + } + + if err == nil { + metricAttributes.StatusCode = res.StatusCode + } + + metricOpts := t.semconv.MetricOptions(metricAttributes) + + metricData := semconv.MetricData{ + RequestSize: bw.BytesRead(), + } + + if err == nil { + readRecordFunc := func(int64) {} + res.Body = newWrappedBody(span, readRecordFunc, res.Body) + } + + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) + + metricData.ElapsedTime = elapsedTime + + t.semconv.RecordMetrics(ctx, metricData, metricOpts) + }() + if err != nil { // set error type attribute if the error is part of the predefined // error types. @@ -141,35 +172,14 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { span.SetStatus(codes.Error, err.Error()) span.End() - return res, err - } - - // metrics - metricOpts := t.semconv.MetricOptions(semconv.MetricAttributes{ - Req: r, - StatusCode: res.StatusCode, - AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...), - }) - // For handling response bytes we leverage a callback when the client reads the http response - readRecordFunc := func(n int64) { - t.semconv.RecordResponseSize(ctx, n, metricOpts) + return res, err } // traces span.SetAttributes(t.semconv.ResponseTraceAttrs(res)...) span.SetStatus(t.semconv.Status(res.StatusCode)) - res.Body = newWrappedBody(span, readRecordFunc, res.Body) - - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) - - t.semconv.RecordMetrics(ctx, semconv.MetricData{ - RequestSize: bw.BytesRead(), - ElapsedTime: elapsedTime, - }, metricOpts) - return res, nil } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go index 6be4c1fde2c..6e096da5e21 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go @@ -5,6 +5,6 @@ package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http // Version is the current release version of the otelhttp instrumentation. func Version() string { - return "0.61.0" + return "0.64.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/contrib/propagators/aws/LICENSE b/vendor/go.opentelemetry.io/contrib/propagators/aws/LICENSE index 261eeb9e9f8..f1aee0f1100 100644 --- a/vendor/go.opentelemetry.io/contrib/propagators/aws/LICENSE +++ b/vendor/go.opentelemetry.io/contrib/propagators/aws/LICENSE @@ -199,3 +199,33 @@ 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/idgenerator.go b/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/idgenerator.go index dd47b1d92ec..df439448b57 100644 --- a/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/idgenerator.go +++ b/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/idgenerator.go @@ -26,7 +26,7 @@ type IDGenerator struct { var _ sdktrace.IDGenerator = &IDGenerator{} // NewSpanID returns a non-zero span ID from a randomly-chosen sequence. -func (gen *IDGenerator) NewSpanID(ctx context.Context, traceID trace.TraceID) trace.SpanID { +func (gen *IDGenerator) NewSpanID(context.Context, trace.TraceID) trace.SpanID { gen.Lock() defer gen.Unlock() sid := trace.SpanID{} @@ -39,7 +39,7 @@ func (gen *IDGenerator) NewSpanID(ctx context.Context, traceID trace.TraceID) tr // - https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids // // span ID is from a randomly-chosen sequence. -func (gen *IDGenerator) NewIDs(ctx context.Context) (trace.TraceID, trace.SpanID) { +func (gen *IDGenerator) NewIDs(context.Context) (trace.TraceID, trace.SpanID) { gen.Lock() defer gen.Unlock() diff --git a/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/propagator.go b/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/propagator.go index 0b29d28b24a..8435df92f4d 100644 --- a/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/propagator.go +++ b/vendor/go.opentelemetry.io/contrib/propagators/aws/xray/propagator.go @@ -55,7 +55,7 @@ type Propagator struct{} var _ propagation.TextMapPropagator = &Propagator{} // Inject injects a context to the carrier following AWS X-Ray format. -func (xray Propagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { +func (Propagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { sc := trace.SpanFromContext(ctx).SpanContext() if !sc.TraceID().IsValid() || !sc.SpanID().IsValid() { return @@ -77,7 +77,7 @@ func (xray Propagator) Inject(ctx context.Context, carrier propagation.TextMapCa } // Extract gets a context from the carrier if it contains AWS X-Ray headers. -func (xray Propagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { +func (Propagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { // extract tracing information if header := carrier.Get(traceHeaderKey); header != "" { sc, err := extract(header) @@ -112,18 +112,19 @@ func extract(headerVal string) (trace.SpanContext, error) { return empty, errInvalidTraceHeader } value := part[equalsIndex+1:] - if strings.HasPrefix(part, traceIDKey) { + switch { + case strings.HasPrefix(part, traceIDKey): scc.TraceID, err = parseTraceID(value) if err != nil { return empty, err } - } else if strings.HasPrefix(part, parentIDKey) { + case strings.HasPrefix(part, parentIDKey): // extract parentId scc.SpanID, err = trace.SpanIDFromHex(value) if err != nil { return empty, errInvalidSpanIDLength } - } else if strings.HasPrefix(part, sampleFlagKey) { + case strings.HasPrefix(part, sampleFlagKey): // extract traceflag scc.TraceFlags = parseTraceFlag(value) } @@ -132,7 +133,7 @@ func extract(headerVal string) (trace.SpanContext, error) { } // indexOf returns position of the first occurrence of a substr in str starting at pos index. -func indexOf(str string, substr string, pos int) int { +func indexOf(str, substr string, pos int) int { index := strings.Index(str[pos:], substr) if index > -1 { index += pos @@ -171,6 +172,6 @@ func parseTraceFlag(xraySampledFlag string) trace.TraceFlags { } // Fields returns list of fields used by HTTPTextFormat. -func (xray Propagator) Fields() []string { +func (Propagator) Fields() []string { return []string{traceHeaderKey} } diff --git a/vendor/go.opentelemetry.io/otel/.codespellignore b/vendor/go.opentelemetry.io/otel/.codespellignore index 2b53a25e1e1..a6d0cbcc9e8 100644 --- a/vendor/go.opentelemetry.io/otel/.codespellignore +++ b/vendor/go.opentelemetry.io/otel/.codespellignore @@ -8,3 +8,4 @@ nam valu thirdparty addOpt +observ diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml index b01762ffcc7..d4872287593 100644 --- a/vendor/go.opentelemetry.io/otel/.golangci.yml +++ b/vendor/go.opentelemetry.io/otel/.golangci.yml @@ -16,6 +16,7 @@ linters: - govet - ineffassign - misspell + - modernize - perfsprint - revive - staticcheck @@ -111,6 +112,9 @@ linters: locale: US ignore-rules: - cancelled + modernize: + disable: + - omitzero perfsprint: int-conversion: true err-error: true @@ -197,6 +201,9 @@ linters: - float-compare - go-require - require-error + usetesting: + context-background: true + context-todo: true exclusions: generated: lax presets: diff --git a/vendor/go.opentelemetry.io/otel/.lycheeignore b/vendor/go.opentelemetry.io/otel/.lycheeignore index 5328505888d..994b677df7f 100644 --- a/vendor/go.opentelemetry.io/otel/.lycheeignore +++ b/vendor/go.opentelemetry.io/otel/.lycheeignore @@ -1,4 +1,5 @@ http://localhost +https://localhost http://jaeger-collector https://github.com/open-telemetry/opentelemetry-go/milestone/ https://github.com/open-telemetry/opentelemetry-go/projects @@ -6,4 +7,7 @@ https://github.com/open-telemetry/opentelemetry-go/projects https?:\/\/github\.com\/open-telemetry\/semantic-conventions\/archive\/refs\/tags\/[^.]+\.zip\[[^]]+] file:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries file:///home/runner/work/opentelemetry-go/opentelemetry-go/manual -http://4.3.2.1:78/user/123 \ No newline at end of file +http://4.3.2.1:78/user/123 +file:///home/runner/work/opentelemetry-go/opentelemetry-go/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/dns:/:4317 +# URL works, but it has blocked link checkers. +https://dl.acm.org/doi/10.1145/198429.198435 diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md index f3abcfdc2e3..e725282bec2 100644 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -11,6 +11,111 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm +## [1.40.0/0.62.0/0.16.0] 2026-02-02 + +### Added + +- Add `AlwaysRecord` sampler in `go.opentelemetry.io/otel/sdk/trace`. (#7724) +- Add `Enabled` method to all synchronous instrument interfaces (`Float64Counter`, `Float64UpDownCounter`, `Float64Histogram`, `Float64Gauge`, `Int64Counter`, `Int64UpDownCounter`, `Int64Histogram`, `Int64Gauge`,) in `go.opentelemetry.io/otel/metric`. + This stabilizes the synchronous instrument enabled feature, allowing users to check if an instrument will process measurements before performing computationally expensive operations. (#7763) +- Add `go.opentelemetry.io/otel/semconv/v1.39.0` package. + The package contains semantic conventions from the `v1.39.0` version of the OpenTelemetry Semantic Conventions. + See the [migration documentation](./semconv/v1.39.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.38.0.` (#7783, #7789) + +### Changed + +- Improve the concurrent performance of `HistogramReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` by 4x. (#7443) +- Improve the concurrent performance of `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar`. (#7447) +- Improve performance of concurrent histogram measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7474) +- Improve performance of concurrent synchronous gauge measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7478) +- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`. (#7492) +- `Exporter` in `go.opentelemetry.io/otel/exporters/prometheus` ignores metrics with the scope `go.opentelemetry.io/contrib/bridges/prometheus`. + This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688) +- Improve performance of concurrent exponential histogram measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7702) +- The `rpc.grpc.status_code` attribute in the experimental metrics emitted from `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` is replaced with the `rpc.response.status_code` attribute to align with the semantic conventions. (#7854) +- The `rpc.grpc.status_code` attribute in the experimental metrics emitted from `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` is replaced with the `rpc.response.status_code` attribute to align with the semantic conventions. (#7854) + +### Fixed + +- Fix bad log message when key-value pairs are dropped because of key duplication in `go.opentelemetry.io/otel/sdk/log`. (#7662) +- Fix `DroppedAttributes` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not count the non-attribute key-value pairs dropped because of key duplication. (#7662) +- Fix `SetAttributes` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not log that attributes are dropped when they are actually not dropped. (#7662) +- Fix missing `request.GetBody` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` to correctly handle HTTP/2 `GOAWAY` frame. (#7794) +- `WithHostID` detector in `go.opentelemetry.io/otel/sdk/resource` to use full path for `ioreg` command on Darwin (macOS). (#7818) + +### Deprecated + +- Deprecate `go.opentelemetry.io/otel/exporters/zipkin`. + For more information, see the [OTel blog post deprecating the Zipkin exporter](https://opentelemetry.io/blog/2025/deprecating-zipkin-exporters/). (#7670) + +## [1.39.0/0.61.0/0.15.0/0.0.14] 2025-12-05 + +### Added + +- Greatly reduce the cost of recording metrics in `go.opentelemetry.io/otel/sdk/metric` using hashing for map keys. (#7175) +- Add `WithInstrumentationAttributeSet` option to `go.opentelemetry.io/otel/log`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/trace` packages. + This provides a concurrent-safe and performant alternative to `WithInstrumentationAttributes` by accepting a pre-constructed `attribute.Set`. (#7287) +- Add experimental observability for the Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus`. + Check the `go.opentelemetry.io/otel/exporters/prometheus/internal/x` package documentation for more information. (#7345) +- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7353) +- Add temporality selector functions `DeltaTemporalitySelector`, `CumulativeTemporalitySelector`, `LowMemoryTemporalitySelector` to `go.opentelemetry.io/otel/sdk/metric`. (#7434) +- Add experimental observability metrics for simple log processor in `go.opentelemetry.io/otel/sdk/log`. (#7548) +- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7459) +- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7486) +- Add experimental observability metrics for simple span processor in `go.opentelemetry.io/otel/sdk/trace`. (#7374) +- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7512) +- Add experimental observability metrics for manual reader in `go.opentelemetry.io/otel/sdk/metric`. (#7524) +- Add experimental observability metrics for periodic reader in `go.opentelemetry.io/otel/sdk/metric`. (#7571) +- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environmental variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7608) +- Add `Enabled` method to the `Processor` interface in `go.opentelemetry.io/otel/sdk/log`. + All `Processor` implementations now include an `Enabled` method. (#7639) +- The `go.opentelemetry.io/otel/semconv/v1.38.0` package. + The package contains semantic conventions from the `v1.38.0` version of the OpenTelemetry Semantic Conventions. + See the [migration documentation](./semconv/v1.38.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.37.0.`(#7648) + +### Changed + +- `Distinct` in `go.opentelemetry.io/otel/attribute` is no longer guaranteed to uniquely identify an attribute set. + Collisions between `Distinct` values for different Sets are possible with extremely high cardinality (billions of series per instrument), but are highly unlikely. (#7175) +- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/trace` synchronously de-duplicates the passed attributes instead of delegating it to the returned `TracerOption`. (#7266) +- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/meter` synchronously de-duplicates the passed attributes instead of delegating it to the returned `MeterOption`. (#7266) +- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/log` synchronously de-duplicates the passed attributes instead of delegating it to the returned `LoggerOption`. (#7266) +- Rename the `OTEL_GO_X_SELF_OBSERVABILITY` environment variable to `OTEL_GO_X_OBSERVABILITY` in `go.opentelemetry.io/otel/sdk/trace`, `go.opentelemetry.io/otel/sdk/log`, and `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7302) +- Improve performance of histogram `Record` in `go.opentelemetry.io/otel/sdk/metric` when min and max are disabled using `NoMinMax`. (#7306) +- Improve error handling for dropped data during translation by using `prometheus.NewInvalidMetric` in `go.opentelemetry.io/otel/exporters/prometheus`. + ⚠️ **Breaking Change:** Previously, these cases were only logged and scrapes succeeded. + Now, when translation would drop data (e.g., invalid label/value), the exporter emits a `NewInvalidMetric`, and Prometheus scrapes **fail with HTTP 500** by default. + To preserve the prior behavior (scrapes succeed while errors are logged), configure your Prometheus HTTP handler with: `promhttp.HandlerOpts{ ErrorHandling: promhttp.ContinueOnError }`. (#7363) +- Replace fnv hash with xxhash in `go.opentelemetry.io/otel/attribute` for better performance. (#7371) +- The default `TranslationStrategy` in `go.opentelemetry.io/exporters/prometheus` is changed from `otlptranslator.NoUTF8EscapingWithSuffixes` to `otlptranslator.UnderscoreEscapingWithSuffixes`. (#7421) +- Improve performance of concurrent measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7427) +- Include W3C TraceFlags (bits 0–7) in the OTLP `Span.Flags` field in `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracehttp` and `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracegrpc`. (#7438) +- The `ErrorType` function in `go.opentelemetry.io/otel/semconv/v1.37.0` now handles custom error types. + If an error implements an `ErrorType() string` method, the return value of that method will be used as the error type. (#7442) + +### Fixed + +- Fix `WithInstrumentationAttributes` options in `go.opentelemetry.io/otel/trace`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/log` to properly merge attributes when passed multiple times instead of replacing them. + Attributes with duplicate keys will use the last value passed. (#7300) +- The equality of `attribute.Set` when using the `Equal` method is not affected by the user overriding the empty set pointed to by `attribute.EmptySet` in `go.opentelemetry.io/otel/attribute`. (#7357) +- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7372) +- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7372) +- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#7372) +- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#7372) +- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7372) +- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7372) +- Fix `AddAttributes`, `SetAttributes`, `SetBody` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not mutate input. (#7403) +- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.37.0`. (#7655) +- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.36.0`. (#7656) + +### Removed + +- Drop support for [Go 1.23]. (#7274) +- Remove the `FilterProcessor` interface in `go.opentelemetry.io/otel/sdk/log`. + The `Enabled` method has been added to the `Processor` interface instead. + All `Processor` implementations must now implement the `Enabled` method. + Custom processors that do not filter records can implement `Enabled` to return `true`. (#7639) + ## [1.38.0/0.60.0/0.14.0/0.0.13] 2025-08-29 This release is the last to support [Go 1.23]. @@ -3430,8 +3535,11 @@ It contains api and sdk for trace and meter. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.38.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...HEAD +[1.40.0/0.62.0/0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.40.0 +[1.39.0/0.61.0/0.15.0/0.0.14]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.39.0 [1.38.0/0.60.0/0.14.0/0.0.13]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.38.0 +[0.59.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/exporters/prometheus/v0.59.1 [1.37.0/0.59.0/0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.37.0 [0.12.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.2 [0.12.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.1 diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md index 0b3ae855c19..38dede93296 100644 --- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md +++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md @@ -54,8 +54,8 @@ 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: +This will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`. +Alternatively, you can use `git` directly with: ```sh git clone https://github.com/open-telemetry/opentelemetry-go @@ -65,8 +65,7 @@ git clone https://github.com/open-telemetry/opentelemetry-go 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. +This will add the project as `opentelemetry-go` within the current directory. Enter the newly created directory and add your fork as a new remote: @@ -109,7 +108,7 @@ A PR is considered **ready to merge** when: This is not enforced through automation, but needs to be validated by the maintainer merging. - * At least one of the qualified approvals need to be from an + * At least one of the qualified approvals needs to be from an [Approver]/[Maintainer] affiliated with a different company than the author of the PR. * PRs introducing changes that have already been discussed and consensus @@ -166,11 +165,11 @@ 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 +use cases are clear, but the methods to satisfy those use cases are not. As such, Contributions should provide functionality and behavior that -conforms to the specification, but the interface and structure is +conforms to the specification, but the interface and structure are flexible. It is preferable to have contributions follow the idioms of the @@ -217,7 +216,7 @@ about dependency compatibility. This project does not partition dependencies based on the environment (i.e. `development`, `staging`, `production`). -Only the dependencies explicitly included in the released modules have be +Only the dependencies explicitly included in the released modules have been tested and verified to work with the released code. No other guarantee is made about the compatibility of other dependencies. @@ -635,8 +634,8 @@ is not in their root name. 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]. +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: @@ -657,7 +656,7 @@ this. ### Ignoring context cancellation -OpenTelemetry API implementations need to ignore the cancellation of the context that are +OpenTelemetry API implementations need to ignore the cancellation of the context that is 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. @@ -675,6 +674,441 @@ force flushing telemetry, shutting down a signal provider) the context cancellat should be honored. This means all work done on behalf of the user provided context should be canceled. +### Observability + +OpenTelemetry Go SDK components should be instrumented to enable users observability for the health and performance of the telemetry pipeline itself. +This allows operators to understand how well their observability infrastructure is functioning and to identify potential issues before they impact their applications. + +This section outlines the best practices for building instrumentation in OpenTelemetry Go SDK components. + +#### Environment Variable Activation + +Observability features are currently experimental. +They should be disabled by default and activated through the `OTEL_GO_X_OBSERVABILITY` environment variable. +This follows the established experimental feature pattern used throughout the SDK. + +Components should check for this environment variable using a consistent pattern: + +```go +import "go.opentelemetry.io/otel/*/internal/x" + +if x.Observability.Enabled() { + // Initialize observability metrics +} +``` + +**References**: + +- [stdouttrace exporter](./exporters/stdout/stdouttrace/internal/x/x.go) +- [sdk](./sdk/internal/x/x.go) + +#### Encapsulation + +Instrumentation should be encapsulated within a dedicated `struct` (e.g. `instrumentation`). +It should not be mixed into the instrumented component. + +Prefer this: + +```go +type SDKComponent struct { + inst *instrumentation +} + +type instrumentation struct { + inflight otelconv.SDKComponentInflight + exported otelconv.SDKComponentExported +} +``` + +To this: + +```go +// ❌ Avoid this pattern. +type SDKComponent struct { + /* other SDKComponent fields... */ + + inflight otelconv.SDKComponentInflight + exported otelconv.SDKComponentExported +} +``` + +The instrumentation code should not bloat the code being instrumented. +Likely, this means its own file, or its own package if it is complex or reused. + +#### Initialization + +Instrumentation setup should be explicit, side-effect free, and local to the relevant component. +Avoid relying on global or implicit [side effects][side-effect] for initialization. + +Encapsulate setup in constructor functions, ensuring clear ownership and scope: + +```go +import ( + "errors" + + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" + "go.opentelemetry.io/otel/semconv/v1.39.0/otelconv" +) + +type SDKComponent struct { + inst *instrumentation +} + +func NewSDKComponent(config Config) (*SDKComponent, error) { + inst, err := newInstrumentation() + if err != nil { + return nil, err + } + return &SDKComponent{inst: inst}, nil +} + +type instrumentation struct { + inflight otelconv.SDKComponentInflight + exported otelconv.SDKComponentExported +} + +func newInstrumentation() (*instrumentation, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + meter := otel.GetMeterProvider().Meter( + "", + metric.WithInstrumentationVersion(sdk.Version()), + metric.WithSchemaURL(semconv.SchemaURL), + ) + + inst := &instrumentation{} + + var err, e error + inst.inflight, e = otelconv.NewSDKComponentInflight(meter) + err = errors.Join(err, e) + + inst.exported, e = otelconv.NewSDKComponentExported(meter) + err = errors.Join(err, e) + + return inst, err +} +``` + +```go +// ❌ Avoid this pattern. +func (c *Component) initObservability() { + // Initialize observability metrics + if !x.Observability.Enabled() { + return + } + + // Initialize observability metrics + c.inst = &instrumentation{/* ... */} +} +``` + +[side-effect]: https://en.wikipedia.org/wiki/Side_effect_(computer_science) + +#### Performance + +When observability is disabled there should be little to no overhead. + +```go +func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { + if e.inst != nil { + attrs := expensiveOperation() + e.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...) + } + // Export spans... +} +``` + +```go +// ❌ Avoid this pattern. +func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { + attrs := expensiveOperation() + e.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...) + // Export spans... +} + +func (i *instrumentation) recordSpanInflight(ctx context.Context, count int64, attrs ...attribute.KeyValue) { + if i == nil || i.inflight == nil { + return + } + i.inflight.Add(ctx, count, metric.WithAttributes(attrs...)) +} +``` + +When observability is enabled, the instrumentation code paths should be optimized to reduce allocation and computation overhead. + +##### Attribute and Option Allocation Management + +Pool attribute slices and options with [`sync.Pool`] to minimize allocations in measurement calls with dynamic attributes. + +```go +var ( + attrPool = sync.Pool{ + New: func() any { + // Pre-allocate common capacity + knownCap := 8 // Adjust based on expected usage + s := make([]attribute.KeyValue, 0, knownCap) + // Return a pointer to avoid extra allocation on Put(). + return &s + }, + } + + addOptPool = &sync.Pool{ + New: func() any { + const n = 1 // WithAttributeSet + o := make([]metric.AddOption, 0, n) + // Return a pointer to avoid extra allocation on Put(). + return &o + }, + } +) + +func (i *instrumentation) record(ctx context.Context, value int64, baseAttrs ...attribute.KeyValue) { + attrs := attrPool.Get().(*[]attribute.KeyValue) + defer func() { + *attrs = (*attrs)[:0] // Reset. + attrPool.Put(attrs) + }() + + *attrs = append(*attrs, baseAttrs...) + // Add any dynamic attributes. + *attrs = append(*attrs, semconv.OTelComponentName("exporter-1")) + + addOpt := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *addOpt = (*addOpt)[:0] + addOptPool.Put(addOpt) + }() + + set := attribute.NewSet(*attrs...) + *addOpt = append(*addOpt, metric.WithAttributeSet(set)) + + i.counter.Add(ctx, value, *addOpt...) +} +``` + +Pools are most effective when there are many pooled objects of the same sufficiently large size, and the objects are repeatedly used. +This amortizes the cost of allocation and synchronization. +Ideally, the pools should be scoped to be used as widely as possible within the component to maximize this efficiency while still ensuring correctness. + +[`sync.Pool`]: https://pkg.go.dev/sync#Pool + +##### Cache common attribute sets for repeated measurements + +If a static set of attributes are used for measurements and they are known at compile time, pre-compute and cache these attributes. + +```go +type spanLiveSetKey struct { + sampled bool +} + +var spanLiveSetCache = map[spanLiveSetKey]attribute.Set{ + {true}: attribute.NewSet( + otelconv.SDKSpanLive{}.AttrSpanSamplingResult( + otelconv.SpanSamplingResultRecordAndSample, + ), + ), + {false}: attribute.NewSet( + otelconv.SDKSpanLive{}.AttrSpanSamplingResult( + otelconv.SpanSamplingResultRecordOnly, + ), + ), +} + +func spanLiveSet(sampled bool) attribute.Set { + key := spanLiveSetKey{sampled: sampled} + return spanLiveSetCache[key] +} +``` + +##### Benchmarking + +Always provide benchmarks when introducing or refactoring instrumentation. +Demonstrate the impact (allocs/op, B/op, ns/op) in enabled/disabled scenarios: + +```go +func BenchmarkExportSpans(b *testing.B) { + scenarios := []struct { + name string + obsEnabled bool + }{ + {"ObsDisabled", false}, + {"ObsEnabled", true}, + } + + for _, scenario := range scenarios { + b.Run(scenario.name, func(b *testing.B) { + b.Setenv( + "OTEL_GO_X_OBSERVABILITY", + strconv.FormatBool(scenario.obsEnabled), + ) + + exporter := NewExporter() + spans := generateTestSpans(100) + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + _ = exporter.ExportSpans(context.Background(), spans) + } + }) + } +} +``` + +#### Error Handling and Robustness + +Errors should be reported back to the caller if possible, and partial failures should be handled as gracefully as possible. + +```go +func newInstrumentation() (*instrumentation, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + m := otel.GetMeterProvider().Meter(/* initialize meter */) + counter, err := otelconv.NewSDKComponentCounter(m) + // Use the partially initialized counter if available. + i := &instrumentation{counter: counter} + // Return any error to the caller. + return i, err +} +``` + +```go +// ❌ Avoid this pattern. +func newInstrumentation() *instrumentation { + if !x.Observability.Enabled() { + return nil, nil + } + + m := otel.GetMeterProvider().Meter(/* initialize meter */) + counter, err := otelconv.NewSDKComponentCounter(m) + if err != nil { + // ❌ Do not dump the error to the OTel Handler. Return it to the + // caller. + otel.Handle(err) + // ❌ Do not return nil if we can still use the partially initialized + // counter. + return nil + } + return &instrumentation{counter: counter} +} +``` + +If the instrumented component cannot report the error to the user, let it report the error to `otel.Handle`. + +#### Context Propagation + +Ensure observability measurements receive the correct context, especially for trace exemplars and distributed context: + +```go +func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { + // Use the provided context for observability measurements + e.inst.recordSpanExportStarted(ctx, len(spans)) + + err := e.doExport(ctx, spans) + + if err != nil { + e.inst.recordSpanExportFailed(ctx, len(spans), err) + } else { + e.inst.recordSpanExportSucceeded(ctx, len(spans)) + } + + return err +} +``` + +```go +// ❌ Avoid this pattern. +func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { + // ❌ Do not break the context propagation. + e.inst.recordSpanExportStarted(context.Background(), len(spans)) + + err := e.doExport(ctx, spans) + + /* ... */ + + return err +} +``` + +#### Semantic Conventions Compliance + +All observability metrics should follow the [OpenTelemetry Semantic Conventions for SDK metrics](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/otel/sdk-metrics.md). + +Use the metric semantic conventions convenience package [otelconv](./semconv/v1.39.0/otelconv/metric.go). + +##### Component Identification + +Component names and types should follow [semantic convention](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/registry/attributes/otel.md#otel-component-attributes). + +If a component is not a well-known type specified in the semantic conventions, use the package path scope type as a stable identifier. + +```go +componentType := "go.opentelemetry.io/otel/sdk/trace.Span" +``` + +```go +// ❌ Do not do this. +componentType := "trace-span" +``` + +The component name should be a stable unique identifier for the specific instance of the component. + +Use a global counter to ensure uniqueness if necessary. + +```go +// Unique 0-based ID counter for component instances. +var componentIDCounter atomic.Int64 + +// nextID returns the next unique ID for a component. +func nextID() int64 { + return componentIDCounter.Add(1) - 1 +} + +// componentName returns a unique name for the component instance. +func componentName() attribute.KeyValue { + id := nextID() + name := fmt.Sprintf("%s/%d", componentType, id) + return semconv.OTelComponentName(name) +} +``` + +The component ID will need to be resettable for deterministic testing. +If tests are in a different package than the component being tested (i.e. a `_test` package name), use a generated `counter` internal package to manage the counter. +See [stdouttrace exporter example](./exporters/stdout/stdouttrace/internal/gen.go) for reference. + +#### Testing + +Use deterministic testing with isolated state: + +```go +func TestObservability(t *testing.T) { + // Restore state after test to ensure this does not affect other tests. + prev := otel.GetMeterProvider() + t.Cleanup(func() { otel.SetMeterProvider(prev) }) + + // Isolate the meter provider for deterministic testing + reader := metric.NewManualReader() + meterProvider := metric.NewMeterProvider(metric.WithReader(reader)) + otel.SetMeterProvider(meterProvider) + + // Use t.Setenv to ensure environment variable is restored after test. + t.Setenv("OTEL_GO_X_OBSERVABILITY", "true") + + // Reset component ID counter to ensure deterministic component names. + componentIDCounter.Store(0) + + /* ... test code ... */ +} +``` + +Test order should not affect results. +Ensure that any global state (e.g. component ID counters) is reset between tests. + ## Approvers and Maintainers ### Maintainers @@ -696,7 +1130,6 @@ For more information about the approver role, see the [community repository](htt ### Triagers - [Alex Kats](https://github.com/akats7), Capital One -- [Cheng-Zhen Yang](https://github.com/scorpionknifes), Independent For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager). @@ -704,6 +1137,7 @@ For more information about the triager role, see the [community repository](http - [Aaron Clawson](https://github.com/MadVikingGod) - [Anthony Mirabella](https://github.com/Aneurysm9) +- [Cheng-Zhen Yang](https://github.com/scorpionknifes) - [Chester Cheung](https://github.com/hanyuancheung) - [Evan Torrie](https://github.com/evantorrie) - [Gustavo Silva Paiva](https://github.com/paivagustavo) diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile index bc0f1f92d1f..44870248c32 100644 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -146,11 +146,12 @@ build-tests/%: # Tests -TEST_TARGETS := test-default test-bench test-short test-verbose test-race test-concurrent-safe +TEST_TARGETS := test-default test-bench test-short test-verbose test-race test-concurrent-safe test-fuzz .PHONY: $(TEST_TARGETS) test test-default test-race: ARGS=-race test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=. test-short: ARGS=-short +test-fuzz: ARGS=-fuzztime=10s -fuzz test-verbose: ARGS=-v -race test-concurrent-safe: ARGS=-run=ConcurrentSafe -count=100 -race test-concurrent-safe: TIMEOUT=120 diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md index 6b7ab5f2193..c6335954311 100644 --- a/vendor/go.opentelemetry.io/otel/README.md +++ b/vendor/go.opentelemetry.io/otel/README.md @@ -55,25 +55,18 @@ Currently, this project supports the following environments. |----------|------------|--------------| | Ubuntu | 1.25 | amd64 | | Ubuntu | 1.24 | amd64 | -| Ubuntu | 1.23 | amd64 | | Ubuntu | 1.25 | 386 | | Ubuntu | 1.24 | 386 | -| Ubuntu | 1.23 | 386 | | Ubuntu | 1.25 | arm64 | | Ubuntu | 1.24 | arm64 | -| Ubuntu | 1.23 | arm64 | -| macOS 13 | 1.25 | amd64 | -| macOS 13 | 1.24 | amd64 | -| macOS 13 | 1.23 | amd64 | +| macOS | 1.25 | amd64 | +| macOS | 1.24 | amd64 | | macOS | 1.25 | arm64 | | macOS | 1.24 | arm64 | -| macOS | 1.23 | arm64 | | Windows | 1.25 | amd64 | | Windows | 1.24 | amd64 | -| Windows | 1.23 | amd64 | | Windows | 1.25 | 386 | | Windows | 1.24 | 386 | -| Windows | 1.23 | 386 | While this project should work for other systems, no compatibility guarantees are made for those systems currently. diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md index 1ddcdef0396..861756fd745 100644 --- a/vendor/go.opentelemetry.io/otel/RELEASING.md +++ b/vendor/go.opentelemetry.io/otel/RELEASING.md @@ -24,7 +24,7 @@ Ensure things look correct before submitting a pull request to include the addit ## 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 run `make gorelease` which runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes made in the public API. You can check/report problems with `gorelease` [here](https://golang.org/issues/26420). @@ -62,7 +62,7 @@ Update go.mod for submodules to depend on the new release which will happen in t ``` 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. + - Make sure all relevant changes for this release are included and are written in language that non-contributors to the project can understand. To verify this, you can look directly at the commits since the ``. ``` @@ -107,34 +107,50 @@ It is critical you make sure the version you push upstream is correct. ... ``` -## Release +## Sign artifacts -Finally create a Release for the new `` on GitHub. -The release body should include all the release notes from the Changelog for this release. +To ensure we comply with CNCF best practices, we need to sign the release artifacts. -### Sign the Release Artifact +Download the `.tar.gz` and `.zip` archives from the [tags page](https://github.com/open-telemetry/opentelemetry-go/tags) for the new release tag. +Both archives need to be signed with your GPG key. -To ensure we comply with CNCF best practices, we need to sign the release artifact. -The tarball attached to the GitHub release needs to be signed with your GPG key. +You can use [this script] to verify the contents of the archives before signing them. -Follow [these steps] to sign the release artifact and upload it to GitHub. -You can use [this script] to verify the contents of the tarball before signing it. +To find your GPG key ID, run: -Be sure to use the correct GPG key when signing the release artifact. +```terminal +gpg --list-secret-keys --keyid-format=long +``` + +The key ID is the 16-character string after `sec rsa4096/` (or similar). + +Set environment variables and sign both artifacts: ```terminal -gpg --local-user --armor --detach-sign opentelemetry-go-.tar.gz +export VERSION="" # e.g., v1.32.0 +export KEY_ID="" + +gpg --local-user $KEY_ID --armor --detach-sign opentelemetry-go-$VERSION.tar.gz +gpg --local-user $KEY_ID --armor --detach-sign opentelemetry-go-$VERSION.zip ``` -You can verify the signature with: +You can verify the signatures with: ```terminal -gpg --verify opentelemetry-go-.tar.gz.asc opentelemetry-go-.tar.gz +gpg --verify opentelemetry-go-$VERSION.tar.gz.asc opentelemetry-go-$VERSION.tar.gz +gpg --verify opentelemetry-go-$VERSION.zip.asc opentelemetry-go-$VERSION.zip ``` -[these steps]: https://wiki.debian.org/Creating%20signed%20GitHub%20releases [this script]: https://github.com/MrAlias/attest-sh +## 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. + +***IMPORTANT***: GitHub Releases are immutable once created. +You must upload the signed artifacts (`.tar.gz`, `.tar.gz.asc`, `.zip`, and `.zip.asc`) when creating the release, as they cannot be added or modified later. + ## Post-Release ### Contrib Repository @@ -160,14 +176,6 @@ This helps track what changes were included in each release. Once all related issues and PRs have been added to the milestone, close the milestone. -### 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) - ### Close the `Version Release` issue Once the todo list in the `Version Release` issue is complete, close the issue. diff --git a/vendor/go.opentelemetry.io/otel/VERSIONING.md b/vendor/go.opentelemetry.io/otel/VERSIONING.md index b8cb605c166..b27c9e84f51 100644 --- a/vendor/go.opentelemetry.io/otel/VERSIONING.md +++ b/vendor/go.opentelemetry.io/otel/VERSIONING.md @@ -83,7 +83,7 @@ is designed so the following goals can be achieved. 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. + alerts and dashboards. * 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 diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go index 6333d34b310..6cc1a1655cf 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/encoder.go +++ b/vendor/go.opentelemetry.io/otel/attribute/encoder.go @@ -16,7 +16,7 @@ type ( // set into a wire representation. Encoder interface { // Encode returns the serialized encoding of the attribute set using - // its Iterator. This result may be cached by a attribute.Set. + // its Iterator. This result may be cached by an attribute.Set. Encode(iterator Iterator) string // ID returns a value that is unique for each class of attribute diff --git a/vendor/go.opentelemetry.io/otel/attribute/hash.go b/vendor/go.opentelemetry.io/otel/attribute/hash.go new file mode 100644 index 00000000000..6aa69aeaecf --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/hash.go @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package attribute // import "go.opentelemetry.io/otel/attribute" + +import ( + "fmt" + "reflect" + + "go.opentelemetry.io/otel/attribute/internal/xxhash" +) + +// Type identifiers. These identifiers are hashed before the value of the +// corresponding type. This is done to distinguish values that are hashed with +// the same value representation (e.g. `int64(1)` and `true`, []int64{0} and +// int64(0)). +// +// These are all 8 byte length strings converted to a uint64 representation. A +// uint64 is used instead of the string directly as an optimization, it avoids +// the for loop in [xxhash] which adds minor overhead. +const ( + boolID uint64 = 7953749933313450591 // "_boolean" (little endian) + int64ID uint64 = 7592915492740740150 // "64_bit_i" (little endian) + float64ID uint64 = 7376742710626956342 // "64_bit_f" (little endian) + stringID uint64 = 6874584755375207263 // "_string_" (little endian) + boolSliceID uint64 = 6875993255270243167 // "_[]bool_" (little endian) + int64SliceID uint64 = 3762322556277578591 // "_[]int64" (little endian) + float64SliceID uint64 = 7308324551835016539 // "[]double" (little endian) + stringSliceID uint64 = 7453010373645655387 // "[]string" (little endian) +) + +// hashKVs returns a new xxHash64 hash of kvs. +func hashKVs(kvs []KeyValue) uint64 { + h := xxhash.New() + for _, kv := range kvs { + h = hashKV(h, kv) + } + return h.Sum64() +} + +// hashKV returns the xxHash64 hash of kv with h as the base. +func hashKV(h xxhash.Hash, kv KeyValue) xxhash.Hash { + h = h.String(string(kv.Key)) + + switch kv.Value.Type() { + case BOOL: + h = h.Uint64(boolID) + h = h.Uint64(kv.Value.numeric) + case INT64: + h = h.Uint64(int64ID) + h = h.Uint64(kv.Value.numeric) + case FLOAT64: + h = h.Uint64(float64ID) + // Assumes numeric stored with math.Float64bits. + h = h.Uint64(kv.Value.numeric) + case STRING: + h = h.Uint64(stringID) + h = h.String(kv.Value.stringly) + case BOOLSLICE: + h = h.Uint64(boolSliceID) + rv := reflect.ValueOf(kv.Value.slice) + for i := 0; i < rv.Len(); i++ { + h = h.Bool(rv.Index(i).Bool()) + } + case INT64SLICE: + h = h.Uint64(int64SliceID) + rv := reflect.ValueOf(kv.Value.slice) + for i := 0; i < rv.Len(); i++ { + h = h.Int64(rv.Index(i).Int()) + } + case FLOAT64SLICE: + h = h.Uint64(float64SliceID) + rv := reflect.ValueOf(kv.Value.slice) + for i := 0; i < rv.Len(); i++ { + h = h.Float64(rv.Index(i).Float()) + } + case STRINGSLICE: + h = h.Uint64(stringSliceID) + rv := reflect.ValueOf(kv.Value.slice) + for i := 0; i < rv.Len(); i++ { + h = h.String(rv.Index(i).String()) + } + case INVALID: + default: + // Logging is an alternative, but using the internal logger here + // causes an import cycle so it is not done. + v := kv.Value.AsInterface() + msg := fmt.Sprintf("unknown value type: %[1]v (%[1]T)", v) + panic(msg) + } + return h +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go b/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go index 0875504302c..7f5eae877da 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go +++ b/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go @@ -13,32 +13,28 @@ import ( // BoolSliceValue converts a bool slice into an array with same elements as slice. func BoolSliceValue(v []bool) any { - var zero bool - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[bool]())).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // Int64SliceValue converts an int64 slice into an array with same elements as slice. func Int64SliceValue(v []int64) any { - var zero int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[int64]())).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // Float64SliceValue converts a float64 slice into an array with same elements as slice. func Float64SliceValue(v []float64) any { - var zero float64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[float64]())).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // StringSliceValue converts a string slice into an array with same elements as slice. func StringSliceValue(v []string) any { - var zero string - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[string]())).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } diff --git a/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go b/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go new file mode 100644 index 00000000000..113a978383b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package xxhash provides a wrapper around the xxhash library for attribute hashing. +package xxhash // import "go.opentelemetry.io/otel/attribute/internal/xxhash" + +import ( + "encoding/binary" + "math" + + "github.com/cespare/xxhash/v2" +) + +// Hash wraps xxhash.Digest to provide an API friendly for hashing attribute values. +type Hash struct { + d *xxhash.Digest +} + +// New returns a new initialized xxHash64 hasher. +func New() Hash { + return Hash{d: xxhash.New()} +} + +func (h Hash) Uint64(val uint64) Hash { + var buf [8]byte + binary.LittleEndian.PutUint64(buf[:], val) + // errors from Write are always nil for xxhash + // if it returns an err then panic + _, err := h.d.Write(buf[:]) + if err != nil { + panic("xxhash write of uint64 failed: " + err.Error()) + } + return h +} + +func (h Hash) Bool(val bool) Hash { // nolint:revive // This is a hashing function. + if val { + return h.Uint64(1) + } + return h.Uint64(0) +} + +func (h Hash) Float64(val float64) Hash { + return h.Uint64(math.Float64bits(val)) +} + +func (h Hash) Int64(val int64) Hash { + return h.Uint64(uint64(val)) // nolint:gosec // Overflow doesn't matter since we are hashing. +} + +func (h Hash) String(val string) Hash { + // errors from WriteString are always nil for xxhash + // if it returns an err then panic + _, err := h.d.WriteString(val) + if err != nil { + panic("xxhash write of string failed: " + err.Error()) + } + return h +} + +// Sum64 returns the current hash value. +func (h Hash) Sum64() uint64 { + return h.d.Sum64() +} diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go index 64735d382ea..6572c98b12d 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/set.go +++ b/vendor/go.opentelemetry.io/otel/attribute/set.go @@ -9,6 +9,8 @@ import ( "reflect" "slices" "sort" + + "go.opentelemetry.io/otel/attribute/internal/xxhash" ) type ( @@ -23,19 +25,19 @@ type ( // the Equals method to ensure stable equivalence checking. // // Users should also use the Distinct returned from Equivalent as a map key - // instead of a Set directly. In addition to that type providing guarantees - // on stable equivalence, it may also provide performance improvements. + // instead of a Set directly. Set has relatively poor performance when used + // as a map key compared to Distinct. Set struct { - equivalent Distinct + hash uint64 + data any } - // Distinct is a unique identifier of a Set. + // Distinct is an identifier of a Set which is very likely to be unique. // - // Distinct is designed to ensure equivalence stability: comparisons will - // return the same value across versions. For this reason, Distinct should - // always be used as a map key instead of a Set. + // Distinct should be used as a map key instead of a Set for to provide better + // performance for map operations. Distinct struct { - iface any + hash uint64 } // Sortable implements sort.Interface, used for sorting KeyValue. @@ -46,15 +48,34 @@ type ( Sortable []KeyValue ) +// Compile time check these types remain comparable. +var ( + _ = isComparable(Set{}) + _ = isComparable(Distinct{}) +) + +func isComparable[T comparable](t T) T { return t } + var ( // keyValueType is used in computeDistinctReflect. - keyValueType = reflect.TypeOf(KeyValue{}) + keyValueType = reflect.TypeFor[KeyValue]() + + // emptyHash is the hash of an empty set. + emptyHash = xxhash.New().Sum64() - // emptySet is returned for empty attribute sets. - emptySet = &Set{ - equivalent: Distinct{ - iface: [0]KeyValue{}, - }, + // userDefinedEmptySet is an empty set. It was mistakenly exposed to users + // as something they can assign to, so it must remain addressable and + // mutable. + // + // This is kept for backwards compatibility, but should not be used in new code. + userDefinedEmptySet = &Set{ + hash: emptyHash, + data: [0]KeyValue{}, + } + + emptySet = Set{ + hash: emptyHash, + data: [0]KeyValue{}, } ) @@ -62,33 +83,35 @@ var ( // // This is a convenience provided for optimized calling utility. func EmptySet() *Set { - return emptySet -} - -// reflectValue abbreviates reflect.ValueOf(d). -func (d Distinct) reflectValue() reflect.Value { - return reflect.ValueOf(d.iface) + // Continue to return the pointer to the user-defined empty set for + // backwards-compatibility. + // + // New code should not use this, instead use emptySet. + return userDefinedEmptySet } // Valid reports whether this value refers to a valid Set. -func (d Distinct) Valid() bool { - return d.iface != nil +func (d Distinct) Valid() bool { return d.hash != 0 } + +// reflectValue abbreviates reflect.ValueOf(d). +func (l Set) reflectValue() reflect.Value { + return reflect.ValueOf(l.data) } // Len returns the number of attributes in this set. func (l *Set) Len() int { - if l == nil || !l.equivalent.Valid() { + if l == nil || l.hash == 0 { return 0 } - return l.equivalent.reflectValue().Len() + return l.reflectValue().Len() } // Get returns the KeyValue at ordered position idx in this set. func (l *Set) Get(idx int) (KeyValue, bool) { - if l == nil || !l.equivalent.Valid() { + if l == nil || l.hash == 0 { return KeyValue{}, false } - value := l.equivalent.reflectValue() + value := l.reflectValue() if idx >= 0 && idx < value.Len() { // Note: The Go compiler successfully avoids an allocation for @@ -101,10 +124,10 @@ func (l *Set) Get(idx int) (KeyValue, bool) { // Value returns the value of a specified key in this set. func (l *Set) Value(k Key) (Value, bool) { - if l == nil || !l.equivalent.Valid() { + if l == nil || l.hash == 0 { return Value{}, false } - rValue := l.equivalent.reflectValue() + rValue := l.reflectValue() vlen := rValue.Len() idx := sort.Search(vlen, func(idx int) bool { @@ -144,20 +167,29 @@ func (l *Set) ToSlice() []KeyValue { return iter.ToSlice() } -// Equivalent returns a value that may be used as a map key. The Distinct type -// guarantees that the result will equal the equivalent. Distinct value of any +// Equivalent returns a value that may be used as a map key. Equal Distinct +// values are very likely to be equivalent attribute Sets. Distinct value of any // attribute set with the same elements as this, where sets are made unique by // choosing the last value in the input for any given key. func (l *Set) Equivalent() Distinct { - if l == nil || !l.equivalent.Valid() { - return emptySet.equivalent + if l == nil || l.hash == 0 { + return Distinct{hash: emptySet.hash} } - return l.equivalent + return Distinct{hash: l.hash} } // Equals reports whether the argument set is equivalent to this set. func (l *Set) Equals(o *Set) bool { - return l.Equivalent() == o.Equivalent() + if l.Equivalent() != o.Equivalent() { + return false + } + if l == nil || l.hash == 0 { + l = &emptySet + } + if o == nil || o.hash == 0 { + o = &emptySet + } + return l.data == o.data } // Encoded returns the encoded form of this set, according to encoder. @@ -169,12 +201,6 @@ func (l *Set) Encoded(encoder Encoder) string { return encoder.Encode(l.Iter()) } -func empty() Set { - return Set{ - equivalent: emptySet.equivalent, - } -} - // NewSet returns a new Set. See the documentation for // NewSetWithSortableFiltered for more details. // @@ -204,7 +230,7 @@ func NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set { func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { // Check for empty set. if len(kvs) == 0 { - return empty(), nil + return emptySet, nil } // Stable sort so the following de-duplication can implement @@ -233,10 +259,10 @@ func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { if filter != nil { if div := filteredToFront(kvs, filter); div != 0 { - return Set{equivalent: computeDistinct(kvs[div:])}, kvs[:div] + return newSet(kvs[div:]), kvs[:div] } } - return Set{equivalent: computeDistinct(kvs)}, nil + return newSet(kvs), nil } // NewSetWithSortableFiltered returns a new Set. @@ -316,7 +342,7 @@ func (l *Set) Filter(re Filter) (Set, []KeyValue) { if first == 0 { // It is safe to assume len(slice) >= 1 given we found at least one // attribute above that needs to be filtered out. - return Set{equivalent: computeDistinct(slice[1:])}, slice[:1] + return newSet(slice[1:]), slice[:1] } // Move the filtered slice[first] to the front (preserving order). @@ -326,25 +352,24 @@ func (l *Set) Filter(re Filter) (Set, []KeyValue) { // Do not re-evaluate re(slice[first+1:]). div := filteredToFront(slice[1:first+1], re) + 1 - return Set{equivalent: computeDistinct(slice[div:])}, slice[:div] + return newSet(slice[div:]), slice[:div] } -// computeDistinct returns a Distinct using either the fixed- or -// reflect-oriented code path, depending on the size of the input. The input -// slice is assumed to already be sorted and de-duplicated. -func computeDistinct(kvs []KeyValue) Distinct { - iface := computeDistinctFixed(kvs) - if iface == nil { - iface = computeDistinctReflect(kvs) +// newSet returns a new set based on the sorted and uniqued kvs. +func newSet(kvs []KeyValue) Set { + s := Set{ + hash: hashKVs(kvs), + data: computeDataFixed(kvs), } - return Distinct{ - iface: iface, + if s.data == nil { + s.data = computeDataReflect(kvs) } + return s } -// computeDistinctFixed computes a Distinct for small slices. It returns nil -// if the input is too large for this code path. -func computeDistinctFixed(kvs []KeyValue) any { +// computeDataFixed computes a Set data for small slices. It returns nil if the +// input is too large for this code path. +func computeDataFixed(kvs []KeyValue) any { switch len(kvs) { case 1: return [1]KeyValue(kvs) @@ -371,9 +396,9 @@ func computeDistinctFixed(kvs []KeyValue) any { } } -// computeDistinctReflect computes a Distinct using reflection, works for any -// size input. -func computeDistinctReflect(kvs []KeyValue) any { +// computeDataReflect computes a Set data using reflection, works for any size +// input. +func computeDataReflect(kvs []KeyValue) any { at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() for i, keyValue := range kvs { *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue @@ -383,7 +408,7 @@ func computeDistinctReflect(kvs []KeyValue) any { // MarshalJSON returns the JSON encoding of the Set. func (l *Set) MarshalJSON() ([]byte, error) { - return json.Marshal(l.equivalent.iface) + return json.Marshal(l.data) } // MarshalLog is the marshaling function used by the logging system to represent this Set. diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go index e584b24776b..24f1fa37dbe 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/type_string.go +++ b/vendor/go.opentelemetry.io/otel/attribute/type_string.go @@ -24,8 +24,9 @@ const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICE var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} func (i Type) String() string { - if i < 0 || i >= Type(len(_Type_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_Type_index)-1 { return "Type(" + strconv.FormatInt(int64(i), 10) + ")" } - return _Type_name[_Type_index[i]:_Type_index[i+1]] + return _Type_name[_Type_index[idx]:_Type_index[idx+1]] } diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go index 653c33a8619..5931e71291a 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/value.go +++ b/vendor/go.opentelemetry.io/otel/attribute/value.go @@ -66,8 +66,7 @@ func IntValue(v int) Value { // IntSliceValue creates an INTSLICE Value. func IntSliceValue(v []int) Value { - var int64Val int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(int64Val))) + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[int64]())) for i, val := range v { cp.Elem().Index(i).SetInt(int64(val)) } diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go index f83a448ec61..c4093e49ae5 100644 --- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go +++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go @@ -317,7 +317,7 @@ func parseMember(member string) (Member, error) { keyValue, properties, found := strings.Cut(member, propertyDelimiter) if found { // Parse the member properties. - for _, pStr := range strings.Split(properties, propertyDelimiter) { + for pStr := range strings.SplitSeq(properties, propertyDelimiter) { p, err := parseProperty(pStr) if err != nil { return newInvalidMember(), err @@ -480,7 +480,7 @@ func Parse(bStr string) (Baggage, error) { } b := make(baggage.List) - for _, memberStr := range strings.Split(bStr, listDelimiter) { + for memberStr := range strings.SplitSeq(bStr, listDelimiter) { m, err := parseMember(memberStr) if err != nil { return Baggage{}, err @@ -648,7 +648,7 @@ func parsePropertyInternal(s string) (p Property, ok bool) { // If we couldn't find any valid key character, // it means the key is either empty or invalid. if keyStart == keyEnd { - return + return p, ok } // Skip spaces after the key: " key< >= value ". @@ -658,13 +658,13 @@ func parsePropertyInternal(s string) (p Property, ok bool) { // A key can have no value, like: " key ". ok = true p.key = s[keyStart:keyEnd] - return + return p, ok } // 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 + return p, ok } // Attempting to parse the value. @@ -690,14 +690,14 @@ func parsePropertyInternal(s string) (p Property, ok bool) { // we have not reached the end, it means the property is // invalid, something like: " key = value value1". if index != len(s) { - return + return p, ok } // Decode a percent-encoded value. rawVal := s[valueStart:valueEnd] unescapeVal, err := url.PathUnescape(rawVal) if err != nil { - return + return p, ok } value := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal) @@ -706,7 +706,7 @@ func parsePropertyInternal(s string) (p Property, ok bool) { p.hasValue = true p.value = value - return + return p, ok } func skipSpace(s string, offset int) int { diff --git a/vendor/go.opentelemetry.io/otel/bridge/opentracing/LICENSE b/vendor/go.opentelemetry.io/otel/bridge/opentracing/LICENSE index 261eeb9e9f8..f1aee0f1100 100644 --- a/vendor/go.opentelemetry.io/otel/bridge/opentracing/LICENSE +++ b/vendor/go.opentelemetry.io/otel/bridge/opentracing/LICENSE @@ -199,3 +199,33 @@ 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/bridge/opentracing/bridge.go b/vendor/go.opentelemetry.io/otel/bridge/opentracing/bridge.go index c26a7d7d8dd..d9952fa5977 100644 --- a/vendor/go.opentelemetry.io/otel/bridge/opentracing/bridge.go +++ b/vendor/go.opentelemetry.io/otel/bridge/opentracing/bridge.go @@ -6,6 +6,7 @@ package opentracing // import "go.opentelemetry.io/otel/bridge/opentracing" import ( "context" "fmt" + "maps" "strconv" "strings" "sync" @@ -139,7 +140,7 @@ func (s *bridgeSpan) SetOperationName(operationName string) ot.Span { // - uint32 -> int64 // - uint64 -> string // - float32 -> float64 -func (s *bridgeSpan) SetTag(key string, value interface{}) ot.Span { +func (s *bridgeSpan) SetTag(key string, value any) ot.Span { switch key { case string(otext.SpanKind): // TODO: Should we ignore it? @@ -202,7 +203,7 @@ func (e *bridgeFieldEncoder) EmitFloat64(key string, value float64) { e.emitCommon(key, value) } -func (e *bridgeFieldEncoder) EmitObject(key string, value interface{}) { +func (e *bridgeFieldEncoder) EmitObject(key string, value any) { e.emitCommon(key, value) } @@ -210,7 +211,7 @@ func (e *bridgeFieldEncoder) EmitLazyLogger(value otlog.LazyLogger) { value(e) } -func (e *bridgeFieldEncoder) emitCommon(key string, value interface{}) { +func (e *bridgeFieldEncoder) emitCommon(key string, value any) { e.pairs = append(e.pairs, otTagToOTelAttr(key, value)) } @@ -222,7 +223,7 @@ func otLogFieldsToOTelAttrs(fields []otlog.Field) []attribute.KeyValue { return encoder.pairs } -func (s *bridgeSpan) LogKV(alternatingKeyValues ...interface{}) { +func (s *bridgeSpan) LogKV(alternatingKeyValues ...any) { fields, err := otlog.InterleavedKVToFields(alternatingKeyValues...) if err != nil { return @@ -259,7 +260,7 @@ func (s *bridgeSpan) LogEvent(event string) { s.LogEventWithPayload(event, nil) } -func (s *bridgeSpan) LogEventWithPayload(event string, payload interface{}) { +func (s *bridgeSpan) LogEventWithPayload(event string, payload any) { data := ot.LogData{ Event: event, Payload: payload, @@ -320,10 +321,10 @@ var ( func NewBridgeTracer() *BridgeTracer { return &BridgeTracer{ setTracer: bridgeSetTracer{ - warningHandler: func(msg string) {}, + warningHandler: func(string) {}, otelTracer: noopTracer, }, - warningHandler: func(msg string) {}, + warningHandler: func(string) {}, propagator: nil, } } @@ -400,9 +401,7 @@ func (t *BridgeTracer) baggageGetHook(ctx context.Context, list iBaggage.List) i // need to return a copy to ensure this. merged := make(iBaggage.List, len(list)) - for k, v := range list { - merged[k] = v - } + maps.Copy(merged, list) for k, v := range items { // Overwrite according to OpenTelemetry specification. @@ -497,7 +496,7 @@ func (t *BridgeTracer) ContextWithSpanHook(ctx context.Context, span ot.Span) co return ctx } -func otTagsToOTelAttributesKindAndError(tags map[string]interface{}) ([]attribute.KeyValue, trace.SpanKind, bool) { +func otTagsToOTelAttributesKindAndError(tags map[string]any) ([]attribute.KeyValue, trace.SpanKind, bool) { kind := trace.SpanKindInternal err := false var pairs []attribute.KeyValue @@ -537,7 +536,7 @@ func otTagsToOTelAttributesKindAndError(tags map[string]interface{}) ([]attribut // - uint32 -> int64 // - uint64 -> string // - float32 -> float64 -func otTagToOTelAttr(k string, v interface{}) attribute.KeyValue { +func otTagToOTelAttr(k string, v any) attribute.KeyValue { key := otTagToOTelAttrKey(k) switch val := v.(type) { case bool: @@ -648,7 +647,7 @@ func (s fakeSpan) SpanContext() trace.SpanContext { // interface. // // Currently only the HTTPHeaders and TextMap formats are supported. -func (t *BridgeTracer) Inject(sm ot.SpanContext, format interface{}, carrier interface{}) error { +func (t *BridgeTracer) Inject(sm ot.SpanContext, format, carrier any) error { bridgeSC, ok := sm.(*bridgeSpanContext) if !ok { return ot.ErrInvalidSpanContext @@ -697,7 +696,7 @@ func (t *BridgeTracer) Inject(sm ot.SpanContext, format interface{}, carrier int // interface. // // Currently only the HTTPHeaders and TextMap formats are supported. -func (t *BridgeTracer) Extract(format interface{}, carrier interface{}) (ot.SpanContext, error) { +func (t *BridgeTracer) Extract(format, carrier any) (ot.SpanContext, error) { builtinFormat, ok := format.(ot.BuiltinFormat) if !ok { return nil, ot.ErrUnsupportedFormat @@ -764,7 +763,7 @@ func (t *textMapWrapper) Get(key string) string { return t.readerMap[key] } -func (t *textMapWrapper) Set(key string, value string) { +func (t *textMapWrapper) Set(key, value string) { t.TextMapWriter.Set(key, value) } @@ -791,7 +790,7 @@ func (t *textMapWrapper) loadMap() { }) } -func newTextMapWrapperForExtract(carrier interface{}) (*textMapWrapper, error) { +func newTextMapWrapperForExtract(carrier any) (*textMapWrapper, error) { t := &textMapWrapper{} reader, ok := carrier.(ot.TextMapReader) @@ -811,7 +810,7 @@ func newTextMapWrapperForExtract(carrier interface{}) (*textMapWrapper, error) { return t, nil } -func newTextMapWrapperForInject(carrier interface{}) (*textMapWrapper, error) { +func newTextMapWrapperForInject(carrier any) (*textMapWrapper, error) { t := &textMapWrapper{} writer, ok := carrier.(ot.TextMapWriter) @@ -833,12 +832,12 @@ func newTextMapWrapperForInject(carrier interface{}) (*textMapWrapper, error) { type textMapWriter struct{} -func (t *textMapWriter) Set(key string, value string) { +func (*textMapWriter) Set(string, string) { // maybe print a warning log. } type textMapReader struct{} -func (t *textMapReader) ForeachKey(handler func(key, val string) error) error { +func (*textMapReader) ForeachKey(func(string, string) error) error { return nil // maybe print a warning log. } diff --git a/vendor/go.opentelemetry.io/otel/bridge/opentracing/mock.go b/vendor/go.opentelemetry.io/otel/bridge/opentracing/mock.go new file mode 100644 index 00000000000..3547a5502b7 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/bridge/opentracing/mock.go @@ -0,0 +1,312 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package opentracing // import "go.opentelemetry.io/otel/bridge/opentracing" + +import ( + "context" + "math/rand/v2" + "reflect" + "sync" + "time" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/bridge/opentracing/migration" + "go.opentelemetry.io/otel/codes" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/otel/trace/embedded" + "go.opentelemetry.io/otel/trace/noop" +) + +//nolint:revive // ignoring missing comments for unexported global variables in an internal package. +var ( + statusCodeKey = attribute.Key("status.code") + statusMessageKey = attribute.Key("status.message") + errorKey = attribute.Key("error") + nameKey = attribute.Key("name") +) + +type mockContextKeyValue struct { + Key any + Value any +} + +type mockTracer struct { + embedded.Tracer + + FinishedSpans []*mockSpan + SpareTraceIDs []trace.TraceID + SpareSpanIDs []trace.SpanID + SpareContextKeyValues []mockContextKeyValue + TraceFlags trace.TraceFlags + + randLock sync.Mutex + rand *rand.ChaCha8 +} + +var ( + _ trace.Tracer = &mockTracer{} + _ migration.DeferredContextSetupTracerExtension = &mockTracer{} +) + +func newMockTracer() *mockTracer { + u := rand.Uint32() + seed := [32]byte{byte(u), byte(u >> 8), byte(u >> 16), byte(u >> 24)} + return &mockTracer{ + FinishedSpans: nil, + SpareTraceIDs: nil, + SpareSpanIDs: nil, + SpareContextKeyValues: nil, + + rand: rand.NewChaCha8(seed), + } +} + +// Start returns a new trace span with the given name and options. +func (t *mockTracer) Start( + ctx context.Context, + _ string, + opts ...trace.SpanStartOption, +) (context.Context, trace.Span) { + config := trace.NewSpanStartConfig(opts...) + startTime := config.Timestamp() + if startTime.IsZero() { + startTime = time.Now() + } + spanContext := trace.NewSpanContext(trace.SpanContextConfig{ + TraceID: t.getTraceID(ctx, &config), + SpanID: t.getSpanID(), + TraceFlags: t.TraceFlags, + }) + span := &mockSpan{ + mockTracer: t, + officialTracer: t, + spanContext: spanContext, + Attributes: config.Attributes(), + StartTime: startTime, + EndTime: time.Time{}, + ParentSpanID: t.getParentSpanID(ctx, &config), + Events: nil, + SpanKind: trace.ValidateSpanKind(config.SpanKind()), + } + if !migration.SkipContextSetup(ctx) { + ctx = trace.ContextWithSpan(ctx, span) + ctx = t.addSpareContextValue(ctx) + } + return ctx, span +} + +func (t *mockTracer) addSpareContextValue(ctx context.Context) context.Context { + if len(t.SpareContextKeyValues) > 0 { + pair := t.SpareContextKeyValues[0] + t.SpareContextKeyValues[0] = mockContextKeyValue{} + t.SpareContextKeyValues = t.SpareContextKeyValues[1:] + if len(t.SpareContextKeyValues) == 0 { + t.SpareContextKeyValues = nil + } + ctx = context.WithValue(ctx, pair.Key, pair.Value) + } + return ctx +} + +func (t *mockTracer) getTraceID(ctx context.Context, config *trace.SpanConfig) trace.TraceID { + if parent := t.getParentSpanContext(ctx, config); parent.IsValid() { + return parent.TraceID() + } + if len(t.SpareTraceIDs) > 0 { + traceID := t.SpareTraceIDs[0] + t.SpareTraceIDs = t.SpareTraceIDs[1:] + if len(t.SpareTraceIDs) == 0 { + t.SpareTraceIDs = nil + } + return traceID + } + return t.getRandTraceID() +} + +func (t *mockTracer) getParentSpanID(ctx context.Context, config *trace.SpanConfig) trace.SpanID { + if parent := t.getParentSpanContext(ctx, config); parent.IsValid() { + return parent.SpanID() + } + return trace.SpanID{} +} + +func (*mockTracer) getParentSpanContext(ctx context.Context, config *trace.SpanConfig) trace.SpanContext { + if !config.NewRoot() { + return trace.SpanContextFromContext(ctx) + } + return trace.SpanContext{} +} + +func (t *mockTracer) getSpanID() trace.SpanID { + if len(t.SpareSpanIDs) > 0 { + spanID := t.SpareSpanIDs[0] + t.SpareSpanIDs = t.SpareSpanIDs[1:] + if len(t.SpareSpanIDs) == 0 { + t.SpareSpanIDs = nil + } + return spanID + } + return t.getRandSpanID() +} + +func (t *mockTracer) getRandSpanID() trace.SpanID { + t.randLock.Lock() + defer t.randLock.Unlock() + + sid := trace.SpanID{} + _, _ = t.rand.Read(sid[:]) + + return sid +} + +func (t *mockTracer) getRandTraceID() trace.TraceID { + t.randLock.Lock() + defer t.randLock.Unlock() + + tid := trace.TraceID{} + _, _ = t.rand.Read(tid[:]) + + return tid +} + +// DeferredContextSetupHook implements the DeferredContextSetupTracerExtension interface. +func (t *mockTracer) DeferredContextSetupHook(ctx context.Context, _ trace.Span) context.Context { + return t.addSpareContextValue(ctx) +} + +type mockEvent struct { + Timestamp time.Time + Name string + Attributes []attribute.KeyValue +} + +type mockLink struct { + SpanContext trace.SpanContext + Attributes []attribute.KeyValue +} + +type mockSpan struct { + embedded.Span + + mockTracer *mockTracer + officialTracer trace.Tracer + spanContext trace.SpanContext + SpanKind trace.SpanKind + recording bool + + Attributes []attribute.KeyValue + StartTime time.Time + EndTime time.Time + ParentSpanID trace.SpanID + Events []mockEvent + Links []mockLink +} + +var ( + _ trace.Span = &mockSpan{} + _ migration.OverrideTracerSpanExtension = &mockSpan{} +) + +func (s *mockSpan) SpanContext() trace.SpanContext { + return s.spanContext +} + +func (s *mockSpan) IsRecording() bool { + return s.recording +} + +func (s *mockSpan) SetStatus(code codes.Code, msg string) { + s.SetAttributes(statusCodeKey.Int(int(code)), statusMessageKey.String(msg)) +} + +func (s *mockSpan) SetName(name string) { + s.SetAttributes(nameKey.String(name)) +} + +func (s *mockSpan) SetError(v bool) { + s.SetAttributes(errorKey.Bool(v)) +} + +func (s *mockSpan) SetAttributes(attributes ...attribute.KeyValue) { + s.applyUpdate(attributes) +} + +func (s *mockSpan) applyUpdate(update []attribute.KeyValue) { + updateM := make(map[attribute.Key]attribute.Value, len(update)) + for _, kv := range update { + updateM[kv.Key] = kv.Value + } + + seen := make(map[attribute.Key]struct{}) + for i, kv := range s.Attributes { + if v, ok := updateM[kv.Key]; ok { + s.Attributes[i].Value = v + seen[kv.Key] = struct{}{} + } + } + + for k, v := range updateM { + if _, ok := seen[k]; ok { + continue + } + s.Attributes = append(s.Attributes, attribute.KeyValue{Key: k, Value: v}) + } +} + +func (s *mockSpan) End(options ...trace.SpanEndOption) { + if !s.EndTime.IsZero() { + return // already finished + } + config := trace.NewSpanEndConfig(options...) + endTime := config.Timestamp() + if endTime.IsZero() { + endTime = time.Now() + } + s.EndTime = endTime + s.mockTracer.FinishedSpans = append(s.mockTracer.FinishedSpans, s) +} + +func (s *mockSpan) RecordError(err error, opts ...trace.EventOption) { + if err == nil { + return // no-op on nil error + } + + if !s.EndTime.IsZero() { + return // already finished + } + + s.SetStatus(codes.Error, "") + opts = append(opts, trace.WithAttributes( + semconv.ExceptionType(reflect.TypeOf(err).String()), + semconv.ExceptionMessage(err.Error()), + )) + s.AddEvent(semconv.ExceptionEventName, opts...) +} + +func (s *mockSpan) Tracer() trace.Tracer { + return s.officialTracer +} + +func (s *mockSpan) AddEvent(name string, o ...trace.EventOption) { + c := trace.NewEventConfig(o...) + s.Events = append(s.Events, mockEvent{ + Timestamp: c.Timestamp(), + Name: name, + Attributes: c.Attributes(), + }) +} + +func (s *mockSpan) AddLink(link trace.Link) { + s.Links = append(s.Links, mockLink{ + SpanContext: link.SpanContext, + Attributes: link.Attributes, + }) +} + +func (s *mockSpan) OverrideTracer(tracer trace.Tracer) { + s.officialTracer = tracer +} + +func (*mockSpan) TracerProvider() trace.TracerProvider { return noop.NewTracerProvider() } diff --git a/vendor/go.opentelemetry.io/otel/bridge/opentracing/wrapper.go b/vendor/go.opentelemetry.io/otel/bridge/opentracing/wrapper.go index 79be509b8e6..24a32f681dc 100644 --- a/vendor/go.opentelemetry.io/otel/bridge/opentracing/wrapper.go +++ b/vendor/go.opentelemetry.io/otel/bridge/opentracing/wrapper.go @@ -24,7 +24,7 @@ type WrapperTracerProvider struct { var _ trace.TracerProvider = (*WrapperTracerProvider)(nil) // Tracer returns the WrapperTracer associated with the WrapperTracerProvider. -func (p *WrapperTracerProvider) Tracer(_ string, _ ...trace.TracerOption) trace.Tracer { +func (p *WrapperTracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer { return p.wTracer } diff --git a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile index a311fbb4835..676e79116d1 100644 --- a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile +++ b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile @@ -1,4 +1,4 @@ # This is a renovate-friendly source of Docker images. FROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python -FROM otel/weaver:v0.17.1@sha256:32523b5e44fb44418786347e9f7dde187d8797adb6d57a2ee99c245346c3cdfe AS weaver +FROM otel/weaver:v0.20.0@sha256:fa4f1c6954ecea78ab1a4e865bd6f5b4aaba80c1896f9f4a11e2c361d04e197e AS weaver FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE index 261eeb9e9f8..f1aee0f1100 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE @@ -199,3 +199,33 @@ 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go index 3f0a518ae0f..30446bd28b6 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go @@ -94,7 +94,7 @@ func NewUnstarted(client Client) *Exporter { } // MarshalLog is the marshaling function used by the logging system to represent this Exporter. -func (e *Exporter) MarshalLog() interface{} { +func (e *Exporter) MarshalLog() any { return struct { Type string Client 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 index ca4544f0dae..d9bfd6e1765 100644 --- 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 @@ -6,9 +6,10 @@ package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform" import ( + commonpb "go.opentelemetry.io/proto/otlp/common/v1" + "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. 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 index 2e7690e43a2..43359c89449 100644 --- 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 @@ -4,8 +4,9 @@ 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" + + "go.opentelemetry.io/otel/sdk/instrumentation" ) func InstrumentationScope(il instrumentation.Scope) *commonpb.InstrumentationScope { 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 index db7b698a566..526bb5e070b 100644 --- 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 @@ -4,8 +4,9 @@ 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" + + "go.opentelemetry.io/otel/sdk/resource" ) // Resource transforms a Resource into an OTLP Resource. 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 index bf27ef0220e..d431fc4517d 100644 --- 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 @@ -6,12 +6,13 @@ package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptr import ( "math" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" + "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 @@ -112,7 +113,7 @@ func span(sd tracesdk.ReadOnlySpan) *tracepb.Span { if psid := sd.Parent().SpanID(); psid.IsValid() { s.ParentSpanId = psid[:] } - s.Flags = buildSpanFlags(sd.Parent()) + s.Flags = buildSpanFlagsWith(sd.SpanContext().TraceFlags(), sd.Parent()) return s } @@ -154,12 +155,11 @@ func links(links []tracesdk.Link) []*tracepb.Span_Link { 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) + flags := buildSpanFlagsWith(otLink.SpanContext.TraceFlags(), otLink.SpanContext) sl = append(sl, &tracepb.Span_Link{ TraceId: tid[:], @@ -172,13 +172,15 @@ func links(links []tracesdk.Link) []*tracepb.Span_Link { 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 +func buildSpanFlagsWith(tf trace.TraceFlags, parent trace.SpanContext) uint32 { + // Lower 8 bits are the W3C TraceFlags; always indicate that we know whether the parent is remote + flags := uint32(tf) | uint32(tracepb.SpanFlags_SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) + // Set the parent-is-remote bit when applicable + if parent.IsRemote() { + flags |= uint32(tracepb.SpanFlags_SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) } - return uint32(flags) // nolint:gosec // Flags is a bitmask and can't be negative + return flags // nolint:gosec // Flags is a bitmask and can't be negative } // spanEvents transforms span Events to an OTLP span events. @@ -189,7 +191,7 @@ func spanEvents(es []tracesdk.Event) []*tracepb.Span_Event { events := make([]*tracepb.Span_Event, len(es)) // Transform message events - for i := 0; i < len(es); i++ { + for i := range es { events[i] = &tracepb.Span_Event{ Name: es[i].Name, TimeUnixNano: uint64(max(0, es[i].Time.UnixNano())), // nolint:gosec // Overflow checked. diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE index 261eeb9e9f8..f1aee0f1100 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE @@ -199,3 +199,33 @@ 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file 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 index 8409b5f8f95..76b7cd461bf 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go @@ -9,19 +9,20 @@ import ( "sync" "time" + coltracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" "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/counter" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ" "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 { @@ -45,6 +46,9 @@ type client struct { conn *grpc.ClientConn tscMu sync.RWMutex tsc coltracepb.TraceServiceClient + + instID int64 + inst *observ.Instrumentation } // Compile time check *client implements otlptrace.Client. @@ -68,6 +72,7 @@ func newClient(opts ...Option) *client { stopCtx: ctx, stopFunc: cancel, conn: cfg.GRPCConn, + instID: counter.NextExporterID(), } if len(cfg.Traces.Headers) > 0 { @@ -92,13 +97,24 @@ func (c *client) Start(context.Context) error { c.conn = conn } + // Initialize the instrumentation if not already done. + // + // Initialize here instead of NewClient to allow any errors to be passed + // back to the caller and so that any setup of the environment variables to + // enable instrumentation can be set via code. + var err error + if c.inst == nil { + target := c.conn.CanonicalTarget() + c.inst, err = observ.NewInstrumentation(c.instID, target) + } + // 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 + return err } var errAlreadyStopped = errors.New("the client is already stopped") @@ -174,7 +190,7 @@ var errShutdown = errors.New("the client is shutdown") // // 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 { +func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.ResourceSpans) (uploadErr 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 @@ -189,6 +205,12 @@ func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc ctx, cancel := c.exportContext(ctx) defer cancel() + var code codes.Code + if c.inst != nil { + op := c.inst.ExportSpans(ctx, len(protoSpans)) + defer func() { op.End(uploadErr, code) }() + } + return c.requestFunc(ctx, func(iCtx context.Context) error { resp, err := c.tsc.Export(iCtx, &coltracepb.ExportTraceServiceRequest{ ResourceSpans: protoSpans, @@ -197,16 +219,17 @@ func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc msg := resp.PartialSuccess.GetErrorMessage() n := resp.PartialSuccess.GetRejectedSpans() if n != 0 || msg != "" { - err := internal.TracePartialSuccessError(n, msg) - otel.Handle(err) + e := internal.TracePartialSuccessError(n, msg) + uploadErr = errors.Join(uploadErr, e) } } // nil is converted to OK. - if status.Code(err) == codes.OK { + code = status.Code(err) + if code == codes.OK { // Success. - return nil + return uploadErr } - return err + return errors.Join(uploadErr, err) }) } @@ -223,7 +246,7 @@ func (c *client) exportContext(parent context.Context) (context.Context, context ) if c.exportTimeout > 0 { - ctx, cancel = context.WithTimeout(parent, c.exportTimeout) + ctx, cancel = context.WithTimeoutCause(parent, c.exportTimeout, errors.New("exporter export timeout")) } else { ctx, cancel = context.WithCancel(parent) } @@ -289,7 +312,7 @@ func throttleDelay(s *status.Status) (bool, time.Duration) { } // MarshalLog is the marshaling function used by the logging system to represent this Client. -func (c *client) MarshalLog() interface{} { +func (c *client) MarshalLog() any { return struct { Type string Endpoint string diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go new file mode 100644 index 00000000000..323b2a2c9a6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go @@ -0,0 +1,31 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/counter/counter.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package counter provides a simple counter for generating unique IDs. +// +// This package is used to generate unique IDs while allowing testing packages +// to reset the counter. +package counter // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter" + +import "sync/atomic" + +// exporterN is a global 0-based count of the number of exporters created. +var exporterN atomic.Int64 + +// NextExporterID returns the next unique ID for an exporter. +func NextExporterID() int64 { + const inc = 1 + return exporterN.Add(inc) - inc +} + +// SetExporterID sets the exporter ID counter to v and returns the previous +// value. +// +// This function is useful for testing purposes, allowing you to reset the +// counter. It should not be used in production code. +func SetExporterID(v int64) int64 { + return exporterN.Swap(v) +} 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 index b6e6b10fbf1..7fe9c9f3a33 100644 --- 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 @@ -23,3 +23,12 @@ package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/ot //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 + +//go:generate gotmpl --body=../../../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc\" }" --out=x/x.go +//go:generate gotmpl --body=../../../../../internal/shared/x/x_test.go.tmpl "--data={}" --out=x/x_test.go + +//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target.go.tmpl "--data={ \"pkg\": \"observ\", \"pkg_path\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ\" }" --out=observ/target.go +//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target_test.go.tmpl "--data={ \"pkg\": \"observ\" }" --out=observ/target_test.go + +//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter\" }" --out=counter/counter.go +//go:generate gotmpl --body=../../../../../internal/shared/counter/counter_test.go.tmpl "--data={}" --out=counter/counter_test.go diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go new file mode 100644 index 00000000000..0dd54e4b969 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package observ provides experimental observability instrumentation for the +// otlptracegrpc exporter. +package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ" diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go new file mode 100644 index 00000000000..2257fcc865f --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go @@ -0,0 +1,341 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ" + +import ( + "context" + "errors" + "fmt" + "sync" + "time" + + "google.golang.org/grpc/codes" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x" + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/metric" + semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" +) + +const ( + // ScopeName is the unique name of the meter used for instrumentation. + ScopeName = "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ" + + // SchemaURL is the schema URL of the metrics produced by this + // instrumentation. + SchemaURL = semconv.SchemaURL + + // Version is the current version of this instrumentation. + // + // This matches the version of the exporter. + Version = internal.Version +) + +var ( + measureAttrsPool = &sync.Pool{ + New: func() any { + const n = 1 + // component.name + 1 + // component.type + 1 + // server.addr + 1 + // server.port + 1 + // error.type + 1 // rpc.grpc.status_code + s := make([]attribute.KeyValue, 0, n) + // Return a pointer to a slice instead of a slice itself + // to avoid allocations on every call. + return &s + }, + } + + addOptPool = &sync.Pool{ + New: func() any { + const n = 1 // WithAttributeSet + o := make([]metric.AddOption, 0, n) + return &o + }, + } + + recordOptPool = &sync.Pool{ + New: func() any { + const n = 1 // WithAttributeSet + o := make([]metric.RecordOption, 0, n) + return &o + }, + } +) + +func get[T any](p *sync.Pool) *[]T { return p.Get().(*[]T) } + +func put[T any](p *sync.Pool, s *[]T) { + *s = (*s)[:0] // Reset. + p.Put(s) +} + +// ComponentName returns the component name for the exporter with the +// provided ID. +func ComponentName(id int64) string { + t := semconv.OTelComponentTypeOtlpGRPCSpanExporter.Value.AsString() + return fmt.Sprintf("%s/%d", t, id) +} + +// Instrumentation is experimental instrumentation for the exporter. +type Instrumentation struct { + inflightSpans metric.Int64UpDownCounter + exportedSpans metric.Int64Counter + opDuration metric.Float64Histogram + + attrs []attribute.KeyValue + addOpt metric.AddOption + recOpt metric.RecordOption +} + +// NewInstrumentation returns instrumentation for an OTLP over gPRC trace +// exporter with the provided ID using the global MeterProvider. +// +// The id should be the unique exporter instance ID. It is used +// to set the "component.name" attribute. +// +// The target is the endpoint the exporter is exporting to. +// +// If the experimental observability is disabled, nil is returned. +func NewInstrumentation(id int64, target string) (*Instrumentation, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + attrs := BaseAttrs(id, target) + i := &Instrumentation{ + attrs: attrs, + addOpt: metric.WithAttributeSet(attribute.NewSet(attrs...)), + + // Do not modify attrs (NewSet sorts in-place), make a new slice. + recOpt: metric.WithAttributeSet(attribute.NewSet(append( + // Default to OK status code. + []attribute.KeyValue{semconv.RPCGRPCStatusCodeOk}, + attrs..., + )...)), + } + + mp := otel.GetMeterProvider() + m := mp.Meter( + ScopeName, + metric.WithInstrumentationVersion(Version), + metric.WithSchemaURL(SchemaURL), + ) + + var err error + + inflightSpans, e := otelconv.NewSDKExporterSpanInflight(m) + if e != nil { + e = fmt.Errorf("failed to create span inflight metric: %w", e) + err = errors.Join(err, e) + } + i.inflightSpans = inflightSpans.Inst() + + exportedSpans, e := otelconv.NewSDKExporterSpanExported(m) + if e != nil { + e = fmt.Errorf("failed to create span exported metric: %w", e) + err = errors.Join(err, e) + } + i.exportedSpans = exportedSpans.Inst() + + opDuration, e := otelconv.NewSDKExporterOperationDuration(m) + if e != nil { + e = fmt.Errorf("failed to create operation duration metric: %w", e) + err = errors.Join(err, e) + } + i.opDuration = opDuration.Inst() + + return i, err +} + +// BaseAttrs returns the base attributes for the exporter with the provided ID +// and target. +// +// The id should be the unique exporter instance ID. It is used +// to set the "component.name" attribute. +// +// The target is the gRPC target the exporter is exporting to. It is expected +// to be the output of the Client's CanonicalTarget method. +func BaseAttrs(id int64, target string) []attribute.KeyValue { + host, port, err := ParseCanonicalTarget(target) + if err != nil || (host == "" && port < 0) { + if err != nil { + global.Debug("failed to parse target", "target", target, "error", err) + } + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpGRPCSpanExporter, + } + } + + // Do not use append so the slice is exactly allocated. + + if port < 0 { + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpGRPCSpanExporter, + semconv.ServerAddress(host), + } + } + + if host == "" { + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpGRPCSpanExporter, + semconv.ServerPort(port), + } + } + + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpGRPCSpanExporter, + semconv.ServerAddress(host), + semconv.ServerPort(port), + } +} + +// ExportSpans instruments the ExportSpans method of the exporter. It returns +// an [ExportOp] that must have its [ExportOp.End] method called when the +// ExportSpans method returns. +func (i *Instrumentation) ExportSpans(ctx context.Context, nSpans int) ExportOp { + start := time.Now() + + addOpt := get[metric.AddOption](addOptPool) + defer put(addOptPool, addOpt) + *addOpt = append(*addOpt, i.addOpt) + i.inflightSpans.Add(ctx, int64(nSpans), *addOpt...) + + return ExportOp{ + ctx: ctx, + start: start, + nSpans: int64(nSpans), + inst: i, + } +} + +// ExportOp tracks the operation being observed by [Instrumentation.ExportSpans]. +type ExportOp struct { + ctx context.Context + start time.Time + nSpans int64 + + inst *Instrumentation +} + +// End completes the observation of the operation being observed by a call to +// [Instrumentation.ExportSpans]. +// +// Any error that is encountered is provided as err. +// +// If err is not nil, all spans will be recorded as failures unless error is of +// type [internal.PartialSuccess]. In the case of a PartialSuccess, the number +// of successfully exported spans will be determined by inspecting the +// RejectedItems field of the PartialSuccess. +func (e ExportOp) End(err error, code codes.Code) { + addOpt := get[metric.AddOption](addOptPool) + defer put(addOptPool, addOpt) + *addOpt = append(*addOpt, e.inst.addOpt) + + e.inst.inflightSpans.Add(e.ctx, -e.nSpans, *addOpt...) + + success := successful(e.nSpans, err) + // Record successfully exported spans, even if the value is 0 which are + // meaningful to distribution aggregations. + e.inst.exportedSpans.Add(e.ctx, success, *addOpt...) + + if err != nil { + attrs := get[attribute.KeyValue](measureAttrsPool) + defer put(measureAttrsPool, attrs) + *attrs = append(*attrs, e.inst.attrs...) + *attrs = append(*attrs, semconv.ErrorType(err)) + + // Do not inefficiently make a copy of attrs by using + // WithAttributes instead of WithAttributeSet. + o := metric.WithAttributeSet(attribute.NewSet(*attrs...)) + // Reset addOpt with new attribute set. + *addOpt = append((*addOpt)[:0], o) + + e.inst.exportedSpans.Add(e.ctx, e.nSpans-success, *addOpt...) + } + + recOpt := get[metric.RecordOption](recordOptPool) + defer put(recordOptPool, recOpt) + *recOpt = append(*recOpt, e.inst.recordOption(err, code)) + + d := time.Since(e.start).Seconds() + e.inst.opDuration.Record(e.ctx, d, *recOpt...) +} + +// recordOption returns a RecordOption with attributes representing the +// outcome of the operation being recorded. +// +// If err is nil and code is codes.OK, the default recOpt of the +// Instrumentation is returned. +// +// If err is not nil or code is not codes.OK, a new RecordOption is returned +// with the base attributes of the Instrumentation plus the rpc.grpc.status_code +// attribute set to the provided code, and if err is not nil, the error.type +// attribute set to the type of the error. +func (i *Instrumentation) recordOption(err error, code codes.Code) metric.RecordOption { + if err == nil && code == codes.OK { + return i.recOpt + } + + attrs := get[attribute.KeyValue](measureAttrsPool) + defer put(measureAttrsPool, attrs) + *attrs = append(*attrs, i.attrs...) + + c := int64(code) // uint32 -> int64. + *attrs = append(*attrs, semconv.RPCGRPCStatusCodeKey.Int64(c)) + if err != nil { + *attrs = append(*attrs, semconv.ErrorType(err)) + } + + // Do not inefficiently make a copy of attrs by using WithAttributes + // instead of WithAttributeSet. + return metric.WithAttributeSet(attribute.NewSet(*attrs...)) +} + +// successful returns the number of successfully exported spans out of the n +// that were exported based on the provided error. +// +// If err is nil, n is returned. All spans were successfully exported. +// +// If err is not nil and not an [internal.PartialSuccess] error, 0 is returned. +// It is assumed all spans failed to be exported. +// +// If err is an [internal.PartialSuccess] error, the number of successfully +// exported spans is computed by subtracting the RejectedItems field from n. If +// RejectedItems is negative, n is returned. If RejectedItems is greater than +// n, 0 is returned. +func successful(n int64, err error) int64 { + if err == nil { + return n // All spans successfully exported. + } + // Split rejection calculation so successful is inlinable. + return n - rejected(n, err) +} + +var errPartialPool = &sync.Pool{ + New: func() any { return new(internal.PartialSuccess) }, +} + +// rejected returns how many out of the n spans exporter were rejected based on +// the provided non-nil err. +func rejected(n int64, err error) int64 { + ps := errPartialPool.Get().(*internal.PartialSuccess) + defer errPartialPool.Put(ps) + // Check for partial success. + if errors.As(err, ps) { + // Bound RejectedItems to [0, n]. This should not be needed, + // but be defensive as this is from an external source. + return min(max(ps.RejectedItems, 0), n) + } + return n // All spans rejected. +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go new file mode 100644 index 00000000000..34eee27db0d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go @@ -0,0 +1,143 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/otlp/observ/target.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ" + +import ( + "errors" + "fmt" + "net" + "net/netip" + "strconv" + "strings" +) + +const ( + schemeUnix = "unix" + schemeUnixAbstract = "unix-abstract" +) + +// ParseCanonicalTarget parses a target string and returns the extracted host +// (domain address or IP), the target port, or an error. +// +// If no port is specified, -1 is returned. +// +// If no host is specified, an empty string is returned. +// +// The target string is expected to always have the form +// "://[authority]/". For example: +// - "dns:///example.com:42" +// - "dns://8.8.8.8/example.com:42" +// - "unix:///path/to/socket" +// - "unix-abstract:///socket-name" +// - "passthrough:///192.34.2.1:42" +// +// The target is expected to come from the CanonicalTarget method of a gRPC +// Client. +func ParseCanonicalTarget(target string) (string, int, error) { + const sep = "://" + + // Find scheme. Do not allocate the string by using url.Parse. + idx := strings.Index(target, sep) + if idx == -1 { + return "", -1, fmt.Errorf("invalid target %q: missing scheme", target) + } + scheme, endpoint := target[:idx], target[idx+len(sep):] + + // Check for unix schemes. + if scheme == schemeUnix || scheme == schemeUnixAbstract { + return parseUnix(endpoint) + } + + // Strip leading slash and any authority. + if i := strings.Index(endpoint, "/"); i != -1 { + endpoint = endpoint[i+1:] + } + + // DNS, passthrough, and custom resolvers. + return parseEndpoint(endpoint) +} + +// parseUnix parses unix socket targets. +func parseUnix(endpoint string) (string, int, error) { + // Format: unix[-abstract]://path + // + // We should have "/path" (empty authority) if valid. + if len(endpoint) >= 1 && endpoint[0] == '/' { + // Return the full path including leading slash. + return endpoint, -1, nil + } + + // If there's no leading slash, it means there might be an authority + // Check for authority case (should error): "authority/path" + if slashIdx := strings.Index(endpoint, "/"); slashIdx > 0 { + return "", -1, fmt.Errorf("invalid (non-empty) authority: %s", endpoint[:slashIdx]) + } + + return "", -1, errors.New("invalid unix target format") +} + +// parseEndpoint parses an endpoint from a gRPC target. +// +// It supports the following formats: +// - "host" +// - "host%zone" +// - "host:port" +// - "host%zone:port" +// - "ipv4" +// - "ipv4%zone" +// - "ipv4:port" +// - "ipv4%zone:port" +// - "ipv6" +// - "ipv6%zone" +// - "[ipv6]" +// - "[ipv6%zone]" +// - "[ipv6]:port" +// - "[ipv6%zone]:port" +// +// It returns the host or host%zone (domain address or IP), the port (or -1 if +// not specified), or an error if the input is not a valid. +func parseEndpoint(endpoint string) (string, int, error) { + // First check if the endpoint is just an IP address. + if ip := parseIP(endpoint); ip != "" { + return ip, -1, nil + } + + // If there's no colon, there is no port (IPv6 with no port checked above). + if !strings.Contains(endpoint, ":") { + return endpoint, -1, nil + } + + host, portStr, err := net.SplitHostPort(endpoint) + if err != nil { + return "", -1, fmt.Errorf("invalid host:port %q: %w", endpoint, err) + } + + const base, bitSize = 10, 16 + port16, err := strconv.ParseUint(portStr, base, bitSize) + if err != nil { + return "", -1, fmt.Errorf("invalid port %q: %w", portStr, err) + } + port := int(port16) // port is guaranteed to be in the range [0, 65535]. + + return host, port, nil +} + +// parseIP attempts to parse the entire endpoint as an IP address. +// It returns the normalized string form of the IP if successful, +// or an empty string if parsing fails. +func parseIP(ip string) string { + // Strip leading and trailing brackets for IPv6 addresses. + if len(ip) >= 2 && ip[0] == '[' && ip[len(ip)-1] == ']' { + ip = ip[1 : len(ip)-1] + } + addr, err := netip.ParseAddr(ip) + if err != nil { + return "" + } + // Return the normalized string form of the IP. + return addr.String() +} 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 index 506ca00b61f..4f47117a58a 100644 --- 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 @@ -92,12 +92,11 @@ func NewHTTPConfig(opts ...HTTPOption) Config { 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, +// cleanPath returns a path with all spaces trimmed. If urlPath is empty, // defaultPath is returned instead. func cleanPath(urlPath string, defaultPath string) string { - tmp := path.Clean(strings.TrimSpace(urlPath)) - if tmp == "." { + tmp := strings.TrimSpace(urlPath) + if tmp == "" || tmp == "." { return defaultPath } if !path.IsAbs(tmp) { 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 index 1c465942336..a811a07b352 100644 --- 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 @@ -29,6 +29,17 @@ func (ps PartialSuccess) Error() string { return fmt.Sprintf("OTLP partial success: %s (%d %s rejected)", msg, ps.RejectedItems, ps.RejectedKind) } +// As returns true if ps can be assigned to target and makes the assignment. +// Otherwise, it returns false. This supports the errors.As() interface. +func (ps PartialSuccess) As(target any) bool { + t, ok := target.(*PartialSuccess) + if !ok { + return false + } + *t = ps + return true +} + // Is supports the errors.Is() interface. func (ps PartialSuccess) Is(err error) bool { _, ok := err.(PartialSuccess) 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 index 777e68a7bbd..a7b8e81a786 100644 --- 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 @@ -94,6 +94,11 @@ func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc { return err } + // Check if context is canceled before attempting to wait and retry. + if ctx.Err() != nil { + return fmt.Errorf("%w: %w", ctx.Err(), err) + } + if maxElapsedTime != 0 && time.Since(startTime) > maxElapsedTime { return fmt.Errorf("max retry time elapsed: %w", err) } @@ -132,7 +137,7 @@ func wait(ctx context.Context, delay time.Duration) error { select { case <-timer.C: default: - return ctx.Err() + return context.Cause(ctx) } case <-timer.C: } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go new file mode 100644 index 00000000000..e2d7cee1e17 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go @@ -0,0 +1,8 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal" + +// Version is the current release version of the OpenTelemetry OTLP gRPC trace +// exporter in use. +const Version = "1.39.0" diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/x/README.md b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/README.md similarity index 54% rename from vendor/go.opentelemetry.io/otel/sdk/trace/internal/x/README.md rename to vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/README.md index feec16fa64b..15a3011bff3 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/x/README.md +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/README.md @@ -1,33 +1,34 @@ # Experimental Features -The Trace SDK contains features that have not yet stabilized in the OpenTelemetry specification. -These features are added to the OpenTelemetry Go Trace SDK prior to stabilization in the specification so that users can start experimenting with them and provide feedback. +The `otlptracegrpc` exporter contains features that have not yet stabilized in the OpenTelemetry specification. +These features are added to the `otlptracegrpc` exporter prior to stabilization in the specification so that users can start experimenting with them and provide feedback. -These features may change in backwards incompatible ways as feedback is applied. +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 -- [Self-Observability](#self-observability) +- [Observability](#observability) -### Self-Observability +### Observability -The SDK provides a self-observability feature that allows you to monitor the SDK itself. +The `otlptracegrpc` exporter provides a observability feature that allows you to monitor the SDK itself. -To opt-in, set the environment variable `OTEL_GO_X_SELF_OBSERVABILITY` to `true`. +To opt-in, set the environment variable `OTEL_GO_X_OBSERVABILITY` to `true`. When enabled, the SDK will create the following metrics using the global `MeterProvider`: -- `otel.sdk.span.live` -- `otel.sdk.span.started` +- `otel.sdk.exporter.span.inflight` +- `otel.sdk.exporter.span.exported` +- `otel.sdk.exporter.operation.duration` Please see the [Semantic conventions for OpenTelemetry SDK metrics] documentation for more details on these metrics. -[Semantic conventions for OpenTelemetry SDK metrics]: https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/otel/sdk-metrics.md +[Semantic conventions for OpenTelemetry SDK metrics]: https://github.com/open-telemetry/semantic-conventions/blob/v1.37.0/docs/otel/sdk-metrics.md ## Compatibility and Stability -Experimental features do not fall within the scope of the OpenTelemetry Go versioning and stability [policy](../../../../VERSIONING.md). +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. diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go new file mode 100644 index 00000000000..4e89c6524f0 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x" + +import "strings" + +// Observability is an experimental feature flag that determines if exporter +// observability metrics are enabled. +// +// To enable this feature set the OTEL_GO_X_OBSERVABILITY environment variable +// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" +// will also enable this). +var Observability = newFeature( + []string{"OBSERVABILITY"}, + func(v string) (string, bool) { + if strings.EqualFold(v, "true") { + return v, true + } + return "", false + }, +) diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/x/x.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go similarity index 55% rename from vendor/go.opentelemetry.io/otel/sdk/trace/internal/x/x.go rename to vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go index 2fcbbcc66ec..741ba62c97f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/x/x.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go @@ -1,45 +1,38 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/x/x.go.tmpl + // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package x documents experimental features for [go.opentelemetry.io/otel/sdk/trace]. -package x // import "go.opentelemetry.io/otel/sdk/trace/internal/x" +// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc]. +package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x" import ( "os" - "strings" ) -// SelfObservability is an experimental feature flag that determines if SDK -// self-observability metrics are enabled. -// -// To enable this feature set the OTEL_GO_X_SELF_OBSERVABILITY environment variable -// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" -// will also enable this). -var SelfObservability = newFeature("SELF_OBSERVABILITY", func(v string) (string, bool) { - if strings.EqualFold(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 + keys []string parse func(v string) (T, bool) } -func newFeature[T any](suffix string, parse func(string) (T, bool)) Feature[T] { +func newFeature[T any](suffix []string, parse func(string) (T, bool)) Feature[T] { const envKeyRoot = "OTEL_GO_X_" + keys := make([]string, 0, len(suffix)) + for _, s := range suffix { + keys = append(keys, envKeyRoot+s) + } return Feature[T]{ - key: envKeyRoot + suffix, + keys: keys, parse: parse, } } -// Key returns the environment variable key that needs to be set to enable the +// Keys returns the environment variable keys that can be set to enable the // feature. -func (f Feature[T]) Key() string { return f.key } +func (f Feature[T]) Keys() []string { return f.keys } // 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 @@ -49,11 +42,13 @@ func (f Feature[T]) Lookup() (v T, ok bool) { // // > 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 + for _, key := range f.keys { + vRaw := os.Getenv(key) + if vRaw != "" { + return f.parse(vRaw) + } } - return f.parse(vRaw) + return v, ok } // Enabled reports whether the feature is enabled. diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE new file mode 100644 index 00000000000..f1aee0f1100 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE @@ -0,0 +1,231 @@ + 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. + +-------------------------------------------------------------------------------- + +Copyright 2009 The Go Authors. + +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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md new file mode 100644 index 00000000000..36526400941 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md @@ -0,0 +1,3 @@ +# OTLP Trace HTTP Exporter + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp)](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp) diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go new file mode 100644 index 00000000000..d0688c2016f --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go @@ -0,0 +1,418 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" + +import ( + "bytes" + "compress/gzip" + "context" + "errors" + "fmt" + "io" + "net" + "net/http" + "net/url" + "strconv" + "strings" + "sync" + "time" + + coltracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" + "google.golang.org/protobuf/proto" + + "go.opentelemetry.io/otel/exporters/otlp/otlptrace" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry" +) + +const contentTypeProto = "application/x-protobuf" + +var gzPool = sync.Pool{ + New: func() any { + w := gzip.NewWriter(io.Discard) + return w + }, +} + +// Keep it in sync with golang's DefaultTransport from net/http! We +// have our own copy to avoid handling a situation where the +// DefaultTransport is overwritten with some different implementation +// of http.RoundTripper or it's modified by other package. +var ourTransport = &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).DialContext, + ForceAttemptHTTP2: true, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, +} + +type client struct { + name string + cfg otlpconfig.SignalConfig + generalCfg otlpconfig.Config + requestFunc retry.RequestFunc + client *http.Client + stopCh chan struct{} + stopOnce sync.Once + + instID int64 + inst *observ.Instrumentation +} + +var _ otlptrace.Client = (*client)(nil) + +// NewClient creates a new HTTP trace client. +func NewClient(opts ...Option) otlptrace.Client { + cfg := otlpconfig.NewHTTPConfig(asHTTPOptions(opts)...) + + httpClient := cfg.Traces.HTTPClient + + if httpClient == nil { + httpClient = &http.Client{ + Transport: ourTransport, + Timeout: cfg.Traces.Timeout, + } + + if cfg.Traces.TLSCfg != nil || cfg.Traces.Proxy != nil { + clonedTransport := ourTransport.Clone() + httpClient.Transport = clonedTransport + + if cfg.Traces.TLSCfg != nil { + clonedTransport.TLSClientConfig = cfg.Traces.TLSCfg + } + if cfg.Traces.Proxy != nil { + clonedTransport.Proxy = cfg.Traces.Proxy + } + } + } + + stopCh := make(chan struct{}) + return &client{ + name: "traces", + cfg: cfg.Traces, + generalCfg: cfg, + requestFunc: cfg.RetryConfig.RequestFunc(evaluate), + stopCh: stopCh, + client: httpClient, + instID: counter.NextExporterID(), + } +} + +// Start does nothing in a HTTP client. +func (c *client) Start(ctx context.Context) error { + // Initialize the instrumentation if not already done. + // + // Initialize here instead of NewClient to allow any errors to be passed + // back to the caller and so that any setup of the environment variables to + // enable instrumentation can be set via code. + var err error + if c.inst == nil { + c.inst, err = observ.NewInstrumentation(c.instID, c.cfg.Endpoint) + } + + // nothing to do + select { + case <-ctx.Done(): + err = errors.Join(err, ctx.Err()) + default: + } + return err +} + +// Stop shuts down the client and interrupt any in-flight request. +func (d *client) Stop(ctx context.Context) error { + d.stopOnce.Do(func() { + close(d.stopCh) + }) + select { + case <-ctx.Done(): + return ctx.Err() + default: + } + return nil +} + +// UploadTraces sends a batch of spans to the collector. +func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.ResourceSpans) (uploadErr error) { + pbRequest := &coltracepb.ExportTraceServiceRequest{ + ResourceSpans: protoSpans, + } + rawRequest, err := proto.Marshal(pbRequest) + if err != nil { + return err + } + + ctx, cancel := d.contextWithStop(ctx) + defer cancel() + + request, err := d.newRequest(rawRequest) + if err != nil { + return err + } + + var statusCode int + if d.inst != nil { + op := d.inst.ExportSpans(ctx, len(protoSpans)) + defer func() { op.End(uploadErr, statusCode) }() + } + + return errors.Join(uploadErr, d.requestFunc(ctx, func(ctx context.Context) error { + select { + case <-ctx.Done(): + return ctx.Err() + default: + } + + request.reset(ctx) + resp, err := d.client.Do(request.Request) + var urlErr *url.Error + if errors.As(err, &urlErr) && urlErr.Temporary() { + return newResponseError(http.Header{}, err) + } + if err != nil { + return err + } + + if resp != nil && resp.Body != nil { + defer func() { + if err := resp.Body.Close(); err != nil { + uploadErr = errors.Join(uploadErr, err) + } + }() + } + + statusCode = resp.StatusCode + if statusCode >= 200 && statusCode <= 299 { + // Success, do not retry. + // Read the partial success message, if any. + var respData bytes.Buffer + if _, err := io.Copy(&respData, resp.Body); err != nil { + return err + } + if respData.Len() == 0 { + return nil + } + + if resp.Header.Get("Content-Type") == "application/x-protobuf" { + var respProto coltracepb.ExportTraceServiceResponse + if err := proto.Unmarshal(respData.Bytes(), &respProto); err != nil { + return err + } + + if respProto.PartialSuccess != nil { + msg := respProto.PartialSuccess.GetErrorMessage() + n := respProto.PartialSuccess.GetRejectedSpans() + if n != 0 || msg != "" { + err := internal.TracePartialSuccessError(n, msg) + uploadErr = errors.Join(uploadErr, err) + } + } + } + return nil + } + // Error cases. + + // server may return a message with the response + // body, so we read it to include in the error + // message to be returned. It will help in + // debugging the actual issue. + var respData bytes.Buffer + if _, err := io.Copy(&respData, resp.Body); err != nil { + return err + } + respStr := strings.TrimSpace(respData.String()) + if respStr == "" { + respStr = "(empty)" + } + bodyErr := fmt.Errorf("body: %s", respStr) + + switch statusCode { + case http.StatusTooManyRequests, + http.StatusBadGateway, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout: + // Retryable failure. + return newResponseError(resp.Header, bodyErr) + default: + // Non-retryable failure. + return fmt.Errorf("failed to send to %s: %s (%w)", request.URL, resp.Status, bodyErr) + } + })) +} + +func (d *client) newRequest(body []byte) (request, error) { + u := url.URL{Scheme: d.getScheme(), Host: d.cfg.Endpoint, Path: d.cfg.URLPath} + r, err := http.NewRequest(http.MethodPost, u.String(), http.NoBody) + if err != nil { + return request{Request: r}, err + } + + userAgent := "OTel OTLP Exporter Go/" + otlptrace.Version() + r.Header.Set("User-Agent", userAgent) + + for k, v := range d.cfg.Headers { + r.Header.Set(k, v) + } + r.Header.Set("Content-Type", contentTypeProto) + + req := request{Request: r} + switch Compression(d.cfg.Compression) { + case NoCompression: + r.ContentLength = int64(len(body)) + req.bodyReader = bodyReader(body) + case GzipCompression: + // Ensure the content length is not used. + r.ContentLength = -1 + r.Header.Set("Content-Encoding", "gzip") + + gz := gzPool.Get().(*gzip.Writer) + defer gzPool.Put(gz) + + var b bytes.Buffer + gz.Reset(&b) + + if _, err := gz.Write(body); err != nil { + return req, err + } + // Close needs to be called to ensure body is fully written. + if err := gz.Close(); err != nil { + return req, err + } + + req.bodyReader = bodyReader(b.Bytes()) + } + + return req, nil +} + +// MarshalLog is the marshaling function used by the logging system to represent this Client. +func (d *client) MarshalLog() any { + return struct { + Type string + Endpoint string + Insecure bool + }{ + Type: "otlptracehttp", + Endpoint: d.cfg.Endpoint, + Insecure: d.cfg.Insecure, + } +} + +// bodyReader returns a closure returning a new reader for buf. +func bodyReader(buf []byte) func() io.ReadCloser { + return func() io.ReadCloser { + return io.NopCloser(bytes.NewReader(buf)) + } +} + +// request wraps an http.Request with a resettable body reader. +type request struct { + *http.Request + + // bodyReader allows the same body to be used for multiple requests. + bodyReader func() io.ReadCloser +} + +// reset reinitializes the request Body and uses ctx for the request. +func (r *request) reset(ctx context.Context) { + r.Body = r.bodyReader() + r.Request = r.WithContext(ctx) +} + +// retryableError represents a request failure that can be retried. +type retryableError struct { + throttle int64 + err error +} + +// newResponseError returns a retryableError and will extract any explicit +// throttle delay contained in headers. The returned error wraps wrapped +// if it is not nil. +func newResponseError(header http.Header, wrapped error) error { + var rErr retryableError + if s, ok := header["Retry-After"]; ok { + if t, err := strconv.ParseInt(s[0], 10, 64); err == nil { + rErr.throttle = t + } + } + + rErr.err = wrapped + return rErr +} + +func (e retryableError) Error() string { + if e.err != nil { + return "retry-able request failure: " + e.err.Error() + } + + return "retry-able request failure" +} + +func (e retryableError) Unwrap() error { + return e.err +} + +func (e retryableError) As(target any) bool { + if e.err == nil { + return false + } + + switch v := target.(type) { + case **retryableError: + *v = &e + return true + default: + return false + } +} + +// evaluate returns if err is retry-able. If it is and it includes an explicit +// throttling delay, that delay is also returned. +func evaluate(err error) (bool, time.Duration) { + if err == nil { + return false, 0 + } + + // Do not use errors.As here, this should only be flattened one layer. If + // there are several chained errors, all the errors above it will be + // discarded if errors.As is used instead. + rErr, ok := err.(retryableError) //nolint:errorlint + if !ok { + return false, 0 + } + + return true, time.Duration(rErr.throttle) +} + +func (d *client) getScheme() string { + if d.cfg.Insecure { + return "http" + } + return "https" +} + +func (d *client) contextWithStop(ctx context.Context) (context.Context, context.CancelFunc) { + // Unify the parent context Done signal with the client's stop + // channel. + ctx, cancel := context.WithCancel(ctx) + go func(ctx context.Context, cancel context.CancelFunc) { + select { + case <-ctx.Done(): + // Nothing to do, either cancelled or deadline + // happened. + case <-d.stopCh: + cancel() + } + }(ctx, cancel) + return ctx, cancel +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go new file mode 100644 index 00000000000..9fea75ad19c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +/* +Package otlptracehttp provides an OTLP span exporter using HTTP with protobuf payloads. +By default the telemetry is sent to https://localhost:4318/v1/traces. + +Exporter should be created using [New]. + +The environment variables described below can be used for configuration. + +OTEL_EXPORTER_OTLP_ENDPOINT (default: "https://localhost:4318") - +target base URL ("/v1/traces" is appended) to which the exporter sends telemetry. +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. +The configuration can be overridden by OTEL_EXPORTER_OTLP_TRACES_ENDPOINT +environment variable and by [WithEndpoint], [WithEndpointURL], [WithInsecure] options. + +OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (default: "https://localhost:4318/v1/traces") - +target URL to which the exporter sends telemetry. +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. +The configuration can be overridden by [WithEndpoint], [WithEndpointURL], [WithInsecure], and [WithURLPath] options. + +OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS (default: none) - +key-value pairs used as headers associated with HTTP 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 compression strategy the exporter uses to compress the HTTP body. +Supported value: "gzip". +OTEL_EXPORTER_OTLP_TRACES_COMPRESSION takes precedence over OTEL_EXPORTER_OTLP_COMPRESSION. +The configuration can be overridden by [WithCompression] option. + +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 [WithTLSClientConfig] option. + +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 [WithTLSClientConfig] option. + +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 [WithTLSClientConfig] option. + +[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content +*/ +package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go new file mode 100644 index 00000000000..fae89ea4fe6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" + +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/otlptracehttp/internal/counter/counter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go new file mode 100644 index 00000000000..75e5c0c7ed3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go @@ -0,0 +1,31 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/counter/counter.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package counter provides a simple counter for generating unique IDs. +// +// This package is used to generate unique IDs while allowing testing packages +// to reset the counter. +package counter // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter" + +import "sync/atomic" + +// exporterN is a global 0-based count of the number of exporters created. +var exporterN atomic.Int64 + +// NextExporterID returns the next unique ID for an exporter. +func NextExporterID() int64 { + const inc = 1 + return exporterN.Add(inc) - inc +} + +// SetExporterID sets the exporter ID counter to v and returns the previous +// value. +// +// This function is useful for testing purposes, allowing you to reset the +// counter. It should not be used in production code. +func SetExporterID(v int64) int64 { + return exporterN.Swap(v) +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go new file mode 100644 index 00000000000..f4385fb4e9e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go @@ -0,0 +1,217 @@ +// Code generated 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 provides functionality to parse configuration from +// environment variables. +package envconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/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/otlptracehttp/internal/gen.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go new file mode 100644 index 00000000000..ca387432fd5 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package internal provides internal functionally for the otlptracehttp package. +package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/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/otlptracehttp/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/otlptracehttp/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/otlptracehttp/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 + +//go:generate gotmpl --body=../../../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp\" }" --out=x/x.go + +//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter\" }" --out=counter/counter.go +//go:generate gotmpl --body=../../../../../internal/shared/counter/counter_test.go.tmpl "--data={}" --out=counter/counter_test.go +//go:generate gotmpl --body=../../../../../internal/shared/x/x_test.go.tmpl "--data={}" --out=x/x_test.go diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go new file mode 100644 index 00000000000..326ef0f8799 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go @@ -0,0 +1,397 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package observ provides experimental observability instrumentation for the +// otlptracehttp exporter. +package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ" + +import ( + "context" + "errors" + "fmt" + "net" + "net/http" + "net/netip" + "strconv" + "strings" + "sync" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x" + "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/metric" + semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" +) + +const ( + // ScopeName is the unique name of the meter used for instrumentation. + ScopeName = "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ" + + // SchemaURL is the schema URL of the metrics produced by this + // instrumentation. + SchemaURL = semconv.SchemaURL + + // Version is the current version of this instrumentation. + // + // This matches the version of the exporter. + Version = internal.Version +) + +var ( + measureAttrsPool = &sync.Pool{ + New: func() any { + const n = 1 + // component.name + 1 + // component.type + 1 + // server.addr + 1 + // server.port + 1 + // error.type + 1 // http.response.status_code + s := make([]attribute.KeyValue, 0, n) + // Return a pointer to a slice instead of a slice itself + // to avoid allocations on every call. + return &s + }, + } + + addOptPool = &sync.Pool{ + New: func() any { + const n = 1 // WithAttributeSet + o := make([]metric.AddOption, 0, n) + return &o + }, + } + + recordOptPool = &sync.Pool{ + New: func() any { + const n = 1 // WithAttributeSet + o := make([]metric.RecordOption, 0, n) + return &o + }, + } +) + +func get[T any](p *sync.Pool) *[]T { return p.Get().(*[]T) } + +func put[T any](p *sync.Pool, s *[]T) { + *s = (*s)[:0] // Reset. + p.Put(s) +} + +// ComponentName returns the component name for the exporter with the +// provided ID. +func ComponentName(id int64) string { + t := semconv.OTelComponentTypeOtlpHTTPSpanExporter.Value.AsString() + return fmt.Sprintf("%s/%d", t, id) +} + +// Instrumentation is experimental instrumentation for the exporter. +type Instrumentation struct { + inflightSpans metric.Int64UpDownCounter + exportedSpans metric.Int64Counter + opDuration metric.Float64Histogram + + attrs []attribute.KeyValue + addOpt metric.AddOption + recOpt metric.RecordOption +} + +// NewInstrumentation returns instrumentation for an OTLP over HTTP trace +// exporter with the provided ID and endpoint. It uses the global +// MeterProvider to create the instrumentation. +// +// The id should be the unique exporter instance ID. It is used +// to set the "component.name" attribute. +// +// The endpoint is the HTTP endpoint the exporter is exporting to. +// +// If the experimental observability is disabled, nil is returned. +func NewInstrumentation(id int64, endpoint string) (*Instrumentation, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + attrs := BaseAttrs(id, endpoint) + i := &Instrumentation{ + attrs: attrs, + addOpt: metric.WithAttributeSet(attribute.NewSet(attrs...)), + + // Do not modify attrs (NewSet sorts in-place), make a new slice. + recOpt: metric.WithAttributeSet(attribute.NewSet(append( + // Default to OK status code (200). + []attribute.KeyValue{semconv.HTTPResponseStatusCode(http.StatusOK)}, + attrs..., + )...)), + } + + mp := otel.GetMeterProvider() + m := mp.Meter( + ScopeName, + metric.WithInstrumentationVersion(Version), + metric.WithSchemaURL(SchemaURL), + ) + + var err error + + inflightSpans, e := otelconv.NewSDKExporterSpanInflight(m) + if e != nil { + e = fmt.Errorf("failed to create span inflight metric: %w", e) + err = errors.Join(err, e) + } + i.inflightSpans = inflightSpans.Inst() + + exportedSpans, e := otelconv.NewSDKExporterSpanExported(m) + if e != nil { + e = fmt.Errorf("failed to create span exported metric: %w", e) + err = errors.Join(err, e) + } + i.exportedSpans = exportedSpans.Inst() + + opDuration, e := otelconv.NewSDKExporterOperationDuration(m) + if e != nil { + e = fmt.Errorf("failed to create operation duration metric: %w", e) + err = errors.Join(err, e) + } + i.opDuration = opDuration.Inst() + + return i, err +} + +// BaseAttrs returns the base attributes for the exporter with the provided ID +// and endpoint. +// +// The id should be the unique exporter instance ID. It is used +// to set the "component.name" attribute. +// +// The endpoint is the HTTP endpoint the exporter is exporting to. It should be +// in the format "host:port" or a full URL. +func BaseAttrs(id int64, endpoint string) []attribute.KeyValue { + host, port, err := parseEndpoint(endpoint) + if err != nil || (host == "" && port < 0) { + if err != nil { + global.Debug("failed to parse endpoint", "endpoint", endpoint, "error", err) + } + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpHTTPSpanExporter, + } + } + + // Do not use append so the slice is exactly allocated. + + if port < 0 { + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpHTTPSpanExporter, + semconv.ServerAddress(host), + } + } + + if host == "" { + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpHTTPSpanExporter, + semconv.ServerPort(port), + } + } + + return []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(id)), + semconv.OTelComponentTypeOtlpHTTPSpanExporter, + semconv.ServerAddress(host), + semconv.ServerPort(port), + } +} + +// parseEndpoint parses the host and port from endpoint that has the form +// "host[:port]", or it returns an error if the endpoint is not parsable. +// +// If no port is specified, -1 is returned. +// +// If no host is specified, an empty string is returned. +func parseEndpoint(endpoint string) (string, int, error) { + // First check if the endpoint is just an IP address. + if ip := parseIP(endpoint); ip != "" { + return ip, -1, nil + } + + // If there's no colon, there is no port (IPv6 with no port checked above). + if !strings.Contains(endpoint, ":") { + return endpoint, -1, nil + } + + // Otherwise, parse as host:port. + host, portStr, err := net.SplitHostPort(endpoint) + if err != nil { + return "", -1, fmt.Errorf("invalid host:port %q: %w", endpoint, err) + } + + const base, bitSize = 10, 16 + port16, err := strconv.ParseUint(portStr, base, bitSize) + if err != nil { + return "", -1, fmt.Errorf("invalid port %q: %w", portStr, err) + } + port := int(port16) // port is guaranteed to be in the range [0, 65535]. + + return host, port, nil +} + +// parseIP attempts to parse the entire endpoint as an IP address. +// It returns the normalized string form of the IP if successful, +// or an empty string if parsing fails. +func parseIP(ip string) string { + // Strip leading and trailing brackets for IPv6 addresses. + if len(ip) >= 2 && ip[0] == '[' && ip[len(ip)-1] == ']' { + ip = ip[1 : len(ip)-1] + } + addr, err := netip.ParseAddr(ip) + if err != nil { + return "" + } + // Return the normalized string form of the IP. + return addr.String() +} + +// ExportSpans instruments the UploadTraces method of the client. It returns an +// [ExportOp] that must have its [ExportOp.End] method called when the +// operation end. +func (i *Instrumentation) ExportSpans(ctx context.Context, nSpans int) ExportOp { + start := time.Now() + + addOpt := get[metric.AddOption](addOptPool) + defer put(addOptPool, addOpt) + *addOpt = append(*addOpt, i.addOpt) + i.inflightSpans.Add(ctx, int64(nSpans), *addOpt...) + + return ExportOp{ + ctx: ctx, + start: start, + nSpans: int64(nSpans), + inst: i, + } +} + +// ExportOp tracks the export operation being observed by +// [Instrumentation.ExportSpans]. +type ExportOp struct { + ctx context.Context + start time.Time + nSpans int64 + + inst *Instrumentation +} + +// End completes the observation of the operation being observed by a call to +// [Instrumentation.ExportSpans]. +// +// Any error that is encountered is provided as err. +// The HTTP status code from the response is provided as status. +// +// If err is not nil, all spans will be recorded as failures unless error is of +// type [internal.PartialSuccess]. In the case of a PartialSuccess, the number +// of successfully exported spans will be determined by inspecting the +// RejectedItems field of the PartialSuccess. +func (e ExportOp) End(err error, status int) { + addOpt := get[metric.AddOption](addOptPool) + defer put(addOptPool, addOpt) + *addOpt = append(*addOpt, e.inst.addOpt) + + e.inst.inflightSpans.Add(e.ctx, -e.nSpans, *addOpt...) + + success := successful(e.nSpans, err) + // Record successfully exported spans, even if the value is 0 which are + // meaningful to distribution aggregations. + e.inst.exportedSpans.Add(e.ctx, success, *addOpt...) + + if err != nil { + attrs := get[attribute.KeyValue](measureAttrsPool) + defer put(measureAttrsPool, attrs) + *attrs = append(*attrs, e.inst.attrs...) + *attrs = append(*attrs, semconv.ErrorType(err)) + + // Do not inefficiently make a copy of attrs by using + // WithAttributes instead of WithAttributeSet. + o := metric.WithAttributeSet(attribute.NewSet(*attrs...)) + // Reset addOpt with new attribute set. + *addOpt = append((*addOpt)[:0], o) + + e.inst.exportedSpans.Add(e.ctx, e.nSpans-success, *addOpt...) + } + + recOpt := get[metric.RecordOption](recordOptPool) + defer put(recordOptPool, recOpt) + *recOpt = append(*recOpt, e.inst.recordOption(err, status)) + + d := time.Since(e.start).Seconds() + e.inst.opDuration.Record(e.ctx, d, *recOpt...) +} + +// recordOption returns a RecordOption with attributes representing the +// outcome of the operation being recorded. +// +// If err is nil and status is 200, the default recOpt of the +// Instrumentation is returned. +// +// Otherwise, a new RecordOption is returned with the base attributes of the +// Instrumentation plus the http.response.status_code attribute set to the +// provided status, and if err is not nil, the error.type attribute set +// to the type of the error. +func (i *Instrumentation) recordOption(err error, status int) metric.RecordOption { + if err == nil && status == http.StatusOK { + return i.recOpt + } + + attrs := get[attribute.KeyValue](measureAttrsPool) + defer put(measureAttrsPool, attrs) + *attrs = append(*attrs, i.attrs...) + + *attrs = append(*attrs, semconv.HTTPResponseStatusCode(status)) + if err != nil { + *attrs = append(*attrs, semconv.ErrorType(err)) + } + + // Do not inefficiently make a copy of attrs by using WithAttributes + // instead of WithAttributeSet. + return metric.WithAttributeSet(attribute.NewSet(*attrs...)) +} + +// successful returns the number of successfully exported spans out of the n +// that were exported based on the provided error. +// +// If err is nil, n is returned. All spans were successfully exported. +// +// If err is not nil and not an [internal.PartialSuccess] error, 0 is returned. +// It is assumed all spans failed to be exported. +// +// If err is an [internal.PartialSuccess] error, the number of successfully +// exported spans is computed by subtracting the RejectedItems field from n. If +// RejectedItems is negative, n is returned. If RejectedItems is greater than +// n, 0 is returned. +func successful(n int64, err error) int64 { + if err == nil { + return n // All spans successfully exported. + } + // Split rejection calculation so successful is inlinable. + return n - rejected(n, err) +} + +var errPartialPool = &sync.Pool{ + New: func() any { return new(internal.PartialSuccess) }, +} + +// rejected returns how many out of the n spans exporter were rejected based on +// the provided non-nil err. +func rejected(n int64, err error) int64 { + ps := errPartialPool.Get().(*internal.PartialSuccess) + defer errPartialPool.Put(ps) + // Check for partial success. + if errors.As(err, ps) { + // Bound RejectedItems to [0, n]. This should not be needed, + // but be defensive as this is from an external source. + return min(max(ps.RejectedItems, 0), n) + } + return n // All spans rejected. +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go new file mode 100644 index 00000000000..121b02f5cd3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go @@ -0,0 +1,150 @@ +// Code generated 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/otlptracehttp/internal/otlpconfig" + +import ( + "crypto/tls" + "crypto/x509" + "net/url" + "os" + "path" + "strings" + "time" + + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/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/otlptracehttp/internal/otlpconfig/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go new file mode 100644 index 00000000000..e415feea6eb --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go @@ -0,0 +1,360 @@ +// Code generated 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 provides configuration for the otlptrace exporters. +package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/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/otlptracehttp/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 + + // HTTP configurations + Proxy HTTPTransportProxyFunc + HTTPClient *http.Client + } + + 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. If urlPath is empty, +// defaultPath is returned instead. +func cleanPath(urlPath string, defaultPath string) string { + tmp := strings.TrimSpace(urlPath) + if tmp == "" || 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 + }) +} + +func WithHTTPClient(c *http.Client) GenericOption { + return newGenericOption(func(cfg Config) Config { + cfg.Traces.HTTPClient = c + return cfg + }) +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go new file mode 100644 index 00000000000..6a52b58cc0b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go @@ -0,0 +1,40 @@ +// Code generated 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/otlptracehttp/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/otlptracehttp/internal/otlpconfig/tls.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go new file mode 100644 index 00000000000..5b389cb03fa --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go @@ -0,0 +1,26 @@ +// Code generated 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/otlptracehttp/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/otlptracehttp/internal/partialsuccess.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go new file mode 100644 index 00000000000..33ff6c02438 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go @@ -0,0 +1,67 @@ +// Code generated 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/otlptracehttp/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) +} + +// As returns true if ps can be assigned to target and makes the assignment. +// Otherwise, it returns false. This supports the errors.As() interface. +func (ps PartialSuccess) As(target any) bool { + t, ok := target.(*PartialSuccess) + if !ok { + return false + } + *t = ps + return true +} + +// 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/otlptracehttp/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go new file mode 100644 index 00000000000..bf39808254f --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go @@ -0,0 +1,146 @@ +// Code generated 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/otlptracehttp/internal/retry" + +import ( + "context" + "fmt" + "time" + + "github.com/cenkalti/backoff/v5" +) + +// 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, + } + b.Reset() + + maxElapsedTime := c.MaxElapsedTime + startTime := time.Now() + + for { + err := fn(ctx) + if err == nil { + return nil + } + + retryable, throttle := evaluate(err) + if !retryable { + return err + } + + // Check if context is canceled before attempting to wait and retry. + if ctx.Err() != nil { + return fmt.Errorf("%w: %w", ctx.Err(), err) + } + + if maxElapsedTime != 0 && time.Since(startTime) > maxElapsedTime { + return fmt.Errorf("max retry time elapsed: %w", err) + } + + // Wait for the greater of the backoff or throttle delay. + bOff := b.NextBackOff() + delay := max(throttle, bOff) + + elapsed := time.Since(startTime) + if maxElapsedTime != 0 && elapsed+throttle > maxElapsedTime { + return fmt.Errorf("max retry time would elapse: %w", err) + } + + 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 context.Cause(ctx) + } + case <-timer.C: + } + + return nil +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go new file mode 100644 index 00000000000..cbd6e63230b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go @@ -0,0 +1,8 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal" + +// Version is the current release version of the OpenTelemetry OTLP HTTP trace +// exporter in use. +const Version = "1.39.0" diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go new file mode 100644 index 00000000000..ecae4a79cac --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go @@ -0,0 +1,22 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x" + +import "strings" + +// Observability is an experimental feature flag that determines if exporter +// observability metrics are enabled. +// +// To enable this feature set the OTEL_GO_X_OBSERVABILITY environment variable +// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" +// will also enable this). +var Observability = newFeature( + []string{"OBSERVABILITY"}, + func(v string) (string, bool) { + if strings.EqualFold(v, "true") { + return v, true + } + return "", false + }, +) diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go new file mode 100644 index 00000000000..099dab00710 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go @@ -0,0 +1,58 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/x/x.go.tmpl + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp]. +package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x" + +import ( + "os" +) + +// 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 { + keys []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_" + keys := make([]string, 0, len(suffix)) + for _, s := range suffix { + keys = append(keys, envKeyRoot+s) + } + return Feature[T]{ + keys: keys, + parse: parse, + } +} + +// Keys returns the environment variable keys that can be set to enable the +// feature. +func (f Feature[T]) Keys() []string { return f.keys } + +// 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. + for _, key := range f.keys { + vRaw := os.Getenv(key) + if vRaw != "" { + return f.parse(vRaw) + } + } + return v, ok +} + +// Enabled reports whether the feature is enabled. +func (f Feature[T]) Enabled() bool { + _, ok := f.Lookup() + return ok +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go new file mode 100644 index 00000000000..cfe21dbfb05 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go @@ -0,0 +1,171 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" + +import ( + "crypto/tls" + "net/http" + "net/url" + "time" + + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry" +) + +// Compression describes the compression used for payloads sent to the +// collector. +type Compression otlpconfig.Compression + +// 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. +type HTTPTransportProxyFunc func(*http.Request) (*url.URL, error) + +const ( + // NoCompression tells the driver to send payloads without + // compression. + NoCompression = Compression(otlpconfig.NoCompression) + // GzipCompression tells the driver to send payloads after + // compressing them with gzip. + GzipCompression = Compression(otlpconfig.GzipCompression) +) + +// Option applies an option to the HTTP client. +type Option interface { + applyHTTPOption(otlpconfig.Config) otlpconfig.Config +} + +func asHTTPOptions(opts []Option) []otlpconfig.HTTPOption { + converted := make([]otlpconfig.HTTPOption, len(opts)) + for i, o := range opts { + converted[i] = otlpconfig.NewHTTPOption(o.applyHTTPOption) + } + return converted +} + +// RetryConfig defines configuration for retrying batches in case of export +// failure using an exponential backoff. +type RetryConfig retry.Config + +type wrappedOption struct { + otlpconfig.HTTPOption +} + +func (w wrappedOption) applyHTTPOption(cfg otlpconfig.Config) otlpconfig.Config { + return w.ApplyHTTPOption(cfg) +} + +// WithEndpoint sets the target endpoint (host and port) the Exporter will +// connect to. The provided endpoint should resemble "example.com:4318" (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. +// Note, both environment variables include the full +// scheme and path, while WithEndpoint sets only the host and port. +// +// 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:4318" 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. +// +// 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, "localhost:4318" will be used. +// +// This option has no effect if WithGRPCConn is used. +func WithEndpointURL(u string) Option { + return wrappedOption{otlpconfig.WithEndpointURL(u)} +} + +// WithCompression tells the driver to compress the sent data. +func WithCompression(compression Compression) Option { + return wrappedOption{otlpconfig.WithCompression(otlpconfig.Compression(compression))} +} + +// WithURLPath allows one to override the default URL path used +// for sending traces. If unset, default ("/v1/traces") will be used. +func WithURLPath(urlPath string) Option { + return wrappedOption{otlpconfig.WithURLPath(urlPath)} +} + +// WithTLSClientConfig can be used to set up a custom TLS +// configuration for the client used to send payloads to the +// collector. Use it if you want to use a custom certificate. +func WithTLSClientConfig(tlsCfg *tls.Config) Option { + return wrappedOption{otlpconfig.WithTLSClientConfig(tlsCfg)} +} + +// WithInsecure tells the driver to connect to the collector using the +// HTTP scheme, instead of HTTPS. +func WithInsecure() Option { + return wrappedOption{otlpconfig.WithInsecure()} +} + +// WithHeaders allows one to tell the driver to send additional HTTP +// headers with the payloads. Specifying headers like Content-Length, +// Content-Encoding and Content-Type may result in a broken driver. +func WithHeaders(headers map[string]string) Option { + return wrappedOption{otlpconfig.WithHeaders(headers)} +} + +// WithTimeout tells the driver the max waiting time for the backend to process +// each spans batch. If unset, the default will be 10 seconds. +func WithTimeout(duration time.Duration) Option { + return wrappedOption{otlpconfig.WithTimeout(duration)} +} + +// WithRetry configures the retry policy for transient errors that may occurs +// when exporting traces. An exponential back-off algorithm is used to ensure +// endpoints are not overwhelmed with retries. If unset, the default retry +// policy will retry after 5 seconds and increase exponentially after each +// error for a total of 1 minute. +func WithRetry(rc RetryConfig) Option { + return wrappedOption{otlpconfig.WithRetry(retry.Config(rc))} +} + +// WithProxy sets the Proxy function the client will use to determine the +// proxy to use for an HTTP request. If this option is not used, the client +// will use [http.ProxyFromEnvironment]. +func WithProxy(pf HTTPTransportProxyFunc) Option { + return wrappedOption{otlpconfig.WithProxy(otlpconfig.HTTPTransportProxyFunc(pf))} +} + +// WithHTTPClient sets the HTTP client to used by the exporter. +// +// This option will take precedence over [WithProxy], [WithTimeout], +// [WithTLSClientConfig] options as well as OTEL_EXPORTER_OTLP_CERTIFICATE, +// OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE, OTEL_EXPORTER_OTLP_TIMEOUT, +// OTEL_EXPORTER_OTLP_TRACES_TIMEOUT environment variables. +// +// Timeout and all other fields of the passed [http.Client] are left intact. +// +// Be aware that passing an HTTP client with transport like +// [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewTransport] can +// cause the client to be instrumented twice and cause infinite recursion. +func WithHTTPClient(c *http.Client) Option { + return wrappedOption{otlpconfig.WithHTTPClient(c)} +} diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go index 5f78bfdfb06..6838f3c4e3f 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go @@ -5,5 +5,5 @@ 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.36.0" + return "1.39.0" } diff --git a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go index ae92a425166..55255cddfc6 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go @@ -229,6 +229,13 @@ func (i *sfCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOpt } } +func (i *sfCounter) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64Counter).Enabled(ctx) + } + return false +} + type sfUpDownCounter struct { embedded.Float64UpDownCounter @@ -255,6 +262,13 @@ func (i *sfUpDownCounter) Add(ctx context.Context, incr float64, opts ...metric. } } +func (i *sfUpDownCounter) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64UpDownCounter).Enabled(ctx) + } + return false +} + type sfHistogram struct { embedded.Float64Histogram @@ -281,6 +295,13 @@ func (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.Reco } } +func (i *sfHistogram) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64Histogram).Enabled(ctx) + } + return false +} + type sfGauge struct { embedded.Float64Gauge @@ -307,6 +328,13 @@ func (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOp } } +func (i *sfGauge) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Float64Gauge).Enabled(ctx) + } + return false +} + type siCounter struct { embedded.Int64Counter @@ -333,6 +361,13 @@ func (i *siCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) } } +func (i *siCounter) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64Counter).Enabled(ctx) + } + return false +} + type siUpDownCounter struct { embedded.Int64UpDownCounter @@ -359,6 +394,13 @@ func (i *siUpDownCounter) Add(ctx context.Context, x int64, opts ...metric.AddOp } } +func (i *siUpDownCounter) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64UpDownCounter).Enabled(ctx) + } + return false +} + type siHistogram struct { embedded.Int64Histogram @@ -385,6 +427,13 @@ func (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.Record } } +func (i *siHistogram) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64Histogram).Enabled(ctx) + } + return false +} + type siGauge struct { embedded.Int64Gauge @@ -410,3 +459,10 @@ func (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOpti ctr.(metric.Int64Gauge).Record(ctx, x, opts...) } } + +func (i *siGauge) Enabled(ctx context.Context) bool { + if ctr := i.delegate.Load(); ctr != nil { + return ctr.(metric.Int64Gauge).Enabled(ctx) + } + return false +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go index adb37b5b0e7..50043d669ba 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go @@ -105,7 +105,7 @@ type delegatedInstrument interface { setDelegate(metric.Meter) } -// instID are the identifying properties of a instrument. +// instID are the identifying properties of an instrument. type instID struct { // name is the name of the stream. name string @@ -157,7 +157,7 @@ func (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) cfg := metric.NewInt64CounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*siCounter)(nil)), + kind: reflect.TypeFor[*siCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -183,7 +183,7 @@ func (m *meter) Int64UpDownCounter( cfg := metric.NewInt64UpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*siUpDownCounter)(nil)), + kind: reflect.TypeFor[*siUpDownCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -206,7 +206,7 @@ func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOpti cfg := metric.NewInt64HistogramConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*siHistogram)(nil)), + kind: reflect.TypeFor[*siHistogram](), description: cfg.Description(), unit: cfg.Unit(), } @@ -229,7 +229,7 @@ func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (met cfg := metric.NewInt64GaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*siGauge)(nil)), + kind: reflect.TypeFor[*siGauge](), description: cfg.Description(), unit: cfg.Unit(), } @@ -255,7 +255,7 @@ func (m *meter) Int64ObservableCounter( cfg := metric.NewInt64ObservableCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*aiCounter)(nil)), + kind: reflect.TypeFor[*aiCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -281,7 +281,7 @@ func (m *meter) Int64ObservableUpDownCounter( cfg := metric.NewInt64ObservableUpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*aiUpDownCounter)(nil)), + kind: reflect.TypeFor[*aiUpDownCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -307,7 +307,7 @@ func (m *meter) Int64ObservableGauge( cfg := metric.NewInt64ObservableGaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*aiGauge)(nil)), + kind: reflect.TypeFor[*aiGauge](), description: cfg.Description(), unit: cfg.Unit(), } @@ -330,7 +330,7 @@ func (m *meter) Float64Counter(name string, options ...metric.Float64CounterOpti cfg := metric.NewFloat64CounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*sfCounter)(nil)), + kind: reflect.TypeFor[*sfCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -356,7 +356,7 @@ func (m *meter) Float64UpDownCounter( cfg := metric.NewFloat64UpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*sfUpDownCounter)(nil)), + kind: reflect.TypeFor[*sfUpDownCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -382,7 +382,7 @@ func (m *meter) Float64Histogram( cfg := metric.NewFloat64HistogramConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*sfHistogram)(nil)), + kind: reflect.TypeFor[*sfHistogram](), description: cfg.Description(), unit: cfg.Unit(), } @@ -405,7 +405,7 @@ func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) cfg := metric.NewFloat64GaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*sfGauge)(nil)), + kind: reflect.TypeFor[*sfGauge](), description: cfg.Description(), unit: cfg.Unit(), } @@ -431,7 +431,7 @@ func (m *meter) Float64ObservableCounter( cfg := metric.NewFloat64ObservableCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*afCounter)(nil)), + kind: reflect.TypeFor[*afCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -457,7 +457,7 @@ func (m *meter) Float64ObservableUpDownCounter( cfg := metric.NewFloat64ObservableUpDownCounterConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*afUpDownCounter)(nil)), + kind: reflect.TypeFor[*afUpDownCounter](), description: cfg.Description(), unit: cfg.Unit(), } @@ -483,7 +483,7 @@ func (m *meter) Float64ObservableGauge( cfg := metric.NewFloat64ObservableGaugeConfig(options...) id := instID{ name: name, - kind: reflect.TypeOf((*afGauge)(nil)), + kind: reflect.TypeFor[*afGauge](), description: cfg.Description(), unit: cfg.Unit(), } diff --git a/vendor/go.opentelemetry.io/otel/metric.go b/vendor/go.opentelemetry.io/otel/metric.go index 1e6473b32f3..527d9aec86b 100644 --- a/vendor/go.opentelemetry.io/otel/metric.go +++ b/vendor/go.opentelemetry.io/otel/metric.go @@ -11,7 +11,7 @@ import ( // 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 +// If the name is empty, then an implementation defined default name will be // used instead. // // If this is called before a global MeterProvider is registered the returned diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go index b7fc973a66c..eb4f5961fd1 100644 --- a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go +++ b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go @@ -227,7 +227,11 @@ type Float64Observer interface { // attributes as another Float64Callbacks also registered for the same // instrument. // -// The function needs to be concurrent safe. +// The function needs to be reentrant and concurrent safe. +// +// Note that Go's mutexes are not reentrant, and locking a mutex takes +// an indefinite amount of time. It is therefore advised to avoid +// using mutexes inside callbacks. type Float64Callback func(context.Context, Float64Observer) error // Float64ObservableOption applies options to float64 Observer instruments. diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go index 4404b71a22f..1dfc4b0f25c 100644 --- a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go +++ b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go @@ -225,7 +225,11 @@ type Int64Observer interface { // attributes as another Int64Callbacks also registered for the same // instrument. // -// The function needs to be concurrent safe. +// The function needs to be reentrant and concurrent safe. +// +// Note that Go's mutexes are not reentrant, and locking a mutex takes +// an indefinite amount of time. It is therefore advised to avoid +// using mutexes inside callbacks. type Int64Callback func(context.Context, Int64Observer) error // Int64ObservableOption applies options to int64 Observer instruments. diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go index d9e3b13e4d1..e42dd6e70ab 100644 --- a/vendor/go.opentelemetry.io/otel/metric/config.go +++ b/vendor/go.opentelemetry.io/otel/metric/config.go @@ -3,7 +3,11 @@ package metric // import "go.opentelemetry.io/otel/metric" -import "go.opentelemetry.io/otel/attribute" +import ( + "slices" + + "go.opentelemetry.io/otel/attribute" +) // MeterConfig contains options for Meters. type MeterConfig struct { @@ -62,12 +66,38 @@ func WithInstrumentationVersion(version string) MeterOption { }) } -// WithInstrumentationAttributes sets the instrumentation attributes. +// WithInstrumentationAttributes adds the instrumentation attributes. +// +// This is equivalent to calling [WithInstrumentationAttributeSet] with an +// [attribute.Set] created from a clone of the passed attributes. +// [WithInstrumentationAttributeSet] is recommended for more control. // -// The passed attributes will be de-duplicated. +// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] +// options are passed, the attributes will be merged together in the order +// they are passed. Attributes with duplicate keys will use the last value passed. func WithInstrumentationAttributes(attr ...attribute.KeyValue) MeterOption { + set := attribute.NewSet(slices.Clone(attr)...) + return WithInstrumentationAttributeSet(set) +} + +// WithInstrumentationAttributeSet adds the instrumentation attributes. +// +// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] +// options are passed, the attributes will be merged together in the order +// they are passed. Attributes with duplicate keys will use the last value passed. +func WithInstrumentationAttributeSet(set attribute.Set) MeterOption { + if set.Len() == 0 { + return meterOptionFunc(func(config MeterConfig) MeterConfig { + return config + }) + } + return meterOptionFunc(func(config MeterConfig) MeterConfig { - config.attrs = attribute.NewSet(attr...) + if config.attrs.Len() == 0 { + config.attrs = set + } else { + config.attrs = mergeSets(config.attrs, set) + } return config }) } diff --git a/vendor/go.opentelemetry.io/otel/metric/meter.go b/vendor/go.opentelemetry.io/otel/metric/meter.go index fdd2a7011c3..a16c4c0a14e 100644 --- a/vendor/go.opentelemetry.io/otel/metric/meter.go +++ b/vendor/go.opentelemetry.io/otel/metric/meter.go @@ -244,7 +244,11 @@ type Meter interface { // Callbacks. Meaning, it should not report measurements for an instrument with // the same attributes as another Callback will report. // -// The function needs to be concurrent safe. +// The function needs to be reentrant and concurrent safe. +// +// Note that Go's mutexes are not reentrant, and locking a mutex takes +// an indefinite amount of time. It is therefore advised to avoid +// using mutexes inside callbacks. type Callback func(context.Context, Observer) error // Observer records measurements for multiple instruments in a Callback. diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go index 9afb69e583b..634e73aee0b 100644 --- a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go +++ b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go @@ -191,6 +191,9 @@ type Int64Counter struct{ embedded.Int64Counter } // Add performs no operation. func (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {} +// Enabled performs no operation. +func (Int64Counter) Enabled(context.Context) bool { return false } + // Float64Counter is an OpenTelemetry Counter used to record float64 // measurements. It produces no telemetry. type Float64Counter struct{ embedded.Float64Counter } @@ -198,6 +201,9 @@ type Float64Counter struct{ embedded.Float64Counter } // Add performs no operation. func (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {} +// Enabled performs no operation. +func (Float64Counter) Enabled(context.Context) bool { return false } + // Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64 // measurements. It produces no telemetry. type Int64UpDownCounter struct{ embedded.Int64UpDownCounter } @@ -205,6 +211,9 @@ type Int64UpDownCounter struct{ embedded.Int64UpDownCounter } // Add performs no operation. func (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {} +// Enabled performs no operation. +func (Int64UpDownCounter) Enabled(context.Context) bool { return false } + // Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record // float64 measurements. It produces no telemetry. type Float64UpDownCounter struct{ embedded.Float64UpDownCounter } @@ -212,6 +221,9 @@ type Float64UpDownCounter struct{ embedded.Float64UpDownCounter } // Add performs no operation. func (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {} +// Enabled performs no operation. +func (Float64UpDownCounter) Enabled(context.Context) bool { return false } + // Int64Histogram is an OpenTelemetry Histogram used to record int64 // measurements. It produces no telemetry. type Int64Histogram struct{ embedded.Int64Histogram } @@ -219,6 +231,9 @@ type Int64Histogram struct{ embedded.Int64Histogram } // Record performs no operation. func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {} +// Enabled performs no operation. +func (Int64Histogram) Enabled(context.Context) bool { return false } + // Float64Histogram is an OpenTelemetry Histogram used to record float64 // measurements. It produces no telemetry. type Float64Histogram struct{ embedded.Float64Histogram } @@ -226,6 +241,9 @@ type Float64Histogram struct{ embedded.Float64Histogram } // Record performs no operation. func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {} +// Enabled performs no operation. +func (Float64Histogram) Enabled(context.Context) bool { return false } + // Int64Gauge is an OpenTelemetry Gauge used to record instantaneous int64 // measurements. It produces no telemetry. type Int64Gauge struct{ embedded.Int64Gauge } @@ -233,6 +251,9 @@ type Int64Gauge struct{ embedded.Int64Gauge } // Record performs no operation. func (Int64Gauge) Record(context.Context, int64, ...metric.RecordOption) {} +// Enabled performs no operation. +func (Int64Gauge) Enabled(context.Context) bool { return false } + // Float64Gauge is an OpenTelemetry Gauge used to record instantaneous float64 // measurements. It produces no telemetry. type Float64Gauge struct{ embedded.Float64Gauge } @@ -240,6 +261,9 @@ type Float64Gauge struct{ embedded.Float64Gauge } // Record performs no operation. func (Float64Gauge) Record(context.Context, float64, ...metric.RecordOption) {} +// Enabled performs no operation. +func (Float64Gauge) Enabled(context.Context) bool { return false } + // Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record // int64 measurements. It produces no telemetry. type Int64ObservableCounter struct { diff --git a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go index 8403a4bad2d..57a74c5e657 100644 --- a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go +++ b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go @@ -25,6 +25,12 @@ type Float64Counter interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr float64, options ...AddOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Float64CounterConfig contains options for synchronous counter instruments that @@ -78,6 +84,12 @@ type Float64UpDownCounter interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr float64, options ...AddOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Float64UpDownCounterConfig contains options for synchronous counter @@ -131,6 +143,12 @@ type Float64Histogram interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, incr float64, options ...RecordOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Float64HistogramConfig contains options for synchronous histogram @@ -189,6 +207,12 @@ type Float64Gauge interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, value float64, options ...RecordOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Float64GaugeConfig contains options for synchronous gauge instruments that diff --git a/vendor/go.opentelemetry.io/otel/metric/syncint64.go b/vendor/go.opentelemetry.io/otel/metric/syncint64.go index 783fdfba773..ac2d033ea6f 100644 --- a/vendor/go.opentelemetry.io/otel/metric/syncint64.go +++ b/vendor/go.opentelemetry.io/otel/metric/syncint64.go @@ -25,6 +25,12 @@ type Int64Counter interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr int64, options ...AddOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Int64CounterConfig contains options for synchronous counter instruments that @@ -78,6 +84,12 @@ type Int64UpDownCounter interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr int64, options ...AddOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Int64UpDownCounterConfig contains options for synchronous counter @@ -131,6 +143,12 @@ type Int64Histogram interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, incr int64, options ...RecordOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Int64HistogramConfig contains options for synchronous histogram instruments @@ -189,6 +207,12 @@ type Int64Gauge interface { // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, value int64, options ...RecordOption) + + // Enabled reports whether the instrument will process measurements for the given context. + // + // This function can be used in places where measuring an instrument + // would result in computationally expensive operations. + Enabled(context.Context) bool } // Int64GaugeConfig contains options for synchronous gauge instruments that diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go index 6692d2665d2..271ab71f1ae 100644 --- a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go +++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go @@ -111,7 +111,7 @@ func (TraceContext) extract(carrier TextMapCarrier) trace.SpanContext { } // Clear all flags other than the trace-context supported sampling bit. - scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled + scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled // nolint:gosec // slice size already checked. // Ignore the error returned here. Failure to parse tracestate MUST NOT // affect the parsing of traceparent according to the W3C tracecontext diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go new file mode 100644 index 00000000000..bfeb73e811b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package x documents experimental features for [go.opentelemetry.io/otel/sdk]. +package x // import "go.opentelemetry.io/otel/sdk/internal/x" + +import "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( + []string{"RESOURCE"}, + func(v string) (string, bool) { + if strings.EqualFold(v, "true") { + return v, true + } + return "", false + }, +) + +// Observability is an experimental feature flag that determines if SDK +// observability metrics are enabled. +// +// To enable this feature set the OTEL_GO_X_OBSERVABILITY environment variable +// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" +// will also enable this). +var Observability = newFeature( + []string{"OBSERVABILITY", "SELF_OBSERVABILITY"}, + func(v string) (string, bool) { + if strings.EqualFold(v, "true") { + return v, true + } + return "", false + }, +) diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go index 1be472e917a..13347e56052 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go +++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go @@ -1,48 +1,38 @@ +// Code generated by gotmpl. DO NOT MODIFY. +// source: internal/shared/x/x.go.tmpl + // 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 documents experimental features for [go.opentelemetry.io/otel/sdk]. 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.EqualFold(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 + keys []string parse func(v string) (T, bool) } -func newFeature[T any](suffix string, parse func(string) (T, bool)) Feature[T] { +func newFeature[T any](suffix []string, parse func(string) (T, bool)) Feature[T] { const envKeyRoot = "OTEL_GO_X_" + keys := make([]string, 0, len(suffix)) + for _, s := range suffix { + keys = append(keys, envKeyRoot+s) + } return Feature[T]{ - key: envKeyRoot + suffix, + keys: keys, parse: parse, } } -// Key returns the environment variable key that needs to be set to enable the +// Keys returns the environment variable keys that can be set to enable the // feature. -func (f Feature[T]) Key() string { return f.key } +func (f Feature[T]) Keys() []string { return f.keys } // 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 @@ -52,11 +42,13 @@ func (f Feature[T]) Lookup() (v T, ok bool) { // // > 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 + for _, key := range f.keys { + vRaw := os.Getenv(key) + if vRaw != "" { + return f.parse(vRaw) + } } - return f.parse(vRaw) + return v, ok } // Enabled reports whether the feature is enabled. diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go b/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go index 0f3b9d623f7..dd75eefac1f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go @@ -63,6 +63,22 @@ // issues for databases that cannot handle high cardinality. // - A too low of a limit causes loss of attribute detail as more data falls into overflow. // +// # Ordering and Collection Guarantees +// +// For performance reasons, the SDK does not guarantee that the order in which +// synchronous measurements are made to the SDK is reflected in the collected +// metric data. This means that even when a single goroutine makes sequential +// synchronous measurements, it is possible for a later measurement to be +// included in the collected metric data when an earlier measurement is not. +// This applies to measurements made to different instruments, or to different +// attribute sets on the same instrument. Sequential measurements made to the +// same instrument and with the same attributes are guaranteed to preserve +// ordering with respect to collection. +// +// Additionally, the SDK does not guarantee that exemplars are always included +// in the same batch of metric data as the measurement they are associated +// with. +// // See [go.opentelemetry.io/otel/metric] for more information about // the metric API. // diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go index 08e8f68fe73..15d71389963 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go @@ -7,9 +7,12 @@ import ( "context" "math" "math/rand/v2" + "sync" + "sync/atomic" "time" "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/metric/internal/reservoir" ) // FixedSizeReservoirProvider returns a provider of [FixedSizeReservoir]. @@ -24,7 +27,19 @@ func FixedSizeReservoirProvider(k int) ReservoirProvider { // sample each one. If there are more than k, the Reservoir will then randomly // sample all additional measurement with a decreasing probability. func NewFixedSizeReservoir(k int) *FixedSizeReservoir { - return newFixedSizeReservoir(newStorage(k)) + if k < 0 { + k = 0 + } + // Use math.MaxInt32 instead of math.MaxUint32 to prevent overflowing int + // on 32-bit systems. + if k > math.MaxInt32 { + k = math.MaxInt32 + } + return &FixedSizeReservoir{ + storage: newStorage(k), + // Above we ensure k is positive, and less than MaxInt32. + nextTracker: newNextTracker(uint32(k)), // nolint: gosec + } } var _ Reservoir = &FixedSizeReservoir{} @@ -34,40 +49,9 @@ var _ Reservoir = &FixedSizeReservoir{} // If there are more than k, the Reservoir will then randomly sample all // additional measurement with a decreasing probability. type FixedSizeReservoir struct { + reservoir.ConcurrentSafe *storage - - // count is the number of measurement seen. - count int64 - // next is the next count that will store a measurement at a random index - // once the reservoir has been filled. - next int64 - // w is the largest random number in a distribution that is used to compute - // the next next. - w float64 -} - -func newFixedSizeReservoir(s *storage) *FixedSizeReservoir { - r := &FixedSizeReservoir{ - storage: s, - } - r.reset() - return r -} - -// randomFloat64 returns, as a float64, a uniform pseudo-random number in the -// open interval (0.0,1.0). -func (*FixedSizeReservoir) randomFloat64() float64 { - // TODO: Use an algorithm that avoids rejection sampling. For example: - // - // const precision = 1 << 53 // 2^53 - // // Generate an integer in [1, 2^53 - 1] - // v := rand.Uint64() % (precision - 1) + 1 - // return float64(v) / float64(precision) - f := rand.Float64() - for f == 0 { - f = rand.Float64() - } - return f + *nextTracker } // Offer accepts the parameters associated with a measurement. The @@ -123,23 +107,65 @@ func (r *FixedSizeReservoir) Offer(ctx context.Context, t time.Time, n Value, a // https://github.com/MrAlias/reservoir-sampling for a performance // comparison of reservoir sampling algorithms. - if int(r.count) < cap(r.store) { - r.store[r.count] = newMeasurement(ctx, t, n, a) - } else if r.count == r.next { + count, next := r.incrementCount() + if count < r.k { + r.store(ctx, int(count), t, n, a) + } else if count == next { // Overwrite a random existing measurement with the one offered. - idx := int(rand.Int64N(int64(cap(r.store)))) - r.store[idx] = newMeasurement(ctx, t, n, a) + idx := rand.IntN(int(r.k)) + r.store(ctx, idx, t, n, a) + r.wMu.Lock() + defer r.wMu.Unlock() + newCount, newNext := r.loadCountAndNext() + if newNext < next || newCount < count { + // This Observe() raced with Collect(), and r.reset() has been + // called since r.incrementCount(). Skip the call to advance in + // this case because our exemplar may have been collected in the + // previous interval. + return + } r.advance() } - r.count++ +} + +// Collect returns all the held exemplars. +// +// The Reservoir state is preserved after this call. +func (r *FixedSizeReservoir) Collect(dest *[]Exemplar) { + r.storage.Collect(dest) + // Call reset here even though it will reset r.count and restart the random + // number series. This will persist any old exemplars as long as no new + // measurements are offered, but it will also prioritize those new + // measurements that are made over the older collection cycle ones. + r.reset() +} + +func newNextTracker(k uint32) *nextTracker { + nt := &nextTracker{k: k} + nt.reset() + return nt +} + +type nextTracker struct { + // countAndNext holds the current counts in the lower 32 bits and the next + // value in the upper 32 bits. + countAndNext atomic.Uint64 + // w is the largest random number in a distribution that is used to compute + // the next next. + w float64 + // wMu ensures w is kept consistent with next during advance and reset. + wMu sync.Mutex + // k is the number of measurements that can be stored in the reservoir. + k uint32 } // reset resets r to the initial state. -func (r *FixedSizeReservoir) reset() { +func (r *nextTracker) reset() { + r.wMu.Lock() + defer r.wMu.Unlock() // This resets the number of exemplars known. - r.count = 0 // Random index inserts should only happen after the storage is full. - r.next = int64(cap(r.store)) + r.setCountAndNext(0, r.k) // Initial random number in the series used to generate r.next. // @@ -150,14 +176,40 @@ func (r *FixedSizeReservoir) reset() { // This maps the uniform random number in (0,1) to a geometric distribution // over the same interval. The mean of the distribution is inversely // proportional to the storage capacity. - r.w = math.Exp(math.Log(r.randomFloat64()) / float64(cap(r.store))) + r.w = math.Exp(math.Log(randomFloat64()) / float64(r.k)) r.advance() } +// incrementCount increments the count. It returns the count before the +// increment and the current next value. +func (r *nextTracker) incrementCount() (uint32, uint32) { + n := r.countAndNext.Add(1) + // Both count and next are stored in the upper and lower 32 bits, and thus + // can't overflow. + return uint32(n&((1<<32)-1) - 1), uint32(n >> 32) // nolint: gosec +} + +// incrementNext increments the next value. +func (r *nextTracker) incrementNext(inc uint32) { + r.countAndNext.Add(uint64(inc) << 32) +} + +// setCountAndNext sets the count and next values. +func (r *nextTracker) setCountAndNext(count, next uint32) { + r.countAndNext.Store(uint64(next)<<32 + uint64(count)) +} + +func (r *nextTracker) loadCountAndNext() (uint32, uint32) { + n := r.countAndNext.Load() + // Both count and next are stored in the upper and lower 32 bits, and thus + // can't overflow. + return uint32(n&((1<<32)-1) - 1), uint32(n >> 32) // nolint: gosec +} + // advance updates the count at which the offered measurement will overwrite an // existing exemplar. -func (r *FixedSizeReservoir) advance() { +func (r *nextTracker) advance() { // Calculate the next value in the random number series. // // The current value of r.w is based on the max of a distribution of random @@ -170,7 +222,7 @@ func (r *FixedSizeReservoir) advance() { // therefore the next r.w will be based on the same distribution (i.e. // `max(u_1,u_2,...,u_k)`). Therefore, we can sample the next r.w by // computing the next random number `u` and take r.w as `w * u^(1/k)`. - r.w *= math.Exp(math.Log(r.randomFloat64()) / float64(cap(r.store))) + r.w *= math.Exp(math.Log(randomFloat64()) / float64(r.k)) // Use the new random number in the series to calculate the count of the // next measurement that will be stored. // @@ -181,17 +233,21 @@ func (r *FixedSizeReservoir) advance() { // // Important to note, the new r.next will always be at least 1 more than // the last r.next. - r.next += int64(math.Log(r.randomFloat64())/math.Log(1-r.w)) + 1 + r.incrementNext(uint32(math.Log(randomFloat64())/math.Log(1-r.w)) + 1) } -// Collect returns all the held exemplars. -// -// The Reservoir state is preserved after this call. -func (r *FixedSizeReservoir) Collect(dest *[]Exemplar) { - r.storage.Collect(dest) - // Call reset here even though it will reset r.count and restart the random - // number series. This will persist any old exemplars as long as no new - // measurements are offered, but it will also prioritize those new - // measurements that are made over the older collection cycle ones. - r.reset() +// randomFloat64 returns, as a float64, a uniform pseudo-random number in the +// open interval (0.0,1.0). +func randomFloat64() float64 { + // TODO: Use an algorithm that avoids rejection sampling. For example: + // + // const precision = 1 << 53 // 2^53 + // // Generate an integer in [1, 2^53 - 1] + // v := rand.Uint64() % (precision - 1) + 1 + // return float64(v) / float64(precision) + f := rand.Float64() + for f == 0 { + f = rand.Float64() + } + return f } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go index decab613e77..dacac3ebaec 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go @@ -10,6 +10,7 @@ import ( "time" "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/metric/internal/reservoir" ) // HistogramReservoirProvider is a provider of [HistogramReservoir]. @@ -39,6 +40,7 @@ var _ Reservoir = &HistogramReservoir{} // falls within a histogram bucket. The histogram bucket upper-boundaries are // define by bounds. type HistogramReservoir struct { + reservoir.ConcurrentSafe *storage // bounds are bucket bounds in ascending order. @@ -57,14 +59,24 @@ type HistogramReservoir struct { // parameters are the value and dropped (filtered) attributes of the // measurement respectively. func (r *HistogramReservoir) Offer(ctx context.Context, t time.Time, v Value, a []attribute.KeyValue) { - var x float64 + var n float64 switch v.Type() { case Int64ValueType: - x = float64(v.Int64()) + n = float64(v.Int64()) case Float64ValueType: - x = v.Float64() + n = v.Float64() default: panic("unknown value type") } - r.store[sort.SearchFloat64s(r.bounds, x)] = newMeasurement(ctx, t, v, a) + + idx := sort.SearchFloat64s(r.bounds, n) + + r.store(ctx, idx, t, v, a) +} + +// Collect returns all the held exemplars. +// +// The Reservoir state is preserved after this call. +func (r *HistogramReservoir) Collect(dest *[]Exemplar) { + r.storage.Collect(dest) } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go index 0e2e26dfb18..790496027da 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go @@ -5,6 +5,7 @@ package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar" import ( "context" + "sync" "time" "go.opentelemetry.io/otel/attribute" @@ -13,78 +14,84 @@ import ( // storage is an exemplar storage for [Reservoir] implementations. type storage struct { - // store are the measurements sampled. + // measurements are the measurements sampled. // // This does not use []metricdata.Exemplar because it potentially would // require an allocation for trace and span IDs in the hot path of Offer. - store []measurement + measurements []measurement } func newStorage(n int) *storage { - return &storage{store: make([]measurement, n)} + return &storage{measurements: make([]measurement, n)} +} + +func (r *storage) store(ctx context.Context, idx int, ts time.Time, v Value, droppedAttr []attribute.KeyValue) { + r.measurements[idx].mux.Lock() + defer r.measurements[idx].mux.Unlock() + r.measurements[idx].FilteredAttributes = droppedAttr + r.measurements[idx].Time = ts + r.measurements[idx].Value = v + r.measurements[idx].Ctx = ctx + r.measurements[idx].valid = true } // Collect returns all the held exemplars. // // The Reservoir state is preserved after this call. func (r *storage) Collect(dest *[]Exemplar) { - *dest = reset(*dest, len(r.store), len(r.store)) + *dest = reset(*dest, len(r.measurements), len(r.measurements)) var n int - for _, m := range r.store { - if !m.valid { - continue + for i := range r.measurements { + if r.measurements[i].exemplar(&(*dest)[n]) { + n++ } - - m.exemplar(&(*dest)[n]) - n++ } *dest = (*dest)[:n] } // measurement is a measurement made by a telemetry system. type measurement struct { + mux sync.Mutex // FilteredAttributes are the attributes dropped during the measurement. FilteredAttributes []attribute.KeyValue // Time is the time when the measurement was made. Time time.Time // Value is the value of the measurement. Value Value - // SpanContext is the SpanContext active when a measurement was made. - SpanContext trace.SpanContext + // Ctx is the context active when a measurement was made. + Ctx context.Context valid bool } -// newMeasurement returns a new non-empty Measurement. -func newMeasurement(ctx context.Context, ts time.Time, v Value, droppedAttr []attribute.KeyValue) measurement { - return measurement{ - FilteredAttributes: droppedAttr, - Time: ts, - Value: v, - SpanContext: trace.SpanContextFromContext(ctx), - valid: true, +// exemplar returns m as an [Exemplar]. +// returns true if it populated the exemplar. +func (m *measurement) exemplar(dest *Exemplar) bool { + m.mux.Lock() + defer m.mux.Unlock() + if !m.valid { + return false } -} -// exemplar returns m as an [Exemplar]. -func (m measurement) exemplar(dest *Exemplar) { dest.FilteredAttributes = m.FilteredAttributes dest.Time = m.Time dest.Value = m.Value - if m.SpanContext.HasTraceID() { - traceID := m.SpanContext.TraceID() + sc := trace.SpanContextFromContext(m.Ctx) + if sc.HasTraceID() { + traceID := sc.TraceID() dest.TraceID = traceID[:] } else { dest.TraceID = dest.TraceID[:0] } - if m.SpanContext.HasSpanID() { - spanID := m.SpanContext.SpanID() + if sc.HasSpanID() { + spanID := sc.SpanID() dest.SpanID = spanID[:] } else { dest.SpanID = dest.SpanID[:0] } + return true } func reset[T any](s []T, length, capacity int) []T { diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go b/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go index 63cccc508f4..b0805255926 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go @@ -16,7 +16,6 @@ import ( "go.opentelemetry.io/otel/metric/embedded" "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/metric/internal/aggregate" - "go.opentelemetry.io/otel/sdk/metric/internal/x" ) var zeroScope instrumentation.Scope @@ -191,7 +190,6 @@ var ( _ metric.Int64UpDownCounter = (*int64Inst)(nil) _ metric.Int64Histogram = (*int64Inst)(nil) _ metric.Int64Gauge = (*int64Inst)(nil) - _ x.EnabledInstrument = (*int64Inst)(nil) ) func (i *int64Inst) Add(ctx context.Context, val int64, opts ...metric.AddOption) { @@ -232,7 +230,6 @@ var ( _ metric.Float64UpDownCounter = (*float64Inst)(nil) _ metric.Float64Histogram = (*float64Inst)(nil) _ metric.Float64Gauge = (*float64Inst)(nil) - _ x.EnabledInstrument = (*float64Inst)(nil) ) func (i *float64Inst) Add(ctx context.Context, val float64, opts ...metric.AddOption) { diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/instrumentkind_string.go b/vendor/go.opentelemetry.io/otel/sdk/metric/instrumentkind_string.go index 25ea6244e57..e0558cb634d 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/instrumentkind_string.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/instrumentkind_string.go @@ -23,8 +23,9 @@ const _InstrumentKind_name = "instrumentKindUndefinedCounterUpDownCounterHistogr var _InstrumentKind_index = [...]uint8{0, 23, 30, 43, 52, 69, 92, 107, 112} func (i InstrumentKind) String() string { - if i >= InstrumentKind(len(_InstrumentKind_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_InstrumentKind_index)-1 { return "InstrumentKind(" + strconv.FormatInt(int64(i), 10) + ")" } - return _InstrumentKind_name[_InstrumentKind_index[i]:_InstrumentKind_index[i+1]] + return _InstrumentKind_name[_InstrumentKind_index[idx]:_InstrumentKind_index[idx+1]] } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go index 0321da68150..a1ae5573725 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go @@ -74,12 +74,13 @@ func (b Builder[N]) filter(f fltrMeasure[N]) Measure[N] { // LastValue returns a last-value aggregate function input and output. func (b Builder[N]) LastValue() (Measure[N], ComputeAggregation) { - lv := newLastValue[N](b.AggregationLimit, b.resFunc()) switch b.Temporality { case metricdata.DeltaTemporality: - return b.filter(lv.measure), lv.delta + lv := newDeltaLastValue[N](b.AggregationLimit, b.resFunc()) + return b.filter(lv.measure), lv.collect default: - return b.filter(lv.measure), lv.cumulative + lv := newCumulativeLastValue[N](b.AggregationLimit, b.resFunc()) + return b.filter(lv.measure), lv.collect } } @@ -110,12 +111,13 @@ func (b Builder[N]) PrecomputedSum(monotonic bool) (Measure[N], ComputeAggregati // Sum returns a sum aggregate function input and output. func (b Builder[N]) Sum(monotonic bool) (Measure[N], ComputeAggregation) { - s := newSum[N](monotonic, b.AggregationLimit, b.resFunc()) switch b.Temporality { case metricdata.DeltaTemporality: - return b.filter(s.measure), s.delta + s := newDeltaSum[N](monotonic, b.AggregationLimit, b.resFunc()) + return b.filter(s.measure), s.collect default: - return b.filter(s.measure), s.cumulative + s := newCumulativeSum[N](monotonic, b.AggregationLimit, b.resFunc()) + return b.filter(s.measure), s.collect } } @@ -125,12 +127,13 @@ func (b Builder[N]) ExplicitBucketHistogram( boundaries []float64, noMinMax, noSum bool, ) (Measure[N], ComputeAggregation) { - h := newHistogram[N](boundaries, noMinMax, noSum, b.AggregationLimit, b.resFunc()) switch b.Temporality { case metricdata.DeltaTemporality: - return b.filter(h.measure), h.delta + h := newDeltaHistogram[N](boundaries, noMinMax, noSum, b.AggregationLimit, b.resFunc()) + return b.filter(h.measure), h.collect default: - return b.filter(h.measure), h.cumulative + h := newCumulativeHistogram[N](boundaries, noMinMax, noSum, b.AggregationLimit, b.resFunc()) + return b.filter(h.measure), h.collect } } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go new file mode 100644 index 00000000000..eb69e965079 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go @@ -0,0 +1,275 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate" + +import ( + "math" + "runtime" + "sync" + "sync/atomic" + + "go.opentelemetry.io/otel/attribute" +) + +// atomicCounter is an efficient way of adding to a number which is either an +// int64 or float64. It is designed to be efficient when adding whole +// numbers, regardless of whether N is an int64 or float64. +// +// Inspired by the Prometheus counter implementation: +// https://github.com/prometheus/client_golang/blob/14ccb93091c00f86b85af7753100aa372d63602b/prometheus/counter.go#L108 +type atomicCounter[N int64 | float64] struct { + // nFloatBits contains only the non-integer portion of the counter. + nFloatBits atomic.Uint64 + // nInt contains only the integer portion of the counter. + nInt atomic.Int64 +} + +// load returns the current value. The caller must ensure all calls to add have +// returned prior to calling load. +func (n *atomicCounter[N]) load() N { + fval := math.Float64frombits(n.nFloatBits.Load()) + ival := n.nInt.Load() + return N(fval + float64(ival)) +} + +func (n *atomicCounter[N]) add(value N) { + ival := int64(value) + // This case is where the value is an int, or if it is a whole-numbered float. + if float64(ival) == float64(value) { + n.nInt.Add(ival) + return + } + + // Value must be a float below. + for { + oldBits := n.nFloatBits.Load() + newBits := math.Float64bits(math.Float64frombits(oldBits) + float64(value)) + if n.nFloatBits.CompareAndSwap(oldBits, newBits) { + return + } + } +} + +// reset resets the internal state, and is not safe to call concurrently. +func (n *atomicCounter[N]) reset() { + n.nFloatBits.Store(0) + n.nInt.Store(0) +} + +// atomicN is a generic atomic number value. +type atomicN[N int64 | float64] struct { + val atomic.Uint64 +} + +func (a *atomicN[N]) Load() (value N) { + v := a.val.Load() + switch any(value).(type) { + case int64: + value = N(v) + case float64: + value = N(math.Float64frombits(v)) + default: + panic("unsupported type") + } + return value +} + +func (a *atomicN[N]) Store(v N) { + var val uint64 + switch any(v).(type) { + case int64: + val = uint64(v) + case float64: + val = math.Float64bits(float64(v)) + default: + panic("unsupported type") + } + a.val.Store(val) +} + +func (a *atomicN[N]) CompareAndSwap(oldN, newN N) bool { + var o, n uint64 + switch any(oldN).(type) { + case int64: + o, n = uint64(oldN), uint64(newN) + case float64: + o, n = math.Float64bits(float64(oldN)), math.Float64bits(float64(newN)) + default: + panic("unsupported type") + } + return a.val.CompareAndSwap(o, n) +} + +type atomicMinMax[N int64 | float64] struct { + minimum, maximum atomicN[N] + set atomic.Bool + mu sync.Mutex +} + +// init returns true if the value was used to initialize min and max. +func (s *atomicMinMax[N]) init(val N) bool { + s.mu.Lock() + defer s.mu.Unlock() + if !s.set.Load() { + defer s.set.Store(true) + s.minimum.Store(val) + s.maximum.Store(val) + return true + } + return false +} + +func (s *atomicMinMax[N]) Update(val N) { + if !s.set.Load() && s.init(val) { + return + } + + old := s.minimum.Load() + for val < old { + if s.minimum.CompareAndSwap(old, val) { + return + } + old = s.minimum.Load() + } + + old = s.maximum.Load() + for old < val { + if s.maximum.CompareAndSwap(old, val) { + return + } + old = s.maximum.Load() + } +} + +// hotColdWaitGroup is a synchronization primitive which enables lockless +// writes for concurrent writers and enables a reader to acquire exclusive +// access to a snapshot of state including only completed operations. +// Conceptually, it can be thought of as a "hot" wait group, +// and a "cold" wait group, with the ability for the reader to atomically swap +// the hot and cold wait groups, and wait for the now-cold wait group to +// complete. +// +// Inspired by the prometheus/client_golang histogram implementation: +// https://github.com/prometheus/client_golang/blob/a974e0d45e0aa54c65492559114894314d8a2447/prometheus/histogram.go#L725 +// +// Usage: +// +// var hcwg hotColdWaitGroup +// var data [2]any +// +// func write() { +// hotIdx := hcwg.start() +// defer hcwg.done(hotIdx) +// // modify data without locking +// data[hotIdx].update() +// } +// +// func read() { +// coldIdx := hcwg.swapHotAndWait() +// // read data now that all writes to the cold data have completed. +// data[coldIdx].read() +// } +type hotColdWaitGroup struct { + // startedCountAndHotIdx contains a 63-bit counter in the lower bits, + // and a 1 bit hot index to denote which of the two data-points new + // measurements to write to. These are contained together so that read() + // can atomically swap the hot bit, reset the started writes to zero, and + // read the number writes that were started prior to the hot bit being + // swapped. + startedCountAndHotIdx atomic.Uint64 + // endedCounts is the number of writes that have completed to each + // dataPoint. + endedCounts [2]atomic.Uint64 +} + +// start returns the hot index that the writer should write to. The returned +// hot index is 0 or 1. The caller must call done(hot index) after it finishes +// its operation. start() is safe to call concurrently with other methods. +func (l *hotColdWaitGroup) start() uint64 { + // We increment h.startedCountAndHotIdx so that the counter in the lower + // 63 bits gets incremented. At the same time, we get the new value + // back, which we can use to return the currently-hot index. + return l.startedCountAndHotIdx.Add(1) >> 63 +} + +// done signals to the reader that an operation has fully completed. +// done is safe to call concurrently. +func (l *hotColdWaitGroup) done(hotIdx uint64) { + l.endedCounts[hotIdx].Add(1) +} + +// swapHotAndWait swaps the hot bit, waits for all start() calls to be done(), +// and then returns the now-cold index for the reader to read from. The +// returned index is 0 or 1. swapHotAndWait must not be called concurrently. +func (l *hotColdWaitGroup) swapHotAndWait() uint64 { + n := l.startedCountAndHotIdx.Load() + coldIdx := (^n) >> 63 + // Swap the hot and cold index while resetting the started measurements + // count to zero. + n = l.startedCountAndHotIdx.Swap((coldIdx << 63)) + hotIdx := n >> 63 + startedCount := n & ((1 << 63) - 1) + // Wait for all measurements to the previously-hot map to finish. + for startedCount != l.endedCounts[hotIdx].Load() { + runtime.Gosched() // Let measurements complete. + } + // reset the number of ended operations + l.endedCounts[hotIdx].Store(0) + return hotIdx +} + +// limitedSyncMap is a sync.Map which enforces the aggregation limit on +// attribute sets and provides a Len() function. +type limitedSyncMap struct { + sync.Map + aggLimit int + len int + lenMux sync.Mutex +} + +func (m *limitedSyncMap) LoadOrStoreAttr(fltrAttr attribute.Set, newValue func(attribute.Set) any) any { + actual, loaded := m.Load(fltrAttr.Equivalent()) + if loaded { + return actual + } + // If the overflow set exists, assume we have already overflowed and don't + // bother with the slow path below. + actual, loaded = m.Load(overflowSet.Equivalent()) + if loaded { + return actual + } + // Slow path: add a new attribute set. + m.lenMux.Lock() + defer m.lenMux.Unlock() + + // re-fetch now that we hold the lock to ensure we don't use the overflow + // set unless we are sure the attribute set isn't being written + // concurrently. + actual, loaded = m.Load(fltrAttr.Equivalent()) + if loaded { + return actual + } + + if m.aggLimit > 0 && m.len >= m.aggLimit-1 { + fltrAttr = overflowSet + } + actual, loaded = m.LoadOrStore(fltrAttr.Equivalent(), newValue(fltrAttr)) + if !loaded { + m.len++ + } + return actual +} + +func (m *limitedSyncMap) Clear() { + m.lenMux.Lock() + defer m.lenMux.Unlock() + m.len = 0 + m.Map.Clear() +} + +func (m *limitedSyncMap) Len() int { + m.lenMux.Lock() + defer m.lenMux.Unlock() + return m.len +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go index 857eddf305f..2aeba437894 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go @@ -32,10 +32,9 @@ type expoHistogramDataPoint[N int64 | float64] struct { attrs attribute.Set res FilteredExemplarReservoir[N] - count uint64 - min N - max N - sum N + min N + max N + sum N maxSize int noMinMax bool @@ -74,8 +73,6 @@ func newExpoHistogramDataPoint[N int64 | float64]( // record adds a new measurement to the histogram. It will rescale the buckets if needed. func (p *expoHistogramDataPoint[N]) record(v N) { - p.count++ - if !p.noMinMax { if v < p.min { p.min = v @@ -193,6 +190,10 @@ func (p *expoHistogramDataPoint[N]) scaleChange(bin, startBin int32, length int) return count } +func (p *expoHistogramDataPoint[N]) count() uint64 { + return p.posBuckets.count() + p.negBuckets.count() + p.zeroCount +} + // expoBuckets is a set of buckets in an exponential histogram. type expoBuckets struct { startBin int32 @@ -285,6 +286,14 @@ func (b *expoBuckets) downscale(delta int32) { b.startBin >>= delta } +func (b *expoBuckets) count() uint64 { + var total uint64 + for _, count := range b.counts { + total += count + } + return total +} + // newExponentialHistogram returns an Aggregator that summarizes a set of // measurements as an exponential histogram. Each histogram is scoped by attributes // and the aggregation cycle the measurements were made in. @@ -301,7 +310,7 @@ func newExponentialHistogram[N int64 | float64]( maxScale: maxScale, newRes: r, - limit: newLimiter[*expoHistogramDataPoint[N]](limit), + limit: newLimiter[expoHistogramDataPoint[N]](limit), values: make(map[attribute.Distinct]*expoHistogramDataPoint[N]), start: now(), @@ -317,7 +326,7 @@ type expoHistogram[N int64 | float64] struct { maxScale int32 newRes func(attribute.Set) FilteredExemplarReservoir[N] - limit limiter[*expoHistogramDataPoint[N]] + limit limiter[expoHistogramDataPoint[N]] values map[attribute.Distinct]*expoHistogramDataPoint[N] valuesMu sync.Mutex @@ -338,13 +347,18 @@ func (e *expoHistogram[N]) measure( e.valuesMu.Lock() defer e.valuesMu.Unlock() - attr := e.limit.Attributes(fltrAttr, e.values) - v, ok := e.values[attr.Equivalent()] + v, ok := e.values[fltrAttr.Equivalent()] if !ok { - v = newExpoHistogramDataPoint[N](attr, e.maxSize, e.maxScale, e.noMinMax, e.noSum) - v.res = e.newRes(attr) - - e.values[attr.Equivalent()] = v + fltrAttr = e.limit.Attributes(fltrAttr, e.values) + // If we overflowed, make sure we add to the existing overflow series + // if it already exists. + v, ok = e.values[fltrAttr.Equivalent()] + if !ok { + v = newExpoHistogramDataPoint[N](fltrAttr, e.maxSize, e.maxScale, e.noMinMax, e.noSum) + v.res = e.newRes(fltrAttr) + + e.values[fltrAttr.Equivalent()] = v + } } v.record(value) v.res.Offer(ctx, value, droppedAttr) @@ -371,7 +385,7 @@ func (e *expoHistogram[N]) delta( hDPts[i].Attributes = val.attrs hDPts[i].StartTime = e.start hDPts[i].Time = t - hDPts[i].Count = val.count + hDPts[i].Count = val.count() hDPts[i].Scale = val.scale hDPts[i].ZeroCount = val.zeroCount hDPts[i].ZeroThreshold = 0.0 @@ -434,7 +448,7 @@ func (e *expoHistogram[N]) cumulative( hDPts[i].Attributes = val.attrs hDPts[i].StartTime = e.start hDPts[i].Time = t - hDPts[i].Count = val.count + hDPts[i].Count = val.count() hDPts[i].Scale = val.scale hDPts[i].ZeroCount = val.zeroCount hDPts[i].ZeroThreshold = 0.0 diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go index d4c41642d79..e4f9409bc80 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go @@ -5,10 +5,12 @@ package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggreg import ( "context" + "sync" "time" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/metric/exemplar" + "go.opentelemetry.io/otel/sdk/metric/internal/reservoir" ) // FilteredExemplarReservoir wraps a [exemplar.Reservoir] with a filter. @@ -29,6 +31,11 @@ type FilteredExemplarReservoir[N int64 | float64] interface { type filteredExemplarReservoir[N int64 | float64] struct { filter exemplar.Filter reservoir exemplar.Reservoir + // The exemplar.Reservoir is not required to be concurrent safe, but + // implementations can indicate that they are concurrent-safe by embedding + // reservoir.ConcurrentSafe in order to improve performance. + reservoirMux sync.Mutex + concurrentSafe bool } // NewFilteredExemplarReservoir creates a [FilteredExemplarReservoir] which only offers values @@ -37,17 +44,30 @@ func NewFilteredExemplarReservoir[N int64 | float64]( f exemplar.Filter, r exemplar.Reservoir, ) FilteredExemplarReservoir[N] { + _, concurrentSafe := r.(reservoir.ConcurrentSafe) return &filteredExemplarReservoir[N]{ - filter: f, - reservoir: r, + filter: f, + reservoir: r, + concurrentSafe: concurrentSafe, } } func (f *filteredExemplarReservoir[N]) Offer(ctx context.Context, val N, attr []attribute.KeyValue) { if f.filter(ctx) { // only record the current time if we are sampling this measurement. - f.reservoir.Offer(ctx, time.Now(), exemplar.NewValue(val), attr) + ts := time.Now() + if !f.concurrentSafe { + f.reservoirMux.Lock() + defer f.reservoirMux.Unlock() + } + f.reservoir.Offer(ctx, ts, exemplar.NewValue(val), attr) } } -func (f *filteredExemplarReservoir[N]) Collect(dest *[]exemplar.Exemplar) { f.reservoir.Collect(dest) } +func (f *filteredExemplarReservoir[N]) Collect(dest *[]exemplar.Exemplar) { + if !f.concurrentSafe { + f.reservoirMux.Lock() + defer f.reservoirMux.Unlock() + } + f.reservoir.Collect(dest) +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go index 736287e736f..421325fb728 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go @@ -7,140 +7,169 @@ import ( "context" "slices" "sort" - "sync" + "sync/atomic" "time" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/metric/metricdata" ) -type buckets[N int64 | float64] struct { +// histogramPoint is a single histogram point, used in delta aggregations. +type histogramPoint[N int64 | float64] struct { attrs attribute.Set res FilteredExemplarReservoir[N] - - counts []uint64 - count uint64 - total N - min, max N + histogramPointCounters[N] } -// newBuckets returns buckets with n bins. -func newBuckets[N int64 | float64](attrs attribute.Set, n int) *buckets[N] { - return &buckets[N]{attrs: attrs, counts: make([]uint64, n)} +// hotColdHistogramPoint a hot and cold histogram points, used in cumulative +// aggregations. +type hotColdHistogramPoint[N int64 | float64] struct { + hcwg hotColdWaitGroup + hotColdPoint [2]histogramPointCounters[N] + + attrs attribute.Set + res FilteredExemplarReservoir[N] } -func (b *buckets[N]) sum(value N) { b.total += value } +// histogramPointCounters contains only the atomic counter data, and is used by +// both histogramPoint and hotColdHistogramPoint. +type histogramPointCounters[N int64 | float64] struct { + counts []atomic.Uint64 + total atomicCounter[N] + minMax atomicMinMax[N] +} -func (b *buckets[N]) bin(idx int, value N) { - b.counts[idx]++ - b.count++ - if value < b.min { - b.min = value - } else if value > b.max { - b.max = value +func (b *histogramPointCounters[N]) loadCountsInto(into *[]uint64) uint64 { + // TODO (#3047): Making copies for counts incurs a large + // memory allocation footprint. Alternatives should be explored. + counts := reset(*into, len(b.counts), len(b.counts)) + count := uint64(0) + for i := range b.counts { + c := b.counts[i].Load() + counts[i] = c + count += c } + *into = counts + return count } -// histValues summarizes a set of measurements as an histValues with -// explicitly defined buckets. -type histValues[N int64 | float64] struct { - noSum bool - bounds []float64 +// mergeIntoAndReset merges this set of histogram counter data into another, +// and resets the state of this set of counters. This is used by +// hotColdHistogramPoint to ensure that the cumulative counters continue to +// accumulate after being read. +func (b *histogramPointCounters[N]) mergeIntoAndReset( // nolint:revive // Intentional internal control flag + into *histogramPointCounters[N], + noMinMax, noSum bool, +) { + for i := range b.counts { + into.counts[i].Add(b.counts[i].Load()) + b.counts[i].Store(0) + } - newRes func(attribute.Set) FilteredExemplarReservoir[N] - limit limiter[*buckets[N]] - values map[attribute.Distinct]*buckets[N] - valuesMu sync.Mutex -} + if !noMinMax { + // Do not reset min or max because cumulative min and max only ever grow + // smaller or larger respectively. -func newHistValues[N int64 | float64]( - bounds []float64, - noSum bool, - limit int, - r func(attribute.Set) FilteredExemplarReservoir[N], -) *histValues[N] { - // The responsibility of keeping all buckets correctly associated with the - // passed boundaries is ultimately this type's responsibility. Make a copy - // here so we can always guarantee this. Or, in the case of failure, have - // complete control over the fix. - b := slices.Clone(bounds) - slices.Sort(b) - return &histValues[N]{ - noSum: noSum, - bounds: b, - newRes: r, - limit: newLimiter[*buckets[N]](limit), - values: make(map[attribute.Distinct]*buckets[N]), + if b.minMax.set.Load() { + into.minMax.Update(b.minMax.minimum.Load()) + into.minMax.Update(b.minMax.maximum.Load()) + } + } + if !noSum { + into.total.add(b.total.load()) + b.total.reset() } } -// Aggregate records the measurement value, scoped by attr, and aggregates it -// into a histogram. -func (s *histValues[N]) measure( +// deltaHistogram is a histogram whose internal storage is reset when it is +// collected. +// +// deltaHistogram's measure is implemented without locking, even when called +// concurrently with collect. This is done by maintaining two separate maps: +// one "hot" which is concurrently updated by measure(), and one "cold", which +// is read and reset by collect(). The [hotcoldWaitGroup] allows collect() to +// swap the hot and cold maps, and wait for updates to the cold map to complete +// prior to reading. deltaHistogram swaps ald clears complete maps so that +// unused attribute sets do not report in subsequent collect() calls. +type deltaHistogram[N int64 | float64] struct { + hcwg hotColdWaitGroup + hotColdValMap [2]limitedSyncMap + + start time.Time + noMinMax bool + noSum bool + bounds []float64 + newRes func(attribute.Set) FilteredExemplarReservoir[N] +} + +func (s *deltaHistogram[N]) measure( ctx context.Context, value N, fltrAttr attribute.Set, droppedAttr []attribute.KeyValue, ) { + hotIdx := s.hcwg.start() + defer s.hcwg.done(hotIdx) + h := s.hotColdValMap[hotIdx].LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any { + hPt := &histogramPoint[N]{ + res: s.newRes(attr), + attrs: attr, + // N+1 buckets. For example: + // + // bounds = [0, 5, 10] + // + // Then, + // + // counts = (-∞, 0], (0, 5.0], (5.0, 10.0], (10.0, +∞) + histogramPointCounters: histogramPointCounters[N]{counts: make([]atomic.Uint64, len(s.bounds)+1)}, + } + return hPt + }).(*histogramPoint[N]) + // This search will return an index in the range [0, len(s.bounds)], where // it will return len(s.bounds) if value is greater than the last element - // of s.bounds. This aligns with the buckets in that the length of buckets + // of s.bounds. This aligns with the histogramPoint in that the length of histogramPoint // is len(s.bounds)+1, with the last bucket representing: // (s.bounds[len(s.bounds)-1], +∞). idx := sort.SearchFloat64s(s.bounds, float64(value)) - - s.valuesMu.Lock() - defer s.valuesMu.Unlock() - - attr := s.limit.Attributes(fltrAttr, s.values) - b, ok := s.values[attr.Equivalent()] - if !ok { - // N+1 buckets. For example: - // - // bounds = [0, 5, 10] - // - // Then, - // - // buckets = (-∞, 0], (0, 5.0], (5.0, 10.0], (10.0, +∞) - b = newBuckets[N](attr, len(s.bounds)+1) - b.res = s.newRes(attr) - - // Ensure min and max are recorded values (not zero), for new buckets. - b.min, b.max = value, value - s.values[attr.Equivalent()] = b + h.counts[idx].Add(1) + if !s.noMinMax { + h.minMax.Update(value) } - b.bin(idx, value) if !s.noSum { - b.sum(value) + h.total.add(value) } - b.res.Offer(ctx, value, droppedAttr) + h.res.Offer(ctx, value, droppedAttr) } -// newHistogram returns an Aggregator that summarizes a set of measurements as -// an histogram. -func newHistogram[N int64 | float64]( +// newDeltaHistogram returns a histogram that is reset each time it is +// collected. +func newDeltaHistogram[N int64 | float64]( boundaries []float64, noMinMax, noSum bool, limit int, r func(attribute.Set) FilteredExemplarReservoir[N], -) *histogram[N] { - return &histogram[N]{ - histValues: newHistValues[N](boundaries, noSum, limit, r), - noMinMax: noMinMax, - start: now(), +) *deltaHistogram[N] { + // The responsibility of keeping all histogramPoint correctly associated with the + // passed boundaries is ultimately this type's responsibility. Make a copy + // here so we can always guarantee this. Or, in the case of failure, have + // complete control over the fix. + b := slices.Clone(boundaries) + slices.Sort(b) + return &deltaHistogram[N]{ + start: now(), + noMinMax: noMinMax, + noSum: noSum, + bounds: b, + newRes: r, + hotColdValMap: [2]limitedSyncMap{ + {aggLimit: limit}, + {aggLimit: limit}, + }, } } -// histogram summarizes a set of measurements as an histogram with explicitly -// defined buckets. -type histogram[N int64 | float64] struct { - *histValues[N] - - noMinMax bool - start time.Time -} - -func (s *histogram[N]) delta( +func (s *deltaHistogram[N]) collect( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() @@ -150,39 +179,46 @@ func (s *histogram[N]) delta( h, _ := (*dest).(metricdata.Histogram[N]) h.Temporality = metricdata.DeltaTemporality - s.valuesMu.Lock() - defer s.valuesMu.Unlock() + // delta always clears values on collection + readIdx := s.hcwg.swapHotAndWait() // Do not allow modification of our copy of bounds. bounds := slices.Clone(s.bounds) - n := len(s.values) + // The len will not change while we iterate over values, since we waited + // for all writes to finish to the cold values and len. + n := s.hotColdValMap[readIdx].Len() hDPts := reset(h.DataPoints, n, n) var i int - for _, val := range s.values { + s.hotColdValMap[readIdx].Range(func(_, value any) bool { + val := value.(*histogramPoint[N]) + + count := val.loadCountsInto(&hDPts[i].BucketCounts) hDPts[i].Attributes = val.attrs hDPts[i].StartTime = s.start hDPts[i].Time = t - hDPts[i].Count = val.count + hDPts[i].Count = count hDPts[i].Bounds = bounds - hDPts[i].BucketCounts = val.counts if !s.noSum { - hDPts[i].Sum = val.total + hDPts[i].Sum = val.total.load() } if !s.noMinMax { - hDPts[i].Min = metricdata.NewExtrema(val.min) - hDPts[i].Max = metricdata.NewExtrema(val.max) + if val.minMax.set.Load() { + hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load()) + hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load()) + } } collectExemplars(&hDPts[i].Exemplars, val.res.Collect) i++ - } + return true + }) // Unused attribute sets do not report. - clear(s.values) + s.hotColdValMap[readIdx].Clear() // The delta collection cycle resets. s.start = t @@ -192,7 +228,101 @@ func (s *histogram[N]) delta( return n } -func (s *histogram[N]) cumulative( +// cumulativeHistogram summarizes a set of measurements as an histogram with explicitly +// defined histogramPoint. +// +// cumulativeHistogram's measure is implemented without locking, even when +// called concurrently with collect. This is done by maintaining two separate +// histogramPointCounters for each attribute set: one "hot" which is +// concurrently updated by measure(), and one "cold", which is read and reset +// by collect(). The [hotcoldWaitGroup] allows collect() to swap the hot and +// cold counters, and wait for updates to the cold counters to complete prior +// to reading. Unlike deltaHistogram, this maintains a single map so that the +// preserved attribute sets do not change when collect() is called. +type cumulativeHistogram[N int64 | float64] struct { + values limitedSyncMap + + start time.Time + noMinMax bool + noSum bool + bounds []float64 + newRes func(attribute.Set) FilteredExemplarReservoir[N] +} + +// newCumulativeHistogram returns a histogram that accumulates measurements +// into a histogram data structure. It is never reset. +func newCumulativeHistogram[N int64 | float64]( + boundaries []float64, + noMinMax, noSum bool, + limit int, + r func(attribute.Set) FilteredExemplarReservoir[N], +) *cumulativeHistogram[N] { + // The responsibility of keeping all histogramPoint correctly associated with the + // passed boundaries is ultimately this type's responsibility. Make a copy + // here so we can always guarantee this. Or, in the case of failure, have + // complete control over the fix. + b := slices.Clone(boundaries) + slices.Sort(b) + return &cumulativeHistogram[N]{ + start: now(), + noMinMax: noMinMax, + noSum: noSum, + bounds: b, + newRes: r, + values: limitedSyncMap{aggLimit: limit}, + } +} + +func (s *cumulativeHistogram[N]) measure( + ctx context.Context, + value N, + fltrAttr attribute.Set, + droppedAttr []attribute.KeyValue, +) { + h := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any { + hPt := &hotColdHistogramPoint[N]{ + res: s.newRes(attr), + attrs: attr, + // N+1 buckets. For example: + // + // bounds = [0, 5, 10] + // + // Then, + // + // count = (-∞, 0], (0, 5.0], (5.0, 10.0], (10.0, +∞) + hotColdPoint: [2]histogramPointCounters[N]{ + { + counts: make([]atomic.Uint64, len(s.bounds)+1), + }, + { + counts: make([]atomic.Uint64, len(s.bounds)+1), + }, + }, + } + return hPt + }).(*hotColdHistogramPoint[N]) + + // This search will return an index in the range [0, len(s.bounds)], where + // it will return len(s.bounds) if value is greater than the last element + // of s.bounds. This aligns with the histogramPoint in that the length of histogramPoint + // is len(s.bounds)+1, with the last bucket representing: + // (s.bounds[len(s.bounds)-1], +∞). + idx := sort.SearchFloat64s(s.bounds, float64(value)) + + hotIdx := h.hcwg.start() + defer h.hcwg.done(hotIdx) + + h.hotColdPoint[hotIdx].counts[idx].Add(1) + if !s.noMinMax { + h.hotColdPoint[hotIdx].minMax.Update(value) + } + if !s.noSum { + h.hotColdPoint[hotIdx].total.add(value) + } + h.res.Offer(ctx, value, droppedAttr) +} + +func (s *cumulativeHistogram[N]) collect( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() @@ -202,50 +332,58 @@ func (s *histogram[N]) cumulative( h, _ := (*dest).(metricdata.Histogram[N]) h.Temporality = metricdata.CumulativeTemporality - s.valuesMu.Lock() - defer s.valuesMu.Unlock() - // Do not allow modification of our copy of bounds. bounds := slices.Clone(s.bounds) - n := len(s.values) - hDPts := reset(h.DataPoints, n, n) + // Values are being concurrently written while we iterate, so only use the + // current length for capacity. + hDPts := reset(h.DataPoints, 0, s.values.Len()) var i int - for _, val := range s.values { - hDPts[i].Attributes = val.attrs - hDPts[i].StartTime = s.start - hDPts[i].Time = t - hDPts[i].Count = val.count - hDPts[i].Bounds = bounds - - // The HistogramDataPoint field values returned need to be copies of - // the buckets value as we will keep updating them. - // - // TODO (#3047): Making copies for bounds and counts incurs a large - // memory allocation footprint. Alternatives should be explored. - hDPts[i].BucketCounts = slices.Clone(val.counts) + s.values.Range(func(_, value any) bool { + val := value.(*hotColdHistogramPoint[N]) + // swap, observe, and clear the point + readIdx := val.hcwg.swapHotAndWait() + var bucketCounts []uint64 + count := val.hotColdPoint[readIdx].loadCountsInto(&bucketCounts) + newPt := metricdata.HistogramDataPoint[N]{ + Attributes: val.attrs, + StartTime: s.start, + Time: t, + Count: count, + Bounds: bounds, + // The HistogramDataPoint field values returned need to be copies of + // the histogramPoint value as we will keep updating them. + BucketCounts: bucketCounts, + } if !s.noSum { - hDPts[i].Sum = val.total + newPt.Sum = val.hotColdPoint[readIdx].total.load() } - if !s.noMinMax { - hDPts[i].Min = metricdata.NewExtrema(val.min) - hDPts[i].Max = metricdata.NewExtrema(val.max) + if val.hotColdPoint[readIdx].minMax.set.Load() { + newPt.Min = metricdata.NewExtrema(val.hotColdPoint[readIdx].minMax.minimum.Load()) + newPt.Max = metricdata.NewExtrema(val.hotColdPoint[readIdx].minMax.maximum.Load()) + } } + // Once we've read the point, merge it back into the hot histogram + // point since it is cumulative. + hotIdx := (readIdx + 1) % 2 + val.hotColdPoint[readIdx].mergeIntoAndReset(&val.hotColdPoint[hotIdx], s.noMinMax, s.noSum) - collectExemplars(&hDPts[i].Exemplars, val.res.Collect) + collectExemplars(&newPt.Exemplars, val.res.Collect) + hDPts = append(hDPts, newPt) i++ // TODO (#3006): This will use an unbounded amount of memory if there // are unbounded number of attribute sets being aggregated. Attribute // sets that become "stale" need to be forgotten so this will not // overload the system. - } + return true + }) h.DataPoints = hDPts *dest = h - return n + return i } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go index 4bbe624c77c..4924d732cb3 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go @@ -5,115 +5,179 @@ package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggreg import ( "context" - "sync" "time" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/metric/metricdata" ) -// datapoint is timestamped measurement data. -type datapoint[N int64 | float64] struct { +// lastValuePoint is timestamped measurement data. +type lastValuePoint[N int64 | float64] struct { attrs attribute.Set - value N + value atomicN[N] res FilteredExemplarReservoir[N] } -func newLastValue[N int64 | float64](limit int, r func(attribute.Set) FilteredExemplarReservoir[N]) *lastValue[N] { - return &lastValue[N]{ +// lastValueMap summarizes a set of measurements as the last one made. +type lastValueMap[N int64 | float64] struct { + newRes func(attribute.Set) FilteredExemplarReservoir[N] + values limitedSyncMap +} + +func (s *lastValueMap[N]) measure( + ctx context.Context, + value N, + fltrAttr attribute.Set, + droppedAttr []attribute.KeyValue, +) { + lv := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any { + return &lastValuePoint[N]{ + res: s.newRes(attr), + attrs: attr, + } + }).(*lastValuePoint[N]) + + lv.value.Store(value) + lv.res.Offer(ctx, value, droppedAttr) +} + +func newDeltaLastValue[N int64 | float64]( + limit int, + r func(attribute.Set) FilteredExemplarReservoir[N], +) *deltaLastValue[N] { + return &deltaLastValue[N]{ newRes: r, - limit: newLimiter[datapoint[N]](limit), - values: make(map[attribute.Distinct]datapoint[N]), start: now(), + hotColdValMap: [2]lastValueMap[N]{ + { + values: limitedSyncMap{aggLimit: limit}, + newRes: r, + }, + { + values: limitedSyncMap{aggLimit: limit}, + newRes: r, + }, + }, } } -// lastValue summarizes a set of measurements as the last one made. -type lastValue[N int64 | float64] struct { - sync.Mutex - +// deltaLastValue summarizes a set of measurements as the last one made. +type deltaLastValue[N int64 | float64] struct { newRes func(attribute.Set) FilteredExemplarReservoir[N] - limit limiter[datapoint[N]] - values map[attribute.Distinct]datapoint[N] start time.Time -} -func (s *lastValue[N]) measure(ctx context.Context, value N, fltrAttr attribute.Set, droppedAttr []attribute.KeyValue) { - s.Lock() - defer s.Unlock() - - attr := s.limit.Attributes(fltrAttr, s.values) - d, ok := s.values[attr.Equivalent()] - if !ok { - d.res = s.newRes(attr) - } - - d.attrs = attr - d.value = value - d.res.Offer(ctx, value, droppedAttr) + hcwg hotColdWaitGroup + hotColdValMap [2]lastValueMap[N] +} - s.values[attr.Equivalent()] = d +func (s *deltaLastValue[N]) measure( + ctx context.Context, + value N, + fltrAttr attribute.Set, + droppedAttr []attribute.KeyValue, +) { + hotIdx := s.hcwg.start() + defer s.hcwg.done(hotIdx) + s.hotColdValMap[hotIdx].measure(ctx, value, fltrAttr, droppedAttr) } -func (s *lastValue[N]) delta( +func (s *deltaLastValue[N]) collect( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() + n := s.copyAndClearDpts(dest, t) + // Update start time for delta temporality. + s.start = t + return n +} + +// copyAndClearDpts copies the lastValuePoints held by s into dest. The number of lastValuePoints +// copied is returned. +func (s *deltaLastValue[N]) copyAndClearDpts( + dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface + t time.Time, +) int { // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of // the DataPoints is missed (better luck next time). gData, _ := (*dest).(metricdata.Gauge[N]) + // delta always clears values on collection + readIdx := s.hcwg.swapHotAndWait() + // The len will not change while we iterate over values, since we waited + // for all writes to finish to the cold values and len. + n := s.hotColdValMap[readIdx].values.Len() + dPts := reset(gData.DataPoints, n, n) - s.Lock() - defer s.Unlock() - - n := s.copyDpts(&gData.DataPoints, t) + var i int + s.hotColdValMap[readIdx].values.Range(func(_, value any) bool { + v := value.(*lastValuePoint[N]) + dPts[i].Attributes = v.attrs + dPts[i].StartTime = s.start + dPts[i].Time = t + dPts[i].Value = v.value.Load() + collectExemplars[N](&dPts[i].Exemplars, v.res.Collect) + i++ + return true + }) + gData.DataPoints = dPts // Do not report stale values. - clear(s.values) - // Update start time for delta temporality. - s.start = t - + s.hotColdValMap[readIdx].values.Clear() *dest = gData + return i +} - return n +// cumulativeLastValue summarizes a set of measurements as the last one made. +type cumulativeLastValue[N int64 | float64] struct { + lastValueMap[N] + start time.Time +} + +func newCumulativeLastValue[N int64 | float64]( + limit int, + r func(attribute.Set) FilteredExemplarReservoir[N], +) *cumulativeLastValue[N] { + return &cumulativeLastValue[N]{ + lastValueMap: lastValueMap[N]{ + values: limitedSyncMap{aggLimit: limit}, + newRes: r, + }, + start: now(), + } } -func (s *lastValue[N]) cumulative( +func (s *cumulativeLastValue[N]) collect( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of - // the DataPoints is missed (better luck next time). + // the lastValuePoints is missed (better luck next time). gData, _ := (*dest).(metricdata.Gauge[N]) - s.Lock() - defer s.Unlock() + // Values are being concurrently written while we iterate, so only use the + // current length for capacity. + dPts := reset(gData.DataPoints, 0, s.values.Len()) - n := s.copyDpts(&gData.DataPoints, t) + var i int + s.values.Range(func(_, value any) bool { + v := value.(*lastValuePoint[N]) + newPt := metricdata.DataPoint[N]{ + Attributes: v.attrs, + StartTime: s.start, + Time: t, + Value: v.value.Load(), + } + collectExemplars[N](&newPt.Exemplars, v.res.Collect) + dPts = append(dPts, newPt) + i++ + return true + }) + gData.DataPoints = dPts // TODO (#3006): This will use an unbounded amount of memory if there // are unbounded number of attribute sets being aggregated. Attribute // sets that become "stale" need to be forgotten so this will not // overload the system. *dest = gData - return n -} - -// copyDpts copies the datapoints held by s into dest. The number of datapoints -// copied is returned. -func (s *lastValue[N]) copyDpts(dest *[]metricdata.DataPoint[N], t time.Time) int { - n := len(s.values) - *dest = reset(*dest, n, n) - - var i int - for _, v := range s.values { - (*dest)[i].Attributes = v.attrs - (*dest)[i].StartTime = s.start - (*dest)[i].Time = t - (*dest)[i].Value = v.value - collectExemplars(&(*dest)[i].Exemplars, v.res.Collect) - i++ - } - return n + return i } // newPrecomputedLastValue returns an aggregator that summarizes a set of @@ -122,51 +186,23 @@ func newPrecomputedLastValue[N int64 | float64]( limit int, r func(attribute.Set) FilteredExemplarReservoir[N], ) *precomputedLastValue[N] { - return &precomputedLastValue[N]{lastValue: newLastValue[N](limit, r)} + return &precomputedLastValue[N]{deltaLastValue: newDeltaLastValue[N](limit, r)} } // precomputedLastValue summarizes a set of observations as the last one made. type precomputedLastValue[N int64 | float64] struct { - *lastValue[N] + *deltaLastValue[N] } func (s *precomputedLastValue[N]) delta( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { - t := now() - // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of - // the DataPoints is missed (better luck next time). - gData, _ := (*dest).(metricdata.Gauge[N]) - - s.Lock() - defer s.Unlock() - - n := s.copyDpts(&gData.DataPoints, t) - // Do not report stale values. - clear(s.values) - // Update start time for delta temporality. - s.start = t - - *dest = gData - - return n + return s.collect(dest) } func (s *precomputedLastValue[N]) cumulative( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { - t := now() - // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of - // the DataPoints is missed (better luck next time). - gData, _ := (*dest).(metricdata.Gauge[N]) - - s.Lock() - defer s.Unlock() - - n := s.copyDpts(&gData.DataPoints, t) - // Do not report stale values. - clear(s.values) - *dest = gData - - return n + // Do not reset the start time. + return s.copyAndClearDpts(dest, now()) } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go index 9ea0251edd7..c19a1aff68f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go @@ -30,7 +30,7 @@ func newLimiter[V any](aggregation int) limiter[V] { // aggregation cardinality limit for the existing measurements. If it will, // overflowSet is returned. Otherwise, if it will not exceed the limit, or the // limit is not set (limit <= 0), attr is returned. -func (l limiter[V]) Attributes(attrs attribute.Set, measurements map[attribute.Distinct]V) attribute.Set { +func (l limiter[V]) Attributes(attrs attribute.Set, measurements map[attribute.Distinct]*V) attribute.Set { if l.aggLimit > 0 { _, exists := measurements[attrs.Equivalent()] if !exists && len(measurements) >= l.aggLimit-1 { diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go index 1b4b2304c0b..66cb68085fd 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go @@ -5,7 +5,6 @@ package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggreg import ( "context" - "sync" "time" "go.opentelemetry.io/otel/attribute" @@ -13,64 +12,75 @@ import ( ) type sumValue[N int64 | float64] struct { - n N + n atomicCounter[N] res FilteredExemplarReservoir[N] attrs attribute.Set } -// valueMap is the storage for sums. -type valueMap[N int64 | float64] struct { - sync.Mutex +type sumValueMap[N int64 | float64] struct { + values limitedSyncMap newRes func(attribute.Set) FilteredExemplarReservoir[N] - limit limiter[sumValue[N]] - values map[attribute.Distinct]sumValue[N] } -func newValueMap[N int64 | float64](limit int, r func(attribute.Set) FilteredExemplarReservoir[N]) *valueMap[N] { - return &valueMap[N]{ - newRes: r, - limit: newLimiter[sumValue[N]](limit), - values: make(map[attribute.Distinct]sumValue[N]), - } -} - -func (s *valueMap[N]) measure(ctx context.Context, value N, fltrAttr attribute.Set, droppedAttr []attribute.KeyValue) { - s.Lock() - defer s.Unlock() - - attr := s.limit.Attributes(fltrAttr, s.values) - v, ok := s.values[attr.Equivalent()] - if !ok { - v.res = s.newRes(attr) - } - - v.attrs = attr - v.n += value - v.res.Offer(ctx, value, droppedAttr) - - s.values[attr.Equivalent()] = v +func (s *sumValueMap[N]) measure( + ctx context.Context, + value N, + fltrAttr attribute.Set, + droppedAttr []attribute.KeyValue, +) { + sv := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any { + return &sumValue[N]{ + res: s.newRes(attr), + attrs: attr, + } + }).(*sumValue[N]) + sv.n.add(value) + // It is possible for collection to race with measurement and observe the + // exemplar in the batch of metrics after the add() for cumulative sums. + // This is an accepted tradeoff to avoid locking during measurement. + sv.res.Offer(ctx, value, droppedAttr) } -// newSum returns an aggregator that summarizes a set of measurements as their -// arithmetic sum. Each sum is scoped by attributes and the aggregation cycle -// the measurements were made in. -func newSum[N int64 | float64](monotonic bool, limit int, r func(attribute.Set) FilteredExemplarReservoir[N]) *sum[N] { - return &sum[N]{ - valueMap: newValueMap[N](limit, r), +// newDeltaSum returns an aggregator that summarizes a set of measurements as +// their arithmetic sum. Each sum is scoped by attributes and the aggregation +// cycle the measurements were made in. +func newDeltaSum[N int64 | float64]( + monotonic bool, + limit int, + r func(attribute.Set) FilteredExemplarReservoir[N], +) *deltaSum[N] { + return &deltaSum[N]{ monotonic: monotonic, start: now(), + hotColdValMap: [2]sumValueMap[N]{ + { + values: limitedSyncMap{aggLimit: limit}, + newRes: r, + }, + { + values: limitedSyncMap{aggLimit: limit}, + newRes: r, + }, + }, } } -// sum summarizes a set of measurements made as their arithmetic sum. -type sum[N int64 | float64] struct { - *valueMap[N] - +// deltaSum is the storage for sums which resets every collection interval. +type deltaSum[N int64 | float64] struct { monotonic bool start time.Time + + hcwg hotColdWaitGroup + hotColdValMap [2]sumValueMap[N] +} + +func (s *deltaSum[N]) measure(ctx context.Context, value N, fltrAttr attribute.Set, droppedAttr []attribute.KeyValue) { + hotIdx := s.hcwg.start() + defer s.hcwg.done(hotIdx) + s.hotColdValMap[hotIdx].measure(ctx, value, fltrAttr, droppedAttr) } -func (s *sum[N]) delta( +func (s *deltaSum[N]) collect( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() @@ -81,33 +91,61 @@ func (s *sum[N]) delta( sData.Temporality = metricdata.DeltaTemporality sData.IsMonotonic = s.monotonic - s.Lock() - defer s.Unlock() - - n := len(s.values) + // delta always clears values on collection + readIdx := s.hcwg.swapHotAndWait() + // The len will not change while we iterate over values, since we waited + // for all writes to finish to the cold values and len. + n := s.hotColdValMap[readIdx].values.Len() dPts := reset(sData.DataPoints, n, n) var i int - for _, val := range s.values { + s.hotColdValMap[readIdx].values.Range(func(_, value any) bool { + val := value.(*sumValue[N]) + collectExemplars(&dPts[i].Exemplars, val.res.Collect) dPts[i].Attributes = val.attrs dPts[i].StartTime = s.start dPts[i].Time = t - dPts[i].Value = val.n - collectExemplars(&dPts[i].Exemplars, val.res.Collect) + dPts[i].Value = val.n.load() i++ - } - // Do not report stale values. - clear(s.values) + return true + }) + s.hotColdValMap[readIdx].values.Clear() // The delta collection cycle resets. s.start = t sData.DataPoints = dPts *dest = sData - return n + return i +} + +// newCumulativeSum returns an aggregator that summarizes a set of measurements +// as their arithmetic sum. Each sum is scoped by attributes and the +// aggregation cycle the measurements were made in. +func newCumulativeSum[N int64 | float64]( + monotonic bool, + limit int, + r func(attribute.Set) FilteredExemplarReservoir[N], +) *cumulativeSum[N] { + return &cumulativeSum[N]{ + monotonic: monotonic, + start: now(), + sumValueMap: sumValueMap[N]{ + values: limitedSyncMap{aggLimit: limit}, + newRes: r, + }, + } } -func (s *sum[N]) cumulative( +// deltaSum is the storage for sums which never reset. +type cumulativeSum[N int64 | float64] struct { + monotonic bool + start time.Time + + sumValueMap[N] +} + +func (s *cumulativeSum[N]) collect( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() @@ -118,30 +156,33 @@ func (s *sum[N]) cumulative( sData.Temporality = metricdata.CumulativeTemporality sData.IsMonotonic = s.monotonic - s.Lock() - defer s.Unlock() - - n := len(s.values) - dPts := reset(sData.DataPoints, n, n) + // Values are being concurrently written while we iterate, so only use the + // current length for capacity. + dPts := reset(sData.DataPoints, 0, s.values.Len()) var i int - for _, value := range s.values { - dPts[i].Attributes = value.attrs - dPts[i].StartTime = s.start - dPts[i].Time = t - dPts[i].Value = value.n - collectExemplars(&dPts[i].Exemplars, value.res.Collect) + s.values.Range(func(_, value any) bool { + val := value.(*sumValue[N]) + newPt := metricdata.DataPoint[N]{ + Attributes: val.attrs, + StartTime: s.start, + Time: t, + Value: val.n.load(), + } + collectExemplars(&newPt.Exemplars, val.res.Collect) + dPts = append(dPts, newPt) // TODO (#3006): This will use an unbounded amount of memory if there // are unbounded number of attribute sets being aggregated. Attribute // sets that become "stale" need to be forgotten so this will not // overload the system. i++ - } + return true + }) sData.DataPoints = dPts *dest = sData - return n + return i } // newPrecomputedSum returns an aggregator that summarizes a set of @@ -153,27 +194,22 @@ func newPrecomputedSum[N int64 | float64]( r func(attribute.Set) FilteredExemplarReservoir[N], ) *precomputedSum[N] { return &precomputedSum[N]{ - valueMap: newValueMap[N](limit, r), - monotonic: monotonic, - start: now(), + deltaSum: newDeltaSum(monotonic, limit, r), } } // precomputedSum summarizes a set of observations as their arithmetic sum. type precomputedSum[N int64 | float64] struct { - *valueMap[N] + *deltaSum[N] - monotonic bool - start time.Time - - reported map[attribute.Distinct]N + reported map[any]N } func (s *precomputedSum[N]) delta( dest *metricdata.Aggregation, //nolint:gocritic // The pointer is needed for the ComputeAggregation interface ) int { t := now() - newReported := make(map[attribute.Distinct]N) + newReported := make(map[any]N) // If *dest is not a metricdata.Sum, memory reuse is missed. In that case, // use the zero-value sData and hope for better alignment next cycle. @@ -181,27 +217,29 @@ func (s *precomputedSum[N]) delta( sData.Temporality = metricdata.DeltaTemporality sData.IsMonotonic = s.monotonic - s.Lock() - defer s.Unlock() - - n := len(s.values) + // delta always clears values on collection + readIdx := s.hcwg.swapHotAndWait() + // The len will not change while we iterate over values, since we waited + // for all writes to finish to the cold values and len. + n := s.hotColdValMap[readIdx].values.Len() dPts := reset(sData.DataPoints, n, n) var i int - for key, value := range s.values { - delta := value.n - s.reported[key] + s.hotColdValMap[readIdx].values.Range(func(key, value any) bool { + val := value.(*sumValue[N]) + n := val.n.load() - dPts[i].Attributes = value.attrs + delta := n - s.reported[key] + collectExemplars(&dPts[i].Exemplars, val.res.Collect) + dPts[i].Attributes = val.attrs dPts[i].StartTime = s.start dPts[i].Time = t dPts[i].Value = delta - collectExemplars(&dPts[i].Exemplars, value.res.Collect) - - newReported[key] = value.n + newReported[key] = n i++ - } - // Unused attribute sets do not report. - clear(s.values) + return true + }) + s.hotColdValMap[readIdx].values.Clear() s.reported = newReported // The delta collection cycle resets. s.start = t @@ -209,7 +247,7 @@ func (s *precomputedSum[N]) delta( sData.DataPoints = dPts *dest = sData - return n + return i } func (s *precomputedSum[N]) cumulative( @@ -223,27 +261,28 @@ func (s *precomputedSum[N]) cumulative( sData.Temporality = metricdata.CumulativeTemporality sData.IsMonotonic = s.monotonic - s.Lock() - defer s.Unlock() - - n := len(s.values) + // cumulative precomputed always clears values on collection + readIdx := s.hcwg.swapHotAndWait() + // The len will not change while we iterate over values, since we waited + // for all writes to finish to the cold values and len. + n := s.hotColdValMap[readIdx].values.Len() dPts := reset(sData.DataPoints, n, n) var i int - for _, val := range s.values { + s.hotColdValMap[readIdx].values.Range(func(_, value any) bool { + val := value.(*sumValue[N]) + collectExemplars(&dPts[i].Exemplars, val.res.Collect) dPts[i].Attributes = val.attrs dPts[i].StartTime = s.start dPts[i].Time = t - dPts[i].Value = val.n - collectExemplars(&dPts[i].Exemplars, val.res.Collect) - + dPts[i].Value = val.n.load() i++ - } - // Unused attribute sets do not report. - clear(s.values) + return true + }) + s.hotColdValMap[readIdx].values.Clear() sData.DataPoints = dPts *dest = sData - return n + return i } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go new file mode 100644 index 00000000000..66788c9e967 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go @@ -0,0 +1,168 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package observ provides experimental observability instrumentation for the +// metric reader. +package observ // import "go.opentelemetry.io/otel/sdk/metric/internal/observ" + +import ( + "context" + "fmt" + "sync" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/sdk" + "go.opentelemetry.io/otel/sdk/internal/x" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" + "go.opentelemetry.io/otel/semconv/v1.39.0/otelconv" +) + +const ( + // ScopeName is the unique name of the meter used for instrumentation. + ScopeName = "go.opentelemetry.io/otel/sdk/metric/internal/observ" + + // SchemaURL is the schema URL of the metrics produced by this + // instrumentation. + SchemaURL = semconv.SchemaURL +) + +var ( + measureAttrsPool = &sync.Pool{ + New: func() any { + const n = 1 + // component.name + 1 + // component.type + 1 // error.type + s := make([]attribute.KeyValue, 0, n) + // Return a pointer to a slice instead of a slice itself + // to avoid allocations on every call. + return &s + }, + } + + recordOptPool = &sync.Pool{ + New: func() any { + const n = 1 // WithAttributeSet + o := make([]metric.RecordOption, 0, n) + return &o + }, + } +) + +func get[T any](p *sync.Pool) *[]T { return p.Get().(*[]T) } + +func put[T any](p *sync.Pool, s *[]T) { + *s = (*s)[:0] // Reset. + p.Put(s) +} + +// ComponentName returns the component name for the metric reader with the +// provided ComponentType and ID. +func ComponentName(componentType string, id int64) string { + return fmt.Sprintf("%s/%d", componentType, id) +} + +// Instrumentation is experimental instrumentation for the metric reader. +type Instrumentation struct { + colDuration metric.Float64Histogram + + attrs []attribute.KeyValue + recOpt metric.RecordOption +} + +// NewInstrumentation returns instrumentation for metric reader with the provided component +// type (such as periodic and manual metric reader) and ID. It uses the global +// MeterProvider to create the instrumentation. +// +// The id should be the unique metric reader instance ID. It is used +// to set the "component.name" attribute. +// +// If the experimental observability is disabled, nil is returned. +func NewInstrumentation(componentType string, id int64) (*Instrumentation, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + i := &Instrumentation{ + attrs: []attribute.KeyValue{ + semconv.OTelComponentName(ComponentName(componentType, id)), + semconv.OTelComponentTypeKey.String(componentType), + }, + } + + r := attribute.NewSet(i.attrs...) + i.recOpt = metric.WithAttributeSet(r) + + meter := otel.GetMeterProvider().Meter( + ScopeName, + metric.WithInstrumentationVersion(sdk.Version()), + metric.WithSchemaURL(SchemaURL), + ) + + colDuration, err := otelconv.NewSDKMetricReaderCollectionDuration(meter) + if err != nil { + err = fmt.Errorf("failed to create collection duration metric: %w", err) + } + i.colDuration = colDuration.Inst() + + return i, err +} + +// CollectMetrics instruments the collect method of metric reader. It returns an +// [CollectOp] that must have its [CollectOp.End] method called when the +// collection end. +func (i *Instrumentation) CollectMetrics(ctx context.Context) CollectOp { + start := time.Now() + + return CollectOp{ + ctx: ctx, + start: start, + inst: i, + } +} + +// CollectOp tracks the collect operation being observed by +// [Instrumentation.CollectMetrics]. +type CollectOp struct { + ctx context.Context + start time.Time + + inst *Instrumentation +} + +// End completes the observation of the operation being observed by a call to +// [Instrumentation.CollectMetrics]. +// +// Any error that is encountered is provided as err. +func (e CollectOp) End(err error) { + recOpt := get[metric.RecordOption](recordOptPool) + defer put(recordOptPool, recOpt) + *recOpt = append(*recOpt, e.inst.recordOption(err)) + + d := time.Since(e.start).Seconds() + e.inst.colDuration.Record(e.ctx, d, *recOpt...) +} + +// recordOption returns a RecordOption with attributes representing the +// outcome of the collection being recorded. +// +// If err is nil, the default recOpt of the Instrumentation is returned. +// +// Otherwise, a new RecordOption is returned with the base attributes of the +// Instrumentation plus the error.type attribute set to the type of the error. +func (i *Instrumentation) recordOption(err error) metric.RecordOption { + if err == nil { + return i.recOpt + } + + attrs := get[attribute.KeyValue](measureAttrsPool) + defer put(measureAttrsPool, attrs) + *attrs = append(*attrs, i.attrs...) + *attrs = append(*attrs, semconv.ErrorType(err)) + + // Do not inefficiently make a copy of attrs by using WithAttributes + // instead of WithAttributeSet. + return metric.WithAttributeSet(attribute.NewSet(*attrs...)) +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go new file mode 100644 index 00000000000..3be234a4108 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go @@ -0,0 +1,11 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package reservoir // import "go.opentelemetry.io/otel/sdk/metric/internal/reservoir" + +// ConcurrentSafe is an interface that can be embedded in an +// exemplar.Reservoir to indicate to the SDK that it is safe to invoke its +// methods concurrently. If this interface is not embedded, the SDK assumes it +// is not safe to call concurrently and locks around Reservoir methods. This +// is currently only used by the built-in reservoirs. +type ConcurrentSafe interface{ concurrentSafe() } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go new file mode 100644 index 00000000000..6cd213b5f32 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package reservoir contains experimental features used by built-in exemplar +// reservoirs which require coordination with the metrics SDK. +package reservoir // import "go.opentelemetry.io/otel/sdk/metric/internal/reservoir" diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/README.md b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/README.md deleted file mode 100644 index be0714a5f44..00000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# Experimental Features - -The Metric SDK contains features that have not yet stabilized in the OpenTelemetry specification. -These features are added to the OpenTelemetry Go Metric 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 - -- [Exemplars](#exemplars) -- [Instrument Enabled](#instrument-enabled) - -### Exemplars - -A sample of measurements made may be exported directly as a set of exemplars. - -This experimental feature can be enabled by setting the `OTEL_GO_X_EXEMPLAR` environment variable. -The value of must be the case-insensitive string of `"true"` to enable the feature. -All other values are ignored. - -Exemplar filters are a supported. -The exemplar filter applies to all measurements made. -They filter these measurements, only allowing certain measurements to be passed to the underlying exemplar reservoir. - -To change the exemplar filter from the default `"trace_based"` filter set the `OTEL_METRICS_EXEMPLAR_FILTER` environment variable. -The value must be the case-sensitive string defined by the [OpenTelemetry specification]. - -- `"always_on"`: allows all measurements -- `"always_off"`: denies all measurements -- `"trace_based"`: allows only sampled measurements - -All values other than these will result in the default, `"trace_based"`, exemplar filter being used. - -[OpenTelemetry specification]: https://github.com/open-telemetry/opentelemetry-specification/blob/a6ca2fd484c9e76fe1d8e1c79c99f08f4745b5ee/specification/configuration/sdk-environment-variables.md#exemplar - -#### Examples - -Enable exemplars to be exported. - -```console -export OTEL_GO_X_EXEMPLAR=true -``` - -Disable exemplars from being exported. - -```console -unset OTEL_GO_X_EXEMPLAR -``` - -Set the exemplar filter to allow all measurements. - -```console -export OTEL_METRICS_EXEMPLAR_FILTER=always_on -``` - -Set the exemplar filter to deny all measurements. - -```console -export OTEL_METRICS_EXEMPLAR_FILTER=always_off -``` - -Set the exemplar filter to only allow sampled measurements. - -```console -export OTEL_METRICS_EXEMPLAR_FILTER=trace_based -``` - -Revert to the default exemplar filter (`"trace_based"`) - -```console -unset OTEL_METRICS_EXEMPLAR_FILTER -``` - -### Instrument Enabled - -To help users avoid performing computationally expensive operations when recording measurements, synchronous instruments provide an `Enabled` method. - -#### Examples - -The following code shows an example of how to check if an instrument implements the `EnabledInstrument` interface before using the `Enabled` function to avoid doing an expensive computation: - -```go -type enabledInstrument interface { Enabled(context.Context) bool } - -ctr, err := m.Int64Counter("expensive-counter") -c, ok := ctr.(enabledInstrument) -if !ok || c.Enabled(context.Background()) { - c.Add(expensiveComputation()) -} -``` - -## 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/metric/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/x.go deleted file mode 100644 index 294dcf8469e..00000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/x.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package x contains support for OTel metric 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/metric/internal/x" - -import ( - "context" - "os" -) - -// 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) -} - -//nolint:unused -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 reports whether the feature is enabled. -func (f Feature[T]) Enabled() bool { - _, ok := f.Lookup() - return ok -} - -// EnabledInstrument informs whether the instrument is enabled. -// -// EnabledInstrument interface is implemented by synchronous instruments. -type EnabledInstrument interface { - // Enabled reports whether the instrument will process measurements for the given context. - // - // This function can be used in places where measuring an instrument - // would result in computationally expensive operations. - Enabled(context.Context) bool -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go index 85d3dc20768..5b0630207b5 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go @@ -10,10 +10,18 @@ import ( "sync" "sync/atomic" + "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/sdk/metric/internal/observ" "go.opentelemetry.io/otel/sdk/metric/metricdata" ) +const ( + // ManualReaderType uniquely identifies the OpenTelemetry Metric Reader component + // being instrumented. + manualReaderType = "go.opentelemetry.io/otel/sdk/metric/metric.ManualReader" +) + // ManualReader is a simple Reader that allows an application to // read metrics on demand. type ManualReader struct { @@ -26,6 +34,8 @@ type ManualReader struct { temporalitySelector TemporalitySelector aggregationSelector AggregationSelector + + inst *observ.Instrumentation } // Compile time check the manualReader implements Reader and is comparable. @@ -39,9 +49,24 @@ func NewManualReader(opts ...ManualReaderOption) *ManualReader { aggregationSelector: cfg.aggregationSelector, } r.externalProducers.Store(cfg.producers) + + var err error + r.inst, err = observ.NewInstrumentation(manualReaderType, nextManualReaderID()) + if err != nil { + otel.Handle(err) + } + return r } +var manualReaderIDCounter atomic.Int64 + +// nextManualReaderID returns an identifier for this manual reader, +// starting with 0 and incrementing by 1 each time it is called. +func nextManualReaderID() int64 { + return manualReaderIDCounter.Add(1) - 1 +} + // register stores the sdkProducer which enables the caller // to read metrics from the SDK on demand. func (mr *ManualReader) register(p sdkProducer) { @@ -93,12 +118,20 @@ func (mr *ManualReader) Shutdown(context.Context) error { // // This method is safe to call concurrently. func (mr *ManualReader) Collect(ctx context.Context, rm *metricdata.ResourceMetrics) error { + var err error + if mr.inst != nil { + cp := mr.inst.CollectMetrics(ctx) + defer func() { cp.End(err) }() + } + if rm == nil { - return errors.New("manual reader: *metricdata.ResourceMetrics is nil") + err = errors.New("manual reader: *metricdata.ResourceMetrics is nil") + return err } p := mr.sdkProducer.Load() if p == nil { - return ErrReaderNotRegistered + err = ErrReaderNotRegistered + return err } ph, ok := p.(produceHolder) @@ -107,11 +140,11 @@ func (mr *ManualReader) Collect(ctx context.Context, rm *metricdata.ResourceMetr // this should never happen. In the unforeseen case that this does // happen, return an error instead of panicking so a users code does // not halt in the processes. - err := fmt.Errorf("manual reader: invalid producer: %T", p) + err = fmt.Errorf("manual reader: invalid producer: %T", p) return err } - err := ph.produce(ctx, rm) + err = ph.produce(ctx, rm) if err != nil { return err } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality_string.go b/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality_string.go index 4da833cdce2..129cc6430dc 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality_string.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality_string.go @@ -18,8 +18,9 @@ const _Temporality_name = "undefinedTemporalityCumulativeTemporalityDeltaTempora var _Temporality_index = [...]uint8{0, 20, 41, 57} func (i Temporality) String() string { - if i >= Temporality(len(_Temporality_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_Temporality_index)-1 { return "Temporality(" + strconv.FormatInt(int64(i), 10) + ")" } - return _Temporality_name[_Temporality_index[i]:_Temporality_index[i+1]] + return _Temporality_name[_Temporality_index[idx]:_Temporality_index[idx+1]] } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go index f08c771a68f..ef40ef29a34 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go @@ -13,7 +13,9 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/sdk/metric/internal/observ" "go.opentelemetry.io/otel/sdk/metric/metricdata" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) // Default periodic reader timing. @@ -126,9 +128,26 @@ func NewPeriodicReader(exporter Exporter, options ...PeriodicReaderOption) *Peri r.run(ctx, conf.interval) }() + var err error + r.inst, err = observ.NewInstrumentation( + semconv.OTelComponentTypePeriodicMetricReader.Value.AsString(), + nextPeriodicReaderID(), + ) + if err != nil { + otel.Handle(err) + } + return r } +var periodicReaderIDCounter atomic.Int64 + +// nextPeriodicReaderID returns an identifier for this periodic reader, +// starting with 0 and incrementing by 1 each time it is called. +func nextPeriodicReaderID() int64 { + return periodicReaderIDCounter.Add(1) - 1 +} + // PeriodicReader is a Reader that continuously collects and exports metric // data at a set interval. type PeriodicReader struct { @@ -148,6 +167,8 @@ type PeriodicReader struct { shutdownOnce sync.Once rmPool sync.Pool + + inst *observ.Instrumentation } // Compile time check the periodicReader implements Reader and is comparable. @@ -235,8 +256,15 @@ func (r *PeriodicReader) Collect(ctx context.Context, rm *metricdata.ResourceMet // collect unwraps p as a produceHolder and returns its produce results. func (r *PeriodicReader) collect(ctx context.Context, p any, rm *metricdata.ResourceMetrics) error { + var err error + if r.inst != nil { + cp := r.inst.CollectMetrics(ctx) + defer func() { cp.End(err) }() + } + if p == nil { - return ErrReaderNotRegistered + err = ErrReaderNotRegistered + return err } ph, ok := p.(produceHolder) @@ -245,11 +273,11 @@ func (r *PeriodicReader) collect(ctx context.Context, p any, rm *metricdata.Reso // this should never happen. In the unforeseen case that this does // happen, return an error instead of panicking so a users code does // not halt in the processes. - err := fmt.Errorf("periodic reader: invalid producer: %T", p) + err = fmt.Errorf("periodic reader: invalid producer: %T", p) return err } - err := ph.produce(ctx, rm) + err = ph.produce(ctx, rm) if err != nil { return err } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go b/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go index 408fddc8d4e..ab269cdfd69 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go @@ -513,7 +513,10 @@ func (i *inserter[N]) aggregateFunc( case AggregationExplicitBucketHistogram: var noSum bool switch kind { - case InstrumentKindUpDownCounter, InstrumentKindObservableUpDownCounter, InstrumentKindObservableGauge, InstrumentKindGauge: + case InstrumentKindUpDownCounter, + InstrumentKindObservableUpDownCounter, + InstrumentKindObservableGauge, + InstrumentKindGauge: // The sum should not be collected for any instrument that can make // negative measurements: // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/metrics/sdk.md#histogram-aggregations @@ -523,7 +526,10 @@ func (i *inserter[N]) aggregateFunc( case AggregationBase2ExponentialHistogram: var noSum bool switch kind { - case InstrumentKindUpDownCounter, InstrumentKindObservableUpDownCounter, InstrumentKindObservableGauge, InstrumentKindGauge: + case InstrumentKindUpDownCounter, + InstrumentKindObservableUpDownCounter, + InstrumentKindObservableGauge, + InstrumentKindGauge: // The sum should not be collected for any instrument that can make // negative measurements: // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/metrics/sdk.md#histogram-aggregations @@ -569,7 +575,11 @@ func isAggregatorCompatible(kind InstrumentKind, agg Aggregation) error { } case AggregationSum: switch kind { - case InstrumentKindObservableCounter, InstrumentKindObservableUpDownCounter, InstrumentKindCounter, InstrumentKindHistogram, InstrumentKindUpDownCounter: + case InstrumentKindObservableCounter, + InstrumentKindObservableUpDownCounter, + InstrumentKindCounter, + InstrumentKindHistogram, + InstrumentKindUpDownCounter: return nil default: // TODO: review need for aggregation check after diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go index 5c1cea8254e..7b205c736c2 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go @@ -127,10 +127,40 @@ type TemporalitySelector func(InstrumentKind) metricdata.Temporality // DefaultTemporalitySelector is the default TemporalitySelector used if // WithTemporalitySelector is not provided. CumulativeTemporality will be used // for all instrument kinds if this TemporalitySelector is used. -func DefaultTemporalitySelector(InstrumentKind) metricdata.Temporality { +func DefaultTemporalitySelector(k InstrumentKind) metricdata.Temporality { + return CumulativeTemporalitySelector(k) +} + +// CumulativeTemporalitySelector is the TemporalitySelector that uses +// a cumulative temporality for all instrument kinds. +func CumulativeTemporalitySelector(InstrumentKind) metricdata.Temporality { return metricdata.CumulativeTemporality } +// DeltaTemporalitySelector is the TemporalitySelector that uses +// a delta temporality for instrument kinds: counter, histogram, observable counter +// All other instruments use cumulative temporality. +func DeltaTemporalitySelector(k InstrumentKind) metricdata.Temporality { + switch k { + case InstrumentKindCounter, InstrumentKindHistogram, InstrumentKindObservableCounter: + return metricdata.DeltaTemporality + default: + return metricdata.CumulativeTemporality + } +} + +// LowMemoryTemporalitySelector is the TemporalitySelector that uses +// delta temporality for counters and histograms. All other instruments use +// cumulative temporality. +func LowMemoryTemporalitySelector(k InstrumentKind) metricdata.Temporality { + switch k { + case InstrumentKindCounter, InstrumentKindHistogram: + return metricdata.DeltaTemporality + default: + return metricdata.CumulativeTemporality + } +} + // AggregationSelector selects the aggregation and the parameters to use for // that aggregation based on the InstrumentKind. // diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/version.go b/vendor/go.opentelemetry.io/otel/sdk/metric/version.go index dd9051a76c5..ea9e076c7e9 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/version.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/version.go @@ -5,5 +5,5 @@ package metric // import "go.opentelemetry.io/otel/sdk/metric" // version is the current release version of the metric SDK in use. func version() string { - return "1.38.0" + return "1.40.0" } diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go index 3f20eb7a563..8a7bb330bf9 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) type ( diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go index bbe142d2031..a19b39def83 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go @@ -11,7 +11,7 @@ import ( "os" "regexp" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) type containerIDProvider func() (string, error) diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go index 4a1b017eea9..c49157224e8 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) const ( diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go index 5fed33d4fb6..023621ba76b 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go @@ -8,7 +8,7 @@ import ( "errors" "strings" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) type hostIDProvider func() (string, error) @@ -51,17 +51,16 @@ type hostIDReaderDarwin struct { execCommand commandExecutor } -// read executes `ioreg -rd1 -c "IOPlatformExpertDevice"` and parses host id +// read executes `/usr/sbin/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") + result, err := r.execCommand("/usr/sbin/ioreg", "-rd1", "-c", "IOPlatformExpertDevice") if err != nil { return "", err } - lines := strings.Split(result, "\n") - for _, line := range lines { + for line := range strings.SplitSeq(result, "\n") { if strings.Contains(line, "IOPlatformUUID") { parts := strings.Split(line, " = ") if len(parts) == 2 { 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 index cc8b8938ed5..4c1c30f2560 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go @@ -2,7 +2,6 @@ // 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" 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 index f84f173240f..4a26096c8d0 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package resource // import "go.opentelemetry.io/otel/sdk/resource" 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 index df12c44c564..63ad2fa4e05 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go @@ -2,7 +2,6 @@ // 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" 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 index 3677c83d7da..2b8ca20b381 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package resource // import "go.opentelemetry.io/otel/sdk/resource" diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go index 51da76e807f..534809e2178 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go @@ -8,7 +8,7 @@ import ( "strings" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) type osDescriptionProvider func() (string, error) 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 index 7252af79fc9..a1763267c22 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go @@ -2,7 +2,6 @@ // 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" diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go index a6ff26a4d27..6c50ab68677 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go @@ -2,7 +2,6 @@ // 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" diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go index a77742b0771..25f629532a3 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go @@ -2,7 +2,6 @@ // 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" diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go index 138e57721b6..a1189553c71 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go @@ -11,7 +11,7 @@ import ( "path/filepath" "runtime" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" ) type ( 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 index 9bc3e525d19..7d15cbb9c0f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go @@ -6,20 +6,14 @@ package trace // import "go.opentelemetry.io/otel/sdk/trace" import ( "context" "errors" - "fmt" "sync" "sync/atomic" "time" "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk" - "go.opentelemetry.io/otel/sdk/internal/env" - "go.opentelemetry.io/otel/sdk/trace/internal/x" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" + "go.opentelemetry.io/otel/sdk/trace/internal/env" + "go.opentelemetry.io/otel/sdk/trace/internal/observ" "go.opentelemetry.io/otel/trace" ) @@ -33,8 +27,6 @@ const ( DefaultMaxExportBatchSize = 512 ) -var queueFull = otelconv.ErrorTypeAttr("queue_full") - // BatchSpanProcessorOption configures a BatchSpanProcessor. type BatchSpanProcessorOption func(o *BatchSpanProcessorOptions) @@ -78,10 +70,7 @@ type batchSpanProcessor struct { queue chan ReadOnlySpan dropped uint32 - selfObservabilityEnabled bool - callbackRegistration metric.Registration - spansProcessedCounter otelconv.SDKProcessorSpanProcessed - componentNameAttr attribute.KeyValue + inst *observ.BSP batch []ReadOnlySpan batchMutex sync.Mutex @@ -124,19 +113,14 @@ func NewBatchSpanProcessor(exporter SpanExporter, options ...BatchSpanProcessorO stopCh: make(chan struct{}), } - if x.SelfObservability.Enabled() { - bsp.selfObservabilityEnabled = true - bsp.componentNameAttr = componentName() - - var err error - bsp.spansProcessedCounter, bsp.callbackRegistration, err = newBSPObs( - bsp.componentNameAttr, - func() int64 { return int64(len(bsp.queue)) }, - int64(bsp.o.MaxQueueSize), - ) - if err != nil { - otel.Handle(err) - } + var err error + bsp.inst, err = observ.NewBSP( + nextProcessorID(), + func() int64 { return int64(len(bsp.queue)) }, + int64(bsp.o.MaxQueueSize), + ) + if err != nil { + otel.Handle(err) } bsp.stopWait.Add(1) @@ -157,51 +141,6 @@ func nextProcessorID() int64 { return processorIDCounter.Add(1) - 1 } -func componentName() attribute.KeyValue { - id := nextProcessorID() - name := fmt.Sprintf("%s/%d", otelconv.ComponentTypeBatchingSpanProcessor, id) - return semconv.OTelComponentName(name) -} - -// newBSPObs creates and returns a new set of metrics instruments and a -// registration for a BatchSpanProcessor. It is the caller's responsibility -// to unregister the registration when it is no longer needed. -func newBSPObs( - cmpnt attribute.KeyValue, - qLen func() int64, - qMax int64, -) (otelconv.SDKProcessorSpanProcessed, metric.Registration, error) { - meter := otel.GetMeterProvider().Meter( - selfObsScopeName, - metric.WithInstrumentationVersion(sdk.Version()), - metric.WithSchemaURL(semconv.SchemaURL), - ) - - qCap, err := otelconv.NewSDKProcessorSpanQueueCapacity(meter) - - qSize, e := otelconv.NewSDKProcessorSpanQueueSize(meter) - err = errors.Join(err, e) - - spansProcessed, e := otelconv.NewSDKProcessorSpanProcessed(meter) - err = errors.Join(err, e) - - cmpntT := semconv.OTelComponentTypeBatchingSpanProcessor - attrs := metric.WithAttributes(cmpnt, cmpntT) - - reg, e := meter.RegisterCallback( - func(_ context.Context, o metric.Observer) error { - o.ObserveInt64(qSize.Inst(), qLen(), attrs) - o.ObserveInt64(qCap.Inst(), qMax, attrs) - return nil - }, - qSize.Inst(), - qCap.Inst(), - ) - err = errors.Join(err, e) - - return spansProcessed, reg, err -} - // OnStart method does nothing. func (*batchSpanProcessor) OnStart(context.Context, ReadWriteSpan) {} @@ -242,8 +181,8 @@ func (bsp *batchSpanProcessor) Shutdown(ctx context.Context) error { case <-ctx.Done(): err = ctx.Err() } - if bsp.selfObservabilityEnabled { - err = errors.Join(err, bsp.callbackRegistration.Unregister()) + if bsp.inst != nil { + err = errors.Join(err, bsp.inst.Shutdown()) } }) return err @@ -357,10 +296,8 @@ func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error { if l := len(bsp.batch); l > 0 { global.Debug("exporting spans", "count", len(bsp.batch), "total_dropped", atomic.LoadUint32(&bsp.dropped)) - if bsp.selfObservabilityEnabled { - bsp.spansProcessedCounter.Add(ctx, int64(l), - bsp.componentNameAttr, - bsp.spansProcessedCounter.AttrComponentType(otelconv.ComponentTypeBatchingSpanProcessor)) + if bsp.inst != nil { + bsp.inst.Processed(ctx, int64(l)) } err := bsp.e.ExportSpans(ctx, bsp.batch) @@ -470,11 +407,8 @@ func (bsp *batchSpanProcessor) enqueueBlockOnQueueFull(ctx context.Context, sd R case bsp.queue <- sd: return true case <-ctx.Done(): - if bsp.selfObservabilityEnabled { - bsp.spansProcessedCounter.Add(ctx, 1, - bsp.componentNameAttr, - bsp.spansProcessedCounter.AttrComponentType(otelconv.ComponentTypeBatchingSpanProcessor), - bsp.spansProcessedCounter.AttrErrorType(queueFull)) + if bsp.inst != nil { + bsp.inst.ProcessedQueueFull(ctx, 1) } return false } @@ -490,11 +424,8 @@ func (bsp *batchSpanProcessor) enqueueDrop(ctx context.Context, sd ReadOnlySpan) return true default: atomic.AddUint32(&bsp.dropped, 1) - if bsp.selfObservabilityEnabled { - bsp.spansProcessedCounter.Add(ctx, 1, - bsp.componentNameAttr, - bsp.spansProcessedCounter.AttrComponentType(otelconv.ComponentTypeBatchingSpanProcessor), - bsp.spansProcessedCounter.AttrErrorType(queueFull)) + if bsp.inst != nil { + bsp.inst.ProcessedQueueFull(ctx, 1) } } return false diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go index e58e7f6ed78..b502c7d4798 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go @@ -7,7 +7,7 @@ Package trace contains support for OpenTelemetry distributed tracing. The following assumes a basic familiarity with OpenTelemetry concepts. See https://opentelemetry.io. -See [go.opentelemetry.io/otel/sdk/trace/internal/x] for information about +See [go.opentelemetry.io/otel/sdk/internal/x] for information about the experimental features. */ package trace // import "go.opentelemetry.io/otel/sdk/trace" diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/env/env.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go similarity index 98% rename from vendor/go.opentelemetry.io/otel/sdk/internal/env/env.go rename to vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go index e3309231d42..58f68df4417 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/env/env.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go @@ -3,7 +3,7 @@ // Package env provides types and functionality for environment variable support // in the OpenTelemetry SDK. -package env // import "go.opentelemetry.io/otel/sdk/internal/env" +package env // import "go.opentelemetry.io/otel/sdk/trace/internal/env" import ( "os" diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go new file mode 100644 index 00000000000..d9cfba0b45e --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go @@ -0,0 +1,119 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" + +import ( + "context" + "errors" + "fmt" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/sdk" + "go.opentelemetry.io/otel/sdk/internal/x" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" + "go.opentelemetry.io/otel/semconv/v1.39.0/otelconv" +) + +const ( + // ScopeName is the name of the instrumentation scope. + ScopeName = "go.opentelemetry.io/otel/sdk/trace/internal/observ" + + // SchemaURL is the schema URL of the instrumentation. + SchemaURL = semconv.SchemaURL +) + +// ErrQueueFull is the attribute value for the "queue_full" error type. +var ErrQueueFull = otelconv.SDKProcessorSpanProcessed{}.AttrErrorType( + otelconv.ErrorTypeAttr("queue_full"), +) + +// BSPComponentName returns the component name attribute for a +// BatchSpanProcessor with the given ID. +func BSPComponentName(id int64) attribute.KeyValue { + t := otelconv.ComponentTypeBatchingSpanProcessor + name := fmt.Sprintf("%s/%d", t, id) + return semconv.OTelComponentName(name) +} + +// BSP is the instrumentation for an OTel SDK BatchSpanProcessor. +type BSP struct { + reg metric.Registration + + processed metric.Int64Counter + processedOpts []metric.AddOption + processedQueueFullOpts []metric.AddOption +} + +func NewBSP(id int64, qLen func() int64, qMax int64) (*BSP, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + meter := otel.GetMeterProvider().Meter( + ScopeName, + metric.WithInstrumentationVersion(sdk.Version()), + metric.WithSchemaURL(SchemaURL), + ) + + qCap, err := otelconv.NewSDKProcessorSpanQueueCapacity(meter) + if err != nil { + err = fmt.Errorf("failed to create BSP queue capacity metric: %w", err) + } + qCapInst := qCap.Inst() + + qSize, e := otelconv.NewSDKProcessorSpanQueueSize(meter) + if e != nil { + e := fmt.Errorf("failed to create BSP queue size metric: %w", e) + err = errors.Join(err, e) + } + qSizeInst := qSize.Inst() + + cmpntT := semconv.OTelComponentTypeBatchingSpanProcessor + cmpnt := BSPComponentName(id) + set := attribute.NewSet(cmpnt, cmpntT) + + obsOpts := []metric.ObserveOption{metric.WithAttributeSet(set)} + reg, e := meter.RegisterCallback( + func(_ context.Context, o metric.Observer) error { + o.ObserveInt64(qSizeInst, qLen(), obsOpts...) + o.ObserveInt64(qCapInst, qMax, obsOpts...) + return nil + }, + qSizeInst, + qCapInst, + ) + if e != nil { + e := fmt.Errorf("failed to register BSP queue size/capacity callback: %w", e) + err = errors.Join(err, e) + } + + processed, e := otelconv.NewSDKProcessorSpanProcessed(meter) + if e != nil { + e := fmt.Errorf("failed to create BSP processed spans metric: %w", e) + err = errors.Join(err, e) + } + processedOpts := []metric.AddOption{metric.WithAttributeSet(set)} + + set = attribute.NewSet(cmpnt, cmpntT, ErrQueueFull) + processedQueueFullOpts := []metric.AddOption{metric.WithAttributeSet(set)} + + return &BSP{ + reg: reg, + processed: processed.Inst(), + processedOpts: processedOpts, + processedQueueFullOpts: processedQueueFullOpts, + }, err +} + +func (b *BSP) Shutdown() error { return b.reg.Unregister() } + +func (b *BSP) Processed(ctx context.Context, n int64) { + b.processed.Add(ctx, n, b.processedOpts...) +} + +func (b *BSP) ProcessedQueueFull(ctx context.Context, n int64) { + b.processed.Add(ctx, n, b.processedQueueFullOpts...) +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go new file mode 100644 index 00000000000..b542121e6a2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package observ provides observability instrumentation for the OTel trace SDK +// package. +package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go new file mode 100644 index 00000000000..8afd0526799 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go @@ -0,0 +1,97 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" + +import ( + "context" + "fmt" + "sync" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/sdk" + "go.opentelemetry.io/otel/sdk/internal/x" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" + "go.opentelemetry.io/otel/semconv/v1.39.0/otelconv" +) + +var measureAttrsPool = sync.Pool{ + New: func() any { + // "component.name" + "component.type" + "error.type" + const n = 1 + 1 + 1 + s := make([]attribute.KeyValue, 0, n) + // Return a pointer to a slice instead of a slice itself + // to avoid allocations on every call. + return &s + }, +} + +// SSP is the instrumentation for an OTel SDK SimpleSpanProcessor. +type SSP struct { + spansProcessedCounter metric.Int64Counter + addOpts []metric.AddOption + attrs []attribute.KeyValue +} + +// SSPComponentName returns the component name attribute for a +// SimpleSpanProcessor with the given ID. +func SSPComponentName(id int64) attribute.KeyValue { + t := otelconv.ComponentTypeSimpleSpanProcessor + name := fmt.Sprintf("%s/%d", t, id) + return semconv.OTelComponentName(name) +} + +// NewSSP returns instrumentation for an OTel SDK SimpleSpanProcessor with the +// provided ID. +// +// If the experimental observability is disabled, nil is returned. +func NewSSP(id int64) (*SSP, error) { + if !x.Observability.Enabled() { + return nil, nil + } + + meter := otel.GetMeterProvider().Meter( + ScopeName, + metric.WithInstrumentationVersion(sdk.Version()), + metric.WithSchemaURL(SchemaURL), + ) + spansProcessedCounter, err := otelconv.NewSDKProcessorSpanProcessed(meter) + if err != nil { + err = fmt.Errorf("failed to create SSP processed spans metric: %w", err) + } + + componentName := SSPComponentName(id) + componentType := spansProcessedCounter.AttrComponentType(otelconv.ComponentTypeSimpleSpanProcessor) + attrs := []attribute.KeyValue{componentName, componentType} + addOpts := []metric.AddOption{metric.WithAttributeSet(attribute.NewSet(attrs...))} + + return &SSP{ + spansProcessedCounter: spansProcessedCounter.Inst(), + addOpts: addOpts, + attrs: attrs, + }, err +} + +// SpanProcessed records that a span has been processed by the SimpleSpanProcessor. +// If err is non-nil, it records the processing error as an attribute. +func (ssp *SSP) SpanProcessed(ctx context.Context, err error) { + ssp.spansProcessedCounter.Add(ctx, 1, ssp.addOption(err)...) +} + +func (ssp *SSP) addOption(err error) []metric.AddOption { + if err == nil { + return ssp.addOpts + } + attrs := measureAttrsPool.Get().(*[]attribute.KeyValue) + defer func() { + *attrs = (*attrs)[:0] // reset the slice for reuse + measureAttrsPool.Put(attrs) + }() + *attrs = append(*attrs, ssp.attrs...) + *attrs = append(*attrs, semconv.ErrorType(err)) + // Do not inefficiently make a copy of attrs by using + // WithAttributes instead of WithAttributeSet. + return []metric.AddOption{metric.WithAttributeSet(attribute.NewSet(*attrs...))} +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go new file mode 100644 index 00000000000..13a2db2969b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go @@ -0,0 +1,223 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" + +import ( + "context" + "errors" + "fmt" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/sdk" + "go.opentelemetry.io/otel/sdk/internal/x" + "go.opentelemetry.io/otel/semconv/v1.39.0/otelconv" + "go.opentelemetry.io/otel/trace" +) + +var meterOpts = []metric.MeterOption{ + metric.WithInstrumentationVersion(sdk.Version()), + metric.WithSchemaURL(SchemaURL), +} + +// Tracer is instrumentation for an OTel SDK Tracer. +type Tracer struct { + enabled bool + + live metric.Int64UpDownCounter + started metric.Int64Counter +} + +func NewTracer() (Tracer, error) { + if !x.Observability.Enabled() { + return Tracer{}, nil + } + meter := otel.GetMeterProvider().Meter(ScopeName, meterOpts...) + + var err error + l, e := otelconv.NewSDKSpanLive(meter) + if e != nil { + e = fmt.Errorf("failed to create span live metric: %w", e) + err = errors.Join(err, e) + } + + s, e := otelconv.NewSDKSpanStarted(meter) + if e != nil { + e = fmt.Errorf("failed to create span started metric: %w", e) + err = errors.Join(err, e) + } + + return Tracer{enabled: true, live: l.Inst(), started: s.Inst()}, err +} + +func (t Tracer) Enabled() bool { return t.enabled } + +func (t Tracer) SpanStarted(ctx context.Context, psc trace.SpanContext, span trace.Span) { + key := spanStartedKey{ + parent: parentStateNoParent, + sampling: samplingStateDrop, + } + + if psc.IsValid() { + if psc.IsRemote() { + key.parent = parentStateRemoteParent + } else { + key.parent = parentStateLocalParent + } + } + + if span.IsRecording() { + if span.SpanContext().IsSampled() { + key.sampling = samplingStateRecordAndSample + } else { + key.sampling = samplingStateRecordOnly + } + } + + opts := spanStartedOpts[key] + t.started.Add(ctx, 1, opts...) +} + +func (t Tracer) SpanLive(ctx context.Context, span trace.Span) { + t.spanLive(ctx, 1, span) +} + +func (t Tracer) SpanEnded(ctx context.Context, span trace.Span) { + t.spanLive(ctx, -1, span) +} + +func (t Tracer) spanLive(ctx context.Context, value int64, span trace.Span) { + key := spanLiveKey{sampled: span.SpanContext().IsSampled()} + opts := spanLiveOpts[key] + t.live.Add(ctx, value, opts...) +} + +type parentState int + +const ( + parentStateNoParent parentState = iota + parentStateLocalParent + parentStateRemoteParent +) + +type samplingState int + +const ( + samplingStateDrop samplingState = iota + samplingStateRecordOnly + samplingStateRecordAndSample +) + +type spanStartedKey struct { + parent parentState + sampling samplingState +} + +var spanStartedOpts = map[spanStartedKey][]metric.AddOption{ + { + parentStateNoParent, + samplingStateDrop, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), + )), + }, + { + parentStateLocalParent, + samplingStateDrop, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), + )), + }, + { + parentStateRemoteParent, + samplingStateDrop, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), + )), + }, + + { + parentStateNoParent, + samplingStateRecordOnly, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), + )), + }, + { + parentStateLocalParent, + samplingStateRecordOnly, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), + )), + }, + { + parentStateRemoteParent, + samplingStateRecordOnly, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), + )), + }, + + { + parentStateNoParent, + samplingStateRecordAndSample, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), + )), + }, + { + parentStateLocalParent, + samplingStateRecordAndSample, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), + )), + }, + { + parentStateRemoteParent, + samplingStateRecordAndSample, + }: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), + otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), + )), + }, +} + +type spanLiveKey struct { + sampled bool +} + +var spanLiveOpts = map[spanLiveKey][]metric.AddOption{ + {true}: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanLive{}.AttrSpanSamplingResult( + otelconv.SpanSamplingResultRecordAndSample, + ), + )), + }, + {false}: { + metric.WithAttributeSet(attribute.NewSet( + otelconv.SDKSpanLive{}.AttrSpanSamplingResult( + otelconv.SpanSamplingResultRecordOnly, + ), + )), + }, +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go index 37ce2ac876a..d2cf4ebd3e7 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go @@ -5,29 +5,21 @@ package trace // import "go.opentelemetry.io/otel/sdk/trace" import ( "context" - "errors" "fmt" "sync" "sync/atomic" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk" "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/resource" - "go.opentelemetry.io/otel/sdk/trace/internal/x" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" + "go.opentelemetry.io/otel/sdk/trace/internal/observ" "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" - selfObsScopeName = "go.opentelemetry.io/otel/sdk/trace" -) +const defaultTracerName = "go.opentelemetry.io/otel/sdk/tracer" // tracerProviderConfig. type tracerProviderConfig struct { @@ -163,19 +155,16 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T t, ok := p.namedTracer[is] if !ok { t = &tracer{ - provider: p, - instrumentationScope: is, - selfObservabilityEnabled: x.SelfObservability.Enabled(), + provider: p, + instrumentationScope: is, } - if t.selfObservabilityEnabled { - var err error - t.spanLiveMetric, t.spanStartedMetric, err = newInst() - if err != nil { - msg := "failed to create self-observability metrics for tracer: %w" - err := fmt.Errorf(msg, err) - otel.Handle(err) - } + + var err error + t.inst, err = observ.NewTracer() + if err != nil { + otel.Handle(err) } + p.namedTracer[is] = t } return t, ok @@ -201,23 +190,6 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T return t } -func newInst() (otelconv.SDKSpanLive, otelconv.SDKSpanStarted, error) { - m := otel.GetMeterProvider().Meter( - selfObsScopeName, - metric.WithInstrumentationVersion(sdk.Version()), - metric.WithSchemaURL(semconv.SchemaURL), - ) - - var err error - spanLiveMetric, e := otelconv.NewSDKSpanLive(m) - err = errors.Join(err, e) - - spanStartedMetric, e := otelconv.NewSDKSpanStarted(m) - err = errors.Join(err, e) - - return spanLiveMetric, spanStartedMetric, err -} - // RegisterSpanProcessor adds the given SpanProcessor to the list of SpanProcessors. func (p *TracerProvider) RegisterSpanProcessor(sp SpanProcessor) { // This check prevents calls during a shutdown. diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go index 689663d48b2..81c5060ad66 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go @@ -280,3 +280,31 @@ func (pb parentBased) Description() string { pb.config.localParentNotSampled.Description(), ) } + +// AlwaysRecord returns a sampler decorator which ensures that every span +// is passed to the SpanProcessor, even those that would be normally dropped. +// It converts `Drop` decisions from the root sampler into `RecordOnly` decisions, +// allowing processors to see all spans without sending them to exporters. This is +// typically used to enable accurate span-to-metrics processing. +func AlwaysRecord(root Sampler) Sampler { + return alwaysRecord{root} +} + +type alwaysRecord struct { + root Sampler +} + +func (ar alwaysRecord) ShouldSample(p SamplingParameters) SamplingResult { + rootSamplerSamplingResult := ar.root.ShouldSample(p) + if rootSamplerSamplingResult.Decision == Drop { + return SamplingResult{ + Decision: RecordOnly, + Tracestate: trace.SpanContextFromContext(p.ParentContext).TraceState(), + } + } + return rootSamplerSamplingResult +} + +func (ar alwaysRecord) Description() string { + return "AlwaysRecord{root:" + ar.root.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 index 411d9ccdd78..771e427a4c5 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go @@ -6,9 +6,12 @@ package trace // import "go.opentelemetry.io/otel/sdk/trace" import ( "context" "sync" + "sync/atomic" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/internal/global" + "go.opentelemetry.io/otel/sdk/trace/internal/observ" + "go.opentelemetry.io/otel/trace" ) // simpleSpanProcessor is a SpanProcessor that synchronously sends all @@ -17,6 +20,8 @@ type simpleSpanProcessor struct { exporterMu sync.Mutex exporter SpanExporter stopOnce sync.Once + + inst *observ.SSP } var _ SpanProcessor = (*simpleSpanProcessor)(nil) @@ -33,11 +38,26 @@ func NewSimpleSpanProcessor(exporter SpanExporter) SpanProcessor { ssp := &simpleSpanProcessor{ exporter: exporter, } + + var err error + ssp.inst, err = observ.NewSSP(nextSimpleProcessorID()) + if err != nil { + otel.Handle(err) + } + global.Warn("SimpleSpanProcessor is not recommended for production use, consider using BatchSpanProcessor instead.") return ssp } +var simpleProcessorIDCounter atomic.Int64 + +// nextSimpleProcessorID returns an identifier for this simple span processor, +// starting with 0 and incrementing by 1 each time it is called. +func nextSimpleProcessorID() int64 { + return simpleProcessorIDCounter.Add(1) - 1 +} + // OnStart does nothing. func (*simpleSpanProcessor) OnStart(context.Context, ReadWriteSpan) {} @@ -46,11 +66,20 @@ func (ssp *simpleSpanProcessor) OnEnd(s ReadOnlySpan) { ssp.exporterMu.Lock() defer ssp.exporterMu.Unlock() + var err error if ssp.exporter != nil && s.SpanContext().TraceFlags().IsSampled() { - if err := ssp.exporter.ExportSpans(context.Background(), []ReadOnlySpan{s}); err != nil { + err = ssp.exporter.ExportSpans(context.Background(), []ReadOnlySpan{s}) + if err != nil { otel.Handle(err) } } + + if ssp.inst != nil { + // Add the span to the context to ensure the metric is recorded + // with the correct span context. + ctx := trace.ContextWithSpanContext(context.Background(), s.SpanContext()) + ssp.inst.SpanProcessed(ctx, err) + } } // Shutdown shuts down the exporter this SimpleSpanProcessor exports to. diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go index b376051fbb8..d4666105916 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go @@ -20,7 +20,7 @@ import ( "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.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/embedded" ) @@ -151,6 +151,12 @@ type recordingSpan struct { // tracer is the SDK tracer that created this span. tracer *tracer + + // origCtx is the context used when starting this span that has the + // recordingSpan instance set as the active span. If not nil, it is used + // when ending the span to ensure any metrics are recorded with a context + // containing this span without requiring an additional allocation. + origCtx context.Context } var ( @@ -158,6 +164,10 @@ var ( _ runtimeTracer = (*recordingSpan)(nil) ) +func (s *recordingSpan) setOrigCtx(ctx context.Context) { + s.origCtx = ctx +} + // SpanContext returns the SpanContext of this span. func (s *recordingSpan) SpanContext() trace.SpanContext { if s == nil { @@ -496,14 +506,15 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) { } s.mu.Unlock() - if s.tracer.selfObservabilityEnabled { - defer func() { - // Add the span to the context to ensure the metric is recorded - // with the correct span context. - ctx := trace.ContextWithSpan(context.Background(), s) - set := spanLiveSet(s.spanContext.IsSampled()) - s.tracer.spanLiveMetric.AddSet(ctx, -1, set) - }() + if s.tracer.inst.Enabled() { + ctx := s.origCtx + if ctx == nil { + // This should not happen as the origCtx should be set, but + // ensure trace information is propagated in the case of an + // error. + ctx = trace.ContextWithSpan(context.Background(), s) + } + defer s.tracer.inst.SpanEnded(ctx, s) } sps := s.tracer.provider.getSpanProcessors() diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go index bec5e209787..321d9743058 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go @@ -3,7 +3,7 @@ package trace // import "go.opentelemetry.io/otel/sdk/trace" -import "go.opentelemetry.io/otel/sdk/internal/env" +import "go.opentelemetry.io/otel/sdk/trace/internal/env" const ( // DefaultAttributeValueLengthLimit is the default maximum allowed diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go index e965c4cce86..e1d08fd4d8d 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go @@ -7,9 +7,8 @@ import ( "context" "time" - "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" + "go.opentelemetry.io/otel/sdk/trace/internal/observ" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/embedded" ) @@ -20,9 +19,7 @@ type tracer struct { provider *TracerProvider instrumentationScope instrumentation.Scope - selfObservabilityEnabled bool - spanLiveMetric otelconv.SDKSpanLive - spanStartedMetric otelconv.SDKSpanStarted + inst observ.Tracer } var _ trace.Tracer = &tracer{} @@ -53,10 +50,17 @@ func (tr *tracer) Start( s := tr.newSpan(ctx, name, &config) newCtx := trace.ContextWithSpan(ctx, s) - if tr.selfObservabilityEnabled { + if tr.inst.Enabled() { + if o, ok := s.(interface{ setOrigCtx(context.Context) }); ok { + // If this is a recording span, store the original context. + // This allows later retrieval of baggage and other information + // that may have been stored in the context at span start time and + // to avoid the allocation of repeatedly calling + // trace.ContextWithSpan. + o.setOrigCtx(newCtx) + } psc := trace.SpanContextFromContext(ctx) - set := spanStartedSet(psc, s) - tr.spanStartedMetric.AddSet(newCtx, 1, set) + tr.inst.SpanStarted(newCtx, psc, s) } if rw, ok := s.(ReadWriteSpan); ok && s.IsRecording() { @@ -168,12 +172,11 @@ func (tr *tracer) newRecordingSpan( s.SetAttributes(sr.Attributes...) s.SetAttributes(config.Attributes()...) - if tr.selfObservabilityEnabled { + if tr.inst.Enabled() { // Propagate any existing values from the context with the new span to // the measurement context. ctx = trace.ContextWithSpan(ctx, s) - set := spanLiveSet(s.spanContext.IsSampled()) - tr.spanLiveMetric.AddSet(ctx, 1, set) + tr.inst.SpanLive(ctx, s) } return s @@ -183,112 +186,3 @@ func (tr *tracer) newRecordingSpan( func (tr *tracer) newNonRecordingSpan(sc trace.SpanContext) nonRecordingSpan { return nonRecordingSpan{tracer: tr, sc: sc} } - -type parentState int - -const ( - parentStateNoParent parentState = iota - parentStateLocalParent - parentStateRemoteParent -) - -type samplingState int - -const ( - samplingStateDrop samplingState = iota - samplingStateRecordOnly - samplingStateRecordAndSample -) - -type spanStartedSetKey struct { - parent parentState - sampling samplingState -} - -var spanStartedSetCache = map[spanStartedSetKey]attribute.Set{ - {parentStateNoParent, samplingStateDrop}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), - ), - {parentStateLocalParent, samplingStateDrop}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), - ), - {parentStateRemoteParent, samplingStateDrop}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), - ), - - {parentStateNoParent, samplingStateRecordOnly}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), - ), - {parentStateLocalParent, samplingStateRecordOnly}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), - ), - {parentStateRemoteParent, samplingStateRecordOnly}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), - ), - - {parentStateNoParent, samplingStateRecordAndSample}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), - ), - {parentStateLocalParent, samplingStateRecordAndSample}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), - ), - {parentStateRemoteParent, samplingStateRecordAndSample}: attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), - ), -} - -func spanStartedSet(psc trace.SpanContext, span trace.Span) attribute.Set { - key := spanStartedSetKey{ - parent: parentStateNoParent, - sampling: samplingStateDrop, - } - - if psc.IsValid() { - if psc.IsRemote() { - key.parent = parentStateRemoteParent - } else { - key.parent = parentStateLocalParent - } - } - - if span.IsRecording() { - if span.SpanContext().IsSampled() { - key.sampling = samplingStateRecordAndSample - } else { - key.sampling = samplingStateRecordOnly - } - } - - return spanStartedSetCache[key] -} - -type spanLiveSetKey struct { - sampled bool -} - -var spanLiveSetCache = map[spanLiveSetKey]attribute.Set{ - {true}: attribute.NewSet( - otelconv.SDKSpanLive{}.AttrSpanSamplingResult( - otelconv.SpanSamplingResultRecordAndSample, - ), - ), - {false}: attribute.NewSet( - otelconv.SDKSpanLive{}.AttrSpanSamplingResult( - otelconv.SpanSamplingResultRecordOnly, - ), - ), -} - -func spanLiveSet(sampled bool) attribute.Set { - key := spanLiveSetKey{sampled: sampled} - return spanLiveSetCache[key] -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go index 7f97cc31e51..b5497c2816b 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/version.go +++ b/vendor/go.opentelemetry.io/otel/sdk/version.go @@ -6,5 +6,5 @@ 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.38.0" + return "1.40.0" } diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md deleted file mode 100644 index 82e1f46b4ea..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Semconv v1.20.0 - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.20.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.20.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go deleted file mode 100644 index 6685c392b50..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go +++ /dev/null @@ -1,1198 +0,0 @@ -// 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.20.0" - -import "go.opentelemetry.io/otel/attribute" - -// Describes HTTP attributes. -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") -) - -// 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) -} - -// HTTP Server spans attributes -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") - - // 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: 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](/specification/trace/semantic_conventions/http.md#http-server-definitions) - // if there is one. - HTTPRouteKey = attribute.Key("http.route") -) - -// 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) -} - -// 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) -} - -// 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) -} - -// 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") - - // NetProtocolNameKey is the attribute Key conforming to the - // "net.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' - NetProtocolNameKey = attribute.Key("net.protocol.name") - - // NetProtocolVersionKey is the attribute Key conforming to the - // "net.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.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`. - NetProtocolVersionKey = attribute.Key("net.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: ConditionallyRequired (If defined for the address - // family and if different than `net.host.port` and if `net.sock.host.addr` - // is set. In other cases, it is still recommended to set this.) - // Stability: stable - // Examples: 35555 - NetSockHostPortKey = attribute.Key("net.sock.host.port") -) - -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") -) - -// NetProtocolName returns an attribute KeyValue conforming to the -// "net.protocol.name" semantic conventions. It represents the application -// layer protocol used. The value SHOULD be normalized to lowercase. -func NetProtocolName(val string) attribute.KeyValue { - return NetProtocolNameKey.String(val) -} - -// NetProtocolVersion returns an attribute KeyValue conforming to the -// "net.protocol.version" semantic conventions. It represents the version of -// the application layer protocol used. See note below. -func NetProtocolVersion(val string) attribute.KeyValue { - return NetProtocolVersionKey.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) -} - -// These attributes may be used for any network related operation. -const ( - // 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 ( - // 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") -) - -// 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) -} - -// Semantic conventions for HTTP client and server Spans. -const ( - // 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") -) - -// 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 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") - - // 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") -) - -// 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") - - // 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") -) - -// 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) -} - -// 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) -} - -// Describes user-agent attributes. -const ( - // 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' - UserAgentOriginalKey = attribute.Key("user_agent.original") -) - -// 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) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go deleted file mode 100644 index 63776393217..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go +++ /dev/null @@ -1,188 +0,0 @@ -// 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.20.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.20.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go deleted file mode 100644 index 9c1840631b6..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -// HTTP scheme attributes. -var ( - HTTPSchemeHTTP = HTTPSchemeKey.String("http") - HTTPSchemeHTTPS = HTTPSchemeKey.String("https") -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go deleted file mode 100644 index 3d44dae2750..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go +++ /dev/null @@ -1,2060 +0,0 @@ -// 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.20.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") - - // 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) -} - -// 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://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/en-us/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: stable - // 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/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. - CloudResourceIDKey = attribute.Key("cloud.resource_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: 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") - // Heroku Platform as a Service - CloudProviderHeroku = CloudProviderKey.String("heroku") - // 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 - 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") -) - -// 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) -} - -// 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/en-us/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) -} - -// 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) -} - -// Heroku dyno metadata -const ( - // 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: stable - // Examples: '2022-10-23T18:00:42Z' - HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") - - // 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: stable - // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' - HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") - - // 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: stable - // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' - HerokuAppIDKey = attribute.Key("heroku.app.id") -) - -// 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) -} - -// 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) -} - -// 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) -} - -// 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 `cloud.resource_id` attribute). - FaaSNameKey = attribute.Key("faas.name") - - // 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 converted to Bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // 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") -) - -// 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) -} - -// 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 converted to Bytes. -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 - // 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: 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 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) -} - -// 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") -) - -// 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) -} - -// A service instance. -const ( - // 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: 'my-k8s-pod-deployment-1', - // '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") -) - -// 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: Required - // 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: Required - // 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: Required - // Stability: stable - // Examples: '1.2.3' - TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.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) -} - -// The telemetry SDK used to capture data recorded by the instrumentation -// libraries. -const ( - // 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") -) - -// 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.20.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go deleted file mode 100644 index 90b1b0452cc..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go +++ /dev/null @@ -1,2599 +0,0 @@ -// 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.20.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) -} - -// The attributes described in this section are rather generic. They may be -// used in any Log Record they apply to. -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: stable - // 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) -} - -// 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 `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 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: Recommended (Should be collected by default only if - // there is sanitization that excludes sensitive information.) - // Stability: stable - // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' - 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") - // 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") -) - -// 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) -} - -// Call-level attributes for 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: stable - // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' - DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") - - // DBCosmosDBOperationTypeKey is the attribute Key conforming to the - // "db.cosmosdb.operation_type" semantic conventions. It represents the - // cosmosDB Operation Type. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (when performing one of the - // operations in this list) - // Stability: stable - DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") - - // DBCosmosDBConnectionModeKey is the attribute Key conforming to the - // "db.cosmosdb.connection_mode" semantic conventions. It represents the - // cosmos client connection mode. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as - // default)) - // Stability: stable - DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") - - // DBCosmosDBContainerKey is the attribute Key conforming to the - // "db.cosmosdb.container" semantic conventions. It represents the cosmos - // DB container name. - // - // Type: string - // RequirementLevel: ConditionallyRequired (if available) - // Stability: stable - // Examples: 'anystring' - DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") - - // 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: stable - 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: ConditionallyRequired (if response was received) - // Stability: stable - // 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: ConditionallyRequired (when response was received and - // contained sub-code.) - // Stability: stable - // Examples: 1000, 1002 - DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") - - // 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: ConditionallyRequired (when available) - // Stability: stable - // Examples: 46.18, 1.0 - DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") -) - -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") -) - -var ( - // Gateway (HTTP) connections mode - DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") - // Direct connection - DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") -) - -// 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) -} - -// DBCosmosDBContainer returns an attribute KeyValue conforming to the -// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB -// container name. -func DBCosmosDBContainer(val string) attribute.KeyValue { - return DBCosmosDBContainerKey.String(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) -} - -// 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) -} - -// 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 invocation. - // - // 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") - - // 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: stable - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - FaaSInvocationIDKey = attribute.Key("faas.invocation_id") -) - -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") -) - -// 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) -} - -// 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) -} - -// 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 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 ( - // 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: '/users/12314/?q=ddds' - HTTPTargetKey = attribute.Key("http.target") - - // 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") -) - -// 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) -} - -// 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) -} - -// The `aws` conventions apply to operations using the AWS SDK. They map -// request or response parameters in AWS SDK API calls to attributes on a Span. -// The conventions have been collected over time based on feedback from AWS -// users of tracing and will continue to evolve as new interesting conventions -// are found. -// Some descriptions are also provided for populating general OpenTelemetry -// semantic conventions based on these APIs. -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: stable - // 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 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) -} - -// Attributes that exist for S3 request types. -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: stable - // 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") - - // 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: stable - // 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") - - // 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: stable - // 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") - - // 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: stable - // 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") - - // 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: stable - // 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") - - // 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: stable - // 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") -) - -// 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) -} - -// 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) -} - -// 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) -} - -// 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) -} - -// 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) -} - -// 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) -} - -// 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) -} - -// 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) -} - -// 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") - // Connect RPC - RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") -) - -// 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) -} - -// Tech-specific attributes for Connect RPC. -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: ConditionallyRequired (If response is not successful - // and if error code available.) - // Stability: stable - RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") -) - -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") -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go index 666bded4baf..267979c051d 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go @@ -4,28 +4,53 @@ package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0" import ( - "fmt" "reflect" "go.opentelemetry.io/otel/attribute" ) // ErrorType returns an [attribute.KeyValue] identifying the error type of err. +// +// If err is nil, the returned attribute has the default value +// [ErrorTypeOther]. +// +// If err's type has the method +// +// ErrorType() string +// +// then the returned attribute has the value of err.ErrorType(). Otherwise, the +// returned attribute has a value derived from the concrete type of err. +// +// The key of the returned attribute is [ErrorTypeKey]. func ErrorType(err error) attribute.KeyValue { if err == nil { return ErrorTypeOther } - t := reflect.TypeOf(err) - var value string - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - value = t.String() - } else { - value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) + + return ErrorTypeKey.String(errorType(err)) +} + +func errorType(err error) string { + var s string + if et, ok := err.(interface{ ErrorType() string }); ok { + // Prioritize the ErrorType method if available. + s = et.ErrorType() } + if s == "" { + // Fallback to reflection if the ErrorType method is not supported or + // returns an empty value. - if value == "" { - return ErrorTypeOther + t := reflect.TypeOf(err) + pkg, name := t.PkgPath(), t.Name() + if pkg != "" && name != "" { + s = pkg + "." + name + } else { + // The type has no package path or name (predeclared, not-defined, + // or alias for a not-defined type). + // + // This is not guaranteed to be unique, but is a best effort. + s = t.String() + } } - return ErrorTypeKey.String(value) + return s } diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/httpconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/httpconv/metric.go new file mode 100644 index 00000000000..a0ddf652d34 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/httpconv/metric.go @@ -0,0 +1,1728 @@ +// Code generated from semantic convention specification. DO NOT EDIT. + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package httpconv provides types and functionality for OpenTelemetry semantic +// conventions in the "http" namespace. +package httpconv + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" +) + +var ( + addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }} + recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }} +) + +// ErrorTypeAttr is an attribute conforming to the error.type semantic +// conventions. It represents the describes a class of error the operation ended +// with. +type ErrorTypeAttr string + +var ( + // ErrorTypeOther is a fallback error value to be used when the instrumentation + // doesn't define a custom value. + ErrorTypeOther ErrorTypeAttr = "_OTHER" +) + +// ConnectionStateAttr is an attribute conforming to the http.connection.state +// semantic conventions. It represents the state of the HTTP connection in the +// HTTP connection pool. +type ConnectionStateAttr string + +var ( + // ConnectionStateActive is the active state. + ConnectionStateActive ConnectionStateAttr = "active" + // ConnectionStateIdle is the idle state. + ConnectionStateIdle ConnectionStateAttr = "idle" +) + +// RequestMethodAttr is an attribute conforming to the http.request.method +// semantic conventions. It represents the HTTP request method. +type RequestMethodAttr string + +var ( + // RequestMethodConnect is the CONNECT method. + RequestMethodConnect RequestMethodAttr = "CONNECT" + // RequestMethodDelete is the DELETE method. + RequestMethodDelete RequestMethodAttr = "DELETE" + // RequestMethodGet is the GET method. + RequestMethodGet RequestMethodAttr = "GET" + // RequestMethodHead is the HEAD method. + RequestMethodHead RequestMethodAttr = "HEAD" + // RequestMethodOptions is the OPTIONS method. + RequestMethodOptions RequestMethodAttr = "OPTIONS" + // RequestMethodPatch is the PATCH method. + RequestMethodPatch RequestMethodAttr = "PATCH" + // RequestMethodPost is the POST method. + RequestMethodPost RequestMethodAttr = "POST" + // RequestMethodPut is the PUT method. + RequestMethodPut RequestMethodAttr = "PUT" + // RequestMethodTrace is the TRACE method. + RequestMethodTrace RequestMethodAttr = "TRACE" + // RequestMethodOther is the any HTTP method that the instrumentation has no + // prior knowledge of. + RequestMethodOther RequestMethodAttr = "_OTHER" +) + +// UserAgentSyntheticTypeAttr is an attribute conforming to the +// user_agent.synthetic.type semantic conventions. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +type UserAgentSyntheticTypeAttr string + +var ( + // UserAgentSyntheticTypeBot is the bot source. + UserAgentSyntheticTypeBot UserAgentSyntheticTypeAttr = "bot" + // UserAgentSyntheticTypeTest is the synthetic test source. + UserAgentSyntheticTypeTest UserAgentSyntheticTypeAttr = "test" +) + +// ClientActiveRequests is an instrument used to record metric values conforming +// to the "http.client.active_requests" semantic conventions. It represents the +// number of active HTTP requests. +type ClientActiveRequests struct { + metric.Int64UpDownCounter +} + +var newClientActiveRequestsOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("Number of active HTTP requests."), + metric.WithUnit("{request}"), +} + +// NewClientActiveRequests returns a new ClientActiveRequests instrument. +func NewClientActiveRequests( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (ClientActiveRequests, error) { + // Check if the meter is nil. + if m == nil { + return ClientActiveRequests{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newClientActiveRequestsOpts + } else { + opt = append(opt, newClientActiveRequestsOpts...) + } + + i, err := m.Int64UpDownCounter( + "http.client.active_requests", + opt..., + ) + if err != nil { + return ClientActiveRequests{noop.Int64UpDownCounter{}}, err + } + return ClientActiveRequests{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientActiveRequests) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (ClientActiveRequests) Name() string { + return "http.client.active_requests" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientActiveRequests) Unit() string { + return "{request}" +} + +// Description returns the semantic convention description of the instrument +func (ClientActiveRequests) Description() string { + return "Number of active HTTP requests." +} + +// Add adds incr to the existing count for attrs. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the server port number. +// +// All additional attrs passed are included in the recorded value. +func (m ClientActiveRequests) Add( + ctx context.Context, + incr int64, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +func (m ClientActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientActiveRequests) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// AttrRequestMethod returns an optional attribute for the "http.request.method" +// semantic convention. It represents the HTTP request method. +func (ClientActiveRequests) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue { + return attribute.String("http.request.method", string(val)) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientActiveRequests) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientConnectionDuration is an instrument used to record metric values +// conforming to the "http.client.connection.duration" semantic conventions. It +// represents the duration of the successfully established outbound HTTP +// connections. +type ClientConnectionDuration struct { + metric.Float64Histogram +} + +var newClientConnectionDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("The duration of the successfully established outbound HTTP connections."), + metric.WithUnit("s"), +} + +// NewClientConnectionDuration returns a new ClientConnectionDuration instrument. +func NewClientConnectionDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ClientConnectionDuration, error) { + // Check if the meter is nil. + if m == nil { + return ClientConnectionDuration{noop.Float64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newClientConnectionDurationOpts + } else { + opt = append(opt, newClientConnectionDurationOpts...) + } + + i, err := m.Float64Histogram( + "http.client.connection.duration", + opt..., + ) + if err != nil { + return ClientConnectionDuration{noop.Float64Histogram{}}, err + } + return ClientConnectionDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientConnectionDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientConnectionDuration) Name() string { + return "http.client.connection.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientConnectionDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (ClientConnectionDuration) Description() string { + return "The duration of the successfully established outbound HTTP connections." +} + +// Record records val to the current distribution for attrs. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the server port number. +// +// All additional attrs passed are included in the recorded value. +func (m ClientConnectionDuration) Record( + ctx context.Context, + val float64, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +func (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { + if set.Len() == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrNetworkPeerAddress returns an optional attribute for the +// "network.peer.address" semantic convention. It represents the peer address of +// the network connection - IP address or Unix domain socket name. +func (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue { + return attribute.String("network.peer.address", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientConnectionDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientConnectionDuration) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientOpenConnections is an instrument used to record metric values 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. +type ClientOpenConnections struct { + metric.Int64UpDownCounter +} + +var newClientOpenConnectionsOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("Number of outbound HTTP connections that are currently active or idle on the client."), + metric.WithUnit("{connection}"), +} + +// NewClientOpenConnections returns a new ClientOpenConnections instrument. +func NewClientOpenConnections( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (ClientOpenConnections, error) { + // Check if the meter is nil. + if m == nil { + return ClientOpenConnections{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newClientOpenConnectionsOpts + } else { + opt = append(opt, newClientOpenConnectionsOpts...) + } + + i, err := m.Int64UpDownCounter( + "http.client.open_connections", + opt..., + ) + if err != nil { + return ClientOpenConnections{noop.Int64UpDownCounter{}}, err + } + return ClientOpenConnections{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientOpenConnections) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (ClientOpenConnections) Name() string { + return "http.client.open_connections" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientOpenConnections) Unit() string { + return "{connection}" +} + +// Description returns the semantic convention description of the instrument +func (ClientOpenConnections) Description() string { + return "Number of outbound HTTP connections that are currently active or idle on the client." +} + +// Add adds incr to the existing count for attrs. +// +// The connectionState is the state of the HTTP connection in the HTTP connection +// pool. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the server port number. +// +// All additional attrs passed are included in the recorded value. +func (m ClientOpenConnections) Add( + ctx context.Context, + incr int64, + connectionState ConnectionStateAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.connection.state", string(connectionState)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +func (m ClientOpenConnections) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrNetworkPeerAddress returns an optional attribute for the +// "network.peer.address" semantic convention. It represents the peer address of +// the network connection - IP address or Unix domain socket name. +func (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue { + return attribute.String("network.peer.address", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientOpenConnections) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientOpenConnections) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientRequestBodySize is an instrument used to record metric values conforming +// to the "http.client.request.body.size" semantic conventions. It represents the +// size of HTTP client request bodies. +type ClientRequestBodySize struct { + metric.Int64Histogram +} + +var newClientRequestBodySizeOpts = []metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP client request bodies."), + metric.WithUnit("By"), +} + +// NewClientRequestBodySize returns a new ClientRequestBodySize instrument. +func NewClientRequestBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientRequestBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ClientRequestBodySize{noop.Int64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newClientRequestBodySizeOpts + } else { + opt = append(opt, newClientRequestBodySizeOpts...) + } + + i, err := m.Int64Histogram( + "http.client.request.body.size", + opt..., + ) + if err != nil { + return ClientRequestBodySize{noop.Int64Histogram{}}, err + } + return ClientRequestBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientRequestBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientRequestBodySize) Name() string { + return "http.client.request.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientRequestBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ClientRequestBodySize) Description() string { + return "Size of HTTP client request bodies." +} + +// Record records val to the current distribution for attrs. +// +// The requestMethod is the HTTP request method. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the server port number. +// +// All additional attrs passed are included in the recorded value. +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ClientRequestBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ClientRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ClientRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ClientRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientRequestBodySize) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientRequestBodySize) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientRequestDuration is an instrument used to record metric values conforming +// to the "http.client.request.duration" semantic conventions. It represents the +// duration of HTTP client requests. +type ClientRequestDuration struct { + metric.Float64Histogram +} + +var newClientRequestDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("Duration of HTTP client requests."), + metric.WithUnit("s"), +} + +// NewClientRequestDuration returns a new ClientRequestDuration instrument. +func NewClientRequestDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ClientRequestDuration, error) { + // Check if the meter is nil. + if m == nil { + return ClientRequestDuration{noop.Float64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newClientRequestDurationOpts + } else { + opt = append(opt, newClientRequestDurationOpts...) + } + + i, err := m.Float64Histogram( + "http.client.request.duration", + opt..., + ) + if err != nil { + return ClientRequestDuration{noop.Float64Histogram{}}, err + } + return ClientRequestDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientRequestDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientRequestDuration) Name() string { + return "http.client.request.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientRequestDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (ClientRequestDuration) Description() string { + return "Duration of HTTP client requests." +} + +// Record records val to the current distribution for attrs. +// +// The requestMethod is the HTTP request method. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the server port number. +// +// All additional attrs passed are included in the recorded value. +func (m ClientRequestDuration) Record( + ctx context.Context, + val float64, + requestMethod RequestMethodAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +func (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { + if set.Len() == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ClientRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ClientRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ClientRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientRequestDuration) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientRequestDuration) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// ClientResponseBodySize is an instrument used to record metric values +// conforming to the "http.client.response.body.size" semantic conventions. It +// represents the size of HTTP client response bodies. +type ClientResponseBodySize struct { + metric.Int64Histogram +} + +var newClientResponseBodySizeOpts = []metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP client response bodies."), + metric.WithUnit("By"), +} + +// NewClientResponseBodySize returns a new ClientResponseBodySize instrument. +func NewClientResponseBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientResponseBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ClientResponseBodySize{noop.Int64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newClientResponseBodySizeOpts + } else { + opt = append(opt, newClientResponseBodySizeOpts...) + } + + i, err := m.Int64Histogram( + "http.client.response.body.size", + opt..., + ) + if err != nil { + return ClientResponseBodySize{noop.Int64Histogram{}}, err + } + return ClientResponseBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientResponseBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientResponseBodySize) Name() string { + return "http.client.response.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientResponseBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ClientResponseBodySize) Description() string { + return "Size of HTTP client response bodies." +} + +// Record records val to the current distribution for attrs. +// +// The requestMethod is the HTTP request method. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the server port number. +// +// All additional attrs passed are included in the recorded value. +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ClientResponseBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ClientResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ClientResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ClientResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientResponseBodySize) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientResponseBodySize) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ServerActiveRequests is an instrument used to record metric values conforming +// to the "http.server.active_requests" semantic conventions. It represents the +// number of active HTTP server requests. +type ServerActiveRequests struct { + metric.Int64UpDownCounter +} + +var newServerActiveRequestsOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("Number of active HTTP server requests."), + metric.WithUnit("{request}"), +} + +// NewServerActiveRequests returns a new ServerActiveRequests instrument. +func NewServerActiveRequests( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (ServerActiveRequests, error) { + // Check if the meter is nil. + if m == nil { + return ServerActiveRequests{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newServerActiveRequestsOpts + } else { + opt = append(opt, newServerActiveRequestsOpts...) + } + + i, err := m.Int64UpDownCounter( + "http.server.active_requests", + opt..., + ) + if err != nil { + return ServerActiveRequests{noop.Int64UpDownCounter{}}, err + } + return ServerActiveRequests{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerActiveRequests) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (ServerActiveRequests) Name() string { + return "http.server.active_requests" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerActiveRequests) Unit() string { + return "{request}" +} + +// Description returns the semantic convention description of the instrument +func (ServerActiveRequests) Description() string { + return "Number of active HTTP server requests." +} + +// Add adds incr to the existing count for attrs. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (m ServerActiveRequests) Add( + ctx context.Context, + incr int64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +func (m ServerActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerActiveRequests) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerActiveRequests) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// ServerRequestBodySize is an instrument used to record metric values conforming +// to the "http.server.request.body.size" semantic conventions. It represents the +// size of HTTP server request bodies. +type ServerRequestBodySize struct { + metric.Int64Histogram +} + +var newServerRequestBodySizeOpts = []metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP server request bodies."), + metric.WithUnit("By"), +} + +// NewServerRequestBodySize returns a new ServerRequestBodySize instrument. +func NewServerRequestBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerRequestBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ServerRequestBodySize{noop.Int64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newServerRequestBodySizeOpts + } else { + opt = append(opt, newServerRequestBodySizeOpts...) + } + + i, err := m.Int64Histogram( + "http.server.request.body.size", + opt..., + ) + if err != nil { + return ServerRequestBodySize{noop.Int64Histogram{}}, err + } + return ServerRequestBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerRequestBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerRequestBodySize) Name() string { + return "http.server.request.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerRequestBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ServerRequestBodySize) Description() string { + return "Size of HTTP server request bodies." +} + +// Record records val to the current distribution for attrs. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ServerRequestBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ServerRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ServerRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrRoute returns an optional attribute for the "http.route" semantic +// convention. It represents the matched route, that is, the path template in the +// format used by the respective server framework. +func (ServerRequestBodySize) AttrRoute(val string) attribute.KeyValue { + return attribute.String("http.route", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ServerRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ServerRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerRequestBodySize) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerRequestBodySize) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// AttrUserAgentSyntheticType returns an optional attribute for the +// "user_agent.synthetic.type" semantic convention. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +func (ServerRequestBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue { + return attribute.String("user_agent.synthetic.type", string(val)) +} + +// ServerRequestDuration is an instrument used to record metric values conforming +// to the "http.server.request.duration" semantic conventions. It represents the +// duration of HTTP server requests. +type ServerRequestDuration struct { + metric.Float64Histogram +} + +var newServerRequestDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("Duration of HTTP server requests."), + metric.WithUnit("s"), +} + +// NewServerRequestDuration returns a new ServerRequestDuration instrument. +func NewServerRequestDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ServerRequestDuration, error) { + // Check if the meter is nil. + if m == nil { + return ServerRequestDuration{noop.Float64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newServerRequestDurationOpts + } else { + opt = append(opt, newServerRequestDurationOpts...) + } + + i, err := m.Float64Histogram( + "http.server.request.duration", + opt..., + ) + if err != nil { + return ServerRequestDuration{noop.Float64Histogram{}}, err + } + return ServerRequestDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerRequestDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerRequestDuration) Name() string { + return "http.server.request.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerRequestDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (ServerRequestDuration) Description() string { + return "Duration of HTTP server requests." +} + +// Record records val to the current distribution for attrs. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (m ServerRequestDuration) Record( + ctx context.Context, + val float64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { + if set.Len() == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ServerRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ServerRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrRoute returns an optional attribute for the "http.route" semantic +// convention. It represents the matched route, that is, the path template in the +// format used by the respective server framework. +func (ServerRequestDuration) AttrRoute(val string) attribute.KeyValue { + return attribute.String("http.route", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ServerRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ServerRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerRequestDuration) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerRequestDuration) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// AttrUserAgentSyntheticType returns an optional attribute for the +// "user_agent.synthetic.type" semantic convention. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +func (ServerRequestDuration) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue { + return attribute.String("user_agent.synthetic.type", string(val)) +} + +// ServerResponseBodySize is an instrument used to record metric values +// conforming to the "http.server.response.body.size" semantic conventions. It +// represents the size of HTTP server response bodies. +type ServerResponseBodySize struct { + metric.Int64Histogram +} + +var newServerResponseBodySizeOpts = []metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP server response bodies."), + metric.WithUnit("By"), +} + +// NewServerResponseBodySize returns a new ServerResponseBodySize instrument. +func NewServerResponseBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerResponseBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ServerResponseBodySize{noop.Int64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newServerResponseBodySizeOpts + } else { + opt = append(opt, newServerResponseBodySizeOpts...) + } + + i, err := m.Int64Histogram( + "http.server.response.body.size", + opt..., + ) + if err != nil { + return ServerResponseBodySize{noop.Int64Histogram{}}, err + } + return ServerResponseBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerResponseBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerResponseBodySize) Name() string { + return "http.server.response.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerResponseBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ServerResponseBodySize) Description() string { + return "Size of HTTP server response bodies." +} + +// Record records val to the current distribution for attrs. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ServerResponseBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +// +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ServerResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ServerResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrRoute returns an optional attribute for the "http.route" semantic +// convention. It represents the matched route, that is, the path template in the +// format used by the respective server framework. +func (ServerResponseBodySize) AttrRoute(val string) attribute.KeyValue { + return attribute.String("http.route", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ServerResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ServerResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerResponseBodySize) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerResponseBodySize) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// AttrUserAgentSyntheticType returns an optional attribute for the +// "user_agent.synthetic.type" semantic convention. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +func (ServerResponseBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue { + return attribute.String("user_agent.synthetic.type", string(val)) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go index a78eafd1fa3..fd064530c34 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package otelconv provides types and functionality for OpenTelemetry semantic // conventions in the "otel" namespace. package otelconv @@ -172,6 +172,11 @@ type SDKExporterLogExported struct { metric.Int64Counter } +var newSDKExporterLogExportedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of log records for which the export has finished, either successful or failed."), + metric.WithUnit("{log_record}"), +} + // NewSDKExporterLogExported returns a new SDKExporterLogExported instrument. func NewSDKExporterLogExported( m metric.Meter, @@ -182,15 +187,18 @@ func NewSDKExporterLogExported( return SDKExporterLogExported{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterLogExportedOpts + } else { + opt = append(opt, newSDKExporterLogExportedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.exporter.log.exported", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of log records for which the export has finished, either successful or failed."), - metric.WithUnit("{log_record}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterLogExported{noop.Int64Counter{}}, err + return SDKExporterLogExported{noop.Int64Counter{}}, err } return SDKExporterLogExported{i}, nil } @@ -319,6 +327,11 @@ type SDKExporterLogInflight struct { metric.Int64UpDownCounter } +var newSDKExporterLogInflightOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), + metric.WithUnit("{log_record}"), +} + // NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument. func NewSDKExporterLogInflight( m metric.Meter, @@ -329,15 +342,18 @@ func NewSDKExporterLogInflight( return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterLogInflightOpts + } else { + opt = append(opt, newSDKExporterLogInflightOpts...) + } + i, err := m.Int64UpDownCounter( "otel.sdk.exporter.log.inflight", - append([]metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), - metric.WithUnit("{log_record}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, err + return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, err } return SDKExporterLogInflight{i}, nil } @@ -449,6 +465,11 @@ type SDKExporterMetricDataPointExported struct { metric.Int64Counter } +var newSDKExporterMetricDataPointExportedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."), + metric.WithUnit("{data_point}"), +} + // NewSDKExporterMetricDataPointExported returns a new // SDKExporterMetricDataPointExported instrument. func NewSDKExporterMetricDataPointExported( @@ -460,15 +481,18 @@ func NewSDKExporterMetricDataPointExported( return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterMetricDataPointExportedOpts + } else { + opt = append(opt, newSDKExporterMetricDataPointExportedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.exporter.metric_data_point.exported", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."), - metric.WithUnit("{data_point}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, err + return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, err } return SDKExporterMetricDataPointExported{i}, nil } @@ -598,6 +622,11 @@ type SDKExporterMetricDataPointInflight struct { metric.Int64UpDownCounter } +var newSDKExporterMetricDataPointInflightOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), + metric.WithUnit("{data_point}"), +} + // NewSDKExporterMetricDataPointInflight returns a new // SDKExporterMetricDataPointInflight instrument. func NewSDKExporterMetricDataPointInflight( @@ -609,15 +638,18 @@ func NewSDKExporterMetricDataPointInflight( return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterMetricDataPointInflightOpts + } else { + opt = append(opt, newSDKExporterMetricDataPointInflightOpts...) + } + i, err := m.Int64UpDownCounter( "otel.sdk.exporter.metric_data_point.inflight", - append([]metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), - metric.WithUnit("{data_point}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, err + return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, err } return SDKExporterMetricDataPointInflight{i}, nil } @@ -728,6 +760,11 @@ type SDKExporterOperationDuration struct { metric.Float64Histogram } +var newSDKExporterOperationDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("The duration of exporting a batch of telemetry records."), + metric.WithUnit("s"), +} + // NewSDKExporterOperationDuration returns a new SDKExporterOperationDuration // instrument. func NewSDKExporterOperationDuration( @@ -739,15 +776,18 @@ func NewSDKExporterOperationDuration( return SDKExporterOperationDuration{noop.Float64Histogram{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterOperationDurationOpts + } else { + opt = append(opt, newSDKExporterOperationDurationOpts...) + } + i, err := m.Float64Histogram( "otel.sdk.exporter.operation.duration", - append([]metric.Float64HistogramOption{ - metric.WithDescription("The duration of exporting a batch of telemetry records."), - metric.WithUnit("s"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterOperationDuration{noop.Float64Histogram{}}, err + return SDKExporterOperationDuration{noop.Float64Histogram{}}, err } return SDKExporterOperationDuration{i}, nil } @@ -825,6 +865,7 @@ func (m SDKExporterOperationDuration) Record( func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -893,6 +934,11 @@ type SDKExporterSpanExported struct { metric.Int64Counter } +var newSDKExporterSpanExportedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of spans for which the export has finished, either successful or failed."), + metric.WithUnit("{span}"), +} + // NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument. func NewSDKExporterSpanExported( m metric.Meter, @@ -903,15 +949,18 @@ func NewSDKExporterSpanExported( return SDKExporterSpanExported{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterSpanExportedOpts + } else { + opt = append(opt, newSDKExporterSpanExportedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.exporter.span.exported", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of spans for which the export has finished, either successful or failed."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterSpanExported{noop.Int64Counter{}}, err + return SDKExporterSpanExported{noop.Int64Counter{}}, err } return SDKExporterSpanExported{i}, nil } @@ -1040,6 +1089,11 @@ type SDKExporterSpanInflight struct { metric.Int64UpDownCounter } +var newSDKExporterSpanInflightOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), + metric.WithUnit("{span}"), +} + // NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument. func NewSDKExporterSpanInflight( m metric.Meter, @@ -1050,15 +1104,18 @@ func NewSDKExporterSpanInflight( return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKExporterSpanInflightOpts + } else { + opt = append(opt, newSDKExporterSpanInflightOpts...) + } + i, err := m.Int64UpDownCounter( "otel.sdk.exporter.span.inflight", - append([]metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, err + return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, err } return SDKExporterSpanInflight{i}, nil } @@ -1169,6 +1226,11 @@ type SDKLogCreated struct { metric.Int64Counter } +var newSDKLogCreatedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of logs submitted to enabled SDK Loggers."), + metric.WithUnit("{log_record}"), +} + // NewSDKLogCreated returns a new SDKLogCreated instrument. func NewSDKLogCreated( m metric.Meter, @@ -1179,15 +1241,18 @@ func NewSDKLogCreated( return SDKLogCreated{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKLogCreatedOpts + } else { + opt = append(opt, newSDKLogCreatedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.log.created", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of logs submitted to enabled SDK Loggers."), - metric.WithUnit("{log_record}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKLogCreated{noop.Int64Counter{}}, err + return SDKLogCreated{noop.Int64Counter{}}, err } return SDKLogCreated{i}, nil } @@ -1254,6 +1319,11 @@ type SDKMetricReaderCollectionDuration struct { metric.Float64Histogram } +var newSDKMetricReaderCollectionDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("The duration of the collect operation of the metric reader."), + metric.WithUnit("s"), +} + // NewSDKMetricReaderCollectionDuration returns a new // SDKMetricReaderCollectionDuration instrument. func NewSDKMetricReaderCollectionDuration( @@ -1265,15 +1335,18 @@ func NewSDKMetricReaderCollectionDuration( return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, nil } + if len(opt) == 0 { + opt = newSDKMetricReaderCollectionDurationOpts + } else { + opt = append(opt, newSDKMetricReaderCollectionDurationOpts...) + } + i, err := m.Float64Histogram( "otel.sdk.metric_reader.collection.duration", - append([]metric.Float64HistogramOption{ - metric.WithDescription("The duration of the collect operation of the metric reader."), - metric.WithUnit("s"), - }, opt...)..., + opt..., ) if err != nil { - return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, err + return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, err } return SDKMetricReaderCollectionDuration{i}, nil } @@ -1343,6 +1416,7 @@ func (m SDKMetricReaderCollectionDuration) Record( func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1384,6 +1458,11 @@ type SDKProcessorLogProcessed struct { metric.Int64Counter } +var newSDKProcessorLogProcessedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."), + metric.WithUnit("{log_record}"), +} + // NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument. func NewSDKProcessorLogProcessed( m metric.Meter, @@ -1394,15 +1473,18 @@ func NewSDKProcessorLogProcessed( return SDKProcessorLogProcessed{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKProcessorLogProcessedOpts + } else { + opt = append(opt, newSDKProcessorLogProcessedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.processor.log.processed", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."), - metric.WithUnit("{log_record}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKProcessorLogProcessed{noop.Int64Counter{}}, err + return SDKProcessorLogProcessed{noop.Int64Counter{}}, err } return SDKProcessorLogProcessed{i}, nil } @@ -1515,6 +1597,11 @@ type SDKProcessorLogQueueCapacity struct { metric.Int64ObservableUpDownCounter } +var newSDKProcessorLogQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."), + metric.WithUnit("{log_record}"), +} + // NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity // instrument. func NewSDKProcessorLogQueueCapacity( @@ -1526,15 +1613,18 @@ func NewSDKProcessorLogQueueCapacity( return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKProcessorLogQueueCapacityOpts + } else { + opt = append(opt, newSDKProcessorLogQueueCapacityOpts...) + } + i, err := m.Int64ObservableUpDownCounter( "otel.sdk.processor.log.queue.capacity", - append([]metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."), - metric.WithUnit("{log_record}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err + return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err } return SDKProcessorLogQueueCapacity{i}, nil } @@ -1581,6 +1671,11 @@ type SDKProcessorLogQueueSize struct { metric.Int64ObservableUpDownCounter } +var newSDKProcessorLogQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The number of log records in the queue of a given instance of an SDK log processor."), + metric.WithUnit("{log_record}"), +} + // NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument. func NewSDKProcessorLogQueueSize( m metric.Meter, @@ -1591,15 +1686,18 @@ func NewSDKProcessorLogQueueSize( return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKProcessorLogQueueSizeOpts + } else { + opt = append(opt, newSDKProcessorLogQueueSizeOpts...) + } + i, err := m.Int64ObservableUpDownCounter( "otel.sdk.processor.log.queue.size", - append([]metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The number of log records in the queue of a given instance of an SDK log processor."), - metric.WithUnit("{log_record}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, err + return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, err } return SDKProcessorLogQueueSize{i}, nil } @@ -1646,6 +1744,11 @@ type SDKProcessorSpanProcessed struct { metric.Int64Counter } +var newSDKProcessorSpanProcessedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."), + metric.WithUnit("{span}"), +} + // NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessed // instrument. func NewSDKProcessorSpanProcessed( @@ -1657,15 +1760,18 @@ func NewSDKProcessorSpanProcessed( return SDKProcessorSpanProcessed{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKProcessorSpanProcessedOpts + } else { + opt = append(opt, newSDKProcessorSpanProcessedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.processor.span.processed", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKProcessorSpanProcessed{noop.Int64Counter{}}, err + return SDKProcessorSpanProcessed{noop.Int64Counter{}}, err } return SDKProcessorSpanProcessed{i}, nil } @@ -1778,6 +1884,11 @@ type SDKProcessorSpanQueueCapacity struct { metric.Int64ObservableUpDownCounter } +var newSDKProcessorSpanQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The maximum number of spans the queue of a given instance of an SDK span processor can hold."), + metric.WithUnit("{span}"), +} + // NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity // instrument. func NewSDKProcessorSpanQueueCapacity( @@ -1789,15 +1900,18 @@ func NewSDKProcessorSpanQueueCapacity( return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKProcessorSpanQueueCapacityOpts + } else { + opt = append(opt, newSDKProcessorSpanQueueCapacityOpts...) + } + i, err := m.Int64ObservableUpDownCounter( "otel.sdk.processor.span.queue.capacity", - append([]metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The maximum number of spans the queue of a given instance of an SDK span processor can hold."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err + return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err } return SDKProcessorSpanQueueCapacity{i}, nil } @@ -1844,6 +1958,11 @@ type SDKProcessorSpanQueueSize struct { metric.Int64ObservableUpDownCounter } +var newSDKProcessorSpanQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The number of spans in the queue of a given instance of an SDK span processor."), + metric.WithUnit("{span}"), +} + // NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize // instrument. func NewSDKProcessorSpanQueueSize( @@ -1855,15 +1974,18 @@ func NewSDKProcessorSpanQueueSize( return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKProcessorSpanQueueSizeOpts + } else { + opt = append(opt, newSDKProcessorSpanQueueSizeOpts...) + } + i, err := m.Int64ObservableUpDownCounter( "otel.sdk.processor.span.queue.size", - append([]metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The number of spans in the queue of a given instance of an SDK span processor."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, err + return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, err } return SDKProcessorSpanQueueSize{i}, nil } @@ -1910,6 +2032,11 @@ type SDKSpanLive struct { metric.Int64UpDownCounter } +var newSDKSpanLiveOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."), + metric.WithUnit("{span}"), +} + // NewSDKSpanLive returns a new SDKSpanLive instrument. func NewSDKSpanLive( m metric.Meter, @@ -1920,15 +2047,18 @@ func NewSDKSpanLive( return SDKSpanLive{noop.Int64UpDownCounter{}}, nil } + if len(opt) == 0 { + opt = newSDKSpanLiveOpts + } else { + opt = append(opt, newSDKSpanLiveOpts...) + } + i, err := m.Int64UpDownCounter( "otel.sdk.span.live", - append([]metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKSpanLive{noop.Int64UpDownCounter{}}, err + return SDKSpanLive{noop.Int64UpDownCounter{}}, err } return SDKSpanLive{i}, nil } @@ -2013,6 +2143,11 @@ type SDKSpanStarted struct { metric.Int64Counter } +var newSDKSpanStartedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of created spans."), + metric.WithUnit("{span}"), +} + // NewSDKSpanStarted returns a new SDKSpanStarted instrument. func NewSDKSpanStarted( m metric.Meter, @@ -2023,15 +2158,18 @@ func NewSDKSpanStarted( return SDKSpanStarted{noop.Int64Counter{}}, nil } + if len(opt) == 0 { + opt = newSDKSpanStartedOpts + } else { + opt = append(opt, newSDKSpanStartedOpts...) + } + i, err := m.Int64Counter( "otel.sdk.span.started", - append([]metric.Int64CounterOption{ - metric.WithDescription("The number of created spans."), - metric.WithUnit("{span}"), - }, opt...)..., + opt..., ) if err != nil { - return SDKSpanStarted{noop.Int64Counter{}}, err + return SDKSpanStarted{noop.Int64Counter{}}, err } return SDKSpanStarted{i}, nil } @@ -2123,4 +2261,4 @@ func (SDKSpanStarted) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.K // value of the sampler for this span. func (SDKSpanStarted) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue { return attribute.String("otel.span.sampling_result", string(val)) -} \ No newline at end of file +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md new file mode 100644 index 00000000000..fed7013e6ff --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md @@ -0,0 +1,78 @@ + +# Migration from v1.38.0 to v1.39.0 + +The `go.opentelemetry.io/otel/semconv/v1.39.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.38.0` with the following exceptions. + +## Removed + +The following declarations have been removed. +Refer to the [OpenTelemetry Semantic Conventions documentation] for deprecation instructions. + +If the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use. +If you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case. + +- `LinuxMemorySlabStateKey` +- `LinuxMemorySlabStateReclaimable` +- `LinuxMemorySlabStateUnreclaimable` +- `PeerService` +- `PeerServiceKey` +- `RPCConnectRPCErrorCodeAborted` +- `RPCConnectRPCErrorCodeAlreadyExists` +- `RPCConnectRPCErrorCodeCancelled` +- `RPCConnectRPCErrorCodeDataLoss` +- `RPCConnectRPCErrorCodeDeadlineExceeded` +- `RPCConnectRPCErrorCodeFailedPrecondition` +- `RPCConnectRPCErrorCodeInternal` +- `RPCConnectRPCErrorCodeInvalidArgument` +- `RPCConnectRPCErrorCodeKey` +- `RPCConnectRPCErrorCodeNotFound` +- `RPCConnectRPCErrorCodeOutOfRange` +- `RPCConnectRPCErrorCodePermissionDenied` +- `RPCConnectRPCErrorCodeResourceExhausted` +- `RPCConnectRPCErrorCodeUnauthenticated` +- `RPCConnectRPCErrorCodeUnavailable` +- `RPCConnectRPCErrorCodeUnimplemented` +- `RPCConnectRPCErrorCodeUnknown` +- `RPCConnectRPCRequestMetadata` +- `RPCConnectRPCResponseMetadata` +- `RPCGRPCRequestMetadata` +- `RPCGRPCResponseMetadata` +- `RPCGRPCStatusCodeAborted` +- `RPCGRPCStatusCodeAlreadyExists` +- `RPCGRPCStatusCodeCancelled` +- `RPCGRPCStatusCodeDataLoss` +- `RPCGRPCStatusCodeDeadlineExceeded` +- `RPCGRPCStatusCodeFailedPrecondition` +- `RPCGRPCStatusCodeInternal` +- `RPCGRPCStatusCodeInvalidArgument` +- `RPCGRPCStatusCodeKey` +- `RPCGRPCStatusCodeNotFound` +- `RPCGRPCStatusCodeOk` +- `RPCGRPCStatusCodeOutOfRange` +- `RPCGRPCStatusCodePermissionDenied` +- `RPCGRPCStatusCodeResourceExhausted` +- `RPCGRPCStatusCodeUnauthenticated` +- `RPCGRPCStatusCodeUnavailable` +- `RPCGRPCStatusCodeUnimplemented` +- `RPCGRPCStatusCodeUnknown` +- `RPCJSONRPCErrorCode` +- `RPCJSONRPCErrorCodeKey` +- `RPCJSONRPCErrorMessage` +- `RPCJSONRPCErrorMessageKey` +- `RPCJSONRPCRequestID` +- `RPCJSONRPCRequestIDKey` +- `RPCJSONRPCVersion` +- `RPCJSONRPCVersionKey` +- `RPCService` +- `RPCServiceKey` +- `RPCSystemApacheDubbo` +- `RPCSystemConnectRPC` +- `RPCSystemDotnetWcf` +- `RPCSystemGRPC` +- `RPCSystemJSONRPC` +- `RPCSystemJavaRmi` +- `RPCSystemKey` +- `RPCSystemOncRPC` + +[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions +[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md new file mode 100644 index 00000000000..4b0e6f7f3eb --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.39.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.39.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.39.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go new file mode 100644 index 00000000000..080365fc196 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go @@ -0,0 +1,16239 @@ +// 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.39.0" + +import "go.opentelemetry.io/otel/attribute" + +// Namespace: android +const ( + // AndroidAppStateKey is the attribute Key conforming to the "android.app.state" + // semantic conventions. It represents the this attribute represents the state + // of the application. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "created" + // Note: The Android lifecycle states are defined in + // [Activity lifecycle callbacks], and from which the `OS identifiers` are + // derived. + // + // [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc + AndroidAppStateKey = attribute.Key("android.app.state") + + // 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 in the + // [Android API levels documentation]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "33", "32" + // + // [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels + 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 in the +// [Android API levels documentation]. +// +// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels +func AndroidOSAPILevel(val string) attribute.KeyValue { + return AndroidOSAPILevelKey.String(val) +} + +// Enum values for android.app.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. + // + // Stability: development + AndroidAppStateCreated = AndroidAppStateKey.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. + // + // Stability: development + AndroidAppStateBackground = AndroidAppStateKey.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. + // + // Stability: development + AndroidAppStateForeground = AndroidAppStateKey.String("foreground") +) + +// Namespace: app +const ( + // AppBuildIDKey is the attribute Key conforming to the "app.build_id" semantic + // conventions. It represents the unique identifier for a particular build or + // compilation of the application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "6cff0a7e-cefc-4668-96f5-1273d8b334d0", + // "9f2b833506aa6973a92fde9733e6271f", "my-app-1.0.0-code-123" + AppBuildIDKey = attribute.Key("app.build_id") + + // AppInstallationIDKey is the attribute Key conforming to the + // "app.installation.id" semantic conventions. It represents a unique identifier + // representing the installation of an application on a specific device. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092" + // Note: Its value SHOULD persist across launches of the same application + // installation, including through application upgrades. + // It SHOULD change if the application is uninstalled or if all applications of + // the vendor are uninstalled. + // Additionally, users might be able to reset this value (e.g. by clearing + // application data). + // If an app is installed multiple times on the same device (e.g. in different + // accounts on Android), each `app.installation.id` SHOULD have a different + // value. + // If multiple OpenTelemetry SDKs are used within the same application, they + // SHOULD use the same value for `app.installation.id`. + // Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the + // `app.installation.id`. + // + // For iOS, this value SHOULD be equal to the [vendor identifier]. + // + // For Android, examples of `app.installation.id` implementations include: + // + // - [Firebase Installation ID]. + // - A globally unique UUID which is persisted across sessions in your + // application. + // - [App set ID]. + // - [`Settings.getString(Settings.Secure.ANDROID_ID)`]. + // + // More information about Android identifier best practices can be found in the + // [Android user data IDs guide]. + // + // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor + // [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations + // [App set ID]: https://developer.android.com/identity/app-set-id + // [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID + // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids + AppInstallationIDKey = attribute.Key("app.installation.id") + + // AppJankFrameCountKey is the attribute Key conforming to the + // "app.jank.frame_count" semantic conventions. It represents a number of frame + // renders that experienced jank. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 9, 42 + // Note: Depending on platform limitations, the value provided MAY be + // approximation. + AppJankFrameCountKey = attribute.Key("app.jank.frame_count") + + // AppJankPeriodKey is the attribute Key conforming to the "app.jank.period" + // semantic conventions. It represents the time period, in seconds, for which + // this jank is being reported. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1.0, 5.0, 10.24 + AppJankPeriodKey = attribute.Key("app.jank.period") + + // AppJankThresholdKey is the attribute Key conforming to the + // "app.jank.threshold" semantic conventions. It represents the minimum + // rendering threshold for this jank, in seconds. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0.016, 0.7, 1.024 + AppJankThresholdKey = attribute.Key("app.jank.threshold") + + // AppScreenCoordinateXKey is the attribute Key conforming to the + // "app.screen.coordinate.x" semantic conventions. It represents the x + // (horizontal) coordinate of a screen coordinate, in screen pixels. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0, 131 + AppScreenCoordinateXKey = attribute.Key("app.screen.coordinate.x") + + // AppScreenCoordinateYKey is the attribute Key conforming to the + // "app.screen.coordinate.y" semantic conventions. It represents the y + // (vertical) component of a screen coordinate, in screen pixels. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 12, 99 + AppScreenCoordinateYKey = attribute.Key("app.screen.coordinate.y") + + // AppScreenIDKey is the attribute Key conforming to the "app.screen.id" + // semantic conventions. It represents an identifier that uniquely + // differentiates this screen from other screens in the same application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", + // "com.example.app.MainActivity", "com.example.shop.ProductDetailFragment", + // "MyApp.ProfileView", "MyApp.ProfileViewController" + // Note: A screen represents only the part of the device display drawn by the + // app. It typically contains multiple widgets or UI components and is larger in + // scope than individual widgets. Multiple screens can coexist on the same + // display simultaneously (e.g., split view on tablets). + AppScreenIDKey = attribute.Key("app.screen.id") + + // AppScreenNameKey is the attribute Key conforming to the "app.screen.name" + // semantic conventions. It represents the name of an application screen. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "MainActivity", "ProductDetailFragment", "ProfileView", + // "ProfileViewController" + // Note: A screen represents only the part of the device display drawn by the + // app. It typically contains multiple widgets or UI components and is larger in + // scope than individual widgets. Multiple screens can coexist on the same + // display simultaneously (e.g., split view on tablets). + AppScreenNameKey = attribute.Key("app.screen.name") + + // AppWidgetIDKey is the attribute Key conforming to the "app.widget.id" + // semantic conventions. It represents an identifier that uniquely + // differentiates this widget from other widgets in the same application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829" + // Note: A widget is an application component, typically an on-screen visual GUI + // element. + AppWidgetIDKey = attribute.Key("app.widget.id") + + // AppWidgetNameKey is the attribute Key conforming to the "app.widget.name" + // semantic conventions. It represents the name of an application widget. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "submit", "attack", "Clear Cart" + // Note: A widget is an application component, typically an on-screen visual GUI + // element. + AppWidgetNameKey = attribute.Key("app.widget.name") +) + +// AppBuildID returns an attribute KeyValue conforming to the "app.build_id" +// semantic conventions. It represents the unique identifier for a particular +// build or compilation of the application. +func AppBuildID(val string) attribute.KeyValue { + return AppBuildIDKey.String(val) +} + +// AppInstallationID returns an attribute KeyValue conforming to the +// "app.installation.id" semantic conventions. It represents a unique identifier +// representing the installation of an application on a specific device. +func AppInstallationID(val string) attribute.KeyValue { + return AppInstallationIDKey.String(val) +} + +// AppJankFrameCount returns an attribute KeyValue conforming to the +// "app.jank.frame_count" semantic conventions. It represents a number of frame +// renders that experienced jank. +func AppJankFrameCount(val int) attribute.KeyValue { + return AppJankFrameCountKey.Int(val) +} + +// AppJankPeriod returns an attribute KeyValue conforming to the +// "app.jank.period" semantic conventions. It represents the time period, in +// seconds, for which this jank is being reported. +func AppJankPeriod(val float64) attribute.KeyValue { + return AppJankPeriodKey.Float64(val) +} + +// AppJankThreshold returns an attribute KeyValue conforming to the +// "app.jank.threshold" semantic conventions. It represents the minimum rendering +// threshold for this jank, in seconds. +func AppJankThreshold(val float64) attribute.KeyValue { + return AppJankThresholdKey.Float64(val) +} + +// AppScreenCoordinateX returns an attribute KeyValue conforming to the +// "app.screen.coordinate.x" semantic conventions. It represents the x +// (horizontal) coordinate of a screen coordinate, in screen pixels. +func AppScreenCoordinateX(val int) attribute.KeyValue { + return AppScreenCoordinateXKey.Int(val) +} + +// AppScreenCoordinateY returns an attribute KeyValue conforming to the +// "app.screen.coordinate.y" semantic conventions. It represents the y (vertical) +// component of a screen coordinate, in screen pixels. +func AppScreenCoordinateY(val int) attribute.KeyValue { + return AppScreenCoordinateYKey.Int(val) +} + +// AppScreenID returns an attribute KeyValue conforming to the "app.screen.id" +// semantic conventions. It represents an identifier that uniquely differentiates +// this screen from other screens in the same application. +func AppScreenID(val string) attribute.KeyValue { + return AppScreenIDKey.String(val) +} + +// AppScreenName returns an attribute KeyValue conforming to the +// "app.screen.name" semantic conventions. It represents the name of an +// application screen. +func AppScreenName(val string) attribute.KeyValue { + return AppScreenNameKey.String(val) +} + +// AppWidgetID returns an attribute KeyValue conforming to the "app.widget.id" +// semantic conventions. It represents an identifier that uniquely differentiates +// this widget from other widgets in the same application. +func AppWidgetID(val string) attribute.KeyValue { + return AppWidgetIDKey.String(val) +} + +// AppWidgetName returns an attribute KeyValue conforming to the +// "app.widget.name" semantic conventions. It represents the name of an +// application widget. +func AppWidgetName(val string) attribute.KeyValue { + return AppWidgetNameKey.String(val) +} + +// Namespace: artifact +const ( + // ArtifactAttestationFilenameKey is the attribute Key conforming to the + // "artifact.attestation.filename" semantic conventions. It represents the + // provenance filename of the built attestation which directly relates to the + // build artifact filename. This filename SHOULD accompany the artifact at + // publish time. See the [SLSA Relationship] specification for more information. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "golang-binary-amd64-v0.1.0.attestation", + // "docker-image-amd64-v0.1.0.intoto.json1", "release-1.tar.gz.attestation", + // "file-name-package.tar.gz.intoto.json1" + // + // [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations + ArtifactAttestationFilenameKey = attribute.Key("artifact.attestation.filename") + + // ArtifactAttestationHashKey is the attribute Key conforming to the + // "artifact.attestation.hash" semantic conventions. It represents the full + // [hash value (see glossary)], of the built attestation. Some envelopes in the + // [software attestation space] also refer to this as the **digest**. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408" + // + // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf + // [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec + ArtifactAttestationHashKey = attribute.Key("artifact.attestation.hash") + + // ArtifactAttestationIDKey is the attribute Key conforming to the + // "artifact.attestation.id" semantic conventions. It represents the id of the + // build [software attestation]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "123" + // + // [software attestation]: https://slsa.dev/attestation-model + ArtifactAttestationIDKey = attribute.Key("artifact.attestation.id") + + // ArtifactFilenameKey is the attribute Key conforming to the + // "artifact.filename" semantic conventions. It represents the human readable + // file name of the artifact, typically generated during build and release + // processes. Often includes the package name and version in the file name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "golang-binary-amd64-v0.1.0", "docker-image-amd64-v0.1.0", + // "release-1.tar.gz", "file-name-package.tar.gz" + // Note: This file name can also act as the [Package Name] + // in cases where the package ecosystem maps accordingly. + // Additionally, the artifact [can be published] + // for others, but that is not a guarantee. + // + // [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model + // [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain + ArtifactFilenameKey = attribute.Key("artifact.filename") + + // ArtifactHashKey is the attribute Key conforming to the "artifact.hash" + // semantic conventions. It represents the full [hash value (see glossary)], + // often found in checksum.txt on a release of the artifact and used to verify + // package integrity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9" + // Note: The specific algorithm used to create the cryptographic hash value is + // not defined. In situations where an artifact has multiple + // cryptographic hashes, it is up to the implementer to choose which + // hash value to set here; this should be the most secure hash algorithm + // that is suitable for the situation and consistent with the + // corresponding attestation. The implementer can then provide the other + // hash values through an additional set of attribute extensions as they + // deem necessary. + // + // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf + ArtifactHashKey = attribute.Key("artifact.hash") + + // ArtifactPurlKey is the attribute Key conforming to the "artifact.purl" + // semantic conventions. It represents the [Package URL] of the + // [package artifact] provides a standard way to identify and locate the + // packaged artifact. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "pkg:github/package-url/purl-spec@1209109710924", + // "pkg:npm/foo@12.12.3" + // + // [Package URL]: https://github.com/package-url/purl-spec + // [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model + ArtifactPurlKey = attribute.Key("artifact.purl") + + // ArtifactVersionKey is the attribute Key conforming to the "artifact.version" + // semantic conventions. It represents the version of the artifact. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "v0.1.0", "1.2.1", "122691-build" + ArtifactVersionKey = attribute.Key("artifact.version") +) + +// ArtifactAttestationFilename returns an attribute KeyValue conforming to the +// "artifact.attestation.filename" semantic conventions. It represents the +// provenance filename of the built attestation which directly relates to the +// build artifact filename. This filename SHOULD accompany the artifact at +// publish time. See the [SLSA Relationship] specification for more information. +// +// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations +func ArtifactAttestationFilename(val string) attribute.KeyValue { + return ArtifactAttestationFilenameKey.String(val) +} + +// ArtifactAttestationHash returns an attribute KeyValue conforming to the +// "artifact.attestation.hash" semantic conventions. It represents the full +// [hash value (see glossary)], of the built attestation. Some envelopes in the +// [software attestation space] also refer to this as the **digest**. +// +// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf +// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec +func ArtifactAttestationHash(val string) attribute.KeyValue { + return ArtifactAttestationHashKey.String(val) +} + +// ArtifactAttestationID returns an attribute KeyValue conforming to the +// "artifact.attestation.id" semantic conventions. It represents the id of the +// build [software attestation]. +// +// [software attestation]: https://slsa.dev/attestation-model +func ArtifactAttestationID(val string) attribute.KeyValue { + return ArtifactAttestationIDKey.String(val) +} + +// ArtifactFilename returns an attribute KeyValue conforming to the +// "artifact.filename" semantic conventions. It represents the human readable +// file name of the artifact, typically generated during build and release +// processes. Often includes the package name and version in the file name. +func ArtifactFilename(val string) attribute.KeyValue { + return ArtifactFilenameKey.String(val) +} + +// ArtifactHash returns an attribute KeyValue conforming to the "artifact.hash" +// semantic conventions. It represents the full [hash value (see glossary)], +// often found in checksum.txt on a release of the artifact and used to verify +// package integrity. +// +// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf +func ArtifactHash(val string) attribute.KeyValue { + return ArtifactHashKey.String(val) +} + +// ArtifactPurl returns an attribute KeyValue conforming to the "artifact.purl" +// semantic conventions. It represents the [Package URL] of the +// [package artifact] provides a standard way to identify and locate the packaged +// artifact. +// +// [Package URL]: https://github.com/package-url/purl-spec +// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model +func ArtifactPurl(val string) attribute.KeyValue { + return ArtifactPurlKey.String(val) +} + +// ArtifactVersion returns an attribute KeyValue conforming to the +// "artifact.version" semantic conventions. It represents the version of the +// artifact. +func ArtifactVersion(val string) attribute.KeyValue { + return ArtifactVersionKey.String(val) +} + +// Namespace: aws +const ( + // AWSBedrockGuardrailIDKey is the attribute Key conforming to the + // "aws.bedrock.guardrail.id" semantic conventions. It represents the unique + // identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and + // prevent unwanted behavior from model responses or user messages. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "sgi5gkybzqak" + // + // [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html + AWSBedrockGuardrailIDKey = attribute.Key("aws.bedrock.guardrail.id") + + // AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the + // "aws.bedrock.knowledge_base.id" semantic conventions. It represents the + // unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a + // bank of information that can be queried by models to generate more relevant + // responses and augment prompts. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "XFWUPB9PAW" + // + // [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html + AWSBedrockKnowledgeBaseIDKey = attribute.Key("aws.bedrock.knowledge_base.id") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") + + // AWSECSClusterARNKey is the attribute Key conforming to the + // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an + // [ECS cluster]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster" + // + // [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html + 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9" + // + // [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html + 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] + // for an ECS task. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html + 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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" + // + // [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids + 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] used to create the ECS task. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry-family" + // + // [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + + // 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: Recommended + // Stability: Development + // + // Examples: "10838bed-421f-43ef-870a-f43feacbbb5b", + // "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd" + AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id") + + // 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: Recommended + // Stability: Development + // + // Examples: "8", "26" + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") + + // 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: Recommended + // Stability: Development + // + // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster" + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") + + // AWSExtendedRequestIDKey is the attribute Key conforming to the + // "aws.extended_request_id" semantic conventions. It represents the AWS + // extended request ID as returned in the response header `x-amz-id-2`. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=" + AWSExtendedRequestIDKey = attribute.Key("aws.extended_request_id") + + // AWSKinesisStreamNameKey is the attribute Key conforming to the + // "aws.kinesis.stream_name" semantic conventions. It represents the name of the + // AWS Kinesis [stream] the request refers to. Corresponds to the + // `--stream-name` parameter of the Kinesis [describe-stream] operation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "some-stream-name" + // + // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html + // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html + AWSKinesisStreamNameKey = attribute.Key("aws.kinesis.stream_name") + + // 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: Recommended + // Stability: Development + // + // 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") + + // AWSLambdaResourceMappingIDKey is the attribute Key conforming to the + // "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID + // of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda + // function. It's contents are read by Lambda and used to trigger a function. + // This isn't available in the lambda execution context or the lambda runtime + // environtment. This is going to be populated by the AWS SDK for each language + // when that UUID is present. Some of these operations are + // Create/Delete/Get/List/Update EventSourceMapping. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "587ad24b-03b9-4413-8202-bbd56b36e5b7" + // + // [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html + AWSLambdaResourceMappingIDKey = attribute.Key("aws.lambda.resource_mapping.id") + + // 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: Recommended + // Stability: Development + // + // Examples: "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*" + // Note: See the [log group ARN format documentation]. + // + // [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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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]. One log group can + // contain several log streams, so these ARNs necessarily identify both a log + // group and a log stream. + // + // [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format + 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: Recommended + // Stability: Development + // + // Examples: "logs/main/10838bed-421f-43ef-870a-f43feacbbb5b" + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") + + // 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-amzn-requestid`, `x-amzn-request-id` or + // `x-amz-request-id`. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ" + AWSRequestIDKey = attribute.Key("aws.request_id") + + // 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] operations. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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`. + // + // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html + 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: Recommended + // Stability: Development + // + // 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]. + // This applies in particular to the following operations: + // + // - [copy-object] + // - [upload-part-copy] + // + // + // [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html + // [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: Recommended + // Stability: Development + // + // Examples: + // "Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean" + // Note: The `delete` attribute is only applicable to the [delete-object] + // operation. + // The `delete` attribute corresponds to the `--delete` parameter of the + // [delete-objects operation within the S3 API]. + // + // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html + // [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] operations. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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] + // - [delete-object] + // - [get-object] + // - [head-object] + // - [put-object] + // - [restore-object] + // - [select-object-content] + // - [abort-multipart-upload] + // - [complete-multipart-upload] + // - [create-multipart-upload] + // - [list-parts] + // - [upload-part] + // - [upload-part-copy] + // + // + // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html + // [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: Recommended + // Stability: Development + // + // Examples: 3456 + // Note: The `part_number` attribute is only applicable to the [upload-part] + // and [upload-part-copy] operations. + // The `part_number` attribute corresponds to the `--part-number` parameter of + // the + // [upload-part operation within the S3 API]. + // + // [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 + // [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: Recommended + // Stability: Development + // + // 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] multipart operations. + // This applies in particular to the following operations: + // + // - [abort-multipart-upload] + // - [complete-multipart-upload] + // - [list-parts] + // - [upload-part] + // - [upload-part-copy] + // + // + // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.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 + // [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") + + // AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the + // "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN + // of the Secret stored in the Secrets Mangger. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters" + AWSSecretsmanagerSecretARNKey = attribute.Key("aws.secretsmanager.secret.arn") + + // AWSSNSTopicARNKey is the attribute Key conforming to the "aws.sns.topic.arn" + // semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon + // SNS [topic] is a logical access point that acts as a communication channel. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE" + // + // [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html + AWSSNSTopicARNKey = attribute.Key("aws.sns.topic.arn") + + // AWSSQSQueueURLKey is the attribute Key conforming to the "aws.sqs.queue.url" + // semantic conventions. It represents the URL of the AWS SQS Queue. It's a + // unique identifier for a queue in Amazon Simple Queue Service (SQS) and is + // used to access the queue and perform actions on it. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue" + AWSSQSQueueURLKey = attribute.Key("aws.sqs.queue.url") + + // AWSStepFunctionsActivityARNKey is the attribute Key conforming to the + // "aws.step_functions.activity.arn" semantic conventions. It represents the ARN + // of the AWS Step Functions Activity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "arn:aws:states:us-east-1:123456789012:activity:get-greeting" + AWSStepFunctionsActivityARNKey = attribute.Key("aws.step_functions.activity.arn") + + // AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the + // "aws.step_functions.state_machine.arn" semantic conventions. It represents + // the ARN of the AWS Step Functions State Machine. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1" + AWSStepFunctionsStateMachineARNKey = attribute.Key("aws.step_functions.state_machine.arn") +) + +// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the +// "aws.bedrock.guardrail.id" semantic conventions. It represents the unique +// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and +// prevent unwanted behavior from model responses or user messages. +// +// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html +func AWSBedrockGuardrailID(val string) attribute.KeyValue { + return AWSBedrockGuardrailIDKey.String(val) +} + +// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the +// "aws.bedrock.knowledge_base.id" semantic conventions. It represents the unique +// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of +// information that can be queried by models to generate more relevant responses +// and augment prompts. +// +// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html +func AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue { + return AWSBedrockKnowledgeBaseIDKey.String(val) +} + +// 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) +} + +// AWSECSClusterARN returns an attribute KeyValue conforming to the +// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an +// [ECS cluster]. +// +// [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]. +// +// [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]. +// +// [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] used to create the ECS task. +// +// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html +func AWSECSTaskFamily(val string) attribute.KeyValue { + return AWSECSTaskFamilyKey.String(val) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// AWSExtendedRequestID returns an attribute KeyValue conforming to the +// "aws.extended_request_id" semantic conventions. It represents the AWS extended +// request ID as returned in the response header `x-amz-id-2`. +func AWSExtendedRequestID(val string) attribute.KeyValue { + return AWSExtendedRequestIDKey.String(val) +} + +// AWSKinesisStreamName returns an attribute KeyValue conforming to the +// "aws.kinesis.stream_name" semantic conventions. It represents the name of the +// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name` +// parameter of the Kinesis [describe-stream] operation. +// +// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html +// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html +func AWSKinesisStreamName(val string) attribute.KeyValue { + return AWSKinesisStreamNameKey.String(val) +} + +// 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) +} + +// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the +// "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID +// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda +// function. It's contents are read by Lambda and used to trigger a function. +// This isn't available in the lambda execution context or the lambda runtime +// environtment. This is going to be populated by the AWS SDK for each language +// when that UUID is present. Some of these operations are +// Create/Delete/Get/List/Update EventSourceMapping. +// +// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html +func AWSLambdaResourceMappingID(val string) attribute.KeyValue { + return AWSLambdaResourceMappingIDKey.String(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) +} + +// 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) +} + +// 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-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id` +// . +func AWSRequestID(val string) attribute.KeyValue { + return AWSRequestIDKey.String(val) +} + +// 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] operations. +// +// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html +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] operations. +// +// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html +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) +} + +// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the +// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of +// the Secret stored in the Secrets Mangger. +func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue { + return AWSSecretsmanagerSecretARNKey.String(val) +} + +// AWSSNSTopicARN returns an attribute KeyValue conforming to the +// "aws.sns.topic.arn" semantic conventions. It represents the ARN of the AWS SNS +// Topic. An Amazon SNS [topic] is a logical access point that acts as a +// communication channel. +// +// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html +func AWSSNSTopicARN(val string) attribute.KeyValue { + return AWSSNSTopicARNKey.String(val) +} + +// AWSSQSQueueURL returns an attribute KeyValue conforming to the +// "aws.sqs.queue.url" semantic conventions. It represents the URL of the AWS SQS +// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service +// (SQS) and is used to access the queue and perform actions on it. +func AWSSQSQueueURL(val string) attribute.KeyValue { + return AWSSQSQueueURLKey.String(val) +} + +// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the +// "aws.step_functions.activity.arn" semantic conventions. It represents the ARN +// of the AWS Step Functions Activity. +func AWSStepFunctionsActivityARN(val string) attribute.KeyValue { + return AWSStepFunctionsActivityARNKey.String(val) +} + +// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to +// the "aws.step_functions.state_machine.arn" semantic conventions. It represents +// the ARN of the AWS Step Functions State Machine. +func AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue { + return AWSStepFunctionsStateMachineARNKey.String(val) +} + +// Enum values for aws.ecs.launchtype +var ( + // Amazon EC2 + // Stability: development + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // Amazon Fargate + // Stability: development + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// Namespace: azure +const ( + // AzureClientIDKey is the attribute Key conforming to the "azure.client.id" + // semantic conventions. It represents the unique identifier of the client + // instance. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1" + AzureClientIDKey = attribute.Key("azure.client.id") + + // AzureCosmosDBConnectionModeKey is the attribute Key conforming to the + // "azure.cosmosdb.connection.mode" semantic conventions. It represents the + // cosmos client connection mode. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + AzureCosmosDBConnectionModeKey = attribute.Key("azure.cosmosdb.connection.mode") + + // AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the + // "azure.cosmosdb.consistency.level" semantic conventions. It represents the + // account or request [consistency level]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong", + // "Session" + // + // [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels + AzureCosmosDBConsistencyLevelKey = attribute.Key("azure.cosmosdb.consistency.level") + + // AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to + // the "azure.cosmosdb.operation.contacted_regions" semantic conventions. It + // represents the list of regions contacted during operation in the order that + // they were contacted. If there is more than one region listed, it indicates + // that the operation was performed on multiple regions i.e. cross-regional + // call. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "North Central US", "Australia East", "Australia Southeast" + // Note: Region name matches the format of `displayName` in [Azure Location API] + // + // [Azure Location API]: https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations + AzureCosmosDBOperationContactedRegionsKey = attribute.Key("azure.cosmosdb.operation.contacted_regions") + + // AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the + // "azure.cosmosdb.operation.request_charge" semantic conventions. It represents + // the number of request units consumed by the operation. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 46.18, 1.0 + AzureCosmosDBOperationRequestChargeKey = attribute.Key("azure.cosmosdb.operation.request_charge") + + // AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the + // "azure.cosmosdb.request.body.size" semantic conventions. It represents the + // request payload size in bytes. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + AzureCosmosDBRequestBodySizeKey = attribute.Key("azure.cosmosdb.request.body.size") + + // AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the + // "azure.cosmosdb.response.sub_status_code" semantic conventions. It represents + // the cosmos DB sub status code. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1000, 1002 + AzureCosmosDBResponseSubStatusCodeKey = attribute.Key("azure.cosmosdb.response.sub_status_code") + + // AzureResourceProviderNamespaceKey is the attribute Key conforming to the + // "azure.resource_provider.namespace" semantic conventions. It represents the + // [Azure Resource Provider Namespace] as recognized by the client. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus" + // + // [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers + AzureResourceProviderNamespaceKey = attribute.Key("azure.resource_provider.namespace") + + // AzureServiceRequestIDKey is the attribute Key conforming to the + // "azure.service.request.id" semantic conventions. It represents the unique + // identifier of the service request. It's generated by the Azure service and + // returned with the response. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "00000000-0000-0000-0000-000000000000" + AzureServiceRequestIDKey = attribute.Key("azure.service.request.id") +) + +// AzureClientID returns an attribute KeyValue conforming to the +// "azure.client.id" semantic conventions. It represents the unique identifier of +// the client instance. +func AzureClientID(val string) attribute.KeyValue { + return AzureClientIDKey.String(val) +} + +// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue +// conforming to the "azure.cosmosdb.operation.contacted_regions" semantic +// conventions. It represents the list of regions contacted during operation in +// the order that they were contacted. If there is more than one region listed, +// it indicates that the operation was performed on multiple regions i.e. +// cross-regional call. +func AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue { + return AzureCosmosDBOperationContactedRegionsKey.StringSlice(val) +} + +// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming +// to the "azure.cosmosdb.operation.request_charge" semantic conventions. It +// represents the number of request units consumed by the operation. +func AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue { + return AzureCosmosDBOperationRequestChargeKey.Float64(val) +} + +// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the +// "azure.cosmosdb.request.body.size" semantic conventions. It represents the +// request payload size in bytes. +func AzureCosmosDBRequestBodySize(val int) attribute.KeyValue { + return AzureCosmosDBRequestBodySizeKey.Int(val) +} + +// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to +// the "azure.cosmosdb.response.sub_status_code" semantic conventions. It +// represents the cosmos DB sub status code. +func AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue { + return AzureCosmosDBResponseSubStatusCodeKey.Int(val) +} + +// AzureResourceProviderNamespace returns an attribute KeyValue conforming to the +// "azure.resource_provider.namespace" semantic conventions. It represents the +// [Azure Resource Provider Namespace] as recognized by the client. +// +// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers +func AzureResourceProviderNamespace(val string) attribute.KeyValue { + return AzureResourceProviderNamespaceKey.String(val) +} + +// AzureServiceRequestID returns an attribute KeyValue conforming to the +// "azure.service.request.id" semantic conventions. It represents the unique +// identifier of the service request. It's generated by the Azure service and +// returned with the response. +func AzureServiceRequestID(val string) attribute.KeyValue { + return AzureServiceRequestIDKey.String(val) +} + +// Enum values for azure.cosmosdb.connection.mode +var ( + // Gateway (HTTP) connection. + // Stability: development + AzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String("gateway") + // Direct connection. + // Stability: development + AzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String("direct") +) + +// Enum values for azure.cosmosdb.consistency.level +var ( + // Strong + // Stability: development + AzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String("Strong") + // Bounded Staleness + // Stability: development + AzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String("BoundedStaleness") + // Session + // Stability: development + AzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String("Session") + // Eventual + // Stability: development + AzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String("Eventual") + // Consistent Prefix + // Stability: development + AzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String("ConsistentPrefix") +) + +// Namespace: browser +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: Recommended + // Stability: Development + // + // Examples: " Not A;Brand 99", "Chromium 99", "Chrome 99" + // Note: This value is intended to be taken from the [UA client hints API] ( + // `navigator.userAgentData.brands`). + // + // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + // Note: This value is intended to be taken from the [UA client hints API] ( + // `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be + // left unset. + // + // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface + 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: Recommended + // Stability: Development + // + // Examples: "Windows", "macOS", "Android" + // Note: This value is intended to be taken from the [UA client hints API] ( + // `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]. Note that some (but not all) of + // these values can overlap with values in the + // [`os.type` and `os.name` attributes]. However, for consistency, the values in + // the `browser.platform` attribute should capture the exact value that the user + // agent provides. + // + // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface + // [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform + // [`os.type` and `os.name` attributes]: ./os.md + 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) +} + +// Namespace: cassandra +const ( + // CassandraConsistencyLevelKey is the attribute Key conforming to the + // "cassandra.consistency.level" semantic conventions. It represents the + // consistency level of the query. Based on consistency values from [CQL]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html + CassandraConsistencyLevelKey = attribute.Key("cassandra.consistency.level") + + // CassandraCoordinatorDCKey is the attribute Key conforming to the + // "cassandra.coordinator.dc" semantic conventions. It represents the data + // center of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: us-west-2 + CassandraCoordinatorDCKey = attribute.Key("cassandra.coordinator.dc") + + // CassandraCoordinatorIDKey is the attribute Key conforming to the + // "cassandra.coordinator.id" semantic conventions. It represents the ID of the + // coordinating node for a query. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: be13faa2-8574-4d71-926d-27f16cf8a7af + CassandraCoordinatorIDKey = attribute.Key("cassandra.coordinator.id") + + // CassandraPageSizeKey is the attribute Key conforming to the + // "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: Recommended + // Stability: Development + // + // Examples: 5000 + CassandraPageSizeKey = attribute.Key("cassandra.page.size") + + // CassandraQueryIdempotentKey is the attribute Key conforming to the + // "cassandra.query.idempotent" semantic conventions. It represents the whether + // or not the query is idempotent. + // + // Type: boolean + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + CassandraQueryIdempotentKey = attribute.Key("cassandra.query.idempotent") + + // CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the + // "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: Recommended + // Stability: Development + // + // Examples: 0, 2 + CassandraSpeculativeExecutionCountKey = attribute.Key("cassandra.speculative_execution.count") +) + +// CassandraCoordinatorDC returns an attribute KeyValue conforming to the +// "cassandra.coordinator.dc" semantic conventions. It represents the data center +// of the coordinating node for a query. +func CassandraCoordinatorDC(val string) attribute.KeyValue { + return CassandraCoordinatorDCKey.String(val) +} + +// CassandraCoordinatorID returns an attribute KeyValue conforming to the +// "cassandra.coordinator.id" semantic conventions. It represents the ID of the +// coordinating node for a query. +func CassandraCoordinatorID(val string) attribute.KeyValue { + return CassandraCoordinatorIDKey.String(val) +} + +// CassandraPageSize returns an attribute KeyValue conforming to the +// "cassandra.page.size" semantic conventions. It represents the fetch size used +// for paging, i.e. how many rows will be returned at once. +func CassandraPageSize(val int) attribute.KeyValue { + return CassandraPageSizeKey.Int(val) +} + +// CassandraQueryIdempotent returns an attribute KeyValue conforming to the +// "cassandra.query.idempotent" semantic conventions. It represents the whether +// or not the query is idempotent. +func CassandraQueryIdempotent(val bool) attribute.KeyValue { + return CassandraQueryIdempotentKey.Bool(val) +} + +// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to +// the "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 CassandraSpeculativeExecutionCount(val int) attribute.KeyValue { + return CassandraSpeculativeExecutionCountKey.Int(val) +} + +// Enum values for cassandra.consistency.level +var ( + // All + // Stability: development + CassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String("all") + // Each Quorum + // Stability: development + CassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String("each_quorum") + // Quorum + // Stability: development + CassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String("quorum") + // Local Quorum + // Stability: development + CassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String("local_quorum") + // One + // Stability: development + CassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String("one") + // Two + // Stability: development + CassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String("two") + // Three + // Stability: development + CassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String("three") + // Local One + // Stability: development + CassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String("local_one") + // Any + // Stability: development + CassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String("any") + // Serial + // Stability: development + CassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String("serial") + // Local Serial + // Stability: development + CassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String("local_serial") +) + +// Namespace: cicd +const ( + // CICDPipelineActionNameKey is the attribute Key conforming to the + // "cicd.pipeline.action.name" semantic conventions. It represents the kind of + // action a pipeline run is performing. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "BUILD", "RUN", "SYNC" + CICDPipelineActionNameKey = attribute.Key("cicd.pipeline.action.name") + + // CICDPipelineNameKey is the attribute Key conforming to the + // "cicd.pipeline.name" semantic conventions. It represents the human readable + // name of the pipeline within a CI/CD system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Build and Test", "Lint", "Deploy Go Project", + // "deploy_to_environment" + CICDPipelineNameKey = attribute.Key("cicd.pipeline.name") + + // CICDPipelineResultKey is the attribute Key conforming to the + // "cicd.pipeline.result" semantic conventions. It represents the result of a + // pipeline run. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "success", "failure", "timeout", "skipped" + CICDPipelineResultKey = attribute.Key("cicd.pipeline.result") + + // CICDPipelineRunIDKey is the attribute Key conforming to the + // "cicd.pipeline.run.id" semantic conventions. It represents the unique + // identifier of a pipeline run within a CI/CD system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "120912" + CICDPipelineRunIDKey = attribute.Key("cicd.pipeline.run.id") + + // CICDPipelineRunStateKey is the attribute Key conforming to the + // "cicd.pipeline.run.state" semantic conventions. It represents the pipeline + // run goes through these states during its lifecycle. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "pending", "executing", "finalizing" + CICDPipelineRunStateKey = attribute.Key("cicd.pipeline.run.state") + + // CICDPipelineRunURLFullKey is the attribute Key conforming to the + // "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of + // the pipeline run, providing the complete address in order to locate and + // identify the pipeline run. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075" + // + // [URL]: https://wikipedia.org/wiki/URL + CICDPipelineRunURLFullKey = attribute.Key("cicd.pipeline.run.url.full") + + // CICDPipelineTaskNameKey is the attribute Key conforming to the + // "cicd.pipeline.task.name" semantic conventions. It represents the human + // readable name of a task within a pipeline. Task here most closely aligns with + // a [computing process] in a pipeline. Other terms for tasks include commands, + // steps, and procedures. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Run GoLang Linter", "Go Build", "go-test", "deploy_binary" + // + // [computing process]: https://wikipedia.org/wiki/Pipeline_(computing) + CICDPipelineTaskNameKey = attribute.Key("cicd.pipeline.task.name") + + // CICDPipelineTaskRunIDKey is the attribute Key conforming to the + // "cicd.pipeline.task.run.id" semantic conventions. It represents the unique + // identifier of a task run within a pipeline. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "12097" + CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id") + + // CICDPipelineTaskRunResultKey is the attribute Key conforming to the + // "cicd.pipeline.task.run.result" semantic conventions. It represents the + // result of a task run. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "success", "failure", "timeout", "skipped" + CICDPipelineTaskRunResultKey = attribute.Key("cicd.pipeline.task.run.result") + + // CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the + // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the + // [URL] of the pipeline task run, providing the complete address in order to + // locate and identify the pipeline task run. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075" + // + // [URL]: https://wikipedia.org/wiki/URL + CICDPipelineTaskRunURLFullKey = attribute.Key("cicd.pipeline.task.run.url.full") + + // CICDPipelineTaskTypeKey is the attribute Key conforming to the + // "cicd.pipeline.task.type" semantic conventions. It represents the type of the + // task within a pipeline. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "build", "test", "deploy" + CICDPipelineTaskTypeKey = attribute.Key("cicd.pipeline.task.type") + + // CICDSystemComponentKey is the attribute Key conforming to the + // "cicd.system.component" semantic conventions. It represents the name of a + // component of the CICD system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "controller", "scheduler", "agent" + CICDSystemComponentKey = attribute.Key("cicd.system.component") + + // CICDWorkerIDKey is the attribute Key conforming to the "cicd.worker.id" + // semantic conventions. It represents the unique identifier of a worker within + // a CICD system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "abc123", "10.0.1.2", "controller" + CICDWorkerIDKey = attribute.Key("cicd.worker.id") + + // CICDWorkerNameKey is the attribute Key conforming to the "cicd.worker.name" + // semantic conventions. It represents the name of a worker within a CICD + // system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "agent-abc", "controller", "Ubuntu LTS" + CICDWorkerNameKey = attribute.Key("cicd.worker.name") + + // CICDWorkerStateKey is the attribute Key conforming to the "cicd.worker.state" + // semantic conventions. It represents the state of a CICD worker / agent. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "idle", "busy", "down" + CICDWorkerStateKey = attribute.Key("cicd.worker.state") + + // CICDWorkerURLFullKey is the attribute Key conforming to the + // "cicd.worker.url.full" semantic conventions. It represents the [URL] of the + // worker, providing the complete address in order to locate and identify the + // worker. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://cicd.example.org/worker/abc123" + // + // [URL]: https://wikipedia.org/wiki/URL + CICDWorkerURLFullKey = attribute.Key("cicd.worker.url.full") +) + +// CICDPipelineName returns an attribute KeyValue conforming to the +// "cicd.pipeline.name" semantic conventions. It represents the human readable +// name of the pipeline within a CI/CD system. +func CICDPipelineName(val string) attribute.KeyValue { + return CICDPipelineNameKey.String(val) +} + +// CICDPipelineRunID returns an attribute KeyValue conforming to the +// "cicd.pipeline.run.id" semantic conventions. It represents the unique +// identifier of a pipeline run within a CI/CD system. +func CICDPipelineRunID(val string) attribute.KeyValue { + return CICDPipelineRunIDKey.String(val) +} + +// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the +// "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of +// the pipeline run, providing the complete address in order to locate and +// identify the pipeline run. +// +// [URL]: https://wikipedia.org/wiki/URL +func CICDPipelineRunURLFull(val string) attribute.KeyValue { + return CICDPipelineRunURLFullKey.String(val) +} + +// CICDPipelineTaskName returns an attribute KeyValue conforming to the +// "cicd.pipeline.task.name" semantic conventions. It represents the human +// readable name of a task within a pipeline. Task here most closely aligns with +// a [computing process] in a pipeline. Other terms for tasks include commands, +// steps, and procedures. +// +// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing) +func CICDPipelineTaskName(val string) attribute.KeyValue { + return CICDPipelineTaskNameKey.String(val) +} + +// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the +// "cicd.pipeline.task.run.id" semantic conventions. It represents the unique +// identifier of a task run within a pipeline. +func CICDPipelineTaskRunID(val string) attribute.KeyValue { + return CICDPipelineTaskRunIDKey.String(val) +} + +// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the +// "cicd.pipeline.task.run.url.full" semantic conventions. It represents the +// [URL] of the pipeline task run, providing the complete address in order to +// locate and identify the pipeline task run. +// +// [URL]: https://wikipedia.org/wiki/URL +func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue { + return CICDPipelineTaskRunURLFullKey.String(val) +} + +// CICDSystemComponent returns an attribute KeyValue conforming to the +// "cicd.system.component" semantic conventions. It represents the name of a +// component of the CICD system. +func CICDSystemComponent(val string) attribute.KeyValue { + return CICDSystemComponentKey.String(val) +} + +// CICDWorkerID returns an attribute KeyValue conforming to the "cicd.worker.id" +// semantic conventions. It represents the unique identifier of a worker within a +// CICD system. +func CICDWorkerID(val string) attribute.KeyValue { + return CICDWorkerIDKey.String(val) +} + +// CICDWorkerName returns an attribute KeyValue conforming to the +// "cicd.worker.name" semantic conventions. It represents the name of a worker +// within a CICD system. +func CICDWorkerName(val string) attribute.KeyValue { + return CICDWorkerNameKey.String(val) +} + +// CICDWorkerURLFull returns an attribute KeyValue conforming to the +// "cicd.worker.url.full" semantic conventions. It represents the [URL] of the +// worker, providing the complete address in order to locate and identify the +// worker. +// +// [URL]: https://wikipedia.org/wiki/URL +func CICDWorkerURLFull(val string) attribute.KeyValue { + return CICDWorkerURLFullKey.String(val) +} + +// Enum values for cicd.pipeline.action.name +var ( + // The pipeline run is executing a build. + // Stability: development + CICDPipelineActionNameBuild = CICDPipelineActionNameKey.String("BUILD") + // The pipeline run is executing. + // Stability: development + CICDPipelineActionNameRun = CICDPipelineActionNameKey.String("RUN") + // The pipeline run is executing a sync. + // Stability: development + CICDPipelineActionNameSync = CICDPipelineActionNameKey.String("SYNC") +) + +// Enum values for cicd.pipeline.result +var ( + // The pipeline run finished successfully. + // Stability: development + CICDPipelineResultSuccess = CICDPipelineResultKey.String("success") + // The pipeline run did not finish successfully, eg. due to a compile error or a + // failing test. Such failures are usually detected by non-zero exit codes of + // the tools executed in the pipeline run. + // Stability: development + CICDPipelineResultFailure = CICDPipelineResultKey.String("failure") + // The pipeline run failed due to an error in the CICD system, eg. due to the + // worker being killed. + // Stability: development + CICDPipelineResultError = CICDPipelineResultKey.String("error") + // A timeout caused the pipeline run to be interrupted. + // Stability: development + CICDPipelineResultTimeout = CICDPipelineResultKey.String("timeout") + // The pipeline run was cancelled, eg. by a user manually cancelling the + // pipeline run. + // Stability: development + CICDPipelineResultCancellation = CICDPipelineResultKey.String("cancellation") + // The pipeline run was skipped, eg. due to a precondition not being met. + // Stability: development + CICDPipelineResultSkip = CICDPipelineResultKey.String("skip") +) + +// Enum values for cicd.pipeline.run.state +var ( + // The run pending state spans from the event triggering the pipeline run until + // the execution of the run starts (eg. time spent in a queue, provisioning + // agents, creating run resources). + // + // Stability: development + CICDPipelineRunStatePending = CICDPipelineRunStateKey.String("pending") + // The executing state spans the execution of any run tasks (eg. build, test). + // Stability: development + CICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String("executing") + // The finalizing state spans from when the run has finished executing (eg. + // cleanup of run resources). + // Stability: development + CICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String("finalizing") +) + +// Enum values for cicd.pipeline.task.run.result +var ( + // The task run finished successfully. + // Stability: development + CICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String("success") + // The task run did not finish successfully, eg. due to a compile error or a + // failing test. Such failures are usually detected by non-zero exit codes of + // the tools executed in the task run. + // Stability: development + CICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String("failure") + // The task run failed due to an error in the CICD system, eg. due to the worker + // being killed. + // Stability: development + CICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String("error") + // A timeout caused the task run to be interrupted. + // Stability: development + CICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String("timeout") + // The task run was cancelled, eg. by a user manually cancelling the task run. + // Stability: development + CICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String("cancellation") + // The task run was skipped, eg. due to a precondition not being met. + // Stability: development + CICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String("skip") +) + +// Enum values for cicd.pipeline.task.type +var ( + // build + // Stability: development + CICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String("build") + // test + // Stability: development + CICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String("test") + // deploy + // Stability: development + CICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String("deploy") +) + +// Enum values for cicd.worker.state +var ( + // The worker is not performing work for the CICD system. It is available to the + // CICD system to perform work on (online / idle). + // Stability: development + CICDWorkerStateAvailable = CICDWorkerStateKey.String("available") + // The worker is performing work for the CICD system. + // Stability: development + CICDWorkerStateBusy = CICDWorkerStateKey.String("busy") + // The worker is not available to the CICD system (disconnected / down). + // Stability: development + CICDWorkerStateOffline = CICDWorkerStateKey.String("offline") +) + +// Namespace: client +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: Recommended + // 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: Recommended + // 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) +} + +// Namespace: cloud +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + // 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: Recommended + // Stability: Development + // + // Examples: + CloudProviderKey = attribute.Key("cloud.provider") + + // CloudRegionKey is the attribute Key conforming to the "cloud.region" semantic + // conventions. It represents the geographical region within a cloud provider. + // When associated with a resource, this attribute specifies the region where + // the resource operates. When calling services or APIs deployed on a cloud, + // this attribute identifies the region where the called destination is + // deployed. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "us-central1", "us-east-1" + // Note: Refer to your provider's docs to see the available regions, for example + // [Alibaba Cloud regions], [AWS regions], [Azure regions], + // [Google Cloud regions], or [Tencent Cloud regions]. + // + // [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 + // [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] on AWS, a + // [fully qualified resource ID] on Azure, a [full resource name] on GCP). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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]. + // Take care not to use the "invoked ARN" directly but replace any + // [alias suffix] + // with the resolved function version, as the same runtime instance may be + // invocable with + // multiple different aliases. + // - **GCP:** The [URI of the resource] + // - **Azure:** The [Fully Qualified Resource 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. + // + // + // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id + // [full resource name]: https://google.aip.dev/122#full-resource-names + // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html + // [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names + // [Fully Qualified Resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id + CloudResourceIDKey = attribute.Key("cloud.resource_id") +) + +// 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 within a cloud +// provider. When associated with a resource, this attribute specifies the region +// where the resource operates. When calling services or APIs deployed on a +// cloud, this attribute identifies the region where the called destination is +// deployed. +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] on AWS, a [fully qualified resource ID] on Azure, a [full resource name] +// on GCP). +// +// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html +// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id +// [full resource name]: https://google.aip.dev/122#full-resource-names +func CloudResourceID(val string) attribute.KeyValue { + return CloudResourceIDKey.String(val) +} + +// Enum values for cloud.platform +var ( + // Akamai Cloud Compute + // Stability: development + CloudPlatformAkamaiCloudCompute = CloudPlatformKey.String("akamai_cloud.compute") + // Alibaba Cloud Elastic Compute Service + // Stability: development + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + // Stability: development + CloudPlatformAlibabaCloudFC = CloudPlatformKey.String("alibaba_cloud_fc") + // Red Hat OpenShift on Alibaba Cloud + // Stability: development + CloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String("alibaba_cloud_openshift") + // AWS Elastic Compute Cloud + // Stability: development + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + // Stability: development + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + // Stability: development + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + // Stability: development + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + // Stability: development + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + // Stability: development + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Red Hat OpenShift on AWS (ROSA) + // Stability: development + CloudPlatformAWSOpenShift = CloudPlatformKey.String("aws_openshift") + // Azure Virtual Machines + // Stability: development + CloudPlatformAzureVM = CloudPlatformKey.String("azure.vm") + // Azure Container Apps + // Stability: development + CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure.container_apps") + // Azure Container Instances + // Stability: development + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure.container_instances") + // Azure Kubernetes Service + // Stability: development + CloudPlatformAzureAKS = CloudPlatformKey.String("azure.aks") + // Azure Functions + // Stability: development + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure.functions") + // Azure App Service + // Stability: development + CloudPlatformAzureAppService = CloudPlatformKey.String("azure.app_service") + // Azure Red Hat OpenShift + // Stability: development + CloudPlatformAzureOpenShift = CloudPlatformKey.String("azure.openshift") + // Google Vertex AI Agent Engine + // Stability: development + CloudPlatformGCPAgentEngine = CloudPlatformKey.String("gcp.agent_engine") + // Google Bare Metal Solution (BMS) + // Stability: development + CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") + // Google Cloud Compute Engine (GCE) + // Stability: development + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + // Stability: development + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + // Stability: development + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + // Stability: development + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + // Stability: development + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Red Hat OpenShift on Google Cloud + // Stability: development + CloudPlatformGCPOpenShift = CloudPlatformKey.String("gcp_openshift") + // Server on Hetzner Cloud + // Stability: development + CloudPlatformHetznerCloudServer = CloudPlatformKey.String("hetzner.cloud_server") + // Red Hat OpenShift on IBM Cloud + // Stability: development + CloudPlatformIBMCloudOpenShift = CloudPlatformKey.String("ibm_cloud_openshift") + // Compute on Oracle Cloud Infrastructure (OCI) + // Stability: development + CloudPlatformOracleCloudCompute = CloudPlatformKey.String("oracle_cloud_compute") + // Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI) + // Stability: development + CloudPlatformOracleCloudOKE = CloudPlatformKey.String("oracle_cloud_oke") + // Tencent Cloud Cloud Virtual Machine (CVM) + // Stability: development + CloudPlatformTencentCloudCVM = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + // Stability: development + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + // Stability: development + CloudPlatformTencentCloudSCF = CloudPlatformKey.String("tencent_cloud_scf") + // Vultr Cloud Compute + // Stability: development + CloudPlatformVultrCloudCompute = CloudPlatformKey.String("vultr.cloud_compute") +) + +// Enum values for cloud.provider +var ( + // Akamai Cloud + // Stability: development + CloudProviderAkamaiCloud = CloudProviderKey.String("akamai_cloud") + // Alibaba Cloud + // Stability: development + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + // Stability: development + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + // Stability: development + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + // Stability: development + CloudProviderGCP = CloudProviderKey.String("gcp") + // Heroku Platform as a Service + // Stability: development + CloudProviderHeroku = CloudProviderKey.String("heroku") + // Hetzner + // Stability: development + CloudProviderHetzner = CloudProviderKey.String("hetzner") + // IBM Cloud + // Stability: development + CloudProviderIBMCloud = CloudProviderKey.String("ibm_cloud") + // Oracle Cloud Infrastructure (OCI) + // Stability: development + CloudProviderOracleCloud = CloudProviderKey.String("oracle_cloud") + // Tencent Cloud + // Stability: development + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") + // Vultr + // Stability: development + CloudProviderVultr = CloudProviderKey.String("vultr") +) + +// Namespace: cloudevents +const ( + // CloudEventsEventIDKey is the attribute Key conforming to the + // "cloudevents.event_id" semantic conventions. It represents the [event_id] + // uniquely identifies the event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "123e4567-e89b-12d3-a456-426614174000", "0001" + // + // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id + CloudEventsEventIDKey = attribute.Key("cloudevents.event_id") + + // CloudEventsEventSourceKey is the attribute Key conforming to the + // "cloudevents.event_source" semantic conventions. It represents the [source] + // identifies the context in which an event happened. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://github.com/cloudevents", "/cloudevents/spec/pull/123", + // "my-service" + // + // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1 + 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] which the event uses. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1.0 + // + // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion + CloudEventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + + // CloudEventsEventSubjectKey is the attribute Key conforming to the + // "cloudevents.event_subject" semantic conventions. It represents the [subject] + // of the event in the context of the event producer (identified by source). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: mynewfile.jpg + // + // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject + CloudEventsEventSubjectKey = attribute.Key("cloudevents.event_subject") + + // CloudEventsEventTypeKey is the attribute Key conforming to the + // "cloudevents.event_type" semantic conventions. It represents the [event_type] + // contains a value describing the type of event related to the originating + // occurrence. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "com.github.pull_request.opened", "com.example.object.deleted.v2" + // + // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type + CloudEventsEventTypeKey = attribute.Key("cloudevents.event_type") +) + +// CloudEventsEventID returns an attribute KeyValue conforming to the +// "cloudevents.event_id" semantic conventions. It represents the [event_id] +// uniquely identifies the event. +// +// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id +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] +// identifies the context in which an event happened. +// +// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1 +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] which the event uses. +// +// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion +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] +// of the event in the context of the event producer (identified by source). +// +// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject +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] +// contains a value describing the type of event related to the originating +// occurrence. +// +// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type +func CloudEventsEventType(val string) attribute.KeyValue { + return CloudEventsEventTypeKey.String(val) +} + +// Namespace: cloudfoundry +const ( + // CloudFoundryAppIDKey is the attribute Key conforming to the + // "cloudfoundry.app.id" semantic conventions. It represents the guid of the + // application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.application_id`. This is the same value as + // reported by `cf app --guid`. + CloudFoundryAppIDKey = attribute.Key("cloudfoundry.app.id") + + // CloudFoundryAppInstanceIDKey is the attribute Key conforming to the + // "cloudfoundry.app.instance.id" semantic conventions. It represents the index + // of the application instance. 0 when just one instance is active. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "0", "1" + // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope] + // . + // It is used for logs and metrics emitted by CloudFoundry. It is + // supposed to contain the application instance index for applications + // deployed on the runtime. + // + // Application instrumentation should use the value from environment + // variable `CF_INSTANCE_INDEX`. + // + // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope + CloudFoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id") + + // CloudFoundryAppNameKey is the attribute Key conforming to the + // "cloudfoundry.app.name" semantic conventions. It represents the name of the + // application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-app-name" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.application_name`. This is the same value + // as reported by `cf apps`. + CloudFoundryAppNameKey = attribute.Key("cloudfoundry.app.name") + + // CloudFoundryOrgIDKey is the attribute Key conforming to the + // "cloudfoundry.org.id" semantic conventions. It represents the guid of the + // CloudFoundry org the application is running in. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.org_id`. This is the same value as + // reported by `cf org --guid`. + CloudFoundryOrgIDKey = attribute.Key("cloudfoundry.org.id") + + // CloudFoundryOrgNameKey is the attribute Key conforming to the + // "cloudfoundry.org.name" semantic conventions. It represents the name of the + // CloudFoundry organization the app is running in. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-org-name" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.org_name`. This is the same value as + // reported by `cf orgs`. + CloudFoundryOrgNameKey = attribute.Key("cloudfoundry.org.name") + + // CloudFoundryProcessIDKey is the attribute Key conforming to the + // "cloudfoundry.process.id" semantic conventions. It represents the UID + // identifying the process. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to + // `VCAP_APPLICATION.app_id` for applications deployed to the runtime. + // For system components, this could be the actual PID. + CloudFoundryProcessIDKey = attribute.Key("cloudfoundry.process.id") + + // CloudFoundryProcessTypeKey is the attribute Key conforming to the + // "cloudfoundry.process.type" semantic conventions. It represents the type of + // process. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "web" + // Note: CloudFoundry applications can consist of multiple jobs. Usually the + // main process will be of type `web`. There can be additional background + // tasks or side-cars with different process types. + CloudFoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type") + + // CloudFoundrySpaceIDKey is the attribute Key conforming to the + // "cloudfoundry.space.id" semantic conventions. It represents the guid of the + // CloudFoundry space the application is running in. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.space_id`. This is the same value as + // reported by `cf space --guid`. + CloudFoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id") + + // CloudFoundrySpaceNameKey is the attribute Key conforming to the + // "cloudfoundry.space.name" semantic conventions. It represents the name of the + // CloudFoundry space the application is running in. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-space-name" + // Note: Application instrumentation should use the value from environment + // variable `VCAP_APPLICATION.space_name`. This is the same value as + // reported by `cf spaces`. + CloudFoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name") + + // CloudFoundrySystemIDKey is the attribute Key conforming to the + // "cloudfoundry.system.id" semantic conventions. It represents a guid or + // another name describing the event source. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "cf/gorouter" + // Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope]. + // It is used for logs and metrics emitted by CloudFoundry. It is + // supposed to contain the component name, e.g. "gorouter", for + // CloudFoundry components. + // + // When system components are instrumented, values from the + // [Bosh spec] + // should be used. The `system.id` should be set to + // `spec.deployment/spec.name`. + // + // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope + // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec + CloudFoundrySystemIDKey = attribute.Key("cloudfoundry.system.id") + + // CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the + // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid + // describing the concrete instance of the event source. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" + // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope] + // . + // It is used for logs and metrics emitted by CloudFoundry. It is + // supposed to contain the vm id for CloudFoundry components. + // + // When system components are instrumented, values from the + // [Bosh spec] + // should be used. The `system.instance.id` should be set to `spec.id`. + // + // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope + // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec + CloudFoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id") +) + +// CloudFoundryAppID returns an attribute KeyValue conforming to the +// "cloudfoundry.app.id" semantic conventions. It represents the guid of the +// application. +func CloudFoundryAppID(val string) attribute.KeyValue { + return CloudFoundryAppIDKey.String(val) +} + +// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the +// "cloudfoundry.app.instance.id" semantic conventions. It represents the index +// of the application instance. 0 when just one instance is active. +func CloudFoundryAppInstanceID(val string) attribute.KeyValue { + return CloudFoundryAppInstanceIDKey.String(val) +} + +// CloudFoundryAppName returns an attribute KeyValue conforming to the +// "cloudfoundry.app.name" semantic conventions. It represents the name of the +// application. +func CloudFoundryAppName(val string) attribute.KeyValue { + return CloudFoundryAppNameKey.String(val) +} + +// CloudFoundryOrgID returns an attribute KeyValue conforming to the +// "cloudfoundry.org.id" semantic conventions. It represents the guid of the +// CloudFoundry org the application is running in. +func CloudFoundryOrgID(val string) attribute.KeyValue { + return CloudFoundryOrgIDKey.String(val) +} + +// CloudFoundryOrgName returns an attribute KeyValue conforming to the +// "cloudfoundry.org.name" semantic conventions. It represents the name of the +// CloudFoundry organization the app is running in. +func CloudFoundryOrgName(val string) attribute.KeyValue { + return CloudFoundryOrgNameKey.String(val) +} + +// CloudFoundryProcessID returns an attribute KeyValue conforming to the +// "cloudfoundry.process.id" semantic conventions. It represents the UID +// identifying the process. +func CloudFoundryProcessID(val string) attribute.KeyValue { + return CloudFoundryProcessIDKey.String(val) +} + +// CloudFoundryProcessType returns an attribute KeyValue conforming to the +// "cloudfoundry.process.type" semantic conventions. It represents the type of +// process. +func CloudFoundryProcessType(val string) attribute.KeyValue { + return CloudFoundryProcessTypeKey.String(val) +} + +// CloudFoundrySpaceID returns an attribute KeyValue conforming to the +// "cloudfoundry.space.id" semantic conventions. It represents the guid of the +// CloudFoundry space the application is running in. +func CloudFoundrySpaceID(val string) attribute.KeyValue { + return CloudFoundrySpaceIDKey.String(val) +} + +// CloudFoundrySpaceName returns an attribute KeyValue conforming to the +// "cloudfoundry.space.name" semantic conventions. It represents the name of the +// CloudFoundry space the application is running in. +func CloudFoundrySpaceName(val string) attribute.KeyValue { + return CloudFoundrySpaceNameKey.String(val) +} + +// CloudFoundrySystemID returns an attribute KeyValue conforming to the +// "cloudfoundry.system.id" semantic conventions. It represents a guid or another +// name describing the event source. +func CloudFoundrySystemID(val string) attribute.KeyValue { + return CloudFoundrySystemIDKey.String(val) +} + +// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the +// "cloudfoundry.system.instance.id" semantic conventions. It represents a guid +// describing the concrete instance of the event source. +func CloudFoundrySystemInstanceID(val string) attribute.KeyValue { + return CloudFoundrySystemInstanceIDKey.String(val) +} + +// Namespace: code +const ( + // CodeColumnNumberKey is the attribute Key conforming to the + // "code.column.number" semantic conventions. It represents the column number in + // `code.file.path` best representing the operation. It SHOULD point within the + // code unit named in `code.function.name`. This attribute MUST NOT be used on + // the Profile signal since the data is already captured in 'message Line'. This + // constraint is imposed to prevent redundancy and maintain data integrity. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Stable + CodeColumnNumberKey = attribute.Key("code.column.number") + + // CodeFilePathKey is the attribute Key conforming to the "code.file.path" + // semantic conventions. It represents the source code file name that identifies + // the code unit as uniquely as possible (preferably an absolute file path). + // This attribute MUST NOT be used on the Profile signal since the data is + // already captured in 'message Function'. This constraint is imposed to prevent + // redundancy and maintain data integrity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: /usr/local/MyApplication/content_root/app/index.php + CodeFilePathKey = attribute.Key("code.file.path") + + // CodeFunctionNameKey is the attribute Key conforming to the + // "code.function.name" semantic conventions. It represents the method or + // function fully-qualified name without arguments. The value should fit the + // natural representation of the language runtime, which is also likely the same + // used within `code.stacktrace` attribute value. This attribute MUST NOT be + // used on the Profile signal since the data is already captured in 'message + // Function'. This constraint is imposed to prevent redundancy and maintain data + // integrity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "com.example.MyHttpService.serveRequest", + // "GuzzleHttp\Client::transfer", "fopen" + // Note: Values and format depends on each language runtime, thus it is + // impossible to provide an exhaustive list of examples. + // The values are usually the same (or prefixes of) the ones found in native + // stack trace representation stored in + // `code.stacktrace` without information on arguments. + // + // Examples: + // + // - Java method: `com.example.MyHttpService.serveRequest` + // - Java anonymous class method: `com.mycompany.Main$1.myMethod` + // - Java lambda method: + // `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod` + // - PHP function: `GuzzleHttp\Client::transfer` + // - Go function: `github.com/my/repo/pkg.foo.func5` + // - Elixir: `OpenTelemetry.Ctx.new` + // - Erlang: `opentelemetry_ctx:new` + // - Rust: `playground::my_module::my_cool_func` + // - C function: `fopen` + CodeFunctionNameKey = attribute.Key("code.function.name") + + // CodeLineNumberKey is the attribute Key conforming to the "code.line.number" + // semantic conventions. It represents the line number in `code.file.path` best + // representing the operation. It SHOULD point within the code unit named in + // `code.function.name`. This attribute MUST NOT be used on the Profile signal + // since the data is already captured in 'message Line'. This constraint is + // imposed to prevent redundancy and maintain data integrity. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Stable + CodeLineNumberKey = attribute.Key("code.line.number") + + // 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 identical to + // [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile + // signal since the data is already captured in 'message Location'. This + // constraint is imposed to prevent redundancy and maintain data integrity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // 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) + // + // [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation + CodeStacktraceKey = attribute.Key("code.stacktrace") +) + +// CodeColumnNumber returns an attribute KeyValue conforming to the +// "code.column.number" semantic conventions. It represents the column number in +// `code.file.path` best representing the operation. It SHOULD point within the +// code unit named in `code.function.name`. This attribute MUST NOT be used on +// the Profile signal since the data is already captured in 'message Line'. This +// constraint is imposed to prevent redundancy and maintain data integrity. +func CodeColumnNumber(val int) attribute.KeyValue { + return CodeColumnNumberKey.Int(val) +} + +// CodeFilePath returns an attribute KeyValue conforming to the "code.file.path" +// semantic conventions. It represents the source code file name that identifies +// the code unit as uniquely as possible (preferably an absolute file path). This +// attribute MUST NOT be used on the Profile signal since the data is already +// captured in 'message Function'. This constraint is imposed to prevent +// redundancy and maintain data integrity. +func CodeFilePath(val string) attribute.KeyValue { + return CodeFilePathKey.String(val) +} + +// CodeFunctionName returns an attribute KeyValue conforming to the +// "code.function.name" semantic conventions. It represents the method or +// function fully-qualified name without arguments. The value should fit the +// natural representation of the language runtime, which is also likely the same +// used within `code.stacktrace` attribute value. This attribute MUST NOT be used +// on the Profile signal since the data is already captured in 'message +// Function'. This constraint is imposed to prevent redundancy and maintain data +// integrity. +func CodeFunctionName(val string) attribute.KeyValue { + return CodeFunctionNameKey.String(val) +} + +// CodeLineNumber returns an attribute KeyValue conforming to the +// "code.line.number" semantic conventions. It represents the line number in +// `code.file.path` best representing the operation. It SHOULD point within the +// code unit named in `code.function.name`. This attribute MUST NOT be used on +// the Profile signal since the data is already captured in 'message Line'. This +// constraint is imposed to prevent redundancy and maintain data integrity. +func CodeLineNumber(val int) attribute.KeyValue { + return CodeLineNumberKey.Int(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 +// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the +// Profile signal since the data is already captured in 'message Location'. This +// constraint is imposed to prevent redundancy and maintain data integrity. +// +// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation +func CodeStacktrace(val string) attribute.KeyValue { + return CodeStacktraceKey.String(val) +} + +// Namespace: container +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: Recommended + // Stability: Development + // + // 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. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // 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. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "otelcontribcol --config config.yaml" + ContainerCommandLineKey = attribute.Key("container.command_line") + + // ContainerCSIPluginNameKey is the attribute Key conforming to the + // "container.csi.plugin.name" semantic conventions. It represents the name of + // the CSI ([Container Storage Interface]) plugin used by the volume. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "pd.csi.storage.gke.io" + // Note: This can sometimes be referred to as a "driver" in CSI implementations. + // This should represent the `name` field of the GetPluginInfo RPC. + // + // [Container Storage Interface]: https://github.com/container-storage-interface/spec + ContainerCSIPluginNameKey = attribute.Key("container.csi.plugin.name") + + // ContainerCSIVolumeIDKey is the attribute Key conforming to the + // "container.csi.volume.id" semantic conventions. It represents the unique + // volume ID returned by the CSI ([Container Storage Interface]) plugin. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" + // Note: This can sometimes be referred to as a "volume handle" in CSI + // implementations. This should represent the `Volume.volume_id` field in CSI + // spec. + // + // [Container Storage Interface]: https://github.com/container-storage-interface/spec + ContainerCSIVolumeIDKey = attribute.Key("container.csi.volume.id") + + // 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]. The UUID might be abbreviated. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // Examples: "a3bf90e006b2" + // + // [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification + 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: Recommended + // Stability: Development + // + // 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] + // 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. + // + // [API]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect + 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: + // "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", + // "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" + // Note: [Docker] and [CRI] report those under the `RepoDigests` field. + // + // [Docker]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect + // [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238 + 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]. Should be only + // the `` section of the full name for example from + // `registry.example.com/my-org/my-image:`. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Alpha + // + // Examples: "v1.27.1", "3.5.7-0" + // + // [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect + 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: Recommended + // Stability: Development + // + // Examples: "opentelemetry-autoconf" + ContainerNameKey = attribute.Key("container.name") + + // ContainerRuntimeDescriptionKey is the attribute Key conforming to the + // "container.runtime.description" semantic conventions. It represents a + // description about the runtime which could include, for example details about + // the CRI/API version being used or other customisations. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "docker://19.3.1 - CRI: 1.22.0" + ContainerRuntimeDescriptionKey = attribute.Key("container.runtime.description") + + // ContainerRuntimeNameKey is the attribute Key conforming to the + // "container.runtime.name" semantic conventions. It represents the container + // runtime managing this container. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "docker", "containerd", "rkt" + ContainerRuntimeNameKey = attribute.Key("container.runtime.name") + + // ContainerRuntimeVersionKey is the attribute Key conforming to the + // "container.runtime.version" semantic conventions. It represents the version + // of the runtime of this process, as returned by the runtime without + // modification. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1.0.0 + ContainerRuntimeVersionKey = attribute.Key("container.runtime.version") +) + +// 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. +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. +func ContainerCommandLine(val string) attribute.KeyValue { + return ContainerCommandLineKey.String(val) +} + +// ContainerCSIPluginName returns an attribute KeyValue conforming to the +// "container.csi.plugin.name" semantic conventions. It represents the name of +// the CSI ([Container Storage Interface]) plugin used by the volume. +// +// [Container Storage Interface]: https://github.com/container-storage-interface/spec +func ContainerCSIPluginName(val string) attribute.KeyValue { + return ContainerCSIPluginNameKey.String(val) +} + +// ContainerCSIVolumeID returns an attribute KeyValue conforming to the +// "container.csi.volume.id" semantic conventions. It represents the unique +// volume ID returned by the CSI ([Container Storage Interface]) plugin. +// +// [Container Storage Interface]: https://github.com/container-storage-interface/spec +func ContainerCSIVolumeID(val string) attribute.KeyValue { + return ContainerCSIVolumeIDKey.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]. The UUID might be abbreviated. +// +// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification +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]. Should be only the +// `` section of the full name for example from +// `registry.example.com/my-org/my-image:`. +// +// [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect +func ContainerImageTags(val ...string) attribute.KeyValue { + return ContainerImageTagsKey.StringSlice(val) +} + +// ContainerLabel returns an attribute KeyValue conforming to the +// "container.label" semantic conventions. It represents the container labels, +// `` being the label name, the value being the label value. +func ContainerLabel(key string, val string) attribute.KeyValue { + return attribute.String("container.label."+key, 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) +} + +// ContainerRuntimeDescription returns an attribute KeyValue conforming to the +// "container.runtime.description" semantic conventions. It represents a +// description about the runtime which could include, for example details about +// the CRI/API version being used or other customisations. +func ContainerRuntimeDescription(val string) attribute.KeyValue { + return ContainerRuntimeDescriptionKey.String(val) +} + +// ContainerRuntimeName returns an attribute KeyValue conforming to the +// "container.runtime.name" semantic conventions. It represents the container +// runtime managing this container. +func ContainerRuntimeName(val string) attribute.KeyValue { + return ContainerRuntimeNameKey.String(val) +} + +// ContainerRuntimeVersion returns an attribute KeyValue conforming to the +// "container.runtime.version" semantic conventions. It represents the version of +// the runtime of this process, as returned by the runtime without modification. +func ContainerRuntimeVersion(val string) attribute.KeyValue { + return ContainerRuntimeVersionKey.String(val) +} + +// Namespace: cpu +const ( + // CPULogicalNumberKey is the attribute Key conforming to the + // "cpu.logical_number" semantic conventions. It represents the logical CPU + // number [0..n-1]. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1 + CPULogicalNumberKey = attribute.Key("cpu.logical_number") + + // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic + // conventions. It represents the mode of the CPU. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "user", "system" + CPUModeKey = attribute.Key("cpu.mode") +) + +// CPULogicalNumber returns an attribute KeyValue conforming to the +// "cpu.logical_number" semantic conventions. It represents the logical CPU +// number [0..n-1]. +func CPULogicalNumber(val int) attribute.KeyValue { + return CPULogicalNumberKey.Int(val) +} + +// Enum values for cpu.mode +var ( + // User + // Stability: development + CPUModeUser = CPUModeKey.String("user") + // System + // Stability: development + CPUModeSystem = CPUModeKey.String("system") + // Nice + // Stability: development + CPUModeNice = CPUModeKey.String("nice") + // Idle + // Stability: development + CPUModeIdle = CPUModeKey.String("idle") + // IO Wait + // Stability: development + CPUModeIOWait = CPUModeKey.String("iowait") + // Interrupt + // Stability: development + CPUModeInterrupt = CPUModeKey.String("interrupt") + // Steal + // Stability: development + CPUModeSteal = CPUModeKey.String("steal") + // Kernel + // Stability: development + CPUModeKernel = CPUModeKey.String("kernel") +) + +// Namespace: db +const ( + // DBClientConnectionPoolNameKey is the attribute Key conforming to the + // "db.client.connection.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 parameters that would make the name unique, for + // example, combining attributes `server.address`, `server.port`, and + // `db.namespace`, formatted as `server.address:server.port/db.namespace`. + // Instrumentations that generate connection pool name following different + // patterns SHOULD document it. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "myDataSource" + DBClientConnectionPoolNameKey = attribute.Key("db.client.connection.pool.name") + + // DBClientConnectionStateKey is the attribute Key conforming to the + // "db.client.connection.state" semantic conventions. It represents the state of + // a connection in the pool. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "idle" + DBClientConnectionStateKey = attribute.Key("db.client.connection.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: Recommended + // Stability: Stable + // + // Examples: "public.users", "customers" + // Note: It is RECOMMENDED to capture the value as provided by the application + // without attempting to do any case normalization. + // + // The collection name SHOULD NOT be extracted from `db.query.text`, + // when the database system supports query text with multiple collections + // in non-batch operations. + // + // For batch operations, if the individual operations are known to have the same + // collection name then that collection name SHOULD be used. + 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: Recommended + // Stability: Stable + // + // Examples: "customers", "test.users" + // Note: If a database system has multiple namespace components, they SHOULD be + // concatenated from the most general to the most specific namespace component, + // using `|` as a separator between the components. Any missing components (and + // their associated separators) SHOULD be omitted. + // 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") + + // DBOperationBatchSizeKey is the attribute Key conforming to the + // "db.operation.batch.size" semantic conventions. It represents the number of + // queries included in a batch operation. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: 2, 3, 4 + // Note: Operations are only considered batches when they contain two or more + // operations, and so `db.operation.batch.size` SHOULD never be `1`. + DBOperationBatchSizeKey = attribute.Key("db.operation.batch.size") + + // 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: Recommended + // Stability: Stable + // + // Examples: "findAndModify", "HMSET", "SELECT" + // Note: It is RECOMMENDED to capture the value as provided by the application + // without attempting to do any case normalization. + // + // The operation name SHOULD NOT be extracted from `db.query.text`, + // when the database system supports query text with multiple operations + // in non-batch operations. + // + // If spaces can occur in the operation name, multiple consecutive spaces + // SHOULD be normalized to a single space. + // + // For batch operations, if the individual operations are known to have the same + // operation name + // then that operation name SHOULD be used prepended by `BATCH `, + // otherwise `db.operation.name` SHOULD be `BATCH` or some other database + // system specific term if more applicable. + DBOperationNameKey = attribute.Key("db.operation.name") + + // DBQuerySummaryKey is the attribute Key conforming to the "db.query.summary" + // semantic conventions. It represents the low cardinality summary of a database + // query. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get + // user by id" + // Note: The query summary describes a class of database queries and is useful + // as a grouping key, especially when analyzing telemetry for database + // calls involving complex queries. + // + // Summary may be available to the instrumentation through + // instrumentation hooks or other means. If it is not available, + // instrumentations + // that support query parsing SHOULD generate a summary following + // [Generating query summary] + // section. + // + // [Generating query summary]: /docs/db/database-spans.md#generating-a-summary-of-the-query + DBQuerySummaryKey = attribute.Key("db.query.summary") + + // DBQueryTextKey is the attribute Key conforming to the "db.query.text" + // semantic conventions. It represents the database query being executed. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "SELECT * FROM wuser_table where username = ?", "SET mykey ?" + // Note: For sanitization see [Sanitization of `db.query.text`]. + // For batch operations, if the individual operations are known to have the same + // query text then that query text SHOULD be used, otherwise all of the + // individual query texts SHOULD be concatenated with separator `; ` or some + // other database system specific separator if more applicable. + // Parameterized query text SHOULD NOT be sanitized. Even though parameterized + // query text can potentially have sensitive data, by using a parameterized + // query the user is giving a strong signal that any sensitive data will be + // passed as parameter values, and the benefit to observability of capturing the + // static part of the query text by default outweighs the risk. + // + // [Sanitization of `db.query.text`]: /docs/db/database-spans.md#sanitization-of-dbquerytext + DBQueryTextKey = attribute.Key("db.query.text") + + // DBResponseReturnedRowsKey is the attribute Key conforming to the + // "db.response.returned_rows" semantic conventions. It represents the number of + // rows returned by the operation. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 10, 30, 1000 + DBResponseReturnedRowsKey = attribute.Key("db.response.returned_rows") + + // DBResponseStatusCodeKey is the attribute Key conforming to the + // "db.response.status_code" semantic conventions. It represents the database + // response status code. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "102", "ORA-17002", "08P01", "404" + // Note: The status code returned by the database. Usually it represents an + // error code, but may also represent partial success, warning, or differentiate + // between various types of successful outcomes. + // Semantic conventions for individual database systems SHOULD document what + // `db.response.status_code` means in the context of that system. + DBResponseStatusCodeKey = attribute.Key("db.response.status_code") + + // DBStoredProcedureNameKey is the attribute Key conforming to the + // "db.stored_procedure.name" semantic conventions. It represents the name of a + // stored procedure within the database. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "GetCustomer" + // Note: It is RECOMMENDED to capture the value as provided by the application + // without attempting to do any case normalization. + // + // For batch operations, if the individual operations are known to have the same + // stored procedure name then that stored procedure name SHOULD be used. + DBStoredProcedureNameKey = attribute.Key("db.stored_procedure.name") + + // DBSystemNameKey is the attribute Key conforming to the "db.system.name" + // semantic conventions. It represents the database management system (DBMS) + // product as identified by the client instrumentation. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: + // 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.name` is set to `postgresql` based on the instrumentation's + // best knowledge. + DBSystemNameKey = attribute.Key("db.system.name") +) + +// DBClientConnectionPoolName returns an attribute KeyValue conforming to the +// "db.client.connection.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 parameters that would make the name unique, for +// example, combining attributes `server.address`, `server.port`, and +// `db.namespace`, formatted as `server.address:server.port/db.namespace`. +// Instrumentations that generate connection pool name following different +// patterns SHOULD document it. +func DBClientConnectionPoolName(val string) attribute.KeyValue { + return DBClientConnectionPoolNameKey.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) +} + +// DBOperationBatchSize returns an attribute KeyValue conforming to the +// "db.operation.batch.size" semantic conventions. It represents the number of +// queries included in a batch operation. +func DBOperationBatchSize(val int) attribute.KeyValue { + return DBOperationBatchSizeKey.Int(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) +} + +// DBOperationParameter returns an attribute KeyValue conforming to the +// "db.operation.parameter" semantic conventions. It represents a database +// operation parameter, with `` being the parameter name, and the attribute +// value being a string representation of the parameter value. +func DBOperationParameter(key string, val string) attribute.KeyValue { + return attribute.String("db.operation.parameter."+key, val) +} + +// DBQueryParameter returns an attribute KeyValue conforming to the +// "db.query.parameter" semantic conventions. It represents a database query +// parameter, with `` being the parameter name, and the attribute value +// being a string representation of the parameter value. +func DBQueryParameter(key string, val string) attribute.KeyValue { + return attribute.String("db.query.parameter."+key, val) +} + +// DBQuerySummary returns an attribute KeyValue conforming to the +// "db.query.summary" semantic conventions. It represents the low cardinality +// summary of a database query. +func DBQuerySummary(val string) attribute.KeyValue { + return DBQuerySummaryKey.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) +} + +// DBResponseReturnedRows returns an attribute KeyValue conforming to the +// "db.response.returned_rows" semantic conventions. It represents the number of +// rows returned by the operation. +func DBResponseReturnedRows(val int) attribute.KeyValue { + return DBResponseReturnedRowsKey.Int(val) +} + +// DBResponseStatusCode returns an attribute KeyValue conforming to the +// "db.response.status_code" semantic conventions. It represents the database +// response status code. +func DBResponseStatusCode(val string) attribute.KeyValue { + return DBResponseStatusCodeKey.String(val) +} + +// DBStoredProcedureName returns an attribute KeyValue conforming to the +// "db.stored_procedure.name" semantic conventions. It represents the name of a +// stored procedure within the database. +func DBStoredProcedureName(val string) attribute.KeyValue { + return DBStoredProcedureNameKey.String(val) +} + +// Enum values for db.client.connection.state +var ( + // idle + // Stability: development + DBClientConnectionStateIdle = DBClientConnectionStateKey.String("idle") + // used + // Stability: development + DBClientConnectionStateUsed = DBClientConnectionStateKey.String("used") +) + +// Enum values for db.system.name +var ( + // Some other SQL database. Fallback only. + // Stability: development + DBSystemNameOtherSQL = DBSystemNameKey.String("other_sql") + // [Adabas (Adaptable Database System)] + // Stability: development + // + // [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas + DBSystemNameSoftwareagAdabas = DBSystemNameKey.String("softwareag.adabas") + // [Actian Ingres] + // Stability: development + // + // [Actian Ingres]: https://www.actian.com/databases/ingres/ + DBSystemNameActianIngres = DBSystemNameKey.String("actian.ingres") + // [Amazon DynamoDB] + // Stability: development + // + // [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/ + DBSystemNameAWSDynamoDB = DBSystemNameKey.String("aws.dynamodb") + // [Amazon Redshift] + // Stability: development + // + // [Amazon Redshift]: https://aws.amazon.com/redshift/ + DBSystemNameAWSRedshift = DBSystemNameKey.String("aws.redshift") + // [Azure Cosmos DB] + // Stability: development + // + // [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db + DBSystemNameAzureCosmosDB = DBSystemNameKey.String("azure.cosmosdb") + // [InterSystems Caché] + // Stability: development + // + // [InterSystems Caché]: https://www.intersystems.com/products/cache/ + DBSystemNameIntersystemsCache = DBSystemNameKey.String("intersystems.cache") + // [Apache Cassandra] + // Stability: development + // + // [Apache Cassandra]: https://cassandra.apache.org/ + DBSystemNameCassandra = DBSystemNameKey.String("cassandra") + // [ClickHouse] + // Stability: development + // + // [ClickHouse]: https://clickhouse.com/ + DBSystemNameClickHouse = DBSystemNameKey.String("clickhouse") + // [CockroachDB] + // Stability: development + // + // [CockroachDB]: https://www.cockroachlabs.com/ + DBSystemNameCockroachDB = DBSystemNameKey.String("cockroachdb") + // [Couchbase] + // Stability: development + // + // [Couchbase]: https://www.couchbase.com/ + DBSystemNameCouchbase = DBSystemNameKey.String("couchbase") + // [Apache CouchDB] + // Stability: development + // + // [Apache CouchDB]: https://couchdb.apache.org/ + DBSystemNameCouchDB = DBSystemNameKey.String("couchdb") + // [Apache Derby] + // Stability: development + // + // [Apache Derby]: https://db.apache.org/derby/ + DBSystemNameDerby = DBSystemNameKey.String("derby") + // [Elasticsearch] + // Stability: development + // + // [Elasticsearch]: https://www.elastic.co/elasticsearch + DBSystemNameElasticsearch = DBSystemNameKey.String("elasticsearch") + // [Firebird] + // Stability: development + // + // [Firebird]: https://www.firebirdsql.org/ + DBSystemNameFirebirdSQL = DBSystemNameKey.String("firebirdsql") + // [Google Cloud Spanner] + // Stability: development + // + // [Google Cloud Spanner]: https://cloud.google.com/spanner + DBSystemNameGCPSpanner = DBSystemNameKey.String("gcp.spanner") + // [Apache Geode] + // Stability: development + // + // [Apache Geode]: https://geode.apache.org/ + DBSystemNameGeode = DBSystemNameKey.String("geode") + // [H2 Database] + // Stability: development + // + // [H2 Database]: https://h2database.com/ + DBSystemNameH2database = DBSystemNameKey.String("h2database") + // [Apache HBase] + // Stability: development + // + // [Apache HBase]: https://hbase.apache.org/ + DBSystemNameHBase = DBSystemNameKey.String("hbase") + // [Apache Hive] + // Stability: development + // + // [Apache Hive]: https://hive.apache.org/ + DBSystemNameHive = DBSystemNameKey.String("hive") + // [HyperSQL Database] + // Stability: development + // + // [HyperSQL Database]: https://hsqldb.org/ + DBSystemNameHSQLDB = DBSystemNameKey.String("hsqldb") + // [IBM Db2] + // Stability: development + // + // [IBM Db2]: https://www.ibm.com/db2 + DBSystemNameIBMDB2 = DBSystemNameKey.String("ibm.db2") + // [IBM Informix] + // Stability: development + // + // [IBM Informix]: https://www.ibm.com/products/informix + DBSystemNameIBMInformix = DBSystemNameKey.String("ibm.informix") + // [IBM Netezza] + // Stability: development + // + // [IBM Netezza]: https://www.ibm.com/products/netezza + DBSystemNameIBMNetezza = DBSystemNameKey.String("ibm.netezza") + // [InfluxDB] + // Stability: development + // + // [InfluxDB]: https://www.influxdata.com/ + DBSystemNameInfluxDB = DBSystemNameKey.String("influxdb") + // [Instant] + // Stability: development + // + // [Instant]: https://www.instantdb.com/ + DBSystemNameInstantDB = DBSystemNameKey.String("instantdb") + // [MariaDB] + // Stability: stable + // + // [MariaDB]: https://mariadb.org/ + DBSystemNameMariaDB = DBSystemNameKey.String("mariadb") + // [Memcached] + // Stability: development + // + // [Memcached]: https://memcached.org/ + DBSystemNameMemcached = DBSystemNameKey.String("memcached") + // [MongoDB] + // Stability: development + // + // [MongoDB]: https://www.mongodb.com/ + DBSystemNameMongoDB = DBSystemNameKey.String("mongodb") + // [Microsoft SQL Server] + // Stability: stable + // + // [Microsoft SQL Server]: https://www.microsoft.com/sql-server + DBSystemNameMicrosoftSQLServer = DBSystemNameKey.String("microsoft.sql_server") + // [MySQL] + // Stability: stable + // + // [MySQL]: https://www.mysql.com/ + DBSystemNameMySQL = DBSystemNameKey.String("mysql") + // [Neo4j] + // Stability: development + // + // [Neo4j]: https://neo4j.com/ + DBSystemNameNeo4j = DBSystemNameKey.String("neo4j") + // [OpenSearch] + // Stability: development + // + // [OpenSearch]: https://opensearch.org/ + DBSystemNameOpenSearch = DBSystemNameKey.String("opensearch") + // [Oracle Database] + // Stability: development + // + // [Oracle Database]: https://www.oracle.com/database/ + DBSystemNameOracleDB = DBSystemNameKey.String("oracle.db") + // [PostgreSQL] + // Stability: stable + // + // [PostgreSQL]: https://www.postgresql.org/ + DBSystemNamePostgreSQL = DBSystemNameKey.String("postgresql") + // [Redis] + // Stability: development + // + // [Redis]: https://redis.io/ + DBSystemNameRedis = DBSystemNameKey.String("redis") + // [SAP HANA] + // Stability: development + // + // [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html + DBSystemNameSAPHANA = DBSystemNameKey.String("sap.hana") + // [SAP MaxDB] + // Stability: development + // + // [SAP MaxDB]: https://maxdb.sap.com/ + DBSystemNameSAPMaxDB = DBSystemNameKey.String("sap.maxdb") + // [SQLite] + // Stability: development + // + // [SQLite]: https://www.sqlite.org/ + DBSystemNameSQLite = DBSystemNameKey.String("sqlite") + // [Teradata] + // Stability: development + // + // [Teradata]: https://www.teradata.com/ + DBSystemNameTeradata = DBSystemNameKey.String("teradata") + // [Trino] + // Stability: development + // + // [Trino]: https://trino.io/ + DBSystemNameTrino = DBSystemNameKey.String("trino") +) + +// Namespace: deployment +const ( + // DeploymentEnvironmentNameKey is the attribute Key conforming to the + // "deployment.environment.name" semantic conventions. It represents the name of + // the [deployment environment] (aka deployment tier). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "staging", "production" + // Note: `deployment.environment.name` 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.name=production` + // - `service.name=frontend`, `deployment.environment.name=staging`. + // + // + // [deployment environment]: https://wikipedia.org/wiki/Deployment_environment + DeploymentEnvironmentNameKey = attribute.Key("deployment.environment.name") + + // DeploymentIDKey is the attribute Key conforming to the "deployment.id" + // semantic conventions. It represents the id of the deployment. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1208" + DeploymentIDKey = attribute.Key("deployment.id") + + // DeploymentNameKey is the attribute Key conforming to the "deployment.name" + // semantic conventions. It represents the name of the deployment. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "deploy my app", "deploy-frontend" + DeploymentNameKey = attribute.Key("deployment.name") + + // DeploymentStatusKey is the attribute Key conforming to the + // "deployment.status" semantic conventions. It represents the status of the + // deployment. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + DeploymentStatusKey = attribute.Key("deployment.status") +) + +// DeploymentEnvironmentName returns an attribute KeyValue conforming to the +// "deployment.environment.name" semantic conventions. It represents the name of +// the [deployment environment] (aka deployment tier). +// +// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment +func DeploymentEnvironmentName(val string) attribute.KeyValue { + return DeploymentEnvironmentNameKey.String(val) +} + +// DeploymentID returns an attribute KeyValue conforming to the "deployment.id" +// semantic conventions. It represents the id of the deployment. +func DeploymentID(val string) attribute.KeyValue { + return DeploymentIDKey.String(val) +} + +// DeploymentName returns an attribute KeyValue conforming to the +// "deployment.name" semantic conventions. It represents the name of the +// deployment. +func DeploymentName(val string) attribute.KeyValue { + return DeploymentNameKey.String(val) +} + +// Enum values for deployment.status +var ( + // failed + // Stability: development + DeploymentStatusFailed = DeploymentStatusKey.String("failed") + // succeeded + // Stability: development + DeploymentStatusSucceeded = DeploymentStatusKey.String("succeeded") +) + +// Namespace: destination +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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) +} + +// Namespace: device +const ( + // DeviceIDKey is the attribute Key conforming to the "device.id" semantic + // conventions. It represents a unique identifier representing the device. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "123456789012345", "01:23:45:67:89:AB" + // Note: Its value SHOULD be identical for all apps on a device and it SHOULD + // NOT change if an app is uninstalled and re-installed. + // However, it might be resettable by the user for all apps on a device. + // Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be + // used as values. + // + // More information about Android identifier best practices can be found in the + // [Android user data IDs guide]. + // + // > [!WARNING]> This attribute may contain sensitive (PII) information. 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.> Due to these reasons, this + // > identifier is not recommended for consumer applications and will likely + // > result in rejection from both Google Play and App Store. + // > However, it may be appropriate for specific enterprise scenarios, such as + // > kiosk devices or enterprise-managed devices, with appropriate compliance + // > clearance. + // > Any instrumentation providing this identifier MUST implement it as an + // > opt-in feature.> See [`app.installation.id`]> for a more + // > privacy-preserving alternative. + // + // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids + // [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id + 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: Recommended + // Stability: Development + // + // Examples: "Apple", "Samsung" + // Note: The Android OS provides this field via [Build]. iOS apps SHOULD + // hardcode the value `Apple`. + // + // [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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) +} + +// Namespace: disk +const ( + // DiskIODirectionKey is the attribute Key conforming to the "disk.io.direction" + // semantic conventions. It represents the disk IO operation direction. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "read" + DiskIODirectionKey = attribute.Key("disk.io.direction") +) + +// Enum values for disk.io.direction +var ( + // read + // Stability: development + DiskIODirectionRead = DiskIODirectionKey.String("read") + // write + // Stability: development + DiskIODirectionWrite = DiskIODirectionKey.String("write") +) + +// Namespace: dns +const ( + // DNSAnswersKey is the attribute Key conforming to the "dns.answers" semantic + // conventions. It represents the list of IPv4 or IPv6 addresses resolved during + // DNS lookup. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + DNSAnswersKey = attribute.Key("dns.answers") + + // DNSQuestionNameKey is the attribute Key conforming to the "dns.question.name" + // semantic conventions. It represents the name being queried. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "www.example.com", "opentelemetry.io" + // Note: The name represents the queried domain name as it appears in the DNS + // query without any additional normalization. + DNSQuestionNameKey = attribute.Key("dns.question.name") +) + +// DNSAnswers returns an attribute KeyValue conforming to the "dns.answers" +// semantic conventions. It represents the list of IPv4 or IPv6 addresses +// resolved during DNS lookup. +func DNSAnswers(val ...string) attribute.KeyValue { + return DNSAnswersKey.StringSlice(val) +} + +// 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) +} + +// Namespace: elasticsearch +const ( + // ElasticsearchNodeNameKey is the attribute Key conforming to the + // "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: Recommended + // Stability: Development + // + // Examples: "instance-0000000001" + ElasticsearchNodeNameKey = attribute.Key("elasticsearch.node.name") +) + +// ElasticsearchNodeName returns an attribute KeyValue conforming to the +// "elasticsearch.node.name" semantic conventions. It represents the represents +// the human-readable identifier of the node/instance to which a request was +// routed. +func ElasticsearchNodeName(val string) attribute.KeyValue { + return ElasticsearchNodeNameKey.String(val) +} + +// Namespace: enduser +const ( + // EnduserIDKey is the attribute Key conforming to the "enduser.id" semantic + // conventions. It represents the unique identifier of an end user in the + // system. It maybe a username, email address, or other identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "username" + // Note: Unique identifier of an end user in the system. + // + // > [!Warning] + // > This field contains sensitive (PII) information. + EnduserIDKey = attribute.Key("enduser.id") + + // EnduserPseudoIDKey is the attribute Key conforming to the "enduser.pseudo.id" + // semantic conventions. It represents the pseudonymous identifier of an end + // user. This identifier should be a random value that is not directly linked or + // associated with the end user's actual identity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "QdH5CAWJgqVT4rOr0qtumf" + // Note: Pseudonymous identifier of an end user. + // + // > [!Warning] + // > This field contains sensitive (linkable PII) information. + EnduserPseudoIDKey = attribute.Key("enduser.pseudo.id") +) + +// EnduserID returns an attribute KeyValue conforming to the "enduser.id" +// semantic conventions. It represents the unique identifier of an end user in +// the system. It maybe a username, email address, or other identifier. +func EnduserID(val string) attribute.KeyValue { + return EnduserIDKey.String(val) +} + +// EnduserPseudoID returns an attribute KeyValue conforming to the +// "enduser.pseudo.id" semantic conventions. It represents the pseudonymous +// identifier of an end user. This identifier should be a random value that is +// not directly linked or associated with the end user's actual identity. +func EnduserPseudoID(val string) attribute.KeyValue { + return EnduserPseudoIDKey.String(val) +} + +// Namespace: error +const ( + // ErrorMessageKey is the attribute Key conforming to the "error.message" + // semantic conventions. It represents a message providing more detail about an + // error in human-readable form. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Unexpected input type: string", "The user has exceeded their + // storage quota" + // Note: `error.message` should provide additional context and detail about an + // error. + // It is NOT RECOMMENDED to duplicate the value of `error.type` in + // `error.message`. + // It is also NOT RECOMMENDED to duplicate the value of `exception.message` in + // `error.message`. + // + // `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded + // cardinality and overlap with span status. + ErrorMessageKey = attribute.Key("error.message") + + // 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: Recommended + // 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 RPC 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") +) + +// ErrorMessage returns an attribute KeyValue conforming to the "error.message" +// semantic conventions. It represents a message providing more detail about an +// error in human-readable form. +func ErrorMessage(val string) attribute.KeyValue { + return ErrorMessageKey.String(val) +} + +// Enum values for error.type +var ( + // A fallback error value to be used when the instrumentation doesn't define a + // custom value. + // + // Stability: stable + ErrorTypeOther = ErrorTypeKey.String("_OTHER") +) + +// Namespace: exception +const ( + // ExceptionMessageKey is the attribute Key conforming to the + // "exception.message" semantic conventions. It represents the exception + // message. + // + // Type: string + // RequirementLevel: Recommended + // 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: Recommended + // 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: Recommended + // Stability: Stable + // + // Examples: "java.net.ConnectException", "OSError" + ExceptionTypeKey = attribute.Key("exception.type") +) + +// 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) +} + +// Namespace: faas +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: Recommended + // Stability: Development + // + // Examples: + 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0/5 * * * ? * + // + // [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + 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] format expressed in + // [UTC]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 2020-01-23T13:47:06Z + // + // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html + // [UTC]: https://www.w3.org/TR/NOTE-datetime + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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.name`] + // 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). + // + // + // [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes + 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] format expressed in [UTC]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 2020-01-23T13:47:06Z + // + // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html + // [UTC]: https://www.w3.org/TR/NOTE-datetime + 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // Examples: "26", "pinkfroid-00002" + // Note: Depending on the cloud provider and platform, use: + // + // - **AWS Lambda:** The [function version] + // (an integer represented as a decimal string). + // - **Google Cloud Run (Services):** The [revision] + // (i.e., the function name plus the revision suffix). + // - **Google Cloud Functions:** The value of the + // [`K_REVISION` environment variable]. + // - **Azure Functions:** Not applicable. Do not set this attribute. + // + // + // [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html + // [revision]: https://cloud.google.com/run/docs/managing/revisions + // [`K_REVISION` environment variable]: https://cloud.google.com/run/docs/container-contract#services-env-vars + FaaSVersionKey = attribute.Key("faas.version") +) + +// 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]. +// +// [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] format expressed in +// [UTC]. +// +// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html +// [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] format expressed in [UTC]. +// +// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html +// [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) +} + +// Enum values for faas.document.operation +var ( + // When a new object is created. + // Stability: development + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified. + // Stability: development + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted. + // Stability: development + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +// Enum values for faas.invoked_provider +var ( + // Alibaba Cloud + // Stability: development + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + // Stability: development + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + // Stability: development + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + // Stability: development + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + // Stability: development + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +// Enum values for faas.trigger +var ( + // A response to some data source operation such as a database or filesystem + // read/write + // Stability: development + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + // Stability: development + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + // Stability: development + FaaSTriggerPubSub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + // Stability: development + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + // Stability: development + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// Namespace: feature_flag +const ( + // FeatureFlagContextIDKey is the attribute Key conforming to the + // "feature_flag.context.id" semantic conventions. It represents the unique + // identifier for the flag evaluation context. For example, the targeting key. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // Examples: "5157782b-2203-4c80-a857-dbbd5e7761db" + FeatureFlagContextIDKey = attribute.Key("feature_flag.context.id") + + // FeatureFlagKeyKey is the attribute Key conforming to the "feature_flag.key" + // semantic conventions. It represents the lookup key of the feature flag. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // 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 + // identifies the feature flag provider. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // Examples: "Flag Manager" + FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider.name") + + // FeatureFlagResultReasonKey is the attribute Key conforming to the + // "feature_flag.result.reason" semantic conventions. It represents the reason + // code which shows how a feature flag value was determined. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // Examples: "static", "targeting_match", "error", "default" + FeatureFlagResultReasonKey = attribute.Key("feature_flag.result.reason") + + // FeatureFlagResultValueKey is the attribute Key conforming to the + // "feature_flag.result.value" semantic conventions. It represents the evaluated + // value of the feature flag. + // + // Type: any + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // Examples: "#ff0000", true, 3 + // Note: With some feature flag providers, feature flag results can be quite + // large or contain private or sensitive details. + // Because of this, `feature_flag.result.variant` is often the preferred + // attribute if it is available. + // + // It may be desirable to redact or otherwise limit the size and scope of + // `feature_flag.result.value` if possible. + // Because the evaluated flag value is unstructured and may be any type, it is + // left to the instrumentation author to determine how best to achieve this. + FeatureFlagResultValueKey = attribute.Key("feature_flag.result.value") + + // FeatureFlagResultVariantKey is the attribute Key conforming to the + // "feature_flag.result.variant" semantic conventions. It represents a semantic + // identifier for an evaluated flag value. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // 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`. + FeatureFlagResultVariantKey = attribute.Key("feature_flag.result.variant") + + // FeatureFlagSetIDKey is the attribute Key conforming to the + // "feature_flag.set.id" semantic conventions. It represents the identifier of + // the [flag set] to which the feature flag belongs. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // Examples: "proj-1", "ab98sgs", "service1/dev" + // + // [flag set]: https://openfeature.dev/specification/glossary/#flag-set + FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id") + + // FeatureFlagVersionKey is the attribute Key conforming to the + // "feature_flag.version" semantic conventions. It represents the version of the + // ruleset used during the evaluation. This may be any stable value which + // uniquely identifies the ruleset. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Release_Candidate + // + // Examples: "1", "01ABCDEF" + FeatureFlagVersionKey = attribute.Key("feature_flag.version") +) + +// FeatureFlagContextID returns an attribute KeyValue conforming to the +// "feature_flag.context.id" semantic conventions. It represents the unique +// identifier for the flag evaluation context. For example, the targeting key. +func FeatureFlagContextID(val string) attribute.KeyValue { + return FeatureFlagContextIDKey.String(val) +} + +// FeatureFlagKey returns an attribute KeyValue conforming to the +// "feature_flag.key" semantic conventions. It represents the lookup key 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 +// identifies the feature flag provider. +func FeatureFlagProviderName(val string) attribute.KeyValue { + return FeatureFlagProviderNameKey.String(val) +} + +// FeatureFlagResultVariant returns an attribute KeyValue conforming to the +// "feature_flag.result.variant" semantic conventions. It represents a semantic +// identifier for an evaluated flag value. +func FeatureFlagResultVariant(val string) attribute.KeyValue { + return FeatureFlagResultVariantKey.String(val) +} + +// FeatureFlagSetID returns an attribute KeyValue conforming to the +// "feature_flag.set.id" semantic conventions. It represents the identifier of +// the [flag set] to which the feature flag belongs. +// +// [flag set]: https://openfeature.dev/specification/glossary/#flag-set +func FeatureFlagSetID(val string) attribute.KeyValue { + return FeatureFlagSetIDKey.String(val) +} + +// FeatureFlagVersion returns an attribute KeyValue conforming to the +// "feature_flag.version" semantic conventions. It represents the version of the +// ruleset used during the evaluation. This may be any stable value which +// uniquely identifies the ruleset. +func FeatureFlagVersion(val string) attribute.KeyValue { + return FeatureFlagVersionKey.String(val) +} + +// Enum values for feature_flag.result.reason +var ( + // The resolved value is static (no dynamic evaluation). + // Stability: release_candidate + FeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String("static") + // The resolved value fell back to a pre-configured value (no dynamic evaluation + // occurred or dynamic evaluation yielded no result). + // Stability: release_candidate + FeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String("default") + // The resolved value was the result of a dynamic evaluation, such as a rule or + // specific user-targeting. + // Stability: release_candidate + FeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String("targeting_match") + // The resolved value was the result of pseudorandom assignment. + // Stability: release_candidate + FeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String("split") + // The resolved value was retrieved from cache. + // Stability: release_candidate + FeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String("cached") + // The resolved value was the result of the flag being disabled in the + // management system. + // Stability: release_candidate + FeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String("disabled") + // The reason for the resolved value could not be determined. + // Stability: release_candidate + FeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String("unknown") + // The resolved value is non-authoritative or possibly out of date + // Stability: release_candidate + FeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String("stale") + // The resolved value was the result of an error. + // Stability: release_candidate + FeatureFlagResultReasonError = FeatureFlagResultReasonKey.String("error") +) + +// Namespace: file +const ( + // FileAccessedKey is the attribute Key conforming to the "file.accessed" + // semantic conventions. It represents the time when the file was last accessed, + // in ISO 8601 format. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2021-01-01T12:00:00Z" + // Note: This attribute might not be supported by some file systems — NFS, + // FAT32, in embedded OS, etc. + FileAccessedKey = attribute.Key("file.accessed") + + // FileAttributesKey is the attribute Key conforming to the "file.attributes" + // semantic conventions. It represents the array of file attributes. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "readonly", "hidden" + // Note: Attributes names depend on the OS or file system. Here’s a + // non-exhaustive list of values expected for this attribute: `archive`, + // `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, + // `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, + // `write`. + FileAttributesKey = attribute.Key("file.attributes") + + // FileChangedKey is the attribute Key conforming to the "file.changed" semantic + // conventions. It represents the time when the file attributes or metadata was + // last changed, in ISO 8601 format. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2021-01-01T12:00:00Z" + // Note: `file.changed` captures the time when any of the file's properties or + // attributes (including the content) are changed, while `file.modified` + // captures the timestamp when the file content is modified. + FileChangedKey = attribute.Key("file.changed") + + // FileCreatedKey is the attribute Key conforming to the "file.created" semantic + // conventions. It represents the time when the file was created, in ISO 8601 + // format. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2021-01-01T12:00:00Z" + // Note: This attribute might not be supported by some file systems — NFS, + // FAT32, in embedded OS, etc. + FileCreatedKey = attribute.Key("file.created") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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") + + // FileForkNameKey is the attribute Key conforming to the "file.fork_name" + // semantic conventions. It represents the name of the fork. A fork is + // additional data associated with a filesystem object. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Zone.Identifier" + // Note: On Linux, a resource fork is used to store additional data with a + // filesystem object. A file always has at least one fork for the data portion, + // and additional forks may exist. + // On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default + // data stream for a file is just called $DATA. Zone.Identifier is commonly used + // by Windows to track contents downloaded from the Internet. An ADS is + // typically of the form: C:\path\to\filename.extension:some_fork_name, and + // some_fork_name is the value that should populate `fork_name`. + // `filename.extension` should populate `file.name`, and `extension` should + // populate `file.extension`. The full path, `file.path`, will include the fork + // name. + FileForkNameKey = attribute.Key("file.fork_name") + + // FileGroupIDKey is the attribute Key conforming to the "file.group.id" + // semantic conventions. It represents the primary Group ID (GID) of the file. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1000" + FileGroupIDKey = attribute.Key("file.group.id") + + // FileGroupNameKey is the attribute Key conforming to the "file.group.name" + // semantic conventions. It represents the primary group name of the file. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "users" + FileGroupNameKey = attribute.Key("file.group.name") + + // FileInodeKey is the attribute Key conforming to the "file.inode" semantic + // conventions. It represents the inode representing the file in the filesystem. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "256383" + FileInodeKey = attribute.Key("file.inode") + + // FileModeKey is the attribute Key conforming to the "file.mode" semantic + // conventions. It represents the mode of the file in octal representation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "0640" + FileModeKey = attribute.Key("file.mode") + + // FileModifiedKey is the attribute Key conforming to the "file.modified" + // semantic conventions. It represents the time when the file content was last + // modified, in ISO 8601 format. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2021-01-01T12:00:00Z" + FileModifiedKey = attribute.Key("file.modified") + + // 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: Recommended + // Stability: Development + // + // Examples: "example.png" + FileNameKey = attribute.Key("file.name") + + // FileOwnerIDKey is the attribute Key conforming to the "file.owner.id" + // semantic conventions. It represents the user ID (UID) or security identifier + // (SID) of the file owner. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1000" + FileOwnerIDKey = attribute.Key("file.owner.id") + + // FileOwnerNameKey is the attribute Key conforming to the "file.owner.name" + // semantic conventions. It represents the username of the file owner. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "root" + FileOwnerNameKey = attribute.Key("file.owner.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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + FileSizeKey = attribute.Key("file.size") + + // FileSymbolicLinkTargetPathKey is the attribute Key conforming to the + // "file.symbolic_link.target_path" semantic conventions. It represents the path + // to the target of a symbolic link. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "/usr/bin/python3" + // Note: This attribute is only applicable to symbolic links. + FileSymbolicLinkTargetPathKey = attribute.Key("file.symbolic_link.target_path") +) + +// FileAccessed returns an attribute KeyValue conforming to the "file.accessed" +// semantic conventions. It represents the time when the file was last accessed, +// in ISO 8601 format. +func FileAccessed(val string) attribute.KeyValue { + return FileAccessedKey.String(val) +} + +// FileAttributes returns an attribute KeyValue conforming to the +// "file.attributes" semantic conventions. It represents the array of file +// attributes. +func FileAttributes(val ...string) attribute.KeyValue { + return FileAttributesKey.StringSlice(val) +} + +// FileChanged returns an attribute KeyValue conforming to the "file.changed" +// semantic conventions. It represents the time when the file attributes or +// metadata was last changed, in ISO 8601 format. +func FileChanged(val string) attribute.KeyValue { + return FileChangedKey.String(val) +} + +// FileCreated returns an attribute KeyValue conforming to the "file.created" +// semantic conventions. It represents the time when the file was created, in ISO +// 8601 format. +func FileCreated(val string) attribute.KeyValue { + return FileCreatedKey.String(val) +} + +// 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) +} + +// FileForkName returns an attribute KeyValue conforming to the "file.fork_name" +// semantic conventions. It represents the name of the fork. A fork is additional +// data associated with a filesystem object. +func FileForkName(val string) attribute.KeyValue { + return FileForkNameKey.String(val) +} + +// FileGroupID returns an attribute KeyValue conforming to the "file.group.id" +// semantic conventions. It represents the primary Group ID (GID) of the file. +func FileGroupID(val string) attribute.KeyValue { + return FileGroupIDKey.String(val) +} + +// FileGroupName returns an attribute KeyValue conforming to the +// "file.group.name" semantic conventions. It represents the primary group name +// of the file. +func FileGroupName(val string) attribute.KeyValue { + return FileGroupNameKey.String(val) +} + +// FileInode returns an attribute KeyValue conforming to the "file.inode" +// semantic conventions. It represents the inode representing the file in the +// filesystem. +func FileInode(val string) attribute.KeyValue { + return FileInodeKey.String(val) +} + +// FileMode returns an attribute KeyValue conforming to the "file.mode" semantic +// conventions. It represents the mode of the file in octal representation. +func FileMode(val string) attribute.KeyValue { + return FileModeKey.String(val) +} + +// FileModified returns an attribute KeyValue conforming to the "file.modified" +// semantic conventions. It represents the time when the file content was last +// modified, in ISO 8601 format. +func FileModified(val string) attribute.KeyValue { + return FileModifiedKey.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) +} + +// FileOwnerID returns an attribute KeyValue conforming to the "file.owner.id" +// semantic conventions. It represents the user ID (UID) or security identifier +// (SID) of the file owner. +func FileOwnerID(val string) attribute.KeyValue { + return FileOwnerIDKey.String(val) +} + +// FileOwnerName returns an attribute KeyValue conforming to the +// "file.owner.name" semantic conventions. It represents the username of the file +// owner. +func FileOwnerName(val string) attribute.KeyValue { + return FileOwnerNameKey.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) +} + +// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the +// "file.symbolic_link.target_path" semantic conventions. It represents the path +// to the target of a symbolic link. +func FileSymbolicLinkTargetPath(val string) attribute.KeyValue { + return FileSymbolicLinkTargetPathKey.String(val) +} + +// Namespace: gcp +const ( + // GCPAppHubApplicationContainerKey is the attribute Key conforming to the + // "gcp.apphub.application.container" semantic conventions. It represents the + // container within GCP where the AppHub application is defined. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "projects/my-container-project" + GCPAppHubApplicationContainerKey = attribute.Key("gcp.apphub.application.container") + + // GCPAppHubApplicationIDKey is the attribute Key conforming to the + // "gcp.apphub.application.id" semantic conventions. It represents the name of + // the application as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-application" + GCPAppHubApplicationIDKey = attribute.Key("gcp.apphub.application.id") + + // GCPAppHubApplicationLocationKey is the attribute Key conforming to the + // "gcp.apphub.application.location" semantic conventions. It represents the GCP + // zone or region where the application is defined. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "us-central1" + GCPAppHubApplicationLocationKey = attribute.Key("gcp.apphub.application.location") + + // GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the + // "gcp.apphub.service.criticality_type" semantic conventions. It represents the + // criticality of a service indicates its importance to the business. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub type enum] + // + // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type + GCPAppHubServiceCriticalityTypeKey = attribute.Key("gcp.apphub.service.criticality_type") + + // GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the + // "gcp.apphub.service.environment_type" semantic conventions. It represents the + // environment of a service is the stage of a software lifecycle. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub environment type] + // + // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 + GCPAppHubServiceEnvironmentTypeKey = attribute.Key("gcp.apphub.service.environment_type") + + // GCPAppHubServiceIDKey is the attribute Key conforming to the + // "gcp.apphub.service.id" semantic conventions. It represents the name of the + // service as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-service" + GCPAppHubServiceIDKey = attribute.Key("gcp.apphub.service.id") + + // GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the + // "gcp.apphub.workload.criticality_type" semantic conventions. It represents + // the criticality of a workload indicates its importance to the business. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub type enum] + // + // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type + GCPAppHubWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub.workload.criticality_type") + + // GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the + // "gcp.apphub.workload.environment_type" semantic conventions. It represents + // the environment of a workload is the stage of a software lifecycle. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub environment type] + // + // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 + GCPAppHubWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub.workload.environment_type") + + // GCPAppHubWorkloadIDKey is the attribute Key conforming to the + // "gcp.apphub.workload.id" semantic conventions. It represents the name of the + // workload as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-workload" + GCPAppHubWorkloadIDKey = attribute.Key("gcp.apphub.workload.id") + + // GCPAppHubDestinationApplicationContainerKey is the attribute Key conforming + // to the "gcp.apphub_destination.application.container" semantic conventions. + // It represents the container within GCP where the AppHub destination + // application is defined. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "projects/my-container-project" + GCPAppHubDestinationApplicationContainerKey = attribute.Key("gcp.apphub_destination.application.container") + + // GCPAppHubDestinationApplicationIDKey is the attribute Key conforming to the + // "gcp.apphub_destination.application.id" semantic conventions. It represents + // the name of the destination application as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-application" + GCPAppHubDestinationApplicationIDKey = attribute.Key("gcp.apphub_destination.application.id") + + // GCPAppHubDestinationApplicationLocationKey is the attribute Key conforming to + // the "gcp.apphub_destination.application.location" semantic conventions. It + // represents the GCP zone or region where the destination application is + // defined. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "us-central1" + GCPAppHubDestinationApplicationLocationKey = attribute.Key("gcp.apphub_destination.application.location") + + // GCPAppHubDestinationServiceCriticalityTypeKey is the attribute Key conforming + // to the "gcp.apphub_destination.service.criticality_type" semantic + // conventions. It represents the criticality of a destination workload + // indicates its importance to the business as specified in [AppHub type enum]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type + GCPAppHubDestinationServiceCriticalityTypeKey = attribute.Key("gcp.apphub_destination.service.criticality_type") + + // GCPAppHubDestinationServiceEnvironmentTypeKey is the attribute Key conforming + // to the "gcp.apphub_destination.service.environment_type" semantic + // conventions. It represents the software lifecycle stage of a destination + // service as defined [AppHub environment type]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 + GCPAppHubDestinationServiceEnvironmentTypeKey = attribute.Key("gcp.apphub_destination.service.environment_type") + + // GCPAppHubDestinationServiceIDKey is the attribute Key conforming to the + // "gcp.apphub_destination.service.id" semantic conventions. It represents the + // name of the destination service as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-service" + GCPAppHubDestinationServiceIDKey = attribute.Key("gcp.apphub_destination.service.id") + + // GCPAppHubDestinationWorkloadCriticalityTypeKey is the attribute Key + // conforming to the "gcp.apphub_destination.workload.criticality_type" semantic + // conventions. It represents the criticality of a destination workload + // indicates its importance to the business as specified in [AppHub type enum]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type + GCPAppHubDestinationWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub_destination.workload.criticality_type") + + // GCPAppHubDestinationWorkloadEnvironmentTypeKey is the attribute Key + // conforming to the "gcp.apphub_destination.workload.environment_type" semantic + // conventions. It represents the environment of a destination workload is the + // stage of a software lifecycle as provided in the [AppHub environment type]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 + GCPAppHubDestinationWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub_destination.workload.environment_type") + + // GCPAppHubDestinationWorkloadIDKey is the attribute Key conforming to the + // "gcp.apphub_destination.workload.id" semantic conventions. It represents the + // name of the destination workload as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-workload" + GCPAppHubDestinationWorkloadIDKey = attribute.Key("gcp.apphub_destination.workload.id") + + // GCPClientServiceKey is the attribute Key conforming to the + // "gcp.client.service" semantic conventions. It represents the identifies the + // Google Cloud service for which the official client library is intended. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "appengine", "run", "firestore", "alloydb", "spanner" + // Note: Intended to be a stable identifier for Google Cloud client libraries + // that is uniform across implementation languages. The value should be derived + // from the canonical service domain for the service; for example, + // 'foo.googleapis.com' should result in a value of 'foo'. + GCPClientServiceKey = attribute.Key("gcp.client.service") + + // GCPCloudRunJobExecutionKey is the attribute Key conforming to the + // "gcp.cloud_run.job.execution" semantic conventions. It represents the name of + // the Cloud Run [execution] being run for the Job, as set by the + // [`CLOUD_RUN_EXECUTION`] environment variable. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "job-name-xxxx", "sample-job-mdw84" + // + // [execution]: https://cloud.google.com/run/docs/managing/job-executions + // [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars + 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`] + // environment variable. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0, 1 + // + // [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars + GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") + + // 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] + // . + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-host1234.example.com", + // "sample-vm.us-west1-b.c.my-project.internal" + // + // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm + 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "instance-1", "my-vm-name" + // + // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names + GCPGCEInstanceNameKey = attribute.Key("gcp.gce.instance.name") +) + +// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the +// "gcp.apphub.application.container" semantic conventions. It represents the +// container within GCP where the AppHub application is defined. +func GCPAppHubApplicationContainer(val string) attribute.KeyValue { + return GCPAppHubApplicationContainerKey.String(val) +} + +// GCPAppHubApplicationID returns an attribute KeyValue conforming to the +// "gcp.apphub.application.id" semantic conventions. It represents the name of +// the application as configured in AppHub. +func GCPAppHubApplicationID(val string) attribute.KeyValue { + return GCPAppHubApplicationIDKey.String(val) +} + +// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the +// "gcp.apphub.application.location" semantic conventions. It represents the GCP +// zone or region where the application is defined. +func GCPAppHubApplicationLocation(val string) attribute.KeyValue { + return GCPAppHubApplicationLocationKey.String(val) +} + +// GCPAppHubServiceID returns an attribute KeyValue conforming to the +// "gcp.apphub.service.id" semantic conventions. It represents the name of the +// service as configured in AppHub. +func GCPAppHubServiceID(val string) attribute.KeyValue { + return GCPAppHubServiceIDKey.String(val) +} + +// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the +// "gcp.apphub.workload.id" semantic conventions. It represents the name of the +// workload as configured in AppHub. +func GCPAppHubWorkloadID(val string) attribute.KeyValue { + return GCPAppHubWorkloadIDKey.String(val) +} + +// GCPAppHubDestinationApplicationContainer returns an attribute KeyValue +// conforming to the "gcp.apphub_destination.application.container" semantic +// conventions. It represents the container within GCP where the AppHub +// destination application is defined. +func GCPAppHubDestinationApplicationContainer(val string) attribute.KeyValue { + return GCPAppHubDestinationApplicationContainerKey.String(val) +} + +// GCPAppHubDestinationApplicationID returns an attribute KeyValue conforming to +// the "gcp.apphub_destination.application.id" semantic conventions. It +// represents the name of the destination application as configured in AppHub. +func GCPAppHubDestinationApplicationID(val string) attribute.KeyValue { + return GCPAppHubDestinationApplicationIDKey.String(val) +} + +// GCPAppHubDestinationApplicationLocation returns an attribute KeyValue +// conforming to the "gcp.apphub_destination.application.location" semantic +// conventions. It represents the GCP zone or region where the destination +// application is defined. +func GCPAppHubDestinationApplicationLocation(val string) attribute.KeyValue { + return GCPAppHubDestinationApplicationLocationKey.String(val) +} + +// GCPAppHubDestinationServiceID returns an attribute KeyValue conforming to the +// "gcp.apphub_destination.service.id" semantic conventions. It represents the +// name of the destination service as configured in AppHub. +func GCPAppHubDestinationServiceID(val string) attribute.KeyValue { + return GCPAppHubDestinationServiceIDKey.String(val) +} + +// GCPAppHubDestinationWorkloadID returns an attribute KeyValue conforming to the +// "gcp.apphub_destination.workload.id" semantic conventions. It represents the +// name of the destination workload as configured in AppHub. +func GCPAppHubDestinationWorkloadID(val string) attribute.KeyValue { + return GCPAppHubDestinationWorkloadIDKey.String(val) +} + +// GCPClientService returns an attribute KeyValue conforming to the +// "gcp.client.service" semantic conventions. It represents the identifies the +// Google Cloud service for which the official client library is intended. +func GCPClientService(val string) attribute.KeyValue { + return GCPClientServiceKey.String(val) +} + +// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.execution" semantic conventions. It represents the name of +// the Cloud Run [execution] being run for the Job, as set by the +// [`CLOUD_RUN_EXECUTION`] environment variable. +// +// [execution]: https://cloud.google.com/run/docs/managing/job-executions +// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars +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`] +// environment variable. +// +// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars +func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { + return GCPCloudRunJobTaskIndexKey.Int(val) +} + +// 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] +// . +// +// [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]. +// +// [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) +} + +// Enum values for gcp.apphub.service.criticality_type +var ( + // Mission critical service. + // Stability: development + GCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String("MISSION_CRITICAL") + // High impact. + // Stability: development + GCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String("HIGH") + // Medium impact. + // Stability: development + GCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String("MEDIUM") + // Low impact. + // Stability: development + GCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String("LOW") +) + +// Enum values for gcp.apphub.service.environment_type +var ( + // Production environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String("PRODUCTION") + // Staging environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String("STAGING") + // Test environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String("TEST") + // Development environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String("DEVELOPMENT") +) + +// Enum values for gcp.apphub.workload.criticality_type +var ( + // Mission critical service. + // Stability: development + GCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String("MISSION_CRITICAL") + // High impact. + // Stability: development + GCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String("HIGH") + // Medium impact. + // Stability: development + GCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String("MEDIUM") + // Low impact. + // Stability: development + GCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String("LOW") +) + +// Enum values for gcp.apphub.workload.environment_type +var ( + // Production environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String("PRODUCTION") + // Staging environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String("STAGING") + // Test environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String("TEST") + // Development environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String("DEVELOPMENT") +) + +// Enum values for gcp.apphub_destination.service.criticality_type +var ( + // Mission critical service. + // Stability: development + GCPAppHubDestinationServiceCriticalityTypeMissionCritical = GCPAppHubDestinationServiceCriticalityTypeKey.String("MISSION_CRITICAL") + // High impact. + // Stability: development + GCPAppHubDestinationServiceCriticalityTypeHigh = GCPAppHubDestinationServiceCriticalityTypeKey.String("HIGH") + // Medium impact. + // Stability: development + GCPAppHubDestinationServiceCriticalityTypeMedium = GCPAppHubDestinationServiceCriticalityTypeKey.String("MEDIUM") + // Low impact. + // Stability: development + GCPAppHubDestinationServiceCriticalityTypeLow = GCPAppHubDestinationServiceCriticalityTypeKey.String("LOW") +) + +// Enum values for gcp.apphub_destination.service.environment_type +var ( + // Production environment. + // Stability: development + GCPAppHubDestinationServiceEnvironmentTypeProduction = GCPAppHubDestinationServiceEnvironmentTypeKey.String("PRODUCTION") + // Staging environment. + // Stability: development + GCPAppHubDestinationServiceEnvironmentTypeStaging = GCPAppHubDestinationServiceEnvironmentTypeKey.String("STAGING") + // Test environment. + // Stability: development + GCPAppHubDestinationServiceEnvironmentTypeTest = GCPAppHubDestinationServiceEnvironmentTypeKey.String("TEST") + // Development environment. + // Stability: development + GCPAppHubDestinationServiceEnvironmentTypeDevelopment = GCPAppHubDestinationServiceEnvironmentTypeKey.String("DEVELOPMENT") +) + +// Enum values for gcp.apphub_destination.workload.criticality_type +var ( + // Mission critical service. + // Stability: development + GCPAppHubDestinationWorkloadCriticalityTypeMissionCritical = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("MISSION_CRITICAL") + // High impact. + // Stability: development + GCPAppHubDestinationWorkloadCriticalityTypeHigh = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("HIGH") + // Medium impact. + // Stability: development + GCPAppHubDestinationWorkloadCriticalityTypeMedium = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("MEDIUM") + // Low impact. + // Stability: development + GCPAppHubDestinationWorkloadCriticalityTypeLow = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("LOW") +) + +// Enum values for gcp.apphub_destination.workload.environment_type +var ( + // Production environment. + // Stability: development + GCPAppHubDestinationWorkloadEnvironmentTypeProduction = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("PRODUCTION") + // Staging environment. + // Stability: development + GCPAppHubDestinationWorkloadEnvironmentTypeStaging = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("STAGING") + // Test environment. + // Stability: development + GCPAppHubDestinationWorkloadEnvironmentTypeTest = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("TEST") + // Development environment. + // Stability: development + GCPAppHubDestinationWorkloadEnvironmentTypeDevelopment = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("DEVELOPMENT") +) + +// Namespace: gen_ai +const ( + // GenAIAgentDescriptionKey is the attribute Key conforming to the + // "gen_ai.agent.description" semantic conventions. It represents the free-form + // description of the GenAI agent provided by the application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Helps with math problems", "Generates fiction stories" + GenAIAgentDescriptionKey = attribute.Key("gen_ai.agent.description") + + // GenAIAgentIDKey is the attribute Key conforming to the "gen_ai.agent.id" + // semantic conventions. It represents the unique identifier of the GenAI agent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "asst_5j66UpCpwteGg4YSxUnt7lPY" + GenAIAgentIDKey = attribute.Key("gen_ai.agent.id") + + // GenAIAgentNameKey is the attribute Key conforming to the "gen_ai.agent.name" + // semantic conventions. It represents the human-readable name of the GenAI + // agent provided by the application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Math Tutor", "Fiction Writer" + GenAIAgentNameKey = attribute.Key("gen_ai.agent.name") + + // GenAIConversationIDKey is the attribute Key conforming to the + // "gen_ai.conversation.id" semantic conventions. It represents the unique + // identifier for a conversation (session, thread), used to store and correlate + // messages within this conversation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "conv_5j66UpCpwteGg4YSxUnt7lPY" + GenAIConversationIDKey = attribute.Key("gen_ai.conversation.id") + + // GenAIDataSourceIDKey is the attribute Key conforming to the + // "gen_ai.data_source.id" semantic conventions. It represents the data source + // identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "H7STPQYOND" + // Note: Data sources are used by AI agents and RAG applications to store + // grounding data. A data source may be an external database, object store, + // document collection, website, or any other storage system used by the GenAI + // agent or application. The `gen_ai.data_source.id` SHOULD match the identifier + // used by the GenAI system rather than a name specific to the external storage, + // such as a database or object store. Semantic conventions referencing + // `gen_ai.data_source.id` MAY also leverage additional attributes, such as + // `db.*`, to further identify and describe the data source. + GenAIDataSourceIDKey = attribute.Key("gen_ai.data_source.id") + + // GenAIEmbeddingsDimensionCountKey is the attribute Key conforming to the + // "gen_ai.embeddings.dimension.count" semantic conventions. It represents the + // number of dimensions the resulting output embeddings should have. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 512, 1024 + GenAIEmbeddingsDimensionCountKey = attribute.Key("gen_ai.embeddings.dimension.count") + + // GenAIEvaluationExplanationKey is the attribute Key conforming to the + // "gen_ai.evaluation.explanation" semantic conventions. It represents a + // free-form explanation for the assigned score provided by the evaluator. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "The response is factually accurate but lacks sufficient detail to + // fully address the question." + GenAIEvaluationExplanationKey = attribute.Key("gen_ai.evaluation.explanation") + + // GenAIEvaluationNameKey is the attribute Key conforming to the + // "gen_ai.evaluation.name" semantic conventions. It represents the name of the + // evaluation metric used for the GenAI response. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Relevance", "IntentResolution" + GenAIEvaluationNameKey = attribute.Key("gen_ai.evaluation.name") + + // GenAIEvaluationScoreLabelKey is the attribute Key conforming to the + // "gen_ai.evaluation.score.label" semantic conventions. It represents the human + // readable label for evaluation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "relevant", "not_relevant", "correct", "incorrect", "pass", "fail" + // Note: This attribute provides a human-readable interpretation of the + // evaluation score produced by an evaluator. For example, a score value of 1 + // could mean "relevant" in one evaluation system and "not relevant" in another, + // depending on the scoring range and evaluator. The label SHOULD have low + // cardinality. Possible values depend on the evaluation metric and evaluator + // used; implementations SHOULD document the possible values. + GenAIEvaluationScoreLabelKey = attribute.Key("gen_ai.evaluation.score.label") + + // GenAIEvaluationScoreValueKey is the attribute Key conforming to the + // "gen_ai.evaluation.score.value" semantic conventions. It represents the + // evaluation score returned by the evaluator. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 4.0 + GenAIEvaluationScoreValueKey = attribute.Key("gen_ai.evaluation.score.value") + + // GenAIInputMessagesKey is the attribute Key conforming to the + // "gen_ai.input.messages" semantic conventions. It represents the chat history + // provided to the model as an input. + // + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "[\n {\n "role": "user",\n "parts": [\n {\n "type": "text",\n + // "content": "Weather in Paris?"\n }\n ]\n },\n {\n "role": "assistant",\n + // "parts": [\n {\n "type": "tool_call",\n "id": + // "call_VSPygqKTWdrhaFErNvMV18Yl",\n "name": "get_weather",\n "arguments": {\n + // "location": "Paris"\n }\n }\n ]\n },\n {\n "role": "tool",\n "parts": [\n {\n + // "type": "tool_call_response",\n "id": " call_VSPygqKTWdrhaFErNvMV18Yl",\n + // "result": "rainy, 57°F"\n }\n ]\n }\n]\n" + // Note: Instrumentations MUST follow [Input messages JSON schema]. + // When the attribute is recorded on events, it MUST be recorded in structured + // form. When recorded on spans, it MAY be recorded as a JSON string if + // structured + // format is not supported and SHOULD be recorded in structured form otherwise. + // + // Messages MUST be provided in the order they were sent to the model. + // Instrumentations MAY provide a way for users to filter or truncate + // input messages. + // + // > [!Warning] + // > This attribute is likely to contain sensitive information including + // > user/PII data. + // + // See [Recording content on attributes] + // section for more details. + // + // [Input messages JSON schema]: /docs/gen-ai/gen-ai-input-messages.json + // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes + GenAIInputMessagesKey = attribute.Key("gen_ai.input.messages") + + // GenAIOperationNameKey is the attribute Key conforming to the + // "gen_ai.operation.name" semantic conventions. It represents the name of the + // operation being performed. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: If one of the predefined values applies, but specific system uses a + // different name it's RECOMMENDED to document it in the semantic conventions + // for specific GenAI system and use system-specific name in the + // instrumentation. If a different name is not documented, instrumentation + // libraries SHOULD use applicable predefined value. + GenAIOperationNameKey = attribute.Key("gen_ai.operation.name") + + // GenAIOutputMessagesKey is the attribute Key conforming to the + // "gen_ai.output.messages" semantic conventions. It represents the messages + // returned by the model where each message represents a specific model response + // (choice, candidate). + // + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "[\n {\n "role": "assistant",\n "parts": [\n {\n "type": "text",\n + // "content": "The weather in Paris is currently rainy with a temperature of + // 57°F."\n }\n ],\n "finish_reason": "stop"\n }\n]\n" + // Note: Instrumentations MUST follow [Output messages JSON schema] + // + // Each message represents a single output choice/candidate generated by + // the model. Each message corresponds to exactly one generation + // (choice/candidate) and vice versa - one choice cannot be split across + // multiple messages or one message cannot contain parts from multiple choices. + // + // When the attribute is recorded on events, it MUST be recorded in structured + // form. When recorded on spans, it MAY be recorded as a JSON string if + // structured + // format is not supported and SHOULD be recorded in structured form otherwise. + // + // Instrumentations MAY provide a way for users to filter or truncate + // output messages. + // + // > [!Warning] + // > This attribute is likely to contain sensitive information including + // > user/PII data. + // + // See [Recording content on attributes] + // section for more details. + // + // [Output messages JSON schema]: /docs/gen-ai/gen-ai-output-messages.json + // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes + GenAIOutputMessagesKey = attribute.Key("gen_ai.output.messages") + + // GenAIOutputTypeKey is the attribute Key conforming to the + // "gen_ai.output.type" semantic conventions. It represents the represents the + // content type requested by the client. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: This attribute SHOULD be used when the client requests output of a + // specific type. The model may return zero or more outputs of this type. + // This attribute specifies the output modality and not the actual output + // format. For example, if an image is requested, the actual output could be a + // URL pointing to an image file. + // Additional output format details may be recorded in the future in the + // `gen_ai.output.{type}.*` attributes. + GenAIOutputTypeKey = attribute.Key("gen_ai.output.type") + + // GenAIPromptNameKey is the attribute Key conforming to the + // "gen_ai.prompt.name" semantic conventions. It represents the name of the + // prompt that uniquely identifies it. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "analyze-code" + GenAIPromptNameKey = attribute.Key("gen_ai.prompt.name") + + // GenAIProviderNameKey is the attribute Key conforming to the + // "gen_ai.provider.name" semantic conventions. It represents the Generative AI + // provider as identified by the client or server instrumentation. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: The attribute SHOULD be set based on the instrumentation's best + // knowledge and may differ from the actual model provider. + // + // Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms + // are accessible using the OpenAI REST API and corresponding client libraries, + // but may proxy or host models from different providers. + // + // The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address` + // attributes may help identify the actual system in use. + // + // The `gen_ai.provider.name` attribute acts as a discriminator that + // identifies the GenAI telemetry format flavor specific to that provider + // within GenAI semantic conventions. + // It SHOULD be set consistently with provider-specific attributes and signals. + // For example, GenAI spans, metrics, and events related to AWS Bedrock + // should have the `gen_ai.provider.name` set to `aws.bedrock` and include + // applicable `aws.bedrock.*` attributes and are not expected to include + // `openai.*` attributes. + GenAIProviderNameKey = attribute.Key("gen_ai.provider.name") + + // GenAIRequestChoiceCountKey is the attribute Key conforming to the + // "gen_ai.request.choice.count" semantic conventions. It represents the target + // number of candidate completions to return. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 3 + GenAIRequestChoiceCountKey = attribute.Key("gen_ai.request.choice.count") + + // GenAIRequestEncodingFormatsKey is the attribute Key conforming to the + // "gen_ai.request.encoding_formats" semantic conventions. It represents the + // encoding formats requested in an embeddings operation, if specified. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "base64"], ["float", "binary" + // Note: In some GenAI systems the encoding formats are called embedding types. + // Also, some GenAI systems only accept a single format per request. + GenAIRequestEncodingFormatsKey = attribute.Key("gen_ai.request.encoding_formats") + + // GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the + // "gen_ai.request.frequency_penalty" semantic conventions. It represents the + // frequency penalty setting for the GenAI request. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0.1 + GenAIRequestFrequencyPenaltyKey = attribute.Key("gen_ai.request.frequency_penalty") + + // GenAIRequestMaxTokensKey is the attribute Key conforming to the + // "gen_ai.request.max_tokens" semantic conventions. It represents the maximum + // number of tokens the model generates for a request. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // 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 + // GenAI model a request is being made to. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: gpt-4 + GenAIRequestModelKey = attribute.Key("gen_ai.request.model") + + // GenAIRequestPresencePenaltyKey is the attribute Key conforming to the + // "gen_ai.request.presence_penalty" semantic conventions. It represents the + // presence penalty setting for the GenAI request. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0.1 + GenAIRequestPresencePenaltyKey = attribute.Key("gen_ai.request.presence_penalty") + + // GenAIRequestSeedKey is the attribute Key conforming to the + // "gen_ai.request.seed" semantic conventions. It represents the requests with + // same seed value more likely to return same result. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 100 + GenAIRequestSeedKey = attribute.Key("gen_ai.request.seed") + + // GenAIRequestStopSequencesKey is the attribute Key conforming to the + // "gen_ai.request.stop_sequences" semantic conventions. It represents the list + // of sequences that the model will use to stop generating further tokens. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "forest", "lived" + GenAIRequestStopSequencesKey = attribute.Key("gen_ai.request.stop_sequences") + + // GenAIRequestTemperatureKey is the attribute Key conforming to the + // "gen_ai.request.temperature" semantic conventions. It represents the + // temperature setting for the GenAI request. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0.0 + GenAIRequestTemperatureKey = attribute.Key("gen_ai.request.temperature") + + // GenAIRequestTopKKey is the attribute Key conforming to the + // "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling + // setting for the GenAI request. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1.0 + GenAIRequestTopKKey = attribute.Key("gen_ai.request.top_k") + + // GenAIRequestTopPKey is the attribute Key conforming to the + // "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling + // setting for the GenAI request. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "stop"], ["stop", "length" + 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: Recommended + // Stability: Development + // + // 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 + // model that generated the response. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "gpt-4-0613" + GenAIResponseModelKey = attribute.Key("gen_ai.response.model") + + // GenAISystemInstructionsKey is the attribute Key conforming to the + // "gen_ai.system_instructions" semantic conventions. It represents the system + // message or instructions provided to the GenAI model separately from the chat + // history. + // + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "[\n {\n "type": "text",\n "content": "You are an Agent that greet + // users, always use greetings tool to respond"\n }\n]\n", "[\n {\n "type": + // "text",\n "content": "You are a language translator."\n },\n {\n "type": + // "text",\n "content": "Your mission is to translate text in English to + // French."\n }\n]\n" + // Note: This attribute SHOULD be used when the corresponding provider or API + // allows to provide system instructions or messages separately from the + // chat history. + // + // Instructions that are part of the chat history SHOULD be recorded in + // `gen_ai.input.messages` attribute instead. + // + // Instrumentations MUST follow [System instructions JSON schema]. + // + // When recorded on spans, it MAY be recorded as a JSON string if structured + // format is not supported and SHOULD be recorded in structured form otherwise. + // + // Instrumentations MAY provide a way for users to filter or truncate + // system instructions. + // + // > [!Warning] + // > This attribute may contain sensitive information. + // + // See [Recording content on attributes] + // section for more details. + // + // [System instructions JSON schema]: /docs/gen-ai/gen-ai-system-instructions.json + // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes + GenAISystemInstructionsKey = attribute.Key("gen_ai.system_instructions") + + // GenAITokenTypeKey is the attribute Key conforming to the "gen_ai.token.type" + // semantic conventions. It represents the type of token being counted. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "input", "output" + GenAITokenTypeKey = attribute.Key("gen_ai.token.type") + + // GenAIToolCallArgumentsKey is the attribute Key conforming to the + // "gen_ai.tool.call.arguments" semantic conventions. It represents the + // parameters passed to the tool call. + // + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "{\n "location": "San Francisco?",\n "date": "2025-10-01"\n}\n" + // Note: > [!WARNING] + // + // > This attribute may contain sensitive information. + // + // It's expected to be an object - in case a serialized string is available + // to the instrumentation, the instrumentation SHOULD do the best effort to + // deserialize it to an object. When recorded on spans, it MAY be recorded as a + // JSON string if structured format is not supported and SHOULD be recorded in + // structured form otherwise. + GenAIToolCallArgumentsKey = attribute.Key("gen_ai.tool.call.arguments") + + // GenAIToolCallIDKey is the attribute Key conforming to the + // "gen_ai.tool.call.id" semantic conventions. It represents the tool call + // identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "call_mszuSIzqtI65i1wAUOE8w5H4" + GenAIToolCallIDKey = attribute.Key("gen_ai.tool.call.id") + + // GenAIToolCallResultKey is the attribute Key conforming to the + // "gen_ai.tool.call.result" semantic conventions. It represents the result + // returned by the tool call (if any and if execution was successful). + // + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "{\n "temperature_range": {\n "high": 75,\n "low": 60\n },\n + // "conditions": "sunny"\n}\n" + // Note: > [!WARNING] + // + // > This attribute may contain sensitive information. + // + // It's expected to be an object - in case a serialized string is available + // to the instrumentation, the instrumentation SHOULD do the best effort to + // deserialize it to an object. When recorded on spans, it MAY be recorded as a + // JSON string if structured format is not supported and SHOULD be recorded in + // structured form otherwise. + GenAIToolCallResultKey = attribute.Key("gen_ai.tool.call.result") + + // GenAIToolDefinitionsKey is the attribute Key conforming to the + // "gen_ai.tool.definitions" semantic conventions. It represents the list of + // source system tool definitions available to the GenAI agent or model. + // + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "[\n {\n "type": "function",\n "name": "get_current_weather",\n + // "description": "Get the current weather in a given location",\n "parameters": + // {\n "type": "object",\n "properties": {\n "location": {\n "type": "string",\n + // "description": "The city and state, e.g. San Francisco, CA"\n },\n "unit": + // {\n "type": "string",\n "enum": [\n "celsius",\n "fahrenheit"\n ]\n }\n },\n + // "required": [\n "location",\n "unit"\n ]\n }\n }\n]\n" + // Note: The value of this attribute matches source system tool definition + // format. + // + // It's expected to be an array of objects where each object represents a tool + // definition. In case a serialized string is available + // to the instrumentation, the instrumentation SHOULD do the best effort to + // deserialize it to an array. When recorded on spans, it MAY be recorded as a + // JSON string if structured format is not supported and SHOULD be recorded in + // structured form otherwise. + // + // Since this attribute could be large, it's NOT RECOMMENDED to populate + // it by default. Instrumentations MAY provide a way to enable + // populating this attribute. + GenAIToolDefinitionsKey = attribute.Key("gen_ai.tool.definitions") + + // GenAIToolDescriptionKey is the attribute Key conforming to the + // "gen_ai.tool.description" semantic conventions. It represents the tool + // description. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Multiply two numbers" + GenAIToolDescriptionKey = attribute.Key("gen_ai.tool.description") + + // GenAIToolNameKey is the attribute Key conforming to the "gen_ai.tool.name" + // semantic conventions. It represents the name of the tool utilized by the + // agent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Flights" + GenAIToolNameKey = attribute.Key("gen_ai.tool.name") + + // GenAIToolTypeKey is the attribute Key conforming to the "gen_ai.tool.type" + // semantic conventions. It represents the type of the tool utilized by the + // agent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "function", "extension", "datastore" + // Note: Extension: A tool executed on the agent-side to directly call external + // APIs, bridging the gap between the agent and real-world systems. + // Agent-side operations involve actions that are performed by the agent on the + // server or within the agent's controlled environment. + // Function: A tool executed on the client-side, where the agent generates + // parameters for a predefined function, and the client executes the logic. + // Client-side operations are actions taken on the user's end or within the + // client application. + // Datastore: A tool used by the agent to access and query structured or + // unstructured external data for retrieval-augmented tasks or knowledge + // updates. + GenAIToolTypeKey = attribute.Key("gen_ai.tool.type") + + // GenAIUsageInputTokensKey is the attribute Key conforming to the + // "gen_ai.usage.input_tokens" semantic conventions. It represents the number of + // tokens used in the GenAI input (prompt). + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 100 + GenAIUsageInputTokensKey = attribute.Key("gen_ai.usage.input_tokens") + + // GenAIUsageOutputTokensKey is the attribute Key conforming to the + // "gen_ai.usage.output_tokens" semantic conventions. It represents the number + // of tokens used in the GenAI response (completion). + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 180 + GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens") +) + +// GenAIAgentDescription returns an attribute KeyValue conforming to the +// "gen_ai.agent.description" semantic conventions. It represents the free-form +// description of the GenAI agent provided by the application. +func GenAIAgentDescription(val string) attribute.KeyValue { + return GenAIAgentDescriptionKey.String(val) +} + +// GenAIAgentID returns an attribute KeyValue conforming to the "gen_ai.agent.id" +// semantic conventions. It represents the unique identifier of the GenAI agent. +func GenAIAgentID(val string) attribute.KeyValue { + return GenAIAgentIDKey.String(val) +} + +// GenAIAgentName returns an attribute KeyValue conforming to the +// "gen_ai.agent.name" semantic conventions. It represents the human-readable +// name of the GenAI agent provided by the application. +func GenAIAgentName(val string) attribute.KeyValue { + return GenAIAgentNameKey.String(val) +} + +// GenAIConversationID returns an attribute KeyValue conforming to the +// "gen_ai.conversation.id" semantic conventions. It represents the unique +// identifier for a conversation (session, thread), used to store and correlate +// messages within this conversation. +func GenAIConversationID(val string) attribute.KeyValue { + return GenAIConversationIDKey.String(val) +} + +// GenAIDataSourceID returns an attribute KeyValue conforming to the +// "gen_ai.data_source.id" semantic conventions. It represents the data source +// identifier. +func GenAIDataSourceID(val string) attribute.KeyValue { + return GenAIDataSourceIDKey.String(val) +} + +// GenAIEmbeddingsDimensionCount returns an attribute KeyValue conforming to the +// "gen_ai.embeddings.dimension.count" semantic conventions. It represents the +// number of dimensions the resulting output embeddings should have. +func GenAIEmbeddingsDimensionCount(val int) attribute.KeyValue { + return GenAIEmbeddingsDimensionCountKey.Int(val) +} + +// GenAIEvaluationExplanation returns an attribute KeyValue conforming to the +// "gen_ai.evaluation.explanation" semantic conventions. It represents a +// free-form explanation for the assigned score provided by the evaluator. +func GenAIEvaluationExplanation(val string) attribute.KeyValue { + return GenAIEvaluationExplanationKey.String(val) +} + +// GenAIEvaluationName returns an attribute KeyValue conforming to the +// "gen_ai.evaluation.name" semantic conventions. It represents the name of the +// evaluation metric used for the GenAI response. +func GenAIEvaluationName(val string) attribute.KeyValue { + return GenAIEvaluationNameKey.String(val) +} + +// GenAIEvaluationScoreLabel returns an attribute KeyValue conforming to the +// "gen_ai.evaluation.score.label" semantic conventions. It represents the human +// readable label for evaluation. +func GenAIEvaluationScoreLabel(val string) attribute.KeyValue { + return GenAIEvaluationScoreLabelKey.String(val) +} + +// GenAIEvaluationScoreValue returns an attribute KeyValue conforming to the +// "gen_ai.evaluation.score.value" semantic conventions. It represents the +// evaluation score returned by the evaluator. +func GenAIEvaluationScoreValue(val float64) attribute.KeyValue { + return GenAIEvaluationScoreValueKey.Float64(val) +} + +// GenAIPromptName returns an attribute KeyValue conforming to the +// "gen_ai.prompt.name" semantic conventions. It represents the name of the +// prompt that uniquely identifies it. +func GenAIPromptName(val string) attribute.KeyValue { + return GenAIPromptNameKey.String(val) +} + +// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the +// "gen_ai.request.choice.count" semantic conventions. It represents the target +// number of candidate completions to return. +func GenAIRequestChoiceCount(val int) attribute.KeyValue { + return GenAIRequestChoiceCountKey.Int(val) +} + +// GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the +// "gen_ai.request.encoding_formats" semantic conventions. It represents the +// encoding formats requested in an embeddings operation, if specified. +func GenAIRequestEncodingFormats(val ...string) attribute.KeyValue { + return GenAIRequestEncodingFormatsKey.StringSlice(val) +} + +// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to the +// "gen_ai.request.frequency_penalty" semantic conventions. It represents the +// frequency penalty setting for the GenAI request. +func GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue { + return GenAIRequestFrequencyPenaltyKey.Float64(val) +} + +// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the +// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum +// number of tokens the model 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 +// GenAI model a request is being made to. +func GenAIRequestModel(val string) attribute.KeyValue { + return GenAIRequestModelKey.String(val) +} + +// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to the +// "gen_ai.request.presence_penalty" semantic conventions. It represents the +// presence penalty setting for the GenAI request. +func GenAIRequestPresencePenalty(val float64) attribute.KeyValue { + return GenAIRequestPresencePenaltyKey.Float64(val) +} + +// GenAIRequestSeed returns an attribute KeyValue conforming to the +// "gen_ai.request.seed" semantic conventions. It represents the requests with +// same seed value more likely to return same result. +func GenAIRequestSeed(val int) attribute.KeyValue { + return GenAIRequestSeedKey.Int(val) +} + +// GenAIRequestStopSequences returns an attribute KeyValue conforming to the +// "gen_ai.request.stop_sequences" semantic conventions. It represents the list +// of sequences that the model will use to stop generating further tokens. +func GenAIRequestStopSequences(val ...string) attribute.KeyValue { + return GenAIRequestStopSequencesKey.StringSlice(val) +} + +// GenAIRequestTemperature returns an attribute KeyValue conforming to the +// "gen_ai.request.temperature" semantic conventions. It represents the +// temperature setting for the GenAI request. +func GenAIRequestTemperature(val float64) attribute.KeyValue { + return GenAIRequestTemperatureKey.Float64(val) +} + +// GenAIRequestTopK returns an attribute KeyValue conforming to the +// "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling +// setting for the GenAI request. +func GenAIRequestTopK(val float64) attribute.KeyValue { + return GenAIRequestTopKKey.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 GenAI 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 +// model that generated the response. +func GenAIResponseModel(val string) attribute.KeyValue { + return GenAIResponseModelKey.String(val) +} + +// GenAIToolCallID returns an attribute KeyValue conforming to the +// "gen_ai.tool.call.id" semantic conventions. It represents the tool call +// identifier. +func GenAIToolCallID(val string) attribute.KeyValue { + return GenAIToolCallIDKey.String(val) +} + +// GenAIToolDescription returns an attribute KeyValue conforming to the +// "gen_ai.tool.description" semantic conventions. It represents the tool +// description. +func GenAIToolDescription(val string) attribute.KeyValue { + return GenAIToolDescriptionKey.String(val) +} + +// GenAIToolName returns an attribute KeyValue conforming to the +// "gen_ai.tool.name" semantic conventions. It represents the name of the tool +// utilized by the agent. +func GenAIToolName(val string) attribute.KeyValue { + return GenAIToolNameKey.String(val) +} + +// GenAIToolType returns an attribute KeyValue conforming to the +// "gen_ai.tool.type" semantic conventions. It represents the type of the tool +// utilized by the agent. +func GenAIToolType(val string) attribute.KeyValue { + return GenAIToolTypeKey.String(val) +} + +// GenAIUsageInputTokens returns an attribute KeyValue conforming to the +// "gen_ai.usage.input_tokens" semantic conventions. It represents the number of +// tokens used in the GenAI input (prompt). +func GenAIUsageInputTokens(val int) attribute.KeyValue { + return GenAIUsageInputTokensKey.Int(val) +} + +// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the +// "gen_ai.usage.output_tokens" semantic conventions. It represents the number of +// tokens used in the GenAI response (completion). +func GenAIUsageOutputTokens(val int) attribute.KeyValue { + return GenAIUsageOutputTokensKey.Int(val) +} + +// Enum values for gen_ai.operation.name +var ( + // Chat completion operation such as [OpenAI Chat API] + // Stability: development + // + // [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat + GenAIOperationNameChat = GenAIOperationNameKey.String("chat") + // Multimodal content generation operation such as [Gemini Generate Content] + // Stability: development + // + // [Gemini Generate Content]: https://ai.google.dev/api/generate-content + GenAIOperationNameGenerateContent = GenAIOperationNameKey.String("generate_content") + // Text completions operation such as [OpenAI Completions API (Legacy)] + // Stability: development + // + // [OpenAI Completions API (Legacy)]: https://platform.openai.com/docs/api-reference/completions + GenAIOperationNameTextCompletion = GenAIOperationNameKey.String("text_completion") + // Embeddings operation such as [OpenAI Create embeddings API] + // Stability: development + // + // [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create + GenAIOperationNameEmbeddings = GenAIOperationNameKey.String("embeddings") + // Create GenAI agent + // Stability: development + GenAIOperationNameCreateAgent = GenAIOperationNameKey.String("create_agent") + // Invoke GenAI agent + // Stability: development + GenAIOperationNameInvokeAgent = GenAIOperationNameKey.String("invoke_agent") + // Execute a tool + // Stability: development + GenAIOperationNameExecuteTool = GenAIOperationNameKey.String("execute_tool") +) + +// Enum values for gen_ai.output.type +var ( + // Plain text + // Stability: development + GenAIOutputTypeText = GenAIOutputTypeKey.String("text") + // JSON object with known or unknown schema + // Stability: development + GenAIOutputTypeJSON = GenAIOutputTypeKey.String("json") + // Image + // Stability: development + GenAIOutputTypeImage = GenAIOutputTypeKey.String("image") + // Speech + // Stability: development + GenAIOutputTypeSpeech = GenAIOutputTypeKey.String("speech") +) + +// Enum values for gen_ai.provider.name +var ( + // [OpenAI] + // Stability: development + // + // [OpenAI]: https://openai.com/ + GenAIProviderNameOpenAI = GenAIProviderNameKey.String("openai") + // Any Google generative AI endpoint + // Stability: development + GenAIProviderNameGCPGenAI = GenAIProviderNameKey.String("gcp.gen_ai") + // [Vertex AI] + // Stability: development + // + // [Vertex AI]: https://cloud.google.com/vertex-ai + GenAIProviderNameGCPVertexAI = GenAIProviderNameKey.String("gcp.vertex_ai") + // [Gemini] + // Stability: development + // + // [Gemini]: https://cloud.google.com/products/gemini + GenAIProviderNameGCPGemini = GenAIProviderNameKey.String("gcp.gemini") + // [Anthropic] + // Stability: development + // + // [Anthropic]: https://www.anthropic.com/ + GenAIProviderNameAnthropic = GenAIProviderNameKey.String("anthropic") + // [Cohere] + // Stability: development + // + // [Cohere]: https://cohere.com/ + GenAIProviderNameCohere = GenAIProviderNameKey.String("cohere") + // Azure AI Inference + // Stability: development + GenAIProviderNameAzureAIInference = GenAIProviderNameKey.String("azure.ai.inference") + // [Azure OpenAI] + // Stability: development + // + // [Azure OpenAI]: https://azure.microsoft.com/products/ai-services/openai-service/ + GenAIProviderNameAzureAIOpenAI = GenAIProviderNameKey.String("azure.ai.openai") + // [IBM Watsonx AI] + // Stability: development + // + // [IBM Watsonx AI]: https://www.ibm.com/products/watsonx-ai + GenAIProviderNameIBMWatsonxAI = GenAIProviderNameKey.String("ibm.watsonx.ai") + // [AWS Bedrock] + // Stability: development + // + // [AWS Bedrock]: https://aws.amazon.com/bedrock + GenAIProviderNameAWSBedrock = GenAIProviderNameKey.String("aws.bedrock") + // [Perplexity] + // Stability: development + // + // [Perplexity]: https://www.perplexity.ai/ + GenAIProviderNamePerplexity = GenAIProviderNameKey.String("perplexity") + // [xAI] + // Stability: development + // + // [xAI]: https://x.ai/ + GenAIProviderNameXAI = GenAIProviderNameKey.String("x_ai") + // [DeepSeek] + // Stability: development + // + // [DeepSeek]: https://www.deepseek.com/ + GenAIProviderNameDeepseek = GenAIProviderNameKey.String("deepseek") + // [Groq] + // Stability: development + // + // [Groq]: https://groq.com/ + GenAIProviderNameGroq = GenAIProviderNameKey.String("groq") + // [Mistral AI] + // Stability: development + // + // [Mistral AI]: https://mistral.ai/ + GenAIProviderNameMistralAI = GenAIProviderNameKey.String("mistral_ai") +) + +// Enum values for gen_ai.token.type +var ( + // Input tokens (prompt, input, etc.) + // Stability: development + GenAITokenTypeInput = GenAITokenTypeKey.String("input") + // Output tokens (completion, response, etc.) + // Stability: development + GenAITokenTypeOutput = GenAITokenTypeKey.String("output") +) + +// Namespace: geo +const ( + // GeoContinentCodeKey is the attribute Key conforming to the + // "geo.continent.code" semantic conventions. It represents the two-letter code + // representing continent’s name. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + GeoContinentCodeKey = attribute.Key("geo.continent.code") + + // GeoCountryISOCodeKey is the attribute Key conforming to the + // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO + // Country Code ([ISO 3166-1 alpha2]). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "CA" + // + // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes + GeoCountryISOCodeKey = attribute.Key("geo.country.iso_code") + + // GeoLocalityNameKey is the attribute Key conforming to the "geo.locality.name" + // semantic conventions. It represents the locality name. Represents the name of + // a city, town, village, or similar populated place. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Montreal", "Berlin" + GeoLocalityNameKey = attribute.Key("geo.locality.name") + + // GeoLocationLatKey is the attribute Key conforming to the "geo.location.lat" + // semantic conventions. It represents the latitude of the geo location in + // [WGS84]. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 45.505918 + // + // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 + GeoLocationLatKey = attribute.Key("geo.location.lat") + + // GeoLocationLonKey is the attribute Key conforming to the "geo.location.lon" + // semantic conventions. It represents the longitude of the geo location in + // [WGS84]. + // + // Type: double + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: -73.61483 + // + // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 + GeoLocationLonKey = attribute.Key("geo.location.lon") + + // GeoPostalCodeKey is the attribute Key conforming to the "geo.postal_code" + // semantic conventions. It represents the postal code associated with the + // location. Values appropriate for this field may also be known as a postcode + // or ZIP code and will vary widely from country to country. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "94040" + GeoPostalCodeKey = attribute.Key("geo.postal_code") + + // GeoRegionISOCodeKey is the attribute Key conforming to the + // "geo.region.iso_code" semantic conventions. It represents the region ISO code + // ([ISO 3166-2]). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "CA-QC" + // + // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2 + GeoRegionISOCodeKey = attribute.Key("geo.region.iso_code") +) + +// GeoCountryISOCode returns an attribute KeyValue conforming to the +// "geo.country.iso_code" semantic conventions. It represents the two-letter ISO +// Country Code ([ISO 3166-1 alpha2]). +// +// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes +func GeoCountryISOCode(val string) attribute.KeyValue { + return GeoCountryISOCodeKey.String(val) +} + +// GeoLocalityName returns an attribute KeyValue conforming to the +// "geo.locality.name" semantic conventions. It represents the locality name. +// Represents the name of a city, town, village, or similar populated place. +func GeoLocalityName(val string) attribute.KeyValue { + return GeoLocalityNameKey.String(val) +} + +// GeoLocationLat returns an attribute KeyValue conforming to the +// "geo.location.lat" semantic conventions. It represents the latitude of the geo +// location in [WGS84]. +// +// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 +func GeoLocationLat(val float64) attribute.KeyValue { + return GeoLocationLatKey.Float64(val) +} + +// GeoLocationLon returns an attribute KeyValue conforming to the +// "geo.location.lon" semantic conventions. It represents the longitude of the +// geo location in [WGS84]. +// +// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 +func GeoLocationLon(val float64) attribute.KeyValue { + return GeoLocationLonKey.Float64(val) +} + +// GeoPostalCode returns an attribute KeyValue conforming to the +// "geo.postal_code" semantic conventions. It represents the postal code +// associated with the location. Values appropriate for this field may also be +// known as a postcode or ZIP code and will vary widely from country to country. +func GeoPostalCode(val string) attribute.KeyValue { + return GeoPostalCodeKey.String(val) +} + +// GeoRegionISOCode returns an attribute KeyValue conforming to the +// "geo.region.iso_code" semantic conventions. It represents the region ISO code +// ([ISO 3166-2]). +// +// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2 +func GeoRegionISOCode(val string) attribute.KeyValue { + return GeoRegionISOCodeKey.String(val) +} + +// Enum values for geo.continent.code +var ( + // Africa + // Stability: development + GeoContinentCodeAf = GeoContinentCodeKey.String("AF") + // Antarctica + // Stability: development + GeoContinentCodeAn = GeoContinentCodeKey.String("AN") + // Asia + // Stability: development + GeoContinentCodeAs = GeoContinentCodeKey.String("AS") + // Europe + // Stability: development + GeoContinentCodeEu = GeoContinentCodeKey.String("EU") + // North America + // Stability: development + GeoContinentCodeNa = GeoContinentCodeKey.String("NA") + // Oceania + // Stability: development + GeoContinentCodeOc = GeoContinentCodeKey.String("OC") + // South America + // Stability: development + GeoContinentCodeSa = GeoContinentCodeKey.String("SA") +) + +// Namespace: go +const ( + // GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type" + // semantic conventions. It represents the type of memory. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "other", "stack" + GoMemoryTypeKey = attribute.Key("go.memory.type") +) + +// Enum values for go.memory.type +var ( + // Memory allocated from the heap that is reserved for stack space, whether or + // not it is currently in-use. + // Stability: development + GoMemoryTypeStack = GoMemoryTypeKey.String("stack") + // Memory used by the Go runtime, excluding other categories of memory usage + // described in this enumeration. + // Stability: development + GoMemoryTypeOther = GoMemoryTypeKey.String("other") +) + +// Namespace: graphql +const ( + // GraphQLDocumentKey is the attribute Key conforming to the "graphql.document" + // semantic conventions. It represents the GraphQL document being executed. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "query", "mutation", "subscription" + GraphQLOperationTypeKey = attribute.Key("graphql.operation.type") +) + +// 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) +} + +// Enum values for graphql.operation.type +var ( + // GraphQL query + // Stability: development + GraphQLOperationTypeQuery = GraphQLOperationTypeKey.String("query") + // GraphQL mutation + // Stability: development + GraphQLOperationTypeMutation = GraphQLOperationTypeKey.String("mutation") + // GraphQL subscription + // Stability: development + GraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String("subscription") +) + +// Namespace: heroku +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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) +} + +// Namespace: host +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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "GenuineIntel" + // Note: [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. + // + // [CPUID]: https://wiki.osdev.org/CPUID + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "0.1" + // + // [Version Attributes]: /docs/resource/README.md#version-attributes + 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: Recommended + // Stability: Development + // + // 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] format. + // + // [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html + 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: Recommended + // Stability: Development + // + // 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]: as + // hyphen-separated octets in uppercase hexadecimal form from most to least + // significant. + // + // [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "n1-standard-1" + HostTypeKey = attribute.Key("host.type") +) + +// 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]. +// +// [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) +} + +// Enum values for host.arch +var ( + // AMD64 + // Stability: development + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + // Stability: development + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + // Stability: development + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + // Stability: development + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + // Stability: development + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + // Stability: development + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + // Stability: development + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + // Stability: development + HostArchX86 = HostArchKey.String("x86") +) + +// Namespace: http +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: Recommended + // Stability: Development + // + // 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] header. For requests using transport encoding, this should + // be the compressed size. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length + 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: Recommended + // 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], + // the PATCH method defined in [RFC5789] + // and the QUERY method defined in [httpbis-safe-method-w-body]. + // + // 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. + // + // [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods + // [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html + // [httpbis-safe-method-w-body]: https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1 + 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: Recommended + // 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: Recommended + // Stability: Stable + // + // 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: Recommended + // Stability: Development + 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] header. For requests using transport encoding, this should + // be the compressed size. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length + 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: Recommended + // Stability: Development + 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]. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: 200 + // + // [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 + HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") + + // HTTPRouteKey is the attribute Key conforming to the "http.route" semantic + // conventions. It represents the matched route template for the request. This + // MUST be low-cardinality and include all static path segments, with dynamic + // path segments represented with placeholders. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "/users/:userID?", "my-controller/my-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] if there is one. + // + // A static path segment is a part of the route template with a fixed, + // low-cardinality value. This includes literal strings like `/users/` and + // placeholders that + // are constrained to a finite, predefined set of values, e.g. `{controller}` or + // `{action}`. + // + // A dynamic path segment is a placeholder for a value that can have high + // cardinality and is not constrained to a predefined list like static path + // segments. + // + // Instrumentations SHOULD use routing information provided by the corresponding + // web framework. They SHOULD pick the most precise source of routing + // information and MAY + // support custom route formatting. Instrumentations SHOULD document the format + // and the API used to obtain the route string. + // + // [application root]: /docs/http/http-spans.md#http-server-definitions + HTTPRouteKey = attribute.Key("http.route") +) + +// 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func HTTPRequestBodySize(val int) attribute.KeyValue { + return HTTPRequestBodySizeKey.Int(val) +} + +// HTTPRequestHeader returns an attribute KeyValue conforming to the +// "http.request.header" semantic conventions. It represents the HTTP request +// headers, `` being the normalized HTTP Header name (lowercase), the value +// being the header values. +func HTTPRequestHeader(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("http.request.header."+key, 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] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func HTTPResponseBodySize(val int) attribute.KeyValue { + return HTTPResponseBodySizeKey.Int(val) +} + +// HTTPResponseHeader returns an attribute KeyValue conforming to the +// "http.response.header" semantic conventions. It represents the HTTP response +// headers, `` being the normalized HTTP Header name (lowercase), the value +// being the header values. +func HTTPResponseHeader(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("http.response.header."+key, 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]. +// +// [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 template for the +// request. This MUST be low-cardinality and include all static path segments, +// with dynamic path segments represented with placeholders. +func HTTPRoute(val string) attribute.KeyValue { + return HTTPRouteKey.String(val) +} + +// Enum values for http.connection.state +var ( + // active state. + // Stability: development + HTTPConnectionStateActive = HTTPConnectionStateKey.String("active") + // idle state. + // Stability: development + HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle") +) + +// Enum values for http.request.method +var ( + // CONNECT method. + // Stability: stable + HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") + // DELETE method. + // Stability: stable + HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") + // GET method. + // Stability: stable + HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") + // HEAD method. + // Stability: stable + HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") + // OPTIONS method. + // Stability: stable + HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") + // PATCH method. + // Stability: stable + HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") + // POST method. + // Stability: stable + HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") + // PUT method. + // Stability: stable + HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") + // TRACE method. + // Stability: stable + HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") + // QUERY method. + // Stability: development + HTTPRequestMethodQuery = HTTPRequestMethodKey.String("QUERY") + // Any HTTP method that the instrumentation has no prior knowledge of. + // Stability: stable + HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") +) + +// Namespace: hw +const ( + // HwBatteryCapacityKey is the attribute Key conforming to the + // "hw.battery.capacity" semantic conventions. It represents the design capacity + // in Watts-hours or Amper-hours. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "9.3Ah", "50Wh" + HwBatteryCapacityKey = attribute.Key("hw.battery.capacity") + + // HwBatteryChemistryKey is the attribute Key conforming to the + // "hw.battery.chemistry" semantic conventions. It represents the battery + // [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Li-ion", "NiMH" + // + // [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html + HwBatteryChemistryKey = attribute.Key("hw.battery.chemistry") + + // HwBatteryStateKey is the attribute Key conforming to the "hw.battery.state" + // semantic conventions. It represents the current state of the battery. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwBatteryStateKey = attribute.Key("hw.battery.state") + + // HwBiosVersionKey is the attribute Key conforming to the "hw.bios_version" + // semantic conventions. It represents the BIOS version of the hardware + // component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1.2.3" + HwBiosVersionKey = attribute.Key("hw.bios_version") + + // HwDriverVersionKey is the attribute Key conforming to the "hw.driver_version" + // semantic conventions. It represents the driver version for the hardware + // component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "10.2.1-3" + HwDriverVersionKey = attribute.Key("hw.driver_version") + + // HwEnclosureTypeKey is the attribute Key conforming to the "hw.enclosure.type" + // semantic conventions. It represents the type of the enclosure (useful for + // modular systems). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Computer", "Storage", "Switch" + HwEnclosureTypeKey = attribute.Key("hw.enclosure.type") + + // HwFirmwareVersionKey is the attribute Key conforming to the + // "hw.firmware_version" semantic conventions. It represents the firmware + // version of the hardware component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2.0.1" + HwFirmwareVersionKey = attribute.Key("hw.firmware_version") + + // HwGpuTaskKey is the attribute Key conforming to the "hw.gpu.task" semantic + // conventions. It represents the type of task the GPU is performing. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwGpuTaskKey = attribute.Key("hw.gpu.task") + + // HwIDKey is the attribute Key conforming to the "hw.id" semantic conventions. + // It represents an identifier for the hardware component, unique within the + // monitored host. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "win32battery_battery_testsysa33_1" + HwIDKey = attribute.Key("hw.id") + + // HwLimitTypeKey is the attribute Key conforming to the "hw.limit_type" + // semantic conventions. It represents the type of limit for hardware + // components. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwLimitTypeKey = attribute.Key("hw.limit_type") + + // HwLogicalDiskRaidLevelKey is the attribute Key conforming to the + // "hw.logical_disk.raid_level" semantic conventions. It represents the RAID + // Level of the logical disk. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "RAID0+1", "RAID5", "RAID10" + HwLogicalDiskRaidLevelKey = attribute.Key("hw.logical_disk.raid_level") + + // HwLogicalDiskStateKey is the attribute Key conforming to the + // "hw.logical_disk.state" semantic conventions. It represents the state of the + // logical disk space usage. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwLogicalDiskStateKey = attribute.Key("hw.logical_disk.state") + + // HwMemoryTypeKey is the attribute Key conforming to the "hw.memory.type" + // semantic conventions. It represents the type of the memory module. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "DDR4", "DDR5", "LPDDR5" + HwMemoryTypeKey = attribute.Key("hw.memory.type") + + // HwModelKey is the attribute Key conforming to the "hw.model" semantic + // conventions. It represents the descriptive model name of the hardware + // component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "PERC H740P", "Intel(R) Core(TM) i7-10700K", "Dell XPS 15 Battery" + HwModelKey = attribute.Key("hw.model") + + // HwNameKey is the attribute Key conforming to the "hw.name" semantic + // conventions. It represents an easily-recognizable name for the hardware + // component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "eth0" + HwNameKey = attribute.Key("hw.name") + + // HwNetworkLogicalAddressesKey is the attribute Key conforming to the + // "hw.network.logical_addresses" semantic conventions. It represents the + // logical addresses of the adapter (e.g. IP address, or WWPN). + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "172.16.8.21", "57.11.193.42" + HwNetworkLogicalAddressesKey = attribute.Key("hw.network.logical_addresses") + + // HwNetworkPhysicalAddressKey is the attribute Key conforming to the + // "hw.network.physical_address" semantic conventions. It represents the + // physical address of the adapter (e.g. MAC address, or WWNN). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "00-90-F5-E9-7B-36" + HwNetworkPhysicalAddressKey = attribute.Key("hw.network.physical_address") + + // HwParentKey is the attribute Key conforming to the "hw.parent" semantic + // conventions. It represents the unique identifier of the parent component + // (typically the `hw.id` attribute of the enclosure, or disk controller). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "dellStorage_perc_0" + HwParentKey = attribute.Key("hw.parent") + + // HwPhysicalDiskSmartAttributeKey is the attribute Key conforming to the + // "hw.physical_disk.smart_attribute" semantic conventions. It represents the + // [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute + // of the physical disk. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Spin Retry Count", "Seek Error Rate", "Raw Read Error Rate" + // + // [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T. + HwPhysicalDiskSmartAttributeKey = attribute.Key("hw.physical_disk.smart_attribute") + + // HwPhysicalDiskStateKey is the attribute Key conforming to the + // "hw.physical_disk.state" semantic conventions. It represents the state of the + // physical disk endurance utilization. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwPhysicalDiskStateKey = attribute.Key("hw.physical_disk.state") + + // HwPhysicalDiskTypeKey is the attribute Key conforming to the + // "hw.physical_disk.type" semantic conventions. It represents the type of the + // physical disk. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "HDD", "SSD", "10K" + HwPhysicalDiskTypeKey = attribute.Key("hw.physical_disk.type") + + // HwSensorLocationKey is the attribute Key conforming to the + // "hw.sensor_location" semantic conventions. It represents the location of the + // sensor. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "cpu0", "ps1", "INLET", "CPU0_DIE", "AMBIENT", "MOTHERBOARD", "PS0 + // V3_3", "MAIN_12V", "CPU_VCORE" + HwSensorLocationKey = attribute.Key("hw.sensor_location") + + // HwSerialNumberKey is the attribute Key conforming to the "hw.serial_number" + // semantic conventions. It represents the serial number of the hardware + // component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "CNFCP0123456789" + HwSerialNumberKey = attribute.Key("hw.serial_number") + + // HwStateKey is the attribute Key conforming to the "hw.state" semantic + // conventions. It represents the current state of the component. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwStateKey = attribute.Key("hw.state") + + // HwTapeDriveOperationTypeKey is the attribute Key conforming to the + // "hw.tape_drive.operation_type" semantic conventions. It represents the type + // of tape drive operation. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + HwTapeDriveOperationTypeKey = attribute.Key("hw.tape_drive.operation_type") + + // HwTypeKey is the attribute Key conforming to the "hw.type" semantic + // conventions. It represents the type of the component. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: Describes the category of the hardware component for which `hw.state` + // is being reported. For example, `hw.type=temperature` along with + // `hw.state=degraded` would indicate that the temperature of the hardware + // component has been reported as `degraded`. + HwTypeKey = attribute.Key("hw.type") + + // HwVendorKey is the attribute Key conforming to the "hw.vendor" semantic + // conventions. It represents the vendor name of the hardware component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Dell", "HP", "Intel", "AMD", "LSI", "Lenovo" + HwVendorKey = attribute.Key("hw.vendor") +) + +// HwBatteryCapacity returns an attribute KeyValue conforming to the +// "hw.battery.capacity" semantic conventions. It represents the design capacity +// in Watts-hours or Amper-hours. +func HwBatteryCapacity(val string) attribute.KeyValue { + return HwBatteryCapacityKey.String(val) +} + +// HwBatteryChemistry returns an attribute KeyValue conforming to the +// "hw.battery.chemistry" semantic conventions. It represents the battery +// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc. +// +// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html +func HwBatteryChemistry(val string) attribute.KeyValue { + return HwBatteryChemistryKey.String(val) +} + +// HwBiosVersion returns an attribute KeyValue conforming to the +// "hw.bios_version" semantic conventions. It represents the BIOS version of the +// hardware component. +func HwBiosVersion(val string) attribute.KeyValue { + return HwBiosVersionKey.String(val) +} + +// HwDriverVersion returns an attribute KeyValue conforming to the +// "hw.driver_version" semantic conventions. It represents the driver version for +// the hardware component. +func HwDriverVersion(val string) attribute.KeyValue { + return HwDriverVersionKey.String(val) +} + +// HwEnclosureType returns an attribute KeyValue conforming to the +// "hw.enclosure.type" semantic conventions. It represents the type of the +// enclosure (useful for modular systems). +func HwEnclosureType(val string) attribute.KeyValue { + return HwEnclosureTypeKey.String(val) +} + +// HwFirmwareVersion returns an attribute KeyValue conforming to the +// "hw.firmware_version" semantic conventions. It represents the firmware version +// of the hardware component. +func HwFirmwareVersion(val string) attribute.KeyValue { + return HwFirmwareVersionKey.String(val) +} + +// HwID returns an attribute KeyValue conforming to the "hw.id" semantic +// conventions. It represents an identifier for the hardware component, unique +// within the monitored host. +func HwID(val string) attribute.KeyValue { + return HwIDKey.String(val) +} + +// HwLogicalDiskRaidLevel returns an attribute KeyValue conforming to the +// "hw.logical_disk.raid_level" semantic conventions. It represents the RAID +// Level of the logical disk. +func HwLogicalDiskRaidLevel(val string) attribute.KeyValue { + return HwLogicalDiskRaidLevelKey.String(val) +} + +// HwMemoryType returns an attribute KeyValue conforming to the "hw.memory.type" +// semantic conventions. It represents the type of the memory module. +func HwMemoryType(val string) attribute.KeyValue { + return HwMemoryTypeKey.String(val) +} + +// HwModel returns an attribute KeyValue conforming to the "hw.model" semantic +// conventions. It represents the descriptive model name of the hardware +// component. +func HwModel(val string) attribute.KeyValue { + return HwModelKey.String(val) +} + +// HwName returns an attribute KeyValue conforming to the "hw.name" semantic +// conventions. It represents an easily-recognizable name for the hardware +// component. +func HwName(val string) attribute.KeyValue { + return HwNameKey.String(val) +} + +// HwNetworkLogicalAddresses returns an attribute KeyValue conforming to the +// "hw.network.logical_addresses" semantic conventions. It represents the logical +// addresses of the adapter (e.g. IP address, or WWPN). +func HwNetworkLogicalAddresses(val ...string) attribute.KeyValue { + return HwNetworkLogicalAddressesKey.StringSlice(val) +} + +// HwNetworkPhysicalAddress returns an attribute KeyValue conforming to the +// "hw.network.physical_address" semantic conventions. It represents the physical +// address of the adapter (e.g. MAC address, or WWNN). +func HwNetworkPhysicalAddress(val string) attribute.KeyValue { + return HwNetworkPhysicalAddressKey.String(val) +} + +// HwParent returns an attribute KeyValue conforming to the "hw.parent" semantic +// conventions. It represents the unique identifier of the parent component +// (typically the `hw.id` attribute of the enclosure, or disk controller). +func HwParent(val string) attribute.KeyValue { + return HwParentKey.String(val) +} + +// HwPhysicalDiskSmartAttribute returns an attribute KeyValue conforming to the +// "hw.physical_disk.smart_attribute" semantic conventions. It represents the +// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute +// of the physical disk. +// +// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T. +func HwPhysicalDiskSmartAttribute(val string) attribute.KeyValue { + return HwPhysicalDiskSmartAttributeKey.String(val) +} + +// HwPhysicalDiskType returns an attribute KeyValue conforming to the +// "hw.physical_disk.type" semantic conventions. It represents the type of the +// physical disk. +func HwPhysicalDiskType(val string) attribute.KeyValue { + return HwPhysicalDiskTypeKey.String(val) +} + +// HwSensorLocation returns an attribute KeyValue conforming to the +// "hw.sensor_location" semantic conventions. It represents the location of the +// sensor. +func HwSensorLocation(val string) attribute.KeyValue { + return HwSensorLocationKey.String(val) +} + +// HwSerialNumber returns an attribute KeyValue conforming to the +// "hw.serial_number" semantic conventions. It represents the serial number of +// the hardware component. +func HwSerialNumber(val string) attribute.KeyValue { + return HwSerialNumberKey.String(val) +} + +// HwVendor returns an attribute KeyValue conforming to the "hw.vendor" semantic +// conventions. It represents the vendor name of the hardware component. +func HwVendor(val string) attribute.KeyValue { + return HwVendorKey.String(val) +} + +// Enum values for hw.battery.state +var ( + // Charging + // Stability: development + HwBatteryStateCharging = HwBatteryStateKey.String("charging") + // Discharging + // Stability: development + HwBatteryStateDischarging = HwBatteryStateKey.String("discharging") +) + +// Enum values for hw.gpu.task +var ( + // Decoder + // Stability: development + HwGpuTaskDecoder = HwGpuTaskKey.String("decoder") + // Encoder + // Stability: development + HwGpuTaskEncoder = HwGpuTaskKey.String("encoder") + // General + // Stability: development + HwGpuTaskGeneral = HwGpuTaskKey.String("general") +) + +// Enum values for hw.limit_type +var ( + // Critical + // Stability: development + HwLimitTypeCritical = HwLimitTypeKey.String("critical") + // Degraded + // Stability: development + HwLimitTypeDegraded = HwLimitTypeKey.String("degraded") + // High Critical + // Stability: development + HwLimitTypeHighCritical = HwLimitTypeKey.String("high.critical") + // High Degraded + // Stability: development + HwLimitTypeHighDegraded = HwLimitTypeKey.String("high.degraded") + // Low Critical + // Stability: development + HwLimitTypeLowCritical = HwLimitTypeKey.String("low.critical") + // Low Degraded + // Stability: development + HwLimitTypeLowDegraded = HwLimitTypeKey.String("low.degraded") + // Maximum + // Stability: development + HwLimitTypeMax = HwLimitTypeKey.String("max") + // Throttled + // Stability: development + HwLimitTypeThrottled = HwLimitTypeKey.String("throttled") + // Turbo + // Stability: development + HwLimitTypeTurbo = HwLimitTypeKey.String("turbo") +) + +// Enum values for hw.logical_disk.state +var ( + // Used + // Stability: development + HwLogicalDiskStateUsed = HwLogicalDiskStateKey.String("used") + // Free + // Stability: development + HwLogicalDiskStateFree = HwLogicalDiskStateKey.String("free") +) + +// Enum values for hw.physical_disk.state +var ( + // Remaining + // Stability: development + HwPhysicalDiskStateRemaining = HwPhysicalDiskStateKey.String("remaining") +) + +// Enum values for hw.state +var ( + // Degraded + // Stability: development + HwStateDegraded = HwStateKey.String("degraded") + // Failed + // Stability: development + HwStateFailed = HwStateKey.String("failed") + // Needs Cleaning + // Stability: development + HwStateNeedsCleaning = HwStateKey.String("needs_cleaning") + // OK + // Stability: development + HwStateOk = HwStateKey.String("ok") + // Predicted Failure + // Stability: development + HwStatePredictedFailure = HwStateKey.String("predicted_failure") +) + +// Enum values for hw.tape_drive.operation_type +var ( + // Mount + // Stability: development + HwTapeDriveOperationTypeMount = HwTapeDriveOperationTypeKey.String("mount") + // Unmount + // Stability: development + HwTapeDriveOperationTypeUnmount = HwTapeDriveOperationTypeKey.String("unmount") + // Clean + // Stability: development + HwTapeDriveOperationTypeClean = HwTapeDriveOperationTypeKey.String("clean") +) + +// Enum values for hw.type +var ( + // Battery + // Stability: development + HwTypeBattery = HwTypeKey.String("battery") + // CPU + // Stability: development + HwTypeCPU = HwTypeKey.String("cpu") + // Disk controller + // Stability: development + HwTypeDiskController = HwTypeKey.String("disk_controller") + // Enclosure + // Stability: development + HwTypeEnclosure = HwTypeKey.String("enclosure") + // Fan + // Stability: development + HwTypeFan = HwTypeKey.String("fan") + // GPU + // Stability: development + HwTypeGpu = HwTypeKey.String("gpu") + // Logical disk + // Stability: development + HwTypeLogicalDisk = HwTypeKey.String("logical_disk") + // Memory + // Stability: development + HwTypeMemory = HwTypeKey.String("memory") + // Network + // Stability: development + HwTypeNetwork = HwTypeKey.String("network") + // Physical disk + // Stability: development + HwTypePhysicalDisk = HwTypeKey.String("physical_disk") + // Power supply + // Stability: development + HwTypePowerSupply = HwTypeKey.String("power_supply") + // Tape drive + // Stability: development + HwTypeTapeDrive = HwTypeKey.String("tape_drive") + // Temperature + // Stability: development + HwTypeTemperature = HwTypeKey.String("temperature") + // Voltage + // Stability: development + HwTypeVoltage = HwTypeKey.String("voltage") +) + +// Namespace: ios +const ( + // IOSAppStateKey is the attribute Key conforming to the "ios.app.state" + // semantic conventions. It represents the this attribute represents the state + // of the application. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: The iOS lifecycle states are defined in the + // [UIApplicationDelegate documentation], and from which the `OS terminology` + // column values are derived. + // + // [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate + IOSAppStateKey = attribute.Key("ios.app.state") +) + +// Enum values for ios.app.state +var ( + // The app has become `active`. Associated with UIKit notification + // `applicationDidBecomeActive`. + // + // Stability: development + IOSAppStateActive = IOSAppStateKey.String("active") + // The app is now `inactive`. Associated with UIKit notification + // `applicationWillResignActive`. + // + // Stability: development + IOSAppStateInactive = IOSAppStateKey.String("inactive") + // The app is now in the background. This value is associated with UIKit + // notification `applicationDidEnterBackground`. + // + // Stability: development + IOSAppStateBackground = IOSAppStateKey.String("background") + // The app is now in the foreground. This value is associated with UIKit + // notification `applicationWillEnterForeground`. + // + // Stability: development + IOSAppStateForeground = IOSAppStateKey.String("foreground") + // The app is about to terminate. Associated with UIKit notification + // `applicationWillTerminate`. + // + // Stability: development + IOSAppStateTerminate = IOSAppStateKey.String("terminate") +) + +// Namespace: jsonrpc +const ( + // JSONRPCProtocolVersionKey is the attribute Key conforming to the + // "jsonrpc.protocol.version" semantic conventions. It represents the protocol + // version, as specified in the `jsonrpc` property of the request and its + // corresponding response. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2.0", "1.0" + JSONRPCProtocolVersionKey = attribute.Key("jsonrpc.protocol.version") + + // JSONRPCRequestIDKey is the attribute Key conforming to the + // "jsonrpc.request.id" semantic conventions. It represents a string + // representation of the `id` property of the request and its corresponding + // response. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "10", "request-7" + // Note: Under the [JSON-RPC specification], the `id` property may be a string, + // number, null, or omitted entirely. When omitted, the request is treated as a + // notification. Using `null` is not equivalent to omitting the `id`, but it is + // discouraged. + // Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or + // omitted. + // + // [JSON-RPC specification]: https://www.jsonrpc.org/specification + JSONRPCRequestIDKey = attribute.Key("jsonrpc.request.id") +) + +// JSONRPCProtocolVersion returns an attribute KeyValue conforming to the +// "jsonrpc.protocol.version" semantic conventions. It represents the protocol +// version, as specified in the `jsonrpc` property of the request and its +// corresponding response. +func JSONRPCProtocolVersion(val string) attribute.KeyValue { + return JSONRPCProtocolVersionKey.String(val) +} + +// JSONRPCRequestID returns an attribute KeyValue conforming to the +// "jsonrpc.request.id" semantic conventions. It represents a string +// representation of the `id` property of the request and its corresponding +// response. +func JSONRPCRequestID(val string) attribute.KeyValue { + return JSONRPCRequestIDKey.String(val) +} + +// Namespace: k8s +const ( + // K8SClusterNameKey is the attribute Key conforming to the "k8s.cluster.name" + // semantic conventions. It represents the name of the cluster. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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]. + // 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. + // + // [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html + 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: + 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: Recommended + // Stability: Development + // + // Examples: "Evicted", "Error" + K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason") + + // K8SContainerStatusReasonKey is the attribute Key conforming to the + // "k8s.container.status.reason" semantic conventions. It represents the reason + // for the container state. Corresponds to the `reason` field of the: + // [K8s ContainerStateWaiting] or [K8s ContainerStateTerminated]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "ContainerCreating", "CrashLoopBackOff", + // "CreateContainerConfigError", "ErrImagePull", "ImagePullBackOff", + // "OOMKilled", "Completed", "Error", "ContainerCannotRun" + // + // [K8s ContainerStateWaiting]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core + // [K8s ContainerStateTerminated]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core + K8SContainerStatusReasonKey = attribute.Key("k8s.container.status.reason") + + // K8SContainerStatusStateKey is the attribute Key conforming to the + // "k8s.container.status.state" semantic conventions. It represents the state of + // the container. [K8s ContainerState]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "terminated", "running", "waiting" + // + // [K8s ContainerState]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core + K8SContainerStatusStateKey = attribute.Key("k8s.container.status.state") + + // K8SCronJobNameKey is the attribute Key conforming to the "k8s.cronjob.name" + // semantic conventions. It represents the name of the CronJob. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + + // K8SHPAMetricTypeKey is the attribute Key conforming to the + // "k8s.hpa.metric.type" semantic conventions. It represents the type of metric + // source for the horizontal pod autoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Resource", "ContainerResource" + // Note: This attribute reflects the `type` field of spec.metrics[] in the HPA. + K8SHPAMetricTypeKey = attribute.Key("k8s.hpa.metric.type") + + // K8SHPANameKey is the attribute Key conforming to the "k8s.hpa.name" semantic + // conventions. It represents the name of the horizontal pod autoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + K8SHPANameKey = attribute.Key("k8s.hpa.name") + + // K8SHPAScaletargetrefAPIVersionKey is the attribute Key conforming to the + // "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the + // API version of the target resource to scale for the HorizontalPodAutoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "apps/v1", "autoscaling/v2" + // Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA + // spec. + K8SHPAScaletargetrefAPIVersionKey = attribute.Key("k8s.hpa.scaletargetref.api_version") + + // K8SHPAScaletargetrefKindKey is the attribute Key conforming to the + // "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of + // the target resource to scale for the HorizontalPodAutoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Deployment", "StatefulSet" + // Note: This maps to the `kind` field in the `scaleTargetRef` of the HPA spec. + K8SHPAScaletargetrefKindKey = attribute.Key("k8s.hpa.scaletargetref.kind") + + // K8SHPAScaletargetrefNameKey is the attribute Key conforming to the + // "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of + // the target resource to scale for the HorizontalPodAutoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-deployment", "my-statefulset" + // Note: This maps to the `name` field in the `scaleTargetRef` of the HPA spec. + K8SHPAScaletargetrefNameKey = attribute.Key("k8s.hpa.scaletargetref.name") + + // K8SHPAUIDKey is the attribute Key conforming to the "k8s.hpa.uid" semantic + // conventions. It represents the UID of the horizontal pod autoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SHPAUIDKey = attribute.Key("k8s.hpa.uid") + + // K8SHugepageSizeKey is the attribute Key conforming to the "k8s.hugepage.size" + // semantic conventions. It represents the size (identifier) of the K8s huge + // page. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2Mi" + K8SHugepageSizeKey = attribute.Key("k8s.hugepage.size") + + // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" semantic + // conventions. It represents the name of the Job. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: "default" + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") + + // K8SNamespacePhaseKey is the attribute Key conforming to the + // "k8s.namespace.phase" semantic conventions. It represents the phase of the + // K8s namespace. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "active", "terminating" + // Note: This attribute aligns with the `phase` field of the + // [K8s NamespaceStatus] + // + // [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core + K8SNamespacePhaseKey = attribute.Key("k8s.namespace.phase") + + // K8SNodeConditionStatusKey is the attribute Key conforming to the + // "k8s.node.condition.status" semantic conventions. It represents the status of + // the condition, one of True, False, Unknown. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "true", "false", "unknown" + // Note: This attribute aligns with the `status` field of the + // [NodeCondition] + // + // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core + K8SNodeConditionStatusKey = attribute.Key("k8s.node.condition.status") + + // K8SNodeConditionTypeKey is the attribute Key conforming to the + // "k8s.node.condition.type" semantic conventions. It represents the condition + // type of a K8s Node. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Ready", "DiskPressure" + // Note: K8s Node conditions as described + // by [K8s documentation]. + // + // This attribute aligns with the `type` field of the + // [NodeCondition] + // + // The set of possible values is not limited to those listed here. Managed + // Kubernetes environments, + // or custom controllers MAY introduce additional node condition types. + // When this occurs, the exact value as reported by the Kubernetes API SHOULD be + // used. + // + // [K8s documentation]: https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition + // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core + K8SNodeConditionTypeKey = attribute.Key("k8s.node.condition.type") + + // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" + // semantic conventions. It represents the name of the Node. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: "1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2" + K8SNodeUIDKey = attribute.Key("k8s.node.uid") + + // K8SPodHostnameKey is the attribute Key conforming to the "k8s.pod.hostname" + // semantic conventions. It represents the specifies the hostname of the Pod. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // Examples: "collector-gateway" + // Note: The K8s Pod spec has an optional hostname field, which can be used to + // specify a hostname. + // Refer to [K8s docs] + // for more information about this field. + // + // This attribute aligns with the `hostname` field of the + // [K8s PodSpec]. + // + // [K8s docs]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field + // [K8s PodSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core + K8SPodHostnameKey = attribute.Key("k8s.pod.hostname") + + // K8SPodIPKey is the attribute Key conforming to the "k8s.pod.ip" semantic + // conventions. It represents the IP address allocated to the Pod. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // Examples: "172.18.0.2" + // Note: This attribute aligns with the `podIP` field of the + // [K8s PodStatus]. + // + // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core + K8SPodIPKey = attribute.Key("k8s.pod.ip") + + // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" semantic + // conventions. It represents the name of the Pod. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // Examples: "opentelemetry-pod-autoconf" + K8SPodNameKey = attribute.Key("k8s.pod.name") + + // K8SPodStartTimeKey is the attribute Key conforming to the + // "k8s.pod.start_time" semantic conventions. It represents the start timestamp + // of the Pod. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // Examples: "2025-12-04T08:41:03Z" + // Note: Date and time at which the object was acknowledged by the Kubelet. + // This is before the Kubelet pulled the container image(s) for the pod. + // + // This attribute aligns with the `startTime` field of the + // [K8s PodStatus], + // in ISO 8601 (RFC 3339 compatible) format. + // + // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core + K8SPodStartTimeKey = attribute.Key("k8s.pod.start_time") + + // K8SPodStatusPhaseKey is the attribute Key conforming to the + // "k8s.pod.status.phase" semantic conventions. It represents the phase for the + // pod. Corresponds to the `phase` field of the: [K8s PodStatus]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Pending", "Running" + // + // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core + K8SPodStatusPhaseKey = attribute.Key("k8s.pod.status.phase") + + // K8SPodStatusReasonKey is the attribute Key conforming to the + // "k8s.pod.status.reason" semantic conventions. It represents the reason for + // the pod state. Corresponds to the `reason` field of the: [K8s PodStatus]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Evicted", "NodeAffinity" + // + // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core + K8SPodStatusReasonKey = attribute.Key("k8s.pod.status.reason") + + // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" semantic + // conventions. It represents the UID of the Pod. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + + // K8SReplicationControllerNameKey is the attribute Key conforming to the + // "k8s.replicationcontroller.name" semantic conventions. It represents the name + // of the replication controller. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + K8SReplicationControllerNameKey = attribute.Key("k8s.replicationcontroller.name") + + // K8SReplicationControllerUIDKey is the attribute Key conforming to the + // "k8s.replicationcontroller.uid" semantic conventions. It represents the UID + // of the replication controller. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SReplicationControllerUIDKey = attribute.Key("k8s.replicationcontroller.uid") + + // K8SResourceQuotaNameKey is the attribute Key conforming to the + // "k8s.resourcequota.name" semantic conventions. It represents the name of the + // resource quota. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + K8SResourceQuotaNameKey = attribute.Key("k8s.resourcequota.name") + + // K8SResourceQuotaResourceNameKey is the attribute Key conforming to the + // "k8s.resourcequota.resource_name" semantic conventions. It represents the + // name of the K8s resource a resource quota defines. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "count/replicationcontrollers" + // Note: The value for this attribute can be either the full + // `count/[.]` string (e.g., count/deployments.apps, + // count/pods), or, for certain core Kubernetes resources, just the resource + // name (e.g., pods, services, configmaps). Both forms are supported by + // Kubernetes for object count quotas. See + // [Kubernetes Resource Quotas documentation] for more details. + // + // [Kubernetes Resource Quotas documentation]: https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-on-object-count + K8SResourceQuotaResourceNameKey = attribute.Key("k8s.resourcequota.resource_name") + + // K8SResourceQuotaUIDKey is the attribute Key conforming to the + // "k8s.resourcequota.uid" semantic conventions. It represents the UID of the + // resource quota. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SResourceQuotaUIDKey = attribute.Key("k8s.resourcequota.uid") + + // K8SStatefulSetNameKey is the attribute Key conforming to the + // "k8s.statefulset.name" semantic conventions. It represents the name of the + // StatefulSet. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Alpha + // + // 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: Recommended + // Stability: Alpha + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") + + // K8SStorageclassNameKey is the attribute Key conforming to the + // "k8s.storageclass.name" semantic conventions. It represents the name of K8s + // [StorageClass] object. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "gold.storageclass.storage.k8s.io" + // + // [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io + K8SStorageclassNameKey = attribute.Key("k8s.storageclass.name") + + // K8SVolumeNameKey is the attribute Key conforming to the "k8s.volume.name" + // semantic conventions. It represents the name of the K8s volume. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "volume0" + K8SVolumeNameKey = attribute.Key("k8s.volume.name") + + // K8SVolumeTypeKey is the attribute Key conforming to the "k8s.volume.type" + // semantic conventions. It represents the type of the K8s volume. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "emptyDir", "persistentVolumeClaim" + K8SVolumeTypeKey = attribute.Key("k8s.volume.type") +) + +// 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) +} + +// K8SCronJobAnnotation returns an attribute KeyValue conforming to the +// "k8s.cronjob.annotation" semantic conventions. It represents the cronjob +// annotation placed on the CronJob, the `` being the annotation name, the +// value being the annotation value. +func K8SCronJobAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.cronjob.annotation."+key, val) +} + +// K8SCronJobLabel returns an attribute KeyValue conforming to the +// "k8s.cronjob.label" semantic conventions. It represents the label placed on +// the CronJob, the `` being the label name, the value being the label +// value. +func K8SCronJobLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.cronjob.label."+key, 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) +} + +// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the +// "k8s.daemonset.annotation" semantic conventions. It represents the annotation +// placed on the DaemonSet, the `` being the annotation name, the value +// being the annotation value, even if the value is empty. +func K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.daemonset.annotation."+key, val) +} + +// K8SDaemonSetLabel returns an attribute KeyValue conforming to the +// "k8s.daemonset.label" semantic conventions. It represents the label placed on +// the DaemonSet, the `` being the label name, the value being the label +// value, even if the value is empty. +func K8SDaemonSetLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.daemonset.label."+key, 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) +} + +// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the +// "k8s.deployment.annotation" semantic conventions. It represents the annotation +// placed on the Deployment, the `` being the annotation name, the value +// being the annotation value, even if the value is empty. +func K8SDeploymentAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.deployment.annotation."+key, val) +} + +// K8SDeploymentLabel returns an attribute KeyValue conforming to the +// "k8s.deployment.label" semantic conventions. It represents the label placed on +// the Deployment, the `` being the label name, the value being the label +// value, even if the value is empty. +func K8SDeploymentLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.deployment.label."+key, 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) +} + +// K8SHPAMetricType returns an attribute KeyValue conforming to the +// "k8s.hpa.metric.type" semantic conventions. It represents the type of metric +// source for the horizontal pod autoscaler. +func K8SHPAMetricType(val string) attribute.KeyValue { + return K8SHPAMetricTypeKey.String(val) +} + +// K8SHPAName returns an attribute KeyValue conforming to the "k8s.hpa.name" +// semantic conventions. It represents the name of the horizontal pod autoscaler. +func K8SHPAName(val string) attribute.KeyValue { + return K8SHPANameKey.String(val) +} + +// K8SHPAScaletargetrefAPIVersion returns an attribute KeyValue conforming to the +// "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the +// API version of the target resource to scale for the HorizontalPodAutoscaler. +func K8SHPAScaletargetrefAPIVersion(val string) attribute.KeyValue { + return K8SHPAScaletargetrefAPIVersionKey.String(val) +} + +// K8SHPAScaletargetrefKind returns an attribute KeyValue conforming to the +// "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of +// the target resource to scale for the HorizontalPodAutoscaler. +func K8SHPAScaletargetrefKind(val string) attribute.KeyValue { + return K8SHPAScaletargetrefKindKey.String(val) +} + +// K8SHPAScaletargetrefName returns an attribute KeyValue conforming to the +// "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of +// the target resource to scale for the HorizontalPodAutoscaler. +func K8SHPAScaletargetrefName(val string) attribute.KeyValue { + return K8SHPAScaletargetrefNameKey.String(val) +} + +// K8SHPAUID returns an attribute KeyValue conforming to the "k8s.hpa.uid" +// semantic conventions. It represents the UID of the horizontal pod autoscaler. +func K8SHPAUID(val string) attribute.KeyValue { + return K8SHPAUIDKey.String(val) +} + +// K8SHugepageSize returns an attribute KeyValue conforming to the +// "k8s.hugepage.size" semantic conventions. It represents the size (identifier) +// of the K8s huge page. +func K8SHugepageSize(val string) attribute.KeyValue { + return K8SHugepageSizeKey.String(val) +} + +// K8SJobAnnotation returns an attribute KeyValue conforming to the +// "k8s.job.annotation" semantic conventions. It represents the annotation placed +// on the Job, the `` being the annotation name, the value being the +// annotation value, even if the value is empty. +func K8SJobAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.job.annotation."+key, val) +} + +// K8SJobLabel returns an attribute KeyValue conforming to the "k8s.job.label" +// semantic conventions. It represents the label placed on the Job, the `` +// being the label name, the value being the label value, even if the value is +// empty. +func K8SJobLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.job.label."+key, 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) +} + +// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the +// "k8s.namespace.annotation" semantic conventions. It represents the annotation +// placed on the Namespace, the `` being the annotation name, the value +// being the annotation value, even if the value is empty. +func K8SNamespaceAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.namespace.annotation."+key, val) +} + +// K8SNamespaceLabel returns an attribute KeyValue conforming to the +// "k8s.namespace.label" semantic conventions. It represents the label placed on +// the Namespace, the `` being the label name, the value being the label +// value, even if the value is empty. +func K8SNamespaceLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.namespace.label."+key, 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) +} + +// K8SNodeAnnotation returns an attribute KeyValue conforming to the +// "k8s.node.annotation" semantic conventions. It represents the annotation +// placed on the Node, the `` being the annotation name, the value being the +// annotation value, even if the value is empty. +func K8SNodeAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.node.annotation."+key, val) +} + +// K8SNodeLabel returns an attribute KeyValue conforming to the "k8s.node.label" +// semantic conventions. It represents the label placed on the Node, the `` +// being the label name, the value being the label value, even if the value is +// empty. +func K8SNodeLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.node.label."+key, 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) +} + +// K8SPodAnnotation returns an attribute KeyValue conforming to the +// "k8s.pod.annotation" semantic conventions. It represents the annotation placed +// on the Pod, the `` being the annotation name, the value being the +// annotation value. +func K8SPodAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.pod.annotation."+key, val) +} + +// K8SPodHostname returns an attribute KeyValue conforming to the +// "k8s.pod.hostname" semantic conventions. It represents the specifies the +// hostname of the Pod. +func K8SPodHostname(val string) attribute.KeyValue { + return K8SPodHostnameKey.String(val) +} + +// K8SPodIP returns an attribute KeyValue conforming to the "k8s.pod.ip" semantic +// conventions. It represents the IP address allocated to the Pod. +func K8SPodIP(val string) attribute.KeyValue { + return K8SPodIPKey.String(val) +} + +// K8SPodLabel returns an attribute KeyValue conforming to the "k8s.pod.label" +// semantic conventions. It represents the label placed on the Pod, the `` +// being the label name, the value being the label value. +func K8SPodLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.pod.label."+key, 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) +} + +// K8SPodStartTime returns an attribute KeyValue conforming to the +// "k8s.pod.start_time" semantic conventions. It represents the start timestamp +// of the Pod. +func K8SPodStartTime(val string) attribute.KeyValue { + return K8SPodStartTimeKey.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) +} + +// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the +// "k8s.replicaset.annotation" semantic conventions. It represents the annotation +// placed on the ReplicaSet, the `` being the annotation name, the value +// being the annotation value, even if the value is empty. +func K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.replicaset.annotation."+key, val) +} + +// K8SReplicaSetLabel returns an attribute KeyValue conforming to the +// "k8s.replicaset.label" semantic conventions. It represents the label placed on +// the ReplicaSet, the `` being the label name, the value being the label +// value, even if the value is empty. +func K8SReplicaSetLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.replicaset.label."+key, 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) +} + +// K8SReplicationControllerName returns an attribute KeyValue conforming to the +// "k8s.replicationcontroller.name" semantic conventions. It represents the name +// of the replication controller. +func K8SReplicationControllerName(val string) attribute.KeyValue { + return K8SReplicationControllerNameKey.String(val) +} + +// K8SReplicationControllerUID returns an attribute KeyValue conforming to the +// "k8s.replicationcontroller.uid" semantic conventions. It represents the UID of +// the replication controller. +func K8SReplicationControllerUID(val string) attribute.KeyValue { + return K8SReplicationControllerUIDKey.String(val) +} + +// K8SResourceQuotaName returns an attribute KeyValue conforming to the +// "k8s.resourcequota.name" semantic conventions. It represents the name of the +// resource quota. +func K8SResourceQuotaName(val string) attribute.KeyValue { + return K8SResourceQuotaNameKey.String(val) +} + +// K8SResourceQuotaResourceName returns an attribute KeyValue conforming to the +// "k8s.resourcequota.resource_name" semantic conventions. It represents the name +// of the K8s resource a resource quota defines. +func K8SResourceQuotaResourceName(val string) attribute.KeyValue { + return K8SResourceQuotaResourceNameKey.String(val) +} + +// K8SResourceQuotaUID returns an attribute KeyValue conforming to the +// "k8s.resourcequota.uid" semantic conventions. It represents the UID of the +// resource quota. +func K8SResourceQuotaUID(val string) attribute.KeyValue { + return K8SResourceQuotaUIDKey.String(val) +} + +// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the +// "k8s.statefulset.annotation" semantic conventions. It represents the +// annotation placed on the StatefulSet, the `` being the annotation name, +// the value being the annotation value, even if the value is empty. +func K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.statefulset.annotation."+key, val) +} + +// K8SStatefulSetLabel returns an attribute KeyValue conforming to the +// "k8s.statefulset.label" semantic conventions. It represents the label placed +// on the StatefulSet, the `` being the label name, the value being the +// label value, even if the value is empty. +func K8SStatefulSetLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.statefulset.label."+key, 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) +} + +// K8SStorageclassName returns an attribute KeyValue conforming to the +// "k8s.storageclass.name" semantic conventions. It represents the name of K8s +// [StorageClass] object. +// +// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io +func K8SStorageclassName(val string) attribute.KeyValue { + return K8SStorageclassNameKey.String(val) +} + +// K8SVolumeName returns an attribute KeyValue conforming to the +// "k8s.volume.name" semantic conventions. It represents the name of the K8s +// volume. +func K8SVolumeName(val string) attribute.KeyValue { + return K8SVolumeNameKey.String(val) +} + +// Enum values for k8s.container.status.reason +var ( + // The container is being created. + // Stability: development + K8SContainerStatusReasonContainerCreating = K8SContainerStatusReasonKey.String("ContainerCreating") + // The container is in a crash loop back off state. + // Stability: development + K8SContainerStatusReasonCrashLoopBackOff = K8SContainerStatusReasonKey.String("CrashLoopBackOff") + // There was an error creating the container configuration. + // Stability: development + K8SContainerStatusReasonCreateContainerConfigError = K8SContainerStatusReasonKey.String("CreateContainerConfigError") + // There was an error pulling the container image. + // Stability: development + K8SContainerStatusReasonErrImagePull = K8SContainerStatusReasonKey.String("ErrImagePull") + // The container image pull is in back off state. + // Stability: development + K8SContainerStatusReasonImagePullBackOff = K8SContainerStatusReasonKey.String("ImagePullBackOff") + // The container was killed due to out of memory. + // Stability: development + K8SContainerStatusReasonOomKilled = K8SContainerStatusReasonKey.String("OOMKilled") + // The container has completed execution. + // Stability: development + K8SContainerStatusReasonCompleted = K8SContainerStatusReasonKey.String("Completed") + // There was an error with the container. + // Stability: development + K8SContainerStatusReasonError = K8SContainerStatusReasonKey.String("Error") + // The container cannot run. + // Stability: development + K8SContainerStatusReasonContainerCannotRun = K8SContainerStatusReasonKey.String("ContainerCannotRun") +) + +// Enum values for k8s.container.status.state +var ( + // The container has terminated. + // Stability: development + K8SContainerStatusStateTerminated = K8SContainerStatusStateKey.String("terminated") + // The container is running. + // Stability: development + K8SContainerStatusStateRunning = K8SContainerStatusStateKey.String("running") + // The container is waiting. + // Stability: development + K8SContainerStatusStateWaiting = K8SContainerStatusStateKey.String("waiting") +) + +// Enum values for k8s.namespace.phase +var ( + // Active namespace phase as described by [K8s API] + // Stability: development + // + // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase + K8SNamespacePhaseActive = K8SNamespacePhaseKey.String("active") + // Terminating namespace phase as described by [K8s API] + // Stability: development + // + // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase + K8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String("terminating") +) + +// Enum values for k8s.node.condition.status +var ( + // condition_true + // Stability: development + K8SNodeConditionStatusConditionTrue = K8SNodeConditionStatusKey.String("true") + // condition_false + // Stability: development + K8SNodeConditionStatusConditionFalse = K8SNodeConditionStatusKey.String("false") + // condition_unknown + // Stability: development + K8SNodeConditionStatusConditionUnknown = K8SNodeConditionStatusKey.String("unknown") +) + +// Enum values for k8s.node.condition.type +var ( + // The node is healthy and ready to accept pods + // Stability: development + K8SNodeConditionTypeReady = K8SNodeConditionTypeKey.String("Ready") + // Pressure exists on the disk size—that is, if the disk capacity is low + // Stability: development + K8SNodeConditionTypeDiskPressure = K8SNodeConditionTypeKey.String("DiskPressure") + // Pressure exists on the node memory—that is, if the node memory is low + // Stability: development + K8SNodeConditionTypeMemoryPressure = K8SNodeConditionTypeKey.String("MemoryPressure") + // Pressure exists on the processes—that is, if there are too many processes + // on the node + // Stability: development + K8SNodeConditionTypePIDPressure = K8SNodeConditionTypeKey.String("PIDPressure") + // The network for the node is not correctly configured + // Stability: development + K8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String("NetworkUnavailable") +) + +// Enum values for k8s.pod.status.phase +var ( + // The pod has been accepted by the system, but one or more of the containers + // has not been started. This includes time before being bound to a node, as + // well as time spent pulling images onto the host. + // + // Stability: development + K8SPodStatusPhasePending = K8SPodStatusPhaseKey.String("Pending") + // The pod has been bound to a node and all of the containers have been started. + // At least one container is still running or is in the process of being + // restarted. + // + // Stability: development + K8SPodStatusPhaseRunning = K8SPodStatusPhaseKey.String("Running") + // All containers in the pod have voluntarily terminated with a container exit + // code of 0, and the system is not going to restart any of these containers. + // + // Stability: development + K8SPodStatusPhaseSucceeded = K8SPodStatusPhaseKey.String("Succeeded") + // All containers in the pod have terminated, and at least one container has + // terminated in a failure (exited with a non-zero exit code or was stopped by + // the system). + // + // Stability: development + K8SPodStatusPhaseFailed = K8SPodStatusPhaseKey.String("Failed") + // For some reason the state of the pod could not be obtained, typically due to + // an error in communicating with the host of the pod. + // + // Stability: development + K8SPodStatusPhaseUnknown = K8SPodStatusPhaseKey.String("Unknown") +) + +// Enum values for k8s.pod.status.reason +var ( + // The pod is evicted. + // Stability: development + K8SPodStatusReasonEvicted = K8SPodStatusReasonKey.String("Evicted") + // The pod is in a status because of its node affinity + // Stability: development + K8SPodStatusReasonNodeAffinity = K8SPodStatusReasonKey.String("NodeAffinity") + // The reason on a pod when its state cannot be confirmed as kubelet is + // unresponsive on the node it is (was) running. + // + // Stability: development + K8SPodStatusReasonNodeLost = K8SPodStatusReasonKey.String("NodeLost") + // The node is shutdown + // Stability: development + K8SPodStatusReasonShutdown = K8SPodStatusReasonKey.String("Shutdown") + // The pod was rejected admission to the node because of an error during + // admission that could not be categorized. + // + // Stability: development + K8SPodStatusReasonUnexpectedAdmissionError = K8SPodStatusReasonKey.String("UnexpectedAdmissionError") +) + +// Enum values for k8s.volume.type +var ( + // A [persistentVolumeClaim] volume + // Stability: development + // + // [persistentVolumeClaim]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim + K8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String("persistentVolumeClaim") + // A [configMap] volume + // Stability: development + // + // [configMap]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap + K8SVolumeTypeConfigMap = K8SVolumeTypeKey.String("configMap") + // A [downwardAPI] volume + // Stability: development + // + // [downwardAPI]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi + K8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String("downwardAPI") + // An [emptyDir] volume + // Stability: development + // + // [emptyDir]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir + K8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String("emptyDir") + // A [secret] volume + // Stability: development + // + // [secret]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret + K8SVolumeTypeSecret = K8SVolumeTypeKey.String("secret") + // A [local] volume + // Stability: development + // + // [local]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local + K8SVolumeTypeLocal = K8SVolumeTypeKey.String("local") +) + +// Namespace: log +const ( + // LogFileNameKey is the attribute Key conforming to the "log.file.name" + // semantic conventions. It represents the basename of the file. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "/var/lib/docker/uuid.log" + LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") + + // 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: Recommended + // Stability: Development + // + // Examples: + LogIostreamKey = attribute.Key("log.iostream") + + // LogRecordOriginalKey is the attribute Key conforming to the + // "log.record.original" semantic conventions. It represents the complete + // original Log Record. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - + // Something happened", "[INFO] 8/3/24 12:34:56 Something happened" + // Note: This value MAY be added when processing a Log Record which was + // originally transmitted as a string or equivalent data type AND the Body field + // of the Log Record does not contain the same value. (e.g. a syslog or a log + // record read from a file.) + LogRecordOriginalKey = attribute.Key("log.record.original") + + // 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: Recommended + // Stability: Development + // + // 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)], but other + // identifiers (e.g. UUID) may be used as needed. + // + // [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec + LogRecordUIDKey = attribute.Key("log.record.uid") +) + +// 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) +} + +// LogRecordOriginal returns an attribute KeyValue conforming to the +// "log.record.original" semantic conventions. It represents the complete +// original Log Record. +func LogRecordOriginal(val string) attribute.KeyValue { + return LogRecordOriginalKey.String(val) +} + +// 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) +} + +// Enum values for log.iostream +var ( + // Logs from stdout stream + // Stability: development + LogIostreamStdout = LogIostreamKey.String("stdout") + // Events from stderr stream + // Stability: development + LogIostreamStderr = LogIostreamKey.String("stderr") +) + +// Namespace: mainframe +const ( + // MainframeLparNameKey is the attribute Key conforming to the + // "mainframe.lpar.name" semantic conventions. It represents the name of the + // logical partition that hosts a systems with a mainframe operating system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "LPAR01" + MainframeLparNameKey = attribute.Key("mainframe.lpar.name") +) + +// MainframeLparName returns an attribute KeyValue conforming to the +// "mainframe.lpar.name" semantic conventions. It represents the name of the +// logical partition that hosts a systems with a mainframe operating system. +func MainframeLparName(val string) attribute.KeyValue { + return MainframeLparNameKey.String(val) +} + +// Namespace: mcp +const ( + // McpMethodNameKey is the attribute Key conforming to the "mcp.method.name" + // semantic conventions. It represents the name of the request or notification + // method. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + McpMethodNameKey = attribute.Key("mcp.method.name") + + // McpProtocolVersionKey is the attribute Key conforming to the + // "mcp.protocol.version" semantic conventions. It represents the [version] of + // the Model Context Protocol used. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2025-06-18" + // + // [version]: https://modelcontextprotocol.io/specification/versioning + McpProtocolVersionKey = attribute.Key("mcp.protocol.version") + + // McpResourceURIKey is the attribute Key conforming to the "mcp.resource.uri" + // semantic conventions. It represents the value of the resource uri. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "postgres://database/customers/schema", + // "file:///home/user/documents/report.pdf" + // Note: This is a URI of the resource provided in the following requests or + // notifications: `resources/read`, `resources/subscribe`, + // `resources/unsubscribe`, or `notifications/resources/updated`. + McpResourceURIKey = attribute.Key("mcp.resource.uri") + + // McpSessionIDKey is the attribute Key conforming to the "mcp.session.id" + // semantic conventions. It represents the identifies [MCP session]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "191c4850af6c49e08843a3f6c80e5046" + // + // [MCP session]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management + McpSessionIDKey = attribute.Key("mcp.session.id") +) + +// McpProtocolVersion returns an attribute KeyValue conforming to the +// "mcp.protocol.version" semantic conventions. It represents the [version] of +// the Model Context Protocol used. +// +// [version]: https://modelcontextprotocol.io/specification/versioning +func McpProtocolVersion(val string) attribute.KeyValue { + return McpProtocolVersionKey.String(val) +} + +// McpResourceURI returns an attribute KeyValue conforming to the +// "mcp.resource.uri" semantic conventions. It represents the value of the +// resource uri. +func McpResourceURI(val string) attribute.KeyValue { + return McpResourceURIKey.String(val) +} + +// McpSessionID returns an attribute KeyValue conforming to the "mcp.session.id" +// semantic conventions. It represents the identifies [MCP session]. +// +// [MCP session]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management +func McpSessionID(val string) attribute.KeyValue { + return McpSessionIDKey.String(val) +} + +// Enum values for mcp.method.name +var ( + // Notification cancelling a previously-issued request. + // + // Stability: development + McpMethodNameNotificationsCancelled = McpMethodNameKey.String("notifications/cancelled") + // Request to initialize the MCP client. + // + // Stability: development + McpMethodNameInitialize = McpMethodNameKey.String("initialize") + // Notification indicating that the MCP client has been initialized. + // + // Stability: development + McpMethodNameNotificationsInitialized = McpMethodNameKey.String("notifications/initialized") + // Notification indicating the progress for a long-running operation. + // + // Stability: development + McpMethodNameNotificationsProgress = McpMethodNameKey.String("notifications/progress") + // Request to check that the other party is still alive. + // + // Stability: development + McpMethodNamePing = McpMethodNameKey.String("ping") + // Request to list resources available on server. + // + // Stability: development + McpMethodNameResourcesList = McpMethodNameKey.String("resources/list") + // Request to list resource templates available on server. + // + // Stability: development + McpMethodNameResourcesTemplatesList = McpMethodNameKey.String("resources/templates/list") + // Request to read a resource. + // + // Stability: development + McpMethodNameResourcesRead = McpMethodNameKey.String("resources/read") + // Notification indicating that the list of resources has changed. + // + // Stability: development + McpMethodNameNotificationsResourcesListChanged = McpMethodNameKey.String("notifications/resources/list_changed") + // Request to subscribe to a resource. + // + // Stability: development + McpMethodNameResourcesSubscribe = McpMethodNameKey.String("resources/subscribe") + // Request to unsubscribe from resource updates. + // + // Stability: development + McpMethodNameResourcesUnsubscribe = McpMethodNameKey.String("resources/unsubscribe") + // Notification indicating that a resource has been updated. + // + // Stability: development + McpMethodNameNotificationsResourcesUpdated = McpMethodNameKey.String("notifications/resources/updated") + // Request to list prompts available on server. + // + // Stability: development + McpMethodNamePromptsList = McpMethodNameKey.String("prompts/list") + // Request to get a prompt. + // + // Stability: development + McpMethodNamePromptsGet = McpMethodNameKey.String("prompts/get") + // Notification indicating that the list of prompts has changed. + // + // Stability: development + McpMethodNameNotificationsPromptsListChanged = McpMethodNameKey.String("notifications/prompts/list_changed") + // Request to list tools available on server. + // + // Stability: development + McpMethodNameToolsList = McpMethodNameKey.String("tools/list") + // Request to call a tool. + // + // Stability: development + McpMethodNameToolsCall = McpMethodNameKey.String("tools/call") + // Notification indicating that the list of tools has changed. + // + // Stability: development + McpMethodNameNotificationsToolsListChanged = McpMethodNameKey.String("notifications/tools/list_changed") + // Request to set the logging level. + // + // Stability: development + McpMethodNameLoggingSetLevel = McpMethodNameKey.String("logging/setLevel") + // Notification indicating that a message has been received. + // + // Stability: development + McpMethodNameNotificationsMessage = McpMethodNameKey.String("notifications/message") + // Request to create a sampling message. + // + // Stability: development + McpMethodNameSamplingCreateMessage = McpMethodNameKey.String("sampling/createMessage") + // Request to complete a prompt. + // + // Stability: development + McpMethodNameCompletionComplete = McpMethodNameKey.String("completion/complete") + // Request to list roots available on server. + // + // Stability: development + McpMethodNameRootsList = McpMethodNameKey.String("roots/list") + // Notification indicating that the list of roots has changed. + // + // Stability: development + McpMethodNameNotificationsRootsListChanged = McpMethodNameKey.String("notifications/roots/list_changed") + // Request from the server to elicit additional information from the user via + // the client + // + // Stability: development + McpMethodNameElicitationCreate = McpMethodNameKey.String("elicitation/create") +) + +// Namespace: messaging +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "client-5", "myhost@8742@s8083jm" + MessagingClientIDKey = attribute.Key("messaging.client.id") + + // MessagingConsumerGroupNameKey is the attribute Key conforming to the + // "messaging.consumer.group.name" semantic conventions. It represents the name + // of the consumer group with which a consumer is associated. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-group", "indexer" + // Note: Semantic conventions for individual messaging systems SHOULD document + // whether `messaging.consumer.group.name` is applicable and what it means in + // the context of that system. + MessagingConsumerGroupNameKey = attribute.Key("messaging.consumer.group.name") + + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: 1 + MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id") + + // MessagingDestinationSubscriptionNameKey is the attribute Key conforming to + // the "messaging.destination.subscription.name" semantic conventions. It + // represents the name of the destination subscription from which a message is + // consumed. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "subscription-a" + // Note: Semantic conventions for individual messaging systems SHOULD document + // whether `messaging.destination.subscription.name` is applicable and what it + // means in the context of that system. + MessagingDestinationSubscriptionNameKey = attribute.Key("messaging.destination.subscription.name") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") + + // 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: Recommended + // Stability: Development + MessagingEventHubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") + + // 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: Recommended + // Stability: Development + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + 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: Recommended + // Stability: Development + // + // Examples: ordering_key + MessagingGCPPubSubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") + + // 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: Recommended + // Stability: Development + // + // 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") + + // 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: Recommended + // Stability: Development + // + // Examples: + MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") + + // MessagingKafkaOffsetKey is the attribute Key conforming to the + // "messaging.kafka.offset" semantic conventions. It represents the offset of a + // record in the corresponding Kafka partition. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + MessagingKafkaOffsetKey = attribute.Key("messaging.kafka.offset") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + // Note: If a custom value is used, it MUST be of low cardinality. + MessagingOperationTypeKey = attribute.Key("messaging.operation.type") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + MessagingRabbitMQMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") + + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + 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: Recommended + // Stability: Development + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // Examples: myNamespace + MessagingRocketMQNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + + // MessagingServiceBusDispositionStatusKey is the attribute Key conforming to + // the "messaging.servicebus.disposition_status" semantic conventions. It + // represents the describes the [settlement type]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock + 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: Recommended + // Stability: Development + 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: Recommended + // Stability: Development + MessagingServiceBusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") + + // 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: Recommended + // Stability: Development + // + // Examples: + // 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") +) + +// 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) +} + +// MessagingConsumerGroupName returns an attribute KeyValue conforming to the +// "messaging.consumer.group.name" semantic conventions. It represents the name +// of the consumer group with which a consumer is associated. +func MessagingConsumerGroupName(val string) attribute.KeyValue { + return MessagingConsumerGroupNameKey.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) +} + +// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming +// to the "messaging.destination.subscription.name" semantic conventions. It +// represents the name of the destination subscription from which a message is +// consumed. +func MessagingDestinationSubscriptionName(val string) attribute.KeyValue { + return MessagingDestinationSubscriptionNameKey.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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// MessagingKafkaOffset returns an attribute KeyValue conforming to the +// "messaging.kafka.offset" semantic conventions. It represents the offset of a +// record in the corresponding Kafka partition. +func MessagingKafkaOffset(val int) attribute.KeyValue { + return MessagingKafkaOffsetKey.Int(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) +} + +// 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) +} + +// 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) +} + +// 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) +} + +// Enum values for messaging.operation.type +var ( + // 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 sending + // scenarios. + // + // Stability: development + MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create") + // One or more messages are provided for sending to an intermediary. If a single + // message is sent, the context of the "Send" span can be used as the creation + // context and no "Create" span needs to be created. + // + // Stability: development + MessagingOperationTypeSend = MessagingOperationTypeKey.String("send") + // 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. + // + // Stability: development + MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive") + // One or more messages are processed by a consumer. + // + // Stability: development + MessagingOperationTypeProcess = MessagingOperationTypeKey.String("process") + // One or more messages are settled. + // + // Stability: development + MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle") +) + +// Enum values for messaging.rocketmq.consumption_model +var ( + // Clustering consumption model + // Stability: development + MessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String("clustering") + // Broadcasting consumption model + // Stability: development + MessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String("broadcasting") +) + +// Enum values for messaging.rocketmq.message.type +var ( + // Normal message + // Stability: development + MessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String("normal") + // FIFO message + // Stability: development + MessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String("fifo") + // Delay message + // Stability: development + MessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String("delay") + // Transaction message + // Stability: development + MessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String("transaction") +) + +// Enum values for messaging.servicebus.disposition_status +var ( + // Message is completed + // Stability: development + MessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String("complete") + // Message is abandoned + // Stability: development + MessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String("abandon") + // Message is sent to dead letter queue + // Stability: development + MessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String("dead_letter") + // Message is deferred + // Stability: development + MessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String("defer") +) + +// Enum values for messaging.system +var ( + // Apache ActiveMQ + // Stability: development + MessagingSystemActiveMQ = MessagingSystemKey.String("activemq") + // Amazon Simple Notification Service (SNS) + // Stability: development + MessagingSystemAWSSNS = MessagingSystemKey.String("aws.sns") + // Amazon Simple Queue Service (SQS) + // Stability: development + MessagingSystemAWSSQS = MessagingSystemKey.String("aws_sqs") + // Azure Event Grid + // Stability: development + MessagingSystemEventGrid = MessagingSystemKey.String("eventgrid") + // Azure Event Hubs + // Stability: development + MessagingSystemEventHubs = MessagingSystemKey.String("eventhubs") + // Azure Service Bus + // Stability: development + MessagingSystemServiceBus = MessagingSystemKey.String("servicebus") + // Google Cloud Pub/Sub + // Stability: development + MessagingSystemGCPPubSub = MessagingSystemKey.String("gcp_pubsub") + // Java Message Service + // Stability: development + MessagingSystemJMS = MessagingSystemKey.String("jms") + // Apache Kafka + // Stability: development + MessagingSystemKafka = MessagingSystemKey.String("kafka") + // RabbitMQ + // Stability: development + MessagingSystemRabbitMQ = MessagingSystemKey.String("rabbitmq") + // Apache RocketMQ + // Stability: development + MessagingSystemRocketMQ = MessagingSystemKey.String("rocketmq") + // Apache Pulsar + // Stability: development + MessagingSystemPulsar = MessagingSystemKey.String("pulsar") +) + +// Namespace: network +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: sprint + NetworkCarrierNameKey = attribute.Key("network.carrier.name") + + // NetworkConnectionStateKey is the attribute Key conforming to the + // "network.connection.state" semantic conventions. It represents the state of + // network connection. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "close_wait" + // Note: Connection states are defined as part of the [rfc9293] + // + // [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2 + NetworkConnectionStateKey = attribute.Key("network.connection.state") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: wifi + NetworkConnectionTypeKey = attribute.Key("network.connection.type") + + // NetworkInterfaceNameKey is the attribute Key conforming to the + // "network.interface.name" semantic conventions. It represents the network + // interface name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "lo", "eth0" + NetworkInterfaceNameKey = attribute.Key("network.interface.name") + + // NetworkIODirectionKey is the attribute Key conforming to the + // "network.io.direction" semantic conventions. It represents the network IO + // operation direction. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // 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: Recommended + // 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: Recommended + // 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: Recommended + // 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] or non-OSI equivalent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "amqp", "http", "mqtt" + // Note: The value SHOULD be normalized to lowercase. + // + // [OSI application layer]: https://wikipedia.org/wiki/Application_layer + 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: Recommended + // Stability: Stable + // + // Examples: "1.1", "2" + // Note: If protocol version is subject to negotiation (for example using [ALPN] + // ), this attribute SHOULD be set to the negotiated version. If the actual + // protocol version is not known, this attribute SHOULD NOT be set. + // + // [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html + NetworkProtocolVersionKey = attribute.Key("network.protocol.version") + + // NetworkTransportKey is the attribute Key conforming to the + // "network.transport" semantic conventions. It represents the + // [OSI transport layer] or [inter-process communication method]. + // + // Type: Enum + // RequirementLevel: Recommended + // 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. + // + // [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer + // [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication + NetworkTransportKey = attribute.Key("network.transport") + + // NetworkTypeKey is the attribute Key conforming to the "network.type" semantic + // conventions. It represents the [OSI network layer] or non-OSI equivalent. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "ipv4", "ipv6" + // Note: The value SHOULD be normalized to lowercase. + // + // [OSI network layer]: https://wikipedia.org/wiki/Network_layer + NetworkTypeKey = attribute.Key("network.type") +) + +// 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) +} + +// NetworkInterfaceName returns an attribute KeyValue conforming to the +// "network.interface.name" semantic conventions. It represents the network +// interface name. +func NetworkInterfaceName(val string) attribute.KeyValue { + return NetworkInterfaceNameKey.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] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +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) +} + +// Enum values for network.connection.state +var ( + // closed + // Stability: development + NetworkConnectionStateClosed = NetworkConnectionStateKey.String("closed") + // close_wait + // Stability: development + NetworkConnectionStateCloseWait = NetworkConnectionStateKey.String("close_wait") + // closing + // Stability: development + NetworkConnectionStateClosing = NetworkConnectionStateKey.String("closing") + // established + // Stability: development + NetworkConnectionStateEstablished = NetworkConnectionStateKey.String("established") + // fin_wait_1 + // Stability: development + NetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String("fin_wait_1") + // fin_wait_2 + // Stability: development + NetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String("fin_wait_2") + // last_ack + // Stability: development + NetworkConnectionStateLastAck = NetworkConnectionStateKey.String("last_ack") + // listen + // Stability: development + NetworkConnectionStateListen = NetworkConnectionStateKey.String("listen") + // syn_received + // Stability: development + NetworkConnectionStateSynReceived = NetworkConnectionStateKey.String("syn_received") + // syn_sent + // Stability: development + NetworkConnectionStateSynSent = NetworkConnectionStateKey.String("syn_sent") + // time_wait + // Stability: development + NetworkConnectionStateTimeWait = NetworkConnectionStateKey.String("time_wait") +) + +// Enum values for network.connection.subtype +var ( + // GPRS + // Stability: development + NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") + // EDGE + // Stability: development + NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") + // UMTS + // Stability: development + NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") + // CDMA + // Stability: development + NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + // Stability: development + NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + // Stability: development + NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + // Stability: development + NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + // Stability: development + NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") + // HSUPA + // Stability: development + NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") + // HSPA + // Stability: development + NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") + // IDEN + // Stability: development + NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") + // EVDO Rev. B + // Stability: development + NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") + // LTE + // Stability: development + NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") + // EHRPD + // Stability: development + NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") + // HSPAP + // Stability: development + NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") + // GSM + // Stability: development + NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") + // TD-SCDMA + // Stability: development + NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") + // IWLAN + // Stability: development + NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + // Stability: development + NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + // Stability: development + NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") + // LTE CA + // Stability: development + NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") +) + +// Enum values for network.connection.type +var ( + // wifi + // Stability: development + NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") + // wired + // Stability: development + NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") + // cell + // Stability: development + NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") + // unavailable + // Stability: development + NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") + // unknown + // Stability: development + NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") +) + +// Enum values for network.io.direction +var ( + // transmit + // Stability: development + NetworkIODirectionTransmit = NetworkIODirectionKey.String("transmit") + // receive + // Stability: development + NetworkIODirectionReceive = NetworkIODirectionKey.String("receive") +) + +// Enum values for network.transport +var ( + // TCP + // Stability: stable + NetworkTransportTCP = NetworkTransportKey.String("tcp") + // UDP + // Stability: stable + NetworkTransportUDP = NetworkTransportKey.String("udp") + // Named or anonymous pipe. + // Stability: stable + NetworkTransportPipe = NetworkTransportKey.String("pipe") + // Unix domain socket + // Stability: stable + NetworkTransportUnix = NetworkTransportKey.String("unix") + // QUIC + // Stability: stable + NetworkTransportQUIC = NetworkTransportKey.String("quic") +) + +// Enum values for network.type +var ( + // IPv4 + // Stability: stable + NetworkTypeIPv4 = NetworkTypeKey.String("ipv4") + // IPv6 + // Stability: stable + NetworkTypeIPv6 = NetworkTypeKey.String("ipv6") +) + +// Namespace: nfs +const ( + // NfsOperationNameKey is the attribute Key conforming to the + // "nfs.operation.name" semantic conventions. It represents the NFSv4+ operation + // name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "OPEN", "READ", "GETATTR" + NfsOperationNameKey = attribute.Key("nfs.operation.name") + + // NfsServerRepcacheStatusKey is the attribute Key conforming to the + // "nfs.server.repcache.status" semantic conventions. It represents the linux: + // one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or + // "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: hit + NfsServerRepcacheStatusKey = attribute.Key("nfs.server.repcache.status") +) + +// NfsOperationName returns an attribute KeyValue conforming to the +// "nfs.operation.name" semantic conventions. It represents the NFSv4+ operation +// name. +func NfsOperationName(val string) attribute.KeyValue { + return NfsOperationNameKey.String(val) +} + +// NfsServerRepcacheStatus returns an attribute KeyValue conforming to the +// "nfs.server.repcache.status" semantic conventions. It represents the linux: +// one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache" +// (NFSD_STATS_RC_NOCACHE -- uncacheable). +func NfsServerRepcacheStatus(val string) attribute.KeyValue { + return NfsServerRepcacheStatusKey.String(val) +} + +// Namespace: oci +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: Recommended + // Stability: Development + // + // Examples: + // "sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4" + // Note: Follows [OCI Image Manifest Specification], and specifically the + // [Digest property]. + // An example can be found in [Example Image Manifest]. + // + // [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md + // [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests + // [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#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) +} + +// Namespace: onc_rpc +const ( + // OncRPCProcedureNameKey is the attribute Key conforming to the + // "onc_rpc.procedure.name" semantic conventions. It represents the ONC/Sun RPC + // procedure name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "OPEN", "READ", "GETATTR" + OncRPCProcedureNameKey = attribute.Key("onc_rpc.procedure.name") + + // OncRPCProcedureNumberKey is the attribute Key conforming to the + // "onc_rpc.procedure.number" semantic conventions. It represents the ONC/Sun + // RPC procedure number. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + OncRPCProcedureNumberKey = attribute.Key("onc_rpc.procedure.number") + + // OncRPCProgramNameKey is the attribute Key conforming to the + // "onc_rpc.program.name" semantic conventions. It represents the ONC/Sun RPC + // program name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "portmapper", "nfs" + OncRPCProgramNameKey = attribute.Key("onc_rpc.program.name") + + // OncRPCVersionKey is the attribute Key conforming to the "onc_rpc.version" + // semantic conventions. It represents the ONC/Sun RPC program version. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + OncRPCVersionKey = attribute.Key("onc_rpc.version") +) + +// OncRPCProcedureName returns an attribute KeyValue conforming to the +// "onc_rpc.procedure.name" semantic conventions. It represents the ONC/Sun RPC +// procedure name. +func OncRPCProcedureName(val string) attribute.KeyValue { + return OncRPCProcedureNameKey.String(val) +} + +// OncRPCProcedureNumber returns an attribute KeyValue conforming to the +// "onc_rpc.procedure.number" semantic conventions. It represents the ONC/Sun RPC +// procedure number. +func OncRPCProcedureNumber(val int) attribute.KeyValue { + return OncRPCProcedureNumberKey.Int(val) +} + +// OncRPCProgramName returns an attribute KeyValue conforming to the +// "onc_rpc.program.name" semantic conventions. It represents the ONC/Sun RPC +// program name. +func OncRPCProgramName(val string) attribute.KeyValue { + return OncRPCProgramNameKey.String(val) +} + +// OncRPCVersion returns an attribute KeyValue conforming to the +// "onc_rpc.version" semantic conventions. It represents the ONC/Sun RPC program +// version. +func OncRPCVersion(val int) attribute.KeyValue { + return OncRPCVersionKey.Int(val) +} + +// Namespace: openai +const ( + // OpenAIRequestServiceTierKey is the attribute Key conforming to the + // "openai.request.service_tier" semantic conventions. It represents the service + // tier requested. May be a specific tier, default, or auto. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "auto", "default" + OpenAIRequestServiceTierKey = attribute.Key("openai.request.service_tier") + + // OpenAIResponseServiceTierKey is the attribute Key conforming to the + // "openai.response.service_tier" semantic conventions. It represents the + // service tier used for the response. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "scale", "default" + OpenAIResponseServiceTierKey = attribute.Key("openai.response.service_tier") + + // OpenAIResponseSystemFingerprintKey is the attribute Key conforming to the + // "openai.response.system_fingerprint" semantic conventions. It represents a + // fingerprint to track any eventual change in the Generative AI environment. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "fp_44709d6fcb" + OpenAIResponseSystemFingerprintKey = attribute.Key("openai.response.system_fingerprint") +) + +// OpenAIResponseServiceTier returns an attribute KeyValue conforming to the +// "openai.response.service_tier" semantic conventions. It represents the service +// tier used for the response. +func OpenAIResponseServiceTier(val string) attribute.KeyValue { + return OpenAIResponseServiceTierKey.String(val) +} + +// OpenAIResponseSystemFingerprint returns an attribute KeyValue conforming to +// the "openai.response.system_fingerprint" semantic conventions. It represents a +// fingerprint to track any eventual change in the Generative AI environment. +func OpenAIResponseSystemFingerprint(val string) attribute.KeyValue { + return OpenAIResponseSystemFingerprintKey.String(val) +} + +// Enum values for openai.request.service_tier +var ( + // The system will utilize scale tier credits until they are exhausted. + // Stability: development + OpenAIRequestServiceTierAuto = OpenAIRequestServiceTierKey.String("auto") + // The system will utilize the default scale tier. + // Stability: development + OpenAIRequestServiceTierDefault = OpenAIRequestServiceTierKey.String("default") +) + +// Namespace: openshift +const ( + // OpenShiftClusterquotaNameKey is the attribute Key conforming to the + // "openshift.clusterquota.name" semantic conventions. It represents the name of + // the cluster quota. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + OpenShiftClusterquotaNameKey = attribute.Key("openshift.clusterquota.name") + + // OpenShiftClusterquotaUIDKey is the attribute Key conforming to the + // "openshift.clusterquota.uid" semantic conventions. It represents the UID of + // the cluster quota. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + OpenShiftClusterquotaUIDKey = attribute.Key("openshift.clusterquota.uid") +) + +// OpenShiftClusterquotaName returns an attribute KeyValue conforming to the +// "openshift.clusterquota.name" semantic conventions. It represents the name of +// the cluster quota. +func OpenShiftClusterquotaName(val string) attribute.KeyValue { + return OpenShiftClusterquotaNameKey.String(val) +} + +// OpenShiftClusterquotaUID returns an attribute KeyValue conforming to the +// "openshift.clusterquota.uid" semantic conventions. It represents the UID of +// the cluster quota. +func OpenShiftClusterquotaUID(val string) attribute.KeyValue { + return OpenShiftClusterquotaUIDKey.String(val) +} + +// Namespace: opentracing +const ( + // OpenTracingRefTypeKey is the attribute Key conforming to the + // "opentracing.ref_type" semantic conventions. It represents the parent-child + // Reference type. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: The causal relationship between a child Span and a parent Span. + OpenTracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +// Enum values for opentracing.ref_type +var ( + // The parent Span depends on the child Span in some capacity + // Stability: development + OpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String("child_of") + // The parent Span doesn't depend in any way on the result of the child Span + // Stability: development + OpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String("follows_from") +) + +// Namespace: os +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "14.2.1", "18.04.1" + // + // [Version Attributes]: /docs/resource/README.md#version-attributes + OSVersionKey = attribute.Key("os.version") +) + +// 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]. +// +// [Version Attributes]: /docs/resource/README.md#version-attributes +func OSVersion(val string) attribute.KeyValue { + return OSVersionKey.String(val) +} + +// Enum values for os.type +var ( + // Microsoft Windows + // Stability: development + OSTypeWindows = OSTypeKey.String("windows") + // Linux + // Stability: development + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + // Stability: development + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + // Stability: development + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + // Stability: development + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + // Stability: development + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + // Stability: development + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + // Stability: development + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + // Stability: development + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + // Stability: development + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + // Stability: development + OSTypeZOS = OSTypeKey.String("zos") +) + +// Namespace: otel +const ( + // OTelComponentNameKey is the attribute Key conforming to the + // "otel.component.name" semantic conventions. It represents a name uniquely + // identifying the instance of the OpenTelemetry component within its containing + // SDK instance. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "otlp_grpc_span_exporter/0", "custom-name" + // Note: Implementations SHOULD ensure a low cardinality for this attribute, + // even across application or SDK restarts. + // E.g. implementations MUST NOT use UUIDs as values for this attribute. + // + // Implementations MAY achieve these goals by following a + // `/` pattern, e.g. + // `batching_span_processor/0`. + // Hereby `otel.component.type` refers to the corresponding attribute value of + // the component. + // + // The value of `instance-counter` MAY be automatically assigned by the + // component and uniqueness within the enclosing SDK instance MUST be + // guaranteed. + // For example, `` MAY be implemented by using a monotonically + // increasing counter (starting with `0`), which is incremented every time an + // instance of the given component type is started. + // + // With this implementation, for example the first Batching Span Processor would + // have `batching_span_processor/0` + // as `otel.component.name`, the second one `batching_span_processor/1` and so + // on. + // These values will therefore be reused in the case of an application restart. + OTelComponentNameKey = attribute.Key("otel.component.name") + + // OTelComponentTypeKey is the attribute Key conforming to the + // "otel.component.type" semantic conventions. It represents a name identifying + // the type of the OpenTelemetry component. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "batching_span_processor", "com.example.MySpanExporter" + // Note: If none of the standardized values apply, implementations SHOULD use + // the language-defined name of the type. + // E.g. for Java the fully qualified classname SHOULD be used in this case. + OTelComponentTypeKey = attribute.Key("otel.component.type") + + // OTelEventNameKey is the attribute Key conforming to the "otel.event.name" + // semantic conventions. It represents the identifies the class / type of event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "browser.mouse.click", "device.app.lifecycle" + // Note: This attribute SHOULD be used by non-OTLP exporters when destination + // does not support `EventName` or equivalent field. This attribute MAY be used + // by applications using existing logging libraries so that it can be used to + // set the `EventName` field by Collector or SDK components. + OTelEventNameKey = attribute.Key("otel.event.name") + + // 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: Recommended + // Stability: Stable + // + // Examples: "io.opentelemetry.contrib.mongodb" + OTelScopeNameKey = attribute.Key("otel.scope.name") + + // OTelScopeSchemaURLKey is the attribute Key conforming to the + // "otel.scope.schema_url" semantic conventions. It represents the schema URL of + // the instrumentation scope. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://opentelemetry.io/schemas/1.31.0" + OTelScopeSchemaURLKey = attribute.Key("otel.scope.schema_url") + + // 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: Recommended + // Stability: Stable + // + // Examples: "1.0.0" + OTelScopeVersionKey = attribute.Key("otel.scope.version") + + // OTelSpanParentOriginKey is the attribute Key conforming to the + // "otel.span.parent.origin" semantic conventions. It represents the determines + // whether the span has a parent span, and if so, + // [whether it is a remote parent]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote + OTelSpanParentOriginKey = attribute.Key("otel.span.parent.origin") + + // OTelSpanSamplingResultKey is the attribute Key conforming to the + // "otel.span.sampling_result" semantic conventions. It represents the result + // value of the sampler for this span. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + OTelSpanSamplingResultKey = attribute.Key("otel.span.sampling_result") + + // 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: Recommended + // Stability: Stable + // + // Examples: + 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: Recommended + // Stability: Stable + // + // Examples: "resource not found" + OTelStatusDescriptionKey = attribute.Key("otel.status_description") +) + +// OTelComponentName returns an attribute KeyValue conforming to the +// "otel.component.name" semantic conventions. It represents a name uniquely +// identifying the instance of the OpenTelemetry component within its containing +// SDK instance. +func OTelComponentName(val string) attribute.KeyValue { + return OTelComponentNameKey.String(val) +} + +// OTelEventName returns an attribute KeyValue conforming to the +// "otel.event.name" semantic conventions. It represents the identifies the class +// / type of event. +func OTelEventName(val string) attribute.KeyValue { + return OTelEventNameKey.String(val) +} + +// 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) +} + +// OTelScopeSchemaURL returns an attribute KeyValue conforming to the +// "otel.scope.schema_url" semantic conventions. It represents the schema URL of +// the instrumentation scope. +func OTelScopeSchemaURL(val string) attribute.KeyValue { + return OTelScopeSchemaURLKey.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) +} + +// 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) +} + +// Enum values for otel.component.type +var ( + // The builtin SDK batching span processor + // + // Stability: development + OTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String("batching_span_processor") + // The builtin SDK simple span processor + // + // Stability: development + OTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String("simple_span_processor") + // The builtin SDK batching log record processor + // + // Stability: development + OTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String("batching_log_processor") + // The builtin SDK simple log record processor + // + // Stability: development + OTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String("simple_log_processor") + // OTLP span exporter over gRPC with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String("otlp_grpc_span_exporter") + // OTLP span exporter over HTTP with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String("otlp_http_span_exporter") + // OTLP span exporter over HTTP with JSON serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String("otlp_http_json_span_exporter") + // Zipkin span exporter over HTTP + // + // Stability: development + OTelComponentTypeZipkinHTTPSpanExporter = OTelComponentTypeKey.String("zipkin_http_span_exporter") + // OTLP log record exporter over gRPC with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String("otlp_grpc_log_exporter") + // OTLP log record exporter over HTTP with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String("otlp_http_log_exporter") + // OTLP log record exporter over HTTP with JSON serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String("otlp_http_json_log_exporter") + // The builtin SDK periodically exporting metric reader + // + // Stability: development + OTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String("periodic_metric_reader") + // OTLP metric exporter over gRPC with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String("otlp_grpc_metric_exporter") + // OTLP metric exporter over HTTP with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String("otlp_http_metric_exporter") + // OTLP metric exporter over HTTP with JSON serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String("otlp_http_json_metric_exporter") + // Prometheus metric exporter over HTTP with the default text-based format + // + // Stability: development + OTelComponentTypePrometheusHTTPTextMetricExporter = OTelComponentTypeKey.String("prometheus_http_text_metric_exporter") +) + +// Enum values for otel.span.parent.origin +var ( + // The span does not have a parent, it is a root span + // Stability: development + OTelSpanParentOriginNone = OTelSpanParentOriginKey.String("none") + // The span has a parent and the parent's span context [isRemote()] is false + // Stability: development + // + // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote + OTelSpanParentOriginLocal = OTelSpanParentOriginKey.String("local") + // The span has a parent and the parent's span context [isRemote()] is true + // Stability: development + // + // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote + OTelSpanParentOriginRemote = OTelSpanParentOriginKey.String("remote") +) + +// Enum values for otel.span.sampling_result +var ( + // The span is not sampled and not recording + // Stability: development + OTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String("DROP") + // The span is not sampled, but recording + // Stability: development + OTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String("RECORD_ONLY") + // The span is sampled and recording + // Stability: development + OTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String("RECORD_AND_SAMPLE") +) + +// Enum values for otel.status_code +var ( + // The operation has been validated by an Application developer or Operator to + // have completed successfully. + // Stability: stable + OTelStatusCodeOk = OTelStatusCodeKey.String("OK") + // The operation contains an error. + // Stability: stable + OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") +) + +// Namespace: pprof +const ( + // PprofLocationIsFoldedKey is the attribute Key conforming to the + // "pprof.location.is_folded" semantic conventions. It represents the provides + // an indication that multiple symbols map to this location's address, for + // example due to identical code folding by the linker. In that case the line + // information represents one of the multiple symbols. This field must be + // recomputed when the symbolization state of the profile changes. + // + // Type: boolean + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + PprofLocationIsFoldedKey = attribute.Key("pprof.location.is_folded") + + // PprofMappingHasFilenamesKey is the attribute Key conforming to the + // "pprof.mapping.has_filenames" semantic conventions. It represents the + // indicates that there are filenames related to this mapping. + // + // Type: boolean + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + PprofMappingHasFilenamesKey = attribute.Key("pprof.mapping.has_filenames") + + // PprofMappingHasFunctionsKey is the attribute Key conforming to the + // "pprof.mapping.has_functions" semantic conventions. It represents the + // indicates that there are functions related to this mapping. + // + // Type: boolean + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + PprofMappingHasFunctionsKey = attribute.Key("pprof.mapping.has_functions") + + // PprofMappingHasInlineFramesKey is the attribute Key conforming to the + // "pprof.mapping.has_inline_frames" semantic conventions. It represents the + // indicates that there are inline frames related to this mapping. + // + // Type: boolean + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + PprofMappingHasInlineFramesKey = attribute.Key("pprof.mapping.has_inline_frames") + + // PprofMappingHasLineNumbersKey is the attribute Key conforming to the + // "pprof.mapping.has_line_numbers" semantic conventions. It represents the + // indicates that there are line numbers related to this mapping. + // + // Type: boolean + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + PprofMappingHasLineNumbersKey = attribute.Key("pprof.mapping.has_line_numbers") + + // PprofProfileCommentKey is the attribute Key conforming to the + // "pprof.profile.comment" semantic conventions. It represents the free-form + // text associated with the profile. This field should not be used to store any + // machine-readable information, it is only for human-friendly content. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "hello world", "bazinga" + PprofProfileCommentKey = attribute.Key("pprof.profile.comment") + + // PprofProfileDocURLKey is the attribute Key conforming to the + // "pprof.profile.doc_url" semantic conventions. It represents the documentation + // link for this profile type. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "http://pprof.example.com/cpu-profile.html" + // Note: The URL must be absolute and may be missing if the profile was + // generated by code that did not supply a link + PprofProfileDocURLKey = attribute.Key("pprof.profile.doc_url") + + // PprofProfileDropFramesKey is the attribute Key conforming to the + // "pprof.profile.drop_frames" semantic conventions. It represents the frames + // with Function.function_name fully matching the regexp will be dropped from + // the samples, along with their successors. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "/foobar/" + PprofProfileDropFramesKey = attribute.Key("pprof.profile.drop_frames") + + // PprofProfileKeepFramesKey is the attribute Key conforming to the + // "pprof.profile.keep_frames" semantic conventions. It represents the frames + // with Function.function_name fully matching the regexp will be kept, even if + // it matches drop_frames. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "/bazinga/" + PprofProfileKeepFramesKey = attribute.Key("pprof.profile.keep_frames") +) + +// PprofLocationIsFolded returns an attribute KeyValue conforming to the +// "pprof.location.is_folded" semantic conventions. It represents the provides an +// indication that multiple symbols map to this location's address, for example +// due to identical code folding by the linker. In that case the line information +// represents one of the multiple symbols. This field must be recomputed when the +// symbolization state of the profile changes. +func PprofLocationIsFolded(val bool) attribute.KeyValue { + return PprofLocationIsFoldedKey.Bool(val) +} + +// PprofMappingHasFilenames returns an attribute KeyValue conforming to the +// "pprof.mapping.has_filenames" semantic conventions. It represents the +// indicates that there are filenames related to this mapping. +func PprofMappingHasFilenames(val bool) attribute.KeyValue { + return PprofMappingHasFilenamesKey.Bool(val) +} + +// PprofMappingHasFunctions returns an attribute KeyValue conforming to the +// "pprof.mapping.has_functions" semantic conventions. It represents the +// indicates that there are functions related to this mapping. +func PprofMappingHasFunctions(val bool) attribute.KeyValue { + return PprofMappingHasFunctionsKey.Bool(val) +} + +// PprofMappingHasInlineFrames returns an attribute KeyValue conforming to the +// "pprof.mapping.has_inline_frames" semantic conventions. It represents the +// indicates that there are inline frames related to this mapping. +func PprofMappingHasInlineFrames(val bool) attribute.KeyValue { + return PprofMappingHasInlineFramesKey.Bool(val) +} + +// PprofMappingHasLineNumbers returns an attribute KeyValue conforming to the +// "pprof.mapping.has_line_numbers" semantic conventions. It represents the +// indicates that there are line numbers related to this mapping. +func PprofMappingHasLineNumbers(val bool) attribute.KeyValue { + return PprofMappingHasLineNumbersKey.Bool(val) +} + +// PprofProfileComment returns an attribute KeyValue conforming to the +// "pprof.profile.comment" semantic conventions. It represents the free-form text +// associated with the profile. This field should not be used to store any +// machine-readable information, it is only for human-friendly content. +func PprofProfileComment(val ...string) attribute.KeyValue { + return PprofProfileCommentKey.StringSlice(val) +} + +// PprofProfileDocURL returns an attribute KeyValue conforming to the +// "pprof.profile.doc_url" semantic conventions. It represents the documentation +// link for this profile type. +func PprofProfileDocURL(val string) attribute.KeyValue { + return PprofProfileDocURLKey.String(val) +} + +// PprofProfileDropFrames returns an attribute KeyValue conforming to the +// "pprof.profile.drop_frames" semantic conventions. It represents the frames +// with Function.function_name fully matching the regexp will be dropped from the +// samples, along with their successors. +func PprofProfileDropFrames(val string) attribute.KeyValue { + return PprofProfileDropFramesKey.String(val) +} + +// PprofProfileKeepFrames returns an attribute KeyValue conforming to the +// "pprof.profile.keep_frames" semantic conventions. It represents the frames +// with Function.function_name fully matching the regexp will be kept, even if it +// matches drop_frames. +func PprofProfileKeepFrames(val string) attribute.KeyValue { + return PprofProfileKeepFramesKey.String(val) +} + +// Namespace: process +const ( + // ProcessArgsCountKey is the attribute Key conforming to the + // "process.args_count" semantic conventions. It represents the length of the + // process.command_args array. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 4 + // Note: This field can be useful for querying or performing bucket analysis on + // how many arguments were provided to start a process. More arguments may be an + // indication of suspicious activity. + ProcessArgsCountKey = attribute.Key("process.args_count") + + // 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: Recommended + // Stability: Development + // + // 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`. SHOULD NOT be collected by + // default unless there is sanitization that excludes sensitive data. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // 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. SHOULD NOT be collected by default unless there is sanitization that + // excludes sensitive data. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // Examples: "2023-11-21T09:25:34.853Z" + ProcessCreationTimeKey = attribute.Key("process.creation.time") + + // ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the + // "process.executable.build_id.gnu" semantic conventions. It represents the GNU + // build ID as found in the `.note.gnu.build-id` ELF section (hex string). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "c89b11207f6479603b0d49bf291c092c2b719293" + ProcessExecutableBuildIDGNUKey = attribute.Key("process.executable.build_id.gnu") + + // ProcessExecutableBuildIDGoKey is the attribute Key conforming to the + // "process.executable.build_id.go" semantic conventions. It represents the Go + // build ID as retrieved by `go tool buildid `. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY" + ProcessExecutableBuildIDGoKey = attribute.Key("process.executable.build_id.go") + + // ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the + // "process.executable.build_id.htlhash" semantic conventions. It represents the + // profiling specific build ID for executables. See the OTel specification for + // Profiles for more information. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "600DCAFE4A110000F2BF38C493F5FB92" + ProcessExecutableBuildIDHtlhashKey = attribute.Key("process.executable.build_id.htlhash") + + // 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, this SHOULD be set to the base + // name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to + // the base name of `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: + ProcessInteractiveKey = attribute.Key("process.interactive") + + // ProcessLinuxCgroupKey is the attribute Key conforming to the + // "process.linux.cgroup" semantic conventions. It represents the control group + // associated with the process. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1:name=systemd:/user.slice/user-1000.slice/session-3.scope", + // "0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope" + // Note: Control groups (cgroups) are a kernel feature used to organize and + // manage process resources. This attribute provides the path(s) to the + // cgroup(s) associated with the process, which should match the contents of the + // [/proc/[PID]/cgroup] file. + // + // [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html + ProcessLinuxCgroupKey = attribute.Key("process.linux.cgroup") + + // 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: Recommended + // Stability: Development + // + // Examples: "root" + ProcessOwnerKey = attribute.Key("process.owner") + + // ProcessParentPIDKey is the attribute Key conforming to the + // "process.parent_pid" semantic conventions. It represents the parent Process + // identifier (PPID). + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: 14 + ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid") + + // ProcessStateKey is the attribute Key conforming to the "process.state" + // semantic conventions. It represents the process state, e.g., + // [Linux Process State Codes]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "running" + // + // [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES + ProcessStateKey = attribute.Key("process.state") + + // ProcessTitleKey is the attribute Key conforming to the "process.title" + // semantic conventions. It represents the process title (proctitle). + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "cat /etc/hostname", "xfce4-session", "bash" + // Note: In many Unix-like systems, process title (proctitle), is the string + // that represents the name or command line of a running process, displayed by + // system monitoring tools like ps, top, and htop. + ProcessTitleKey = attribute.Key("process.title") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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") + + // ProcessWorkingDirectoryKey is the attribute Key conforming to the + // "process.working_directory" semantic conventions. It represents the working + // directory of the process. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "/root" + ProcessWorkingDirectoryKey = attribute.Key("process.working_directory") +) + +// ProcessArgsCount returns an attribute KeyValue conforming to the +// "process.args_count" semantic conventions. It represents the length of the +// process.command_args array. +func ProcessArgsCount(val int) attribute.KeyValue { + return ProcessArgsCountKey.Int(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) +} + +// 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`. SHOULD NOT be collected by default unless there +// is sanitization that excludes sensitive data. +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. SHOULD NOT be collected by default unless there is sanitization that +// excludes sensitive data. +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) +} + +// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the +// "process.environment_variable" semantic conventions. It represents the process +// environment variables, `` being the environment variable name, the value +// being the environment variable value. +func ProcessEnvironmentVariable(key string, val string) attribute.KeyValue { + return attribute.String("process.environment_variable."+key, val) +} + +// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the +// "process.executable.build_id.gnu" semantic conventions. It represents the GNU +// build ID as found in the `.note.gnu.build-id` ELF section (hex string). +func ProcessExecutableBuildIDGNU(val string) attribute.KeyValue { + return ProcessExecutableBuildIDGNUKey.String(val) +} + +// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the +// "process.executable.build_id.go" semantic conventions. It represents the Go +// build ID as retrieved by `go tool buildid `. +func ProcessExecutableBuildIDGo(val string) attribute.KeyValue { + return ProcessExecutableBuildIDGoKey.String(val) +} + +// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to +// the "process.executable.build_id.htlhash" semantic conventions. It represents +// the profiling specific build ID for executables. See the OTel specification +// for Profiles for more information. +func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue { + return ProcessExecutableBuildIDHtlhashKey.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, this SHOULD be set to the base +// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD 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) +} + +// ProcessLinuxCgroup returns an attribute KeyValue conforming to the +// "process.linux.cgroup" semantic conventions. It represents the control group +// associated with the process. +func ProcessLinuxCgroup(val string) attribute.KeyValue { + return ProcessLinuxCgroupKey.String(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. +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) +} + +// ProcessTitle returns an attribute KeyValue conforming to the "process.title" +// semantic conventions. It represents the process title (proctitle). +func ProcessTitle(val string) attribute.KeyValue { + return ProcessTitleKey.String(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) +} + +// ProcessWorkingDirectory returns an attribute KeyValue conforming to the +// "process.working_directory" semantic conventions. It represents the working +// directory of the process. +func ProcessWorkingDirectory(val string) attribute.KeyValue { + return ProcessWorkingDirectoryKey.String(val) +} + +// Enum values for process.context_switch.type +var ( + // voluntary + // Stability: development + ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary") + // involuntary + // Stability: development + ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary") +) + +// Enum values for process.state +var ( + // running + // Stability: development + ProcessStateRunning = ProcessStateKey.String("running") + // sleeping + // Stability: development + ProcessStateSleeping = ProcessStateKey.String("sleeping") + // stopped + // Stability: development + ProcessStateStopped = ProcessStateKey.String("stopped") + // defunct + // Stability: development + ProcessStateDefunct = ProcessStateKey.String("defunct") +) + +// Namespace: profile +const ( + // ProfileFrameTypeKey is the attribute Key conforming to the + // "profile.frame.type" semantic conventions. It represents the describes the + // interpreter or compiler of a single frame. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "cpython" + ProfileFrameTypeKey = attribute.Key("profile.frame.type") +) + +// Enum values for profile.frame.type +var ( + // [.NET] + // + // Stability: development + // + // [.NET]: https://wikipedia.org/wiki/.NET + ProfileFrameTypeDotnet = ProfileFrameTypeKey.String("dotnet") + // [JVM] + // + // Stability: development + // + // [JVM]: https://wikipedia.org/wiki/Java_virtual_machine + ProfileFrameTypeJVM = ProfileFrameTypeKey.String("jvm") + // [Kernel] + // + // Stability: development + // + // [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system) + ProfileFrameTypeKernel = ProfileFrameTypeKey.String("kernel") + // Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a + // more precise value MUST be used. + // + // Stability: development + // + // [C]: https://wikipedia.org/wiki/C_(programming_language) + // [C++]: https://wikipedia.org/wiki/C%2B%2B + // [Go]: https://wikipedia.org/wiki/Go_(programming_language) + // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language) + ProfileFrameTypeNative = ProfileFrameTypeKey.String("native") + // [Perl] + // + // Stability: development + // + // [Perl]: https://wikipedia.org/wiki/Perl + ProfileFrameTypePerl = ProfileFrameTypeKey.String("perl") + // [PHP] + // + // Stability: development + // + // [PHP]: https://wikipedia.org/wiki/PHP + ProfileFrameTypePHP = ProfileFrameTypeKey.String("php") + // [Python] + // + // Stability: development + // + // [Python]: https://wikipedia.org/wiki/Python_(programming_language) + ProfileFrameTypeCpython = ProfileFrameTypeKey.String("cpython") + // [Ruby] + // + // Stability: development + // + // [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language) + ProfileFrameTypeRuby = ProfileFrameTypeKey.String("ruby") + // [V8JS] + // + // Stability: development + // + // [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine) + ProfileFrameTypeV8JS = ProfileFrameTypeKey.String("v8js") + // [Erlang] + // + // Stability: development + // + // [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine) + ProfileFrameTypeBeam = ProfileFrameTypeKey.String("beam") + // [Go], + // + // Stability: development + // + // [Go]: https://wikipedia.org/wiki/Go_(programming_language) + ProfileFrameTypeGo = ProfileFrameTypeKey.String("go") + // [Rust] + // + // Stability: development + // + // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language) + ProfileFrameTypeRust = ProfileFrameTypeKey.String("rust") +) + +// Namespace: rpc +const ( + // 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: Recommended + // Stability: Development + // + // Examples: + RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size") + + // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id" + // semantic conventions. It MUST be calculated as two different counters + // starting from `1` one for sent messages and one for received message.. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // 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: Recommended + // Stability: Development + // + // Examples: + 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: Recommended + // Stability: Development + // + // Examples: + RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size") + + // RPCMethodKey is the attribute Key conforming to the "rpc.method" semantic + // conventions. It represents the fully-qualified logical name of the method + // from the RPC interface perspective. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "com.example.ExampleService/exampleMethod", "EchoService/Echo", + // "_OTHER" + // Note: The method name MAY have unbounded cardinality in edge or error cases. + // + // Some RPC frameworks or libraries provide a fixed set of recognized methods + // for client stubs and server implementations. Instrumentations for such + // frameworks MUST set this attribute to the original method name only + // when the method is recognized by the framework or library. + // + // When the method is not recognized, for example, when the server receives + // a request for a method that is not predefined on the server, or when + // instrumentation is not able to reliably detect if the method is predefined, + // the attribute MUST be set to `_OTHER`. In such cases, tracing + // instrumentations MUST also set `rpc.method_original` attribute to + // the original method value. + // + // If the RPC instrumentation could end up converting valid RPC methods to + // `_OTHER`, then it SHOULD provide a way to configure the list of recognized + // RPC methods. + // + // The `rpc.method` can be different from the name of any implementing + // method/function. + // The `code.function.name` attribute may be used to record the fully-qualified + // method actually executing the call on the server side, or the + // RPC client stub method on the client side. + RPCMethodKey = attribute.Key("rpc.method") + + // RPCMethodOriginalKey is the attribute Key conforming to the + // "rpc.method_original" semantic conventions. It represents the original name + // of the method used by the client. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "com.myservice.EchoService/catchAll", + // "com.myservice.EchoService/unknownMethod", "InvalidMethod" + RPCMethodOriginalKey = attribute.Key("rpc.method_original") + + // RPCResponseStatusCodeKey is the attribute Key conforming to the + // "rpc.response.status_code" semantic conventions. It represents the status + // code of the RPC returned by the RPC server or generated by the client. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "OK", "DEADLINE_EXCEEDED", "-32602" + // Note: Usually it represents an error code, but may also represent partial + // success, warning, or differentiate between various types of successful + // outcomes. + // Semantic conventions for individual RPC frameworks SHOULD document what + // `rpc.response.status_code` means in the context of that system and which + // values are considered to represent errors. + RPCResponseStatusCodeKey = attribute.Key("rpc.response.status_code") + + // RPCSystemNameKey is the attribute Key conforming to the "rpc.system.name" + // semantic conventions. It represents the Remote Procedure Call (RPC) system. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: The client and server RPC systems may differ for the same RPC + // interaction. For example, a client may use Apache Dubbo or Connect RPC to + // communicate with a server that uses gRPC since both protocols provide + // compatibility with gRPC. + RPCSystemNameKey = attribute.Key("rpc.system.name") +) + +// 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 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 fully-qualified logical name of the +// method from the RPC interface perspective. +func RPCMethod(val string) attribute.KeyValue { + return RPCMethodKey.String(val) +} + +// RPCMethodOriginal returns an attribute KeyValue conforming to the +// "rpc.method_original" semantic conventions. It represents the original name of +// the method used by the client. +func RPCMethodOriginal(val string) attribute.KeyValue { + return RPCMethodOriginalKey.String(val) +} + +// RPCRequestMetadata returns an attribute KeyValue conforming to the +// "rpc.request.metadata" semantic conventions. It represents the RPC request +// metadata, `` being the normalized RPC metadata key (lowercase), the value +// being the metadata values. +func RPCRequestMetadata(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("rpc.request.metadata."+key, val) +} + +// RPCResponseMetadata returns an attribute KeyValue conforming to the +// "rpc.response.metadata" semantic conventions. It represents the RPC response +// metadata, `` being the normalized RPC metadata key (lowercase), the value +// being the metadata values. +func RPCResponseMetadata(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("rpc.response.metadata."+key, val) +} + +// RPCResponseStatusCode returns an attribute KeyValue conforming to the +// "rpc.response.status_code" semantic conventions. It represents the status code +// of the RPC returned by the RPC server or generated by the client. +func RPCResponseStatusCode(val string) attribute.KeyValue { + return RPCResponseStatusCodeKey.String(val) +} + +// Enum values for rpc.message.type +var ( + // sent + // Stability: development + RPCMessageTypeSent = RPCMessageTypeKey.String("SENT") + // received + // Stability: development + RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED") +) + +// Enum values for rpc.system.name +var ( + // [gRPC] + // Stability: development + // + // [gRPC]: https://grpc.io/ + RPCSystemNameGRPC = RPCSystemNameKey.String("grpc") + // [Apache Dubbo] + // Stability: development + // + // [Apache Dubbo]: https://dubbo.apache.org/ + RPCSystemNameDubbo = RPCSystemNameKey.String("dubbo") + // [Connect RPC] + // Stability: development + // + // [Connect RPC]: https://connectrpc.com/ + RPCSystemNameConnectrpc = RPCSystemNameKey.String("connectrpc") + // [JSON-RPC] + // Stability: development + // + // [JSON-RPC]: https://www.jsonrpc.org/ + RPCSystemNameJSONRPC = RPCSystemNameKey.String("jsonrpc") +) + +// Namespace: security_rule +const ( + // SecurityRuleCategoryKey is the attribute Key conforming to the + // "security_rule.category" semantic conventions. It represents a categorization + // value keyword used by the entity using the rule for detection of this event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Attempted Information Leak" + SecurityRuleCategoryKey = attribute.Key("security_rule.category") + + // SecurityRuleDescriptionKey is the attribute Key conforming to the + // "security_rule.description" semantic conventions. It represents the + // description of the rule generating the event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Block requests to public DNS over HTTPS / TLS protocols" + SecurityRuleDescriptionKey = attribute.Key("security_rule.description") + + // SecurityRuleLicenseKey is the attribute Key conforming to the + // "security_rule.license" semantic conventions. It represents the name of the + // license under which the rule used to generate this event is made available. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Apache 2.0" + SecurityRuleLicenseKey = attribute.Key("security_rule.license") + + // SecurityRuleNameKey is the attribute Key conforming to the + // "security_rule.name" semantic conventions. It represents the name of the rule + // or signature generating the event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "BLOCK_DNS_over_TLS" + SecurityRuleNameKey = attribute.Key("security_rule.name") + + // SecurityRuleReferenceKey is the attribute Key conforming to the + // "security_rule.reference" semantic conventions. It represents the reference + // URL to additional information about the rule used to generate this event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://en.wikipedia.org/wiki/DNS_over_TLS" + // Note: The URL can point to the vendor’s documentation about the rule. If + // that’s not available, it can also be a link to a more general page + // describing this type of alert. + SecurityRuleReferenceKey = attribute.Key("security_rule.reference") + + // SecurityRuleRulesetNameKey is the attribute Key conforming to the + // "security_rule.ruleset.name" semantic conventions. It represents the name of + // the ruleset, policy, group, or parent category in which the rule used to + // generate this event is a member. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Standard_Protocol_Filters" + SecurityRuleRulesetNameKey = attribute.Key("security_rule.ruleset.name") + + // SecurityRuleUUIDKey is the attribute Key conforming to the + // "security_rule.uuid" semantic conventions. It represents a rule ID that is + // unique within the scope of a set or group of agents, observers, or other + // entities using the rule for detection of this event. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "550e8400-e29b-41d4-a716-446655440000", "1100110011" + SecurityRuleUUIDKey = attribute.Key("security_rule.uuid") + + // SecurityRuleVersionKey is the attribute Key conforming to the + // "security_rule.version" semantic conventions. It represents the version / + // revision of the rule being used for analysis. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1.0.0" + SecurityRuleVersionKey = attribute.Key("security_rule.version") +) + +// SecurityRuleCategory returns an attribute KeyValue conforming to the +// "security_rule.category" semantic conventions. It represents a categorization +// value keyword used by the entity using the rule for detection of this event. +func SecurityRuleCategory(val string) attribute.KeyValue { + return SecurityRuleCategoryKey.String(val) +} + +// SecurityRuleDescription returns an attribute KeyValue conforming to the +// "security_rule.description" semantic conventions. It represents the +// description of the rule generating the event. +func SecurityRuleDescription(val string) attribute.KeyValue { + return SecurityRuleDescriptionKey.String(val) +} + +// SecurityRuleLicense returns an attribute KeyValue conforming to the +// "security_rule.license" semantic conventions. It represents the name of the +// license under which the rule used to generate this event is made available. +func SecurityRuleLicense(val string) attribute.KeyValue { + return SecurityRuleLicenseKey.String(val) +} + +// SecurityRuleName returns an attribute KeyValue conforming to the +// "security_rule.name" semantic conventions. It represents the name of the rule +// or signature generating the event. +func SecurityRuleName(val string) attribute.KeyValue { + return SecurityRuleNameKey.String(val) +} + +// SecurityRuleReference returns an attribute KeyValue conforming to the +// "security_rule.reference" semantic conventions. It represents the reference +// URL to additional information about the rule used to generate this event. +func SecurityRuleReference(val string) attribute.KeyValue { + return SecurityRuleReferenceKey.String(val) +} + +// SecurityRuleRulesetName returns an attribute KeyValue conforming to the +// "security_rule.ruleset.name" semantic conventions. It represents the name of +// the ruleset, policy, group, or parent category in which the rule used to +// generate this event is a member. +func SecurityRuleRulesetName(val string) attribute.KeyValue { + return SecurityRuleRulesetNameKey.String(val) +} + +// SecurityRuleUUID returns an attribute KeyValue conforming to the +// "security_rule.uuid" semantic conventions. It represents a rule ID that is +// unique within the scope of a set or group of agents, observers, or other +// entities using the rule for detection of this event. +func SecurityRuleUUID(val string) attribute.KeyValue { + return SecurityRuleUUIDKey.String(val) +} + +// SecurityRuleVersion returns an attribute KeyValue conforming to the +// "security_rule.version" semantic conventions. It represents the version / +// revision of the rule being used for analysis. +func SecurityRuleVersion(val string) attribute.KeyValue { + return SecurityRuleVersionKey.String(val) +} + +// Namespace: server +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: Recommended + // 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: Recommended + // 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) +} + +// Namespace: service +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: Recommended + // Stability: Development + // + // 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] 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`] 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. + // + // [RFC + // 4122]: https://www.ietf.org/rfc/rfc4122.txt + // [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html + 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: Recommended + // 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`], e.g. `unknown_service:bash`. + // If `process.executable.name` is not available, the value MUST be set to + // `unknown_service`. + // + // [`process.executable.name`]: process.md + 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: Recommended + // Stability: Development + // + // 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") + + // ServicePeerNameKey is the attribute Key conforming to the "service.peer.name" + // semantic conventions. It represents the logical name of the service on the + // other side of the connection. SHOULD be equal to the actual [`service.name`] + // resource attribute of the remote service if any. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "shoppingcart" + // + // [`service.name`]: /docs/resource/README.md#service + ServicePeerNameKey = attribute.Key("service.peer.name") + + // ServicePeerNamespaceKey is the attribute Key conforming to the + // "service.peer.namespace" semantic conventions. It represents the logical + // namespace of the service on the other side of the connection. SHOULD be equal + // to the actual [`service.namespace`] resource attribute of the remote service + // if any. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Shop" + // + // [`service.namespace`]: /docs/resource/README.md#service + ServicePeerNamespaceKey = attribute.Key("service.peer.namespace") + + // ServiceVersionKey is the attribute Key conforming to the "service.version" + // semantic conventions. It represents the version string of the service + // component. The format is not defined by these conventions. + // + // Type: string + // RequirementLevel: Recommended + // 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) +} + +// ServicePeerName returns an attribute KeyValue conforming to the +// "service.peer.name" semantic conventions. It represents the logical name of +// the service on the other side of the connection. SHOULD be equal to the actual +// [`service.name`] resource attribute of the remote service if any. +// +// [`service.name`]: /docs/resource/README.md#service +func ServicePeerName(val string) attribute.KeyValue { + return ServicePeerNameKey.String(val) +} + +// ServicePeerNamespace returns an attribute KeyValue conforming to the +// "service.peer.namespace" semantic conventions. It represents the logical +// namespace of the service on the other side of the connection. SHOULD be equal +// to the actual [`service.namespace`] resource attribute of the remote service +// if any. +// +// [`service.namespace`]: /docs/resource/README.md#service +func ServicePeerNamespace(val string) attribute.KeyValue { + return ServicePeerNamespaceKey.String(val) +} + +// ServiceVersion returns an attribute KeyValue conforming to the +// "service.version" semantic conventions. It represents the version string of +// the service component. The format is not defined by these conventions. +func ServiceVersion(val string) attribute.KeyValue { + return ServiceVersionKey.String(val) +} + +// Namespace: session +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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) +} + +// Namespace: signalr +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: Recommended + // 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]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "web_sockets", "long_polling" + // + // [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md + SignalRTransportKey = attribute.Key("signalr.transport") +) + +// Enum values for signalr.connection.status +var ( + // The connection was closed normally. + // Stability: stable + SignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String("normal_closure") + // The connection was closed due to a timeout. + // Stability: stable + SignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String("timeout") + // The connection was closed because the app is shutting down. + // Stability: stable + SignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String("app_shutdown") +) + +// Enum values for signalr.transport +var ( + // ServerSentEvents protocol + // Stability: stable + SignalRTransportServerSentEvents = SignalRTransportKey.String("server_sent_events") + // LongPolling protocol + // Stability: stable + SignalRTransportLongPolling = SignalRTransportKey.String("long_polling") + // WebSockets protocol + // Stability: stable + SignalRTransportWebSockets = SignalRTransportKey.String("web_sockets") +) + +// Namespace: source +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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) +} + +// Namespace: system +const ( + // SystemDeviceKey is the attribute Key conforming to the "system.device" + // semantic conventions. It represents the device identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "(identifier)" + SystemDeviceKey = attribute.Key("system.device") + + // SystemFilesystemModeKey is the attribute Key conforming to the + // "system.filesystem.mode" semantic conventions. It represents the filesystem + // mode. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "ext4" + SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") + + // SystemMemoryLinuxSlabStateKey is the attribute Key conforming to the + // "system.memory.linux.slab.state" semantic conventions. It represents the + // Linux Slab memory state. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "reclaimable", "unreclaimable" + SystemMemoryLinuxSlabStateKey = attribute.Key("system.memory.linux.slab.state") + + // SystemMemoryStateKey is the attribute Key conforming to the + // "system.memory.state" semantic conventions. It represents the memory state. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "free", "cached" + SystemMemoryStateKey = attribute.Key("system.memory.state") + + // SystemPagingDirectionKey is the attribute Key conforming to the + // "system.paging.direction" semantic conventions. It represents the paging + // access direction. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "in" + SystemPagingDirectionKey = attribute.Key("system.paging.direction") + + // SystemPagingFaultTypeKey is the attribute Key conforming to the + // "system.paging.fault.type" semantic conventions. It represents the paging + // fault type. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "minor" + SystemPagingFaultTypeKey = attribute.Key("system.paging.fault.type") + + // SystemPagingStateKey is the attribute Key conforming to the + // "system.paging.state" semantic conventions. It represents the memory paging + // state. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "free" + SystemPagingStateKey = attribute.Key("system.paging.state") +) + +// 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) +} + +// 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) +} + +// Enum values for system.filesystem.state +var ( + // used + // Stability: development + SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") + // free + // Stability: development + SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") + // reserved + // Stability: development + SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") +) + +// Enum values for system.filesystem.type +var ( + // fat32 + // Stability: development + SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") + // exfat + // Stability: development + SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") + // ntfs + // Stability: development + SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") + // refs + // Stability: development + SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") + // hfsplus + // Stability: development + SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") + // ext4 + // Stability: development + SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") +) + +// Enum values for system.memory.linux.slab.state +var ( + // reclaimable + // Stability: development + SystemMemoryLinuxSlabStateReclaimable = SystemMemoryLinuxSlabStateKey.String("reclaimable") + // unreclaimable + // Stability: development + SystemMemoryLinuxSlabStateUnreclaimable = SystemMemoryLinuxSlabStateKey.String("unreclaimable") +) + +// Enum values for system.memory.state +var ( + // Actual used virtual memory in bytes. + // Stability: development + SystemMemoryStateUsed = SystemMemoryStateKey.String("used") + // free + // Stability: development + SystemMemoryStateFree = SystemMemoryStateKey.String("free") + // buffers + // Stability: development + SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") + // cached + // Stability: development + SystemMemoryStateCached = SystemMemoryStateKey.String("cached") +) + +// Enum values for system.paging.direction +var ( + // in + // Stability: development + SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") + // out + // Stability: development + SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") +) + +// Enum values for system.paging.fault.type +var ( + // major + // Stability: development + SystemPagingFaultTypeMajor = SystemPagingFaultTypeKey.String("major") + // minor + // Stability: development + SystemPagingFaultTypeMinor = SystemPagingFaultTypeKey.String("minor") +) + +// Enum values for system.paging.state +var ( + // used + // Stability: development + SystemPagingStateUsed = SystemPagingStateKey.String("used") + // free + // Stability: development + SystemPagingStateFree = SystemPagingStateKey.String("free") +) + +// Namespace: telemetry +const ( + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "1.2.3" + TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") + + // TelemetrySDKLanguageKey is the attribute Key conforming to the + // "telemetry.sdk.language" semantic conventions. It represents the language of + // the telemetry SDK. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: + 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: Recommended + // 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: Recommended + // Stability: Stable + // + // Examples: "1.2.3" + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") +) + +// 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) +} + +// 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) +} + +// Enum values for telemetry.sdk.language +var ( + // cpp + // Stability: stable + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + // Stability: stable + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + // Stability: stable + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + // Stability: stable + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + // Stability: stable + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + // Stability: stable + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + // Stability: stable + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + // Stability: stable + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + // Stability: stable + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // rust + // Stability: stable + TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") + // swift + // Stability: stable + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") + // webjs + // Stability: stable + TelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String("webjs") +) + +// Namespace: test +const ( + // TestCaseNameKey is the attribute Key conforming to the "test.case.name" + // semantic conventions. It represents the fully qualified human readable name + // of the [test case]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "org.example.TestCase1.test1", "example/tests/TestCase1.test1", + // "ExampleTestCase1_test1" + // + // [test case]: https://wikipedia.org/wiki/Test_case + TestCaseNameKey = attribute.Key("test.case.name") + + // TestCaseResultStatusKey is the attribute Key conforming to the + // "test.case.result.status" semantic conventions. It represents the status of + // the actual test case result from test execution. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "pass", "fail" + TestCaseResultStatusKey = attribute.Key("test.case.result.status") + + // TestSuiteNameKey is the attribute Key conforming to the "test.suite.name" + // semantic conventions. It represents the human readable name of a [test suite] + // . + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "TestSuite1" + // + // [test suite]: https://wikipedia.org/wiki/Test_suite + TestSuiteNameKey = attribute.Key("test.suite.name") + + // TestSuiteRunStatusKey is the attribute Key conforming to the + // "test.suite.run.status" semantic conventions. It represents the status of the + // test suite run. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "success", "failure", "skipped", "aborted", "timed_out", + // "in_progress" + TestSuiteRunStatusKey = attribute.Key("test.suite.run.status") +) + +// TestCaseName returns an attribute KeyValue conforming to the "test.case.name" +// semantic conventions. It represents the fully qualified human readable name of +// the [test case]. +// +// [test case]: https://wikipedia.org/wiki/Test_case +func TestCaseName(val string) attribute.KeyValue { + return TestCaseNameKey.String(val) +} + +// TestSuiteName returns an attribute KeyValue conforming to the +// "test.suite.name" semantic conventions. It represents the human readable name +// of a [test suite]. +// +// [test suite]: https://wikipedia.org/wiki/Test_suite +func TestSuiteName(val string) attribute.KeyValue { + return TestSuiteNameKey.String(val) +} + +// Enum values for test.case.result.status +var ( + // pass + // Stability: development + TestCaseResultStatusPass = TestCaseResultStatusKey.String("pass") + // fail + // Stability: development + TestCaseResultStatusFail = TestCaseResultStatusKey.String("fail") +) + +// Enum values for test.suite.run.status +var ( + // success + // Stability: development + TestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String("success") + // failure + // Stability: development + TestSuiteRunStatusFailure = TestSuiteRunStatusKey.String("failure") + // skipped + // Stability: development + TestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String("skipped") + // aborted + // Stability: development + TestSuiteRunStatusAborted = TestSuiteRunStatusKey.String("aborted") + // timed_out + // Stability: development + TestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String("timed_out") + // in_progress + // Stability: development + TestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String("in_progress") +) + +// Namespace: thread +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: Recommended + // Stability: Development + // + // Note: + // Examples of where the value can be extracted from: + // + // | Language or platform | Source | + // | --- | --- | + // | JVM | `Thread.currentThread().threadId()` | + // | .NET | `Thread.CurrentThread.ManagedThreadId` | + // | Python | `threading.current_thread().ident` | + // | Ruby | `Thread.current.object_id` | + // | C++ | `std::this_thread::get_id()` | + // | Erlang | `erlang:self()` | + 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: Recommended + // Stability: Development + // + // Examples: main + // Note: + // Examples of where the value can be extracted from: + // + // | Language or platform | Source | + // | --- | --- | + // | JVM | `Thread.currentThread().getName()` | + // | .NET | `Thread.CurrentThread.Name` | + // | Python | `threading.current_thread().name` | + // | Ruby | `Thread.current.name` | + // | Erlang | `erlang:process_info(self(), registered_name)` | + 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) +} + +// Namespace: tls +const ( + // TLSCipherKey is the attribute Key conforming to the "tls.cipher" semantic + // conventions. It represents the string indicating the [cipher] used during the + // current connection. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // 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]. + // + // [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5 + // [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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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] of + // the issuer of the x.509 certificate presented by the client. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com" + // + // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "1970-01-01T00:00:00.000Z" + TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") + + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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], this string should be lower + // case. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "http/1.1" + // + // [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids + 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]. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // + // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values + 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "1.2", "3" + // + // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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] of + // the issuer of the x.509 certificate presented by the client. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com" + // + // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 + 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // Examples: "CN=myserver, OU=Documentation Team, DC=example, DC=com" + TLSServerSubjectKey = attribute.Key("tls.server.subject") +) + +// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" +// semantic conventions. It represents the string indicating the [cipher] used +// during the current connection. +// +// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5 +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] of the issuer of the x.509 certificate presented by the client. +// +// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 +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) +} + +// 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], this +// string should be lower case. +// +// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids +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]. +// +// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#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] of the issuer of the x.509 certificate presented by the client. +// +// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 +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) +} + +// Enum values for tls.protocol.name +var ( + // ssl + // Stability: development + TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") + // tls + // Stability: development + TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") +) + +// Namespace: 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: Recommended + // Stability: Development + // + // 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] enclosed by `[` and `]`, the `[` + // and `]` characters should also be captured in the domain field. + // + // [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2 + 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: Recommended + // Stability: Development + // + // 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] component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "SemConv" + // + // [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5 + 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]. + // + // Type: string + // RequirementLevel: Recommended + // 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. + // + // + // Query string values for the following keys SHOULD be redacted by default and + // replaced by the + // value `REDACTED`: + // + // - [`AWSAccessKeyId`] + // - [`Signature`] + // - [`sig`] + // - [`X-Goog-Signature`] + // + // This list is subject to change over time. + // + // When a query string value is redacted, the query string key SHOULD still be + // preserved, e.g. + // `https://www.example.com/path?color=blue&sig=REDACTED`. + // + // [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986 + // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth + // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth + // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token + // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls + 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: Recommended + // Stability: Development + // + // 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] component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "/search" + // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when + // instrumentations can identify it. + // + // [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3 + 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: Recommended + // Stability: Development + // + // Examples: 443 + URLPortKey = attribute.Key("url.port") + + // URLQueryKey is the attribute Key conforming to the "url.query" semantic + // conventions. It represents the [URI query] component. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "q=OpenTelemetry" + // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when + // instrumentations can identify it. + // + // + // Query string values for the following keys SHOULD be redacted by default and + // replaced by the value `REDACTED`: + // + // - [`AWSAccessKeyId`] + // - [`Signature`] + // - [`sig`] + // - [`X-Goog-Signature`] + // + // This list is subject to change over time. + // + // When a query string value is redacted, the query string key SHOULD still be + // preserved, e.g. + // `q=OpenTelemetry&sig=REDACTED`. + // + // [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4 + // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth + // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth + // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token + // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls + 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: Recommended + // Stability: Development + // + // Examples: "example.com", "foo.co.uk" + // Note: This value can be determined precisely with the [public suffix list]. + // 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`. + // + // [public suffix list]: https://publicsuffix.org/ + URLRegisteredDomainKey = attribute.Key("url.registered_domain") + + // URLSchemeKey is the attribute Key conforming to the "url.scheme" semantic + // conventions. It represents the [URI scheme] component identifying the used + // protocol. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "https", "ftp", "telnet" + // + // [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 + 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: Recommended + // Stability: Development + // + // 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]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "/users/{id}", "/users/:id", "/users?id={id}" + // + // [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 + 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: Recommended + // Stability: Development + // + // Examples: "com", "co.uk" + // Note: This value can be determined precisely with the [public suffix list]. + // + // [public suffix list]: https://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] component. +// +// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5 +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]. +// +// [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] component. +// +// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3 +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] component. +// +// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4 +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] component identifying the +// used protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +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]. +// +// [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) +} + +// Namespace: user +const ( + // UserEmailKey is the attribute Key conforming to the "user.email" semantic + // conventions. It represents the user email address. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "a.einstein@example.com" + UserEmailKey = attribute.Key("user.email") + + // UserFullNameKey is the attribute Key conforming to the "user.full_name" + // semantic conventions. It represents the user's full name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Albert Einstein" + UserFullNameKey = attribute.Key("user.full_name") + + // UserHashKey is the attribute Key conforming to the "user.hash" semantic + // conventions. It represents the unique user hash to correlate information for + // a user in anonymized form. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "364fc68eaf4c8acec74a4e52d7d1feaa" + // Note: Useful if `user.id` or `user.name` contain confidential information and + // cannot be used. + UserHashKey = attribute.Key("user.hash") + + // UserIDKey is the attribute Key conforming to the "user.id" semantic + // conventions. It represents the unique identifier of the user. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "S-1-5-21-202424912787-2692429404-2351956786-1000" + UserIDKey = attribute.Key("user.id") + + // UserNameKey is the attribute Key conforming to the "user.name" semantic + // conventions. It represents the short name or login/username of the user. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "a.einstein" + UserNameKey = attribute.Key("user.name") + + // UserRolesKey is the attribute Key conforming to the "user.roles" semantic + // conventions. It represents the array of user roles at the time of the event. + // + // Type: string[] + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "admin", "reporting_user" + UserRolesKey = attribute.Key("user.roles") +) + +// UserEmail returns an attribute KeyValue conforming to the "user.email" +// semantic conventions. It represents the user email address. +func UserEmail(val string) attribute.KeyValue { + return UserEmailKey.String(val) +} + +// UserFullName returns an attribute KeyValue conforming to the "user.full_name" +// semantic conventions. It represents the user's full name. +func UserFullName(val string) attribute.KeyValue { + return UserFullNameKey.String(val) +} + +// UserHash returns an attribute KeyValue conforming to the "user.hash" semantic +// conventions. It represents the unique user hash to correlate information for a +// user in anonymized form. +func UserHash(val string) attribute.KeyValue { + return UserHashKey.String(val) +} + +// UserID returns an attribute KeyValue conforming to the "user.id" semantic +// conventions. It represents the unique identifier of the user. +func UserID(val string) attribute.KeyValue { + return UserIDKey.String(val) +} + +// UserName returns an attribute KeyValue conforming to the "user.name" semantic +// conventions. It represents the short name or login/username of the user. +func UserName(val string) attribute.KeyValue { + return UserNameKey.String(val) +} + +// UserRoles returns an attribute KeyValue conforming to the "user.roles" +// semantic conventions. It represents the array of user roles at the time of the +// event. +func UserRoles(val ...string) attribute.KeyValue { + return UserRolesKey.StringSlice(val) +} + +// Namespace: user_agent +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: Recommended + // Stability: Development + // + // Examples: "Safari", "YourApp" + // Note: [Example] 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` + // + // [Example]: https://uaparser.dev/#demo + 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] header sent by the client. + // + // Type: string + // RequirementLevel: Recommended + // 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" + // + // [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent + UserAgentOriginalKey = attribute.Key("user_agent.original") + + // UserAgentOSNameKey is the attribute Key conforming to the + // "user_agent.os.name" semantic conventions. It represents the human readable + // operating system name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "iOS", "Android", "Ubuntu" + // Note: For mapping user agent strings to OS names, libraries such as + // [ua-parser] can be utilized. + // + // [ua-parser]: https://github.com/ua-parser + UserAgentOSNameKey = attribute.Key("user_agent.os.name") + + // UserAgentOSVersionKey is the attribute Key conforming to the + // "user_agent.os.version" semantic conventions. It represents the version + // string of the operating system as defined in [Version Attributes]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "14.2.1", "18.04.1" + // Note: For mapping user agent strings to OS versions, libraries such as + // [ua-parser] can be utilized. + // + // [Version Attributes]: /docs/resource/README.md#version-attributes + // [ua-parser]: https://github.com/ua-parser + UserAgentOSVersionKey = attribute.Key("user_agent.os.version") + + // UserAgentSyntheticTypeKey is the attribute Key conforming to the + // "user_agent.synthetic.type" semantic conventions. It represents the specifies + // the category of synthetic traffic, such as tests or bots. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: This attribute MAY be derived from the contents of the + // `user_agent.original` attribute. Components that populate the attribute are + // responsible for determining what they consider to be synthetic bot or test + // traffic. This attribute can either be set for self-identification purposes, + // or on telemetry detected to be generated as a result of a synthetic request. + // This attribute is useful for distinguishing between genuine client traffic + // and synthetic traffic generated by bots or tests. + UserAgentSyntheticTypeKey = attribute.Key("user_agent.synthetic.type") + + // 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: Recommended + // Stability: Development + // + // Examples: "14.1.2", "1.0.0" + // Note: [Example] 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` + // + // [Example]: https://uaparser.dev/#demo + 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] header sent by the client. +// +// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent +func UserAgentOriginal(val string) attribute.KeyValue { + return UserAgentOriginalKey.String(val) +} + +// UserAgentOSName returns an attribute KeyValue conforming to the +// "user_agent.os.name" semantic conventions. It represents the human readable +// operating system name. +func UserAgentOSName(val string) attribute.KeyValue { + return UserAgentOSNameKey.String(val) +} + +// UserAgentOSVersion returns an attribute KeyValue conforming to the +// "user_agent.os.version" semantic conventions. It represents the version string +// of the operating system as defined in [Version Attributes]. +// +// [Version Attributes]: /docs/resource/README.md#version-attributes +func UserAgentOSVersion(val string) attribute.KeyValue { + return UserAgentOSVersionKey.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) +} + +// Enum values for user_agent.synthetic.type +var ( + // Bot source. + // Stability: development + UserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String("bot") + // Synthetic test source. + // Stability: development + UserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String("test") +) + +// Namespace: vcs +const ( + // VCSChangeIDKey is the attribute Key conforming to the "vcs.change.id" + // semantic conventions. It represents the ID of the change (pull request/merge + // request/changelist) if applicable. This is usually a unique (within + // repository) identifier generated by the VCS system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "123" + VCSChangeIDKey = attribute.Key("vcs.change.id") + + // VCSChangeStateKey is the attribute Key conforming to the "vcs.change.state" + // semantic conventions. It represents the state of the change (pull + // request/merge request/changelist). + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "open", "closed", "merged" + VCSChangeStateKey = attribute.Key("vcs.change.state") + + // VCSChangeTitleKey is the attribute Key conforming to the "vcs.change.title" + // semantic conventions. It represents the human readable title of the change + // (pull request/merge request/changelist). This title is often a brief summary + // of the change and may get merged in to a ref as the commit summary. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Fixes broken thing", "feat: add my new feature", "[chore] update + // dependency" + VCSChangeTitleKey = attribute.Key("vcs.change.title") + + // VCSLineChangeTypeKey is the attribute Key conforming to the + // "vcs.line_change.type" semantic conventions. It represents the type of line + // change being measured on a branch or change. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "added", "removed" + VCSLineChangeTypeKey = attribute.Key("vcs.line_change.type") + + // VCSOwnerNameKey is the attribute Key conforming to the "vcs.owner.name" + // semantic conventions. It represents the group owner within the version + // control system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-org", "myteam", "business-unit" + VCSOwnerNameKey = attribute.Key("vcs.owner.name") + + // VCSProviderNameKey is the attribute Key conforming to the "vcs.provider.name" + // semantic conventions. It represents the name of the version control system + // provider. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "github", "gitlab", "gitea", "bitbucket" + VCSProviderNameKey = attribute.Key("vcs.provider.name") + + // VCSRefBaseNameKey is the attribute Key conforming to the "vcs.ref.base.name" + // semantic conventions. It represents the name of the [reference] such as + // **branch** or **tag** in the repository. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-feature-branch", "tag-1-test" + // Note: `base` refers to the starting point of a change. For example, `main` + // would be the base reference of type branch if you've created a new + // reference of type branch from it and created new commits. + // + // [reference]: https://git-scm.com/docs/gitglossary#def_ref + VCSRefBaseNameKey = attribute.Key("vcs.ref.base.name") + + // VCSRefBaseRevisionKey is the attribute Key conforming to the + // "vcs.ref.base.revision" semantic conventions. It represents the revision, + // literally [revised version], The revision most often refers to a commit + // object in Git, or a revision number in SVN. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", + // "main", "123", "HEAD" + // Note: `base` refers to the starting point of a change. For example, `main` + // would be the base reference of type branch if you've created a new + // reference of type branch from it and created new commits. The + // revision can be a full [hash value (see + // glossary)], + // of the recorded change to a ref within a repository pointing to a + // commit [commit] object. It does + // not necessarily have to be a hash; it can simply define a [revision + // number] + // which is an integer that is monotonically increasing. In cases where + // it is identical to the `ref.base.name`, it SHOULD still be included. + // It is up to the implementer to decide which value to set as the + // revision based on the VCS system and situational context. + // + // [revised version]: https://www.merriam-webster.com/dictionary/revision + // [hash value (see + // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf + // [commit]: https://git-scm.com/docs/git-commit + // [revision + // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html + VCSRefBaseRevisionKey = attribute.Key("vcs.ref.base.revision") + + // VCSRefBaseTypeKey is the attribute Key conforming to the "vcs.ref.base.type" + // semantic conventions. It represents the type of the [reference] in the + // repository. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "branch", "tag" + // Note: `base` refers to the starting point of a change. For example, `main` + // would be the base reference of type branch if you've created a new + // reference of type branch from it and created new commits. + // + // [reference]: https://git-scm.com/docs/gitglossary#def_ref + VCSRefBaseTypeKey = attribute.Key("vcs.ref.base.type") + + // VCSRefHeadNameKey is the attribute Key conforming to the "vcs.ref.head.name" + // semantic conventions. It represents the name of the [reference] such as + // **branch** or **tag** in the repository. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-feature-branch", "tag-1-test" + // Note: `head` refers to where you are right now; the current reference at a + // given time. + // + // [reference]: https://git-scm.com/docs/gitglossary#def_ref + VCSRefHeadNameKey = attribute.Key("vcs.ref.head.name") + + // VCSRefHeadRevisionKey is the attribute Key conforming to the + // "vcs.ref.head.revision" semantic conventions. It represents the revision, + // literally [revised version], The revision most often refers to a commit + // object in Git, or a revision number in SVN. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", + // "main", "123", "HEAD" + // Note: `head` refers to where you are right now; the current reference at a + // given time.The revision can be a full [hash value (see + // glossary)], + // of the recorded change to a ref within a repository pointing to a + // commit [commit] object. It does + // not necessarily have to be a hash; it can simply define a [revision + // number] + // which is an integer that is monotonically increasing. In cases where + // it is identical to the `ref.head.name`, it SHOULD still be included. + // It is up to the implementer to decide which value to set as the + // revision based on the VCS system and situational context. + // + // [revised version]: https://www.merriam-webster.com/dictionary/revision + // [hash value (see + // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf + // [commit]: https://git-scm.com/docs/git-commit + // [revision + // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html + VCSRefHeadRevisionKey = attribute.Key("vcs.ref.head.revision") + + // VCSRefHeadTypeKey is the attribute Key conforming to the "vcs.ref.head.type" + // semantic conventions. It represents the type of the [reference] in the + // repository. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "branch", "tag" + // Note: `head` refers to where you are right now; the current reference at a + // given time. + // + // [reference]: https://git-scm.com/docs/gitglossary#def_ref + VCSRefHeadTypeKey = attribute.Key("vcs.ref.head.type") + + // VCSRefTypeKey is the attribute Key conforming to the "vcs.ref.type" semantic + // conventions. It represents the type of the [reference] in the repository. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "branch", "tag" + // + // [reference]: https://git-scm.com/docs/gitglossary#def_ref + VCSRefTypeKey = attribute.Key("vcs.ref.type") + + // VCSRepositoryNameKey is the attribute Key conforming to the + // "vcs.repository.name" semantic conventions. It represents the human readable + // name of the repository. It SHOULD NOT include any additional identifier like + // Group/SubGroup in GitLab or organization in GitHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "semantic-conventions", "my-cool-repo" + // Note: Due to it only being the name, it can clash with forks of the same + // repository if collecting telemetry across multiple orgs or groups in + // the same backends. + VCSRepositoryNameKey = attribute.Key("vcs.repository.name") + + // VCSRepositoryURLFullKey is the attribute Key conforming to the + // "vcs.repository.url.full" semantic conventions. It represents the + // [canonical URL] of the repository providing the complete HTTP(S) address in + // order to locate and identify the repository through a browser. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "https://github.com/opentelemetry/open-telemetry-collector-contrib", + // "https://gitlab.com/my-org/my-project/my-projects-project/repo" + // Note: In Git Version Control Systems, the canonical URL SHOULD NOT include + // the `.git` extension. + // + // [canonical URL]: https://support.google.com/webmasters/answer/10347851 + VCSRepositoryURLFullKey = attribute.Key("vcs.repository.url.full") + + // VCSRevisionDeltaDirectionKey is the attribute Key conforming to the + // "vcs.revision_delta.direction" semantic conventions. It represents the type + // of revision comparison. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "ahead", "behind" + VCSRevisionDeltaDirectionKey = attribute.Key("vcs.revision_delta.direction") +) + +// VCSChangeID returns an attribute KeyValue conforming to the "vcs.change.id" +// semantic conventions. It represents the ID of the change (pull request/merge +// request/changelist) if applicable. This is usually a unique (within +// repository) identifier generated by the VCS system. +func VCSChangeID(val string) attribute.KeyValue { + return VCSChangeIDKey.String(val) +} + +// VCSChangeTitle returns an attribute KeyValue conforming to the +// "vcs.change.title" semantic conventions. It represents the human readable +// title of the change (pull request/merge request/changelist). This title is +// often a brief summary of the change and may get merged in to a ref as the +// commit summary. +func VCSChangeTitle(val string) attribute.KeyValue { + return VCSChangeTitleKey.String(val) +} + +// VCSOwnerName returns an attribute KeyValue conforming to the "vcs.owner.name" +// semantic conventions. It represents the group owner within the version control +// system. +func VCSOwnerName(val string) attribute.KeyValue { + return VCSOwnerNameKey.String(val) +} + +// VCSRefBaseName returns an attribute KeyValue conforming to the +// "vcs.ref.base.name" semantic conventions. It represents the name of the +// [reference] such as **branch** or **tag** in the repository. +// +// [reference]: https://git-scm.com/docs/gitglossary#def_ref +func VCSRefBaseName(val string) attribute.KeyValue { + return VCSRefBaseNameKey.String(val) +} + +// VCSRefBaseRevision returns an attribute KeyValue conforming to the +// "vcs.ref.base.revision" semantic conventions. It represents the revision, +// literally [revised version], The revision most often refers to a commit object +// in Git, or a revision number in SVN. +// +// [revised version]: https://www.merriam-webster.com/dictionary/revision +func VCSRefBaseRevision(val string) attribute.KeyValue { + return VCSRefBaseRevisionKey.String(val) +} + +// VCSRefHeadName returns an attribute KeyValue conforming to the +// "vcs.ref.head.name" semantic conventions. It represents the name of the +// [reference] such as **branch** or **tag** in the repository. +// +// [reference]: https://git-scm.com/docs/gitglossary#def_ref +func VCSRefHeadName(val string) attribute.KeyValue { + return VCSRefHeadNameKey.String(val) +} + +// VCSRefHeadRevision returns an attribute KeyValue conforming to the +// "vcs.ref.head.revision" semantic conventions. It represents the revision, +// literally [revised version], The revision most often refers to a commit object +// in Git, or a revision number in SVN. +// +// [revised version]: https://www.merriam-webster.com/dictionary/revision +func VCSRefHeadRevision(val string) attribute.KeyValue { + return VCSRefHeadRevisionKey.String(val) +} + +// VCSRepositoryName returns an attribute KeyValue conforming to the +// "vcs.repository.name" semantic conventions. It represents the human readable +// name of the repository. It SHOULD NOT include any additional identifier like +// Group/SubGroup in GitLab or organization in GitHub. +func VCSRepositoryName(val string) attribute.KeyValue { + return VCSRepositoryNameKey.String(val) +} + +// VCSRepositoryURLFull returns an attribute KeyValue conforming to the +// "vcs.repository.url.full" semantic conventions. It represents the +// [canonical URL] of the repository providing the complete HTTP(S) address in +// order to locate and identify the repository through a browser. +// +// [canonical URL]: https://support.google.com/webmasters/answer/10347851 +func VCSRepositoryURLFull(val string) attribute.KeyValue { + return VCSRepositoryURLFullKey.String(val) +} + +// Enum values for vcs.change.state +var ( + // Open means the change is currently active and under review. It hasn't been + // merged into the target branch yet, and it's still possible to make changes or + // add comments. + // Stability: development + VCSChangeStateOpen = VCSChangeStateKey.String("open") + // WIP (work-in-progress, draft) means the change is still in progress and not + // yet ready for a full review. It might still undergo significant changes. + // Stability: development + VCSChangeStateWip = VCSChangeStateKey.String("wip") + // Closed means the merge request has been closed without merging. This can + // happen for various reasons, such as the changes being deemed unnecessary, the + // issue being resolved in another way, or the author deciding to withdraw the + // request. + // Stability: development + VCSChangeStateClosed = VCSChangeStateKey.String("closed") + // Merged indicates that the change has been successfully integrated into the + // target codebase. + // Stability: development + VCSChangeStateMerged = VCSChangeStateKey.String("merged") +) + +// Enum values for vcs.line_change.type +var ( + // How many lines were added. + // Stability: development + VCSLineChangeTypeAdded = VCSLineChangeTypeKey.String("added") + // How many lines were removed. + // Stability: development + VCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String("removed") +) + +// Enum values for vcs.provider.name +var ( + // [GitHub] + // Stability: development + // + // [GitHub]: https://github.com + VCSProviderNameGithub = VCSProviderNameKey.String("github") + // [GitLab] + // Stability: development + // + // [GitLab]: https://gitlab.com + VCSProviderNameGitlab = VCSProviderNameKey.String("gitlab") + // [Gitea] + // Stability: development + // + // [Gitea]: https://gitea.io + VCSProviderNameGitea = VCSProviderNameKey.String("gitea") + // [Bitbucket] + // Stability: development + // + // [Bitbucket]: https://bitbucket.org + VCSProviderNameBitbucket = VCSProviderNameKey.String("bitbucket") +) + +// Enum values for vcs.ref.base.type +var ( + // [branch] + // Stability: development + // + // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch + VCSRefBaseTypeBranch = VCSRefBaseTypeKey.String("branch") + // [tag] + // Stability: development + // + // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag + VCSRefBaseTypeTag = VCSRefBaseTypeKey.String("tag") +) + +// Enum values for vcs.ref.head.type +var ( + // [branch] + // Stability: development + // + // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch + VCSRefHeadTypeBranch = VCSRefHeadTypeKey.String("branch") + // [tag] + // Stability: development + // + // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag + VCSRefHeadTypeTag = VCSRefHeadTypeKey.String("tag") +) + +// Enum values for vcs.ref.type +var ( + // [branch] + // Stability: development + // + // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch + VCSRefTypeBranch = VCSRefTypeKey.String("branch") + // [tag] + // Stability: development + // + // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag + VCSRefTypeTag = VCSRefTypeKey.String("tag") +) + +// Enum values for vcs.revision_delta.direction +var ( + // How many revisions the change is behind the target ref. + // Stability: development + VCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String("behind") + // How many revisions the change is ahead of the target ref. + // Stability: development + VCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String("ahead") +) + +// Namespace: webengine +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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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: Recommended + // Stability: Development + // + // 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) +} + +// Namespace: zos +const ( + // ZOSSmfIDKey is the attribute Key conforming to the "zos.smf.id" semantic + // conventions. It represents the System Management Facility (SMF) Identifier + // uniquely identified a z/OS system within a SYSPLEX or mainframe environment + // and is used for system and performance analysis. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "SYS1" + ZOSSmfIDKey = attribute.Key("zos.smf.id") + + // ZOSSysplexNameKey is the attribute Key conforming to the "zos.sysplex.name" + // semantic conventions. It represents the name of the SYSPLEX to which the z/OS + // system belongs too. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "SYSPLEX1" + ZOSSysplexNameKey = attribute.Key("zos.sysplex.name") +) + +// ZOSSmfID returns an attribute KeyValue conforming to the "zos.smf.id" semantic +// conventions. It represents the System Management Facility (SMF) Identifier +// uniquely identified a z/OS system within a SYSPLEX or mainframe environment +// and is used for system and performance analysis. +func ZOSSmfID(val string) attribute.KeyValue { + return ZOSSmfIDKey.String(val) +} + +// ZOSSysplexName returns an attribute KeyValue conforming to the +// "zos.sysplex.name" semantic conventions. It represents the name of the SYSPLEX +// to which the z/OS system belongs too. +func ZOSSysplexName(val string) attribute.KeyValue { + return ZOSSysplexNameKey.String(val) +} \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go similarity index 65% rename from vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go index 0d1f55a8fe9..852362ef770 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go @@ -4,6 +4,6 @@ // 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.20.0 version of the OpenTelemetry specification. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" +// patterns for OpenTelemetry things. This package represents the v1.39.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go new file mode 100644 index 00000000000..84cf636a727 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0" + +import ( + "reflect" + + "go.opentelemetry.io/otel/attribute" +) + +// ErrorType returns an [attribute.KeyValue] identifying the error type of err. +// +// If err is nil, the returned attribute has the default value +// [ErrorTypeOther]. +// +// If err's type has the method +// +// ErrorType() string +// +// then the returned attribute has the value of err.ErrorType(). Otherwise, the +// returned attribute has a value derived from the concrete type of err. +// +// The key of the returned attribute is [ErrorTypeKey]. +func ErrorType(err error) attribute.KeyValue { + if err == nil { + return ErrorTypeOther + } + + return ErrorTypeKey.String(errorType(err)) +} + +func errorType(err error) string { + var s string + if et, ok := err.(interface{ ErrorType() string }); ok { + // Prioritize the ErrorType method if available. + s = et.ErrorType() + } + if s == "" { + // Fallback to reflection if the ErrorType method is not supported or + // returns an empty value. + + t := reflect.TypeOf(err) + pkg, name := t.PkgPath(), t.Name() + if pkg != "" && name != "" { + s = pkg + "." + name + } else { + // The type has no package path or name (predeclared, not-defined, + // or alias for a not-defined type). + // + // This is not guaranteed to be unique, but is a best effort. + s = t.String() + } + } + return s +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go similarity index 74% rename from vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go index f40c97825aa..7b688ecc33d 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" +package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0" const ( // ExceptionEventName is the name of the Span event representing an exception. diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go new file mode 100644 index 00000000000..901da86985c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go @@ -0,0 +1,2222 @@ +// Code generated from semantic convention specification. DO NOT EDIT. + +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package otelconv provides types and functionality for OpenTelemetry semantic +// conventions in the "otel" namespace. +package otelconv + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" +) + +var ( + addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }} + recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }} +) + +// ErrorTypeAttr is an attribute conforming to the error.type semantic +// conventions. It represents the describes a class of error the operation ended +// with. +type ErrorTypeAttr string + +var ( + // ErrorTypeOther is a fallback error value to be used when the instrumentation + // doesn't define a custom value. + ErrorTypeOther ErrorTypeAttr = "_OTHER" +) + +// ComponentTypeAttr is an attribute conforming to the otel.component.type +// semantic conventions. It represents a name identifying the type of the +// OpenTelemetry component. +type ComponentTypeAttr string + +var ( + // ComponentTypeBatchingSpanProcessor is the builtin SDK batching span + // processor. + ComponentTypeBatchingSpanProcessor ComponentTypeAttr = "batching_span_processor" + // ComponentTypeSimpleSpanProcessor is the builtin SDK simple span processor. + ComponentTypeSimpleSpanProcessor ComponentTypeAttr = "simple_span_processor" + // ComponentTypeBatchingLogProcessor is the builtin SDK batching log record + // processor. + ComponentTypeBatchingLogProcessor ComponentTypeAttr = "batching_log_processor" + // ComponentTypeSimpleLogProcessor is the builtin SDK simple log record + // processor. + ComponentTypeSimpleLogProcessor ComponentTypeAttr = "simple_log_processor" + // ComponentTypeOtlpGRPCSpanExporter is the OTLP span exporter over gRPC with + // protobuf serialization. + ComponentTypeOtlpGRPCSpanExporter ComponentTypeAttr = "otlp_grpc_span_exporter" + // ComponentTypeOtlpHTTPSpanExporter is the OTLP span exporter over HTTP with + // protobuf serialization. + ComponentTypeOtlpHTTPSpanExporter ComponentTypeAttr = "otlp_http_span_exporter" + // ComponentTypeOtlpHTTPJSONSpanExporter is the OTLP span exporter over HTTP + // with JSON serialization. + ComponentTypeOtlpHTTPJSONSpanExporter ComponentTypeAttr = "otlp_http_json_span_exporter" + // ComponentTypeZipkinHTTPSpanExporter is the zipkin span exporter over HTTP. + ComponentTypeZipkinHTTPSpanExporter ComponentTypeAttr = "zipkin_http_span_exporter" + // ComponentTypeOtlpGRPCLogExporter is the OTLP log record exporter over gRPC + // with protobuf serialization. + ComponentTypeOtlpGRPCLogExporter ComponentTypeAttr = "otlp_grpc_log_exporter" + // ComponentTypeOtlpHTTPLogExporter is the OTLP log record exporter over HTTP + // with protobuf serialization. + ComponentTypeOtlpHTTPLogExporter ComponentTypeAttr = "otlp_http_log_exporter" + // ComponentTypeOtlpHTTPJSONLogExporter is the OTLP log record exporter over + // HTTP with JSON serialization. + ComponentTypeOtlpHTTPJSONLogExporter ComponentTypeAttr = "otlp_http_json_log_exporter" + // ComponentTypePeriodicMetricReader is the builtin SDK periodically exporting + // metric reader. + ComponentTypePeriodicMetricReader ComponentTypeAttr = "periodic_metric_reader" + // ComponentTypeOtlpGRPCMetricExporter is the OTLP metric exporter over gRPC + // with protobuf serialization. + ComponentTypeOtlpGRPCMetricExporter ComponentTypeAttr = "otlp_grpc_metric_exporter" + // ComponentTypeOtlpHTTPMetricExporter is the OTLP metric exporter over HTTP + // with protobuf serialization. + ComponentTypeOtlpHTTPMetricExporter ComponentTypeAttr = "otlp_http_metric_exporter" + // ComponentTypeOtlpHTTPJSONMetricExporter is the OTLP metric exporter over HTTP + // with JSON serialization. + ComponentTypeOtlpHTTPJSONMetricExporter ComponentTypeAttr = "otlp_http_json_metric_exporter" + // ComponentTypePrometheusHTTPTextMetricExporter is the prometheus metric + // exporter over HTTP with the default text-based format. + ComponentTypePrometheusHTTPTextMetricExporter ComponentTypeAttr = "prometheus_http_text_metric_exporter" +) + +// SpanParentOriginAttr is an attribute conforming to the otel.span.parent.origin +// semantic conventions. It represents the determines whether the span has a +// parent span, and if so, [whether it is a remote parent]. +// +// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote +type SpanParentOriginAttr string + +var ( + // SpanParentOriginNone is the span does not have a parent, it is a root span. + SpanParentOriginNone SpanParentOriginAttr = "none" + // SpanParentOriginLocal is the span has a parent and the parent's span context + // [isRemote()] is false. + // + // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote + SpanParentOriginLocal SpanParentOriginAttr = "local" + // SpanParentOriginRemote is the span has a parent and the parent's span context + // [isRemote()] is true. + // + // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote + SpanParentOriginRemote SpanParentOriginAttr = "remote" +) + +// SpanSamplingResultAttr is an attribute conforming to the +// otel.span.sampling_result semantic conventions. It represents the result value +// of the sampler for this span. +type SpanSamplingResultAttr string + +var ( + // SpanSamplingResultDrop is the span is not sampled and not recording. + SpanSamplingResultDrop SpanSamplingResultAttr = "DROP" + // SpanSamplingResultRecordOnly is the span is not sampled, but recording. + SpanSamplingResultRecordOnly SpanSamplingResultAttr = "RECORD_ONLY" + // SpanSamplingResultRecordAndSample is the span is sampled and recording. + SpanSamplingResultRecordAndSample SpanSamplingResultAttr = "RECORD_AND_SAMPLE" +) + +// SDKExporterLogExported is an instrument used to record metric values +// conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It +// represents the number of log records for which the export has finished, either +// successful or failed. +type SDKExporterLogExported struct { + metric.Int64Counter +} + +var newSDKExporterLogExportedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of log records for which the export has finished, either successful or failed."), + metric.WithUnit("{log_record}"), +} + +// NewSDKExporterLogExported returns a new SDKExporterLogExported instrument. +func NewSDKExporterLogExported( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKExporterLogExported, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterLogExported{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterLogExportedOpts + } else { + opt = append(opt, newSDKExporterLogExportedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.exporter.log.exported", + opt..., + ) + if err != nil { + return SDKExporterLogExported{noop.Int64Counter{}}, err + } + return SDKExporterLogExported{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterLogExported) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterLogExported) Name() string { + return "otel.sdk.exporter.log.exported" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterLogExported) Unit() string { + return "{log_record}" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterLogExported) Description() string { + return "The number of log records for which the export has finished, either successful or failed." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +// For exporters with partial success semantics (e.g. OTLP with +// `rejected_log_records`), rejected log records MUST count as failed and only +// non-rejected log records count as success. +// If no rejection reason is available, `rejected` SHOULD be used as value for +// `error.type`. +func (m SDKExporterLogExported) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +// For exporters with partial success semantics (e.g. OTLP with +// `rejected_log_records`), rejected log records MUST count as failed and only +// non-rejected log records count as success. +// If no rejection reason is available, `rejected` SHOULD be used as value for +// `error.type`. +func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (SDKExporterLogExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterLogExported) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterLogExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterLogExported) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKExporterLogInflight is an instrument used to record metric values +// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It +// represents the number of log records which were passed to the exporter, but +// that have not been exported yet (neither successful, nor failed). +type SDKExporterLogInflight struct { + metric.Int64UpDownCounter +} + +var newSDKExporterLogInflightOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), + metric.WithUnit("{log_record}"), +} + +// NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument. +func NewSDKExporterLogInflight( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (SDKExporterLogInflight, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterLogInflightOpts + } else { + opt = append(opt, newSDKExporterLogInflightOpts...) + } + + i, err := m.Int64UpDownCounter( + "otel.sdk.exporter.log.inflight", + opt..., + ) + if err != nil { + return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, err + } + return SDKExporterLogInflight{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterLogInflight) Name() string { + return "otel.sdk.exporter.log.inflight" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterLogInflight) Unit() string { + return "{log_record}" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterLogInflight) Description() string { + return "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +func (m SDKExporterLogInflight) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterLogInflight) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterLogInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterLogInflight) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKExporterMetricDataPointExported is an instrument used to record metric +// values conforming to the "otel.sdk.exporter.metric_data_point.exported" +// semantic conventions. It represents the number of metric data points for which +// the export has finished, either successful or failed. +type SDKExporterMetricDataPointExported struct { + metric.Int64Counter +} + +var newSDKExporterMetricDataPointExportedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."), + metric.WithUnit("{data_point}"), +} + +// NewSDKExporterMetricDataPointExported returns a new +// SDKExporterMetricDataPointExported instrument. +func NewSDKExporterMetricDataPointExported( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKExporterMetricDataPointExported, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterMetricDataPointExportedOpts + } else { + opt = append(opt, newSDKExporterMetricDataPointExportedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.exporter.metric_data_point.exported", + opt..., + ) + if err != nil { + return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, err + } + return SDKExporterMetricDataPointExported{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterMetricDataPointExported) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterMetricDataPointExported) Name() string { + return "otel.sdk.exporter.metric_data_point.exported" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterMetricDataPointExported) Unit() string { + return "{data_point}" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterMetricDataPointExported) Description() string { + return "The number of metric data points for which the export has finished, either successful or failed." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +// For exporters with partial success semantics (e.g. OTLP with +// `rejected_data_points`), rejected data points MUST count as failed and only +// non-rejected data points count as success. +// If no rejection reason is available, `rejected` SHOULD be used as value for +// `error.type`. +func (m SDKExporterMetricDataPointExported) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +// For exporters with partial success semantics (e.g. OTLP with +// `rejected_data_points`), rejected data points MUST count as failed and only +// non-rejected data points count as success. +// If no rejection reason is available, `rejected` SHOULD be used as value for +// `error.type`. +func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (SDKExporterMetricDataPointExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterMetricDataPointExported) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterMetricDataPointExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterMetricDataPointExported) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKExporterMetricDataPointInflight is an instrument used to record metric +// values conforming to the "otel.sdk.exporter.metric_data_point.inflight" +// semantic conventions. It represents the number of metric data points which +// were passed to the exporter, but that have not been exported yet (neither +// successful, nor failed). +type SDKExporterMetricDataPointInflight struct { + metric.Int64UpDownCounter +} + +var newSDKExporterMetricDataPointInflightOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), + metric.WithUnit("{data_point}"), +} + +// NewSDKExporterMetricDataPointInflight returns a new +// SDKExporterMetricDataPointInflight instrument. +func NewSDKExporterMetricDataPointInflight( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (SDKExporterMetricDataPointInflight, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterMetricDataPointInflightOpts + } else { + opt = append(opt, newSDKExporterMetricDataPointInflightOpts...) + } + + i, err := m.Int64UpDownCounter( + "otel.sdk.exporter.metric_data_point.inflight", + opt..., + ) + if err != nil { + return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, err + } + return SDKExporterMetricDataPointInflight{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterMetricDataPointInflight) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterMetricDataPointInflight) Name() string { + return "otel.sdk.exporter.metric_data_point.inflight" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterMetricDataPointInflight) Unit() string { + return "{data_point}" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterMetricDataPointInflight) Description() string { + return "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +func (m SDKExporterMetricDataPointInflight) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterMetricDataPointInflight) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterMetricDataPointInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterMetricDataPointInflight) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKExporterOperationDuration is an instrument used to record metric values +// conforming to the "otel.sdk.exporter.operation.duration" semantic conventions. +// It represents the duration of exporting a batch of telemetry records. +type SDKExporterOperationDuration struct { + metric.Float64Histogram +} + +var newSDKExporterOperationDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("The duration of exporting a batch of telemetry records."), + metric.WithUnit("s"), +} + +// NewSDKExporterOperationDuration returns a new SDKExporterOperationDuration +// instrument. +func NewSDKExporterOperationDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (SDKExporterOperationDuration, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterOperationDuration{noop.Float64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterOperationDurationOpts + } else { + opt = append(opt, newSDKExporterOperationDurationOpts...) + } + + i, err := m.Float64Histogram( + "otel.sdk.exporter.operation.duration", + opt..., + ) + if err != nil { + return SDKExporterOperationDuration{noop.Float64Histogram{}}, err + } + return SDKExporterOperationDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterOperationDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterOperationDuration) Name() string { + return "otel.sdk.exporter.operation.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterOperationDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterOperationDuration) Description() string { + return "The duration of exporting a batch of telemetry records." +} + +// Record records val to the current distribution for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// This metric defines successful operations using the full success definitions +// for [http] +// and [grpc]. Anything else is defined as an unsuccessful operation. For +// successful +// operations, `error.type` MUST NOT be set. For unsuccessful export operations, +// `error.type` MUST contain a relevant failure cause. +// +// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1 +// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success +func (m SDKExporterOperationDuration) Record( + ctx context.Context, + val float64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +// +// This metric defines successful operations using the full success definitions +// for [http] +// and [grpc]. Anything else is defined as an unsuccessful operation. For +// successful +// operations, `error.type` MUST NOT be set. For unsuccessful export operations, +// `error.type` MUST contain a relevant failure cause. +// +// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1 +// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success +func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { + if set.Len() == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (SDKExporterOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrHTTPResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the HTTP status +// code of the last HTTP request performed in scope of this export call. +func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterOperationDuration) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterOperationDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrRPCResponseStatusCode returns an optional attribute for the +// "rpc.response.status_code" semantic convention. It represents the gRPC status +// code of the last gRPC request performed in scope of this export call. +func (SDKExporterOperationDuration) AttrRPCResponseStatusCode(val string) attribute.KeyValue { + return attribute.String("rpc.response.status_code", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterOperationDuration) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterOperationDuration) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKExporterSpanExported is an instrument used to record metric values +// conforming to the "otel.sdk.exporter.span.exported" semantic conventions. It +// represents the number of spans for which the export has finished, either +// successful or failed. +type SDKExporterSpanExported struct { + metric.Int64Counter +} + +var newSDKExporterSpanExportedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of spans for which the export has finished, either successful or failed."), + metric.WithUnit("{span}"), +} + +// NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument. +func NewSDKExporterSpanExported( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKExporterSpanExported, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterSpanExported{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterSpanExportedOpts + } else { + opt = append(opt, newSDKExporterSpanExportedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.exporter.span.exported", + opt..., + ) + if err != nil { + return SDKExporterSpanExported{noop.Int64Counter{}}, err + } + return SDKExporterSpanExported{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterSpanExported) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterSpanExported) Name() string { + return "otel.sdk.exporter.span.exported" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterSpanExported) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterSpanExported) Description() string { + return "The number of spans for which the export has finished, either successful or failed." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +// For exporters with partial success semantics (e.g. OTLP with `rejected_spans` +// ), rejected spans MUST count as failed and only non-rejected spans count as +// success. +// If no rejection reason is available, `rejected` SHOULD be used as value for +// `error.type`. +func (m SDKExporterSpanExported) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +// For exporters with partial success semantics (e.g. OTLP with `rejected_spans` +// ), rejected spans MUST count as failed and only non-rejected spans count as +// success. +// If no rejection reason is available, `rejected` SHOULD be used as value for +// `error.type`. +func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (SDKExporterSpanExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterSpanExported) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterSpanExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterSpanExported) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKExporterSpanInflight is an instrument used to record metric values +// conforming to the "otel.sdk.exporter.span.inflight" semantic conventions. It +// represents the number of spans which were passed to the exporter, but that +// have not been exported yet (neither successful, nor failed). +type SDKExporterSpanInflight struct { + metric.Int64UpDownCounter +} + +var newSDKExporterSpanInflightOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), + metric.WithUnit("{span}"), +} + +// NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument. +func NewSDKExporterSpanInflight( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (SDKExporterSpanInflight, error) { + // Check if the meter is nil. + if m == nil { + return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKExporterSpanInflightOpts + } else { + opt = append(opt, newSDKExporterSpanInflightOpts...) + } + + i, err := m.Int64UpDownCounter( + "otel.sdk.exporter.span.inflight", + opt..., + ) + if err != nil { + return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, err + } + return SDKExporterSpanInflight{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKExporterSpanInflight) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKExporterSpanInflight) Name() string { + return "otel.sdk.exporter.span.inflight" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKExporterSpanInflight) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKExporterSpanInflight) Description() string { + return "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +func (m SDKExporterSpanInflight) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful exports, `error.type` MUST NOT be set. For failed exports, +// `error.type` MUST contain the failure cause. +func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKExporterSpanInflight) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKExporterSpanInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the server domain name if available without +// reverse DNS lookup; otherwise, IP address or Unix domain socket name. +func (SDKExporterSpanInflight) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the server port number. +func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// SDKLogCreated is an instrument used to record metric values conforming to the +// "otel.sdk.log.created" semantic conventions. It represents the number of logs +// submitted to enabled SDK Loggers. +type SDKLogCreated struct { + metric.Int64Counter +} + +var newSDKLogCreatedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of logs submitted to enabled SDK Loggers."), + metric.WithUnit("{log_record}"), +} + +// NewSDKLogCreated returns a new SDKLogCreated instrument. +func NewSDKLogCreated( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKLogCreated, error) { + // Check if the meter is nil. + if m == nil { + return SDKLogCreated{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKLogCreatedOpts + } else { + opt = append(opt, newSDKLogCreatedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.log.created", + opt..., + ) + if err != nil { + return SDKLogCreated{noop.Int64Counter{}}, err + } + return SDKLogCreated{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKLogCreated) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKLogCreated) Name() string { + return "otel.sdk.log.created" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKLogCreated) Unit() string { + return "{log_record}" +} + +// Description returns the semantic convention description of the instrument +func (SDKLogCreated) Description() string { + return "The number of logs submitted to enabled SDK Loggers." +} + +// Add adds incr to the existing count for attrs. +func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// SDKMetricReaderCollectionDuration is an instrument used to record metric +// values conforming to the "otel.sdk.metric_reader.collection.duration" semantic +// conventions. It represents the duration of the collect operation of the metric +// reader. +type SDKMetricReaderCollectionDuration struct { + metric.Float64Histogram +} + +var newSDKMetricReaderCollectionDurationOpts = []metric.Float64HistogramOption{ + metric.WithDescription("The duration of the collect operation of the metric reader."), + metric.WithUnit("s"), +} + +// NewSDKMetricReaderCollectionDuration returns a new +// SDKMetricReaderCollectionDuration instrument. +func NewSDKMetricReaderCollectionDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (SDKMetricReaderCollectionDuration, error) { + // Check if the meter is nil. + if m == nil { + return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, nil + } + + if len(opt) == 0 { + opt = newSDKMetricReaderCollectionDurationOpts + } else { + opt = append(opt, newSDKMetricReaderCollectionDurationOpts...) + } + + i, err := m.Float64Histogram( + "otel.sdk.metric_reader.collection.duration", + opt..., + ) + if err != nil { + return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, err + } + return SDKMetricReaderCollectionDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKMetricReaderCollectionDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (SDKMetricReaderCollectionDuration) Name() string { + return "otel.sdk.metric_reader.collection.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKMetricReaderCollectionDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (SDKMetricReaderCollectionDuration) Description() string { + return "The duration of the collect operation of the metric reader." +} + +// Record records val to the current distribution for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful collections, `error.type` MUST NOT be set. For failed +// collections, `error.type` SHOULD contain the failure cause. +// It can happen that metrics collection is successful for some MetricProducers, +// while others fail. In that case `error.type` SHOULD be set to any of the +// failure causes. +func (m SDKMetricReaderCollectionDuration) Record( + ctx context.Context, + val float64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// RecordSet records val to the current distribution for set. +// +// For successful collections, `error.type` MUST NOT be set. For failed +// collections, `error.type` SHOULD contain the failure cause. +// It can happen that metrics collection is successful for some MetricProducers, +// while others fail. In that case `error.type` SHOULD be set to any of the +// failure causes. +func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { + if set.Len() == 0 { + m.Float64Histogram.Record(ctx, val) + return + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (SDKMetricReaderCollectionDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKMetricReaderCollectionDuration) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKMetricReaderCollectionDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKProcessorLogProcessed is an instrument used to record metric values +// conforming to the "otel.sdk.processor.log.processed" semantic conventions. It +// represents the number of log records for which the processing has finished, +// either successful or failed. +type SDKProcessorLogProcessed struct { + metric.Int64Counter +} + +var newSDKProcessorLogProcessedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."), + metric.WithUnit("{log_record}"), +} + +// NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument. +func NewSDKProcessorLogProcessed( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKProcessorLogProcessed, error) { + // Check if the meter is nil. + if m == nil { + return SDKProcessorLogProcessed{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKProcessorLogProcessedOpts + } else { + opt = append(opt, newSDKProcessorLogProcessedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.processor.log.processed", + opt..., + ) + if err != nil { + return SDKProcessorLogProcessed{noop.Int64Counter{}}, err + } + return SDKProcessorLogProcessed{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKProcessorLogProcessed) Name() string { + return "otel.sdk.processor.log.processed" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKProcessorLogProcessed) Unit() string { + return "{log_record}" +} + +// Description returns the semantic convention description of the instrument +func (SDKProcessorLogProcessed) Description() string { + return "The number of log records for which the processing has finished, either successful or failed." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful processing, `error.type` MUST NOT be set. For failed +// processing, `error.type` MUST contain the failure cause. +// For the SDK Simple and Batching Log Record Processor a log record is +// considered to be processed already when it has been submitted to the exporter, +// not when the corresponding export call has finished. +func (m SDKProcessorLogProcessed) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful processing, `error.type` MUST NOT be set. For failed +// processing, `error.type` MUST contain the failure cause. +// For the SDK Simple and Batching Log Record Processor a log record is +// considered to be processed already when it has been submitted to the exporter, +// not when the corresponding export call has finished. +func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents a low-cardinality description of the failure reason. +// SDK Batching Log Record Processors MUST use `queue_full` for log records +// dropped due to a full queue. +func (SDKProcessorLogProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKProcessorLogProcessed) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKProcessorLogQueueCapacity is an instrument used to record metric values +// conforming to the "otel.sdk.processor.log.queue.capacity" semantic +// conventions. It represents the maximum number of log records the queue of a +// given instance of an SDK Log Record processor can hold. +type SDKProcessorLogQueueCapacity struct { + metric.Int64ObservableUpDownCounter +} + +var newSDKProcessorLogQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."), + metric.WithUnit("{log_record}"), +} + +// NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity +// instrument. +func NewSDKProcessorLogQueueCapacity( + m metric.Meter, + opt ...metric.Int64ObservableUpDownCounterOption, +) (SDKProcessorLogQueueCapacity, error) { + // Check if the meter is nil. + if m == nil { + return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKProcessorLogQueueCapacityOpts + } else { + opt = append(opt, newSDKProcessorLogQueueCapacityOpts...) + } + + i, err := m.Int64ObservableUpDownCounter( + "otel.sdk.processor.log.queue.capacity", + opt..., + ) + if err != nil { + return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err + } + return SDKProcessorLogQueueCapacity{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64ObservableUpDownCounter { + return m.Int64ObservableUpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKProcessorLogQueueCapacity) Name() string { + return "otel.sdk.processor.log.queue.capacity" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKProcessorLogQueueCapacity) Unit() string { + return "{log_record}" +} + +// Description returns the semantic convention description of the instrument +func (SDKProcessorLogQueueCapacity) Description() string { + return "The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold." +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKProcessorLogQueueCapacity) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKProcessorLogQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKProcessorLogQueueSize is an instrument used to record metric values +// conforming to the "otel.sdk.processor.log.queue.size" semantic conventions. It +// represents the number of log records in the queue of a given instance of an +// SDK log processor. +type SDKProcessorLogQueueSize struct { + metric.Int64ObservableUpDownCounter +} + +var newSDKProcessorLogQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The number of log records in the queue of a given instance of an SDK log processor."), + metric.WithUnit("{log_record}"), +} + +// NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument. +func NewSDKProcessorLogQueueSize( + m metric.Meter, + opt ...metric.Int64ObservableUpDownCounterOption, +) (SDKProcessorLogQueueSize, error) { + // Check if the meter is nil. + if m == nil { + return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKProcessorLogQueueSizeOpts + } else { + opt = append(opt, newSDKProcessorLogQueueSizeOpts...) + } + + i, err := m.Int64ObservableUpDownCounter( + "otel.sdk.processor.log.queue.size", + opt..., + ) + if err != nil { + return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, err + } + return SDKProcessorLogQueueSize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKProcessorLogQueueSize) Inst() metric.Int64ObservableUpDownCounter { + return m.Int64ObservableUpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKProcessorLogQueueSize) Name() string { + return "otel.sdk.processor.log.queue.size" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKProcessorLogQueueSize) Unit() string { + return "{log_record}" +} + +// Description returns the semantic convention description of the instrument +func (SDKProcessorLogQueueSize) Description() string { + return "The number of log records in the queue of a given instance of an SDK log processor." +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKProcessorLogQueueSize) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKProcessorLogQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKProcessorSpanProcessed is an instrument used to record metric values +// conforming to the "otel.sdk.processor.span.processed" semantic conventions. It +// represents the number of spans for which the processing has finished, either +// successful or failed. +type SDKProcessorSpanProcessed struct { + metric.Int64Counter +} + +var newSDKProcessorSpanProcessedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."), + metric.WithUnit("{span}"), +} + +// NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessed +// instrument. +func NewSDKProcessorSpanProcessed( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKProcessorSpanProcessed, error) { + // Check if the meter is nil. + if m == nil { + return SDKProcessorSpanProcessed{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKProcessorSpanProcessedOpts + } else { + opt = append(opt, newSDKProcessorSpanProcessedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.processor.span.processed", + opt..., + ) + if err != nil { + return SDKProcessorSpanProcessed{noop.Int64Counter{}}, err + } + return SDKProcessorSpanProcessed{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKProcessorSpanProcessed) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKProcessorSpanProcessed) Name() string { + return "otel.sdk.processor.span.processed" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKProcessorSpanProcessed) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKProcessorSpanProcessed) Description() string { + return "The number of spans for which the processing has finished, either successful or failed." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// For successful processing, `error.type` MUST NOT be set. For failed +// processing, `error.type` MUST contain the failure cause. +// For the SDK Simple and Batching Span Processor a span is considered to be +// processed already when it has been submitted to the exporter, not when the +// corresponding export call has finished. +func (m SDKProcessorSpanProcessed) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// For successful processing, `error.type` MUST NOT be set. For failed +// processing, `error.type` MUST contain the failure cause. +// For the SDK Simple and Batching Span Processor a span is considered to be +// processed already when it has been submitted to the exporter, not when the +// corresponding export call has finished. +func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents a low-cardinality description of the failure reason. +// SDK Batching Span Processors MUST use `queue_full` for spans dropped due to a +// full queue. +func (SDKProcessorSpanProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKProcessorSpanProcessed) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKProcessorSpanProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKProcessorSpanQueueCapacity is an instrument used to record metric values +// conforming to the "otel.sdk.processor.span.queue.capacity" semantic +// conventions. It represents the maximum number of spans the queue of a given +// instance of an SDK span processor can hold. +type SDKProcessorSpanQueueCapacity struct { + metric.Int64ObservableUpDownCounter +} + +var newSDKProcessorSpanQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The maximum number of spans the queue of a given instance of an SDK span processor can hold."), + metric.WithUnit("{span}"), +} + +// NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity +// instrument. +func NewSDKProcessorSpanQueueCapacity( + m metric.Meter, + opt ...metric.Int64ObservableUpDownCounterOption, +) (SDKProcessorSpanQueueCapacity, error) { + // Check if the meter is nil. + if m == nil { + return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKProcessorSpanQueueCapacityOpts + } else { + opt = append(opt, newSDKProcessorSpanQueueCapacityOpts...) + } + + i, err := m.Int64ObservableUpDownCounter( + "otel.sdk.processor.span.queue.capacity", + opt..., + ) + if err != nil { + return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err + } + return SDKProcessorSpanQueueCapacity{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64ObservableUpDownCounter { + return m.Int64ObservableUpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKProcessorSpanQueueCapacity) Name() string { + return "otel.sdk.processor.span.queue.capacity" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKProcessorSpanQueueCapacity) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKProcessorSpanQueueCapacity) Description() string { + return "The maximum number of spans the queue of a given instance of an SDK span processor can hold." +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKProcessorSpanQueueCapacity) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKProcessorSpanQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKProcessorSpanQueueSize is an instrument used to record metric values +// conforming to the "otel.sdk.processor.span.queue.size" semantic conventions. +// It represents the number of spans in the queue of a given instance of an SDK +// span processor. +type SDKProcessorSpanQueueSize struct { + metric.Int64ObservableUpDownCounter +} + +var newSDKProcessorSpanQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{ + metric.WithDescription("The number of spans in the queue of a given instance of an SDK span processor."), + metric.WithUnit("{span}"), +} + +// NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize +// instrument. +func NewSDKProcessorSpanQueueSize( + m metric.Meter, + opt ...metric.Int64ObservableUpDownCounterOption, +) (SDKProcessorSpanQueueSize, error) { + // Check if the meter is nil. + if m == nil { + return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKProcessorSpanQueueSizeOpts + } else { + opt = append(opt, newSDKProcessorSpanQueueSizeOpts...) + } + + i, err := m.Int64ObservableUpDownCounter( + "otel.sdk.processor.span.queue.size", + opt..., + ) + if err != nil { + return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, err + } + return SDKProcessorSpanQueueSize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKProcessorSpanQueueSize) Inst() metric.Int64ObservableUpDownCounter { + return m.Int64ObservableUpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKProcessorSpanQueueSize) Name() string { + return "otel.sdk.processor.span.queue.size" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKProcessorSpanQueueSize) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKProcessorSpanQueueSize) Description() string { + return "The number of spans in the queue of a given instance of an SDK span processor." +} + +// AttrComponentName returns an optional attribute for the "otel.component.name" +// semantic convention. It represents a name uniquely identifying the instance of +// the OpenTelemetry component within its containing SDK instance. +func (SDKProcessorSpanQueueSize) AttrComponentName(val string) attribute.KeyValue { + return attribute.String("otel.component.name", val) +} + +// AttrComponentType returns an optional attribute for the "otel.component.type" +// semantic convention. It represents a name identifying the type of the +// OpenTelemetry component. +func (SDKProcessorSpanQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { + return attribute.String("otel.component.type", string(val)) +} + +// SDKSpanLive is an instrument used to record metric values conforming to the +// "otel.sdk.span.live" semantic conventions. It represents the number of created +// spans with `recording=true` for which the end operation has not been called +// yet. +type SDKSpanLive struct { + metric.Int64UpDownCounter +} + +var newSDKSpanLiveOpts = []metric.Int64UpDownCounterOption{ + metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."), + metric.WithUnit("{span}"), +} + +// NewSDKSpanLive returns a new SDKSpanLive instrument. +func NewSDKSpanLive( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (SDKSpanLive, error) { + // Check if the meter is nil. + if m == nil { + return SDKSpanLive{noop.Int64UpDownCounter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKSpanLiveOpts + } else { + opt = append(opt, newSDKSpanLiveOpts...) + } + + i, err := m.Int64UpDownCounter( + "otel.sdk.span.live", + opt..., + ) + if err != nil { + return SDKSpanLive{noop.Int64UpDownCounter{}}, err + } + return SDKSpanLive{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKSpanLive) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (SDKSpanLive) Name() string { + return "otel.sdk.span.live" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKSpanLive) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKSpanLive) Description() string { + return "The number of created spans with `recording=true` for which the end operation has not been called yet." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +func (m SDKSpanLive) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64UpDownCounter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrSpanSamplingResult returns an optional attribute for the +// "otel.span.sampling_result" semantic convention. It represents the result +// value of the sampler for this span. +func (SDKSpanLive) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue { + return attribute.String("otel.span.sampling_result", string(val)) +} + +// SDKSpanStarted is an instrument used to record metric values conforming to the +// "otel.sdk.span.started" semantic conventions. It represents the number of +// created spans. +type SDKSpanStarted struct { + metric.Int64Counter +} + +var newSDKSpanStartedOpts = []metric.Int64CounterOption{ + metric.WithDescription("The number of created spans."), + metric.WithUnit("{span}"), +} + +// NewSDKSpanStarted returns a new SDKSpanStarted instrument. +func NewSDKSpanStarted( + m metric.Meter, + opt ...metric.Int64CounterOption, +) (SDKSpanStarted, error) { + // Check if the meter is nil. + if m == nil { + return SDKSpanStarted{noop.Int64Counter{}}, nil + } + + if len(opt) == 0 { + opt = newSDKSpanStartedOpts + } else { + opt = append(opt, newSDKSpanStartedOpts...) + } + + i, err := m.Int64Counter( + "otel.sdk.span.started", + opt..., + ) + if err != nil { + return SDKSpanStarted{noop.Int64Counter{}}, err + } + return SDKSpanStarted{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m SDKSpanStarted) Inst() metric.Int64Counter { + return m.Int64Counter +} + +// Name returns the semantic convention name of the instrument. +func (SDKSpanStarted) Name() string { + return "otel.sdk.span.started" +} + +// Unit returns the semantic convention unit of the instrument +func (SDKSpanStarted) Unit() string { + return "{span}" +} + +// Description returns the semantic convention description of the instrument +func (SDKSpanStarted) Description() string { + return "The number of created spans." +} + +// Add adds incr to the existing count for attrs. +// +// All additional attrs passed are included in the recorded value. +// +// Implementations MUST record this metric for all spans, even for non-recording +// ones. +func (m SDKSpanStarted) Add( + ctx context.Context, + incr int64, + attrs ...attribute.KeyValue, +) { + if len(attrs) == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + attrs..., + ), + ) + + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AddSet adds incr to the existing count for set. +// +// Implementations MUST record this metric for all spans, even for non-recording +// ones. +func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Set) { + if set.Len() == 0 { + m.Int64Counter.Add(ctx, incr) + return + } + + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributeSet(set)) + m.Int64Counter.Add(ctx, incr, *o...) +} + +// AttrSpanParentOrigin returns an optional attribute for the +// "otel.span.parent.origin" semantic convention. It represents the determines +// whether the span has a parent span, and if so, [whether it is a remote parent] +// . +// +// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote +func (SDKSpanStarted) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.KeyValue { + return attribute.String("otel.span.parent.origin", string(val)) +} + +// AttrSpanSamplingResult returns an optional attribute for the +// "otel.span.sampling_result" semantic convention. It represents the result +// value of the sampler for this span. +func (SDKSpanStarted) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue { + return attribute.String("otel.span.sampling_result", string(val)) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go similarity index 71% rename from vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go index 95d0210e38f..e1a199d89bf 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go @@ -1,9 +1,9 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" +package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.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.20.0" +const SchemaURL = "https://opentelemetry.io/schemas/1.39.0" diff --git a/vendor/go.opentelemetry.io/otel/trace/auto.go b/vendor/go.opentelemetry.io/otel/trace/auto.go index 8763936a846..604fdab446c 100644 --- a/vendor/go.opentelemetry.io/otel/trace/auto.go +++ b/vendor/go.opentelemetry.io/otel/trace/auto.go @@ -20,7 +20,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" + semconv "go.opentelemetry.io/otel/semconv/v1.39.0" "go.opentelemetry.io/otel/trace/embedded" "go.opentelemetry.io/otel/trace/internal/telemetry" ) diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go index aea11a2b52c..d9ecef1cad2 100644 --- a/vendor/go.opentelemetry.io/otel/trace/config.go +++ b/vendor/go.opentelemetry.io/otel/trace/config.go @@ -4,6 +4,7 @@ package trace // import "go.opentelemetry.io/otel/trace" import ( + "slices" "time" "go.opentelemetry.io/otel/attribute" @@ -304,12 +305,50 @@ func WithInstrumentationVersion(version string) TracerOption { }) } -// WithInstrumentationAttributes sets the instrumentation attributes. +// mergeSets returns the union of keys between a and b. Any duplicate keys will +// use the value associated with b. +func mergeSets(a, b attribute.Set) attribute.Set { + // NewMergeIterator uses the first value for any duplicates. + iter := attribute.NewMergeIterator(&b, &a) + merged := make([]attribute.KeyValue, 0, a.Len()+b.Len()) + for iter.Next() { + merged = append(merged, iter.Attribute()) + } + return attribute.NewSet(merged...) +} + +// WithInstrumentationAttributes adds the instrumentation attributes. // -// The passed attributes will be de-duplicated. +// This is equivalent to calling [WithInstrumentationAttributeSet] with an +// [attribute.Set] created from a clone of the passed attributes. +// [WithInstrumentationAttributeSet] is recommended for more control. +// +// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] +// options are passed, the attributes will be merged together in the order +// they are passed. Attributes with duplicate keys will use the last value passed. func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption { + set := attribute.NewSet(slices.Clone(attr)...) + return WithInstrumentationAttributeSet(set) +} + +// WithInstrumentationAttributeSet adds the instrumentation attributes. +// +// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] +// options are passed, the attributes will be merged together in the order +// they are passed. Attributes with duplicate keys will use the last value passed. +func WithInstrumentationAttributeSet(set attribute.Set) TracerOption { + if set.Len() == 0 { + return tracerOptionFunc(func(config TracerConfig) TracerConfig { + return config + }) + } + return tracerOptionFunc(func(config TracerConfig) TracerConfig { - config.attrs = attribute.NewSet(attr...) + if config.attrs.Len() == 0 { + config.attrs = set + } else { + config.attrs = mergeSets(config.attrs, set) + } return config }) } diff --git a/vendor/go.opentelemetry.io/otel/trace/span.go b/vendor/go.opentelemetry.io/otel/trace/span.go index d3aa476ee12..d01e7936649 100644 --- a/vendor/go.opentelemetry.io/otel/trace/span.go +++ b/vendor/go.opentelemetry.io/otel/trace/span.go @@ -66,6 +66,10 @@ type Span interface { // 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. + // + // Note that adding attributes at span creation using [WithAttributes] is preferred + // to calling SetAttribute later, as samplers can only consider information + // already present during span creation. SetAttributes(kv ...attribute.KeyValue) // TracerProvider returns a TracerProvider that can be used to generate diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go index bcaa5aa5378..7c8f50803f7 100644 --- a/vendor/go.opentelemetry.io/otel/version.go +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "1.38.0" + return "1.40.0" } diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml index 07145e254b5..9daa2df9db0 100644 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -3,7 +3,7 @@ module-sets: stable-v1: - version: v1.38.0 + version: v1.40.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus @@ -22,11 +22,11 @@ module-sets: - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: - version: v0.60.0 + version: v0.62.0 modules: - go.opentelemetry.io/otel/exporters/prometheus experimental-logs: - version: v0.14.0 + version: v0.16.0 modules: - go.opentelemetry.io/otel/log - go.opentelemetry.io/otel/log/logtest @@ -36,9 +36,31 @@ module-sets: - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp - go.opentelemetry.io/otel/exporters/stdout/stdoutlog experimental-schema: - version: v0.0.13 + version: v0.0.14 modules: - go.opentelemetry.io/otel/schema excluded-modules: - go.opentelemetry.io/otel/internal/tools - go.opentelemetry.io/otel/trace/internal/telemetry/test +modules: + go.opentelemetry.io/otel/exporters/stdout/stdouttrace: + version-refs: + - ./internal/version.go + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric: + version-refs: + - ./internal/version.go + go.opentelemetry.io/otel/exporters/prometheus: + version-refs: + - ./internal/version.go + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc: + version-refs: + - ./internal/version.go + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: + version-refs: + - ./internal/version.go + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp: + version-refs: + - ./internal/version.go + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp: + version-refs: + - ./internal/version.go 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 index a7c5d19bff3..1f8d49bc983 100644 --- a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go +++ b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go @@ -34,7 +34,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// AnyValue is used to represent any type of attribute value. AnyValue may contain a +// Represents 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 { @@ -252,8 +252,10 @@ type KeyValueList struct { // 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). + // The behavior of software that receives duplicated keys can be unpredictable. Values []*KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` } @@ -296,14 +298,16 @@ func (x *KeyValueList) GetValues() []*KeyValue { return nil } -// KeyValue is a key-value pair that is used to store Span attributes, Link +// Represents 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"` + // The key name of the pair. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The value of the pair. Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } @@ -360,14 +364,21 @@ type InstrumentationScope struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // A name denoting the Instrumentation scope. // An empty instrumentation scope name means the name is unknown. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Defines the version of the instrumentation scope. + // An empty instrumentation scope version means the version is unknown. 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"` + // The behavior of software that receives duplicated keys can be unpredictable. + Attributes []*KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` + // 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,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` } func (x *InstrumentationScope) Reset() { 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 index eb7745d66e0..301247ddfee 100644 --- a/vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go +++ b/vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go @@ -44,8 +44,9 @@ type Resource struct { // 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). + // The behavior of software that receives duplicated keys can be unpredictable. 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 + // 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"` // Set of entities that participate in this Resource. 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 index b342a0a9401..d7bfca90299 100644 --- a/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go +++ b/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go @@ -388,7 +388,8 @@ type ScopeSpans struct { // 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. + // This schema_url applies to the data in the "scope" field and 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"` } @@ -512,21 +513,21 @@ type Span struct { // 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 + // 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 + // 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 + // 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" @@ -534,24 +535,23 @@ type Span struct { // "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). + // The behavior of software that receives duplicated keys can be unpredictable. 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 + // 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. + // 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 + // 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 + // 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 + // 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 @@ -769,16 +769,17 @@ type Span_Event struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // time_unix_nano is the time the event occurred. + // 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. + // The 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. + // 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). + // The behavior of software that receives duplicated keys can be unpredictable. 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, + // 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"` } @@ -859,11 +860,12 @@ type Span_Link struct { 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. + // 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). + // The behavior of software that receives duplicated keys can be unpredictable. 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, + // 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. diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go index 8cf5d8112e4..956795524fa 100644 --- a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go +++ b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go @@ -38,6 +38,9 @@ type chacha20poly1305 struct { // New returns a ChaCha20-Poly1305 AEAD that uses the given 256-bit key. func New(key []byte) (cipher.AEAD, error) { + if fips140Enforced() { + return nil, errors.New("chacha20poly1305: use of ChaCha20Poly1305 is not allowed in FIPS 140-only mode") + } if len(key) != KeySize { return nil, errors.New("chacha20poly1305: bad key length") } diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/fips140only_compat.go b/vendor/golang.org/x/crypto/chacha20poly1305/fips140only_compat.go new file mode 100644 index 00000000000..9b9d5643ec3 --- /dev/null +++ b/vendor/golang.org/x/crypto/chacha20poly1305/fips140only_compat.go @@ -0,0 +1,9 @@ +// 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.26 + +package chacha20poly1305 + +func fips140Enforced() bool { return false } diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/fips140only_go1.26.go b/vendor/golang.org/x/crypto/chacha20poly1305/fips140only_go1.26.go new file mode 100644 index 00000000000..f71089c486e --- /dev/null +++ b/vendor/golang.org/x/crypto/chacha20poly1305/fips140only_go1.26.go @@ -0,0 +1,11 @@ +// 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.26 + +package chacha20poly1305 + +import "crypto/fips140" + +func fips140Enforced() bool { return fips140.Enforced() } diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go b/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go index 1cebfe946f4..b4299b718c1 100644 --- a/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go +++ b/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go @@ -22,6 +22,9 @@ type xchacha20poly1305 struct { // preferred when nonce uniqueness cannot be trivially ensured, or whenever // nonces are randomly generated. func NewX(key []byte) (cipher.AEAD, error) { + if fips140Enforced() { + return nil, errors.New("chacha20poly1305: use of ChaCha20Poly1305 is not allowed in FIPS 140-only mode") + } if len(key) != KeySize { return nil, errors.New("chacha20poly1305: bad key length") } diff --git a/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go b/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go index cb4cadc32d7..dfbfc1eb341 100644 --- a/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go +++ b/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go @@ -37,6 +37,15 @@ type priorityWriteSchedulerRFC9218 struct { // incremental streams or not, when urgency is the same in a given Pop() // call. prioritizeIncremental bool + + // priorityUpdateBuf is used to buffer the most recent PRIORITY_UPDATE we + // receive per https://www.rfc-editor.org/rfc/rfc9218.html#name-the-priority_update-frame. + priorityUpdateBuf struct { + // streamID being 0 means that the buffer is empty. This is a safe + // assumption as PRIORITY_UPDATE for stream 0 is a PROTOCOL_ERROR. + streamID uint32 + priority PriorityParam + } } func newPriorityWriteSchedulerRFC9218() WriteScheduler { @@ -50,6 +59,10 @@ func (ws *priorityWriteSchedulerRFC9218) OpenStream(streamID uint32, opt OpenStr if ws.streams[streamID].location != nil { panic(fmt.Errorf("stream %d already opened", streamID)) } + if streamID == ws.priorityUpdateBuf.streamID { + ws.priorityUpdateBuf.streamID = 0 + opt.priority = ws.priorityUpdateBuf.priority + } q := ws.queuePool.get() ws.streams[streamID] = streamMetadata{ location: q, @@ -95,6 +108,8 @@ func (ws *priorityWriteSchedulerRFC9218) AdjustStream(streamID uint32, priority metadata := ws.streams[streamID] q, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental if q == nil { + ws.priorityUpdateBuf.streamID = streamID + ws.priorityUpdateBuf.priority = priority return } diff --git a/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go b/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go index e86346e8b6c..3ee122d1e95 100644 --- a/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go +++ b/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package clientcredentials implements the OAuth2.0 "client credentials" token flow, -// also known as the "two-legged OAuth 2.0". +// also known as "two-legged OAuth 2.0". // // This should be used when the client is acting on its own behalf or when the client // is the resource owner. It may also be used when requesting access to protected diff --git a/vendor/golang.org/x/oauth2/deviceauth.go b/vendor/golang.org/x/oauth2/deviceauth.go index e99c92f39c7..e783a943748 100644 --- a/vendor/golang.org/x/oauth2/deviceauth.go +++ b/vendor/golang.org/x/oauth2/deviceauth.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io" + "mime" "net/http" "net/url" "strings" @@ -116,10 +117,38 @@ func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAu return nil, fmt.Errorf("oauth2: cannot auth device: %v", err) } if code := r.StatusCode; code < 200 || code > 299 { - return nil, &RetrieveError{ + retrieveError := &RetrieveError{ Response: r, Body: body, } + + content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")) + switch content { + case "application/x-www-form-urlencoded", "text/plain": + // some endpoints return a query string + vals, err := url.ParseQuery(string(body)) + if err != nil { + return nil, retrieveError + } + retrieveError.ErrorCode = vals.Get("error") + retrieveError.ErrorDescription = vals.Get("error_description") + retrieveError.ErrorURI = vals.Get("error_uri") + default: + var tj struct { + // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 + ErrorCode string `json:"error"` + ErrorDescription string `json:"error_description"` + ErrorURI string `json:"error_uri"` + } + if json.Unmarshal(body, &tj) != nil { + return nil, retrieveError + } + retrieveError.ErrorCode = tj.ErrorCode + retrieveError.ErrorDescription = tj.ErrorDescription + retrieveError.ErrorURI = tj.ErrorURI + } + + return nil, retrieveError } da := &DeviceAuthResponse{} diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go index e2eb9c92720..7d1fdd31d34 100644 --- a/vendor/golang.org/x/oauth2/google/google.go +++ b/vendor/golang.org/x/oauth2/google/google.go @@ -252,7 +252,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar // Further information about retrieving access tokens from the GCE metadata // server can be found at https://cloud.google.com/compute/docs/authentication. func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource { - // refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any + // Refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any // refreshes earlier are a waste of compute. earlyExpirySecs := 225 * time.Second return computeTokenSource(account, earlyExpirySecs, scope...) diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 3e3b6306953..5c527d31fd3 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -98,7 +98,7 @@ const ( // in the POST body as application/x-www-form-urlencoded parameters. AuthStyleInParams AuthStyle = 1 - // AuthStyleInHeader sends the client_id and client_password + // AuthStyleInHeader sends the client_id and client_secret // using HTTP Basic Authorization. This is an optional style // described in the OAuth2 RFC 6749 section 2.3.1. AuthStyleInHeader AuthStyle = 2 diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go index cea8374d51b..f99384f0f5c 100644 --- a/vendor/golang.org/x/oauth2/pkce.go +++ b/vendor/golang.org/x/oauth2/pkce.go @@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string { return base64.RawURLEncoding.EncodeToString(sha[:]) } -// S256ChallengeOption derives a PKCE code challenge derived from verifier with +// S256ChallengeOption derives a PKCE code challenge from the verifier with // method S256. It should be passed to [Config.AuthCodeURL] or [Config.DeviceAuth] // only. func S256ChallengeOption(verifier string) AuthCodeOption { diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go index 239ec329620..e995eebb5e1 100644 --- a/vendor/golang.org/x/oauth2/token.go +++ b/vendor/golang.org/x/oauth2/token.go @@ -103,7 +103,7 @@ func (t *Token) WithExtra(extra any) *Token { } // Extra returns an extra field. -// Extra fields are key-value pairs returned by the server as a +// Extra fields are key-value pairs returned by the server as // part of the token retrieval response. func (t *Token) Extra(key string) any { if raw, ok := t.raw.(map[string]any); ok { diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go index 8bbebbac9ee..9922ec33164 100644 --- a/vendor/golang.org/x/oauth2/transport.go +++ b/vendor/golang.org/x/oauth2/transport.go @@ -58,7 +58,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { var cancelOnce sync.Once // CancelRequest does nothing. It used to be a legacy cancellation mechanism -// but now only it only logs on first use to warn that it's deprecated. +// but now only logs on first use to warn that it's deprecated. // // Deprecated: use contexts for cancellation instead. func (t *Transport) CancelRequest(req *http.Request) { diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go index 1e642f3304f..f5723d4f7e5 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go @@ -64,6 +64,80 @@ func initOptions() { func archInit() { + // From internal/cpu + const ( + // eax bits + cpuid_AVXVNNI = 1 << 4 + + // ecx bits + cpuid_SSE3 = 1 << 0 + cpuid_PCLMULQDQ = 1 << 1 + cpuid_AVX512VBMI = 1 << 1 + cpuid_AVX512VBMI2 = 1 << 6 + cpuid_SSSE3 = 1 << 9 + cpuid_AVX512GFNI = 1 << 8 + cpuid_AVX512VAES = 1 << 9 + cpuid_AVX512VNNI = 1 << 11 + cpuid_AVX512BITALG = 1 << 12 + cpuid_FMA = 1 << 12 + cpuid_AVX512VPOPCNTDQ = 1 << 14 + cpuid_SSE41 = 1 << 19 + cpuid_SSE42 = 1 << 20 + cpuid_POPCNT = 1 << 23 + cpuid_AES = 1 << 25 + cpuid_OSXSAVE = 1 << 27 + cpuid_AVX = 1 << 28 + + // "Extended Feature Flag" bits returned in EBX for CPUID EAX=0x7 ECX=0x0 + cpuid_BMI1 = 1 << 3 + cpuid_AVX2 = 1 << 5 + cpuid_BMI2 = 1 << 8 + cpuid_ERMS = 1 << 9 + cpuid_AVX512F = 1 << 16 + cpuid_AVX512DQ = 1 << 17 + cpuid_ADX = 1 << 19 + cpuid_AVX512CD = 1 << 28 + cpuid_SHA = 1 << 29 + cpuid_AVX512BW = 1 << 30 + cpuid_AVX512VL = 1 << 31 + + // "Extended Feature Flag" bits returned in ECX for CPUID EAX=0x7 ECX=0x0 + cpuid_AVX512_VBMI = 1 << 1 + cpuid_AVX512_VBMI2 = 1 << 6 + cpuid_GFNI = 1 << 8 + cpuid_AVX512VPCLMULQDQ = 1 << 10 + cpuid_AVX512_BITALG = 1 << 12 + + // edx bits + cpuid_FSRM = 1 << 4 + // edx bits for CPUID 0x80000001 + cpuid_RDTSCP = 1 << 27 + ) + // Additional constants not in internal/cpu + const ( + // eax=1: edx + cpuid_SSE2 = 1 << 26 + // eax=1: ecx + cpuid_CX16 = 1 << 13 + cpuid_RDRAND = 1 << 30 + // eax=7,ecx=0: ebx + cpuid_RDSEED = 1 << 18 + cpuid_AVX512IFMA = 1 << 21 + cpuid_AVX512PF = 1 << 26 + cpuid_AVX512ER = 1 << 27 + // eax=7,ecx=0: edx + cpuid_AVX5124VNNIW = 1 << 2 + cpuid_AVX5124FMAPS = 1 << 3 + cpuid_AMXBF16 = 1 << 22 + cpuid_AMXTile = 1 << 24 + cpuid_AMXInt8 = 1 << 25 + // eax=7,ecx=1: eax + cpuid_AVX512BF16 = 1 << 5 + cpuid_AVXIFMA = 1 << 23 + // eax=7,ecx=1: edx + cpuid_AVXVNNIInt8 = 1 << 4 + ) + Initialized = true maxID, _, _, _ := cpuid(0, 0) @@ -73,90 +147,90 @@ func archInit() { } _, _, ecx1, edx1 := cpuid(1, 0) - X86.HasSSE2 = isSet(26, edx1) - - X86.HasSSE3 = isSet(0, ecx1) - X86.HasPCLMULQDQ = isSet(1, ecx1) - X86.HasSSSE3 = isSet(9, ecx1) - X86.HasFMA = isSet(12, ecx1) - X86.HasCX16 = isSet(13, ecx1) - X86.HasSSE41 = isSet(19, ecx1) - X86.HasSSE42 = isSet(20, ecx1) - X86.HasPOPCNT = isSet(23, ecx1) - X86.HasAES = isSet(25, ecx1) - X86.HasOSXSAVE = isSet(27, ecx1) - X86.HasRDRAND = isSet(30, ecx1) + X86.HasSSE2 = isSet(edx1, cpuid_SSE2) + + X86.HasSSE3 = isSet(ecx1, cpuid_SSE3) + X86.HasPCLMULQDQ = isSet(ecx1, cpuid_PCLMULQDQ) + X86.HasSSSE3 = isSet(ecx1, cpuid_SSSE3) + X86.HasFMA = isSet(ecx1, cpuid_FMA) + X86.HasCX16 = isSet(ecx1, cpuid_CX16) + X86.HasSSE41 = isSet(ecx1, cpuid_SSE41) + X86.HasSSE42 = isSet(ecx1, cpuid_SSE42) + X86.HasPOPCNT = isSet(ecx1, cpuid_POPCNT) + X86.HasAES = isSet(ecx1, cpuid_AES) + X86.HasOSXSAVE = isSet(ecx1, cpuid_OSXSAVE) + X86.HasRDRAND = isSet(ecx1, cpuid_RDRAND) var osSupportsAVX, osSupportsAVX512 bool // For XGETBV, OSXSAVE bit is required and sufficient. if X86.HasOSXSAVE { eax, _ := xgetbv() // Check if XMM and YMM registers have OS support. - osSupportsAVX = isSet(1, eax) && isSet(2, eax) + osSupportsAVX = isSet(eax, 1<<1) && isSet(eax, 1<<2) if runtime.GOOS == "darwin" { // Darwin requires special AVX512 checks, see cpu_darwin_x86.go osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512() } else { // Check if OPMASK and ZMM registers have OS support. - osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax) + osSupportsAVX512 = osSupportsAVX && isSet(eax, 1<<5) && isSet(eax, 1<<6) && isSet(eax, 1<<7) } } - X86.HasAVX = isSet(28, ecx1) && osSupportsAVX + X86.HasAVX = isSet(ecx1, cpuid_AVX) && osSupportsAVX if maxID < 7 { return } eax7, ebx7, ecx7, edx7 := cpuid(7, 0) - X86.HasBMI1 = isSet(3, ebx7) - X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX - X86.HasBMI2 = isSet(8, ebx7) - X86.HasERMS = isSet(9, ebx7) - X86.HasRDSEED = isSet(18, ebx7) - X86.HasADX = isSet(19, ebx7) - - X86.HasAVX512 = isSet(16, ebx7) && osSupportsAVX512 // Because avx-512 foundation is the core required extension + X86.HasBMI1 = isSet(ebx7, cpuid_BMI1) + X86.HasAVX2 = isSet(ebx7, cpuid_AVX2) && osSupportsAVX + X86.HasBMI2 = isSet(ebx7, cpuid_BMI2) + X86.HasERMS = isSet(ebx7, cpuid_ERMS) + X86.HasRDSEED = isSet(ebx7, cpuid_RDSEED) + X86.HasADX = isSet(ebx7, cpuid_ADX) + + X86.HasAVX512 = isSet(ebx7, cpuid_AVX512F) && osSupportsAVX512 // Because avx-512 foundation is the core required extension if X86.HasAVX512 { X86.HasAVX512F = true - X86.HasAVX512CD = isSet(28, ebx7) - X86.HasAVX512ER = isSet(27, ebx7) - X86.HasAVX512PF = isSet(26, ebx7) - X86.HasAVX512VL = isSet(31, ebx7) - X86.HasAVX512BW = isSet(30, ebx7) - X86.HasAVX512DQ = isSet(17, ebx7) - X86.HasAVX512IFMA = isSet(21, ebx7) - X86.HasAVX512VBMI = isSet(1, ecx7) - X86.HasAVX5124VNNIW = isSet(2, edx7) - X86.HasAVX5124FMAPS = isSet(3, edx7) - X86.HasAVX512VPOPCNTDQ = isSet(14, ecx7) - X86.HasAVX512VPCLMULQDQ = isSet(10, ecx7) - X86.HasAVX512VNNI = isSet(11, ecx7) - X86.HasAVX512GFNI = isSet(8, ecx7) - X86.HasAVX512VAES = isSet(9, ecx7) - X86.HasAVX512VBMI2 = isSet(6, ecx7) - X86.HasAVX512BITALG = isSet(12, ecx7) + X86.HasAVX512CD = isSet(ebx7, cpuid_AVX512CD) + X86.HasAVX512ER = isSet(ebx7, cpuid_AVX512ER) + X86.HasAVX512PF = isSet(ebx7, cpuid_AVX512PF) + X86.HasAVX512VL = isSet(ebx7, cpuid_AVX512VL) + X86.HasAVX512BW = isSet(ebx7, cpuid_AVX512BW) + X86.HasAVX512DQ = isSet(ebx7, cpuid_AVX512DQ) + X86.HasAVX512IFMA = isSet(ebx7, cpuid_AVX512IFMA) + X86.HasAVX512VBMI = isSet(ecx7, cpuid_AVX512_VBMI) + X86.HasAVX5124VNNIW = isSet(edx7, cpuid_AVX5124VNNIW) + X86.HasAVX5124FMAPS = isSet(edx7, cpuid_AVX5124FMAPS) + X86.HasAVX512VPOPCNTDQ = isSet(ecx7, cpuid_AVX512VPOPCNTDQ) + X86.HasAVX512VPCLMULQDQ = isSet(ecx7, cpuid_AVX512VPCLMULQDQ) + X86.HasAVX512VNNI = isSet(ecx7, cpuid_AVX512VNNI) + X86.HasAVX512GFNI = isSet(ecx7, cpuid_AVX512GFNI) + X86.HasAVX512VAES = isSet(ecx7, cpuid_AVX512VAES) + X86.HasAVX512VBMI2 = isSet(ecx7, cpuid_AVX512VBMI2) + X86.HasAVX512BITALG = isSet(ecx7, cpuid_AVX512BITALG) } - X86.HasAMXTile = isSet(24, edx7) - X86.HasAMXInt8 = isSet(25, edx7) - X86.HasAMXBF16 = isSet(22, edx7) + X86.HasAMXTile = isSet(edx7, cpuid_AMXTile) + X86.HasAMXInt8 = isSet(edx7, cpuid_AMXInt8) + X86.HasAMXBF16 = isSet(edx7, cpuid_AMXBF16) // 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) + X86.HasAVX512BF16 = isSet(eax71, cpuid_AVX512BF16) } if X86.HasAVX { - X86.HasAVXIFMA = isSet(23, eax71) - X86.HasAVXVNNI = isSet(4, eax71) - X86.HasAVXVNNIInt8 = isSet(4, edx71) + X86.HasAVXIFMA = isSet(eax71, cpuid_AVXIFMA) + X86.HasAVXVNNI = isSet(eax71, cpuid_AVXVNNI) + X86.HasAVXVNNIInt8 = isSet(edx71, cpuid_AVXVNNIInt8) } } } -func isSet(bitpos uint, value uint32) bool { - return value&(1<\x02\x03\x01\x0f\x02"}, - {"go/types", "\x03\x01\x06g\x03\x01\x03\b\x03\x024\x062\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"}, - {"go/version", "\xbe\x01{"}, - {"hash", "\xf5\x01"}, - {"hash/adler32", "q\x15\x16"}, - {"hash/crc32", "q\x15\x16\x15\x8a\x01\x01\x13"}, - {"hash/crc64", "q\x15\x16\x9f\x01"}, - {"hash/fnv", "q\x15\x16h"}, - {"hash/maphash", "\x86\x01\x11<|"}, - {"html", "\xb9\x02\x02\x12"}, - {"html/template", "\x03k\x06\x18-<\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"}, - {"image", "\x02o\x1ef\x0f4\x03\x01"}, + {"encoding/ascii85", "\xfa\x01C"}, + {"encoding/asn1", "\x03q\x03g(\x01'\r\x02\x01\x11\x03\x01"}, + {"encoding/base32", "\xfa\x01A\x02"}, + {"encoding/base64", "\xa0\x01ZA\x02"}, + {"encoding/binary", "t\x86\x01\f(\r\x05"}, + {"encoding/csv", "\x02\x01q\x03\x83\x01D\x13\x02"}, + {"encoding/gob", "\x02f\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x10\x02"}, + {"encoding/hex", "t\x03\x83\x01A\x03"}, + {"encoding/json", "\x03\x01d\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x11\x01\x01\x02"}, + {"encoding/pem", "\x03i\b\x86\x01A\x03"}, + {"encoding/xml", "\x02\x01e\f\x03\x83\x014\x05\n\x01\x02\x11\x02"}, + {"errors", "\xd0\x01\x85\x01"}, + {"expvar", "qLA\b\v\x15\r\b\x02\x03\x01\x12"}, + {"flag", "h\f\x03\x83\x01,\b\x05\b\x02\x01\x11"}, + {"fmt", "tF'\x19\f \b\r\x02\x03\x13"}, + {"go/ast", "\x03\x01s\x0f\x01s\x03)\b\r\x02\x01\x13\x02"}, + {"go/build", "\x02\x01q\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x13\x02\x02"}, + {"go/build/constraint", "t\xc9\x01\x01\x13\x02"}, + {"go/constant", "w\x10\x7f\x01\x024\x01\x02\x13"}, + {"go/doc", "\x04s\x01\x05\n=61\x10\x02\x01\x13\x02"}, + {"go/doc/comment", "\x03t\xc4\x01\x01\x01\x01\x13\x02"}, + {"go/format", "\x03t\x01\f\x01\x02sD"}, + {"go/importer", "y\a\x01\x02\x04\x01r9"}, + {"go/internal/gccgoimporter", "\x02\x01^\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\r\b"}, + {"go/internal/gcimporter", "\x02u\x10\x010\x05\r0,\x15\x03\x02"}, + {"go/internal/scannerhooks", "\x87\x01"}, + {"go/internal/srcimporter", "w\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x15"}, + {"go/parser", "\x03q\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, + {"go/printer", "w\x01\x02\x03\ns\f \x15\x02\x01\x02\f\x05\x02"}, + {"go/scanner", "\x03t\v\x05s2\x10\x01\x14\x02"}, + {"go/token", "\x04s\x86\x01>\x02\x03\x01\x10\x02"}, + {"go/types", "\x03\x01\x06j\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"}, + {"go/version", "\xc2\x01|"}, + {"hash", "\xfa\x01"}, + {"hash/adler32", "t\x16\x16"}, + {"hash/crc32", "t\x16\x16\x15\x8b\x01\x01\x14"}, + {"hash/crc64", "t\x16\x16\xa0\x01"}, + {"hash/fnv", "t\x16\x16i"}, + {"hash/maphash", "\x8a\x01\x11<~"}, + {"html", "\xbe\x02\x02\x13"}, + {"html/template", "\x03n\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\r\x01\x03\x02"}, + {"image", "\x02r\x1fg\x0f4\x03\x01"}, {"image/color", ""}, - {"image/color/palette", "\x8f\x01"}, - {"image/draw", "\x8e\x01\x01\x04"}, - {"image/gif", "\x02\x01\x05i\x03\x1a\x01\x01\x01\vY"}, - {"image/internal/imageutil", "\x8e\x01"}, - {"image/jpeg", "\x02o\x1d\x01\x04b"}, - {"image/png", "\x02\aa\n\x12\x02\x06\x01fC"}, - {"index/suffixarray", "\x03g\a\x84\x01\f+\n\x01"}, - {"internal/abi", "\xb8\x01\x97\x01"}, - {"internal/asan", "\xcf\x02"}, - {"internal/bisect", "\xae\x02\r\x01"}, - {"internal/buildcfg", "tGf\x06\x02\x05\n\x01"}, - {"internal/bytealg", "\xb1\x01\x9e\x01"}, + {"image/color/palette", "\x93\x01"}, + {"image/draw", "\x92\x01\x01\x04"}, + {"image/gif", "\x02\x01\x05l\x03\x1b\x01\x01\x01\vZ\x0f"}, + {"image/internal/imageutil", "\x92\x01"}, + {"image/jpeg", "\x02r\x1e\x01\x04c"}, + {"image/png", "\x02\ad\n\x13\x02\x06\x01gC"}, + {"index/suffixarray", "\x03j\a\x86\x01\f+\n\x01"}, + {"internal/abi", "\xbc\x01\x99\x01"}, + {"internal/asan", "\xd5\x02"}, + {"internal/bisect", "\xb3\x02\r\x01"}, + {"internal/buildcfg", "wHg\x06\x02\x05\n\x01"}, + {"internal/bytealg", "\xb5\x01\xa0\x01"}, {"internal/byteorder", ""}, {"internal/cfg", ""}, - {"internal/cgrouptest", "tZS\x06\x0f\x02\x01\x04\x01"}, - {"internal/chacha8rand", "\x9c\x01\x15\a\x97\x01"}, + {"internal/cgrouptest", "w[T\x06\x0f\x02\x01\x04\x01"}, + {"internal/chacha8rand", "\xa0\x01\x15\a\x99\x01"}, {"internal/copyright", ""}, {"internal/coverage", ""}, {"internal/coverage/calloc", ""}, - {"internal/coverage/cfile", "n\x06\x16\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02&,\x06\a\n\x01\x03\r\x06"}, - {"internal/coverage/cformat", "\x04p-\x04P\v6\x01\x02\r"}, - {"internal/coverage/cmerge", "t-`"}, - {"internal/coverage/decodecounter", "j\n-\v\x02G,\x17\x17"}, - {"internal/coverage/decodemeta", "\x02h\n\x16\x17\v\x02G,"}, - {"internal/coverage/encodecounter", "\x02h\n-\f\x01\x02E\v!\x15"}, - {"internal/coverage/encodemeta", "\x02\x01g\n\x12\x04\x17\r\x02E,."}, - {"internal/coverage/pods", "\x04p-\x80\x01\x06\x05\n\x02\x01"}, - {"internal/coverage/rtcov", "\xcf\x02"}, - {"internal/coverage/slicereader", "j\n\x81\x01Z"}, - {"internal/coverage/slicewriter", "t\x81\x01"}, - {"internal/coverage/stringtab", "t8\x04E"}, + {"internal/coverage/cfile", "q\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\x0e\x06"}, + {"internal/coverage/cformat", "\x04s.\x04Q\v6\x01\x02\x0e"}, + {"internal/coverage/cmerge", "w.a"}, + {"internal/coverage/decodecounter", "m\n.\v\x02H,\x17\x18"}, + {"internal/coverage/decodemeta", "\x02k\n\x17\x17\v\x02H,"}, + {"internal/coverage/encodecounter", "\x02k\n.\f\x01\x02F\v!\x15"}, + {"internal/coverage/encodemeta", "\x02\x01j\n\x13\x04\x17\r\x02F,/"}, + {"internal/coverage/pods", "\x04s.\x81\x01\x06\x05\n\x02\x01"}, + {"internal/coverage/rtcov", "\xd5\x02"}, + {"internal/coverage/slicereader", "m\n\x83\x01["}, + {"internal/coverage/slicewriter", "w\x83\x01"}, + {"internal/coverage/stringtab", "w9\x04F"}, {"internal/coverage/test", ""}, {"internal/coverage/uleb128", ""}, - {"internal/cpu", "\xcf\x02"}, - {"internal/dag", "\x04p\xc2\x01\x03"}, - {"internal/diff", "\x03q\xc3\x01\x02"}, - {"internal/exportdata", "\x02\x01n\x03\x02c\x1c,\x01\x05\x11\x01\x02"}, - {"internal/filepathlite", "q*A\x1a@"}, - {"internal/fmtsort", "\x04\xa5\x02\r"}, - {"internal/fuzz", "\x03\nE\x18\x04\x03\x03\x01\v\x036<\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"}, + {"internal/cpu", "\xd5\x02"}, + {"internal/dag", "\x04s\xc4\x01\x03"}, + {"internal/diff", "\x03t\xc5\x01\x02"}, + {"internal/exportdata", "\x02\x01q\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, + {"internal/filepathlite", "t+B\x1a@"}, + {"internal/fmtsort", "\x04\xaa\x02\r"}, + {"internal/fuzz", "\x03\nH\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"}, {"internal/goarch", ""}, - {"internal/godebug", "\x99\x01!\x81\x01\x01\x13"}, + {"internal/godebug", "\x9d\x01!\x82\x01\x01\x14"}, {"internal/godebugs", ""}, {"internal/goexperiment", ""}, {"internal/goos", ""}, - {"internal/goroot", "\xa1\x02\x01\x05\x12\x02"}, + {"internal/goroot", "\xa6\x02\x01\x05\x12\x02"}, {"internal/gover", "\x04"}, {"internal/goversion", ""}, - {"internal/lazyregexp", "\xa1\x02\v\r\x02"}, - {"internal/lazytemplate", "\xf5\x01,\x18\x02\f"}, - {"internal/msan", "\xcf\x02"}, + {"internal/lazyregexp", "\xa6\x02\v\r\x02"}, + {"internal/lazytemplate", "\xfa\x01,\x18\x02\r"}, + {"internal/msan", "\xd5\x02"}, {"internal/nettrace", ""}, - {"internal/obscuretestdata", "i\x8c\x01,"}, - {"internal/oserror", "q"}, - {"internal/pkgbits", "\x03O\x18\a\x03\x04\vr\r\x1f\r\n\x01"}, + {"internal/obscuretestdata", "l\x8e\x01,"}, + {"internal/oserror", "t"}, + {"internal/pkgbits", "\x03R\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, {"internal/platform", ""}, - {"internal/poll", "qj\x05\x159\r\x01\x01\f\x06"}, - {"internal/profile", "\x03\x04j\x03\x81\x017\n\x01\x01\x01\x10"}, + {"internal/poll", "tl\x05\x159\r\x01\x01\r\x06"}, + {"internal/profile", "\x03\x04m\x03\x83\x017\n\x01\x01\x01\x11"}, {"internal/profilerecord", ""}, - {"internal/race", "\x97\x01\xb8\x01"}, - {"internal/reflectlite", "\x97\x01!:\x16"}, - {"vendor/golang.org/x/text/unicode/norm", "j\n\x81\x01F\x12\x11"}, - {"weak", "\x97\x01\x97\x01!"}, + {"vendor/golang.org/x/crypto/internal/alias", "\xd5\x02"}, + {"vendor/golang.org/x/crypto/internal/poly1305", "X\x15\x9c\x01"}, + {"vendor/golang.org/x/net/dns/dnsmessage", "t\xc7\x01"}, + {"vendor/golang.org/x/net/http/httpguts", "\x90\x02\x14\x1a\x15\r"}, + {"vendor/golang.org/x/net/http/httpproxy", "t\x03\x99\x01\x10\x05\x01\x18\x15\r"}, + {"vendor/golang.org/x/net/http2/hpack", "\x03q\x03\x83\x01F"}, + {"vendor/golang.org/x/net/idna", "w\x8f\x018\x15\x10\x02\x01"}, + {"vendor/golang.org/x/net/nettest", "\x03j\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\f"}, + {"vendor/golang.org/x/sys/cpu", "\xa6\x02\r\n\x01\x17"}, + {"vendor/golang.org/x/text/secure/bidirule", "t\xdf\x01\x11\x01"}, + {"vendor/golang.org/x/text/transform", "\x03q\x86\x01Y"}, + {"vendor/golang.org/x/text/unicode/bidi", "\x03\bl\x87\x01>\x17"}, + {"vendor/golang.org/x/text/unicode/norm", "m\n\x83\x01F\x13\x11"}, + {"weak", "\x9b\x01\x98\x01\""}, } // bootstrap is the list of bootstrap packages extracted from cmd/dist. @@ -385,6 +391,7 @@ var bootstrap = map[string]bool{ "cmd/compile/internal/arm64": true, "cmd/compile/internal/base": true, "cmd/compile/internal/bitvec": true, + "cmd/compile/internal/bloop": true, "cmd/compile/internal/compare": true, "cmd/compile/internal/coverage": true, "cmd/compile/internal/deadlocals": true, @@ -413,6 +420,7 @@ var bootstrap = map[string]bool{ "cmd/compile/internal/riscv64": true, "cmd/compile/internal/rttype": true, "cmd/compile/internal/s390x": true, + "cmd/compile/internal/slice": true, "cmd/compile/internal/ssa": true, "cmd/compile/internal/ssagen": true, "cmd/compile/internal/staticdata": true, diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index 362f23c436c..33e4f505f3e 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -16,6 +16,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).Flush", Method, 0, ""}, {"(*Writer).Write", Method, 0, ""}, {"(*Writer).WriteHeader", Method, 0, ""}, + {"(FileInfoNames).Gname", Method, 23, ""}, + {"(FileInfoNames).IsDir", Method, 23, ""}, + {"(FileInfoNames).ModTime", Method, 23, ""}, + {"(FileInfoNames).Mode", Method, 23, ""}, + {"(FileInfoNames).Name", Method, 23, ""}, + {"(FileInfoNames).Size", Method, 23, ""}, + {"(FileInfoNames).Sys", Method, 23, ""}, + {"(FileInfoNames).Uname", Method, 23, ""}, {"(Format).String", Method, 10, ""}, {"ErrFieldTooLong", Var, 0, ""}, {"ErrHeader", Var, 0, ""}, @@ -338,6 +346,9 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).Write", Method, 0, ""}, {"(CorruptInputError).Error", Method, 0, ""}, {"(InternalError).Error", Method, 0, ""}, + {"(Reader).Read", Method, 0, ""}, + {"(Reader).ReadByte", Method, 0, ""}, + {"(Resetter).Reset", Method, 4, ""}, {"BestCompression", Const, 0, ""}, {"BestSpeed", Const, 0, ""}, {"CorruptInputError", Type, 0, ""}, @@ -409,6 +420,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).Flush", Method, 0, ""}, {"(*Writer).Reset", Method, 2, ""}, {"(*Writer).Write", Method, 0, ""}, + {"(Resetter).Reset", Method, 4, ""}, {"BestCompression", Const, 0, ""}, {"BestSpeed", Const, 0, ""}, {"DefaultCompression", Const, 0, ""}, @@ -426,6 +438,11 @@ var PackageSymbols = map[string][]Symbol{ {"Writer", Type, 0, ""}, }, "container/heap": { + {"(Interface).Len", Method, 0, ""}, + {"(Interface).Less", Method, 0, ""}, + {"(Interface).Pop", Method, 0, ""}, + {"(Interface).Push", Method, 0, ""}, + {"(Interface).Swap", Method, 0, ""}, {"Fix", Func, 2, "func(h Interface, i int)"}, {"Init", Func, 0, "func(h Interface)"}, {"Interface", Type, 0, ""}, @@ -469,6 +486,10 @@ var PackageSymbols = map[string][]Symbol{ {"Ring.Value", Field, 0, ""}, }, "context": { + {"(Context).Deadline", Method, 7, ""}, + {"(Context).Done", Method, 7, ""}, + {"(Context).Err", Method, 7, ""}, + {"(Context).Value", Method, 7, ""}, {"AfterFunc", Func, 21, "func(ctx Context, f func()) (stop func() bool)"}, {"Background", Func, 7, "func() Context"}, {"CancelCauseFunc", Type, 20, ""}, @@ -488,17 +509,31 @@ var PackageSymbols = map[string][]Symbol{ {"WithoutCancel", Func, 21, "func(parent Context) Context"}, }, "crypto": { + {"(Decapsulator).Decapsulate", Method, 26, ""}, + {"(Decapsulator).Encapsulator", Method, 26, ""}, + {"(Decrypter).Decrypt", Method, 5, ""}, + {"(Decrypter).Public", Method, 5, ""}, + {"(Encapsulator).Bytes", Method, 26, ""}, + {"(Encapsulator).Encapsulate", Method, 26, ""}, {"(Hash).Available", Method, 0, ""}, {"(Hash).HashFunc", Method, 4, ""}, {"(Hash).New", Method, 0, ""}, {"(Hash).Size", Method, 0, ""}, {"(Hash).String", Method, 15, ""}, + {"(MessageSigner).Public", Method, 25, ""}, + {"(MessageSigner).Sign", Method, 25, ""}, + {"(MessageSigner).SignMessage", Method, 25, ""}, + {"(Signer).Public", Method, 4, ""}, + {"(Signer).Sign", Method, 4, ""}, + {"(SignerOpts).HashFunc", Method, 4, ""}, {"BLAKE2b_256", Const, 9, ""}, {"BLAKE2b_384", Const, 9, ""}, {"BLAKE2b_512", Const, 9, ""}, {"BLAKE2s_256", Const, 9, ""}, + {"Decapsulator", Type, 26, ""}, {"Decrypter", Type, 5, ""}, {"DecrypterOpts", Type, 5, ""}, + {"Encapsulator", Type, 26, ""}, {"Hash", Type, 0, ""}, {"MD4", Const, 0, ""}, {"MD5", Const, 0, ""}, @@ -530,6 +565,16 @@ var PackageSymbols = map[string][]Symbol{ {"NewCipher", Func, 0, "func(key []byte) (cipher.Block, error)"}, }, "crypto/cipher": { + {"(AEAD).NonceSize", Method, 2, ""}, + {"(AEAD).Open", Method, 2, ""}, + {"(AEAD).Overhead", Method, 2, ""}, + {"(AEAD).Seal", Method, 2, ""}, + {"(Block).BlockSize", Method, 0, ""}, + {"(Block).Decrypt", Method, 0, ""}, + {"(Block).Encrypt", Method, 0, ""}, + {"(BlockMode).BlockSize", Method, 0, ""}, + {"(BlockMode).CryptBlocks", Method, 0, ""}, + {"(Stream).XORKeyStream", Method, 0, ""}, {"(StreamReader).Read", Method, 0, ""}, {"(StreamWriter).Close", Method, 0, ""}, {"(StreamWriter).Write", Method, 0, ""}, @@ -581,7 +626,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey", Type, 0, ""}, {"PublicKey.Parameters", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, - {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, + {"Sign", Func, 0, "func(random io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, }, "crypto/ecdh": { @@ -594,7 +639,13 @@ var PackageSymbols = map[string][]Symbol{ {"(*PublicKey).Bytes", Method, 20, ""}, {"(*PublicKey).Curve", Method, 20, ""}, {"(*PublicKey).Equal", Method, 20, ""}, - {"Curve", Type, 20, ""}, + {"(Curve).GenerateKey", Method, 20, ""}, + {"(Curve).NewPrivateKey", Method, 20, ""}, + {"(Curve).NewPublicKey", Method, 20, ""}, + {"(KeyExchanger).Curve", Method, 26, ""}, + {"(KeyExchanger).ECDH", Method, 26, ""}, + {"(KeyExchanger).PublicKey", Method, 26, ""}, + {"KeyExchanger", Type, 26, ""}, {"P256", Func, 20, "func() Curve"}, {"P384", Func, 20, "func() Curve"}, {"P521", Func, 20, "func() Curve"}, @@ -623,7 +674,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PublicKey).Params", Method, 0, ""}, {"(PublicKey).ScalarBaseMult", Method, 0, ""}, {"(PublicKey).ScalarMult", Method, 0, ""}, - {"GenerateKey", Func, 0, "func(c elliptic.Curve, rand io.Reader) (*PrivateKey, error)"}, + {"GenerateKey", Func, 0, "func(c elliptic.Curve, r io.Reader) (*PrivateKey, error)"}, {"ParseRawPrivateKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PrivateKey, error)"}, {"ParseUncompressedPublicKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PublicKey, error)"}, {"PrivateKey", Type, 0, ""}, @@ -634,7 +685,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.X", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, - {"SignASN1", Func, 15, "func(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, + {"SignASN1", Func, 15, "func(r io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, {"VerifyASN1", Func, 15, "func(pub *PublicKey, hash []byte, sig []byte) bool"}, }, @@ -645,7 +696,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PrivateKey).Seed", Method, 13, ""}, {"(PrivateKey).Sign", Method, 13, ""}, {"(PublicKey).Equal", Method, 15, ""}, - {"GenerateKey", Func, 13, "func(rand io.Reader) (PublicKey, PrivateKey, error)"}, + {"GenerateKey", Func, 13, "func(random io.Reader) (PublicKey, PrivateKey, error)"}, {"NewKeyFromSeed", Func, 13, "func(seed []byte) PrivateKey"}, {"Options", Type, 20, ""}, {"Options.Context", Field, 20, ""}, @@ -667,6 +718,12 @@ var PackageSymbols = map[string][]Symbol{ {"(*CurveParams).Params", Method, 0, ""}, {"(*CurveParams).ScalarBaseMult", Method, 0, ""}, {"(*CurveParams).ScalarMult", Method, 0, ""}, + {"(Curve).Add", Method, 0, ""}, + {"(Curve).Double", Method, 0, ""}, + {"(Curve).IsOnCurve", Method, 0, ""}, + {"(Curve).Params", Method, 0, ""}, + {"(Curve).ScalarBaseMult", Method, 0, ""}, + {"(Curve).ScalarMult", Method, 0, ""}, {"Curve", Type, 0, ""}, {"CurveParams", Type, 0, ""}, {"CurveParams.B", Field, 0, ""}, @@ -688,6 +745,9 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/fips140": { {"Enabled", Func, 24, "func() bool"}, + {"Enforced", Func, 26, "func() bool"}, + {"Version", Func, 26, "func() string"}, + {"WithoutEnforcement", Func, 26, "func(f func())"}, }, "crypto/hkdf": { {"Expand", Func, 24, "func[H hash.Hash](h func() H, pseudorandomKey []byte, info string, keyLength int) ([]byte, error)"}, @@ -698,6 +758,54 @@ var PackageSymbols = map[string][]Symbol{ {"Equal", Func, 1, "func(mac1 []byte, mac2 []byte) bool"}, {"New", Func, 0, "func(h func() hash.Hash, key []byte) hash.Hash"}, }, + "crypto/hpke": { + {"(*Recipient).Export", Method, 26, ""}, + {"(*Recipient).Open", Method, 26, ""}, + {"(*Sender).Export", Method, 26, ""}, + {"(*Sender).Seal", Method, 26, ""}, + {"(AEAD).ID", Method, 26, ""}, + {"(KDF).ID", Method, 26, ""}, + {"(KEM).DeriveKeyPair", Method, 26, ""}, + {"(KEM).GenerateKey", Method, 26, ""}, + {"(KEM).ID", Method, 26, ""}, + {"(KEM).NewPrivateKey", Method, 26, ""}, + {"(KEM).NewPublicKey", Method, 26, ""}, + {"(PrivateKey).Bytes", Method, 26, ""}, + {"(PrivateKey).KEM", Method, 26, ""}, + {"(PrivateKey).PublicKey", Method, 26, ""}, + {"(PublicKey).Bytes", Method, 26, ""}, + {"(PublicKey).KEM", Method, 26, ""}, + {"AES128GCM", Func, 26, "func() AEAD"}, + {"AES256GCM", Func, 26, "func() AEAD"}, + {"ChaCha20Poly1305", Func, 26, "func() AEAD"}, + {"DHKEM", Func, 26, "func(curve ecdh.Curve) KEM"}, + {"ExportOnly", Func, 26, "func() AEAD"}, + {"HKDFSHA256", Func, 26, "func() KDF"}, + {"HKDFSHA384", Func, 26, "func() KDF"}, + {"HKDFSHA512", Func, 26, "func() KDF"}, + {"MLKEM1024", Func, 26, "func() KEM"}, + {"MLKEM1024P384", Func, 26, "func() KEM"}, + {"MLKEM768", Func, 26, "func() KEM"}, + {"MLKEM768P256", Func, 26, "func() KEM"}, + {"MLKEM768X25519", Func, 26, "func() KEM"}, + {"NewAEAD", Func, 26, "func(id uint16) (AEAD, error)"}, + {"NewDHKEMPrivateKey", Func, 26, "func(priv ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewDHKEMPublicKey", Func, 26, "func(pub *ecdh.PublicKey) (PublicKey, error)"}, + {"NewHybridPrivateKey", Func, 26, "func(pq crypto.Decapsulator, t ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewHybridPublicKey", Func, 26, "func(pq crypto.Encapsulator, t *ecdh.PublicKey) (PublicKey, error)"}, + {"NewKDF", Func, 26, "func(id uint16) (KDF, error)"}, + {"NewKEM", Func, 26, "func(id uint16) (KEM, error)"}, + {"NewMLKEMPrivateKey", Func, 26, "func(priv crypto.Decapsulator) (PrivateKey, error)"}, + {"NewMLKEMPublicKey", Func, 26, "func(pub crypto.Encapsulator) (PublicKey, error)"}, + {"NewRecipient", Func, 26, "func(enc []byte, k PrivateKey, kdf KDF, aead AEAD, info []byte) (*Recipient, error)"}, + {"NewSender", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte) (enc []byte, s *Sender, err error)"}, + {"Open", Func, 26, "func(k PrivateKey, kdf KDF, aead AEAD, info []byte, ciphertext []byte) ([]byte, error)"}, + {"Recipient", Type, 26, ""}, + {"SHAKE128", Func, 26, "func() KDF"}, + {"SHAKE256", Func, 26, "func() KDF"}, + {"Seal", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte, plaintext []byte) ([]byte, error)"}, + {"Sender", Type, 26, ""}, + }, "crypto/md5": { {"BlockSize", Const, 0, ""}, {"New", Func, 0, "func() hash.Hash"}, @@ -708,9 +816,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*DecapsulationKey1024).Bytes", Method, 24, ""}, {"(*DecapsulationKey1024).Decapsulate", Method, 24, ""}, {"(*DecapsulationKey1024).EncapsulationKey", Method, 24, ""}, + {"(*DecapsulationKey1024).Encapsulator", Method, 26, ""}, {"(*DecapsulationKey768).Bytes", Method, 24, ""}, {"(*DecapsulationKey768).Decapsulate", Method, 24, ""}, {"(*DecapsulationKey768).EncapsulationKey", Method, 24, ""}, + {"(*DecapsulationKey768).Encapsulator", Method, 26, ""}, {"(*EncapsulationKey1024).Bytes", Method, 24, ""}, {"(*EncapsulationKey1024).Encapsulate", Method, 24, ""}, {"(*EncapsulationKey768).Bytes", Method, 24, ""}, @@ -732,12 +842,16 @@ var PackageSymbols = map[string][]Symbol{ {"SeedSize", Const, 24, ""}, {"SharedKeySize", Const, 24, ""}, }, + "crypto/mlkem/mlkemtest": { + {"Encapsulate1024", Func, 26, "func(ek *mlkem.EncapsulationKey1024, random []byte) (sharedKey []byte, ciphertext []byte, err error)"}, + {"Encapsulate768", Func, 26, "func(ek *mlkem.EncapsulationKey768, random []byte) (sharedKey []byte, ciphertext []byte, err error)"}, + }, "crypto/pbkdf2": { {"Key", Func, 24, "func[Hash hash.Hash](h func() Hash, password string, salt []byte, iter int, keyLength int) ([]byte, error)"}, }, "crypto/rand": { {"Int", Func, 0, "func(rand io.Reader, max *big.Int) (n *big.Int, err error)"}, - {"Prime", Func, 0, "func(rand io.Reader, bits int) (*big.Int, error)"}, + {"Prime", Func, 0, "func(r io.Reader, bits int) (*big.Int, error)"}, {"Read", Func, 0, "func(b []byte) (n int, err error)"}, {"Reader", Var, 0, ""}, {"Text", Func, 24, "func() string"}, @@ -769,6 +883,7 @@ var PackageSymbols = map[string][]Symbol{ {"DecryptPKCS1v15", Func, 0, "func(random io.Reader, priv *PrivateKey, ciphertext []byte) ([]byte, error)"}, {"DecryptPKCS1v15SessionKey", Func, 0, "func(random io.Reader, priv *PrivateKey, ciphertext []byte, key []byte) error"}, {"EncryptOAEP", Func, 0, "func(hash hash.Hash, random io.Reader, pub *PublicKey, msg []byte, label []byte) ([]byte, error)"}, + {"EncryptOAEPWithOptions", Func, 26, "func(random io.Reader, pub *PublicKey, msg []byte, opts *OAEPOptions) ([]byte, error)"}, {"EncryptPKCS1v15", Func, 0, "func(random io.Reader, pub *PublicKey, msg []byte) ([]byte, error)"}, {"ErrDecryption", Var, 0, ""}, {"ErrMessageTooLong", Var, 0, ""}, @@ -800,7 +915,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.E", Field, 0, ""}, {"PublicKey.N", Field, 0, ""}, {"SignPKCS1v15", Func, 0, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error)"}, - {"SignPSS", Func, 2, "func(rand io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, + {"SignPSS", Func, 2, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, {"VerifyPKCS1v15", Func, 0, "func(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error"}, {"VerifyPSS", Func, 2, "func(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error"}, }, @@ -921,6 +1036,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*SessionState).Bytes", Method, 21, ""}, {"(AlertError).Error", Method, 21, ""}, {"(ClientAuthType).String", Method, 15, ""}, + {"(ClientSessionCache).Get", Method, 3, ""}, + {"(ClientSessionCache).Put", Method, 3, ""}, {"(CurveID).String", Method, 15, ""}, {"(QUICEncryptionLevel).String", Method, 21, ""}, {"(RecordHeaderError).Error", Method, 6, ""}, @@ -953,6 +1070,7 @@ var PackageSymbols = map[string][]Symbol{ {"ClientHelloInfo.CipherSuites", Field, 4, ""}, {"ClientHelloInfo.Conn", Field, 8, ""}, {"ClientHelloInfo.Extensions", Field, 24, ""}, + {"ClientHelloInfo.HelloRetryRequest", Field, 26, ""}, {"ClientHelloInfo.ServerName", Field, 4, ""}, {"ClientHelloInfo.SignatureSchemes", Field, 8, ""}, {"ClientHelloInfo.SupportedCurves", Field, 4, ""}, @@ -1001,6 +1119,7 @@ var PackageSymbols = map[string][]Symbol{ {"ConnectionState.DidResume", Field, 1, ""}, {"ConnectionState.ECHAccepted", Field, 23, ""}, {"ConnectionState.HandshakeComplete", Field, 0, ""}, + {"ConnectionState.HelloRetryRequest", Field, 26, ""}, {"ConnectionState.NegotiatedProtocol", Field, 0, ""}, {"ConnectionState.NegotiatedProtocolIsMutual", Field, 0, ""}, {"ConnectionState.OCSPResponse", Field, 5, ""}, @@ -1055,8 +1174,10 @@ var PackageSymbols = map[string][]Symbol{ {"QUICEncryptionLevelEarly", Const, 21, ""}, {"QUICEncryptionLevelHandshake", Const, 21, ""}, {"QUICEncryptionLevelInitial", Const, 21, ""}, + {"QUICErrorEvent", Const, 26, ""}, {"QUICEvent", Type, 21, ""}, {"QUICEvent.Data", Field, 21, ""}, + {"QUICEvent.Err", Field, 26, ""}, {"QUICEvent.Kind", Field, 21, ""}, {"QUICEvent.Level", Field, 21, ""}, {"QUICEvent.SessionState", Field, 23, ""}, @@ -1087,6 +1208,8 @@ var PackageSymbols = map[string][]Symbol{ {"RequestClientCert", Const, 0, ""}, {"RequireAndVerifyClientCert", Const, 0, ""}, {"RequireAnyClientCert", Const, 0, ""}, + {"SecP256r1MLKEM768", Const, 26, ""}, + {"SecP384r1MLKEM1024", Const, 26, ""}, {"Server", Func, 0, "func(conn net.Conn, config *Config) *Conn"}, {"SessionState", Type, 21, ""}, {"SessionState.EarlyData", Field, 21, ""}, @@ -1151,8 +1274,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*RevocationList).CheckSignatureFrom", Method, 19, ""}, {"(CertificateInvalidError).Error", Method, 0, ""}, {"(ConstraintViolationError).Error", Method, 0, ""}, + {"(ExtKeyUsage).OID", Method, 26, ""}, + {"(ExtKeyUsage).String", Method, 26, ""}, {"(HostnameError).Error", Method, 0, ""}, {"(InsecureAlgorithmError).Error", Method, 6, ""}, + {"(KeyUsage).String", Method, 26, ""}, {"(OID).AppendBinary", Method, 24, ""}, {"(OID).AppendText", Method, 24, ""}, {"(OID).Equal", Method, 22, ""}, @@ -1307,6 +1433,7 @@ var PackageSymbols = map[string][]Symbol{ {"NoValidChains", Const, 24, ""}, {"NotAuthorizedToSign", Const, 0, ""}, {"OID", Type, 22, ""}, + {"OIDFromASN1OID", Func, 26, "func(asn1OID asn1.ObjectIdentifier) (OID, error)"}, {"OIDFromInts", Func, 22, "func(oid []uint64) (OID, error)"}, {"PEMCipher", Type, 1, ""}, {"PEMCipher3DES", Const, 1, ""}, @@ -1516,6 +1643,9 @@ var PackageSymbols = map[string][]Symbol{ {"(NullInt64).Value", Method, 0, ""}, {"(NullString).Value", Method, 0, ""}, {"(NullTime).Value", Method, 13, ""}, + {"(Result).LastInsertId", Method, 0, ""}, + {"(Result).RowsAffected", Method, 0, ""}, + {"(Scanner).Scan", Method, 0, ""}, {"ColumnType", Type, 8, ""}, {"Conn", Type, 9, ""}, {"DB", Type, 0, ""}, @@ -1547,8 +1677,6 @@ var PackageSymbols = map[string][]Symbol{ {"NamedArg.Name", Field, 8, ""}, {"NamedArg.Value", Field, 8, ""}, {"Null", Type, 22, ""}, - {"Null.V", Field, 22, ""}, - {"Null.Valid", Field, 22, ""}, {"NullBool", Type, 0, ""}, {"NullBool.Bool", Field, 0, ""}, {"NullBool.Valid", Field, 0, ""}, @@ -1591,10 +1719,68 @@ var PackageSymbols = map[string][]Symbol{ {"TxOptions.ReadOnly", Field, 8, ""}, }, "database/sql/driver": { + {"(ColumnConverter).ColumnConverter", Method, 0, ""}, + {"(Conn).Begin", Method, 0, ""}, + {"(Conn).Close", Method, 0, ""}, + {"(Conn).Prepare", Method, 0, ""}, + {"(ConnBeginTx).BeginTx", Method, 8, ""}, + {"(ConnPrepareContext).PrepareContext", Method, 8, ""}, + {"(Connector).Connect", Method, 10, ""}, + {"(Connector).Driver", Method, 10, ""}, + {"(Driver).Open", Method, 0, ""}, + {"(DriverContext).OpenConnector", Method, 10, ""}, + {"(Execer).Exec", Method, 0, ""}, + {"(ExecerContext).ExecContext", Method, 8, ""}, + {"(NamedValueChecker).CheckNamedValue", Method, 9, ""}, {"(NotNull).ConvertValue", Method, 0, ""}, {"(Null).ConvertValue", Method, 0, ""}, + {"(Pinger).Ping", Method, 8, ""}, + {"(Queryer).Query", Method, 1, ""}, + {"(QueryerContext).QueryContext", Method, 8, ""}, + {"(Result).LastInsertId", Method, 0, ""}, + {"(Result).RowsAffected", Method, 0, ""}, + {"(Rows).Close", Method, 0, ""}, + {"(Rows).Columns", Method, 0, ""}, + {"(Rows).Next", Method, 0, ""}, {"(RowsAffected).LastInsertId", Method, 0, ""}, {"(RowsAffected).RowsAffected", Method, 0, ""}, + {"(RowsColumnTypeDatabaseTypeName).Close", Method, 8, ""}, + {"(RowsColumnTypeDatabaseTypeName).ColumnTypeDatabaseTypeName", Method, 8, ""}, + {"(RowsColumnTypeDatabaseTypeName).Columns", Method, 8, ""}, + {"(RowsColumnTypeDatabaseTypeName).Next", Method, 8, ""}, + {"(RowsColumnTypeLength).Close", Method, 8, ""}, + {"(RowsColumnTypeLength).ColumnTypeLength", Method, 8, ""}, + {"(RowsColumnTypeLength).Columns", Method, 8, ""}, + {"(RowsColumnTypeLength).Next", Method, 8, ""}, + {"(RowsColumnTypeNullable).Close", Method, 8, ""}, + {"(RowsColumnTypeNullable).ColumnTypeNullable", Method, 8, ""}, + {"(RowsColumnTypeNullable).Columns", Method, 8, ""}, + {"(RowsColumnTypeNullable).Next", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).Close", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).ColumnTypePrecisionScale", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).Columns", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).Next", Method, 8, ""}, + {"(RowsColumnTypeScanType).Close", Method, 8, ""}, + {"(RowsColumnTypeScanType).ColumnTypeScanType", Method, 8, ""}, + {"(RowsColumnTypeScanType).Columns", Method, 8, ""}, + {"(RowsColumnTypeScanType).Next", Method, 8, ""}, + {"(RowsNextResultSet).Close", Method, 8, ""}, + {"(RowsNextResultSet).Columns", Method, 8, ""}, + {"(RowsNextResultSet).HasNextResultSet", Method, 8, ""}, + {"(RowsNextResultSet).Next", Method, 8, ""}, + {"(RowsNextResultSet).NextResultSet", Method, 8, ""}, + {"(SessionResetter).ResetSession", Method, 10, ""}, + {"(Stmt).Close", Method, 0, ""}, + {"(Stmt).Exec", Method, 0, ""}, + {"(Stmt).NumInput", Method, 0, ""}, + {"(Stmt).Query", Method, 0, ""}, + {"(StmtExecContext).ExecContext", Method, 8, ""}, + {"(StmtQueryContext).QueryContext", Method, 8, ""}, + {"(Tx).Commit", Method, 0, ""}, + {"(Tx).Rollback", Method, 0, ""}, + {"(Validator).IsValid", Method, 15, ""}, + {"(ValueConverter).ConvertValue", Method, 0, ""}, + {"(Valuer).Value", Method, 0, ""}, {"Bool", Var, 0, ""}, {"ColumnConverter", Type, 0, ""}, {"Conn", Type, 0, ""}, @@ -1629,7 +1815,6 @@ var PackageSymbols = map[string][]Symbol{ {"ResultNoRows", Var, 0, ""}, {"Rows", Type, 0, ""}, {"RowsAffected", Type, 0, ""}, - {"RowsColumnScanner", Type, 26, ""}, {"RowsColumnTypeDatabaseTypeName", Type, 8, ""}, {"RowsColumnTypeLength", Type, 8, ""}, {"RowsColumnTypeNullable", Type, 8, ""}, @@ -1756,6 +1941,9 @@ var PackageSymbols = map[string][]Symbol{ {"(DecodeError).Error", Method, 0, ""}, {"(Tag).GoString", Method, 0, ""}, {"(Tag).String", Method, 0, ""}, + {"(Type).Common", Method, 0, ""}, + {"(Type).Size", Method, 0, ""}, + {"(Type).String", Method, 0, ""}, {"AddrType", Type, 0, ""}, {"AddrType.BasicType", Field, 0, ""}, {"ArrayType", Type, 0, ""}, @@ -3163,6 +3351,7 @@ var PackageSymbols = map[string][]Symbol{ {"R_LARCH_B16", Const, 20, ""}, {"R_LARCH_B21", Const, 20, ""}, {"R_LARCH_B26", Const, 20, ""}, + {"R_LARCH_CALL36", Const, 26, ""}, {"R_LARCH_CFA", Const, 22, ""}, {"R_LARCH_COPY", Const, 19, ""}, {"R_LARCH_DELETE", Const, 22, ""}, @@ -3220,11 +3409,25 @@ var PackageSymbols = map[string][]Symbol{ {"R_LARCH_SUB64", Const, 19, ""}, {"R_LARCH_SUB8", Const, 19, ""}, {"R_LARCH_SUB_ULEB128", Const, 22, ""}, + {"R_LARCH_TLS_DESC32", Const, 26, ""}, + {"R_LARCH_TLS_DESC64", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_HI12", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_LO20", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_PC_HI12", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_PC_LO20", Const, 26, ""}, + {"R_LARCH_TLS_DESC_CALL", Const, 26, ""}, + {"R_LARCH_TLS_DESC_HI20", Const, 26, ""}, + {"R_LARCH_TLS_DESC_LD", Const, 26, ""}, + {"R_LARCH_TLS_DESC_LO12", Const, 26, ""}, + {"R_LARCH_TLS_DESC_PCREL20_S2", Const, 26, ""}, + {"R_LARCH_TLS_DESC_PC_HI20", Const, 26, ""}, + {"R_LARCH_TLS_DESC_PC_LO12", Const, 26, ""}, {"R_LARCH_TLS_DTPMOD32", Const, 19, ""}, {"R_LARCH_TLS_DTPMOD64", Const, 19, ""}, {"R_LARCH_TLS_DTPREL32", Const, 19, ""}, {"R_LARCH_TLS_DTPREL64", Const, 19, ""}, {"R_LARCH_TLS_GD_HI20", Const, 20, ""}, + {"R_LARCH_TLS_GD_PCREL20_S2", Const, 26, ""}, {"R_LARCH_TLS_GD_PC_HI20", Const, 20, ""}, {"R_LARCH_TLS_IE64_HI12", Const, 20, ""}, {"R_LARCH_TLS_IE64_LO20", Const, 20, ""}, @@ -3235,11 +3438,15 @@ var PackageSymbols = map[string][]Symbol{ {"R_LARCH_TLS_IE_PC_HI20", Const, 20, ""}, {"R_LARCH_TLS_IE_PC_LO12", Const, 20, ""}, {"R_LARCH_TLS_LD_HI20", Const, 20, ""}, + {"R_LARCH_TLS_LD_PCREL20_S2", Const, 26, ""}, {"R_LARCH_TLS_LD_PC_HI20", Const, 20, ""}, {"R_LARCH_TLS_LE64_HI12", Const, 20, ""}, {"R_LARCH_TLS_LE64_LO20", Const, 20, ""}, + {"R_LARCH_TLS_LE_ADD_R", Const, 26, ""}, {"R_LARCH_TLS_LE_HI20", Const, 20, ""}, + {"R_LARCH_TLS_LE_HI20_R", Const, 26, ""}, {"R_LARCH_TLS_LE_LO12", Const, 20, ""}, + {"R_LARCH_TLS_LE_LO12_R", Const, 26, ""}, {"R_LARCH_TLS_TPREL32", Const, 19, ""}, {"R_LARCH_TLS_TPREL64", Const, 19, ""}, {"R_MIPS", Type, 6, ""}, @@ -3944,6 +4151,7 @@ var PackageSymbols = map[string][]Symbol{ {"(FatArch).ImportedSymbols", Method, 3, ""}, {"(FatArch).Section", Method, 3, ""}, {"(FatArch).Segment", Method, 3, ""}, + {"(Load).Raw", Method, 0, ""}, {"(LoadBytes).Raw", Method, 0, ""}, {"(LoadCmd).GoString", Method, 0, ""}, {"(LoadCmd).String", Method, 0, ""}, @@ -4590,6 +4798,12 @@ var PackageSymbols = map[string][]Symbol{ {"FS", Type, 16, ""}, }, "encoding": { + {"(BinaryAppender).AppendBinary", Method, 24, ""}, + {"(BinaryMarshaler).MarshalBinary", Method, 2, ""}, + {"(BinaryUnmarshaler).UnmarshalBinary", Method, 2, ""}, + {"(TextAppender).AppendText", Method, 24, ""}, + {"(TextMarshaler).MarshalText", Method, 2, ""}, + {"(TextUnmarshaler).UnmarshalText", Method, 2, ""}, {"BinaryAppender", Type, 24, ""}, {"BinaryMarshaler", Type, 2, ""}, {"BinaryUnmarshaler", Type, 2, ""}, @@ -4705,6 +4919,17 @@ var PackageSymbols = map[string][]Symbol{ {"URLEncoding", Var, 0, ""}, }, "encoding/binary": { + {"(AppendByteOrder).AppendUint16", Method, 19, ""}, + {"(AppendByteOrder).AppendUint32", Method, 19, ""}, + {"(AppendByteOrder).AppendUint64", Method, 19, ""}, + {"(AppendByteOrder).String", Method, 19, ""}, + {"(ByteOrder).PutUint16", Method, 0, ""}, + {"(ByteOrder).PutUint32", Method, 0, ""}, + {"(ByteOrder).PutUint64", Method, 0, ""}, + {"(ByteOrder).String", Method, 0, ""}, + {"(ByteOrder).Uint16", Method, 0, ""}, + {"(ByteOrder).Uint32", Method, 0, ""}, + {"(ByteOrder).Uint64", Method, 0, ""}, {"Append", Func, 23, "func(buf []byte, order ByteOrder, data any) ([]byte, error)"}, {"AppendByteOrder", Type, 19, ""}, {"AppendUvarint", Func, 19, "func(buf []byte, x uint64) []byte"}, @@ -4767,6 +4992,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*Decoder).DecodeValue", Method, 0, ""}, {"(*Encoder).Encode", Method, 0, ""}, {"(*Encoder).EncodeValue", Method, 0, ""}, + {"(GobDecoder).GobDecode", Method, 0, ""}, + {"(GobEncoder).GobEncode", Method, 0, ""}, {"CommonType", Type, 0, ""}, {"CommonType.Id", Field, 0, ""}, {"CommonType.Name", Field, 0, ""}, @@ -4819,10 +5046,12 @@ var PackageSymbols = map[string][]Symbol{ {"(*UnsupportedTypeError).Error", Method, 0, ""}, {"(*UnsupportedValueError).Error", Method, 0, ""}, {"(Delim).String", Method, 5, ""}, + {"(Marshaler).MarshalJSON", Method, 0, ""}, {"(Number).Float64", Method, 1, ""}, {"(Number).Int64", Method, 1, ""}, {"(Number).String", Method, 1, ""}, {"(RawMessage).MarshalJSON", Method, 8, ""}, + {"(Unmarshaler).UnmarshalJSON", Method, 0, ""}, {"Compact", Func, 0, "func(dst *bytes.Buffer, src []byte) error"}, {"Decoder", Type, 0, ""}, {"Delim", Type, 5, ""}, @@ -4894,10 +5123,15 @@ var PackageSymbols = map[string][]Symbol{ {"(CharData).Copy", Method, 0, ""}, {"(Comment).Copy", Method, 0, ""}, {"(Directive).Copy", Method, 0, ""}, + {"(Marshaler).MarshalXML", Method, 2, ""}, + {"(MarshalerAttr).MarshalXMLAttr", Method, 2, ""}, {"(ProcInst).Copy", Method, 0, ""}, {"(StartElement).Copy", Method, 0, ""}, {"(StartElement).End", Method, 2, ""}, + {"(TokenReader).Token", Method, 10, ""}, {"(UnmarshalError).Error", Method, 0, ""}, + {"(Unmarshaler).UnmarshalXML", Method, 2, ""}, + {"(UnmarshalerAttr).UnmarshalXMLAttr", Method, 2, ""}, {"Attr", Type, 0, ""}, {"Attr.Name", Field, 0, ""}, {"Attr.Value", Field, 0, ""}, @@ -4984,6 +5218,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*String).Value", Method, 8, ""}, {"(Func).String", Method, 0, ""}, {"(Func).Value", Method, 8, ""}, + {"(Var).String", Method, 0, ""}, {"Do", Func, 0, "func(f func(KeyValue))"}, {"Float", Type, 0, ""}, {"Func", Type, 0, ""}, @@ -5039,6 +5274,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*FlagSet).Var", Method, 0, ""}, {"(*FlagSet).Visit", Method, 0, ""}, {"(*FlagSet).VisitAll", Method, 0, ""}, + {"(Getter).Get", Method, 2, ""}, + {"(Getter).Set", Method, 2, ""}, + {"(Getter).String", Method, 2, ""}, + {"(Value).Set", Method, 0, ""}, + {"(Value).String", Method, 0, ""}, {"Arg", Func, 0, "func(i int) string"}, {"Args", Func, 0, "func() []string"}, {"Bool", Func, 0, "func(name string, value bool, usage string) *bool"}, @@ -5090,6 +5330,20 @@ var PackageSymbols = map[string][]Symbol{ {"VisitAll", Func, 0, "func(fn func(*Flag))"}, }, "fmt": { + {"(Formatter).Format", Method, 0, ""}, + {"(GoStringer).GoString", Method, 0, ""}, + {"(ScanState).Read", Method, 0, ""}, + {"(ScanState).ReadRune", Method, 0, ""}, + {"(ScanState).SkipSpace", Method, 0, ""}, + {"(ScanState).Token", Method, 0, ""}, + {"(ScanState).UnreadRune", Method, 0, ""}, + {"(ScanState).Width", Method, 0, ""}, + {"(Scanner).Scan", Method, 0, ""}, + {"(State).Flag", Method, 0, ""}, + {"(State).Precision", Method, 0, ""}, + {"(State).Width", Method, 0, ""}, + {"(State).Write", Method, 0, ""}, + {"(Stringer).String", Method, 0, ""}, {"Append", Func, 19, "func(b []byte, a ...any) []byte"}, {"Appendf", Func, 19, "func(b []byte, format string, a ...any) []byte"}, {"Appendln", Func, 19, "func(b []byte, a ...any) []byte"}, @@ -5248,7 +5502,18 @@ var PackageSymbols = map[string][]Symbol{ {"(CommentMap).Filter", Method, 1, ""}, {"(CommentMap).String", Method, 1, ""}, {"(CommentMap).Update", Method, 1, ""}, + {"(Decl).End", Method, 0, ""}, + {"(Decl).Pos", Method, 0, ""}, + {"(Expr).End", Method, 0, ""}, + {"(Expr).Pos", Method, 0, ""}, + {"(Node).End", Method, 0, ""}, + {"(Node).Pos", Method, 0, ""}, {"(ObjKind).String", Method, 0, ""}, + {"(Spec).End", Method, 0, ""}, + {"(Spec).Pos", Method, 0, ""}, + {"(Stmt).End", Method, 0, ""}, + {"(Stmt).Pos", Method, 0, ""}, + {"(Visitor).Visit", Method, 0, ""}, {"ArrayType", Type, 0, ""}, {"ArrayType.Elt", Field, 0, ""}, {"ArrayType.Lbrack", Field, 0, ""}, @@ -5271,6 +5536,7 @@ var PackageSymbols = map[string][]Symbol{ {"BasicLit", Type, 0, ""}, {"BasicLit.Kind", Field, 0, ""}, {"BasicLit.Value", Field, 0, ""}, + {"BasicLit.ValueEnd", Field, 26, ""}, {"BasicLit.ValuePos", Field, 0, ""}, {"BinaryExpr", Type, 0, ""}, {"BinaryExpr.Op", Field, 0, ""}, @@ -5320,7 +5586,6 @@ var PackageSymbols = map[string][]Symbol{ {"CompositeLit.Rbrace", Field, 0, ""}, {"CompositeLit.Type", Field, 0, ""}, {"Con", Const, 0, ""}, - {"Decl", Type, 0, ""}, {"DeclStmt", Type, 0, ""}, {"DeclStmt.Decl", Field, 0, ""}, {"DeferStmt", Type, 0, ""}, @@ -5341,7 +5606,6 @@ var PackageSymbols = map[string][]Symbol{ {"EmptyStmt", Type, 0, ""}, {"EmptyStmt.Implicit", Field, 5, ""}, {"EmptyStmt.Semicolon", Field, 0, ""}, - {"Expr", Type, 0, ""}, {"ExprStmt", Type, 0, ""}, {"ExprStmt.X", Field, 0, ""}, {"Field", Type, 0, ""}, @@ -5525,11 +5789,9 @@ var PackageSymbols = map[string][]Symbol{ {"SliceExpr.Slice3", Field, 2, ""}, {"SliceExpr.X", Field, 0, ""}, {"SortImports", Func, 0, "func(fset *token.FileSet, f *File)"}, - {"Spec", Type, 0, ""}, {"StarExpr", Type, 0, ""}, {"StarExpr.Star", Field, 0, ""}, {"StarExpr.X", Field, 0, ""}, - {"Stmt", Type, 0, ""}, {"StructType", Type, 0, ""}, {"StructType.Fields", Field, 0, ""}, {"StructType.Incomplete", Field, 0, ""}, @@ -5684,10 +5946,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*SyntaxError).Error", Method, 16, ""}, {"(*TagExpr).Eval", Method, 16, ""}, {"(*TagExpr).String", Method, 16, ""}, + {"(Expr).Eval", Method, 16, ""}, + {"(Expr).String", Method, 16, ""}, {"AndExpr", Type, 16, ""}, {"AndExpr.X", Field, 16, ""}, {"AndExpr.Y", Field, 16, ""}, - {"Expr", Type, 16, ""}, {"GoVersion", Func, 21, "func(x Expr) string"}, {"IsGoBuild", Func, 16, "func(line string) bool"}, {"IsPlusBuild", Func, 16, "func(line string) bool"}, @@ -5706,6 +5969,9 @@ var PackageSymbols = map[string][]Symbol{ }, "go/constant": { {"(Kind).String", Method, 18, ""}, + {"(Value).ExactString", Method, 6, ""}, + {"(Value).Kind", Method, 5, ""}, + {"(Value).String", Method, 5, ""}, {"BinaryOp", Func, 5, "func(x_ Value, op token.Token, y_ Value) Value"}, {"BitLen", Func, 5, "func(x Value) int"}, {"Bool", Const, 5, ""}, @@ -5744,7 +6010,6 @@ var PackageSymbols = map[string][]Symbol{ {"UnaryOp", Func, 5, "func(op token.Token, y Value, prec uint) Value"}, {"Unknown", Const, 5, ""}, {"Val", Func, 13, "func(x Value) any"}, - {"Value", Type, 5, ""}, }, "go/doc": { {"(*Package).Filter", Method, 0, ""}, @@ -5828,7 +6093,6 @@ var PackageSymbols = map[string][]Symbol{ {"(*Printer).HTML", Method, 19, ""}, {"(*Printer).Markdown", Method, 19, ""}, {"(*Printer).Text", Method, 19, ""}, - {"Block", Type, 19, ""}, {"Code", Type, 19, ""}, {"Code.Text", Field, 19, ""}, {"DefaultLookupPackage", Func, 19, "func(name string) (importPath string, ok bool)"}, @@ -5873,7 +6137,6 @@ var PackageSymbols = map[string][]Symbol{ {"Printer.TextCodePrefix", Field, 19, ""}, {"Printer.TextPrefix", Field, 19, ""}, {"Printer.TextWidth", Field, 19, ""}, - {"Text", Type, 19, ""}, }, "go/format": { {"Node", Func, 1, "func(dst io.Writer, fset *token.FileSet, node any) error"}, @@ -5945,6 +6208,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*File).AddLineColumnInfo", Method, 11, ""}, {"(*File).AddLineInfo", Method, 0, ""}, {"(*File).Base", Method, 0, ""}, + {"(*File).End", Method, 26, ""}, {"(*File).Line", Method, 0, ""}, {"(*File).LineCount", Method, 0, ""}, {"(*File).LineStart", Method, 12, ""}, @@ -6307,6 +6571,22 @@ var PackageSymbols = map[string][]Symbol{ {"(Checker).PkgNameOf", Method, 22, ""}, {"(Checker).TypeOf", Method, 5, ""}, {"(Error).Error", Method, 5, ""}, + {"(Importer).Import", Method, 5, ""}, + {"(ImporterFrom).Import", Method, 6, ""}, + {"(ImporterFrom).ImportFrom", Method, 6, ""}, + {"(Object).Exported", Method, 5, ""}, + {"(Object).Id", Method, 5, ""}, + {"(Object).Name", Method, 5, ""}, + {"(Object).Parent", Method, 5, ""}, + {"(Object).Pkg", Method, 5, ""}, + {"(Object).Pos", Method, 5, ""}, + {"(Object).String", Method, 5, ""}, + {"(Object).Type", Method, 5, ""}, + {"(Sizes).Alignof", Method, 5, ""}, + {"(Sizes).Offsetsof", Method, 5, ""}, + {"(Sizes).Sizeof", Method, 5, ""}, + {"(Type).String", Method, 5, ""}, + {"(Type).Underlying", Method, 5, ""}, {"(TypeAndValue).Addressable", Method, 5, ""}, {"(TypeAndValue).Assignable", Method, 5, ""}, {"(TypeAndValue).HasOk", Method, 5, ""}, @@ -6445,7 +6725,6 @@ var PackageSymbols = map[string][]Symbol{ {"NewUnion", Func, 18, "func(terms []*Term) *Union"}, {"NewVar", Func, 5, "func(pos token.Pos, pkg *Package, name string, typ Type) *Var"}, {"Nil", Type, 5, ""}, - {"Object", Type, 5, ""}, {"ObjectString", Func, 5, "func(obj Object, qf Qualifier) string"}, {"Package", Type, 5, ""}, {"PackageVar", Const, 25, ""}, @@ -6516,6 +6795,33 @@ var PackageSymbols = map[string][]Symbol{ {"Lang", Func, 22, "func(x string) string"}, }, "hash": { + {"(Cloner).BlockSize", Method, 25, ""}, + {"(Cloner).Clone", Method, 25, ""}, + {"(Cloner).Reset", Method, 25, ""}, + {"(Cloner).Size", Method, 25, ""}, + {"(Cloner).Sum", Method, 25, ""}, + {"(Cloner).Write", Method, 25, ""}, + {"(Hash).BlockSize", Method, 0, ""}, + {"(Hash).Reset", Method, 0, ""}, + {"(Hash).Size", Method, 0, ""}, + {"(Hash).Sum", Method, 0, ""}, + {"(Hash).Write", Method, 0, ""}, + {"(Hash32).BlockSize", Method, 0, ""}, + {"(Hash32).Reset", Method, 0, ""}, + {"(Hash32).Size", Method, 0, ""}, + {"(Hash32).Sum", Method, 0, ""}, + {"(Hash32).Sum32", Method, 0, ""}, + {"(Hash32).Write", Method, 0, ""}, + {"(Hash64).BlockSize", Method, 0, ""}, + {"(Hash64).Reset", Method, 0, ""}, + {"(Hash64).Size", Method, 0, ""}, + {"(Hash64).Sum", Method, 0, ""}, + {"(Hash64).Sum64", Method, 0, ""}, + {"(Hash64).Write", Method, 0, ""}, + {"(XOF).BlockSize", Method, 25, ""}, + {"(XOF).Read", Method, 25, ""}, + {"(XOF).Reset", Method, 25, ""}, + {"(XOF).Write", Method, 25, ""}, {"Cloner", Type, 25, ""}, {"Hash", Type, 0, ""}, {"Hash32", Type, 0, ""}, @@ -6781,6 +7087,13 @@ var PackageSymbols = map[string][]Symbol{ {"(*YCbCr).SubImage", Method, 0, ""}, {"(*YCbCr).YCbCrAt", Method, 4, ""}, {"(*YCbCr).YOffset", Method, 0, ""}, + {"(Image).At", Method, 0, ""}, + {"(Image).Bounds", Method, 0, ""}, + {"(Image).ColorModel", Method, 0, ""}, + {"(PalettedImage).At", Method, 0, ""}, + {"(PalettedImage).Bounds", Method, 0, ""}, + {"(PalettedImage).ColorIndexAt", Method, 0, ""}, + {"(PalettedImage).ColorModel", Method, 0, ""}, {"(Point).Add", Method, 0, ""}, {"(Point).Div", Method, 0, ""}, {"(Point).Eq", Method, 0, ""}, @@ -6789,6 +7102,10 @@ var PackageSymbols = map[string][]Symbol{ {"(Point).Mul", Method, 0, ""}, {"(Point).String", Method, 0, ""}, {"(Point).Sub", Method, 0, ""}, + {"(RGBA64Image).At", Method, 17, ""}, + {"(RGBA64Image).Bounds", Method, 17, ""}, + {"(RGBA64Image).ColorModel", Method, 17, ""}, + {"(RGBA64Image).RGBA64At", Method, 17, ""}, {"(Rectangle).Add", Method, 0, ""}, {"(Rectangle).At", Method, 5, ""}, {"(Rectangle).Bounds", Method, 5, ""}, @@ -6913,8 +7230,10 @@ var PackageSymbols = map[string][]Symbol{ {"(Alpha).RGBA", Method, 0, ""}, {"(Alpha16).RGBA", Method, 0, ""}, {"(CMYK).RGBA", Method, 5, ""}, + {"(Color).RGBA", Method, 0, ""}, {"(Gray).RGBA", Method, 0, ""}, {"(Gray16).RGBA", Method, 0, ""}, + {"(Model).Convert", Method, 0, ""}, {"(NRGBA).RGBA", Method, 0, ""}, {"(NRGBA64).RGBA", Method, 0, ""}, {"(NYCbCrA).RGBA", Method, 6, ""}, @@ -6992,7 +7311,19 @@ var PackageSymbols = map[string][]Symbol{ {"WebSafe", Var, 2, ""}, }, "image/draw": { + {"(Drawer).Draw", Method, 2, ""}, + {"(Image).At", Method, 0, ""}, + {"(Image).Bounds", Method, 0, ""}, + {"(Image).ColorModel", Method, 0, ""}, + {"(Image).Set", Method, 0, ""}, {"(Op).Draw", Method, 2, ""}, + {"(Quantizer).Quantize", Method, 2, ""}, + {"(RGBA64Image).At", Method, 17, ""}, + {"(RGBA64Image).Bounds", Method, 17, ""}, + {"(RGBA64Image).ColorModel", Method, 17, ""}, + {"(RGBA64Image).RGBA64At", Method, 17, ""}, + {"(RGBA64Image).Set", Method, 17, ""}, + {"(RGBA64Image).SetRGBA64", Method, 17, ""}, {"Draw", Func, 0, "func(dst Image, r image.Rectangle, src image.Image, sp image.Point, op Op)"}, {"DrawMask", Func, 0, "func(dst Image, r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op Op)"}, {"Drawer", Type, 2, ""}, @@ -7027,6 +7358,8 @@ var PackageSymbols = map[string][]Symbol{ }, "image/jpeg": { {"(FormatError).Error", Method, 0, ""}, + {"(Reader).Read", Method, 0, ""}, + {"(Reader).ReadByte", Method, 0, ""}, {"(UnsupportedError).Error", Method, 0, ""}, {"Decode", Func, 0, "func(r io.Reader) (image.Image, error)"}, {"DecodeConfig", Func, 0, "func(r io.Reader) (image.Config, error)"}, @@ -7040,6 +7373,8 @@ var PackageSymbols = map[string][]Symbol{ }, "image/png": { {"(*Encoder).Encode", Method, 4, ""}, + {"(EncoderBufferPool).Get", Method, 9, ""}, + {"(EncoderBufferPool).Put", Method, 9, ""}, {"(FormatError).Error", Method, 0, ""}, {"(UnsupportedError).Error", Method, 0, ""}, {"BestCompression", Const, 4, ""}, @@ -7083,6 +7418,41 @@ var PackageSymbols = map[string][]Symbol{ {"(*SectionReader).ReadAt", Method, 0, ""}, {"(*SectionReader).Seek", Method, 0, ""}, {"(*SectionReader).Size", Method, 0, ""}, + {"(ByteReader).ReadByte", Method, 0, ""}, + {"(ByteScanner).ReadByte", Method, 0, ""}, + {"(ByteScanner).UnreadByte", Method, 0, ""}, + {"(ByteWriter).WriteByte", Method, 1, ""}, + {"(Closer).Close", Method, 0, ""}, + {"(ReadCloser).Close", Method, 0, ""}, + {"(ReadCloser).Read", Method, 0, ""}, + {"(ReadSeekCloser).Close", Method, 16, ""}, + {"(ReadSeekCloser).Read", Method, 16, ""}, + {"(ReadSeekCloser).Seek", Method, 16, ""}, + {"(ReadSeeker).Read", Method, 0, ""}, + {"(ReadSeeker).Seek", Method, 0, ""}, + {"(ReadWriteCloser).Close", Method, 0, ""}, + {"(ReadWriteCloser).Read", Method, 0, ""}, + {"(ReadWriteCloser).Write", Method, 0, ""}, + {"(ReadWriteSeeker).Read", Method, 0, ""}, + {"(ReadWriteSeeker).Seek", Method, 0, ""}, + {"(ReadWriteSeeker).Write", Method, 0, ""}, + {"(ReadWriter).Read", Method, 0, ""}, + {"(ReadWriter).Write", Method, 0, ""}, + {"(Reader).Read", Method, 0, ""}, + {"(ReaderAt).ReadAt", Method, 0, ""}, + {"(ReaderFrom).ReadFrom", Method, 0, ""}, + {"(RuneReader).ReadRune", Method, 0, ""}, + {"(RuneScanner).ReadRune", Method, 0, ""}, + {"(RuneScanner).UnreadRune", Method, 0, ""}, + {"(Seeker).Seek", Method, 0, ""}, + {"(StringWriter).WriteString", Method, 12, ""}, + {"(WriteCloser).Close", Method, 0, ""}, + {"(WriteCloser).Write", Method, 0, ""}, + {"(WriteSeeker).Seek", Method, 0, ""}, + {"(WriteSeeker).Write", Method, 0, ""}, + {"(Writer).Write", Method, 0, ""}, + {"(WriterAt).WriteAt", Method, 0, ""}, + {"(WriterTo).WriteTo", Method, 0, ""}, {"ByteReader", Type, 0, ""}, {"ByteScanner", Type, 0, ""}, {"ByteWriter", Type, 1, ""}, @@ -7142,11 +7512,42 @@ var PackageSymbols = map[string][]Symbol{ {"(*PathError).Error", Method, 16, ""}, {"(*PathError).Timeout", Method, 16, ""}, {"(*PathError).Unwrap", Method, 16, ""}, + {"(DirEntry).Info", Method, 16, ""}, + {"(DirEntry).IsDir", Method, 16, ""}, + {"(DirEntry).Name", Method, 16, ""}, + {"(DirEntry).Type", Method, 16, ""}, + {"(FS).Open", Method, 16, ""}, + {"(File).Close", Method, 16, ""}, + {"(File).Read", Method, 16, ""}, + {"(File).Stat", Method, 16, ""}, + {"(FileInfo).IsDir", Method, 16, ""}, + {"(FileInfo).ModTime", Method, 16, ""}, + {"(FileInfo).Mode", Method, 16, ""}, + {"(FileInfo).Name", Method, 16, ""}, + {"(FileInfo).Size", Method, 16, ""}, + {"(FileInfo).Sys", Method, 16, ""}, {"(FileMode).IsDir", Method, 16, ""}, {"(FileMode).IsRegular", Method, 16, ""}, {"(FileMode).Perm", Method, 16, ""}, {"(FileMode).String", Method, 16, ""}, {"(FileMode).Type", Method, 16, ""}, + {"(GlobFS).Glob", Method, 16, ""}, + {"(GlobFS).Open", Method, 16, ""}, + {"(ReadDirFS).Open", Method, 16, ""}, + {"(ReadDirFS).ReadDir", Method, 16, ""}, + {"(ReadDirFile).Close", Method, 16, ""}, + {"(ReadDirFile).Read", Method, 16, ""}, + {"(ReadDirFile).ReadDir", Method, 16, ""}, + {"(ReadDirFile).Stat", Method, 16, ""}, + {"(ReadFileFS).Open", Method, 16, ""}, + {"(ReadFileFS).ReadFile", Method, 16, ""}, + {"(ReadLinkFS).Lstat", Method, 25, ""}, + {"(ReadLinkFS).Open", Method, 25, ""}, + {"(ReadLinkFS).ReadLink", Method, 25, ""}, + {"(StatFS).Open", Method, 16, ""}, + {"(StatFS).Stat", Method, 16, ""}, + {"(SubFS).Open", Method, 16, ""}, + {"(SubFS).Sub", Method, 16, ""}, {"DirEntry", Type, 16, ""}, {"ErrClosed", Var, 16, ""}, {"ErrExist", Var, 16, ""}, @@ -7299,12 +7700,18 @@ var PackageSymbols = map[string][]Symbol{ {"(*TextHandler).WithGroup", Method, 21, ""}, {"(Attr).Equal", Method, 21, ""}, {"(Attr).String", Method, 21, ""}, + {"(Handler).Enabled", Method, 21, ""}, + {"(Handler).Handle", Method, 21, ""}, + {"(Handler).WithAttrs", Method, 21, ""}, + {"(Handler).WithGroup", Method, 21, ""}, {"(Kind).String", Method, 21, ""}, {"(Level).AppendText", Method, 24, ""}, {"(Level).Level", Method, 21, ""}, {"(Level).MarshalJSON", Method, 21, ""}, {"(Level).MarshalText", Method, 21, ""}, {"(Level).String", Method, 21, ""}, + {"(Leveler).Level", Method, 21, ""}, + {"(LogValuer).LogValue", Method, 21, ""}, {"(Record).Attrs", Method, 21, ""}, {"(Record).Clone", Method, 21, ""}, {"(Record).NumAttrs", Method, 21, ""}, @@ -7833,6 +8240,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*Rand).Uint32", Method, 0, ""}, {"(*Rand).Uint64", Method, 8, ""}, {"(*Zipf).Uint64", Method, 0, ""}, + {"(Source).Int63", Method, 0, ""}, + {"(Source).Seed", Method, 0, ""}, + {"(Source64).Int63", Method, 8, ""}, + {"(Source64).Seed", Method, 8, ""}, + {"(Source64).Uint64", Method, 8, ""}, {"ExpFloat64", Func, 0, "func() float64"}, {"Float32", Func, 0, "func() float32"}, {"Float64", Func, 0, "func() float64"}, @@ -7888,6 +8300,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Rand).Uint64N", Method, 22, ""}, {"(*Rand).UintN", Method, 22, ""}, {"(*Zipf).Uint64", Method, 22, ""}, + {"(Source).Uint64", Method, 22, ""}, {"ChaCha8", Type, 22, ""}, {"ExpFloat64", Func, 22, "func() float64"}, {"Float32", Func, 22, "func() float32"}, @@ -7951,6 +8364,10 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).FormDataContentType", Method, 0, ""}, {"(*Writer).SetBoundary", Method, 1, ""}, {"(*Writer).WriteField", Method, 0, ""}, + {"(File).Close", Method, 0, ""}, + {"(File).Read", Method, 0, ""}, + {"(File).ReadAt", Method, 0, ""}, + {"(File).Seek", Method, 0, ""}, {"ErrMessageTooLarge", Var, 9, ""}, {"File", Type, 0, ""}, {"FileContentDisposition", Func, 25, "func(fieldname string, filename string) string"}, @@ -8135,6 +8552,19 @@ var PackageSymbols = map[string][]Symbol{ {"(*UnixListener).SetDeadline", Method, 0, ""}, {"(*UnixListener).SetUnlinkOnClose", Method, 8, ""}, {"(*UnixListener).SyscallConn", Method, 10, ""}, + {"(Addr).Network", Method, 0, ""}, + {"(Addr).String", Method, 0, ""}, + {"(Conn).Close", Method, 0, ""}, + {"(Conn).LocalAddr", Method, 0, ""}, + {"(Conn).Read", Method, 0, ""}, + {"(Conn).RemoteAddr", Method, 0, ""}, + {"(Conn).SetDeadline", Method, 0, ""}, + {"(Conn).SetReadDeadline", Method, 0, ""}, + {"(Conn).SetWriteDeadline", Method, 0, ""}, + {"(Conn).Write", Method, 0, ""}, + {"(Error).Error", Method, 0, ""}, + {"(Error).Temporary", Method, 0, ""}, + {"(Error).Timeout", Method, 0, ""}, {"(Flags).String", Method, 0, ""}, {"(HardwareAddr).String", Method, 0, ""}, {"(IP).AppendText", Method, 24, ""}, @@ -8158,6 +8588,16 @@ var PackageSymbols = map[string][]Symbol{ {"(InvalidAddrError).Error", Method, 0, ""}, {"(InvalidAddrError).Temporary", Method, 0, ""}, {"(InvalidAddrError).Timeout", Method, 0, ""}, + {"(Listener).Accept", Method, 0, ""}, + {"(Listener).Addr", Method, 0, ""}, + {"(Listener).Close", Method, 0, ""}, + {"(PacketConn).Close", Method, 0, ""}, + {"(PacketConn).LocalAddr", Method, 0, ""}, + {"(PacketConn).ReadFrom", Method, 0, ""}, + {"(PacketConn).SetDeadline", Method, 0, ""}, + {"(PacketConn).SetReadDeadline", Method, 0, ""}, + {"(PacketConn).SetWriteDeadline", Method, 0, ""}, + {"(PacketConn).WriteTo", Method, 0, ""}, {"(UnknownNetworkError).Error", Method, 0, ""}, {"(UnknownNetworkError).Temporary", Method, 0, ""}, {"(UnknownNetworkError).Timeout", Method, 0, ""}, @@ -8333,6 +8773,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Client).Head", Method, 0, ""}, {"(*Client).Post", Method, 0, ""}, {"(*Client).PostForm", Method, 0, ""}, + {"(*ClientConn).Available", Method, 26, ""}, + {"(*ClientConn).Close", Method, 26, ""}, + {"(*ClientConn).Err", Method, 26, ""}, + {"(*ClientConn).InFlight", Method, 26, ""}, + {"(*ClientConn).Release", Method, 26, ""}, + {"(*ClientConn).Reserve", Method, 26, ""}, + {"(*ClientConn).RoundTrip", Method, 26, ""}, + {"(*ClientConn).SetStateHook", Method, 26, ""}, {"(*Cookie).String", Method, 0, ""}, {"(*Cookie).Valid", Method, 18, ""}, {"(*CrossOriginProtection).AddInsecureBypassPattern", Method, 25, ""}, @@ -8392,10 +8840,22 @@ var PackageSymbols = map[string][]Symbol{ {"(*Transport).CancelRequest", Method, 1, ""}, {"(*Transport).Clone", Method, 13, ""}, {"(*Transport).CloseIdleConnections", Method, 0, ""}, + {"(*Transport).NewClientConn", Method, 26, ""}, {"(*Transport).RegisterProtocol", Method, 0, ""}, {"(*Transport).RoundTrip", Method, 0, ""}, + {"(CloseNotifier).CloseNotify", Method, 1, ""}, {"(ConnState).String", Method, 3, ""}, + {"(CookieJar).Cookies", Method, 0, ""}, + {"(CookieJar).SetCookies", Method, 0, ""}, {"(Dir).Open", Method, 0, ""}, + {"(File).Close", Method, 0, ""}, + {"(File).Read", Method, 0, ""}, + {"(File).Readdir", Method, 0, ""}, + {"(File).Seek", Method, 0, ""}, + {"(File).Stat", Method, 0, ""}, + {"(FileSystem).Open", Method, 0, ""}, + {"(Flusher).Flush", Method, 0, ""}, + {"(Handler).ServeHTTP", Method, 0, ""}, {"(HandlerFunc).ServeHTTP", Method, 0, ""}, {"(Header).Add", Method, 0, ""}, {"(Header).Clone", Method, 13, ""}, @@ -8405,10 +8865,16 @@ var PackageSymbols = map[string][]Symbol{ {"(Header).Values", Method, 14, ""}, {"(Header).Write", Method, 0, ""}, {"(Header).WriteSubset", Method, 0, ""}, + {"(Hijacker).Hijack", Method, 0, ""}, {"(Protocols).HTTP1", Method, 24, ""}, {"(Protocols).HTTP2", Method, 24, ""}, {"(Protocols).String", Method, 24, ""}, {"(Protocols).UnencryptedHTTP2", Method, 24, ""}, + {"(Pusher).Push", Method, 8, ""}, + {"(ResponseWriter).Header", Method, 0, ""}, + {"(ResponseWriter).Write", Method, 0, ""}, + {"(ResponseWriter).WriteHeader", Method, 0, ""}, + {"(RoundTripper).RoundTrip", Method, 0, ""}, {"AllowQuerySemicolons", Func, 17, "func(h Handler) Handler"}, {"CanonicalHeaderKey", Func, 0, "func(s string) string"}, {"Client", Type, 0, ""}, @@ -8416,6 +8882,7 @@ var PackageSymbols = map[string][]Symbol{ {"Client.Jar", Field, 0, ""}, {"Client.Timeout", Field, 3, ""}, {"Client.Transport", Field, 0, ""}, + {"ClientConn", Type, 26, ""}, {"CloseNotifier", Type, 1, ""}, {"ConnState", Type, 3, ""}, {"Cookie", Type, 0, ""}, @@ -8726,6 +9193,8 @@ var PackageSymbols = map[string][]Symbol{ "net/http/cookiejar": { {"(*Jar).Cookies", Method, 1, ""}, {"(*Jar).SetCookies", Method, 1, ""}, + {"(PublicSuffixList).PublicSuffix", Method, 1, ""}, + {"(PublicSuffixList).String", Method, 1, ""}, {"Jar", Type, 1, ""}, {"New", Func, 1, "func(o *Options) (*Jar, error)"}, {"Options", Type, 1, ""}, @@ -8819,6 +9288,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*ServerConn).Pending", Method, 0, ""}, {"(*ServerConn).Read", Method, 0, ""}, {"(*ServerConn).Write", Method, 0, ""}, + {"(BufferPool).Get", Method, 6, ""}, + {"(BufferPool).Put", Method, 6, ""}, {"BufferPool", Type, 6, ""}, {"ClientConn", Type, 0, ""}, {"DumpRequest", Func, 0, "func(req *http.Request, body bool) ([]byte, error)"}, @@ -8972,6 +9443,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Server).ServeConn", Method, 0, ""}, {"(*Server).ServeHTTP", Method, 0, ""}, {"(*Server).ServeRequest", Method, 0, ""}, + {"(ClientCodec).Close", Method, 0, ""}, + {"(ClientCodec).ReadResponseBody", Method, 0, ""}, + {"(ClientCodec).ReadResponseHeader", Method, 0, ""}, + {"(ClientCodec).WriteRequest", Method, 0, ""}, + {"(ServerCodec).Close", Method, 0, ""}, + {"(ServerCodec).ReadRequestBody", Method, 0, ""}, + {"(ServerCodec).ReadRequestHeader", Method, 0, ""}, + {"(ServerCodec).WriteResponse", Method, 0, ""}, {"(ServerError).Error", Method, 0, ""}, {"Accept", Func, 0, "func(lis net.Listener)"}, {"Call", Type, 0, ""}, @@ -9030,6 +9509,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*Client).StartTLS", Method, 0, ""}, {"(*Client).TLSConnectionState", Method, 5, ""}, {"(*Client).Verify", Method, 0, ""}, + {"(Auth).Next", Method, 0, ""}, + {"(Auth).Start", Method, 0, ""}, {"Auth", Type, 0, ""}, {"CRAMMD5Auth", Func, 0, "func(username string, secret string) Auth"}, {"Client", Type, 0, ""}, @@ -9241,10 +9722,18 @@ var PackageSymbols = map[string][]Symbol{ {"(*SyscallError).Error", Method, 0, ""}, {"(*SyscallError).Timeout", Method, 10, ""}, {"(*SyscallError).Unwrap", Method, 13, ""}, + {"(FileInfo).IsDir", Method, 0, ""}, + {"(FileInfo).ModTime", Method, 0, ""}, + {"(FileInfo).Mode", Method, 0, ""}, + {"(FileInfo).Name", Method, 0, ""}, + {"(FileInfo).Size", Method, 0, ""}, + {"(FileInfo).Sys", Method, 0, ""}, {"(FileMode).IsDir", Method, 0, ""}, {"(FileMode).IsRegular", Method, 1, ""}, {"(FileMode).Perm", Method, 0, ""}, {"(FileMode).String", Method, 0, ""}, + {"(Signal).Signal", Method, 0, ""}, + {"(Signal).String", Method, 0, ""}, {"Args", Var, 0, ""}, {"Chdir", Func, 0, "func(dir string) error"}, {"Chmod", Func, 0, "func(name string, mode FileMode) error"}, @@ -9521,6 +10010,45 @@ var PackageSymbols = map[string][]Symbol{ {"(StructField).IsExported", Method, 17, ""}, {"(StructTag).Get", Method, 0, ""}, {"(StructTag).Lookup", Method, 7, ""}, + {"(Type).Align", Method, 0, ""}, + {"(Type).AssignableTo", Method, 0, ""}, + {"(Type).Bits", Method, 0, ""}, + {"(Type).CanSeq", Method, 23, ""}, + {"(Type).CanSeq2", Method, 23, ""}, + {"(Type).ChanDir", Method, 0, ""}, + {"(Type).Comparable", Method, 4, ""}, + {"(Type).ConvertibleTo", Method, 1, ""}, + {"(Type).Elem", Method, 0, ""}, + {"(Type).Field", Method, 0, ""}, + {"(Type).FieldAlign", Method, 0, ""}, + {"(Type).FieldByIndex", Method, 0, ""}, + {"(Type).FieldByName", Method, 0, ""}, + {"(Type).FieldByNameFunc", Method, 0, ""}, + {"(Type).Fields", Method, 26, ""}, + {"(Type).Implements", Method, 0, ""}, + {"(Type).In", Method, 0, ""}, + {"(Type).Ins", Method, 26, ""}, + {"(Type).IsVariadic", Method, 0, ""}, + {"(Type).Key", Method, 0, ""}, + {"(Type).Kind", Method, 0, ""}, + {"(Type).Len", Method, 0, ""}, + {"(Type).Method", Method, 0, ""}, + {"(Type).MethodByName", Method, 0, ""}, + {"(Type).Methods", Method, 26, ""}, + {"(Type).Name", Method, 0, ""}, + {"(Type).NumField", Method, 0, ""}, + {"(Type).NumIn", Method, 0, ""}, + {"(Type).NumMethod", Method, 0, ""}, + {"(Type).NumOut", Method, 0, ""}, + {"(Type).Out", Method, 0, ""}, + {"(Type).Outs", Method, 26, ""}, + {"(Type).OverflowComplex", Method, 23, ""}, + {"(Type).OverflowFloat", Method, 23, ""}, + {"(Type).OverflowInt", Method, 23, ""}, + {"(Type).OverflowUint", Method, 23, ""}, + {"(Type).PkgPath", Method, 0, ""}, + {"(Type).Size", Method, 0, ""}, + {"(Type).String", Method, 0, ""}, {"(Value).Addr", Method, 0, ""}, {"(Value).Bool", Method, 0, ""}, {"(Value).Bytes", Method, 0, ""}, @@ -9547,6 +10075,7 @@ var PackageSymbols = map[string][]Symbol{ {"(Value).FieldByIndexErr", Method, 18, ""}, {"(Value).FieldByName", Method, 0, ""}, {"(Value).FieldByNameFunc", Method, 0, ""}, + {"(Value).Fields", Method, 26, ""}, {"(Value).Float", Method, 0, ""}, {"(Value).Grow", Method, 20, ""}, {"(Value).Index", Method, 0, ""}, @@ -9563,6 +10092,7 @@ var PackageSymbols = map[string][]Symbol{ {"(Value).MapRange", Method, 12, ""}, {"(Value).Method", Method, 0, ""}, {"(Value).MethodByName", Method, 0, ""}, + {"(Value).Methods", Method, 26, ""}, {"(Value).NumField", Method, 0, ""}, {"(Value).NumMethod", Method, 0, ""}, {"(Value).OverflowComplex", Method, 0, ""}, @@ -9678,7 +10208,6 @@ var PackageSymbols = map[string][]Symbol{ {"StructOf", Func, 7, "func(fields []StructField) Type"}, {"StructTag", Type, 0, ""}, {"Swapper", Func, 8, "func(slice any) func(i int, j int)"}, - {"Type", Type, 0, ""}, {"TypeAssert", Func, 25, "func[T any](v Value) (T, bool)"}, {"TypeFor", Func, 22, "func[T any]() Type"}, {"TypeOf", Func, 0, "func(i any) Type"}, @@ -9880,6 +10409,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*TypeAssertionError).Error", Method, 0, ""}, {"(*TypeAssertionError).RuntimeError", Method, 0, ""}, {"(Cleanup).Stop", Method, 24, ""}, + {"(Error).Error", Method, 0, ""}, + {"(Error).RuntimeError", Method, 0, ""}, {"AddCleanup", Func, 24, "func[T, S any](ptr *T, cleanup func(S), arg S) Cleanup"}, {"BlockProfile", Func, 1, "func(p []BlockProfileRecord) (n int, ok bool)"}, {"BlockProfileRecord", Type, 1, ""}, @@ -10154,6 +10685,9 @@ var PackageSymbols = map[string][]Symbol{ {"(IntSlice).Search", Method, 0, ""}, {"(IntSlice).Sort", Method, 0, ""}, {"(IntSlice).Swap", Method, 0, ""}, + {"(Interface).Len", Method, 0, ""}, + {"(Interface).Less", Method, 0, ""}, + {"(Interface).Swap", Method, 0, ""}, {"(StringSlice).Len", Method, 0, ""}, {"(StringSlice).Less", Method, 0, ""}, {"(StringSlice).Search", Method, 0, ""}, @@ -10345,6 +10879,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*WaitGroup).Done", Method, 0, ""}, {"(*WaitGroup).Go", Method, 25, ""}, {"(*WaitGroup).Wait", Method, 0, ""}, + {"(Locker).Lock", Method, 0, ""}, + {"(Locker).Unlock", Method, 0, ""}, {"Cond", Type, 0, ""}, {"Cond.L", Field, 0, ""}, {"Locker", Type, 0, ""}, @@ -10486,10 +11022,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Timeval).Nano", Method, 0, ""}, {"(*Timeval).Nanoseconds", Method, 0, ""}, {"(*Timeval).Unix", Method, 0, ""}, + {"(Conn).SyscallConn", Method, 9, ""}, {"(Errno).Error", Method, 0, ""}, {"(Errno).Is", Method, 13, ""}, {"(Errno).Temporary", Method, 0, ""}, {"(Errno).Timeout", Method, 0, ""}, + {"(RawConn).Control", Method, 9, ""}, + {"(RawConn).Read", Method, 9, ""}, + {"(RawConn).Write", Method, 9, ""}, {"(Signal).Signal", Method, 0, ""}, {"(Signal).String", Method, 0, ""}, {"(Token).Close", Method, 0, ""}, @@ -14409,7 +14949,7 @@ var PackageSymbols = map[string][]Symbol{ {"RouteMessage.Data", Field, 0, ""}, {"RouteMessage.Header", Field, 0, ""}, {"RouteRIB", Func, 0, ""}, - {"RoutingMessage", Type, 0, ""}, + {"RoutingMessage", Type, 14, ""}, {"RtAttr", Type, 0, ""}, {"RtAttr.Len", Field, 0, ""}, {"RtAttr.Type", Field, 0, ""}, @@ -15895,7 +16435,6 @@ var PackageSymbols = map[string][]Symbol{ {"SockFprog.Filter", Field, 0, ""}, {"SockFprog.Len", Field, 0, ""}, {"SockFprog.Pad_cgo_0", Field, 0, ""}, - {"Sockaddr", Type, 0, ""}, {"SockaddrDatalink", Type, 0, ""}, {"SockaddrDatalink.Alen", Field, 0, ""}, {"SockaddrDatalink.Data", Field, 0, ""}, @@ -16801,6 +17340,29 @@ var PackageSymbols = map[string][]Symbol{ {"(BenchmarkResult).MemString", Method, 1, ""}, {"(BenchmarkResult).NsPerOp", Method, 0, ""}, {"(BenchmarkResult).String", Method, 0, ""}, + {"(TB).ArtifactDir", Method, 26, ""}, + {"(TB).Attr", Method, 25, ""}, + {"(TB).Chdir", Method, 24, ""}, + {"(TB).Cleanup", Method, 14, ""}, + {"(TB).Context", Method, 24, ""}, + {"(TB).Error", Method, 2, ""}, + {"(TB).Errorf", Method, 2, ""}, + {"(TB).Fail", Method, 2, ""}, + {"(TB).FailNow", Method, 2, ""}, + {"(TB).Failed", Method, 2, ""}, + {"(TB).Fatal", Method, 2, ""}, + {"(TB).Fatalf", Method, 2, ""}, + {"(TB).Helper", Method, 9, ""}, + {"(TB).Log", Method, 2, ""}, + {"(TB).Logf", Method, 2, ""}, + {"(TB).Name", Method, 8, ""}, + {"(TB).Output", Method, 25, ""}, + {"(TB).Setenv", Method, 17, ""}, + {"(TB).Skip", Method, 2, ""}, + {"(TB).SkipNow", Method, 2, ""}, + {"(TB).Skipf", Method, 2, ""}, + {"(TB).Skipped", Method, 2, ""}, + {"(TB).TempDir", Method, 15, ""}, {"AllocsPerRun", Func, 1, "func(runs int, f func()) (avg float64)"}, {"B", Type, 0, ""}, {"B.N", Field, 0, ""}, @@ -16851,10 +17413,12 @@ var PackageSymbols = map[string][]Symbol{ {"RunTests", Func, 0, "func(matchString func(pat string, str string) (bool, error), tests []InternalTest) (ok bool)"}, {"Short", Func, 0, "func() bool"}, {"T", Type, 0, ""}, - {"TB", Type, 2, ""}, {"Testing", Func, 21, "func() bool"}, {"Verbose", Func, 1, "func() bool"}, }, + "testing/cryptotest": { + {"SetGlobalRandom", Func, 26, "func(t *testing.T, seed uint64)"}, + }, "testing/fstest": { {"(MapFS).Glob", Method, 16, ""}, {"(MapFS).Lstat", Method, 25, ""}, @@ -16887,6 +17451,7 @@ var PackageSymbols = map[string][]Symbol{ "testing/quick": { {"(*CheckEqualError).Error", Method, 0, ""}, {"(*CheckError).Error", Method, 0, ""}, + {"(Generator).Generate", Method, 0, ""}, {"(SetupError).Error", Method, 0, ""}, {"Check", Func, 0, "func(f any, config *Config) error"}, {"CheckEqual", Func, 0, "func(f any, g any, config *Config) error"}, @@ -17093,6 +17658,10 @@ var PackageSymbols = map[string][]Symbol{ {"(ListNode).Position", Method, 1, ""}, {"(ListNode).Type", Method, 0, ""}, {"(NilNode).Position", Method, 1, ""}, + {"(Node).Copy", Method, 0, ""}, + {"(Node).Position", Method, 1, ""}, + {"(Node).String", Method, 0, ""}, + {"(Node).Type", Method, 0, ""}, {"(NodeType).Type", Method, 0, ""}, {"(NumberNode).Position", Method, 1, ""}, {"(NumberNode).Type", Method, 0, ""}, diff --git a/vendor/golang.org/x/tools/internal/stdlib/stdlib.go b/vendor/golang.org/x/tools/internal/stdlib/stdlib.go index e223e0f3405..59a5de36a23 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/stdlib.go +++ b/vendor/golang.org/x/tools/internal/stdlib/stdlib.go @@ -39,7 +39,7 @@ const ( Var // "EOF" Const // "Pi" Field // "Point.X" - Method // "(*Buffer).Grow" + Method // "(*Buffer).Grow" or "(Reader).Read" ) func (kind Kind) String() string { diff --git a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go index 3db2a135b97..7ebe9768bc3 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go @@ -8,7 +8,7 @@ import ( "fmt" "go/ast" "go/types" - _ "unsafe" + _ "unsafe" // for go:linkname hack ) // CallKind describes the function position of an [*ast.CallExpr]. diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go index fef74a78560..51001666ef1 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/types.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go @@ -23,7 +23,6 @@ import ( "go/token" "go/types" "reflect" - "unsafe" "golang.org/x/tools/go/ast/inspector" "golang.org/x/tools/internal/aliases" @@ -40,8 +39,7 @@ func SetUsesCgo(conf *types.Config) bool { } } - addr := unsafe.Pointer(f.UnsafeAddr()) - *(*bool)(addr) = true + *(*bool)(f.Addr().UnsafePointer()) = true return true } diff --git a/vendor/golang.org/x/tools/internal/versions/features.go b/vendor/golang.org/x/tools/internal/versions/features.go index a5f4e3252cc..cdd36c388ab 100644 --- a/vendor/golang.org/x/tools/internal/versions/features.go +++ b/vendor/golang.org/x/tools/internal/versions/features.go @@ -9,6 +9,7 @@ package versions // named constants, to avoid misspelling const ( + Go1_17 = "go1.17" Go1_18 = "go1.18" Go1_19 = "go1.19" Go1_20 = "go1.20" diff --git a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json index 1949c777bf2..a841fc7cb9e 100644 --- a/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json +++ b/vendor/google.golang.org/api/iamcredentials/v1/iamcredentials-api.json @@ -16,6 +16,26 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://iamcredentials.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://iamcredentials.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://iamcredentials.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://iamcredentials.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://iamcredentials.us-east7.rep.googleapis.com/", @@ -315,7 +335,7 @@ } } }, - "revision": "20250417", + "revision": "20250717", "rootUrl": "https://iamcredentials.googleapis.com/", "schemas": { "GenerateAccessTokenRequest": { diff --git a/vendor/google.golang.org/api/internal/gensupport/resumable.go b/vendor/google.golang.org/api/internal/gensupport/resumable.go index d74fe2a2998..91108d3273f 100644 --- a/vendor/google.golang.org/api/internal/gensupport/resumable.go +++ b/vendor/google.golang.org/api/internal/gensupport/resumable.go @@ -126,39 +126,162 @@ func (rx *ResumableUpload) reportProgress(old, updated int64) { } } -// transferChunk performs a single HTTP request to upload a single chunk from rx.Media. -func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, error) { - chunk, off, size, err := rx.Media.Chunk() - - done := err == io.EOF - if !done && err != nil { - return nil, err +// transferChunk performs a single HTTP request to upload a single chunk. +// It uses a goroutine to perform the upload and a timer to enforce ChunkTransferTimeout. +func (rx *ResumableUpload) transferChunk(ctx context.Context, chunk io.Reader, off, size int64, done bool) (*http.Response, error) { + // If no timeout is specified, perform the request synchronously without a timer. + if rx.ChunkTransferTimeout == 0 { + res, err := rx.doUploadRequest(ctx, chunk, off, size, done) + if err != nil { + return res, err + } + return res, nil } - res, err := rx.doUploadRequest(ctx, chunk, off, int64(size), done) - if err != nil { - return res, err + // Start a timer for the ChunkTransferTimeout duration. + timer := time.NewTimer(rx.ChunkTransferTimeout) + + // A struct to hold the result from the goroutine. + type uploadResult struct { + res *http.Response + err error } - // We sent "X-GUploader-No-308: yes" (see comment elsewhere in - // this file), so we don't expect to get a 308. - if res.StatusCode == 308 { - return nil, errors.New("unexpected 308 response status code") + // A buffered channel to receive the result of the upload. + resultCh := make(chan uploadResult, 1) + + // Create a cancellable context for the upload request. This allows us to + // abort the request if the timer fires first. + rCtx, cancel := context.WithCancel(ctx) + // NOTE: We do NOT use `defer cancel()` here. The context must remain valid + // for the caller to read the response body of a successful request. + // Cancellation is handled manually on timeout paths. + + // Starting the chunk upload in parallel. + go func() { + res, err := rx.doUploadRequest(rCtx, chunk, off, size, done) + resultCh <- uploadResult{res: res, err: err} + }() + + // Wait for timer to fire or result channel to have the uploadResult or ctx to be cancelled. + select { + // Note: Calling cancel() will guarantee that the goroutine finishes, + // so these two cases will never block forever on draining the resultCh. + case <-ctx.Done(): + // Context is cancelled for the overall upload. + cancel() + // Drain resultCh. + <-resultCh + return nil, ctx.Err() + case <-timer.C: + // Chunk Transfer timer fired before resultCh so we return context.DeadlineExceeded. + cancel() + // Drain resultCh. + <-resultCh + return nil, context.DeadlineExceeded + case result := <-resultCh: + // Handle the result from the upload. + if result.err != nil { + return result.res, result.err + } + return result.res, nil } +} - if res.StatusCode == http.StatusOK { - rx.reportProgress(off, off+int64(size)) +// uploadChunkWithRetries attempts to upload a single chunk, with retries +// within ChunkRetryDeadline if ChunkTransferTimeout is non-zero. +func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io.Reader, off, size int64, done bool) (*http.Response, error) { + // Configure error retryable criteria. + shouldRetry := rx.Retry.errorFunc() + + // Configure single chunk retry deadline. + chunkRetryDeadline := defaultRetryDeadline + if rx.ChunkRetryDeadline != 0 { + chunkRetryDeadline = rx.ChunkRetryDeadline } - if statusResumeIncomplete(res) { - rx.Media.Next() + // Each chunk gets its own initialized-at-zero backoff and invocation ID. + bo := rx.Retry.backoff() + quitAfterTimer := time.NewTimer(chunkRetryDeadline) + defer quitAfterTimer.Stop() + rx.attempts = 1 + rx.invocationID = uuid.New().String() + + var pause time.Duration + var resp *http.Response + var err error + + // Retry loop for a single chunk. + for { + // Wait for the backoff period, unless the context is canceled or the + // retry deadline is hit. + backoffPauseTimer := time.NewTimer(pause) + select { + case <-ctx.Done(): + backoffPauseTimer.Stop() + if err == nil { + err = ctx.Err() + } + return resp, err + case <-backoffPauseTimer.C: + case <-quitAfterTimer.C: + backoffPauseTimer.Stop() + return resp, err + } + backoffPauseTimer.Stop() + + // Check for context cancellation or timeout once more. If more than one + // case in the select statement above was satisfied at the same time, Go + // will choose one arbitrarily. + // That can cause an operation to go through even if the context was + // canceled before or the timeout was reached. + select { + case <-ctx.Done(): + if err == nil { + err = ctx.Err() + } + return resp, err + case <-quitAfterTimer.C: + return resp, err + default: + } + + // We close the response's body here, since we definitely will not + // return `resp` now. If we close it before the select case above, a + // timer may fire and cause us to return a response with a closed body + // (in which case, the caller will not get the error message in the body). + if resp != nil && resp.Body != nil { + // Read the body to EOF - if the Body is not both read to EOF and closed, + // the Client's underlying RoundTripper may not be able to re-use the + // persistent TCP connection to the server for a subsequent "keep-alive" request. + // See https://pkg.go.dev/net/http#Client.Do + io.Copy(io.Discard, resp.Body) + resp.Body.Close() + } + + resp, err = rx.transferChunk(ctx, chunk, off, size, done) + status := 0 + if resp != nil { + status = resp.StatusCode + } + // We sent "X-GUploader-No-308: yes" (see comment elsewhere in + // this file), so we don't expect to get a 308. + if status == 308 { + return nil, errors.New("unexpected 308 response status code") + } + // Chunk upload should be retried if the ChunkTransferTimeout is non-zero and err is context deadline exceeded + // or we encounter a retryable error. + if (rx.ChunkTransferTimeout != 0 && errors.Is(err, context.DeadlineExceeded)) || shouldRetry(status, err) { + rx.attempts++ + pause = bo.Pause() + chunk, _, _, _ = rx.Media.Chunk() + continue + } + return resp, err } - return res, nil } // Upload starts the process of a resumable upload with a cancellable context. -// It retries using the provided back off strategy until cancelled or the -// strategy indicates to stop retrying. // It is called from the auto-generated API code and is not visible to the user. // Before sending an HTTP request, Upload calls any registered hook functions, // and calls the returned functions after the request returns (see send.go). @@ -166,144 +289,49 @@ func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, e // Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. // Upload does not parse the response into the error on a non 200 response; // it is the caller's responsibility to call resp.Body.Close. -func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { +func (rx *ResumableUpload) Upload(ctx context.Context) (*http.Response, error) { + for { + chunk, off, size, err := rx.Media.Chunk() + done := err == io.EOF + if !done && err != nil { + return nil, err + } - // There are a couple of cases where it's possible for err and resp to both - // be non-nil. However, we expose a simpler contract to our callers: exactly - // one of resp and err will be non-nil. This means that any response body - // must be closed here before returning a non-nil error. - var prepareReturn = func(resp *http.Response, err error) (*http.Response, error) { + resp, err := rx.uploadChunkWithRetries(ctx, chunk, off, int64(size), done) + // There are a couple of cases where it's possible for err and resp to both + // be non-nil. However, we expose a simpler contract to our callers: exactly + // one of resp and err will be non-nil. This means that any response body + // must be closed here before returning a non-nil error. if err != nil { if resp != nil && resp.Body != nil { resp.Body.Close() } // If there were retries, indicate this in the error message and wrap the final error. if rx.attempts > 1 { - return nil, fmt.Errorf("chunk upload failed after %d attempts;, final error: %w", rx.attempts, err) + return nil, fmt.Errorf("chunk upload failed after %d attempts, final error: %w", rx.attempts, err) } return nil, err } + // This case is very unlikely but possible only if rx.ChunkRetryDeadline is // set to a very small value, in which case no requests will be sent before // the deadline. Return an error to avoid causing a panic. if resp == nil { - return nil, fmt.Errorf("upload request to %v not sent, choose larger value for ChunkRetryDealine", rx.URI) + return nil, fmt.Errorf("upload request to %v not sent, choose larger value for ChunkRetryDeadline", rx.URI) } - return resp, nil - } - // Configure retryable error criteria. - errorFunc := rx.Retry.errorFunc() - - // Configure per-chunk retry deadline. - var retryDeadline time.Duration - if rx.ChunkRetryDeadline != 0 { - retryDeadline = rx.ChunkRetryDeadline - } else { - retryDeadline = defaultRetryDeadline - } - - // Send all chunks. - for { - var pause time.Duration - - // Each chunk gets its own initialized-at-zero backoff and invocation ID. - bo := rx.Retry.backoff() - quitAfterTimer := time.NewTimer(retryDeadline) - rx.attempts = 1 - rx.invocationID = uuid.New().String() - - // Retry loop for a single chunk. - for { - pauseTimer := time.NewTimer(pause) - select { - case <-ctx.Done(): - quitAfterTimer.Stop() - pauseTimer.Stop() - if err == nil { - err = ctx.Err() - } - return prepareReturn(resp, err) - case <-pauseTimer.C: - case <-quitAfterTimer.C: - pauseTimer.Stop() - return prepareReturn(resp, err) - } - pauseTimer.Stop() - - // Check for context cancellation or timeout once more. If more than one - // case in the select statement above was satisfied at the same time, Go - // will choose one arbitrarily. - // That can cause an operation to go through even if the context was - // canceled before or the timeout was reached. - select { - case <-ctx.Done(): - quitAfterTimer.Stop() - if err == nil { - err = ctx.Err() - } - return prepareReturn(resp, err) - case <-quitAfterTimer.C: - return prepareReturn(resp, err) - default: - } - - // rCtx is derived from a context with a defined transferTimeout with non-zero value. - // If a particular request exceeds this transfer time for getting response, the rCtx deadline will be exceeded, - // triggering a retry of the request. - var rCtx context.Context - var cancel context.CancelFunc - - rCtx = ctx - if rx.ChunkTransferTimeout != 0 { - rCtx, cancel = context.WithTimeout(ctx, rx.ChunkTransferTimeout) - } - - // We close the response's body here, since we definitely will not - // return `resp` now. If we close it before the select case above, a - // timer may fire and cause us to return a response with a closed body - // (in which case, the caller will not get the error message in the body). - if resp != nil && resp.Body != nil { - // Read the body to EOF - if the Body is not both read to EOF and closed, - // the Client's underlying RoundTripper may not be able to re-use the - // persistent TCP connection to the server for a subsequent "keep-alive" request. - // See https://pkg.go.dev/net/http#Client.Do + if resp.StatusCode == http.StatusOK { + rx.reportProgress(off, off+int64(size)) + } + if statusResumeIncomplete(resp) { + // The upload is not yet complete, but the server has acknowledged this chunk. + // We don't have anything to do with the response body. + if resp.Body != nil { io.Copy(io.Discard, resp.Body) resp.Body.Close() } - resp, err = rx.transferChunk(rCtx) - - var status int - if resp != nil { - status = resp.StatusCode - } - - // The upload should be retried if the rCtx is canceled due to a timeout. - select { - case <-rCtx.Done(): - if rx.ChunkTransferTimeout != 0 && errors.Is(rCtx.Err(), context.DeadlineExceeded) { - // Cancel the context for rCtx - cancel() - continue - } - default: - } - - // Check if we should retry the request. - if !errorFunc(status, err) { - quitAfterTimer.Stop() - break - } - - rx.attempts++ - pause = bo.Pause() - } - - // If the chunk was uploaded successfully, but there's still - // more to go, upload the next chunk without any delay. - if statusResumeIncomplete(resp) { + rx.Media.Next() continue } - - return prepareReturn(resp, err) + return resp, nil } } diff --git a/vendor/google.golang.org/api/internal/version.go b/vendor/google.golang.org/api/internal/version.go index 425ec574d65..ddb7994911f 100644 --- a/vendor/google.golang.org/api/internal/version.go +++ b/vendor/google.golang.org/api/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.239.0" +const Version = "0.247.0" diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 905cf577d1e..251396d4956 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -253,7 +253,7 @@ "location": "northamerica-south1" } ], - "etag": "\"36383730363437323837383838393538333732\"", + "etag": "\"31383438373536343936353833383831333836\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -3306,6 +3306,11 @@ "location": "query", "type": "string" }, + "filter": { + "description": "Filter the returned objects. Currently only supported for the contexts field. If delimiter is set, the returned prefixes are exempt from this filter.", + "location": "query", + "type": "string" + }, "includeFoldersAsPrefixes": { "description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.", "location": "query", @@ -4539,7 +4544,7 @@ } } }, - "revision": "20250605", + "revision": "20250718", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AdvanceRelocateBucketOperationRequest": { @@ -4753,9 +4758,78 @@ "encryption": { "description": "Encryption configuration for a bucket.", "properties": { + "customerManagedEncryptionEnforcementConfig": { + "description": "If set, the new objects created in this bucket must comply with this enforcement config. Changing this has no effect on existing objects; it applies to new objects only. If omitted, the new objects are allowed to be encrypted with Customer Managed Encryption type by default.", + "properties": { + "effectiveTime": { + "description": "Server-determined value that indicates the time from which configuration was enforced and effective. This value is in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "restrictionMode": { + "description": "Restriction mode for Customer-Managed Encryption Keys. Defaults to NotRestricted.", + "enum": [ + "NotRestricted", + "FullyRestricted" + ], + "enumDescriptions": [ + "Creation of new objects with Customer-Managed Encryption is not restricted.", + "Creation of new objects with Customer-Managed Encryption is fully restricted." + ], + "type": "string" + } + }, + "type": "object" + }, + "customerSuppliedEncryptionEnforcementConfig": { + "description": "If set, the new objects created in this bucket must comply with this enforcement config. Changing this has no effect on existing objects; it applies to new objects only. If omitted, the new objects are allowed to be encrypted with Customer Supplied Encryption type by default.", + "properties": { + "effectiveTime": { + "description": "Server-determined value that indicates the time from which configuration was enforced and effective. This value is in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "restrictionMode": { + "description": "Restriction mode for Customer-Supplied Encryption Keys. Defaults to NotRestricted.", + "enum": [ + "NotRestricted", + "FullyRestricted" + ], + "enumDescriptions": [ + "Creation of new objects with Customer-Supplied Encryption is not restricted.", + "Creation of new objects with Customer-Supplied Encryption is fully restricted." + ], + "type": "string" + } + }, + "type": "object" + }, "defaultKmsKeyName": { "description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.", "type": "string" + }, + "googleManagedEncryptionEnforcementConfig": { + "description": "If set, the new objects created in this bucket must comply with this enforcement config. Changing this has no effect on existing objects; it applies to new objects only. If omitted, the new objects are allowed to be encrypted with Google Managed Encryption type by default.", + "properties": { + "effectiveTime": { + "description": "Server-determined value that indicates the time from which configuration was enforced and effective. This value is in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "restrictionMode": { + "description": "Restriction mode for Google-Managed Encryption Keys. Defaults to NotRestricted.", + "enum": [ + "NotRestricted", + "FullyRestricted" + ], + "enumDescriptions": [ + "Creation of new objects with Google Managed Encryption is not restricted.", + "Creation of new objects with Google Managed Encryption is fully restricted." + ], + "type": "string" + } + }, + "type": "object" } }, "type": "object" @@ -5932,6 +6006,20 @@ "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.", "type": "string" }, + "contexts": { + "description": "User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata.", + "properties": { + "custom": { + "additionalProperties": { + "$ref": "ObjectCustomContextPayload", + "description": "A single user-defined object context." + }, + "description": "User-defined object contexts.", + "type": "object" + } + }, + "type": "object" + }, "crc32c": { "description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation).", "type": "string" @@ -6201,6 +6289,27 @@ }, "type": "object" }, + "ObjectCustomContextPayload": { + "description": "The payload of a single user-defined object context.", + "id": "ObjectCustomContextPayload", + "properties": { + "createTime": { + "description": "The time at which the object context was created in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "updateTime": { + "description": "The time at which the object context was last updated in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "value": { + "description": "The value of the object context.", + "type": "string" + } + }, + "type": "object" + }, "Objects": { "description": "A list of objects.", "id": "Objects", diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index bb4f8173442..0714b7e0890 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -709,18 +709,38 @@ func (s BucketCustomPlacementConfig) MarshalJSON() ([]byte, error) { // BucketEncryption: Encryption configuration for a bucket. type BucketEncryption struct { + // CustomerManagedEncryptionEnforcementConfig: If set, the new objects created + // in this bucket must comply with this enforcement config. Changing this has + // no effect on existing objects; it applies to new objects only. If omitted, + // the new objects are allowed to be encrypted with Customer Managed Encryption + // type by default. + CustomerManagedEncryptionEnforcementConfig *BucketEncryptionCustomerManagedEncryptionEnforcementConfig `json:"customerManagedEncryptionEnforcementConfig,omitempty"` + // CustomerSuppliedEncryptionEnforcementConfig: If set, the new objects created + // in this bucket must comply with this enforcement config. Changing this has + // no effect on existing objects; it applies to new objects only. If omitted, + // the new objects are allowed to be encrypted with Customer Supplied + // Encryption type by default. + CustomerSuppliedEncryptionEnforcementConfig *BucketEncryptionCustomerSuppliedEncryptionEnforcementConfig `json:"customerSuppliedEncryptionEnforcementConfig,omitempty"` // DefaultKmsKeyName: A Cloud KMS key that will be used to encrypt objects // inserted into this bucket, if no encryption method is specified. DefaultKmsKeyName string `json:"defaultKmsKeyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultKmsKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // GoogleManagedEncryptionEnforcementConfig: If set, the new objects created in + // this bucket must comply with this enforcement config. Changing this has no + // effect on existing objects; it applies to new objects only. If omitted, the + // new objects are allowed to be encrypted with Google Managed Encryption type + // by default. + GoogleManagedEncryptionEnforcementConfig *BucketEncryptionGoogleManagedEncryptionEnforcementConfig `json:"googleManagedEncryptionEnforcementConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "CustomerManagedEncryptionEnforcementConfig") to unconditionally include in + // API requests. By default, fields with empty or default values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultKmsKeyName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. + // "CustomerManagedEncryptionEnforcementConfig") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -730,6 +750,114 @@ func (s BucketEncryption) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BucketEncryptionCustomerManagedEncryptionEnforcementConfig: If set, the new +// objects created in this bucket must comply with this enforcement config. +// Changing this has no effect on existing objects; it applies to new objects +// only. If omitted, the new objects are allowed to be encrypted with Customer +// Managed Encryption type by default. +type BucketEncryptionCustomerManagedEncryptionEnforcementConfig struct { + // EffectiveTime: Server-determined value that indicates the time from which + // configuration was enforced and effective. This value is in RFC 3339 format. + EffectiveTime string `json:"effectiveTime,omitempty"` + // RestrictionMode: Restriction mode for Customer-Managed Encryption Keys. + // Defaults to NotRestricted. + // + // Possible values: + // "NotRestricted" - Creation of new objects with Customer-Managed Encryption + // is not restricted. + // "FullyRestricted" - Creation of new objects with Customer-Managed + // Encryption is fully restricted. + RestrictionMode string `json:"restrictionMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "EffectiveTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EffectiveTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BucketEncryptionCustomerManagedEncryptionEnforcementConfig) MarshalJSON() ([]byte, error) { + type NoMethod BucketEncryptionCustomerManagedEncryptionEnforcementConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BucketEncryptionCustomerSuppliedEncryptionEnforcementConfig: If set, the new +// objects created in this bucket must comply with this enforcement config. +// Changing this has no effect on existing objects; it applies to new objects +// only. If omitted, the new objects are allowed to be encrypted with Customer +// Supplied Encryption type by default. +type BucketEncryptionCustomerSuppliedEncryptionEnforcementConfig struct { + // EffectiveTime: Server-determined value that indicates the time from which + // configuration was enforced and effective. This value is in RFC 3339 format. + EffectiveTime string `json:"effectiveTime,omitempty"` + // RestrictionMode: Restriction mode for Customer-Supplied Encryption Keys. + // Defaults to NotRestricted. + // + // Possible values: + // "NotRestricted" - Creation of new objects with Customer-Supplied + // Encryption is not restricted. + // "FullyRestricted" - Creation of new objects with Customer-Supplied + // Encryption is fully restricted. + RestrictionMode string `json:"restrictionMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "EffectiveTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EffectiveTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BucketEncryptionCustomerSuppliedEncryptionEnforcementConfig) MarshalJSON() ([]byte, error) { + type NoMethod BucketEncryptionCustomerSuppliedEncryptionEnforcementConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BucketEncryptionGoogleManagedEncryptionEnforcementConfig: If set, the new +// objects created in this bucket must comply with this enforcement config. +// Changing this has no effect on existing objects; it applies to new objects +// only. If omitted, the new objects are allowed to be encrypted with Google +// Managed Encryption type by default. +type BucketEncryptionGoogleManagedEncryptionEnforcementConfig struct { + // EffectiveTime: Server-determined value that indicates the time from which + // configuration was enforced and effective. This value is in RFC 3339 format. + EffectiveTime string `json:"effectiveTime,omitempty"` + // RestrictionMode: Restriction mode for Google-Managed Encryption Keys. + // Defaults to NotRestricted. + // + // Possible values: + // "NotRestricted" - Creation of new objects with Google Managed Encryption + // is not restricted. + // "FullyRestricted" - Creation of new objects with Google Managed Encryption + // is fully restricted. + RestrictionMode string `json:"restrictionMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "EffectiveTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EffectiveTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BucketEncryptionGoogleManagedEncryptionEnforcementConfig) MarshalJSON() ([]byte, error) { + type NoMethod BucketEncryptionGoogleManagedEncryptionEnforcementConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BucketHierarchicalNamespace: The bucket's hierarchical namespace // configuration. type BucketHierarchicalNamespace struct { @@ -2212,6 +2340,10 @@ type Object struct { // ContentType: Content-Type of the object data. If an object is stored without // a Content-Type, it is served as application/octet-stream. ContentType string `json:"contentType,omitempty"` + // Contexts: User-defined or system-defined object contexts. Each object + // context is a key-payload pair, where the key provides the identification and + // the payload holds the associated value and additional metadata. + Contexts *ObjectContexts `json:"contexts,omitempty"` // Crc32c: CRC32c checksum, as described in RFC 4960, Appendix B; encoded using // base64 in big-endian byte order. For more information about using the CRC32c // checksum, see Data Validation and Change Detection @@ -2340,6 +2472,30 @@ func (s Object) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ObjectContexts: User-defined or system-defined object contexts. Each object +// context is a key-payload pair, where the key provides the identification and +// the payload holds the associated value and additional metadata. +type ObjectContexts struct { + // Custom: User-defined object contexts. + Custom map[string]ObjectCustomContextPayload `json:"custom,omitempty"` + // ForceSendFields is a list of field names (e.g. "Custom") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Custom") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ObjectContexts) MarshalJSON() ([]byte, error) { + type NoMethod ObjectContexts + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ObjectCustomerEncryption: Metadata of customer-supplied encryption key, if // the object is encrypted by such a key. type ObjectCustomerEncryption struct { @@ -2531,6 +2687,35 @@ func (s ObjectAccessControls) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ObjectCustomContextPayload: The payload of a single user-defined object +// context. +type ObjectCustomContextPayload struct { + // CreateTime: The time at which the object context was created in RFC 3339 + // format. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: The time at which the object context was last updated in RFC + // 3339 format. + UpdateTime string `json:"updateTime,omitempty"` + // Value: The value of the object context. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ObjectCustomContextPayload) MarshalJSON() ([]byte, error) { + type NoMethod ObjectCustomContextPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Objects: A list of objects. type Objects struct { // Items: The list of items. @@ -10916,6 +11101,14 @@ func (c *ObjectsListCall) EndOffset(endOffset string) *ObjectsListCall { return c } +// Filter sets the optional parameter "filter": Filter the returned objects. +// Currently only supported for the contexts field. If delimiter is set, the +// returned prefixes are exempt from this filter. +func (c *ObjectsListCall) Filter(filter string) *ObjectsListCall { + c.urlParams_.Set("filter", filter) + return c +} + // IncludeFoldersAsPrefixes sets the optional parameter // "includeFoldersAsPrefixes": Only applicable if delimiter is set to '/'. If // true, will also include folders and managed folders (besides objects) in the 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 669133d04dc..c96e4483460 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go @@ -32,7 +32,7 @@ var byteType = reflect.TypeOf(byte(0)) func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { f := new(filedesc.Field) f.L0.ParentFile = filedesc.SurrogateProto2 - f.L1.EditionFeatures = f.L0.ParentFile.L1.EditionFeatures + packed := false for len(tag) > 0 { i := strings.IndexByte(tag, ',') if i < 0 { @@ -108,7 +108,7 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri f.L1.StringName.InitJSON(jsonName) } case s == "packed": - f.L1.EditionFeatures.IsPacked = true + packed = true case strings.HasPrefix(s, "def="): // The default tag is special in that everything afterwards is the // default regardless of the presence of commas. @@ -121,6 +121,13 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri tag = strings.TrimPrefix(tag[i:], ",") } + // Update EditionFeatures after the loop and after we know whether this is + // a proto2 or proto3 field. + f.L1.EditionFeatures = f.L0.ParentFile.L1.EditionFeatures + if packed { + f.L1.EditionFeatures.IsPacked = true + } + // The generator uses the group message name instead of the field name. // We obtain the real field name by lowercasing the group name. if f.L1.Kind == protoreflect.GroupKind { diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index 099b2bf451b..9aa7a9bb776 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -424,27 +424,34 @@ func (d *Decoder) parseFieldName() (tok Token, err error) { return Token{}, d.newSyntaxError("invalid field name: %s", errId(d.in)) } -// parseTypeName parses Any type URL or extension field name. The name is -// enclosed in [ and ] characters. The C++ parser does not handle many legal URL -// strings. This implementation is more liberal and allows for the pattern -// ^[-_a-zA-Z0-9]+([./][-_a-zA-Z0-9]+)*`). Whitespaces and comments are allowed -// in between [ ], '.', '/' and the sub names. +// parseTypeName parses an Any type URL or an extension field name. The name is +// enclosed in [ and ] characters. We allow almost arbitrary type URL prefixes, +// closely following the text-format spec [1,2]. We implement "ExtensionName | +// AnyName" as follows (with some exceptions for backwards compatibility): +// +// char = [-_a-zA-Z0-9] +// url_char = char | [.~!$&'()*+,;=] | "%", hex, hex +// +// Ident = char, { char } +// TypeName = Ident, { ".", Ident } ; +// UrlPrefix = url_char, { url_char | "/" } ; +// ExtensionName = "[", TypeName, "]" ; +// AnyName = "[", UrlPrefix, "/", TypeName, "]" ; +// +// Additionally, we allow arbitrary whitespace and comments between [ and ]. +// +// [1] https://protobuf.dev/reference/protobuf/textformat-spec/#characters +// [2] https://protobuf.dev/reference/protobuf/textformat-spec/#field-names func (d *Decoder) parseTypeName() (Token, error) { - startPos := len(d.orig) - len(d.in) // Use alias s to advance first in order to use d.in for error handling. - // Caller already checks for [ as first character. + // Caller already checks for [ as first character (d.in[0] == '['). s := consume(d.in[1:], 0) if len(s) == 0 { return Token{}, ErrUnexpectedEOF } + // Collect everything between [ and ] in name. var name []byte - for len(s) > 0 && isTypeNameChar(s[0]) { - name = append(name, s[0]) - s = s[1:] - } - s = consume(s, 0) - var closed bool for len(s) > 0 && !closed { switch { @@ -452,23 +459,20 @@ func (d *Decoder) parseTypeName() (Token, error) { s = s[1:] closed = true - case s[0] == '/', s[0] == '.': - if len(name) > 0 && (name[len(name)-1] == '/' || name[len(name)-1] == '.') { - return Token{}, d.newSyntaxError("invalid type URL/extension field name: %s", - d.orig[startPos:len(d.orig)-len(s)+1]) - } + case s[0] == '/' || isTypeNameChar(s[0]) || isUrlExtraChar(s[0]): name = append(name, s[0]) - s = s[1:] - s = consume(s, 0) - for len(s) > 0 && isTypeNameChar(s[0]) { - name = append(name, s[0]) - s = s[1:] + s = consume(s[1:], 0) + + // URL percent-encoded chars + case s[0] == '%': + if len(s) < 3 || !isHexChar(s[1]) || !isHexChar(s[2]) { + return Token{}, d.parseTypeNameError(s, 3) } - s = consume(s, 0) + name = append(name, s[0], s[1], s[2]) + s = consume(s[3:], 0) default: - return Token{}, d.newSyntaxError( - "invalid type URL/extension field name: %s", d.orig[startPos:len(d.orig)-len(s)+1]) + return Token{}, d.parseTypeNameError(s, 1) } } @@ -476,15 +480,38 @@ func (d *Decoder) parseTypeName() (Token, error) { return Token{}, ErrUnexpectedEOF } - // First character cannot be '.'. Last character cannot be '.' or '/'. - size := len(name) - if size == 0 || name[0] == '.' || name[size-1] == '.' || name[size-1] == '/' { - return Token{}, d.newSyntaxError("invalid type URL/extension field name: %s", - d.orig[startPos:len(d.orig)-len(s)]) + // Split collected name on last '/' into urlPrefix and typeName (if '/' is + // present). + typeName := name + if i := bytes.LastIndexByte(name, '/'); i != -1 { + urlPrefix := name[:i] + typeName = name[i+1:] + + // urlPrefix may be empty (for backwards compatibility). + // If non-empty, it must not start with '/'. + if len(urlPrefix) > 0 && urlPrefix[0] == '/' { + return Token{}, d.parseTypeNameError(s, 0) + } } + // typeName must not be empty (note: "" splits to [""]) and all identifier + // parts must not be empty. + for _, ident := range bytes.Split(typeName, []byte{'.'}) { + if len(ident) == 0 { + return Token{}, d.parseTypeNameError(s, 0) + } + } + + // typeName must not contain any percent-encoded or special URL chars. + for _, b := range typeName { + if b == '%' || (b != '.' && isUrlExtraChar(b)) { + return Token{}, d.parseTypeNameError(s, 0) + } + } + + startPos := len(d.orig) - len(d.in) + endPos := len(d.orig) - len(s) d.in = s - endPos := len(d.orig) - len(d.in) d.consume(0) return Token{ @@ -496,16 +523,32 @@ func (d *Decoder) parseTypeName() (Token, error) { }, nil } +func (d *Decoder) parseTypeNameError(s []byte, numUnconsumedChars int) error { + return d.newSyntaxError( + "invalid type URL/extension field name: %s", + d.in[:len(d.in)-len(s)+min(numUnconsumedChars, len(s))], + ) +} + +func isHexChar(b byte) bool { + return ('0' <= b && b <= '9') || + ('a' <= b && b <= 'f') || + ('A' <= b && b <= 'F') +} + func isTypeNameChar(b byte) bool { - return (b == '-' || b == '_' || + return b == '-' || b == '_' || ('0' <= b && b <= '9') || ('a' <= b && b <= 'z') || - ('A' <= b && b <= 'Z')) + ('A' <= b && b <= 'Z') } -func isWhiteSpace(b byte) bool { +// isUrlExtraChar complements isTypeNameChar with extra characters that we allow +// in URLs but not in type names. Note that '/' is not included so that it can +// be treated specially. +func isUrlExtraChar(b byte) bool { switch b { - case ' ', '\n', '\r', '\t': + case '.', '~', '!', '$', '&', '(', ')', '*', '+', ',', ';', '=': return true default: return false diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index dbcf90b871f..c775e5832f0 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -32,6 +32,7 @@ const ( EditionProto3 Edition = 999 Edition2023 Edition = 1000 Edition2024 Edition = 1001 + EditionUnstable Edition = 9999 EditionUnsupported Edition = 100000 ) 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 dd31faaeb0a..78f02b1b495 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -330,7 +330,6 @@ func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) { md.L1.Extensions.List[extensionIdx].unmarshalFull(v, sb) extensionIdx++ case genid.DescriptorProto_Options_field_number: - md.unmarshalOptions(v) rawOptions = appendOptions(rawOptions, v) } default: @@ -356,27 +355,6 @@ func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) { md.L2.Options = md.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Message, rawOptions) } -func (md *Message) unmarshalOptions(b []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.MessageOptions_MapEntry_field_number: - md.L1.IsMapEntry = protowire.DecodeBool(v) - case genid.MessageOptions_MessageSetWireFormat_field_number: - md.L1.IsMessageSet = protowire.DecodeBool(v) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - func unmarshalMessageReservedRange(b []byte) (r [2]protoreflect.FieldNumber) { for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index 950a6a325a4..65aaf4d210a 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -26,6 +26,7 @@ const ( Edition_EDITION_PROTO3_enum_value = 999 Edition_EDITION_2023_enum_value = 1000 Edition_EDITION_2024_enum_value = 1001 + Edition_EDITION_UNSTABLE_enum_value = 9999 Edition_EDITION_1_TEST_ONLY_enum_value = 1 Edition_EDITION_2_TEST_ONLY_enum_value = 2 Edition_EDITION_99997_TEST_ONLY_enum_value = 99997 diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index 229c6980138..4a3bf393ef4 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -113,6 +113,9 @@ func sizeMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalO } func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if opts.depth--; opts.depth < 0 { + return out, errRecursionDepth + } if wtyp != protowire.BytesType { return out, errUnknown } @@ -170,6 +173,9 @@ func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo } func consumeMapOfMessage(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { + if opts.depth--; opts.depth < 0 { + return out, errRecursionDepth + } if wtyp != protowire.BytesType { return out, errUnknown } diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go index e0dd21fa5f4..1228b5c8c27 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -102,8 +102,7 @@ var errUnknown = errors.New("unknown") func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { mi.init() - opts.depth-- - if opts.depth < 0 { + if opts.depth--; opts.depth < 0 { return out, errRecursionDepth } if flags.ProtoLegacy && mi.isMessageSet { diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go index 7b2995dde5e..99a1eb95f7c 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/validate.go +++ b/vendor/google.golang.org/protobuf/internal/impl/validate.go @@ -68,9 +68,13 @@ func Validate(mt protoreflect.MessageType, in protoiface.UnmarshalInput) (out pr if in.Resolver == nil { in.Resolver = protoregistry.GlobalTypes } + if in.Depth == 0 { + in.Depth = protowire.DefaultRecursionLimit + } o, st := mi.validate(in.Buf, 0, unmarshalOptions{ flags: in.Flags, resolver: in.Resolver, + depth: in.Depth, }) if o.initialized { out.Flags |= protoiface.UnmarshalInitialized @@ -257,6 +261,9 @@ func (mi *MessageInfo) validate(b []byte, groupTag protowire.Number, opts unmars states[0].typ = validationTypeGroup states[0].endGroup = groupTag } + if opts.depth--; opts.depth < 0 { + return out, ValidationInvalid + } initialized := true start := len(b) State: @@ -451,6 +458,13 @@ State: mi: vi.mi, tail: b, }) + if vi.typ == validationTypeMessage || + vi.typ == validationTypeGroup || + vi.typ == validationTypeMap { + if opts.depth--; opts.depth < 0 { + return out, ValidationInvalid + } + } b = v continue State case validationTypeRepeatedVarint: @@ -499,6 +513,9 @@ State: mi: vi.mi, endGroup: num, }) + if opts.depth--; opts.depth < 0 { + return out, ValidationInvalid + } continue State case flags.ProtoLegacy && vi.typ == validationTypeMessageSetItem: typeid, v, n, err := messageset.ConsumeFieldValue(b, false) @@ -521,6 +538,13 @@ State: mi: xvi.mi, tail: b[n:], }) + if xvi.typ == validationTypeMessage || + xvi.typ == validationTypeGroup || + xvi.typ == validationTypeMap { + if opts.depth--; opts.depth < 0 { + return out, ValidationInvalid + } + } b = v continue State } @@ -547,12 +571,14 @@ State: switch st.typ { case validationTypeMessage, validationTypeGroup: numRequiredFields = int(st.mi.numRequiredFields) + opts.depth++ case validationTypeMap: // If this is a map field with a message value that contains // required fields, require that the value be present. if st.mi != nil && st.mi.numRequiredFields > 0 { numRequiredFields = 1 } + opts.depth++ } // If there are more than 64 required fields, this check will // always fail and we will report that the message is potentially diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index 77de0f238ce..763fd82841c 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 = 10 + Patch = 11 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index 4cbf1aeaf79..889d8511d27 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -121,9 +121,8 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto out, err = methods.Unmarshal(in) } else { - o.RecursionLimit-- - if o.RecursionLimit < 0 { - return out, errors.New("exceeded max recursion depth") + if o.RecursionLimit--; o.RecursionLimit < 0 { + return out, errRecursionDepth } err = o.unmarshalMessageSlow(b, m) } @@ -220,6 +219,9 @@ func (o UnmarshalOptions) unmarshalSingular(b []byte, wtyp protowire.Type, m pro } func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv protoreflect.Map, fd protoreflect.FieldDescriptor) (n int, err error) { + if o.RecursionLimit--; o.RecursionLimit < 0 { + return 0, errRecursionDepth + } if wtyp != protowire.BytesType { return 0, errUnknown } @@ -305,3 +307,5 @@ func (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv proto var errUnknown = errors.New("BUG: internal error (unknown)") var errDecode = errors.New("cannot parse invalid wire-format data") + +var errRecursionDepth = errors.New("exceeded maximum recursion depth") diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go index 9196288e4ac..40f17af4e3c 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -108,7 +108,9 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot if f.L1.Path == "" { return nil, errors.New("file path must be populated") } - if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { + if f.L1.Syntax == protoreflect.Editions && + (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) && + fd.GetEdition() != descriptorpb.Edition_EDITION_UNSTABLE { // Allow cmd/protoc-gen-go/testdata to use any edition for easier // testing of upcoming edition features. if !strings.HasPrefix(fd.GetName(), "cmd/protoc-gen-go/testdata/") { @@ -152,6 +154,7 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot imp := &f.L2.Imports[i] imps.importPublic(imp.Imports()) } + optionImps := importSet{f.Path(): true} if len(fd.GetOptionDependency()) > 0 { optionImports := make(filedesc.FileImports, len(fd.GetOptionDependency())) for i, path := range fd.GetOptionDependency() { @@ -165,10 +168,12 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot } imp.FileDescriptor = f - if imps[imp.Path()] { + if imps[imp.Path()] || optionImps[imp.Path()] { return nil, errors.New("already imported %q", path) } - imps[imp.Path()] = true + // This needs to be a separate map so that we don't recognize non-options + // symbols coming from option imports. + optionImps[imp.Path()] = true } f.L2.OptionImports = func() protoreflect.FileImports { return &optionImports diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 697a61b290e..147b8c7398d 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -46,6 +46,8 @@ func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { return descriptorpb.Edition_EDITION_2023 case filedesc.Edition2024: return descriptorpb.Edition_EDITION_2024 + case filedesc.EditionUnstable: + return descriptorpb.Edition_EDITION_UNSTABLE default: panic(fmt.Sprintf("unknown value for edition: %v", ed)) } @@ -58,7 +60,7 @@ func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { return def } edpb := toEditionProto(ed) - if defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb { + if (defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb) && edpb != descriptorpb.Edition_EDITION_UNSTABLE { // This should never happen protodesc.(FileOptions).New would fail when // initializing the file descriptor. // This most likely means the embedded defaults were not updated. 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 4eacb523c33..0b23faa957c 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -69,6 +69,8 @@ const ( // comparison. Edition_EDITION_2023 Edition = 1000 Edition_EDITION_2024 Edition = 1001 + // A placeholder edition for developing and testing unscheduled features. + Edition_EDITION_UNSTABLE Edition = 9999 // Placeholder editions for testing feature resolution. These should not be // used or relied on outside of tests. Edition_EDITION_1_TEST_ONLY Edition = 1 @@ -91,6 +93,7 @@ var ( 999: "EDITION_PROTO3", 1000: "EDITION_2023", 1001: "EDITION_2024", + 9999: "EDITION_UNSTABLE", 1: "EDITION_1_TEST_ONLY", 2: "EDITION_2_TEST_ONLY", 99997: "EDITION_99997_TEST_ONLY", @@ -105,6 +108,7 @@ var ( "EDITION_PROTO3": 999, "EDITION_2023": 1000, "EDITION_2024": 1001, + "EDITION_UNSTABLE": 9999, "EDITION_1_TEST_ONLY": 1, "EDITION_2_TEST_ONLY": 2, "EDITION_99997_TEST_ONLY": 99997, @@ -4793,11 +4797,11 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" + "\x18EnumValueDescriptorProto\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + "\x06number\x18\x02 \x01(\x05R\x06number\x12;\n" + - "\aoptions\x18\x03 \x01(\v2!.google.protobuf.EnumValueOptionsR\aoptions\"\xa7\x01\n" + + "\aoptions\x18\x03 \x01(\v2!.google.protobuf.EnumValueOptionsR\aoptions\"\xb5\x01\n" + "\x16ServiceDescriptorProto\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12>\n" + "\x06method\x18\x02 \x03(\v2&.google.protobuf.MethodDescriptorProtoR\x06method\x129\n" + - "\aoptions\x18\x03 \x01(\v2\x1f.google.protobuf.ServiceOptionsR\aoptions\"\x89\x02\n" + + "\aoptions\x18\x03 \x01(\v2\x1f.google.protobuf.ServiceOptionsR\aoptionsJ\x04\b\x04\x10\x05R\x06stream\"\x89\x02\n" + "\x15MethodDescriptorProto\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" + "\n" + @@ -5033,14 +5037,15 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" + "\bSemantic\x12\b\n" + "\x04NONE\x10\x00\x12\a\n" + "\x03SET\x10\x01\x12\t\n" + - "\x05ALIAS\x10\x02*\xa7\x02\n" + + "\x05ALIAS\x10\x02*\xbe\x02\n" + "\aEdition\x12\x13\n" + "\x0fEDITION_UNKNOWN\x10\x00\x12\x13\n" + "\x0eEDITION_LEGACY\x10\x84\a\x12\x13\n" + "\x0eEDITION_PROTO2\x10\xe6\a\x12\x13\n" + "\x0eEDITION_PROTO3\x10\xe7\a\x12\x11\n" + "\fEDITION_2023\x10\xe8\a\x12\x11\n" + - "\fEDITION_2024\x10\xe9\a\x12\x17\n" + + "\fEDITION_2024\x10\xe9\a\x12\x15\n" + + "\x10EDITION_UNSTABLE\x10\x8fN\x12\x17\n" + "\x13EDITION_1_TEST_ONLY\x10\x01\x12\x17\n" + "\x13EDITION_2_TEST_ONLY\x10\x02\x12\x1d\n" + "\x17EDITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n" + 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 06d584c14be..484c21fd536 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 @@ -172,13 +172,14 @@ import ( // ) to obtain a formatter capable of generating timestamps in this format. type Timestamp struct { state protoimpl.MessageState `protogen:"open.v1"` - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. + // Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + // be between -315576000000 and 315576000000 inclusive (which corresponds to + // 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 + // Non-negative fractions of a second at nanosecond resolution. This field is + // the nanosecond portion of the duration, not an alternative to seconds. + // Negative second values with fractions must still have non-negative nanos + // values that count forward in time. Must be between 0 and 999,999,999 // inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` unknownFields protoimpl.UnknownFields diff --git a/vendor/modules.txt b/vendor/modules.txt index c46b2eda756..a977cd0858c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,13 +1,13 @@ # cel.dev/expr v0.24.0 ## explicit; go 1.22.0 cel.dev/expr -# cloud.google.com/go v0.120.0 +# cloud.google.com/go v0.121.6 ## explicit; go 1.23.0 cloud.google.com/go/internal cloud.google.com/go/internal/optional cloud.google.com/go/internal/trace cloud.google.com/go/internal/version -# cloud.google.com/go/auth v0.16.2 +# cloud.google.com/go/auth v0.16.4 ## explicit; go 1.23.0 cloud.google.com/go/auth cloud.google.com/go/auth/credentials @@ -39,8 +39,8 @@ cloud.google.com/go/iam/apiv1/iampb cloud.google.com/go/monitoring/apiv3/v2 cloud.google.com/go/monitoring/apiv3/v2/monitoringpb cloud.google.com/go/monitoring/internal -# cloud.google.com/go/storage v1.50.0 -## explicit; go 1.22 +# cloud.google.com/go/storage v1.56.0 +## explicit; go 1.23.0 cloud.google.com/go/storage cloud.google.com/go/storage/experimental cloud.google.com/go/storage/internal @@ -123,11 +123,11 @@ github.com/AzureAD/microsoft-authentication-library-for-go/apps/public # github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 ## explicit; go 1.24.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp -# github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 -## explicit; go 1.22 +# github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 +## explicit; go 1.23.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric -# github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.52.0 -## explicit; go 1.23.8 +# github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 +## explicit; go 1.23.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping # github.com/Masterminds/squirrel v1.5.4 ## explicit; go 1.14 @@ -135,8 +135,8 @@ github.com/Masterminds/squirrel # github.com/VictoriaMetrics/easyproto v0.1.4 ## explicit; go 1.18 github.com/VictoriaMetrics/easyproto -# github.com/VictoriaMetrics/fastcache v1.12.2 -## explicit; go 1.13 +# github.com/VictoriaMetrics/fastcache v1.13.2 +## explicit; go 1.24.0 github.com/VictoriaMetrics/fastcache # github.com/alecthomas/kingpin/v2 v2.4.0 ## explicit; go 1.17 @@ -144,7 +144,7 @@ github.com/alecthomas/kingpin/v2 # github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b ## explicit; go 1.15 github.com/alecthomas/units -# github.com/alicebob/miniredis/v2 v2.35.0 +# github.com/alicebob/miniredis/v2 v2.36.1 ## explicit; go 1.17 github.com/alicebob/miniredis/v2 github.com/alicebob/miniredis/v2/fpconv @@ -162,11 +162,8 @@ github.com/andybalholm/brotli/matchfinder # github.com/armon/go-metrics v0.4.1 ## explicit; go 1.12 github.com/armon/go-metrics -# github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 -## explicit; go 1.13 -github.com/asaskevich/govalidator -# github.com/aws/aws-sdk-go-v2 v1.39.2 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2 v1.41.1 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/defaults github.com/aws/aws-sdk-go-v2/aws/middleware @@ -192,68 +189,74 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/config v1.31.12 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/config v1.32.7 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.18.16 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/credentials v1.19.7 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds github.com/aws/aws-sdk-go-v2/credentials/endpointcreds github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client +github.com/aws/aws-sdk-go-v2/credentials/logincreds github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.1 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/dynamodb v1.54.0 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/dynamodb github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/customizations github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/endpoints github.com/aws/aws-sdk-go-v2/service/dynamodb/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.6 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.17 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/sns v1.38.5 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 +## explicit; go 1.23 +github.com/aws/aws-sdk-go-v2/service/signin +github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/signin/types +# github.com/aws/aws-sdk-go-v2/service/sns v1.39.11 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/sns github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sns/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 +## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.23.0 -## explicit; go 1.22 +# github.com/aws/smithy-go v1.24.0 +## explicit; go 1.23 github.com/aws/smithy-go github.com/aws/smithy-go/auth github.com/aws/smithy-go/auth/bearer @@ -299,7 +302,7 @@ github.com/caio/go-tdigest # github.com/cenkalti/backoff/v4 v4.3.0 ## explicit; go 1.18 github.com/cenkalti/backoff/v4 -# github.com/cenkalti/backoff/v5 v5.0.2 +# github.com/cenkalti/backoff/v5 v5.0.3 ## explicit; go 1.23 github.com/cenkalti/backoff/v5 # github.com/cespare/xxhash/v2 v2.3.0 @@ -315,11 +318,11 @@ github.com/cncf/xds/go/xds/data/orca/v3 github.com/cncf/xds/go/xds/service/orca/v3 github.com/cncf/xds/go/xds/type/matcher/v3 github.com/cncf/xds/go/xds/type/v3 -# github.com/coder/quartz v0.2.1 -## explicit; go 1.21.8 +# github.com/coder/quartz v0.3.0 +## explicit; go 1.23.9 github.com/coder/quartz -# github.com/coreos/go-semver v0.3.0 -## explicit +# github.com/coreos/go-semver v0.3.1 +## explicit; go 1.8 github.com/coreos/go-semver/semver # github.com/coreos/go-systemd/v22 v22.6.0 ## explicit; go 1.23 @@ -432,8 +435,8 @@ github.com/go-ini/ini ## explicit; go 1.17 github.com/go-kit/log github.com/go-kit/log/level -# github.com/go-logfmt/logfmt v0.6.0 -## explicit; go 1.17 +# github.com/go-logfmt/logfmt v0.6.1 +## explicit; go 1.21 github.com/go-logfmt/logfmt # github.com/go-logr/logr v1.4.3 ## explicit; go 1.18 @@ -442,7 +445,7 @@ github.com/go-logr/logr/funcr # github.com/go-logr/stdr v1.2.2 ## explicit; go 1.16 github.com/go-logr/stdr -# github.com/go-openapi/analysis v0.24.0 +# github.com/go-openapi/analysis v0.24.2 ## explicit; go 1.24.0 github.com/go-openapi/analysis github.com/go-openapi/analysis/internal/debug @@ -451,20 +454,20 @@ github.com/go-openapi/analysis/internal/flatten/operations github.com/go-openapi/analysis/internal/flatten/replace github.com/go-openapi/analysis/internal/flatten/schutils github.com/go-openapi/analysis/internal/flatten/sortref -# github.com/go-openapi/errors v0.22.3 +# github.com/go-openapi/errors v0.22.6 ## explicit; go 1.24.0 github.com/go-openapi/errors -# github.com/go-openapi/jsonpointer v0.22.1 +# github.com/go-openapi/jsonpointer v0.22.4 ## explicit; go 1.24.0 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.21.2 +# github.com/go-openapi/jsonreference v0.21.4 ## explicit; go 1.24.0 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/loads v0.23.1 +# github.com/go-openapi/loads v0.23.2 ## explicit; go 1.24.0 github.com/go-openapi/loads -# github.com/go-openapi/runtime v0.29.0 +# github.com/go-openapi/runtime v0.29.2 ## explicit; go 1.24.0 github.com/go-openapi/runtime github.com/go-openapi/runtime/client @@ -476,52 +479,52 @@ github.com/go-openapi/runtime/middleware/header github.com/go-openapi/runtime/middleware/untyped github.com/go-openapi/runtime/security github.com/go-openapi/runtime/yamlpc -# github.com/go-openapi/spec v0.22.0 => github.com/go-openapi/spec v0.20.6 +# github.com/go-openapi/spec v0.22.3 => github.com/go-openapi/spec v0.20.6 ## explicit; go 1.13 github.com/go-openapi/spec -# github.com/go-openapi/strfmt v0.24.0 +# github.com/go-openapi/strfmt v0.25.0 ## explicit; go 1.24.0 github.com/go-openapi/strfmt -# github.com/go-openapi/swag v0.25.1 +# github.com/go-openapi/swag v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag -# github.com/go-openapi/swag/cmdutils v0.25.1 +# github.com/go-openapi/swag/cmdutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/cmdutils -# github.com/go-openapi/swag/conv v0.25.1 +# github.com/go-openapi/swag/conv v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/conv -# github.com/go-openapi/swag/fileutils v0.25.1 +# github.com/go-openapi/swag/fileutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/fileutils -# github.com/go-openapi/swag/jsonname v0.25.1 +# github.com/go-openapi/swag/jsonname v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/jsonname -# github.com/go-openapi/swag/jsonutils v0.25.1 +# github.com/go-openapi/swag/jsonutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/jsonutils github.com/go-openapi/swag/jsonutils/adapters github.com/go-openapi/swag/jsonutils/adapters/ifaces github.com/go-openapi/swag/jsonutils/adapters/stdlib/json -# github.com/go-openapi/swag/loading v0.25.1 +# github.com/go-openapi/swag/loading v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/loading -# github.com/go-openapi/swag/mangling v0.25.1 +# github.com/go-openapi/swag/mangling v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/mangling -# github.com/go-openapi/swag/netutils v0.25.1 +# github.com/go-openapi/swag/netutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/netutils -# github.com/go-openapi/swag/stringutils v0.25.1 +# github.com/go-openapi/swag/stringutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/stringutils -# github.com/go-openapi/swag/typeutils v0.25.1 +# github.com/go-openapi/swag/typeutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/typeutils -# github.com/go-openapi/swag/yamlutils v0.25.1 +# github.com/go-openapi/swag/yamlutils v0.25.4 ## explicit; go 1.24.0 github.com/go-openapi/swag/yamlutils -# github.com/go-openapi/validate v0.25.0 +# github.com/go-openapi/validate v0.25.1 ## explicit; go 1.24.0 github.com/go-openapi/validate # github.com/go-redis/redis/v8 v8.11.5 @@ -548,9 +551,6 @@ github.com/gobwas/glob/syntax/ast github.com/gobwas/glob/syntax/lexer github.com/gobwas/glob/util/runes github.com/gobwas/glob/util/strings -# github.com/gofrs/uuid v4.4.0+incompatible -## explicit -github.com/gofrs/uuid # github.com/gogo/googleapis v1.4.1 ## explicit; go 1.12 github.com/gogo/googleapis/google/rpc @@ -565,11 +565,11 @@ github.com/gogo/protobuf/types # github.com/gogo/status v1.1.1 ## explicit; go 1.12 github.com/gogo/status -# github.com/golang-jwt/jwt/v5 v5.2.2 -## explicit; go 1.18 +# github.com/golang-jwt/jwt/v5 v5.3.0 +## explicit; go 1.21 github.com/golang-jwt/jwt/v5 -# github.com/golang-migrate/migrate/v4 v4.18.1 -## explicit; go 1.22.0 +# github.com/golang-migrate/migrate/v4 v4.19.1 +## explicit; go 1.24.0 github.com/golang-migrate/migrate/v4 github.com/golang-migrate/migrate/v4/database github.com/golang-migrate/migrate/v4/database/multistmt @@ -634,7 +634,7 @@ github.com/google/uuid ## explicit; go 1.23.0 github.com/googleapis/enterprise-certificate-proxy/client github.com/googleapis/enterprise-certificate-proxy/client/util -# github.com/googleapis/gax-go/v2 v2.14.2 +# github.com/googleapis/gax-go/v2 v2.15.0 ## explicit; go 1.23.0 github.com/googleapis/gax-go/v2 github.com/googleapis/gax-go/v2/apierror @@ -660,13 +660,14 @@ github.com/grpc-ecosystem/go-grpc-middleware github.com/grpc-ecosystem/go-grpc-middleware/v2 github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging -# github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 -## explicit; go 1.23.0 +# github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 +## explicit; go 1.24.0 github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule +github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options github.com/grpc-ecosystem/grpc-gateway/v2/runtime github.com/grpc-ecosystem/grpc-gateway/v2/utilities -# github.com/hashicorp/consul/api v1.32.0 -## explicit; go 1.22.12 +# github.com/hashicorp/consul/api v1.33.2 +## explicit; go 1.25.5 github.com/hashicorp/consul/api # github.com/hashicorp/errwrap v1.1.0 ## explicit @@ -696,7 +697,7 @@ github.com/hashicorp/go-rootcerts # github.com/hashicorp/go-sockaddr v1.0.7 ## explicit; go 1.19 github.com/hashicorp/go-sockaddr -# github.com/hashicorp/go-version v1.7.0 +# github.com/hashicorp/go-version v1.8.0 ## explicit github.com/hashicorp/go-version # github.com/hashicorp/golang-lru v0.6.0 @@ -708,7 +709,7 @@ github.com/hashicorp/golang-lru/v2 github.com/hashicorp/golang-lru/v2/expirable github.com/hashicorp/golang-lru/v2/internal github.com/hashicorp/golang-lru/v2/simplelru -# github.com/hashicorp/memberlist v0.5.3 => github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe +# github.com/hashicorp/memberlist v0.5.4 => github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe ## explicit; go 1.12 github.com/hashicorp/memberlist # github.com/hashicorp/serf v0.10.1 @@ -729,7 +730,7 @@ github.com/julienschmidt/httprouter # github.com/kamstrup/intmap v0.5.2 ## explicit; go 1.23 github.com/kamstrup/intmap -# github.com/klauspost/compress v1.18.2 +# github.com/klauspost/compress v1.18.3 ## explicit; go 1.23 github.com/klauspost/compress github.com/klauspost/compress/flate @@ -773,9 +774,13 @@ github.com/lann/builder # github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 ## explicit github.com/lann/ps -# github.com/lib/pq v1.10.9 -## explicit; go 1.13 +# github.com/lib/pq v1.11.1 +## explicit; go 1.21 github.com/lib/pq +github.com/lib/pq/internal/pgpass +github.com/lib/pq/internal/pqsql +github.com/lib/pq/internal/pqutil +github.com/lib/pq/internal/proto github.com/lib/pq/oid github.com/lib/pq/scram # github.com/mattn/go-colorable v0.1.14 @@ -796,7 +801,7 @@ github.com/mdlayher/vsock # github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a ## explicit; go 1.14 github.com/metalmatze/signal/server/signalhttp -# github.com/miekg/dns v1.1.66 +# github.com/miekg/dns v1.1.68 ## explicit; go 1.23.0 github.com/miekg/dns # github.com/minio/crc64nvme v1.1.1 @@ -833,16 +838,13 @@ github.com/mitchellh/go-homedir # github.com/mitchellh/go-wordwrap v1.0.1 ## explicit; go 1.14 github.com/mitchellh/go-wordwrap -# github.com/mitchellh/mapstructure v1.5.0 -## explicit; go 1.14 -github.com/mitchellh/mapstructure # github.com/mitchellh/reflectwalk v1.0.2 ## explicit github.com/mitchellh/reflectwalk # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd ## explicit github.com/modern-go/concurrent -# github.com/modern-go/reflect2 v1.0.2 +# github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee ## explicit; go 1.12 github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 @@ -899,7 +901,7 @@ github.com/parquet-go/bitpack/unsafecast # github.com/parquet-go/jsonlite v1.0.0 ## explicit; go 1.23 github.com/parquet-go/jsonlite -# github.com/parquet-go/parquet-go v0.26.4 +# github.com/parquet-go/parquet-go v0.27.0 ## explicit; go 1.24.9 github.com/parquet-go/parquet-go github.com/parquet-go/parquet-go/bloom @@ -967,7 +969,7 @@ github.com/prometheus-community/parquet-common/util # github.com/prometheus-community/prom-label-proxy v0.11.1 ## explicit; go 1.23.0 github.com/prometheus-community/prom-label-proxy/injectproxy -# github.com/prometheus/alertmanager v0.29.0 +# github.com/prometheus/alertmanager v0.31.0 ## explicit; go 1.24.0 github.com/prometheus/alertmanager/api github.com/prometheus/alertmanager/api/metrics @@ -993,6 +995,7 @@ github.com/prometheus/alertmanager/config github.com/prometheus/alertmanager/dispatch github.com/prometheus/alertmanager/featurecontrol github.com/prometheus/alertmanager/inhibit +github.com/prometheus/alertmanager/limit github.com/prometheus/alertmanager/matcher/compat github.com/prometheus/alertmanager/matcher/parse github.com/prometheus/alertmanager/nflog @@ -1023,6 +1026,7 @@ github.com/prometheus/alertmanager/silence/silencepb github.com/prometheus/alertmanager/store github.com/prometheus/alertmanager/template github.com/prometheus/alertmanager/timeinterval +github.com/prometheus/alertmanager/tracing github.com/prometheus/alertmanager/types github.com/prometheus/alertmanager/ui # github.com/prometheus/client_golang v1.23.2 @@ -1049,7 +1053,7 @@ github.com/prometheus/client_golang/exp/internal/github.com/efficientgo/core/bac # github.com/prometheus/client_model v0.6.2 ## explicit; go 1.22.0 github.com/prometheus/client_model/go -# github.com/prometheus/common v0.67.1 +# github.com/prometheus/common v0.67.5 ## explicit; go 1.24.0 github.com/prometheus/common/config github.com/prometheus/common/expfmt @@ -1058,14 +1062,14 @@ github.com/prometheus/common/model github.com/prometheus/common/promslog github.com/prometheus/common/route github.com/prometheus/common/version -# github.com/prometheus/exporter-toolkit v0.14.1 -## explicit; go 1.23.0 +# github.com/prometheus/exporter-toolkit v0.15.1 +## explicit; go 1.24.0 github.com/prometheus/exporter-toolkit/web # github.com/prometheus/otlptranslator v0.0.2 => github.com/prometheus/otlptranslator v0.0.0-20250620074007-94f535e0c588 ## explicit; go 1.23.0 github.com/prometheus/otlptranslator -# github.com/prometheus/procfs v0.16.1 -## explicit; go 1.23.0 +# github.com/prometheus/procfs v0.19.2 +## explicit; go 1.24.0 github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util @@ -1132,8 +1136,8 @@ github.com/prometheus/prometheus/util/teststorage github.com/prometheus/prometheus/util/testutil github.com/prometheus/prometheus/util/zeropool github.com/prometheus/prometheus/web/api/v1 -# github.com/prometheus/sigv4 v0.2.1 -## explicit; go 1.23.0 +# github.com/prometheus/sigv4 v0.4.0 +## explicit; go 1.24.0 github.com/prometheus/sigv4 # github.com/puzpuzpuz/xsync/v3 v3.5.1 ## explicit; go 1.18 @@ -1182,8 +1186,8 @@ github.com/soheilhy/cmux # github.com/sony/gobreaker v1.0.0 ## explicit; go 1.12 github.com/sony/gobreaker -# github.com/spf13/afero v1.11.0 -## explicit; go 1.19 +# github.com/spf13/afero v1.15.0 +## explicit; go 1.23.0 github.com/spf13/afero github.com/spf13/afero/internal/common github.com/spf13/afero/mem @@ -1295,13 +1299,14 @@ github.com/thanos-io/thanos/pkg/tracing/util/metautils ## explicit; go 1.24 github.com/tinylib/msgp/msgp github.com/tinylib/msgp/msgp/setof -# github.com/tjhop/slog-gokit v0.1.4 +# github.com/tjhop/slog-gokit v0.1.5 ## explicit; go 1.21 github.com/tjhop/slog-gokit -# github.com/trivago/tgo v1.0.7 -## explicit -github.com/trivago/tgo/tcontainer -github.com/trivago/tgo/treflect +# github.com/twpayne/go-geom v1.6.1 +## explicit; go 1.22 +github.com/twpayne/go-geom +github.com/twpayne/go-geom/encoding/wkb +github.com/twpayne/go-geom/encoding/wkbcommon # github.com/uber/jaeger-client-go v2.30.0+incompatible ## explicit github.com/uber/jaeger-client-go @@ -1359,29 +1364,31 @@ github.com/yuin/gopher-lua github.com/yuin/gopher-lua/ast github.com/yuin/gopher-lua/parse github.com/yuin/gopher-lua/pm -# go.etcd.io/etcd/api/v3 v3.5.17 -## explicit; go 1.22 +# go.etcd.io/etcd/api/v3 v3.6.7 +## explicit; go 1.24.0 go.etcd.io/etcd/api/v3/authpb go.etcd.io/etcd/api/v3/etcdserverpb go.etcd.io/etcd/api/v3/membershippb go.etcd.io/etcd/api/v3/mvccpb go.etcd.io/etcd/api/v3/v3rpc/rpctypes go.etcd.io/etcd/api/v3/version -# go.etcd.io/etcd/client/pkg/v3 v3.5.17 -## explicit; go 1.22 +go.etcd.io/etcd/api/v3/versionpb +# go.etcd.io/etcd/client/pkg/v3 v3.6.7 +## explicit; go 1.24.0 go.etcd.io/etcd/client/pkg/v3/fileutil go.etcd.io/etcd/client/pkg/v3/logutil go.etcd.io/etcd/client/pkg/v3/systemd go.etcd.io/etcd/client/pkg/v3/tlsutil go.etcd.io/etcd/client/pkg/v3/transport go.etcd.io/etcd/client/pkg/v3/types -# go.etcd.io/etcd/client/v3 v3.5.17 -## explicit; go 1.22 +go.etcd.io/etcd/client/pkg/v3/verify +# go.etcd.io/etcd/client/v3 v3.6.7 +## explicit; go 1.24.0 go.etcd.io/etcd/client/v3 go.etcd.io/etcd/client/v3/credentials go.etcd.io/etcd/client/v3/internal/endpoint go.etcd.io/etcd/client/v3/internal/resolver -# go.mongodb.org/mongo-driver v1.17.4 +# go.mongodb.org/mongo-driver v1.17.6 ## explicit; go 1.18 go.mongodb.org/mongo-driver/bson go.mongodb.org/mongo-driver/bson/bsoncodec @@ -1427,29 +1434,20 @@ go.opentelemetry.io/collector/confmap/xconfmap ## explicit; go 1.23.0 go.opentelemetry.io/collector/consumer go.opentelemetry.io/collector/consumer/internal -# go.opentelemetry.io/collector/featuregate v1.35.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/collector/featuregate v1.51.0 +## explicit; go 1.24.0 go.opentelemetry.io/collector/featuregate # go.opentelemetry.io/collector/internal/telemetry v0.129.0 ## explicit; go 1.23.0 go.opentelemetry.io/collector/internal/telemetry go.opentelemetry.io/collector/internal/telemetry/componentattribute -# go.opentelemetry.io/collector/pdata v1.35.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/collector/pdata v1.51.0 +## explicit; go 1.24.0 go.opentelemetry.io/collector/pdata/internal -go.opentelemetry.io/collector/pdata/internal/data -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development -go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1 go.opentelemetry.io/collector/pdata/internal/json +go.opentelemetry.io/collector/pdata/internal/otelgrpc go.opentelemetry.io/collector/pdata/internal/otlp +go.opentelemetry.io/collector/pdata/internal/proto go.opentelemetry.io/collector/pdata/pcommon go.opentelemetry.io/collector/pdata/plog go.opentelemetry.io/collector/pdata/pmetric @@ -1476,22 +1474,20 @@ go.opentelemetry.io/contrib/detectors/gcp ## explicit; go 1.23.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal -# go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.61.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.64.0 +## explicit; go 1.24.0 go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil -# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 +## explicit; go 1.24.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil # go.opentelemetry.io/contrib/propagators/autoprop v0.61.0 ## explicit; go 1.23.0 go.opentelemetry.io/contrib/propagators/autoprop -# go.opentelemetry.io/contrib/propagators/aws v1.36.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/contrib/propagators/aws v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/contrib/propagators/aws/xray # go.opentelemetry.io/contrib/propagators/b3 v1.36.0 ## explicit; go 1.23.0 @@ -1502,75 +1498,92 @@ go.opentelemetry.io/contrib/propagators/jaeger # go.opentelemetry.io/contrib/propagators/ot v1.36.0 ## explicit; go 1.23.0 go.opentelemetry.io/contrib/propagators/ot -# go.opentelemetry.io/otel v1.38.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute go.opentelemetry.io/otel/attribute/internal +go.opentelemetry.io/otel/attribute/internal/xxhash go.opentelemetry.io/otel/baggage go.opentelemetry.io/otel/codes go.opentelemetry.io/otel/internal/baggage go.opentelemetry.io/otel/internal/global go.opentelemetry.io/otel/propagation go.opentelemetry.io/otel/semconv/v1.17.0 -go.opentelemetry.io/otel/semconv/v1.20.0 go.opentelemetry.io/otel/semconv/v1.21.0 go.opentelemetry.io/otel/semconv/v1.24.0 go.opentelemetry.io/otel/semconv/v1.26.0 go.opentelemetry.io/otel/semconv/v1.30.0 go.opentelemetry.io/otel/semconv/v1.37.0 +go.opentelemetry.io/otel/semconv/v1.37.0/httpconv go.opentelemetry.io/otel/semconv/v1.37.0/otelconv -# go.opentelemetry.io/otel/bridge/opentracing v1.36.0 -## explicit; go 1.23.0 +go.opentelemetry.io/otel/semconv/v1.39.0 +go.opentelemetry.io/otel/semconv/v1.39.0/otelconv +# go.opentelemetry.io/otel/bridge/opentracing v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/bridge/opentracing go.opentelemetry.io/otel/bridge/opentracing/migration -# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform -# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x +# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 +## explicit; go 1.24.0 +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x # go.opentelemetry.io/otel/log v0.12.2 ## explicit; go 1.23.0 go.opentelemetry.io/otel/log go.opentelemetry.io/otel/log/embedded go.opentelemetry.io/otel/log/global go.opentelemetry.io/otel/log/internal/global -# go.opentelemetry.io/otel/metric v1.38.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel/metric v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded go.opentelemetry.io/otel/metric/noop -# go.opentelemetry.io/otel/sdk v1.38.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel/sdk v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/sdk go.opentelemetry.io/otel/sdk/instrumentation -go.opentelemetry.io/otel/sdk/internal/env go.opentelemetry.io/otel/sdk/internal/x go.opentelemetry.io/otel/sdk/resource go.opentelemetry.io/otel/sdk/trace -go.opentelemetry.io/otel/sdk/trace/internal/x +go.opentelemetry.io/otel/sdk/trace/internal/env +go.opentelemetry.io/otel/sdk/trace/internal/observ go.opentelemetry.io/otel/sdk/trace/tracetest -# go.opentelemetry.io/otel/sdk/metric v1.38.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel/sdk/metric v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/sdk/metric go.opentelemetry.io/otel/sdk/metric/exemplar go.opentelemetry.io/otel/sdk/metric/internal go.opentelemetry.io/otel/sdk/metric/internal/aggregate -go.opentelemetry.io/otel/sdk/metric/internal/x +go.opentelemetry.io/otel/sdk/metric/internal/observ +go.opentelemetry.io/otel/sdk/metric/internal/reservoir go.opentelemetry.io/otel/sdk/metric/metricdata -# go.opentelemetry.io/otel/trace v1.38.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/otel/trace v1.40.0 +## explicit; go 1.24.0 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded go.opentelemetry.io/otel/trace/internal/telemetry go.opentelemetry.io/otel/trace/noop -# go.opentelemetry.io/proto/otlp v1.7.0 +# go.opentelemetry.io/proto/otlp v1.9.0 ## explicit; go 1.23.0 go.opentelemetry.io/proto/otlp/collector/trace/v1 go.opentelemetry.io/proto/otlp/common/v1 @@ -1616,7 +1629,7 @@ go4.org/intern # go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 ## explicit; go 1.11 go4.org/unsafe/assume-no-moving-gc -# golang.org/x/crypto v0.46.0 +# golang.org/x/crypto v0.47.0 ## explicit; go 1.24.0 golang.org/x/crypto/argon2 golang.org/x/crypto/bcrypt @@ -1631,14 +1644,14 @@ golang.org/x/crypto/internal/alias golang.org/x/crypto/internal/poly1305 golang.org/x/crypto/pkcs12 golang.org/x/crypto/pkcs12/internal/rc2 -# golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 +# golang.org/x/exp v0.0.0-20250808145144-a408d31f581a ## explicit; go 1.23.0 golang.org/x/exp/constraints golang.org/x/exp/slices -# golang.org/x/mod v0.30.0 +# golang.org/x/mod v0.32.0 ## explicit; go 1.24.0 golang.org/x/mod/semver -# golang.org/x/net v0.48.0 +# golang.org/x/net v0.49.0 ## explicit; go 1.24.0 golang.org/x/net/bpf golang.org/x/net/context @@ -1657,7 +1670,7 @@ golang.org/x/net/ipv6 golang.org/x/net/netutil golang.org/x/net/publicsuffix golang.org/x/net/trace -# golang.org/x/oauth2 v0.32.0 +# golang.org/x/oauth2 v0.34.0 ## explicit; go 1.24.0 golang.org/x/oauth2 golang.org/x/oauth2/authhandler @@ -1675,13 +1688,13 @@ golang.org/x/oauth2/jwt golang.org/x/sync/errgroup golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.39.0 +# golang.org/x/sys v0.40.0 ## explicit; go 1.24.0 golang.org/x/sys/cpu golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/text v0.32.0 +# golang.org/x/text v0.33.0 ## explicit; go 1.24.0 golang.org/x/text/cases golang.org/x/text/internal @@ -1694,10 +1707,10 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/time v0.12.0 -## explicit; go 1.23.0 +# golang.org/x/time v0.14.0 +## explicit; go 1.24.0 golang.org/x/time/rate -# golang.org/x/tools v0.39.0 +# golang.org/x/tools v0.41.0 ## explicit; go 1.24.0 golang.org/x/tools/go/ast/edge golang.org/x/tools/go/ast/inspector @@ -1723,7 +1736,7 @@ golang.org/x/tools/internal/versions gonum.org/v1/gonum/floats gonum.org/v1/gonum/floats/scalar gonum.org/v1/gonum/internal/asm/f64 -# google.golang.org/api v0.239.0 +# google.golang.org/api v0.247.0 ## explicit; go 1.23.0 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport @@ -1740,13 +1753,13 @@ google.golang.org/api/storage/v1 google.golang.org/api/transport google.golang.org/api/transport/grpc google.golang.org/api/transport/http -# google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 +# google.golang.org/genproto v0.0.0-20250603155806-513f23925822 ## explicit; go 1.23.0 google.golang.org/genproto/googleapis/type/calendarperiod google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/googleapis/type/timeofday -# google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda +# google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 ## explicit; go 1.24.0 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations @@ -1756,12 +1769,12 @@ google.golang.org/genproto/googleapis/api/httpbody google.golang.org/genproto/googleapis/api/label google.golang.org/genproto/googleapis/api/metric google.golang.org/genproto/googleapis/api/monitoredres -# google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda +# google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 ## explicit; go 1.24.0 google.golang.org/genproto/googleapis/rpc/code google.golang.org/genproto/googleapis/rpc/errdetails google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.76.0 => google.golang.org/grpc v1.71.2 +# google.golang.org/grpc v1.78.0 => google.golang.org/grpc v1.71.2 ## explicit; go 1.22.0 google.golang.org/grpc google.golang.org/grpc/attributes @@ -1909,7 +1922,7 @@ google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry google.golang.org/grpc/xds/internal/xdsclient/xdslbregistry/converter google.golang.org/grpc/xds/internal/xdsclient/xdsresource google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version -# google.golang.org/protobuf v1.36.10 +# google.golang.org/protobuf v1.36.11 ## explicit; go 1.23 google.golang.org/protobuf/encoding/protodelim google.golang.org/protobuf/encoding/protojson